Update email input autocomplete, multiline text input rows, and link button types.master
@@ -1,6 +1,6 @@ | |||||
{ | { | ||||
"name": "@tesseract-design/web-formatted-react", | "name": "@tesseract-design/web-formatted-react", | ||||
"version": "0.2.0", | |||||
"version": "0.2.1", | |||||
"files": [ | "files": [ | ||||
"dist", | "dist", | ||||
"src" | "src" | ||||
@@ -137,7 +137,7 @@ export const EmailInput = React.forwardRef<EmailInputDerivedElement, EmailInputP | |||||
aria-labelledby={labelId} | aria-labelledby={labelId} | ||||
type="email" | type="email" | ||||
data-testid="input" | data-testid="input" | ||||
autoComplete={autoComplete ? 'email' : undefined} | |||||
autoComplete={autoComplete ? 'email' : 'off'} | |||||
pattern={pattern} | pattern={pattern} | ||||
className={tw( | className={tw( | ||||
'bg-negative rounded-inherit w-full peer block font-inherit tabular-nums', | 'bg-negative rounded-inherit w-full peer block font-inherit tabular-nums', | ||||
@@ -1,6 +1,6 @@ | |||||
{ | { | ||||
"name": "@tesseract-design/web-freeform-react", | "name": "@tesseract-design/web-freeform-react", | ||||
"version": "0.2.0", | |||||
"version": "0.2.1", | |||||
"files": [ | "files": [ | ||||
"dist", | "dist", | ||||
"src" | "src" | ||||
@@ -71,6 +71,7 @@ export const MultilineTextInput = React.forwardRef< | |||||
hiddenLabel = false, | hiddenLabel = false, | ||||
className, | className, | ||||
style, | style, | ||||
rows, | |||||
id: idProp, | id: idProp, | ||||
...etcProps | ...etcProps | ||||
}: MultilineTextInputProps, | }: MultilineTextInputProps, | ||||
@@ -127,9 +128,10 @@ export const MultilineTextInput = React.forwardRef< | |||||
aria-labelledby={labelId} | aria-labelledby={labelId} | ||||
id={id} | id={id} | ||||
data-testid="input" | data-testid="input" | ||||
style={{ | |||||
style={Number.isFinite(rows) ? undefined : { | |||||
height: 0, | height: 0, | ||||
}} | }} | ||||
rows={rows} | |||||
className={tw( | className={tw( | ||||
'bg-negative rounded-inherit w-full peer block font-inherit', | 'bg-negative rounded-inherit w-full peer block font-inherit', | ||||
'focus:outline-0', | 'focus:outline-0', | ||||
@@ -1,6 +1,6 @@ | |||||
{ | { | ||||
"name": "@tesseract-design/web-navigation-react", | "name": "@tesseract-design/web-navigation-react", | ||||
"version": "0.2.0", | |||||
"version": "0.2.1", | |||||
"files": [ | "files": [ | ||||
"dist", | "dist", | ||||
"src" | "src" | ||||
@@ -59,15 +59,15 @@ interface LinkButtonAnchorProps extends Pick<React.HTMLProps<LinkButtonDerivedEl | |||||
component: typeof LinkButtonDerivedElementComponent; | component: typeof LinkButtonDerivedElementComponent; | ||||
} | } | ||||
interface LinkButtonComponentType { | |||||
(props: { href?: string }): React.ReactNode; | |||||
export interface LinkButtonComponentType { | |||||
(props: { href: string }): React.ReactNode; | |||||
} | } | ||||
interface LinkButtonFCProps< | interface LinkButtonFCProps< | ||||
C extends LinkButtonComponentType = LinkButtonComponentType | C extends LinkButtonComponentType = LinkButtonComponentType | ||||
> { | > { | ||||
component: C; | component: C; | ||||
href: C extends (props: { href?: infer Href }) => React.ReactNode ? Href : never; | |||||
href: C extends (props: { href: infer Href }) => React.ReactNode ? Href : never; | |||||
} | } | ||||
type LinkButtonAllProps< | type LinkButtonAllProps< | ||||
@@ -262,19 +262,3 @@ LinkButton.defaultProps = { | |||||
// eslint-disable-next-line react/default-props-match-prop-types | // eslint-disable-next-line react/default-props-match-prop-types | ||||
href: undefined, | href: undefined, | ||||
}; | }; | ||||
// extend the component type here for defining new props | |||||
// interface LinkButtonComponentType { | |||||
// (props: { href?: number }): React.ReactNode; | |||||
// } | |||||
// const CustomLink = (props: { href?: string | number }) => { | |||||
// return null; | |||||
// }; | |||||
// | |||||
// const a = ( | |||||
// <LinkButton | |||||
// component="a" | |||||
// href="string" | |||||
// /> | |||||
// ); |