@nurihaus/web-design-system 1.4.19 → 1.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,8 @@ declare const TextFieldRoot: {
4
4
  (props: PropsWithChildren<TextFieldRootProps & {
5
5
  defaultValue?: string;
6
6
  }>): import("react/jsx-runtime").JSX.Element;
7
- TextLabel: (props: TextFieldLabelProps) => number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
7
+ TextLabel: (props: TextFieldLabelProps) => number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
8
8
  InputField: React.ForwardRefExoticComponent<TextFieldInputProps & React.RefAttributes<HTMLInputElement>>;
9
- HelperText: (props: TextFieldHelperTextProps) => number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
9
+ HelperText: (props: TextFieldHelperTextProps) => number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
10
10
  };
11
11
  export default TextFieldRoot;
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  export interface TextFieldRootProps {
3
3
  children: React.ReactNode;
4
4
  value?: string;
5
- onChange?: (value: string) => void;
5
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
6
6
  validations: {
7
7
  key: string;
8
8
  rule: RegExp;
@@ -1,16 +1,14 @@
1
- import React, { ReactNode } from 'react';
1
+ import React, { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  import { size } from './text-field-props';
3
- export interface TextFieldProps {
3
+ export interface TextFieldProps extends Omit<ComponentPropsWithRef<'input'>, 'title' | 'size'> {
4
4
  size: (typeof size)[number];
5
5
  width: string;
6
6
  icon?: ReactNode;
7
7
  name: string;
8
8
  title?: ReactNode;
9
+ helperText?: ReactNode;
9
10
  value?: string;
10
- onChange?: (value: string) => void;
11
11
  defaultValue?: string;
12
- placeholder?: string;
13
- helperText?: ReactNode;
14
12
  validations?: {
15
13
  key: string;
16
14
  rule: RegExp;
@@ -20,8 +18,7 @@ export interface TextFieldProps {
20
18
  key: string;
21
19
  message: string;
22
20
  }[];
23
- disabled?: boolean;
24
21
  className?: string;
25
22
  }
26
- declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
23
+ declare const TextField: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
27
24
  export default TextField;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react/*';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import("react").ForwardRefExoticComponent<import("./text-field").TextFieldProps & import("react").RefAttributes<HTMLInputElement>>;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("./text-field").TextFieldProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
5
5
  };
6
6
  export default meta;
7
7
  type Story = StoryObj<typeof meta>;
@@ -3,5 +3,5 @@ interface ExternalStateType<T> {
3
3
  handler?: (state: T) => void;
4
4
  defaultProp: T;
5
5
  }
6
- export declare const useExternalState: <T>({ prop, handler, defaultProp, }: ExternalStateType<T>) => readonly [T, (handledValue: T | ((prevState: T) => T)) => void];
6
+ export declare const useExternalState: <T>({ prop, handler, defaultProp }: ExternalStateType<T>) => readonly [T, (handledValue: T | ((prevState: T) => T)) => void];
7
7
  export {};