@kroo-web/design-system 1.4.0 → 1.6.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.
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/src/components/DatePicker/index.d.ts +14 -1
- package/dist/cjs/src/components/NumberField/index.d.ts +17 -1
- package/dist/cjs/src/components/shared/FormField/index.d.ts +2 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/src/components/DatePicker/index.d.ts +14 -1
- package/dist/esm/src/components/NumberField/index.d.ts +17 -1
- package/dist/esm/src/components/shared/FormField/index.d.ts +2 -1
- package/dist/types.d.ts +31 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
3
|
export type TDatePicker<T extends FieldValues> = {
|
|
4
4
|
disabled?: boolean;
|
|
@@ -12,3 +12,16 @@ export type TDatePicker<T extends FieldValues> = {
|
|
|
12
12
|
name: Path<T>;
|
|
13
13
|
};
|
|
14
14
|
export declare const DatePicker: <T extends FieldValues>(props: TDatePicker<T>) => React.JSX.Element;
|
|
15
|
+
export type TNativeDatePickerProps = {
|
|
16
|
+
error?: {
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
helper?: {
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
max?: number | string;
|
|
25
|
+
min?: number | string;
|
|
26
|
+
} & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'max' | 'min' | 'type'>;
|
|
27
|
+
export declare const NativeDatePicker: React.ForwardRefExoticComponent<Omit<TNativeDatePickerProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
3
|
export type TNumberFieldProps<T extends FieldValues> = {
|
|
4
4
|
helper?: {
|
|
@@ -11,3 +11,19 @@ export type TNumberFieldProps<T extends FieldValues> = {
|
|
|
11
11
|
width?: number;
|
|
12
12
|
};
|
|
13
13
|
export declare const NumberField: <T extends FieldValues>(props: TNumberFieldProps<T>) => React.JSX.Element;
|
|
14
|
+
export type TNativeNumberFieldProps = {
|
|
15
|
+
defaultValue?: number;
|
|
16
|
+
error?: {
|
|
17
|
+
message: string;
|
|
18
|
+
};
|
|
19
|
+
helper?: {
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
max?: number | string;
|
|
25
|
+
min?: number | string;
|
|
26
|
+
missing?: boolean;
|
|
27
|
+
width?: number;
|
|
28
|
+
} & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'max' | 'min' | 'type'>;
|
|
29
|
+
export declare const NativeNumberField: React.ForwardRefExoticComponent<Omit<TNativeNumberFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,7 +3,8 @@ export type TFormFieldProps = {
|
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
error?: string;
|
|
5
5
|
helper?: ReactNode | string;
|
|
6
|
+
hideLabel?: boolean;
|
|
6
7
|
id: string;
|
|
7
8
|
label?: string;
|
|
8
9
|
};
|
|
9
|
-
export declare const FormField: ({ children, error, helper, id, label }: TFormFieldProps) => React.JSX.Element;
|
|
10
|
+
export declare const FormField: ({ children, error, helper, hideLabel, id, label }: TFormFieldProps) => React.JSX.Element;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
-
import React$1, { PropsWithChildren, ReactNode, HTMLProps, ElementType, ButtonHTMLAttributes, ChangeEventHandler,
|
|
2
|
+
import React$1, { PropsWithChildren, ReactNode, DetailedHTMLProps, InputHTMLAttributes, HTMLProps, ElementType, ButtonHTMLAttributes, ChangeEventHandler, OptionHTMLAttributes } from 'react';
|
|
3
3
|
import { MaterialSymbolProps } from 'react-material-symbols';
|
|
4
4
|
import { FieldValues, Path, ControllerRenderProps, UseFormReturn, FieldError } from 'react-hook-form';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
@@ -158,6 +158,19 @@ type TDatePicker<T extends FieldValues> = {
|
|
|
158
158
|
name: Path<T>;
|
|
159
159
|
};
|
|
160
160
|
declare const DatePicker: <T extends FieldValues>(props: TDatePicker<T>) => React$1.JSX.Element;
|
|
161
|
+
type TNativeDatePickerProps = {
|
|
162
|
+
error?: {
|
|
163
|
+
message: string;
|
|
164
|
+
};
|
|
165
|
+
helper?: {
|
|
166
|
+
message: string;
|
|
167
|
+
};
|
|
168
|
+
id: string;
|
|
169
|
+
label: string;
|
|
170
|
+
max?: number | string;
|
|
171
|
+
min?: number | string;
|
|
172
|
+
} & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'max' | 'min' | 'type'>;
|
|
173
|
+
declare const NativeDatePicker: React$1.ForwardRefExoticComponent<Omit<TNativeDatePickerProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
161
174
|
|
|
162
175
|
type TDisclosureProps = {
|
|
163
176
|
children: React$1.ReactNode;
|
|
@@ -235,6 +248,22 @@ type TNumberFieldProps<T extends FieldValues> = {
|
|
|
235
248
|
width?: number;
|
|
236
249
|
};
|
|
237
250
|
declare const NumberField: <T extends FieldValues>(props: TNumberFieldProps<T>) => React$1.JSX.Element;
|
|
251
|
+
type TNativeNumberFieldProps = {
|
|
252
|
+
defaultValue?: number;
|
|
253
|
+
error?: {
|
|
254
|
+
message: string;
|
|
255
|
+
};
|
|
256
|
+
helper?: {
|
|
257
|
+
message: string;
|
|
258
|
+
};
|
|
259
|
+
id: string;
|
|
260
|
+
label: string;
|
|
261
|
+
max?: number | string;
|
|
262
|
+
min?: number | string;
|
|
263
|
+
missing?: boolean;
|
|
264
|
+
width?: number;
|
|
265
|
+
} & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'max' | 'min' | 'type'>;
|
|
266
|
+
declare const NativeNumberField: React$1.ForwardRefExoticComponent<Omit<TNativeNumberFieldProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
238
267
|
|
|
239
268
|
type TPhoneFieldProps<T extends FieldValues> = {
|
|
240
269
|
className?: string;
|
|
@@ -474,4 +503,4 @@ interface WrapperProps extends PropsWithChildren {
|
|
|
474
503
|
}
|
|
475
504
|
declare const Wrapper: ({ as, children, className, variants }: WrapperProps) => React$1.JSX.Element;
|
|
476
505
|
|
|
477
|
-
export { Accordion, Button, Buttons, Callout, Card, Cards, type CardsVariants, Checkbox, Columns, ComboBox, DatePicker, Disclosure, Field, Form, type ICardOwnProps, type ICardProps, type ICardsProps, Icon, Link, Loading, Modal, NativePhoneField, NativeTextField, NumberField, OTPInput, PhoneField, PinInput, Popover, ProgressIndicator, RadioGroup, Range, Select, Skeleton, type TAccordionRootProps, type TAccordionTriggerProps, type TButtonProps, type TCalloutRootProps, type TCalloutTextProps, type TCardVariants, type TCheckboxProps, type TColumnsProps, type TComboBoxItem, type TComboBoxProps, type TDatePicker, type TDisclosureProps, type TIconProps, type TItem, type TLegacyMarketingFooter, type TLegacyMarketingHeading, type TLegacyMarketingText, type TLink, type TLoadingProps, type TModalButtonProps, type TModalContentProps, type TModalControlProps, type TModalHeaderProps, type TNativeCountrySelectProps, type TNativeInputProps, type TNativeTextFieldProps, type TNumberFieldProps, type TPhoneFieldProps, type TPinInputProps, type TPopoverContentProps, type TPopoverRootProps, type TPopoverTriggerProps, type TProgressIndicatorProps, type TRadioGroupProps, type TRangeProps, type TSelectProps, type TSkeletonProps, type TTabsContent, type TTabsList, type TTabsRoot, type TTabsTrigger, type TTagProps, type TTextFieldProps, type TToastDescriptionProps, type TToastIconProps, type TToastRootProps, type TToastTitleProps, type TTooltipContentProps, type TTooltipRootProps, type TTooltipTriggerProps, type TTypography, type TTypographyProps, type TTypographyVariants, type TUseModalProps, Table, TableBody, TableData, TableFooter, TableHead, TableHeader, TableRoot, TableRow, Tabs, Tag, TextField, Toast, Tooltip, Typography, Wrapper, type WrapperProps, type WrapperVariants, useModal };
|
|
506
|
+
export { Accordion, Button, Buttons, Callout, Card, Cards, type CardsVariants, Checkbox, Columns, ComboBox, DatePicker, Disclosure, Field, Form, type ICardOwnProps, type ICardProps, type ICardsProps, Icon, Link, Loading, Modal, NativeDatePicker, NativeNumberField, NativePhoneField, NativeTextField, NumberField, OTPInput, PhoneField, PinInput, Popover, ProgressIndicator, RadioGroup, Range, Select, Skeleton, type TAccordionRootProps, type TAccordionTriggerProps, type TButtonProps, type TCalloutRootProps, type TCalloutTextProps, type TCardVariants, type TCheckboxProps, type TColumnsProps, type TComboBoxItem, type TComboBoxProps, type TDatePicker, type TDisclosureProps, type TIconProps, type TItem, type TLegacyMarketingFooter, type TLegacyMarketingHeading, type TLegacyMarketingText, type TLink, type TLoadingProps, type TModalButtonProps, type TModalContentProps, type TModalControlProps, type TModalHeaderProps, type TNativeCountrySelectProps, type TNativeDatePickerProps, type TNativeInputProps, type TNativeNumberFieldProps, type TNativeTextFieldProps, type TNumberFieldProps, type TPhoneFieldProps, type TPinInputProps, type TPopoverContentProps, type TPopoverRootProps, type TPopoverTriggerProps, type TProgressIndicatorProps, type TRadioGroupProps, type TRangeProps, type TSelectProps, type TSkeletonProps, type TTabsContent, type TTabsList, type TTabsRoot, type TTabsTrigger, type TTagProps, type TTextFieldProps, type TToastDescriptionProps, type TToastIconProps, type TToastRootProps, type TToastTitleProps, type TTooltipContentProps, type TTooltipRootProps, type TTooltipTriggerProps, type TTypography, type TTypographyProps, type TTypographyVariants, type TUseModalProps, Table, TableBody, TableData, TableFooter, TableHead, TableHeader, TableRoot, TableRow, Tabs, Tag, TextField, Toast, Tooltip, Typography, Wrapper, type WrapperProps, type WrapperVariants, useModal };
|
package/package.json
CHANGED