@kroo-web/design-system 1.23.3 → 1.25.0

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.
@@ -1,34 +1,6 @@
1
- import { DetailedHTMLProps, OptionHTMLAttributes, ReactNode, SelectHTMLAttributes } from 'react';
2
- import { FieldValues, Path } from 'react-hook-form';
1
+ import { DetailedHTMLProps, SelectHTMLAttributes } from 'react';
3
2
 
4
- export type TItem = {
5
- id: string;
6
- title: string;
7
- };
8
- export type TSelectProps<T extends FieldValues> = {
9
- children?: ReactNode;
10
- defaultValue?: string;
11
- disabled?: boolean;
12
- helper?: {
13
- message: string;
14
- };
15
- id: string;
16
- items?: {
17
- id: string;
18
- props?: OptionHTMLAttributes<HTMLOptionElement>;
19
- title: string;
20
- }[];
21
- label: string;
22
- missing?: boolean;
23
- name: Path<T>;
24
- placeholder?: string;
25
- };
26
- /**
27
- * @deprecated This component is deprecated.
28
- * Please use the NativeSelect component instead.
29
- */
30
- export declare const Select: <T extends FieldValues>(props: TSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
31
- export type TNativeSelectProps = {
3
+ export type TSelectProps = {
32
4
  error?: {
33
5
  message?: string;
34
6
  };
@@ -44,4 +16,4 @@ export type TNativeSelectProps = {
44
16
  missing?: boolean;
45
17
  placeholder?: string;
46
18
  } & Omit<DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'children'>;
47
- export declare const NativeSelect: import('react').ForwardRefExoticComponent<Omit<TNativeSelectProps, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
19
+ export declare const Select: import('react').ForwardRefExoticComponent<Omit<TSelectProps, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
@@ -7,7 +7,3 @@ type Story = StoryObj<typeof Select>;
7
7
  export declare const GeneralUsage: Story;
8
8
  export declare const Labeling: Story;
9
9
  export declare const Missing: Story;
10
- export declare const CustomChildren: Story;
11
- export declare const WithCustomProps: Story;
12
- export declare const Disabled: Story;
13
- export declare const NativeSelectStories: Story;
@@ -1,28 +1,6 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes, ReactNode } from 'react';
2
- import { FieldValues, Path } from 'react-hook-form';
3
2
 
4
- export type TTextFieldProps<T extends FieldValues> = {
5
- className?: string;
6
- disabled?: boolean;
7
- disableError?: boolean;
8
- helper?: {
9
- message: ReactNode | string;
10
- };
11
- id: string;
12
- label: string;
13
- missing?: boolean;
14
- name: Path<T>;
15
- prefix?: ReactNode | string;
16
- rightContent?: ReactNode | string;
17
- suffix?: ReactNode | string;
18
- type?: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>['type'];
19
- } & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
20
- /**
21
- * @deprecated This component is deprecated.
22
- * Please use the NativeTextField component instead.
23
- */
24
- export declare const TextField: import('react').ForwardRefExoticComponent<Omit<TTextFieldProps<FieldValues>, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
25
- export type TNativeTextFieldProps = {
3
+ export type TTextFieldProps = {
26
4
  className?: string;
27
5
  error?: {
28
6
  message?: string;
@@ -37,4 +15,4 @@ export type TNativeTextFieldProps = {
37
15
  rightContent?: ReactNode | string;
38
16
  suffix?: ReactNode | string;
39
17
  } & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
40
- export declare const NativeTextField: import('react').ForwardRefExoticComponent<Omit<TNativeTextFieldProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
18
+ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<TTextFieldProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
@@ -12,7 +12,3 @@ export declare const Prefix: Story;
12
12
  export declare const Suffix: Story;
13
13
  export declare const WithKeyDown: Story;
14
14
  export declare const WithAbstractProps: Story;
15
- export declare const Native: Story;
16
- export declare const WithRHF: Story;
17
- export declare const RHFWithLongLabel: Story;
18
- export declare const NativeWithLongLabel: Story;