@kroo-web/design-system 1.6.0 → 1.7.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 +12 -12
- package/dist/cjs/src/components/DatePicker/index.d.ts +1 -0
- package/dist/cjs/src/components/NumberField/index.d.ts +1 -0
- package/dist/cjs/src/components/PhoneField/index.d.ts +2 -0
- package/dist/cjs/src/components/Select/index.d.ts +18 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/src/components/DatePicker/index.d.ts +1 -0
- package/dist/esm/src/components/NumberField/index.d.ts +1 -0
- package/dist/esm/src/components/PhoneField/index.d.ts +2 -0
- package/dist/esm/src/components/Select/index.d.ts +18 -1
- package/dist/types.d.ts +23 -2
- package/package.json +1 -1
|
@@ -23,5 +23,6 @@ export type TNativeDatePickerProps = {
|
|
|
23
23
|
label: string;
|
|
24
24
|
max?: number | string;
|
|
25
25
|
min?: number | string;
|
|
26
|
+
missing?: boolean;
|
|
26
27
|
} & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'max' | 'min' | 'type'>;
|
|
27
28
|
export declare const NativeDatePicker: React.ForwardRefExoticComponent<Omit<TNativeDatePickerProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -13,6 +13,7 @@ export type TNumberFieldProps<T extends FieldValues> = {
|
|
|
13
13
|
export declare const NumberField: <T extends FieldValues>(props: TNumberFieldProps<T>) => React.JSX.Element;
|
|
14
14
|
export type TNativeNumberFieldProps = {
|
|
15
15
|
defaultValue?: number;
|
|
16
|
+
disabled?: boolean;
|
|
16
17
|
error?: {
|
|
17
18
|
message: string;
|
|
18
19
|
};
|
|
@@ -13,6 +13,7 @@ export type TPhoneFieldProps<T extends FieldValues> = {
|
|
|
13
13
|
export declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => React.JSX.Element;
|
|
14
14
|
export type TNativeCountrySelectProps = {
|
|
15
15
|
id: string;
|
|
16
|
+
missing?: boolean;
|
|
16
17
|
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
17
18
|
} & DetailedHTMLProps<InputHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
|
|
18
19
|
export type TNativeInputProps = {
|
|
@@ -21,6 +22,7 @@ export type TNativeInputProps = {
|
|
|
21
22
|
message: string;
|
|
22
23
|
};
|
|
23
24
|
id: string;
|
|
25
|
+
missing?: boolean;
|
|
24
26
|
placeholder: string;
|
|
25
27
|
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
26
28
|
export declare const NativePhoneField: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { OptionHTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import React, { DetailedHTMLProps, OptionHTMLAttributes, ReactNode, SelectHTMLAttributes } from 'react';
|
|
2
2
|
import { FieldValues, Path } from 'react-hook-form';
|
|
3
3
|
export type TItem = {
|
|
4
4
|
id: string;
|
|
@@ -23,3 +23,20 @@ export type TSelectProps<T extends FieldValues> = {
|
|
|
23
23
|
placeholder?: string;
|
|
24
24
|
};
|
|
25
25
|
export declare const Select: <T extends FieldValues>(props: TSelectProps<T>) => React.JSX.Element;
|
|
26
|
+
export type TNativeSelectProps = {
|
|
27
|
+
error?: {
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
helper?: {
|
|
31
|
+
message: string;
|
|
32
|
+
};
|
|
33
|
+
id: string;
|
|
34
|
+
items: Array<{
|
|
35
|
+
id: string;
|
|
36
|
+
title: string;
|
|
37
|
+
}>;
|
|
38
|
+
label: string;
|
|
39
|
+
missing?: boolean;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
} & Omit<DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'children'>;
|
|
42
|
+
export declare const NativeSelect: React.ForwardRefExoticComponent<Omit<TNativeSelectProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
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, DetailedHTMLProps, InputHTMLAttributes, HTMLProps, ElementType, ButtonHTMLAttributes, ChangeEventHandler, OptionHTMLAttributes } from 'react';
|
|
2
|
+
import React$1, { PropsWithChildren, ReactNode, DetailedHTMLProps, InputHTMLAttributes, HTMLProps, ElementType, ButtonHTMLAttributes, ChangeEventHandler, OptionHTMLAttributes, SelectHTMLAttributes } 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';
|
|
@@ -169,6 +169,7 @@ type TNativeDatePickerProps = {
|
|
|
169
169
|
label: string;
|
|
170
170
|
max?: number | string;
|
|
171
171
|
min?: number | string;
|
|
172
|
+
missing?: boolean;
|
|
172
173
|
} & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'max' | 'min' | 'type'>;
|
|
173
174
|
declare const NativeDatePicker: React$1.ForwardRefExoticComponent<Omit<TNativeDatePickerProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
174
175
|
|
|
@@ -250,6 +251,7 @@ type TNumberFieldProps<T extends FieldValues> = {
|
|
|
250
251
|
declare const NumberField: <T extends FieldValues>(props: TNumberFieldProps<T>) => React$1.JSX.Element;
|
|
251
252
|
type TNativeNumberFieldProps = {
|
|
252
253
|
defaultValue?: number;
|
|
254
|
+
disabled?: boolean;
|
|
253
255
|
error?: {
|
|
254
256
|
message: string;
|
|
255
257
|
};
|
|
@@ -278,6 +280,7 @@ type TPhoneFieldProps<T extends FieldValues> = {
|
|
|
278
280
|
declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => React$1.JSX.Element;
|
|
279
281
|
type TNativeCountrySelectProps = {
|
|
280
282
|
id: string;
|
|
283
|
+
missing?: boolean;
|
|
281
284
|
onChange?: ChangeEventHandler<HTMLSelectElement>;
|
|
282
285
|
} & DetailedHTMLProps<InputHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
|
|
283
286
|
type TNativeInputProps = {
|
|
@@ -286,6 +289,7 @@ type TNativeInputProps = {
|
|
|
286
289
|
message: string;
|
|
287
290
|
};
|
|
288
291
|
id: string;
|
|
292
|
+
missing?: boolean;
|
|
289
293
|
placeholder: string;
|
|
290
294
|
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
291
295
|
declare const NativePhoneField: {
|
|
@@ -375,6 +379,23 @@ type TSelectProps<T extends FieldValues> = {
|
|
|
375
379
|
placeholder?: string;
|
|
376
380
|
};
|
|
377
381
|
declare const Select: <T extends FieldValues>(props: TSelectProps<T>) => React$1.JSX.Element;
|
|
382
|
+
type TNativeSelectProps = {
|
|
383
|
+
error?: {
|
|
384
|
+
message: string;
|
|
385
|
+
};
|
|
386
|
+
helper?: {
|
|
387
|
+
message: string;
|
|
388
|
+
};
|
|
389
|
+
id: string;
|
|
390
|
+
items: Array<{
|
|
391
|
+
id: string;
|
|
392
|
+
title: string;
|
|
393
|
+
}>;
|
|
394
|
+
label: string;
|
|
395
|
+
missing?: boolean;
|
|
396
|
+
placeholder?: string;
|
|
397
|
+
} & Omit<DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'children'>;
|
|
398
|
+
declare const NativeSelect: React$1.ForwardRefExoticComponent<Omit<TNativeSelectProps, "ref"> & React$1.RefAttributes<HTMLSelectElement>>;
|
|
378
399
|
|
|
379
400
|
type TSkeletonProps = {
|
|
380
401
|
height?: string;
|
|
@@ -503,4 +524,4 @@ interface WrapperProps extends PropsWithChildren {
|
|
|
503
524
|
}
|
|
504
525
|
declare const Wrapper: ({ as, children, className, variants }: WrapperProps) => React$1.JSX.Element;
|
|
505
526
|
|
|
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 };
|
|
527
|
+
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, NativeSelect, 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 TNativeSelectProps, 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