@kroo-web/design-system 1.25.0 → 1.27.1

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.
@@ -7,5 +7,4 @@ type Story = StoryObj<typeof Checkbox>;
7
7
  /** General usage of the component copy and paste this one to get up and running quickly */
8
8
  export declare const GeneralUsage: Story;
9
9
  export declare const CustomLabel: Story;
10
- export declare const CheckboxAsRadio: Story;
11
- export declare const NativeCheckboxVariants: Story;
10
+ export declare const CheckboxVariants: Story;
@@ -1,20 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { FieldValues, Path } from 'react-hook-form';
3
2
 
4
- export type TCheckboxProps<T extends FieldValues> = {
5
- className?: string;
6
- disabled?: boolean;
7
- id: string;
8
- label: ReactNode | string;
9
- name: Path<T>;
10
- variant?: 'checkbox' | 'radio';
11
- };
12
- /**
13
- * @deprecated This component is deprecated.
14
- * Please use the NativeCheckbox component instead.
15
- */
16
- export declare const Checkbox: <T extends FieldValues>(props: TCheckboxProps<T>) => import("react/jsx-runtime").JSX.Element;
17
- export type TNativeCheckboxProps = {
3
+ export type TCheckboxProps = {
18
4
  disabled?: boolean;
19
5
  error?: {
20
6
  message?: string;
@@ -25,4 +11,4 @@ export type TNativeCheckboxProps = {
25
11
  id: string;
26
12
  label: ReactNode | string;
27
13
  } & React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
28
- export declare const NativeCheckbox: import('react').ForwardRefExoticComponent<Omit<TNativeCheckboxProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
14
+ export declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<TCheckboxProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,27 +1,11 @@
1
1
  import { ChangeEventHandler, DetailedHTMLProps, InputHTMLAttributes, ReactNode } from 'react';
2
- import { FieldValues, Path } from 'react-hook-form';
3
2
 
4
- export type TPhoneFieldProps<T extends FieldValues> = {
5
- className?: string;
6
- disabled?: boolean;
7
- helper?: {
8
- message: ReactNode | string;
9
- };
10
- id: string;
11
- name: Path<T>;
12
- placeholder?: string;
13
- };
14
- /**
15
- * @deprecated This component is deprecated.
16
- * Please use the NativePhoneField component instead.
17
- */
18
- export declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
19
- export type TNativeCountrySelectProps = {
3
+ export type TCountrySelectProps = {
20
4
  id: string;
21
5
  missing?: boolean;
22
6
  onChange?: ChangeEventHandler<HTMLSelectElement>;
23
7
  } & DetailedHTMLProps<InputHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
24
- export type TNativeInputProps = {
8
+ export type TInputProps = {
25
9
  className?: string;
26
10
  error?: {
27
11
  message?: string;
@@ -30,9 +14,9 @@ export type TNativeInputProps = {
30
14
  missing?: boolean;
31
15
  placeholder: string;
32
16
  } & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
33
- export declare const NativePhoneField: {
34
- CountrySelect: import('react').ForwardRefExoticComponent<Omit<TNativeCountrySelectProps, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
35
- Input: import('react').ForwardRefExoticComponent<Omit<TNativeInputProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
17
+ export declare const PhoneField: {
18
+ CountrySelect: import('react').ForwardRefExoticComponent<Omit<TCountrySelectProps, "ref"> & import('react').RefAttributes<HTMLSelectElement>>;
19
+ Input: import('react').ForwardRefExoticComponent<Omit<TInputProps, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
36
20
  Root: ({ children }: {
37
21
  children: ReactNode;
38
22
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import { PhoneField } from '.';
3
3
 
4
- declare const _default: Meta<typeof PhoneField>;
4
+ declare const _default: Meta<typeof PhoneField.Root>;
5
5
  export default _default;
6
- type Story = StoryObj<typeof PhoneField>;
6
+ type Story = StoryObj<typeof PhoneField.Root>;
7
7
  export declare const GeneralUsage: Story;
8
8
  export declare const Error: Story;