@kroo-web/design-system 1.1.104 → 1.1.107
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/examples/form/index.d.ts +16 -16
- package/dist/cjs/index.js +16 -16
- package/dist/cjs/src/__tests__/setup.d.ts +5 -0
- package/dist/cjs/src/components/Accordion/config.d.ts +1 -1
- package/dist/cjs/src/components/Accordion/index.d.ts +12 -12
- package/dist/cjs/src/components/Button/index.d.ts +6 -6
- package/dist/cjs/src/components/Callout/index.d.ts +2 -2
- package/dist/cjs/src/components/Card/index.d.ts +7 -7
- package/dist/cjs/src/components/Cards/index.d.ts +2 -2
- package/dist/cjs/src/components/Checkbox/index.d.ts +4 -4
- package/dist/cjs/src/components/Columns/index.d.ts +2 -2
- package/dist/cjs/src/components/ComboBox/index.d.ts +5 -5
- package/dist/cjs/src/components/DatePicker/index.d.ts +5 -5
- package/dist/cjs/src/components/Disclosure/index.d.ts +2 -2
- package/dist/cjs/src/components/Form/index.d.ts +4 -4
- package/dist/cjs/src/components/Icon/index.d.ts +2 -2
- package/dist/cjs/src/components/Link/index.d.ts +3 -3
- package/dist/cjs/src/components/Loading/index.d.ts +3 -3
- package/dist/cjs/src/components/Modal/index.d.ts +8 -8
- package/dist/cjs/src/components/NumberField/index.d.ts +5 -5
- package/dist/cjs/src/components/PhoneField/index.d.ts +3 -3
- package/dist/cjs/src/components/PinInput/index.d.ts +5 -4
- package/dist/cjs/src/components/Popover/index.d.ts +2 -2
- package/dist/cjs/src/components/ProgressIndicator/index.d.ts +3 -3
- package/dist/cjs/src/components/RadioGroup/index.d.ts +7 -7
- package/dist/cjs/src/components/Range/index.d.ts +6 -6
- package/dist/cjs/src/components/Select/index.d.ts +8 -8
- package/dist/cjs/src/components/Skeleton/index.d.ts +2 -2
- package/dist/cjs/src/components/Table/index.d.ts +4 -4
- package/dist/cjs/src/components/Tabs/index.d.ts +3 -3
- package/dist/cjs/src/components/Tag/index.d.ts +4 -4
- package/dist/cjs/src/components/TextField/index.d.ts +9 -9
- package/dist/cjs/src/components/Toast/index.d.ts +3 -3
- package/dist/cjs/src/components/Tooltip/index.d.ts +7 -7
- package/dist/cjs/src/components/Typography/index.d.ts +5 -5
- package/dist/cjs/src/components/Wrapper/index.d.ts +7 -7
- package/dist/cjs/src/components/shared/FormField/index.d.ts +4 -4
- package/dist/cjs/src/hooks/useWindowSize.d.ts +1 -1
- package/dist/cjs/src/types/PolymorphicWithoutRef.d.ts +2 -2
- package/dist/cjs/src/utils/decorators/Grid/index.d.ts +1 -1
- package/dist/esm/examples/form/index.d.ts +16 -16
- package/dist/esm/index.js +16 -16
- package/dist/esm/src/__tests__/setup.d.ts +5 -0
- package/dist/esm/src/components/Accordion/config.d.ts +1 -1
- package/dist/esm/src/components/Accordion/index.d.ts +12 -12
- package/dist/esm/src/components/Button/index.d.ts +6 -6
- package/dist/esm/src/components/Callout/index.d.ts +2 -2
- package/dist/esm/src/components/Card/index.d.ts +7 -7
- package/dist/esm/src/components/Cards/index.d.ts +2 -2
- package/dist/esm/src/components/Checkbox/index.d.ts +4 -4
- package/dist/esm/src/components/Columns/index.d.ts +2 -2
- package/dist/esm/src/components/ComboBox/index.d.ts +5 -5
- package/dist/esm/src/components/DatePicker/index.d.ts +5 -5
- package/dist/esm/src/components/Disclosure/index.d.ts +2 -2
- package/dist/esm/src/components/Form/index.d.ts +4 -4
- package/dist/esm/src/components/Icon/index.d.ts +2 -2
- package/dist/esm/src/components/Link/index.d.ts +3 -3
- package/dist/esm/src/components/Loading/index.d.ts +3 -3
- package/dist/esm/src/components/Modal/index.d.ts +8 -8
- package/dist/esm/src/components/NumberField/index.d.ts +5 -5
- package/dist/esm/src/components/PhoneField/index.d.ts +3 -3
- package/dist/esm/src/components/PinInput/index.d.ts +5 -4
- package/dist/esm/src/components/Popover/index.d.ts +2 -2
- package/dist/esm/src/components/ProgressIndicator/index.d.ts +3 -3
- package/dist/esm/src/components/RadioGroup/index.d.ts +7 -7
- package/dist/esm/src/components/Range/index.d.ts +6 -6
- package/dist/esm/src/components/Select/index.d.ts +8 -8
- package/dist/esm/src/components/Skeleton/index.d.ts +2 -2
- package/dist/esm/src/components/Table/index.d.ts +4 -4
- package/dist/esm/src/components/Tabs/index.d.ts +3 -3
- package/dist/esm/src/components/Tag/index.d.ts +4 -4
- package/dist/esm/src/components/TextField/index.d.ts +9 -9
- package/dist/esm/src/components/Toast/index.d.ts +3 -3
- package/dist/esm/src/components/Tooltip/index.d.ts +7 -7
- package/dist/esm/src/components/Typography/index.d.ts +5 -5
- package/dist/esm/src/components/Wrapper/index.d.ts +7 -7
- package/dist/esm/src/components/shared/FormField/index.d.ts +4 -4
- package/dist/esm/src/hooks/useWindowSize.d.ts +1 -1
- package/dist/esm/src/types/PolymorphicWithoutRef.d.ts +2 -2
- package/dist/esm/src/utils/decorators/Grid/index.d.ts +1 -1
- package/dist/types.d.ts +148 -147
- package/package.json +19 -11
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React$1, { PropsWithChildren, ReactNode, HTMLProps, ElementType, ButtonHTMLAttributes, OptionHTMLAttributes, DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
2
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import React$1, { PropsWithChildren, ReactNode, HTMLProps, ElementType, ButtonHTMLAttributes, OptionHTMLAttributes, DetailedHTMLProps, InputHTMLAttributes } 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';
|
|
@@ -8,183 +8,183 @@ import * as RadixRadioGroup from '@radix-ui/react-radio-group';
|
|
|
8
8
|
import * as RadixTabs from '@radix-ui/react-tabs';
|
|
9
9
|
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
10
10
|
|
|
11
|
-
type TAccordionRootProps =
|
|
12
|
-
grouping?: 'attached' | 'detached';
|
|
11
|
+
type TAccordionRootProps = {
|
|
13
12
|
children: React$1.ReactNode;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
grouping?: 'attached' | 'detached';
|
|
14
|
+
} & React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
|
|
15
|
+
type TAccordionTriggerProps<C extends React$1.ElementType = 'p'> = {
|
|
16
16
|
as?: C;
|
|
17
|
-
size?: 'regular' | 'large';
|
|
18
17
|
controls?: React$1.ReactNode;
|
|
19
|
-
|
|
18
|
+
size?: 'large' | 'regular';
|
|
19
|
+
} & React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>;
|
|
20
20
|
declare const Accordion: {
|
|
21
|
-
|
|
21
|
+
Content: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
22
22
|
Item: (props: React$1.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>) => React$1.JSX.Element;
|
|
23
|
-
|
|
23
|
+
Root: (props: TAccordionRootProps) => React$1.JSX.Element;
|
|
24
|
+
Trigger: React$1.ForwardRefExoticComponent<{
|
|
24
25
|
as?: "p" | undefined;
|
|
25
|
-
size?: "regular" | "large";
|
|
26
26
|
controls?: React$1.ReactNode;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
size?: "large" | "regular";
|
|
28
|
+
} & Omit<AccordionPrimitive.AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
type Merge<T, U> = Omit<T, keyof U> & U;
|
|
32
|
-
type PropsWithAs<P, T extends React.ElementType> =
|
|
32
|
+
type PropsWithAs<P, T extends React.ElementType> = {
|
|
33
33
|
as?: T;
|
|
34
|
-
};
|
|
34
|
+
} & P;
|
|
35
35
|
type PolymorphicPropsWithoutRef<P, T extends React.ElementType> = Merge<T extends keyof JSX.IntrinsicElements ? React.PropsWithoutRef<JSX.IntrinsicElements[T]> : React.ComponentPropsWithoutRef<T>, PropsWithAs<P, T>>;
|
|
36
36
|
|
|
37
37
|
declare const defaultElement$1 = "button";
|
|
38
38
|
type TButtonVisualTypes = {
|
|
39
|
+
variant?: 'danger' | 'ghost' | 'primary' | 'secondary' | 'tertiary';
|
|
39
40
|
visualType?: 'button';
|
|
40
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'danger';
|
|
41
41
|
} | {
|
|
42
|
+
variant?: 'danger' | 'ghost' | 'standard';
|
|
42
43
|
visualType?: 'action';
|
|
43
|
-
variant?: 'standard' | 'ghost' | 'danger';
|
|
44
44
|
} | {
|
|
45
|
+
variant?: 'outline' | 'primary' | 'secondary';
|
|
45
46
|
visualType?: 'nav';
|
|
46
|
-
variant?: 'primary' | 'outline' | 'secondary';
|
|
47
47
|
} | {
|
|
48
|
-
visualType?: 'text';
|
|
49
48
|
variant?: 'primary' | 'secondary';
|
|
49
|
+
visualType?: 'text';
|
|
50
50
|
};
|
|
51
51
|
type TButtonOwnProps = {
|
|
52
52
|
as?: 'button' | 'span';
|
|
53
53
|
className?: string;
|
|
54
54
|
onlyIcon?: boolean;
|
|
55
|
-
} & React$1.ButtonHTMLAttributes<HTMLButtonElement> &
|
|
55
|
+
} & PropsWithChildren & React$1.ButtonHTMLAttributes<HTMLButtonElement> & TButtonVisualTypes;
|
|
56
56
|
type TButtonProps<T extends React$1.ElementType = typeof defaultElement$1> = PolymorphicPropsWithoutRef<TButtonOwnProps, T>;
|
|
57
|
-
declare function Button<T extends React$1.ElementType = typeof defaultElement$1>({ as, children,
|
|
57
|
+
declare function Button<T extends React$1.ElementType = typeof defaultElement$1>({ as, children, className, onlyIcon, variant, visualType, ...rest }: TButtonProps<T>): React$1.JSX.Element;
|
|
58
58
|
|
|
59
59
|
type TIconProps = {
|
|
60
|
-
size?: '
|
|
61
|
-
weight?: 'light' | '
|
|
60
|
+
size?: 'large' | 'regular' | 'xlarge';
|
|
61
|
+
weight?: 'light' | 'medium' | 'normal';
|
|
62
62
|
} & Omit<MaterialSymbolProps, 'size' | 'weight'>;
|
|
63
63
|
declare const Icon: ({ size, weight, ...rest }: TIconProps) => React$1.JSX.Element;
|
|
64
64
|
|
|
65
|
-
type TLegacyMarketingText = 'marketing-
|
|
65
|
+
type TLegacyMarketingText = 'marketing-large-light' | 'marketing-large-regular' | 'marketing-large-semi-bold' | 'marketing-medium-light' | 'marketing-medium-regular' | 'marketing-medium-semi-bold' | 'marketing-quote-light' | 'marketing-quote-regular' | 'marketing-quote-semi-bold' | 'marketing-small-light' | 'marketing-small-regular' | 'marketing-small-semi-bold' | 'marketing-tag-light' | 'marketing-tag-regular' | 'marketing-tag-semi-bold' | 'marketing-text-light' | 'marketing-text-regular' | 'marketing-text-semi-bold';
|
|
66
66
|
type TLegacyMarketingHeading = 'marketing-heading-1' | 'marketing-heading-2' | 'marketing-heading-3' | 'marketing-heading-4' | 'marketing-heading-5' | 'marketing-heading-6' | 'marketing-heading-7';
|
|
67
67
|
type TLegacyMarketingFooter = 'footer-regular' | 'footer-semi-bold';
|
|
68
|
-
type TTypography = '
|
|
69
|
-
type TTypographyVariants =
|
|
68
|
+
type TTypography = 'content-large' | 'content-large-light' | 'content-large-semi-bold' | 'content-regular' | 'content-regular-light' | 'content-regular-semi-bold' | 'content-title' | 'content-title-light' | 'content-title-semi-bold' | 'form-button' | 'form-helper' | 'form-input-normal' | 'form-input-semi-bold' | 'form-label' | 'tag';
|
|
69
|
+
type TTypographyVariants = TLegacyMarketingFooter | TLegacyMarketingHeading | TLegacyMarketingText | TTypography;
|
|
70
70
|
type TTypographyProps<C extends React$1.ElementType = 'p'> = {
|
|
71
71
|
as?: C;
|
|
72
|
-
variant?: TTypographyVariants;
|
|
73
72
|
children?: React$1.ReactNode;
|
|
74
73
|
className?: string;
|
|
74
|
+
variant?: TTypographyVariants;
|
|
75
75
|
} & React$1.ComponentPropsWithoutRef<C>;
|
|
76
|
-
declare const Typography: <C extends React$1.ElementType = "p">({ as,
|
|
76
|
+
declare const Typography: <C extends React$1.ElementType = "p">({ as, children, className, variant, ...rest }: TTypographyProps<C>) => React$1.JSX.Element;
|
|
77
77
|
|
|
78
78
|
type TCalloutRootProps = {
|
|
79
|
-
type?: '
|
|
79
|
+
type?: 'error' | 'positive' | 'primary' | 'secondary' | 'warning';
|
|
80
80
|
};
|
|
81
81
|
type TCalloutTextProps = TTypographyProps<'p'>;
|
|
82
82
|
declare const Callout: {
|
|
83
|
-
Root: ({ type, children }: PropsWithChildren<TCalloutRootProps>) => React$1.JSX.Element;
|
|
84
83
|
Icon: ({ size, weight, ...rest }: TIconProps) => React$1.JSX.Element;
|
|
84
|
+
Root: ({ children, type }: PropsWithChildren<TCalloutRootProps>) => React$1.JSX.Element;
|
|
85
85
|
Text: ({ children, ...props }: PropsWithChildren<TCalloutTextProps>) => React$1.JSX.Element;
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
declare const defaultElement = "div";
|
|
89
89
|
type TCardVariants = {
|
|
90
|
-
|
|
90
|
+
elementType?: 'div';
|
|
91
|
+
radius?: 'large' | 'medium' | 'none' | 'small';
|
|
91
92
|
size?: {
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
horizontal: 'extra-small' | 'large' | 'medium' | 'none' | 'small';
|
|
94
|
+
vertical: 'extra-small' | 'large' | 'medium' | 'none' | 'small';
|
|
94
95
|
};
|
|
95
|
-
|
|
96
|
-
elementType?: 'div';
|
|
96
|
+
visual?: 'primary' | 'secondary' | 'tertiary';
|
|
97
97
|
};
|
|
98
98
|
interface ICardOwnProps extends React$1.HTMLAttributes<HTMLDivElement>, PropsWithChildren {
|
|
99
99
|
as?: 'div';
|
|
100
|
-
variants?: TCardVariants;
|
|
101
100
|
className?: string;
|
|
102
101
|
isSquare?: boolean;
|
|
102
|
+
variants?: TCardVariants;
|
|
103
103
|
}
|
|
104
104
|
type ICardProps<T extends React$1.ElementType = typeof defaultElement> = PolymorphicPropsWithoutRef<ICardOwnProps, T>;
|
|
105
|
-
declare function Card<T extends React$1.ElementType = typeof defaultElement>({ as, children,
|
|
105
|
+
declare function Card<T extends React$1.ElementType = typeof defaultElement>({ as, children, className, isSquare, variants, ...rest }: ICardProps<T>): React$1.JSX.Element;
|
|
106
106
|
|
|
107
107
|
type CardsVariants = {
|
|
108
|
-
layout?: 'bento-
|
|
108
|
+
layout?: 'bento-five' | 'bento-four' | 'bento-three';
|
|
109
109
|
};
|
|
110
110
|
interface ICardsProps extends PropsWithChildren {
|
|
111
|
-
as: 'div' | 'ol' | '
|
|
111
|
+
as: 'div' | 'ol' | 'section' | 'ul';
|
|
112
112
|
variants: CardsVariants;
|
|
113
113
|
}
|
|
114
114
|
declare const Cards: ({ as, children, variants }: ICardsProps) => React$1.JSX.Element;
|
|
115
115
|
|
|
116
116
|
type TCheckboxProps<T extends FieldValues> = {
|
|
117
|
+
className?: string;
|
|
118
|
+
disabled?: boolean;
|
|
117
119
|
id: string;
|
|
120
|
+
label: ReactNode | string;
|
|
118
121
|
name: Path<T>;
|
|
119
|
-
|
|
120
|
-
disabled?: boolean;
|
|
121
|
-
className?: string;
|
|
122
|
-
variant?: 'radio' | 'checkbox';
|
|
122
|
+
variant?: 'checkbox' | 'radio';
|
|
123
123
|
};
|
|
124
124
|
declare const Checkbox: <T extends FieldValues>(props: TCheckboxProps<T>) => React$1.JSX.Element;
|
|
125
125
|
|
|
126
126
|
type TColumnsProps = {
|
|
127
|
-
cols: number;
|
|
128
127
|
children: React$1.ReactNode;
|
|
128
|
+
cols: number;
|
|
129
129
|
};
|
|
130
|
-
declare const Columns: ({
|
|
130
|
+
declare const Columns: ({ children, cols }: TColumnsProps) => React$1.JSX.Element;
|
|
131
131
|
|
|
132
132
|
type TComboBoxItem = {
|
|
133
|
-
text: string;
|
|
134
133
|
img?: string;
|
|
135
134
|
render?: ReactNode;
|
|
135
|
+
text: string;
|
|
136
136
|
};
|
|
137
137
|
type TComboBoxProps = {
|
|
138
|
+
alwaysOpen?: boolean;
|
|
139
|
+
field: ControllerRenderProps<FieldValues>;
|
|
138
140
|
label: string;
|
|
139
141
|
name: string;
|
|
140
|
-
options: TComboBoxItem[];
|
|
141
142
|
onSelect?: (item: TComboBoxItem) => void;
|
|
142
|
-
|
|
143
|
-
field: ControllerRenderProps<FieldValues>;
|
|
143
|
+
options: TComboBoxItem[];
|
|
144
144
|
};
|
|
145
145
|
declare const ComboBox: (props: Omit<TComboBoxProps, "field">) => React$1.JSX.Element;
|
|
146
|
-
declare const Field: ({
|
|
146
|
+
declare const Field: ({ alwaysOpen, field: { onBlur, ...restField }, label, onSelect, options }: TComboBoxProps) => React$1.JSX.Element;
|
|
147
147
|
|
|
148
148
|
type TDatePicker<T extends FieldValues> = {
|
|
149
|
-
|
|
150
|
-
name: Path<T>;
|
|
151
|
-
label: string;
|
|
149
|
+
disabled?: boolean;
|
|
152
150
|
helper?: {
|
|
153
151
|
message: string;
|
|
154
152
|
};
|
|
155
|
-
|
|
153
|
+
id: string;
|
|
154
|
+
label: string;
|
|
156
155
|
max?: string;
|
|
157
|
-
|
|
156
|
+
min?: string;
|
|
157
|
+
name: Path<T>;
|
|
158
158
|
};
|
|
159
159
|
declare const DatePicker: <T extends FieldValues>(props: TDatePicker<T>) => React$1.JSX.Element;
|
|
160
160
|
|
|
161
161
|
type TDisclosureProps = {
|
|
162
|
-
condition: boolean;
|
|
163
162
|
children: React$1.ReactNode;
|
|
163
|
+
condition: boolean;
|
|
164
164
|
};
|
|
165
|
-
declare const Disclosure: ({
|
|
165
|
+
declare const Disclosure: ({ children, condition }: TDisclosureProps) => React$1.JSX.Element;
|
|
166
166
|
|
|
167
|
-
type TFormProps<T extends FieldValues> =
|
|
167
|
+
type TFormProps<T extends FieldValues> = {
|
|
168
168
|
methods: UseFormReturn<T>;
|
|
169
169
|
onSubmit: (values: T) => void;
|
|
170
|
-
}
|
|
171
|
-
declare const Form: <T extends FieldValues>({
|
|
170
|
+
} & PropsWithChildren<HTMLProps<HTMLFormElement>>;
|
|
171
|
+
declare const Form: <T extends FieldValues>({ children, methods, onSubmit, ...rest }: TFormProps<T>) => React$1.JSX.Element;
|
|
172
172
|
|
|
173
173
|
type PolymorphicLink<T extends ElementType> = {
|
|
174
174
|
as?: T;
|
|
175
175
|
className?: string;
|
|
176
176
|
} & PropsWithChildren;
|
|
177
|
-
type AnchorProps =
|
|
177
|
+
type AnchorProps = {
|
|
178
178
|
as?: undefined;
|
|
179
|
-
}
|
|
180
|
-
type TLink<T extends ElementType> = PolymorphicLink<T
|
|
179
|
+
} & React$1.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
180
|
+
type TLink<T extends ElementType> = AnchorProps | PolymorphicLink<T>;
|
|
181
181
|
declare const Link: <T extends ElementType = "a">({ as, children, className, ...rest }: TLink<T>) => React$1.JSX.Element;
|
|
182
182
|
|
|
183
183
|
declare const sizes: {
|
|
184
|
-
small: string;
|
|
185
|
-
medium: string;
|
|
186
|
-
large: string;
|
|
187
184
|
full: string;
|
|
185
|
+
large: string;
|
|
186
|
+
medium: string;
|
|
187
|
+
small: string;
|
|
188
188
|
};
|
|
189
189
|
type TLoadingProps = {
|
|
190
190
|
size?: keyof typeof sizes;
|
|
@@ -193,112 +193,113 @@ declare const Loading: ({ size }: TLoadingProps) => React$1.JSX.Element;
|
|
|
193
193
|
|
|
194
194
|
type TUseModalProps = {
|
|
195
195
|
activeModal: string;
|
|
196
|
+
close: () => void;
|
|
196
197
|
isOpen: boolean;
|
|
197
198
|
open: (value: string) => void;
|
|
198
|
-
close: () => void;
|
|
199
199
|
};
|
|
200
200
|
declare const useModal: zustand.UseBoundStore<zustand.StoreApi<TUseModalProps>>;
|
|
201
201
|
type TModalContentProps = {
|
|
202
202
|
children: React$1.ReactNode;
|
|
203
|
-
value: string;
|
|
204
|
-
focusTrap?: boolean;
|
|
205
203
|
closeOnBackdropClick?: boolean;
|
|
204
|
+
focusTrap?: boolean;
|
|
205
|
+
value: string;
|
|
206
206
|
};
|
|
207
207
|
type TModalControlProps = {
|
|
208
208
|
children: React$1.ReactNode;
|
|
209
209
|
value: string;
|
|
210
210
|
} & TButtonProps;
|
|
211
211
|
type TModalHeaderProps = {
|
|
212
|
+
actionButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
213
|
+
onClick?: () => void;
|
|
212
214
|
title: string;
|
|
213
215
|
variant?: 'action';
|
|
214
|
-
onClick?: () => void;
|
|
215
|
-
actionButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
216
216
|
};
|
|
217
217
|
type TModalButtonProps = PropsWithChildren;
|
|
218
218
|
declare const Buttons: ({ children }: TModalButtonProps) => React$1.JSX.Element;
|
|
219
219
|
declare const Modal: {
|
|
220
|
-
Content: ({ value, children, focusTrap, closeOnBackdropClick }: TModalContentProps) => React$1.JSX.Element;
|
|
221
|
-
Control: ({ value, children, ...rest }: TModalControlProps) => React$1.JSX.Element;
|
|
222
|
-
Header: ({ title, variant, onClick, actionButtonProps }: TModalHeaderProps) => React$1.JSX.Element;
|
|
223
220
|
Buttons: ({ children }: TModalButtonProps) => React$1.JSX.Element;
|
|
221
|
+
Content: ({ children, closeOnBackdropClick, focusTrap, value }: TModalContentProps) => React$1.JSX.Element;
|
|
222
|
+
Control: ({ children, value, ...rest }: TModalControlProps) => React$1.JSX.Element;
|
|
223
|
+
Header: ({ actionButtonProps, onClick, title, variant }: TModalHeaderProps) => React$1.JSX.Element;
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
type TNumberFieldProps<T extends FieldValues> = {
|
|
227
|
-
label: string;
|
|
228
|
-
name: Path<T>;
|
|
229
|
-
min?: number;
|
|
230
|
-
max?: number;
|
|
231
|
-
width?: number;
|
|
232
227
|
helper?: {
|
|
233
228
|
message: string;
|
|
234
229
|
};
|
|
230
|
+
label: string;
|
|
231
|
+
max?: number;
|
|
232
|
+
min?: number;
|
|
233
|
+
name: Path<T>;
|
|
234
|
+
width?: number;
|
|
235
235
|
};
|
|
236
236
|
declare const NumberField: <T extends FieldValues>(props: TNumberFieldProps<T>) => React$1.JSX.Element;
|
|
237
237
|
|
|
238
238
|
type TPhoneFieldProps<T extends FieldValues> = {
|
|
239
|
-
|
|
240
|
-
name: Path<T>;
|
|
239
|
+
className?: string;
|
|
241
240
|
disabled?: boolean;
|
|
242
241
|
helper?: {
|
|
243
242
|
message: ReactNode | string;
|
|
244
243
|
};
|
|
245
|
-
|
|
244
|
+
id: string;
|
|
245
|
+
name: Path<T>;
|
|
246
246
|
placeholder?: string;
|
|
247
247
|
};
|
|
248
248
|
declare const PhoneField: <T extends FieldValues>(props: TPhoneFieldProps<T>) => React$1.JSX.Element;
|
|
249
249
|
|
|
250
250
|
interface TPinInputProps<T extends FieldValues> {
|
|
251
|
-
|
|
252
|
-
length: number;
|
|
253
|
-
label: string;
|
|
251
|
+
isNumeric?: boolean;
|
|
254
252
|
isOTP?: boolean;
|
|
255
253
|
isPassword?: boolean;
|
|
256
|
-
|
|
254
|
+
label: string;
|
|
255
|
+
length: number;
|
|
256
|
+
name: Path<T>;
|
|
257
257
|
}
|
|
258
258
|
declare const PinInput: <T extends FieldValues>(props: TPinInputProps<T>) => React$1.JSX.Element;
|
|
259
|
+
declare const OTPInput: () => React$1.JSX.Element;
|
|
259
260
|
|
|
260
261
|
type TPopoverRootProps = React$1.ComponentPropsWithoutRef<typeof RadixPopover.Root>;
|
|
261
262
|
type TPopoverTriggerProps = React$1.ComponentPropsWithoutRef<typeof RadixPopover.Trigger>;
|
|
262
263
|
type TPopoverContentProps = React$1.ComponentPropsWithoutRef<typeof RadixPopover.Content>;
|
|
263
264
|
declare const Popover: {
|
|
265
|
+
Content: ({ children, ...rest }: TPopoverContentProps) => React$1.JSX.Element;
|
|
264
266
|
Root: (props: TPopoverRootProps) => React$1.JSX.Element;
|
|
265
267
|
Trigger: ({ children, ...rest }: TPopoverTriggerProps) => React$1.JSX.Element;
|
|
266
|
-
Content: ({ children, ...rest }: TPopoverContentProps) => React$1.JSX.Element;
|
|
267
268
|
};
|
|
268
269
|
|
|
269
270
|
type TProgressIndicatorProps = {
|
|
270
|
-
label?: string;
|
|
271
|
-
size?: 'small' | 'medium' | 'full-width';
|
|
272
271
|
current?: number;
|
|
272
|
+
label?: string;
|
|
273
273
|
max?: number;
|
|
274
|
+
size?: 'full-width' | 'medium' | 'small';
|
|
274
275
|
};
|
|
275
|
-
declare const ProgressIndicator: ({
|
|
276
|
+
declare const ProgressIndicator: ({ current, label, max, size }: TProgressIndicatorProps) => React$1.JSX.Element;
|
|
276
277
|
|
|
277
278
|
type TRadioGroupProps<T extends FieldValues> = {
|
|
278
|
-
|
|
279
|
+
error?: FieldError;
|
|
279
280
|
label: string;
|
|
281
|
+
name: Path<T>;
|
|
280
282
|
variant?: 'cards' | 'circle';
|
|
281
|
-
error?: FieldError;
|
|
282
283
|
} & Omit<RadixRadioGroup.RadioGroupProps, 'name'>;
|
|
283
284
|
declare const RadioGroup: {
|
|
284
|
-
Root: <T extends FieldValues>({ children, className, name, label, variant, disabled, ...props }: TRadioGroupProps<T>) => React$1.JSX.Element;
|
|
285
|
-
Item: ({ children, className, variant, ...props }: RadixRadioGroup.RadioGroupItemProps & {
|
|
286
|
-
variant?: "circle" | "cards";
|
|
287
|
-
}) => React$1.JSX.Element;
|
|
288
285
|
Indicator: ({ className, ...props }: RadixRadioGroup.RadioGroupIndicatorProps) => React$1.JSX.Element;
|
|
286
|
+
Item: ({ children, className, variant, ...props }: {
|
|
287
|
+
variant?: "cards" | "circle";
|
|
288
|
+
} & RadixRadioGroup.RadioGroupItemProps) => React$1.JSX.Element;
|
|
289
|
+
Root: <T extends FieldValues>({ children, className, disabled, label, name, variant, ...props }: TRadioGroupProps<T>) => React$1.JSX.Element;
|
|
289
290
|
};
|
|
290
291
|
|
|
291
292
|
type TRangeProps<T extends FieldValues> = {
|
|
293
|
+
helper?: {
|
|
294
|
+
message: string;
|
|
295
|
+
};
|
|
292
296
|
id: string;
|
|
293
297
|
label: string;
|
|
294
|
-
name: Path<T>;
|
|
295
|
-
min?: number;
|
|
296
298
|
max?: number;
|
|
297
|
-
|
|
299
|
+
min?: number;
|
|
300
|
+
name: Path<T>;
|
|
298
301
|
showValue?: boolean;
|
|
299
|
-
|
|
300
|
-
message: string;
|
|
301
|
-
};
|
|
302
|
+
step?: number;
|
|
302
303
|
};
|
|
303
304
|
declare const Range: <T extends FieldValues>(props: TRangeProps<T>) => React$1.JSX.Element;
|
|
304
305
|
|
|
@@ -307,31 +308,31 @@ type TItem = {
|
|
|
307
308
|
title: string;
|
|
308
309
|
};
|
|
309
310
|
type TSelectProps<T extends FieldValues> = {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
311
|
+
children?: ReactNode;
|
|
312
|
+
defaultValue?: string;
|
|
313
|
+
disabled?: boolean;
|
|
313
314
|
helper?: {
|
|
314
315
|
message: string;
|
|
315
316
|
};
|
|
317
|
+
id: string;
|
|
316
318
|
items?: {
|
|
317
319
|
id: string;
|
|
318
|
-
title: string;
|
|
319
320
|
props?: OptionHTMLAttributes<HTMLOptionElement>;
|
|
321
|
+
title: string;
|
|
320
322
|
}[];
|
|
321
|
-
|
|
322
|
-
disabled?: boolean;
|
|
323
|
-
defaultValue?: string;
|
|
323
|
+
label: string;
|
|
324
324
|
missing?: boolean;
|
|
325
|
-
|
|
325
|
+
name: Path<T>;
|
|
326
|
+
placeholder?: string;
|
|
326
327
|
};
|
|
327
328
|
declare const Select: <T extends FieldValues>(props: TSelectProps<T>) => React$1.JSX.Element;
|
|
328
329
|
|
|
329
330
|
type TSkeletonProps = {
|
|
330
|
-
width?: string;
|
|
331
331
|
height?: string;
|
|
332
332
|
rounded?: boolean;
|
|
333
|
+
width?: string;
|
|
333
334
|
};
|
|
334
|
-
declare const Skeleton: ({
|
|
335
|
+
declare const Skeleton: ({ height, rounded, width }: TSkeletonProps) => React$1.JSX.Element;
|
|
335
336
|
|
|
336
337
|
declare const TableRoot: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
337
338
|
declare const TableHead: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
@@ -341,13 +342,13 @@ declare const TableRow: ({ children }: PropsWithChildren) => React$1.JSX.Element
|
|
|
341
342
|
declare const TableData: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
342
343
|
declare const TableFooter: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
343
344
|
declare const Table: {
|
|
344
|
-
Root: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
345
|
-
Head: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
346
|
-
Header: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
347
345
|
Body: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
348
|
-
Row: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
349
346
|
Data: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
350
347
|
Footer: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
348
|
+
Head: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
349
|
+
Header: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
350
|
+
Root: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
351
|
+
Row: ({ children }: PropsWithChildren) => React$1.JSX.Element;
|
|
351
352
|
};
|
|
352
353
|
|
|
353
354
|
type TTabsRoot = React$1.ComponentProps<typeof RadixTabs.Root>;
|
|
@@ -355,41 +356,41 @@ type TTabsList = React$1.ComponentProps<typeof RadixTabs.List>;
|
|
|
355
356
|
type TTabsTrigger = React$1.ComponentProps<typeof RadixTabs.Trigger>;
|
|
356
357
|
type TTabsContent = React$1.ComponentProps<typeof RadixTabs.Content>;
|
|
357
358
|
declare const Tabs: {
|
|
358
|
-
|
|
359
|
+
Content: ({ children, ...rest }: TTabsContent) => React$1.JSX.Element;
|
|
359
360
|
List: ({ children, ...rest }: TTabsList) => React$1.JSX.Element;
|
|
361
|
+
Root: ({ children, ...rest }: TTabsRoot) => React$1.JSX.Element;
|
|
360
362
|
Trigger: ({ children, ...rest }: TTabsTrigger) => React$1.JSX.Element;
|
|
361
|
-
Content: ({ children, ...rest }: TTabsContent) => React$1.JSX.Element;
|
|
362
363
|
};
|
|
363
364
|
|
|
364
365
|
type TTagProps = {
|
|
365
|
-
|
|
366
|
+
children: ReactNode | ReactNode[];
|
|
366
367
|
circularIcon?: boolean;
|
|
367
368
|
className?: string;
|
|
368
369
|
icon: boolean;
|
|
369
|
-
|
|
370
|
+
variant?: 'danger' | 'night' | 'positive' | 'primary' | 'secondary' | 'tertiary' | 'warning';
|
|
370
371
|
};
|
|
371
372
|
declare const Tag: {
|
|
372
|
-
Root: ({ variant, children, className, icon, circularIcon, ...rest }: TTagProps) => React$1.JSX.Element;
|
|
373
|
-
Icon: ({ size, weight, ...rest }: TIconProps) => React$1.JSX.Element;
|
|
374
373
|
Content: ({ children, ...rest }: TTypographyProps) => React$1.JSX.Element;
|
|
374
|
+
Icon: ({ size, weight, ...rest }: TIconProps) => React$1.JSX.Element;
|
|
375
|
+
Root: ({ children, circularIcon, className, icon, variant, ...rest }: TTagProps) => React$1.JSX.Element;
|
|
375
376
|
};
|
|
376
377
|
|
|
377
378
|
type TTextFieldProps<T extends FieldValues> = {
|
|
378
|
-
|
|
379
|
-
label: string;
|
|
380
|
-
name: Path<T>;
|
|
379
|
+
className?: string;
|
|
381
380
|
disabled?: boolean;
|
|
381
|
+
disableError?: boolean;
|
|
382
382
|
helper?: {
|
|
383
383
|
message: ReactNode | string;
|
|
384
384
|
};
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
suffix?: string | ReactNode;
|
|
388
|
-
className?: string;
|
|
389
|
-
rightContent?: ReactNode | string;
|
|
385
|
+
id: string;
|
|
386
|
+
label: string;
|
|
390
387
|
leftContent?: ReactNode | string;
|
|
391
388
|
missing?: boolean;
|
|
392
|
-
|
|
389
|
+
name: Path<T>;
|
|
390
|
+
prefix?: ReactNode | string;
|
|
391
|
+
rightContent?: ReactNode | string;
|
|
392
|
+
suffix?: ReactNode | string;
|
|
393
|
+
type?: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>['type'];
|
|
393
394
|
} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
394
395
|
declare const TextField: React$1.ForwardRefExoticComponent<Omit<TTextFieldProps<FieldValues>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
395
396
|
|
|
@@ -397,43 +398,43 @@ type TToastRootProps = {
|
|
|
397
398
|
children: React$1.ReactNode;
|
|
398
399
|
};
|
|
399
400
|
type TToastTitleProps = {
|
|
400
|
-
className?: string;
|
|
401
401
|
children: React$1.ReactNode;
|
|
402
|
+
className?: string;
|
|
402
403
|
};
|
|
403
404
|
type TToastDescriptionProps = {
|
|
404
405
|
children: React$1.ReactNode;
|
|
405
406
|
};
|
|
406
407
|
type TToastIconProps = TIconProps;
|
|
407
408
|
declare const Toast: {
|
|
408
|
-
Root: ({ children }: TToastRootProps) => React$1.JSX.Element;
|
|
409
|
-
Title: ({ className, children }: TToastTitleProps) => React$1.JSX.Element;
|
|
410
409
|
Description: ({ children }: TToastDescriptionProps) => React$1.JSX.Element;
|
|
411
410
|
Icon: (props: TToastIconProps) => React$1.JSX.Element;
|
|
411
|
+
Root: ({ children }: TToastRootProps) => React$1.JSX.Element;
|
|
412
|
+
Title: ({ children, className }: TToastTitleProps) => React$1.JSX.Element;
|
|
412
413
|
};
|
|
413
414
|
|
|
414
415
|
type TTooltipRootProps = React$1.ComponentProps<typeof RadixTooltip.Root>;
|
|
415
|
-
type TTooltipTriggerProps =
|
|
416
|
+
type TTooltipTriggerProps = {
|
|
416
417
|
className?: string;
|
|
417
|
-
}
|
|
418
|
-
type TTooltipContentProps =
|
|
418
|
+
} & React$1.ComponentProps<typeof RadixTooltip.Trigger>;
|
|
419
|
+
type TTooltipContentProps = {
|
|
419
420
|
className?: string;
|
|
420
|
-
}
|
|
421
|
+
} & React$1.ComponentProps<typeof RadixTooltip.Content>;
|
|
421
422
|
declare const Tooltip: {
|
|
423
|
+
Content: ({ children, className, ...rest }: TTooltipContentProps) => React$1.JSX.Element;
|
|
422
424
|
Root: ({ children, ...rest }: TTooltipRootProps) => React$1.JSX.Element;
|
|
423
|
-
Trigger: ({
|
|
424
|
-
Content: ({ className, children, ...rest }: TTooltipContentProps) => React$1.JSX.Element;
|
|
425
|
+
Trigger: ({ children, className, ...rest }: TTooltipTriggerProps) => React$1.JSX.Element;
|
|
425
426
|
};
|
|
426
427
|
|
|
427
|
-
interface WrapperProps extends PropsWithChildren {
|
|
428
|
-
as?: 'li' | 'div';
|
|
429
|
-
variants?: WrapperVariants;
|
|
430
|
-
className?: string;
|
|
431
|
-
}
|
|
432
428
|
type WrapperVariants = {
|
|
433
|
-
visual?: 'paper' | 'bento' | 'bento-icon';
|
|
434
429
|
orientation?: 'center';
|
|
435
430
|
type?: 'trustPilot';
|
|
431
|
+
visual?: 'bento' | 'bento-icon' | 'paper';
|
|
436
432
|
};
|
|
437
|
-
|
|
433
|
+
interface WrapperProps extends PropsWithChildren {
|
|
434
|
+
as?: 'div' | 'li';
|
|
435
|
+
className?: string;
|
|
436
|
+
variants?: WrapperVariants;
|
|
437
|
+
}
|
|
438
|
+
declare const Wrapper: ({ as, children, className, variants }: WrapperProps) => React$1.JSX.Element;
|
|
438
439
|
|
|
439
|
-
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, NumberField, 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 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 };
|
|
440
|
+
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, 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 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 };
|