Browse Source

Update components

Update email input autocomplete, multiline text input rows, and link button types.
master
TheoryOfNekomata 6 months ago
parent
commit
2503a64cbc
6 changed files with 10 additions and 24 deletions
  1. +1
    -1
      categories/web/formatted/react/package.json
  2. +1
    -1
      categories/web/formatted/react/src/components/EmailInput/index.tsx
  3. +1
    -1
      categories/web/freeform/react/package.json
  4. +3
    -1
      categories/web/freeform/react/src/components/MultilineTextInput/index.tsx
  5. +1
    -1
      categories/web/navigation/react/package.json
  6. +3
    -19
      categories/web/navigation/react/src/components/LinkButton/index.tsx

+ 1
- 1
categories/web/formatted/react/package.json View File

@@ -1,6 +1,6 @@
{
"name": "@tesseract-design/web-formatted-react",
"version": "0.2.0",
"version": "0.2.1",
"files": [
"dist",
"src"


+ 1
- 1
categories/web/formatted/react/src/components/EmailInput/index.tsx View File

@@ -137,7 +137,7 @@ export const EmailInput = React.forwardRef<EmailInputDerivedElement, EmailInputP
aria-labelledby={labelId}
type="email"
data-testid="input"
autoComplete={autoComplete ? 'email' : undefined}
autoComplete={autoComplete ? 'email' : 'off'}
pattern={pattern}
className={tw(
'bg-negative rounded-inherit w-full peer block font-inherit tabular-nums',


+ 1
- 1
categories/web/freeform/react/package.json View File

@@ -1,6 +1,6 @@
{
"name": "@tesseract-design/web-freeform-react",
"version": "0.2.0",
"version": "0.2.1",
"files": [
"dist",
"src"


+ 3
- 1
categories/web/freeform/react/src/components/MultilineTextInput/index.tsx View File

@@ -71,6 +71,7 @@ export const MultilineTextInput = React.forwardRef<
hiddenLabel = false,
className,
style,
rows,
id: idProp,
...etcProps
}: MultilineTextInputProps,
@@ -127,9 +128,10 @@ export const MultilineTextInput = React.forwardRef<
aria-labelledby={labelId}
id={id}
data-testid="input"
style={{
style={Number.isFinite(rows) ? undefined : {
height: 0,
}}
rows={rows}
className={tw(
'bg-negative rounded-inherit w-full peer block font-inherit',
'focus:outline-0',


+ 1
- 1
categories/web/navigation/react/package.json View File

@@ -1,6 +1,6 @@
{
"name": "@tesseract-design/web-navigation-react",
"version": "0.2.0",
"version": "0.2.1",
"files": [
"dist",
"src"


+ 3
- 19
categories/web/navigation/react/src/components/LinkButton/index.tsx View File

@@ -59,15 +59,15 @@ interface LinkButtonAnchorProps extends Pick<React.HTMLProps<LinkButtonDerivedEl
component: typeof LinkButtonDerivedElementComponent;
}

interface LinkButtonComponentType {
(props: { href?: string }): React.ReactNode;
export interface LinkButtonComponentType {
(props: { href: string }): React.ReactNode;
}

interface LinkButtonFCProps<
C extends LinkButtonComponentType = LinkButtonComponentType
> {
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<
@@ -262,19 +262,3 @@ LinkButton.defaultProps = {
// eslint-disable-next-line react/default-props-match-prop-types
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"
// />
// );

Loading…
Cancel
Save