@kroo-web/design-system 1.26.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.
@@ -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;