@vacano/ui 1.0.0 → 1.3.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/LICENSE.md +1 -1
- package/README.md +67 -124
- package/dist/X-CI1qRJDP.cjs +16 -0
- package/dist/X-CI1qRJDP.cjs.map +1 -0
- package/dist/X-Cm-i8Bh7.js +1283 -0
- package/dist/X-Cm-i8Bh7.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +3016 -3076
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +1754 -691
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +509 -952
- package/dist/index.js +4875 -6853
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +2 -0
- package/dist/lib.cjs.map +1 -0
- package/dist/lib.d.ts +161 -0
- package/dist/lib.js +20 -0
- package/dist/lib.js.map +1 -0
- package/dist/media-BR6nutcO.js +162 -0
- package/dist/media-BR6nutcO.js.map +1 -0
- package/dist/media-OVL6YjWb.cjs +39 -0
- package/dist/media-OVL6YjWb.cjs.map +1 -0
- package/dist/tooling-Dflq0Y98.cjs +2 -0
- package/dist/tooling-Dflq0Y98.cjs.map +1 -0
- package/dist/tooling-YDHxmiMT.js +18 -0
- package/dist/tooling-YDHxmiMT.js.map +1 -0
- package/package.json +62 -58
- package/dist/X-BRRD8eNW.cjs +0 -16
- package/dist/X-BRRD8eNW.cjs.map +0 -1
- package/dist/X-Cnp17Qsf.js +0 -1232
- package/dist/X-Cnp17Qsf.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,164 +1,79 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
1
|
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
3
|
import { HTMLAttributes } from 'react';
|
|
4
4
|
import { InputHTMLAttributes } from 'react';
|
|
5
5
|
import { JSX } from '@emotion/react/jsx-runtime';
|
|
6
6
|
import { PropsWithChildren } from 'react';
|
|
7
|
+
import { ReactElement } from 'react';
|
|
7
8
|
import { ReactNode } from 'react';
|
|
9
|
+
import { ReactPortal } from 'react';
|
|
8
10
|
import { Ref } from 'react';
|
|
9
11
|
|
|
10
|
-
export declare const
|
|
11
|
-
readonly sm: 640;
|
|
12
|
-
readonly md: 768;
|
|
13
|
-
readonly lg: 1024;
|
|
14
|
-
readonly xl: 1280;
|
|
15
|
-
readonly xl2: 1536;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export declare const Button: ({ char, children, className, classnames, disabled, fullWidth, icon, loading, onClick, variant, ...rest }: ButtonProps) => JSX.Element;
|
|
12
|
+
export declare const Button: ({ children, className, classnames, disabled, fullWidth, icon, loading, onClick, ref, keyBindings, size, type, variant, ...rest }: ButtonProps) => JSX.Element;
|
|
19
13
|
|
|
20
|
-
export declare type
|
|
21
|
-
|
|
22
|
-
content?: string;
|
|
14
|
+
export declare type ButtonClassNames = {
|
|
15
|
+
label?: string;
|
|
23
16
|
icon?: string;
|
|
24
|
-
|
|
25
|
-
char?: string;
|
|
26
|
-
loader?: string;
|
|
17
|
+
binding?: string;
|
|
27
18
|
};
|
|
28
19
|
|
|
29
|
-
export declare type ButtonProps = Omit<
|
|
30
|
-
char?: string;
|
|
20
|
+
export declare type ButtonProps = VacanoComponentProps<HTMLButtonElement, ButtonClassNames> & Omit<HTMLAttributes<HTMLButtonElement>, 'children' | 'className'> & {
|
|
31
21
|
children?: string;
|
|
32
|
-
|
|
33
|
-
'data-test-id'?: string;
|
|
22
|
+
disabled?: boolean;
|
|
34
23
|
fullWidth?: boolean;
|
|
35
24
|
icon?: ReactNode;
|
|
25
|
+
keyBindings?: KeyboardEventKey[];
|
|
36
26
|
loading?: boolean;
|
|
27
|
+
size?: VacanoComponentSize;
|
|
28
|
+
type?: ButtonType;
|
|
37
29
|
variant?: ButtonVariant;
|
|
38
30
|
};
|
|
39
31
|
|
|
40
|
-
export declare type
|
|
41
|
-
|
|
42
|
-
declare type
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
color: string;
|
|
59
|
-
backgroundColor: string;
|
|
60
|
-
borderColor: string;
|
|
61
|
-
};
|
|
62
|
-
char: {
|
|
63
|
-
color: string;
|
|
64
|
-
backgroundColor: string;
|
|
65
|
-
};
|
|
66
|
-
icon: {
|
|
67
|
-
color: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export declare const Checkbox: ({ checked, className, classnames, disabled, indeterminate, label, onChange, ref, state, ...rest }: CheckboxProps) => JSX.Element;
|
|
72
|
-
|
|
73
|
-
export declare const CheckboxCard: ({ checked, className, classnames, description, disabled, fullWidth, label, onChange, ref, state, ...rest }: CheckboxCardProps) => JSX.Element;
|
|
74
|
-
|
|
75
|
-
export declare type CheckboxCardClassnames = {
|
|
76
|
-
container?: string;
|
|
32
|
+
export declare type ButtonType = 'button' | 'submit' | 'reset' | 'link';
|
|
33
|
+
|
|
34
|
+
export declare type ButtonVariant = 'normal' | 'system' | 'success' | 'warning' | 'danger' | 'transparent';
|
|
35
|
+
|
|
36
|
+
export declare type CalendarView = 'days' | 'months' | 'years';
|
|
37
|
+
|
|
38
|
+
export declare const Card: ({ children, className, ref, border, shadow, ...rest }: PropsWithChildren<CardProps>) => JSX.Element;
|
|
39
|
+
|
|
40
|
+
export declare type CardProps = VacanoComponentProps<HTMLDivElement> & Omit<HTMLAttributes<HTMLDivElement>, 'className'> & {
|
|
41
|
+
border?: boolean;
|
|
42
|
+
shadow?: boolean;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare const Checkbox: ({ checked, className, classnames, disabled, indeterminate, label, onChange, ref, variant, ...rest }: CheckboxProps) => JSX.Element;
|
|
46
|
+
|
|
47
|
+
export declare const CheckboxCard: ({ checked, className, classnames, description, disabled, fullWidth, label, onChange, ref, variant, ...rest }: CheckboxCardProps) => JSX.Element;
|
|
48
|
+
|
|
49
|
+
export declare type CheckboxCardClassNames = {
|
|
77
50
|
checkbox?: string;
|
|
78
51
|
content?: string;
|
|
79
52
|
label?: string;
|
|
80
53
|
description?: string;
|
|
81
54
|
};
|
|
82
55
|
|
|
83
|
-
export declare type CheckboxCardProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> & {
|
|
56
|
+
export declare type CheckboxCardProps = VacanoComponentProps<HTMLInputElement, CheckboxCardClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'className'> & {
|
|
84
57
|
checked: boolean;
|
|
85
58
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
86
59
|
label: string;
|
|
87
60
|
description?: string;
|
|
88
61
|
fullWidth?: boolean;
|
|
89
|
-
|
|
90
|
-
className?: string;
|
|
91
|
-
classnames?: CheckboxCardClassnames;
|
|
92
|
-
ref?: Ref<HTMLInputElement>;
|
|
93
|
-
'data-test-id'?: string;
|
|
62
|
+
variant?: CheckboxCardVariant;
|
|
94
63
|
};
|
|
95
64
|
|
|
96
|
-
export declare type
|
|
97
|
-
|
|
98
|
-
declare type
|
|
99
|
-
container: {
|
|
100
|
-
borderColor: string;
|
|
101
|
-
checked: {
|
|
102
|
-
borderColor: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
label: {
|
|
106
|
-
color: string;
|
|
107
|
-
};
|
|
108
|
-
description: {
|
|
109
|
-
color: string;
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
declare type CheckboxCardTheme = {
|
|
114
|
-
container: {
|
|
115
|
-
backgroundColor: string;
|
|
116
|
-
borderColor: string;
|
|
117
|
-
hover: {
|
|
118
|
-
borderColor: string;
|
|
119
|
-
};
|
|
120
|
-
checked: {
|
|
121
|
-
backgroundColor: string;
|
|
122
|
-
borderColor: string;
|
|
123
|
-
};
|
|
124
|
-
focus: {
|
|
125
|
-
outlineColor: string;
|
|
126
|
-
};
|
|
127
|
-
disabled: {
|
|
128
|
-
backgroundColor: string;
|
|
129
|
-
borderColor: string;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
label: {
|
|
133
|
-
color: string;
|
|
134
|
-
disabled: {
|
|
135
|
-
color: string;
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
description: {
|
|
139
|
-
color: string;
|
|
140
|
-
disabled: {
|
|
141
|
-
color: string;
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
state: {
|
|
145
|
-
warning: CheckboxCardStateTheme;
|
|
146
|
-
error: CheckboxCardStateTheme;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export declare type CheckboxClassnames = {
|
|
151
|
-
container?: string;
|
|
65
|
+
export declare type CheckboxCardVariant = 'normal' | 'error';
|
|
66
|
+
|
|
67
|
+
export declare type CheckboxClassNames = {
|
|
152
68
|
input?: string;
|
|
153
69
|
box?: string;
|
|
154
70
|
icon?: string;
|
|
155
71
|
label?: string;
|
|
156
72
|
};
|
|
157
73
|
|
|
158
|
-
export declare const CheckboxGroup: ({ className, classnames, disabled, label, onChange, options, value, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
74
|
+
export declare const CheckboxGroup: ({ className, classnames, disabled, label, onChange, options, ref, value, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
159
75
|
|
|
160
|
-
export declare type
|
|
161
|
-
container?: string;
|
|
76
|
+
export declare type CheckboxGroupClassNames = {
|
|
162
77
|
label?: string;
|
|
163
78
|
options?: string;
|
|
164
79
|
checkbox?: string;
|
|
@@ -169,524 +84,403 @@ export declare type CheckboxGroupOption = {
|
|
|
169
84
|
value: string;
|
|
170
85
|
};
|
|
171
86
|
|
|
172
|
-
export declare type CheckboxGroupProps = {
|
|
87
|
+
export declare type CheckboxGroupProps = VacanoComponentProps<HTMLDivElement, CheckboxGroupClassNames> & {
|
|
173
88
|
options: CheckboxGroupOption[];
|
|
174
89
|
value: string[];
|
|
175
90
|
onChange: (values: string[]) => void;
|
|
176
91
|
label?: string;
|
|
177
92
|
disabled?: boolean;
|
|
178
|
-
className?: string;
|
|
179
|
-
classnames?: CheckboxGroupClassnames;
|
|
180
|
-
'data-test-id'?: string;
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
declare type CheckboxGroupTheme = {
|
|
184
|
-
label: {
|
|
185
|
-
color: string;
|
|
186
|
-
};
|
|
187
93
|
};
|
|
188
94
|
|
|
189
|
-
export declare type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> & {
|
|
95
|
+
export declare type CheckboxProps = VacanoComponentProps<HTMLInputElement, CheckboxClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'className'> & {
|
|
190
96
|
checked: boolean;
|
|
191
97
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
192
|
-
'data-test-id'?: string;
|
|
193
|
-
classnames?: CheckboxClassnames;
|
|
194
98
|
indeterminate?: boolean;
|
|
195
99
|
label?: string;
|
|
196
|
-
|
|
197
|
-
state?: CheckboxState;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
export declare type CheckboxState = 'warning' | 'error';
|
|
201
|
-
|
|
202
|
-
declare type CheckboxStateTheme = {
|
|
203
|
-
box: {
|
|
204
|
-
borderColor: string;
|
|
205
|
-
checked: {
|
|
206
|
-
backgroundColor: string;
|
|
207
|
-
borderColor: string;
|
|
208
|
-
};
|
|
209
|
-
focus: {
|
|
210
|
-
shadowColor: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
label: {
|
|
214
|
-
color: string;
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
declare type CheckboxTheme = {
|
|
219
|
-
box: {
|
|
220
|
-
backgroundColor: string;
|
|
221
|
-
borderColor: string;
|
|
222
|
-
checked: {
|
|
223
|
-
backgroundColor: string;
|
|
224
|
-
borderColor: string;
|
|
225
|
-
};
|
|
226
|
-
focus: {
|
|
227
|
-
shadowColor: string;
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
icon: {
|
|
231
|
-
color: string;
|
|
232
|
-
};
|
|
233
|
-
label: {
|
|
234
|
-
color: string;
|
|
235
|
-
};
|
|
236
|
-
state: {
|
|
237
|
-
warning: CheckboxStateTheme;
|
|
238
|
-
error: CheckboxStateTheme;
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
export declare const Chip: ({ children, className, classnames, fullWidth, status, ...rest }: PropsWithChildren<ChipProps>) => JSX.Element;
|
|
243
|
-
|
|
244
|
-
export declare type ChipClassnames = {
|
|
245
|
-
container?: string;
|
|
246
|
-
text?: string;
|
|
100
|
+
variant?: CheckboxVariant;
|
|
247
101
|
};
|
|
248
102
|
|
|
249
|
-
export declare type
|
|
250
|
-
|
|
251
|
-
|
|
103
|
+
export declare type CheckboxVariant = 'normal' | 'error';
|
|
104
|
+
|
|
105
|
+
export declare const Chip: ({ children, className, classnames, deletable, onDelete, ref, variant, ...rest }: ChipProps) => JSX.Element;
|
|
106
|
+
|
|
107
|
+
export declare type ChipClassNames = {
|
|
108
|
+
delete?: string;
|
|
109
|
+
label?: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export declare type ChipProps = VacanoComponentProps<HTMLSpanElement, ChipClassNames> & Omit<HTMLAttributes<HTMLSpanElement>, 'className'> & {
|
|
113
|
+
children: ReactNode;
|
|
114
|
+
variant?: ChipVariant;
|
|
115
|
+
deletable?: boolean;
|
|
116
|
+
onDelete?: () => void;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export declare type ChipVariant = 'gray' | 'red' | 'blue' | 'black';
|
|
120
|
+
|
|
121
|
+
export declare const Confirmation: ({ cancelBindings, cancelLabel, className, classnames, confirmLabel, loading, message, onCancel, onConfirm, open, ref, submitBindings, ...rest }: ConfirmationProps) => JSX.Element | null;
|
|
122
|
+
|
|
123
|
+
export declare type ConfirmationClassNames = {
|
|
124
|
+
message?: string;
|
|
125
|
+
actions?: string;
|
|
126
|
+
confirmButton?: string;
|
|
127
|
+
cancelButton?: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export declare type ConfirmationProps = VacanoComponentProps<HTMLDivElement, ConfirmationClassNames> & {
|
|
131
|
+
cancelBindings?: KeyboardEventKey[];
|
|
132
|
+
cancelLabel?: string;
|
|
133
|
+
confirmLabel?: string;
|
|
134
|
+
loading?: boolean;
|
|
135
|
+
message: ReactNode;
|
|
136
|
+
onCancel?: () => void;
|
|
137
|
+
onConfirm?: () => void;
|
|
138
|
+
open?: boolean;
|
|
139
|
+
style?: CSSProperties;
|
|
140
|
+
submitBindings?: KeyboardEventKey[];
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export declare const Container: ({ children, className, ref, ...rest }: PropsWithChildren<ContainerProps>) => JSX.Element;
|
|
144
|
+
|
|
145
|
+
export declare type ContainerProps = VacanoComponentProps<HTMLDivElement> & Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
|
|
146
|
+
|
|
147
|
+
export declare const DatePicker: ({ value, onChange, mode, displayFormat, placeholder, locale, weekStartsOn, minDate, maxDate, size, variant, disabled, fullWidth, label, portalRenderNode, open: controlledOpen, onOpen, onClose, className, classnames, ref, ...rest }: DatePickerProps) => JSX.Element;
|
|
148
|
+
|
|
149
|
+
export declare type DatePickerClassNames = {
|
|
150
|
+
trigger?: string;
|
|
151
|
+
calendar?: string;
|
|
152
|
+
header?: string;
|
|
153
|
+
grid?: string;
|
|
154
|
+
cell?: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export declare type DatePickerMode = 'date' | 'month' | 'year';
|
|
158
|
+
|
|
159
|
+
export declare type DatePickerPosition = 'top' | 'bottom';
|
|
160
|
+
|
|
161
|
+
export declare type DatePickerProps = VacanoComponentProps<HTMLDivElement, DatePickerClassNames> & {
|
|
162
|
+
/** Selected date value */
|
|
163
|
+
value?: Date | null;
|
|
164
|
+
/** Callback when date changes */
|
|
165
|
+
onChange?: (date: Date | null) => void;
|
|
166
|
+
/** Selection mode */
|
|
167
|
+
mode?: DatePickerMode;
|
|
168
|
+
/** Display format using Go-style date formatting (e.g., "02.01.2006", "January 2006") */
|
|
169
|
+
displayFormat?: string;
|
|
170
|
+
/** Placeholder text when no date selected */
|
|
171
|
+
placeholder?: string;
|
|
172
|
+
/** Locale for month/weekday names (e.g., "en-US", "ru", "de") */
|
|
173
|
+
locale?: string;
|
|
174
|
+
/** First day of week: 0 = Sunday, 1 = Monday */
|
|
175
|
+
weekStartsOn?: 0 | 1;
|
|
176
|
+
/** Minimum selectable date */
|
|
177
|
+
minDate?: Date;
|
|
178
|
+
/** Maximum selectable date */
|
|
179
|
+
maxDate?: Date;
|
|
180
|
+
/** Input size variant */
|
|
181
|
+
size?: VacanoComponentSize;
|
|
182
|
+
/** Input style variant */
|
|
183
|
+
variant?: DatePickerVariant;
|
|
184
|
+
/** Whether the picker is disabled */
|
|
185
|
+
disabled?: boolean;
|
|
186
|
+
/** Full width mode */
|
|
252
187
|
fullWidth?: boolean;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
readonly activeDark: "#ffffff20";
|
|
285
|
-
readonly redLight: "#c8323214";
|
|
286
|
-
readonly redMedium: "#c8323228";
|
|
287
|
-
readonly focusRingDark: "#00000080";
|
|
288
|
-
readonly focusRingDarkSubtle: "#00000040";
|
|
289
|
-
readonly focusRingLight: "#ffffff80";
|
|
290
|
-
readonly focusRingLightSubtle: "#ffffff40";
|
|
291
|
-
readonly focusRingDanger: "#c8323280";
|
|
292
|
-
readonly focusRingWarning: "#b4820040";
|
|
293
|
-
readonly focusRingError: "#c8323240";
|
|
294
|
-
readonly inputBgLight: "#00000008";
|
|
295
|
-
readonly inputBgDark: "#ffffff0d";
|
|
296
|
-
readonly inputBgWarning: "#ffb4001a";
|
|
297
|
-
readonly inputBgError: "#ff50501a";
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export declare const Dropdown: ({ trigger, children, placement, align, offset, open, onOpenChange, portalRenderNode, classnames, className, fullWidth, ...rest }: DropdownProps) => JSX.Element;
|
|
301
|
-
|
|
302
|
-
export declare type DropdownAlign = 'start' | 'end';
|
|
303
|
-
|
|
304
|
-
export declare type DropdownClassnames = {
|
|
305
|
-
container?: string;
|
|
188
|
+
/** Label text */
|
|
189
|
+
label?: string;
|
|
190
|
+
/** Portal render node for dropdown (for overflow hidden containers) */
|
|
191
|
+
portalRenderNode?: HTMLElement | null;
|
|
192
|
+
/** Controlled open state */
|
|
193
|
+
open?: boolean;
|
|
194
|
+
/** Callback when dropdown opens */
|
|
195
|
+
onOpen?: () => void;
|
|
196
|
+
/** Callback when dropdown closes */
|
|
197
|
+
onClose?: () => void;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export declare type DatePickerVariant = 'normal' | 'error';
|
|
201
|
+
|
|
202
|
+
export declare const Drawer: ({ animated, children, className, open, position, ref, size, ...rest }: DrawerProps) => ReactPortal | null;
|
|
203
|
+
|
|
204
|
+
export declare type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
205
|
+
|
|
206
|
+
export declare type DrawerProps = VacanoComponentProps<HTMLDivElement> & Omit<HTMLAttributes<HTMLDivElement>, 'className'> & {
|
|
207
|
+
open: boolean;
|
|
208
|
+
animated?: boolean;
|
|
209
|
+
children?: ReactNode;
|
|
210
|
+
position?: DrawerPosition;
|
|
211
|
+
size?: string;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export declare const Dropdown: ({ align, children, className, classnames, onClose, onOpen, open: controlledOpen, portalRenderNode, ref, trigger, ...rest }: DropdownProps) => JSX.Element;
|
|
215
|
+
|
|
216
|
+
export declare type DropdownAlign = 'left' | 'right';
|
|
217
|
+
|
|
218
|
+
export declare type DropdownClassNames = {
|
|
306
219
|
trigger?: string;
|
|
307
220
|
content?: string;
|
|
308
221
|
};
|
|
309
222
|
|
|
310
|
-
export declare type
|
|
223
|
+
export declare type DropdownPosition = 'top' | 'bottom';
|
|
311
224
|
|
|
312
|
-
export declare type DropdownProps =
|
|
313
|
-
trigger: ReactNode;
|
|
314
|
-
children: ReactNode;
|
|
315
|
-
placement?: DropdownPlacement;
|
|
225
|
+
export declare type DropdownProps = VacanoComponentProps<HTMLDivElement, DropdownClassNames> & {
|
|
316
226
|
align?: DropdownAlign;
|
|
317
|
-
|
|
227
|
+
children?: ReactNode;
|
|
228
|
+
onClose?: () => void;
|
|
229
|
+
onOpen?: () => void;
|
|
318
230
|
open?: boolean;
|
|
319
|
-
onOpenChange?: (open: boolean) => void;
|
|
320
231
|
portalRenderNode?: HTMLElement | null;
|
|
321
|
-
|
|
322
|
-
fullWidth?: boolean;
|
|
323
|
-
'data-test-id'?: string;
|
|
232
|
+
trigger: ReactElement;
|
|
324
233
|
};
|
|
325
234
|
|
|
326
|
-
declare
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
};
|
|
235
|
+
export declare const FieldLabel: ({ children, className, ref, required, variant, ...rest }: FieldLabelProps) => JSX.Element | null;
|
|
236
|
+
|
|
237
|
+
export declare type FieldLabelProps = VacanoComponentProps<HTMLSpanElement> & {
|
|
238
|
+
children?: string;
|
|
239
|
+
required?: boolean;
|
|
240
|
+
variant?: FieldLabelVariant;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export declare type FieldLabelVariant = 'normal' | 'error';
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Go-style date formatting
|
|
247
|
+
* Reference time: Mon Jan 2 15:04:05 MST 2006
|
|
248
|
+
*
|
|
249
|
+
* Tokens:
|
|
250
|
+
* - 2006: 4-digit year
|
|
251
|
+
* - 06: 2-digit year
|
|
252
|
+
* - January: full month name
|
|
253
|
+
* - Jan: short month name
|
|
254
|
+
* - 01: zero-padded month (01-12)
|
|
255
|
+
* - 1: month (1-12)
|
|
256
|
+
* - Monday: full weekday name
|
|
257
|
+
* - Mon: short weekday name
|
|
258
|
+
* - 02: zero-padded day (01-31)
|
|
259
|
+
* - 2: day (1-31)
|
|
260
|
+
* - _2: space-padded day
|
|
261
|
+
* - 15: 24-hour hour (00-23)
|
|
262
|
+
* - 03: 12-hour hour zero-padded (01-12)
|
|
263
|
+
* - 3: 12-hour hour (1-12)
|
|
264
|
+
* - 04: minute (00-59)
|
|
265
|
+
* - 05: second (00-59)
|
|
266
|
+
* - PM: AM/PM uppercase
|
|
267
|
+
* - pm: am/pm lowercase
|
|
268
|
+
*/
|
|
269
|
+
export declare const formatDateGo: (date: Date, format: string, locale?: string) => string;
|
|
333
270
|
|
|
334
271
|
export declare const GlobalStyle: () => JSX.Element;
|
|
335
272
|
|
|
336
|
-
export declare const
|
|
273
|
+
export declare const ImageCropper: ({ allowedTypes, applyLabel, buttonLabel, cancelLabel, className, classnames, compression, maxFileSize, onCrop, onError, outputSize, portalSize, previewSize, ref, type, value, ...rest }: ImageCropperProps) => JSX.Element;
|
|
337
274
|
|
|
338
|
-
export declare type
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
wrapper?: string;
|
|
342
|
-
input?: string;
|
|
343
|
-
icon?: string;
|
|
344
|
-
toggle?: string;
|
|
275
|
+
export declare type ImageCropperClassNames = {
|
|
276
|
+
button?: string;
|
|
277
|
+
preview?: string;
|
|
345
278
|
};
|
|
346
279
|
|
|
347
|
-
export declare type
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
280
|
+
export declare type ImageCropperError = {
|
|
281
|
+
code: string;
|
|
282
|
+
message: string;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
export declare type ImageCropperOutputType = 'jpeg' | 'png';
|
|
286
|
+
|
|
287
|
+
export declare type ImageCropperProps = VacanoComponentProps<HTMLDivElement, ImageCropperClassNames> & Omit<UseImageCropperOptions, 'onCrop'> & {
|
|
288
|
+
buttonLabel?: string;
|
|
289
|
+
onCrop?: (result: ImageCropperResult) => void;
|
|
290
|
+
previewSize?: number;
|
|
291
|
+
value?: string | null;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export declare type ImageCropperResult = {
|
|
295
|
+
base64: string;
|
|
296
|
+
blob: Blob;
|
|
297
|
+
state: ImageCropperState;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export declare type ImageCropperState = {
|
|
301
|
+
fileName: string;
|
|
302
|
+
sourceBase64: string;
|
|
303
|
+
sourceWidth: number;
|
|
304
|
+
sourceHeight: number;
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
export declare const Input: ({ className, classnames, disabled, fullWidth, label, ref, size, variant, ...rest }: InputProps) => JSX.Element;
|
|
308
|
+
|
|
309
|
+
export declare type InputClassNames = {
|
|
310
|
+
input?: string;
|
|
351
311
|
label?: string;
|
|
352
|
-
|
|
353
|
-
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export declare type InputProps = VacanoComponentProps<HTMLInputElement, InputClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size'> & {
|
|
354
315
|
fullWidth?: boolean;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
'data-test-id'?: string;
|
|
316
|
+
label?: string;
|
|
317
|
+
size?: VacanoComponentSize;
|
|
318
|
+
variant?: InputVariant;
|
|
359
319
|
};
|
|
360
320
|
|
|
361
|
-
export declare type
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
};
|
|
374
|
-
input: {
|
|
375
|
-
color: string;
|
|
376
|
-
placeholderColor: string;
|
|
377
|
-
};
|
|
378
|
-
icon: {
|
|
379
|
-
color: string;
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
declare type InputTheme = {
|
|
384
|
-
wrapper: {
|
|
385
|
-
backgroundColor: string;
|
|
386
|
-
borderColor: string;
|
|
387
|
-
focus: {
|
|
388
|
-
outlineColor: string;
|
|
389
|
-
};
|
|
390
|
-
disabled: {
|
|
391
|
-
backgroundColor: string;
|
|
392
|
-
borderColor: string;
|
|
393
|
-
};
|
|
394
|
-
};
|
|
395
|
-
label: {
|
|
396
|
-
color: string;
|
|
397
|
-
};
|
|
398
|
-
input: {
|
|
399
|
-
color: string;
|
|
400
|
-
placeholderColor: string;
|
|
401
|
-
disabled: {
|
|
402
|
-
color: string;
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
icon: {
|
|
406
|
-
color: string;
|
|
407
|
-
disabled: {
|
|
408
|
-
color: string;
|
|
409
|
-
};
|
|
410
|
-
};
|
|
411
|
-
toggle: {
|
|
412
|
-
color: string;
|
|
413
|
-
};
|
|
414
|
-
state: {
|
|
415
|
-
warning: InputStateTheme;
|
|
416
|
-
error: InputStateTheme;
|
|
417
|
-
};
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
export declare type InputType = InputHTMLAttributes<HTMLInputElement>['type'];
|
|
421
|
-
|
|
422
|
-
export declare const Loader: ({ "aria-label": ariaLabel, className, classnames, size, ...rest }: LoaderProps) => JSX.Element;
|
|
423
|
-
|
|
424
|
-
export declare type LoaderClassnames = {
|
|
425
|
-
container?: string;
|
|
321
|
+
export declare type InputVariant = 'normal' | 'error';
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Keyboard key values based on KeyboardEvent.key
|
|
325
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
|
|
326
|
+
*/
|
|
327
|
+
declare type KeyboardEventKey = 'Meta' | 'Control' | 'Alt' | 'Shift' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End' | 'PageUp' | 'PageDown' | ' ' | 'Enter' | 'Tab' | 'Backspace' | 'Delete' | 'Insert' | 'Escape' | '`' | '-' | '=' | '[' | ']' | '\\' | ';' | "'" | ',' | '.' | '/' | 'NumLock' | 'NumpadEnter' | 'NumpadAdd' | 'NumpadSubtract' | 'NumpadMultiply' | 'NumpadDivide' | 'NumpadDecimal' | 'Numpad0' | 'Numpad1' | 'Numpad2' | 'Numpad3' | 'Numpad4' | 'Numpad5' | 'Numpad6' | 'Numpad7' | 'Numpad8' | 'Numpad9' | 'CapsLock' | 'ScrollLock' | 'Pause' | 'PrintScreen' | 'ContextMenu';
|
|
328
|
+
|
|
329
|
+
export declare const KeysBindings: ({ className, classnames, keys, ref, variant, ...rest }: KeysBindingsProps) => JSX.Element | null;
|
|
330
|
+
|
|
331
|
+
export declare type KeysBindingsClassNames = {
|
|
332
|
+
item?: string;
|
|
426
333
|
};
|
|
427
334
|
|
|
428
|
-
export declare type
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
classnames?: LoaderClassnames;
|
|
432
|
-
size?: number;
|
|
335
|
+
export declare type KeysBindingsProps = VacanoComponentProps<HTMLDivElement, KeysBindingsClassNames> & {
|
|
336
|
+
keys?: KeyboardEventKey[];
|
|
337
|
+
variant?: KeysBindingsVariant;
|
|
433
338
|
};
|
|
434
339
|
|
|
435
|
-
export declare
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
340
|
+
export declare type KeysBindingsVariant = 'dark' | 'light';
|
|
341
|
+
|
|
342
|
+
export declare const KeySymbol: ({ className, ref, symbol, variant, ...rest }: KeySymbolProps) => JSX.Element | null;
|
|
343
|
+
|
|
344
|
+
export declare type KeySymbolProps = VacanoComponentProps<HTMLSpanElement> & {
|
|
345
|
+
symbol: string;
|
|
346
|
+
variant?: KeySymbolVariant;
|
|
441
347
|
};
|
|
442
348
|
|
|
443
|
-
export declare
|
|
349
|
+
export declare type KeySymbolVariant = 'dark' | 'light';
|
|
444
350
|
|
|
445
|
-
export declare
|
|
446
|
-
|
|
447
|
-
|
|
351
|
+
export declare const Modal: ({ animated, children, className, classnames, open, ref, width, ...rest }: ModalProps) => ReactPortal | null;
|
|
352
|
+
|
|
353
|
+
export declare type ModalClassNames = {
|
|
354
|
+
overlay?: string;
|
|
355
|
+
content?: string;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
export declare type ModalProps = VacanoComponentProps<HTMLDivElement, ModalClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className'> & {
|
|
359
|
+
open: boolean;
|
|
360
|
+
animated?: boolean;
|
|
361
|
+
children?: ReactNode;
|
|
362
|
+
width?: string;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
export declare const MultiSelect: ({ className, classnames, disabled, emptyMessage, label, maxVisible, modalTitle, onChange, options, placeholder, ref, searchPlaceholder, value, variant, ...rest }: MultiSelectProps) => JSX.Element;
|
|
366
|
+
|
|
367
|
+
export declare type MultiSelectClassNames = {
|
|
448
368
|
trigger?: string;
|
|
449
369
|
chips?: string;
|
|
450
370
|
chip?: string;
|
|
451
|
-
|
|
452
|
-
|
|
371
|
+
placeholder?: string;
|
|
372
|
+
modal?: string;
|
|
453
373
|
search?: string;
|
|
454
|
-
|
|
374
|
+
options?: string;
|
|
455
375
|
option?: string;
|
|
456
376
|
empty?: string;
|
|
457
377
|
};
|
|
458
378
|
|
|
459
379
|
export declare type MultiSelectOption = {
|
|
460
|
-
label: string;
|
|
461
380
|
value: string;
|
|
381
|
+
label: string;
|
|
382
|
+
disabled?: boolean;
|
|
462
383
|
};
|
|
463
384
|
|
|
464
|
-
export declare type
|
|
465
|
-
|
|
466
|
-
export declare type MultiSelectProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
467
|
-
options: MultiSelectOption[];
|
|
385
|
+
export declare type MultiSelectProps = VacanoComponentProps<HTMLDivElement, MultiSelectClassNames> & {
|
|
468
386
|
value: string[];
|
|
469
|
-
|
|
387
|
+
options: MultiSelectOption[];
|
|
388
|
+
onChange: (value: string[]) => void;
|
|
389
|
+
label?: string;
|
|
470
390
|
placeholder?: string;
|
|
391
|
+
variant?: MultiSelectVariant;
|
|
392
|
+
disabled?: boolean;
|
|
393
|
+
maxVisible?: number;
|
|
394
|
+
emptyMessage?: ReactNode;
|
|
471
395
|
searchPlaceholder?: string;
|
|
472
|
-
|
|
396
|
+
modalTitle?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export declare type MultiSelectVariant = 'normal' | 'error';
|
|
400
|
+
|
|
401
|
+
export declare const OtpCode: ({ className, classnames, disabled, label, length, onChange, ref, size, value, variant, ...rest }: OtpCodeProps) => JSX.Element;
|
|
402
|
+
|
|
403
|
+
export declare type OtpCodeClassNames = {
|
|
404
|
+
container?: string;
|
|
405
|
+
input?: string;
|
|
473
406
|
label?: string;
|
|
474
|
-
|
|
475
|
-
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export declare type OtpCodeProps = VacanoComponentProps<HTMLDivElement, OtpCodeClassNames> & {
|
|
476
410
|
disabled?: boolean;
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
classnames?: MultiSelectClassnames;
|
|
484
|
-
'data-test-id'?: string;
|
|
411
|
+
label?: string;
|
|
412
|
+
length?: number;
|
|
413
|
+
onChange?: (value: string) => void;
|
|
414
|
+
size?: VacanoComponentSize;
|
|
415
|
+
value?: string;
|
|
416
|
+
variant?: OtpCodeVariant;
|
|
485
417
|
};
|
|
486
418
|
|
|
487
|
-
export declare type
|
|
488
|
-
|
|
489
|
-
declare
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
};
|
|
526
|
-
};
|
|
527
|
-
label: {
|
|
528
|
-
color: string;
|
|
529
|
-
};
|
|
530
|
-
placeholder: {
|
|
531
|
-
color: string;
|
|
532
|
-
disabled: {
|
|
533
|
-
color: string;
|
|
534
|
-
};
|
|
535
|
-
};
|
|
536
|
-
chip: {
|
|
537
|
-
backgroundColor: string;
|
|
538
|
-
color: string;
|
|
539
|
-
remove: {
|
|
540
|
-
color: string;
|
|
541
|
-
hover: {
|
|
542
|
-
color: string;
|
|
543
|
-
};
|
|
544
|
-
};
|
|
545
|
-
disabled: {
|
|
546
|
-
backgroundColor: string;
|
|
547
|
-
color: string;
|
|
548
|
-
remove: {
|
|
549
|
-
color: string;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
};
|
|
553
|
-
icon: {
|
|
554
|
-
color: string;
|
|
555
|
-
disabled: {
|
|
556
|
-
color: string;
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
chevron: {
|
|
560
|
-
color: string;
|
|
561
|
-
disabled: {
|
|
562
|
-
color: string;
|
|
563
|
-
};
|
|
564
|
-
};
|
|
565
|
-
content: {
|
|
566
|
-
backgroundColor: string;
|
|
567
|
-
borderColor: string;
|
|
568
|
-
shadow: string;
|
|
569
|
-
};
|
|
570
|
-
option: {
|
|
571
|
-
color: string;
|
|
572
|
-
backgroundColor: string;
|
|
573
|
-
hover: {
|
|
574
|
-
backgroundColor: string;
|
|
575
|
-
};
|
|
576
|
-
selected: {
|
|
577
|
-
backgroundColor: string;
|
|
578
|
-
color: string;
|
|
579
|
-
};
|
|
580
|
-
check: {
|
|
581
|
-
color: string;
|
|
582
|
-
};
|
|
583
|
-
};
|
|
584
|
-
search: {
|
|
585
|
-
backgroundColor: string;
|
|
586
|
-
borderColor: string;
|
|
587
|
-
color: string;
|
|
588
|
-
placeholderColor: string;
|
|
589
|
-
};
|
|
590
|
-
empty: {
|
|
591
|
-
color: string;
|
|
592
|
-
};
|
|
593
|
-
state: {
|
|
594
|
-
warning: MultiSelectStateTheme;
|
|
595
|
-
error: MultiSelectStateTheme;
|
|
596
|
-
};
|
|
597
|
-
};
|
|
598
|
-
|
|
599
|
-
export declare const Radio: ({ checked, className, classnames, disabled, label, onChange, ref, state, ...rest }: RadioProps) => JSX.Element;
|
|
600
|
-
|
|
601
|
-
export declare const RadioCard: ({ checked, className, classnames, description, disabled, fullWidth, label, onChange, ref, state, ...rest }: RadioCardProps) => JSX.Element;
|
|
602
|
-
|
|
603
|
-
export declare type RadioCardClassnames = {
|
|
604
|
-
container?: string;
|
|
419
|
+
export declare type OtpCodeVariant = 'normal' | 'error';
|
|
420
|
+
|
|
421
|
+
export declare const Panel: ({ children, className, classnames, description, ref, title, variant, ...rest }: PanelProps) => JSX.Element;
|
|
422
|
+
|
|
423
|
+
export declare type PanelClassNames = {
|
|
424
|
+
title?: string;
|
|
425
|
+
description?: string;
|
|
426
|
+
content?: string;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
export declare type PanelProps = VacanoComponentProps<HTMLDivElement, PanelClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'title'> & {
|
|
430
|
+
children: ReactNode;
|
|
431
|
+
description?: string;
|
|
432
|
+
title?: string;
|
|
433
|
+
variant?: PanelVariant;
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
export declare type PanelVariant = 'light' | 'dark';
|
|
437
|
+
|
|
438
|
+
export declare const Progress: ({ value, size, className, classnames, ref, ...rest }: ProgressProps) => JSX.Element;
|
|
439
|
+
|
|
440
|
+
export declare type ProgressClassNames = {
|
|
441
|
+
track?: string;
|
|
442
|
+
bar?: string;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
export declare type ProgressProps = VacanoComponentProps<HTMLDivElement, ProgressClassNames> & {
|
|
446
|
+
/** Progress value from 0 to 100 */
|
|
447
|
+
value: number;
|
|
448
|
+
/** Size variant */
|
|
449
|
+
size?: VacanoComponentSize;
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
export declare const Radio: ({ checked, className, classnames, disabled, label, onChange, ref, variant, ...rest }: RadioProps) => JSX.Element;
|
|
453
|
+
|
|
454
|
+
export declare const RadioCard: ({ checked, className, classnames, description, disabled, fullWidth, label, onChange, ref, variant, ...rest }: RadioCardProps) => JSX.Element;
|
|
455
|
+
|
|
456
|
+
export declare type RadioCardClassNames = {
|
|
605
457
|
radio?: string;
|
|
606
458
|
content?: string;
|
|
607
459
|
label?: string;
|
|
608
460
|
description?: string;
|
|
609
461
|
};
|
|
610
462
|
|
|
611
|
-
export declare type RadioCardProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> & {
|
|
463
|
+
export declare type RadioCardProps = VacanoComponentProps<HTMLInputElement, RadioCardClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'className'> & {
|
|
612
464
|
checked: boolean;
|
|
613
465
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
614
466
|
label: string;
|
|
615
467
|
description?: string;
|
|
616
468
|
fullWidth?: boolean;
|
|
617
|
-
|
|
618
|
-
className?: string;
|
|
619
|
-
classnames?: RadioCardClassnames;
|
|
620
|
-
ref?: Ref<HTMLInputElement>;
|
|
621
|
-
'data-test-id'?: string;
|
|
469
|
+
variant?: RadioCardVariant;
|
|
622
470
|
};
|
|
623
471
|
|
|
624
|
-
export declare type
|
|
625
|
-
|
|
626
|
-
declare type
|
|
627
|
-
container: {
|
|
628
|
-
borderColor: string;
|
|
629
|
-
checked: {
|
|
630
|
-
borderColor: string;
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
label: {
|
|
634
|
-
color: string;
|
|
635
|
-
};
|
|
636
|
-
description: {
|
|
637
|
-
color: string;
|
|
638
|
-
};
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
declare type RadioCardTheme = {
|
|
642
|
-
container: {
|
|
643
|
-
backgroundColor: string;
|
|
644
|
-
borderColor: string;
|
|
645
|
-
hover: {
|
|
646
|
-
borderColor: string;
|
|
647
|
-
};
|
|
648
|
-
checked: {
|
|
649
|
-
backgroundColor: string;
|
|
650
|
-
borderColor: string;
|
|
651
|
-
};
|
|
652
|
-
focus: {
|
|
653
|
-
outlineColor: string;
|
|
654
|
-
};
|
|
655
|
-
disabled: {
|
|
656
|
-
backgroundColor: string;
|
|
657
|
-
borderColor: string;
|
|
658
|
-
};
|
|
659
|
-
};
|
|
660
|
-
label: {
|
|
661
|
-
color: string;
|
|
662
|
-
disabled: {
|
|
663
|
-
color: string;
|
|
664
|
-
};
|
|
665
|
-
};
|
|
666
|
-
description: {
|
|
667
|
-
color: string;
|
|
668
|
-
disabled: {
|
|
669
|
-
color: string;
|
|
670
|
-
};
|
|
671
|
-
};
|
|
672
|
-
state: {
|
|
673
|
-
warning: RadioCardStateTheme;
|
|
674
|
-
error: RadioCardStateTheme;
|
|
675
|
-
};
|
|
676
|
-
};
|
|
677
|
-
|
|
678
|
-
export declare type RadioClassnames = {
|
|
679
|
-
container?: string;
|
|
472
|
+
export declare type RadioCardVariant = 'normal' | 'error';
|
|
473
|
+
|
|
474
|
+
export declare type RadioClassNames = {
|
|
680
475
|
input?: string;
|
|
681
|
-
|
|
476
|
+
box?: string;
|
|
682
477
|
dot?: string;
|
|
683
478
|
label?: string;
|
|
684
479
|
};
|
|
685
480
|
|
|
686
|
-
export declare const RadioGroup: ({ className, classnames, disabled, label, name, onChange, options, value, ...rest }: RadioGroupProps) => JSX.Element;
|
|
481
|
+
export declare const RadioGroup: ({ className, classnames, disabled, label, name, onChange, options, ref, value, ...rest }: RadioGroupProps) => JSX.Element;
|
|
687
482
|
|
|
688
|
-
export declare type
|
|
689
|
-
container?: string;
|
|
483
|
+
export declare type RadioGroupClassNames = {
|
|
690
484
|
label?: string;
|
|
691
485
|
options?: string;
|
|
692
486
|
radio?: string;
|
|
@@ -697,488 +491,251 @@ export declare type RadioGroupOption = {
|
|
|
697
491
|
value: string;
|
|
698
492
|
};
|
|
699
493
|
|
|
700
|
-
export declare type RadioGroupProps = {
|
|
701
|
-
value: string;
|
|
494
|
+
export declare type RadioGroupProps = VacanoComponentProps<HTMLDivElement, RadioGroupClassNames> & {
|
|
702
495
|
options: RadioGroupOption[];
|
|
496
|
+
value: string | null;
|
|
703
497
|
onChange: (value: string) => void;
|
|
704
498
|
label?: string;
|
|
705
499
|
name?: string;
|
|
706
500
|
disabled?: boolean;
|
|
707
|
-
className?: string;
|
|
708
|
-
classnames?: RadioGroupClassnames;
|
|
709
|
-
'data-test-id'?: string;
|
|
710
501
|
};
|
|
711
502
|
|
|
712
|
-
declare type
|
|
713
|
-
label: {
|
|
714
|
-
color: string;
|
|
715
|
-
};
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
export declare type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> & {
|
|
503
|
+
export declare type RadioProps = VacanoComponentProps<HTMLInputElement, RadioClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'className'> & {
|
|
719
504
|
checked: boolean;
|
|
720
|
-
classnames?: RadioClassnames;
|
|
721
|
-
'data-test-id'?: string;
|
|
722
|
-
label?: string;
|
|
723
505
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
export declare type
|
|
729
|
-
|
|
730
|
-
declare
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
checked: {
|
|
734
|
-
borderColor: string;
|
|
735
|
-
};
|
|
736
|
-
focus: {
|
|
737
|
-
shadowColor: string;
|
|
738
|
-
};
|
|
739
|
-
};
|
|
740
|
-
dot: {
|
|
741
|
-
color: string;
|
|
742
|
-
};
|
|
743
|
-
label: {
|
|
744
|
-
color: string;
|
|
745
|
-
};
|
|
746
|
-
};
|
|
747
|
-
|
|
748
|
-
declare type RadioTheme = {
|
|
749
|
-
circle: {
|
|
750
|
-
borderColor: string;
|
|
751
|
-
checked: {
|
|
752
|
-
borderColor: string;
|
|
753
|
-
};
|
|
754
|
-
focus: {
|
|
755
|
-
shadowColor: string;
|
|
756
|
-
};
|
|
757
|
-
};
|
|
758
|
-
dot: {
|
|
759
|
-
color: string;
|
|
760
|
-
};
|
|
761
|
-
label: {
|
|
762
|
-
color: string;
|
|
763
|
-
};
|
|
764
|
-
state: {
|
|
765
|
-
warning: RadioStateTheme;
|
|
766
|
-
error: RadioStateTheme;
|
|
767
|
-
};
|
|
768
|
-
};
|
|
769
|
-
|
|
770
|
-
export declare const Select: ({ options, value, onChange, placeholder, searchPlaceholder, emptyMessage, label, icon, state, disabled, fullWidth, placement, maxHeight, virtualized, searchable, portalRenderNode, className, classnames, ...rest }: SelectProps) => JSX.Element;
|
|
771
|
-
|
|
772
|
-
export declare type SelectClassnames = {
|
|
773
|
-
container?: string;
|
|
506
|
+
label?: string;
|
|
507
|
+
variant?: RadioVariant;
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
export declare type RadioVariant = 'normal' | 'error';
|
|
511
|
+
|
|
512
|
+
export declare const Select: ({ className, classnames, disabled, fullWidth, label, onChange, options, placeholder, portalRenderNode, ref, size, value, variant, ...rest }: SelectProps) => JSX.Element;
|
|
513
|
+
|
|
514
|
+
export declare type SelectClassNames = {
|
|
774
515
|
label?: string;
|
|
775
516
|
trigger?: string;
|
|
776
|
-
|
|
777
|
-
search?: string;
|
|
778
|
-
list?: string;
|
|
517
|
+
dropdown?: string;
|
|
779
518
|
option?: string;
|
|
780
|
-
empty?: string;
|
|
781
519
|
};
|
|
782
520
|
|
|
783
521
|
export declare type SelectOption = {
|
|
784
|
-
label: string;
|
|
785
522
|
value: string;
|
|
523
|
+
label: string;
|
|
524
|
+
disabled?: boolean;
|
|
786
525
|
};
|
|
787
526
|
|
|
788
|
-
export declare type
|
|
789
|
-
|
|
790
|
-
export declare type SelectProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
527
|
+
export declare type SelectProps = VacanoComponentProps<HTMLDivElement, SelectClassNames> & {
|
|
528
|
+
value: string;
|
|
791
529
|
options: SelectOption[];
|
|
792
|
-
value?: string;
|
|
793
530
|
onChange?: (value: string) => void;
|
|
794
|
-
placeholder?: string;
|
|
795
|
-
searchPlaceholder?: string;
|
|
796
|
-
emptyMessage?: string;
|
|
797
531
|
label?: string;
|
|
798
|
-
|
|
799
|
-
|
|
532
|
+
placeholder?: string;
|
|
533
|
+
variant?: SelectVariant;
|
|
534
|
+
size?: VacanoComponentSize;
|
|
800
535
|
disabled?: boolean;
|
|
801
536
|
fullWidth?: boolean;
|
|
802
|
-
placement?: SelectPlacement;
|
|
803
|
-
maxHeight?: number;
|
|
804
|
-
virtualized?: boolean;
|
|
805
|
-
searchable?: boolean;
|
|
806
537
|
portalRenderNode?: HTMLElement | null;
|
|
807
|
-
classnames?: SelectClassnames;
|
|
808
|
-
'data-test-id'?: string;
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
export declare type SelectState = 'warning' | 'error';
|
|
812
|
-
|
|
813
|
-
declare type SelectStateTheme = {
|
|
814
|
-
trigger: {
|
|
815
|
-
backgroundColor: string;
|
|
816
|
-
borderColor: string;
|
|
817
|
-
focus: {
|
|
818
|
-
outlineColor: string;
|
|
819
|
-
};
|
|
820
|
-
};
|
|
821
|
-
label: {
|
|
822
|
-
color: string;
|
|
823
|
-
};
|
|
824
|
-
value: {
|
|
825
|
-
color: string;
|
|
826
|
-
placeholderColor: string;
|
|
827
|
-
};
|
|
828
|
-
icon: {
|
|
829
|
-
color: string;
|
|
830
|
-
};
|
|
831
|
-
chevron: {
|
|
832
|
-
color: string;
|
|
833
|
-
};
|
|
834
|
-
};
|
|
835
|
-
|
|
836
|
-
declare type SelectTheme = {
|
|
837
|
-
trigger: {
|
|
838
|
-
backgroundColor: string;
|
|
839
|
-
borderColor: string;
|
|
840
|
-
focus: {
|
|
841
|
-
outlineColor: string;
|
|
842
|
-
};
|
|
843
|
-
disabled: {
|
|
844
|
-
backgroundColor: string;
|
|
845
|
-
borderColor: string;
|
|
846
|
-
};
|
|
847
|
-
};
|
|
848
|
-
label: {
|
|
849
|
-
color: string;
|
|
850
|
-
};
|
|
851
|
-
value: {
|
|
852
|
-
color: string;
|
|
853
|
-
placeholderColor: string;
|
|
854
|
-
disabled: {
|
|
855
|
-
color: string;
|
|
856
|
-
};
|
|
857
|
-
};
|
|
858
|
-
icon: {
|
|
859
|
-
color: string;
|
|
860
|
-
disabled: {
|
|
861
|
-
color: string;
|
|
862
|
-
};
|
|
863
|
-
};
|
|
864
|
-
chevron: {
|
|
865
|
-
color: string;
|
|
866
|
-
disabled: {
|
|
867
|
-
color: string;
|
|
868
|
-
};
|
|
869
|
-
};
|
|
870
|
-
content: {
|
|
871
|
-
backgroundColor: string;
|
|
872
|
-
borderColor: string;
|
|
873
|
-
shadow: string;
|
|
874
|
-
};
|
|
875
|
-
option: {
|
|
876
|
-
color: string;
|
|
877
|
-
backgroundColor: string;
|
|
878
|
-
hover: {
|
|
879
|
-
backgroundColor: string;
|
|
880
|
-
};
|
|
881
|
-
selected: {
|
|
882
|
-
backgroundColor: string;
|
|
883
|
-
color: string;
|
|
884
|
-
};
|
|
885
|
-
check: {
|
|
886
|
-
color: string;
|
|
887
|
-
};
|
|
888
|
-
};
|
|
889
|
-
search: {
|
|
890
|
-
backgroundColor: string;
|
|
891
|
-
borderColor: string;
|
|
892
|
-
color: string;
|
|
893
|
-
placeholderColor: string;
|
|
894
|
-
};
|
|
895
|
-
empty: {
|
|
896
|
-
color: string;
|
|
897
|
-
};
|
|
898
|
-
state: {
|
|
899
|
-
warning: SelectStateTheme;
|
|
900
|
-
error: SelectStateTheme;
|
|
901
|
-
};
|
|
902
|
-
};
|
|
903
|
-
|
|
904
|
-
export declare const shadows: {
|
|
905
|
-
readonly none: "none";
|
|
906
|
-
readonly sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
907
|
-
readonly md: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)";
|
|
908
|
-
readonly lg: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
|
|
909
|
-
readonly xl: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
910
|
-
readonly xl2: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)";
|
|
911
|
-
readonly xl3: "0 25px 50px -12px rgb(0 0 0 / 0.25)";
|
|
912
|
-
readonly inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)";
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
export declare const Spinner: ({ "aria-label": ariaLabel, className, classnames, size, ...rest }: SpinnerProps) => JSX.Element;
|
|
916
|
-
|
|
917
|
-
export declare type SpinnerClassnames = {
|
|
918
|
-
container?: string;
|
|
919
|
-
};
|
|
920
|
-
|
|
921
|
-
export declare type SpinnerProps = HTMLAttributes<HTMLSpanElement> & {
|
|
922
|
-
'aria-label'?: string;
|
|
923
|
-
classnames?: SpinnerClassnames;
|
|
924
|
-
'data-test-id'?: string;
|
|
925
|
-
size?: number;
|
|
926
538
|
};
|
|
927
539
|
|
|
928
|
-
export declare type
|
|
929
|
-
$variant: ButtonVariant;
|
|
930
|
-
$loading?: boolean;
|
|
931
|
-
};
|
|
540
|
+
export declare type SelectVariant = 'normal' | 'error';
|
|
932
541
|
|
|
933
|
-
export declare
|
|
934
|
-
$variant: ButtonVariant;
|
|
935
|
-
$fullWidth?: boolean;
|
|
936
|
-
$loading?: boolean;
|
|
937
|
-
$iconOnly?: boolean;
|
|
938
|
-
};
|
|
542
|
+
export declare const Spinner: ({ "aria-label": ariaLabel, className, ref, size, ...rest }: SpinnerProps) => JSX.Element;
|
|
939
543
|
|
|
940
|
-
export declare type
|
|
941
|
-
$variant: ButtonVariant;
|
|
942
|
-
$loading?: boolean;
|
|
943
|
-
};
|
|
544
|
+
export declare type SpinnerClassNames = Record<string, never>;
|
|
944
545
|
|
|
945
|
-
export declare type
|
|
946
|
-
|
|
546
|
+
export declare type SpinnerProps = VacanoComponentProps<HTMLDivElement, SpinnerClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'children'> & {
|
|
547
|
+
size?: SpinnerSize;
|
|
548
|
+
'aria-label'?: string;
|
|
947
549
|
};
|
|
948
550
|
|
|
949
|
-
export declare type
|
|
950
|
-
$checked?: boolean;
|
|
951
|
-
$disabled?: boolean;
|
|
952
|
-
$fullWidth?: boolean;
|
|
953
|
-
$state?: CheckboxCardState;
|
|
954
|
-
};
|
|
551
|
+
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
955
552
|
|
|
956
|
-
export declare
|
|
957
|
-
$state?: CheckboxCardState;
|
|
958
|
-
};
|
|
553
|
+
export declare const StatusCard: ({ border, className, classnames, icon, label, ref, shadow, trend, trendVariant, value, ...rest }: StatusCardProps) => JSX.Element;
|
|
959
554
|
|
|
960
|
-
export declare type
|
|
961
|
-
|
|
555
|
+
export declare type StatusCardClassNames = {
|
|
556
|
+
label?: string;
|
|
557
|
+
value?: string;
|
|
558
|
+
trend?: string;
|
|
962
559
|
};
|
|
963
560
|
|
|
964
|
-
export declare type
|
|
965
|
-
|
|
966
|
-
|
|
561
|
+
export declare type StatusCardProps = VacanoComponentProps<HTMLDivElement, StatusCardClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className'> & {
|
|
562
|
+
border?: boolean;
|
|
563
|
+
icon?: ReactNode;
|
|
564
|
+
label: string;
|
|
565
|
+
shadow?: boolean;
|
|
566
|
+
trend?: string;
|
|
567
|
+
trendVariant?: StatusCardTrend;
|
|
568
|
+
value: string;
|
|
967
569
|
};
|
|
968
570
|
|
|
969
|
-
export declare type
|
|
970
|
-
$fullWidth?: boolean;
|
|
971
|
-
};
|
|
571
|
+
export declare type StatusCardTrend = 'positive' | 'negative' | 'neutral';
|
|
972
572
|
|
|
973
|
-
export declare type
|
|
974
|
-
|
|
573
|
+
export declare type StepItem = {
|
|
574
|
+
value: string;
|
|
575
|
+
label: string;
|
|
975
576
|
};
|
|
976
577
|
|
|
977
|
-
export declare
|
|
978
|
-
$fullWidth?: boolean;
|
|
979
|
-
};
|
|
578
|
+
export declare const Stepper: ({ className, classnames, onChange, orientation, ref, steps, value, ...rest }: StepperProps) => JSX.Element;
|
|
980
579
|
|
|
981
|
-
export declare type
|
|
982
|
-
|
|
580
|
+
export declare type StepperClassNames = {
|
|
581
|
+
step?: string;
|
|
582
|
+
circle?: string;
|
|
583
|
+
label?: string;
|
|
584
|
+
line?: string;
|
|
983
585
|
};
|
|
984
586
|
|
|
985
|
-
export declare type
|
|
986
|
-
$state?: InputState;
|
|
987
|
-
};
|
|
587
|
+
export declare type StepperOrientation = 'horizontal' | 'vertical';
|
|
988
588
|
|
|
989
|
-
export declare type
|
|
990
|
-
|
|
991
|
-
|
|
589
|
+
export declare type StepperProps = VacanoComponentProps<HTMLDivElement, StepperClassNames> & {
|
|
590
|
+
value: string;
|
|
591
|
+
steps: StepItem[];
|
|
592
|
+
onChange?: (value: string) => void;
|
|
593
|
+
orientation?: StepperOrientation;
|
|
992
594
|
};
|
|
993
595
|
|
|
994
|
-
export declare type
|
|
995
|
-
|
|
596
|
+
export declare type TabItem = {
|
|
597
|
+
value: string;
|
|
598
|
+
label: string;
|
|
599
|
+
disabled?: boolean;
|
|
996
600
|
};
|
|
997
601
|
|
|
998
|
-
export declare
|
|
999
|
-
$state?: InputState;
|
|
1000
|
-
$disabled?: boolean;
|
|
1001
|
-
};
|
|
602
|
+
export declare const Tabs: ({ className, classnames, onChange, ref, tabs, value, ...rest }: TabsProps) => JSX.Element;
|
|
1002
603
|
|
|
1003
|
-
export declare type
|
|
1004
|
-
|
|
1005
|
-
$disabled?: boolean;
|
|
604
|
+
export declare type TabsClassNames = {
|
|
605
|
+
tab?: string;
|
|
1006
606
|
};
|
|
1007
607
|
|
|
1008
|
-
export declare type
|
|
1009
|
-
|
|
608
|
+
export declare type TabsProps = VacanoComponentProps<HTMLDivElement, TabsClassNames> & {
|
|
609
|
+
value: string;
|
|
610
|
+
tabs: TabItem[];
|
|
611
|
+
onChange: (value: string) => void;
|
|
1010
612
|
};
|
|
1011
613
|
|
|
1012
|
-
export declare
|
|
1013
|
-
$state?: MultiSelectState;
|
|
1014
|
-
$disabled?: boolean;
|
|
1015
|
-
$isOpen?: boolean;
|
|
1016
|
-
};
|
|
614
|
+
export declare const Tags: ({ className, classnames, createKey, disabled, emptyMessage, freeSolo, label, onChange, options, placeholder, portalRenderNode, ref, value, variant, ...rest }: TagsProps) => JSX.Element;
|
|
1017
615
|
|
|
1018
|
-
export declare type
|
|
1019
|
-
|
|
1020
|
-
|
|
616
|
+
export declare type TagsClassNames = {
|
|
617
|
+
trigger?: string;
|
|
618
|
+
chip?: string;
|
|
619
|
+
input?: string;
|
|
620
|
+
dropdown?: string;
|
|
621
|
+
option?: string;
|
|
622
|
+
empty?: string;
|
|
1021
623
|
};
|
|
1022
624
|
|
|
1023
|
-
export declare type
|
|
1024
|
-
$state?: MultiSelectState;
|
|
1025
|
-
$disabled?: boolean;
|
|
1026
|
-
};
|
|
625
|
+
export declare type TagsCreateKey = 'Tab' | 'Enter';
|
|
1027
626
|
|
|
1028
|
-
export declare type
|
|
1029
|
-
|
|
627
|
+
export declare type TagsOption = {
|
|
628
|
+
value: string;
|
|
629
|
+
label: string;
|
|
1030
630
|
};
|
|
1031
631
|
|
|
1032
|
-
export declare type
|
|
1033
|
-
|
|
1034
|
-
|
|
632
|
+
export declare type TagsProps = VacanoComponentProps<HTMLDivElement, TagsClassNames> & {
|
|
633
|
+
value: string[];
|
|
634
|
+
onChange: (value: string[]) => void;
|
|
635
|
+
options?: TagsOption[];
|
|
636
|
+
label?: string;
|
|
637
|
+
placeholder?: string;
|
|
638
|
+
variant?: TagsVariant;
|
|
639
|
+
disabled?: boolean;
|
|
640
|
+
freeSolo?: boolean;
|
|
641
|
+
createKey?: TagsCreateKey;
|
|
642
|
+
emptyMessage?: ReactNode;
|
|
643
|
+
portalRenderNode?: HTMLElement | null;
|
|
1035
644
|
};
|
|
1036
645
|
|
|
1037
|
-
export declare type
|
|
1038
|
-
$state?: MultiSelectState;
|
|
1039
|
-
$disabled?: boolean;
|
|
1040
|
-
};
|
|
646
|
+
export declare type TagsVariant = 'normal' | 'error';
|
|
1041
647
|
|
|
1042
|
-
export declare type
|
|
1043
|
-
|
|
648
|
+
export declare type Toast = {
|
|
649
|
+
id: string;
|
|
650
|
+
message: string;
|
|
651
|
+
variant: ToastVariant;
|
|
652
|
+
duration?: number;
|
|
1044
653
|
};
|
|
1045
654
|
|
|
1046
|
-
export declare type
|
|
1047
|
-
|
|
655
|
+
export declare type ToastAction = {
|
|
656
|
+
type: 'ADD_TOAST';
|
|
657
|
+
payload: Toast;
|
|
658
|
+
} | {
|
|
659
|
+
type: 'REMOVE_TOAST';
|
|
660
|
+
payload: string;
|
|
661
|
+
} | {
|
|
662
|
+
type: 'SHOW_NEXT_FROM_QUEUE';
|
|
1048
663
|
};
|
|
1049
664
|
|
|
1050
|
-
export declare type
|
|
1051
|
-
|
|
665
|
+
export declare type ToastContainerProps = {
|
|
666
|
+
toasts: Toast[];
|
|
667
|
+
queueCount: number;
|
|
668
|
+
removeToast: (id: string) => void;
|
|
1052
669
|
};
|
|
1053
670
|
|
|
1054
|
-
export declare type
|
|
1055
|
-
|
|
671
|
+
export declare type ToastContextValue = {
|
|
672
|
+
addToast: (message: string, variant?: ToastVariant, duration?: number) => void;
|
|
673
|
+
removeToast: (id: string) => void;
|
|
1056
674
|
};
|
|
1057
675
|
|
|
1058
|
-
export declare type
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
$isOpen?: boolean;
|
|
1062
|
-
$hasValue?: boolean;
|
|
676
|
+
export declare type ToastItemProps = {
|
|
677
|
+
toast: Toast;
|
|
678
|
+
onRemove: (id: string) => void;
|
|
1063
679
|
};
|
|
1064
680
|
|
|
1065
|
-
export declare
|
|
1066
|
-
$checked?: boolean;
|
|
1067
|
-
$disabled?: boolean;
|
|
1068
|
-
$fullWidth?: boolean;
|
|
1069
|
-
$state?: RadioCardState;
|
|
1070
|
-
};
|
|
681
|
+
export declare const ToastProvider: ({ children }: PropsWithChildren) => JSX.Element;
|
|
1071
682
|
|
|
1072
|
-
export declare type
|
|
1073
|
-
|
|
683
|
+
export declare type ToastState = {
|
|
684
|
+
toasts: Toast[];
|
|
685
|
+
queue: Toast[];
|
|
1074
686
|
};
|
|
1075
687
|
|
|
1076
|
-
export declare type
|
|
1077
|
-
$state?: RadioCardState;
|
|
1078
|
-
};
|
|
688
|
+
export declare type ToastVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
1079
689
|
|
|
1080
|
-
export declare
|
|
1081
|
-
$state?: SelectState;
|
|
1082
|
-
$disabled?: boolean;
|
|
1083
|
-
$isOpen?: boolean;
|
|
1084
|
-
};
|
|
690
|
+
export declare const Tooltip: ({ children, className, classnames, content, delay, placement, portalRenderNode, ref, variant, ...rest }: TooltipProps) => JSX.Element;
|
|
1085
691
|
|
|
1086
|
-
export declare type
|
|
1087
|
-
|
|
692
|
+
export declare type TooltipClassNames = {
|
|
693
|
+
content?: string;
|
|
1088
694
|
};
|
|
1089
695
|
|
|
1090
|
-
export declare type
|
|
1091
|
-
$isOpen: boolean;
|
|
1092
|
-
$maxHeight: number;
|
|
1093
|
-
};
|
|
696
|
+
export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
1094
697
|
|
|
1095
|
-
export declare type
|
|
1096
|
-
|
|
1097
|
-
|
|
698
|
+
export declare type TooltipProps = VacanoComponentProps<HTMLDivElement, TooltipClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'content'> & {
|
|
699
|
+
children: ReactNode;
|
|
700
|
+
content: ReactNode;
|
|
701
|
+
delay?: number;
|
|
702
|
+
placement?: TooltipPlacement;
|
|
703
|
+
variant?: TooltipVariant;
|
|
704
|
+
portalRenderNode?: HTMLElement | null;
|
|
1098
705
|
};
|
|
1099
706
|
|
|
1100
|
-
export declare type
|
|
1101
|
-
$state?: SelectState;
|
|
1102
|
-
};
|
|
707
|
+
export declare type TooltipVariant = 'dark' | 'light' | 'success' | 'warning' | 'danger';
|
|
1103
708
|
|
|
1104
|
-
export declare
|
|
1105
|
-
$isSelected?: boolean;
|
|
1106
|
-
};
|
|
709
|
+
export declare const useImageCropper: (options?: UseImageCropperOptions) => UseImageCropperReturn;
|
|
1107
710
|
|
|
1108
|
-
export declare type
|
|
1109
|
-
|
|
711
|
+
export declare type UseImageCropperOptions = {
|
|
712
|
+
allowedTypes?: string[];
|
|
713
|
+
applyLabel?: string;
|
|
714
|
+
cancelLabel?: string;
|
|
715
|
+
compression?: number;
|
|
716
|
+
maxFileSize?: number;
|
|
717
|
+
onCrop?: (result: ImageCropperResult) => void;
|
|
718
|
+
onError?: (error: ImageCropperError) => void;
|
|
719
|
+
outputSize?: number;
|
|
720
|
+
portalSize?: number;
|
|
721
|
+
type?: ImageCropperOutputType;
|
|
1110
722
|
};
|
|
1111
723
|
|
|
1112
|
-
export declare type
|
|
1113
|
-
|
|
1114
|
-
$disabled?: boolean;
|
|
1115
|
-
$isOpen?: boolean;
|
|
724
|
+
export declare type UseImageCropperReturn = {
|
|
725
|
+
open: () => void;
|
|
1116
726
|
};
|
|
1117
727
|
|
|
1118
|
-
export declare
|
|
1119
|
-
$isPlaceholder?: boolean;
|
|
1120
|
-
$state?: SelectState;
|
|
1121
|
-
$disabled?: boolean;
|
|
1122
|
-
};
|
|
728
|
+
export declare const useToast: () => ToastContextValue;
|
|
1123
729
|
|
|
1124
|
-
|
|
1125
|
-
$size: number;
|
|
1126
|
-
};
|
|
730
|
+
declare type VacanoComponentClassNames<T> = T;
|
|
1127
731
|
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
success: string;
|
|
1134
|
-
warning: string;
|
|
1135
|
-
error: string;
|
|
1136
|
-
};
|
|
1137
|
-
backgroundColor: {
|
|
1138
|
-
default: string;
|
|
1139
|
-
neutral: string;
|
|
1140
|
-
success: string;
|
|
1141
|
-
warning: string;
|
|
1142
|
-
error: string;
|
|
1143
|
-
};
|
|
1144
|
-
};
|
|
1145
|
-
button: {
|
|
1146
|
-
primary: ButtonVariantTheme;
|
|
1147
|
-
secondary: ButtonVariantTheme;
|
|
1148
|
-
ghost: ButtonVariantTheme;
|
|
1149
|
-
danger: ButtonVariantTheme;
|
|
1150
|
-
};
|
|
1151
|
-
checkbox: CheckboxTheme;
|
|
1152
|
-
checkboxCard: CheckboxCardTheme;
|
|
1153
|
-
checkboxGroup: CheckboxGroupTheme;
|
|
1154
|
-
input: InputTheme;
|
|
1155
|
-
radio: RadioTheme;
|
|
1156
|
-
radioCard: RadioCardTheme;
|
|
1157
|
-
radioGroup: RadioGroupTheme;
|
|
1158
|
-
dropdown: DropdownTheme;
|
|
1159
|
-
select: SelectTheme;
|
|
1160
|
-
multiSelect: MultiSelectTheme;
|
|
732
|
+
declare type VacanoComponentProps<E extends HTMLElement | null, T extends Record<string, string> = Record<string, never>> = {
|
|
733
|
+
'data-test-id'?: string;
|
|
734
|
+
className?: string;
|
|
735
|
+
classnames?: VacanoComponentClassNames<T>;
|
|
736
|
+
ref?: Ref<E>;
|
|
1161
737
|
};
|
|
1162
738
|
|
|
1163
|
-
|
|
1164
|
-
theme: Theme;
|
|
1165
|
-
mode: ThemeMode;
|
|
1166
|
-
setMode: (mode: ThemeMode) => void;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
export declare const themeDark: Theme;
|
|
1170
|
-
|
|
1171
|
-
export declare const themeLight: Theme;
|
|
1172
|
-
|
|
1173
|
-
export declare type ThemeMode = 'light' | 'dark';
|
|
1174
|
-
|
|
1175
|
-
export declare function ThemeProvider({ children, defaultMode }: ThemeProviderProps): JSX.Element;
|
|
1176
|
-
|
|
1177
|
-
export declare interface ThemeProviderProps {
|
|
1178
|
-
children: ReactNode;
|
|
1179
|
-
defaultMode?: ThemeMode;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
export declare const useTheme: () => ThemeContextValue;
|
|
739
|
+
declare type VacanoComponentSize = 'compact' | 'default';
|
|
1183
740
|
|
|
1184
741
|
export { }
|