@vacano/ui 1.0.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1716 -691
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +495 -958
- package/dist/index.js +4841 -6978
- 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,383 @@ 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
93
|
};
|
|
182
94
|
|
|
183
|
-
declare type
|
|
184
|
-
label: {
|
|
185
|
-
color: string;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
100
|
+
variant?: CheckboxVariant;
|
|
101
|
+
};
|
|
102
|
+
|
|
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;
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
export declare type LoaderProps = HTMLAttributes<HTMLSpanElement> & {
|
|
429
|
-
'aria-label'?: string;
|
|
430
|
-
'data-test-id'?: string;
|
|
431
|
-
classnames?: LoaderClassnames;
|
|
432
|
-
size?: number;
|
|
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;
|
|
433
333
|
};
|
|
434
334
|
|
|
435
|
-
export declare
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
readonly lg: "@media (min-width: 1024px)";
|
|
439
|
-
readonly xl: "@media (min-width: 1280px)";
|
|
440
|
-
readonly xl2: "@media (min-width: 1536px)";
|
|
335
|
+
export declare type KeysBindingsProps = VacanoComponentProps<HTMLDivElement, KeysBindingsClassNames> & {
|
|
336
|
+
keys?: KeyboardEventKey[];
|
|
337
|
+
variant?: KeysBindingsVariant;
|
|
441
338
|
};
|
|
442
339
|
|
|
443
|
-
export declare
|
|
340
|
+
export declare type KeysBindingsVariant = 'dark' | 'light';
|
|
444
341
|
|
|
445
|
-
export declare
|
|
446
|
-
|
|
447
|
-
|
|
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;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
export declare type KeySymbolVariant = 'dark' | 'light';
|
|
350
|
+
|
|
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
|
-
|
|
470
|
-
|
|
471
|
-
searchPlaceholder?: string;
|
|
472
|
-
emptyMessage?: string;
|
|
387
|
+
options: MultiSelectOption[];
|
|
388
|
+
onChange: (value: string[]) => void;
|
|
473
389
|
label?: string;
|
|
474
|
-
|
|
475
|
-
|
|
390
|
+
placeholder?: string;
|
|
391
|
+
variant?: MultiSelectVariant;
|
|
476
392
|
disabled?: boolean;
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
393
|
+
maxVisible?: number;
|
|
394
|
+
emptyMessage?: ReactNode;
|
|
395
|
+
searchPlaceholder?: string;
|
|
396
|
+
modalTitle?: string;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export declare type MultiSelectVariant = 'normal' | 'error';
|
|
400
|
+
|
|
401
|
+
export declare const Panel: ({ children, className, classnames, description, ref, title, variant, ...rest }: PanelProps) => JSX.Element;
|
|
402
|
+
|
|
403
|
+
export declare type PanelClassNames = {
|
|
404
|
+
title?: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
content?: string;
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export declare type PanelProps = VacanoComponentProps<HTMLDivElement, PanelClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'title'> & {
|
|
410
|
+
children: ReactNode;
|
|
411
|
+
description?: string;
|
|
412
|
+
title?: string;
|
|
413
|
+
variant?: PanelVariant;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
export declare type PanelVariant = 'light' | 'dark';
|
|
417
|
+
|
|
418
|
+
export declare const Progress: ({ value, size, className, classnames, ref, ...rest }: ProgressProps) => JSX.Element;
|
|
419
|
+
|
|
420
|
+
export declare type ProgressClassNames = {
|
|
421
|
+
track?: string;
|
|
422
|
+
bar?: string;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
export declare type ProgressProps = VacanoComponentProps<HTMLDivElement, ProgressClassNames> & {
|
|
426
|
+
/** Progress value from 0 to 100 */
|
|
427
|
+
value: number;
|
|
428
|
+
/** Size variant */
|
|
429
|
+
size?: VacanoComponentSize;
|
|
485
430
|
};
|
|
486
431
|
|
|
487
|
-
export declare
|
|
488
|
-
|
|
489
|
-
declare
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
borderColor: string;
|
|
493
|
-
focus: {
|
|
494
|
-
outlineColor: string;
|
|
495
|
-
};
|
|
496
|
-
};
|
|
497
|
-
label: {
|
|
498
|
-
color: string;
|
|
499
|
-
};
|
|
500
|
-
chip: {
|
|
501
|
-
backgroundColor: string;
|
|
502
|
-
color: string;
|
|
503
|
-
remove: {
|
|
504
|
-
color: string;
|
|
505
|
-
};
|
|
506
|
-
};
|
|
507
|
-
icon: {
|
|
508
|
-
color: string;
|
|
509
|
-
};
|
|
510
|
-
chevron: {
|
|
511
|
-
color: string;
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
declare type MultiSelectTheme = {
|
|
516
|
-
trigger: {
|
|
517
|
-
backgroundColor: string;
|
|
518
|
-
borderColor: string;
|
|
519
|
-
focus: {
|
|
520
|
-
outlineColor: string;
|
|
521
|
-
};
|
|
522
|
-
disabled: {
|
|
523
|
-
backgroundColor: string;
|
|
524
|
-
borderColor: string;
|
|
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;
|
|
432
|
+
export declare const Radio: ({ checked, className, classnames, disabled, label, onChange, ref, variant, ...rest }: RadioProps) => JSX.Element;
|
|
433
|
+
|
|
434
|
+
export declare const RadioCard: ({ checked, className, classnames, description, disabled, fullWidth, label, onChange, ref, variant, ...rest }: RadioCardProps) => JSX.Element;
|
|
435
|
+
|
|
436
|
+
export declare type RadioCardClassNames = {
|
|
605
437
|
radio?: string;
|
|
606
438
|
content?: string;
|
|
607
439
|
label?: string;
|
|
608
440
|
description?: string;
|
|
609
441
|
};
|
|
610
442
|
|
|
611
|
-
export declare type RadioCardProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> & {
|
|
443
|
+
export declare type RadioCardProps = VacanoComponentProps<HTMLInputElement, RadioCardClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'className'> & {
|
|
612
444
|
checked: boolean;
|
|
613
445
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
614
446
|
label: string;
|
|
615
447
|
description?: string;
|
|
616
448
|
fullWidth?: boolean;
|
|
617
|
-
|
|
618
|
-
className?: string;
|
|
619
|
-
classnames?: RadioCardClassnames;
|
|
620
|
-
ref?: Ref<HTMLInputElement>;
|
|
621
|
-
'data-test-id'?: string;
|
|
449
|
+
variant?: RadioCardVariant;
|
|
622
450
|
};
|
|
623
451
|
|
|
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;
|
|
452
|
+
export declare type RadioCardVariant = 'normal' | 'error';
|
|
453
|
+
|
|
454
|
+
export declare type RadioClassNames = {
|
|
680
455
|
input?: string;
|
|
681
|
-
|
|
456
|
+
box?: string;
|
|
682
457
|
dot?: string;
|
|
683
458
|
label?: string;
|
|
684
459
|
};
|
|
685
460
|
|
|
686
|
-
export declare const RadioGroup: ({ className, classnames, disabled, label, name, onChange, options, value, ...rest }: RadioGroupProps) => JSX.Element;
|
|
461
|
+
export declare const RadioGroup: ({ className, classnames, disabled, label, name, onChange, options, ref, value, ...rest }: RadioGroupProps) => JSX.Element;
|
|
687
462
|
|
|
688
|
-
export declare type
|
|
689
|
-
container?: string;
|
|
463
|
+
export declare type RadioGroupClassNames = {
|
|
690
464
|
label?: string;
|
|
691
465
|
options?: string;
|
|
692
466
|
radio?: string;
|
|
@@ -697,488 +471,251 @@ export declare type RadioGroupOption = {
|
|
|
697
471
|
value: string;
|
|
698
472
|
};
|
|
699
473
|
|
|
700
|
-
export declare type RadioGroupProps = {
|
|
701
|
-
value: string;
|
|
474
|
+
export declare type RadioGroupProps = VacanoComponentProps<HTMLDivElement, RadioGroupClassNames> & {
|
|
702
475
|
options: RadioGroupOption[];
|
|
476
|
+
value: string | null;
|
|
703
477
|
onChange: (value: string) => void;
|
|
704
478
|
label?: string;
|
|
705
479
|
name?: string;
|
|
706
480
|
disabled?: boolean;
|
|
707
|
-
className?: string;
|
|
708
|
-
classnames?: RadioGroupClassnames;
|
|
709
|
-
'data-test-id'?: string;
|
|
710
481
|
};
|
|
711
482
|
|
|
712
|
-
declare type
|
|
713
|
-
label: {
|
|
714
|
-
color: string;
|
|
715
|
-
};
|
|
716
|
-
};
|
|
717
|
-
|
|
718
|
-
export declare type RadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange'> & {
|
|
483
|
+
export declare type RadioProps = VacanoComponentProps<HTMLInputElement, RadioClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'onChange' | 'className'> & {
|
|
719
484
|
checked: boolean;
|
|
720
|
-
classnames?: RadioClassnames;
|
|
721
|
-
'data-test-id'?: string;
|
|
722
|
-
label?: string;
|
|
723
485
|
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;
|
|
486
|
+
label?: string;
|
|
487
|
+
variant?: RadioVariant;
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
export declare type RadioVariant = 'normal' | 'error';
|
|
491
|
+
|
|
492
|
+
export declare const Select: ({ className, classnames, disabled, fullWidth, label, onChange, options, placeholder, portalRenderNode, ref, size, value, variant, ...rest }: SelectProps) => JSX.Element;
|
|
493
|
+
|
|
494
|
+
export declare type SelectClassNames = {
|
|
774
495
|
label?: string;
|
|
775
496
|
trigger?: string;
|
|
776
|
-
|
|
777
|
-
search?: string;
|
|
778
|
-
list?: string;
|
|
497
|
+
dropdown?: string;
|
|
779
498
|
option?: string;
|
|
780
|
-
empty?: string;
|
|
781
499
|
};
|
|
782
500
|
|
|
783
501
|
export declare type SelectOption = {
|
|
784
|
-
label: string;
|
|
785
502
|
value: string;
|
|
503
|
+
label: string;
|
|
504
|
+
disabled?: boolean;
|
|
786
505
|
};
|
|
787
506
|
|
|
788
|
-
export declare type
|
|
789
|
-
|
|
790
|
-
export declare type SelectProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
507
|
+
export declare type SelectProps = VacanoComponentProps<HTMLDivElement, SelectClassNames> & {
|
|
508
|
+
value: string;
|
|
791
509
|
options: SelectOption[];
|
|
792
|
-
value?: string;
|
|
793
510
|
onChange?: (value: string) => void;
|
|
794
|
-
placeholder?: string;
|
|
795
|
-
searchPlaceholder?: string;
|
|
796
|
-
emptyMessage?: string;
|
|
797
511
|
label?: string;
|
|
798
|
-
|
|
799
|
-
|
|
512
|
+
placeholder?: string;
|
|
513
|
+
variant?: SelectVariant;
|
|
514
|
+
size?: VacanoComponentSize;
|
|
800
515
|
disabled?: boolean;
|
|
801
516
|
fullWidth?: boolean;
|
|
802
|
-
placement?: SelectPlacement;
|
|
803
|
-
maxHeight?: number;
|
|
804
|
-
virtualized?: boolean;
|
|
805
|
-
searchable?: boolean;
|
|
806
517
|
portalRenderNode?: HTMLElement | null;
|
|
807
|
-
classnames?: SelectClassnames;
|
|
808
|
-
'data-test-id'?: string;
|
|
809
518
|
};
|
|
810
519
|
|
|
811
|
-
export declare type
|
|
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
|
-
};
|
|
520
|
+
export declare type SelectVariant = 'normal' | 'error';
|
|
927
521
|
|
|
928
|
-
export declare
|
|
929
|
-
$variant: ButtonVariant;
|
|
930
|
-
$loading?: boolean;
|
|
931
|
-
};
|
|
932
|
-
|
|
933
|
-
export declare type StyledButtonContainerProps = {
|
|
934
|
-
$variant: ButtonVariant;
|
|
935
|
-
$fullWidth?: boolean;
|
|
936
|
-
$loading?: boolean;
|
|
937
|
-
$iconOnly?: boolean;
|
|
938
|
-
};
|
|
522
|
+
export declare const Spinner: ({ "aria-label": ariaLabel, className, ref, size, ...rest }: SpinnerProps) => JSX.Element;
|
|
939
523
|
|
|
940
|
-
export declare type
|
|
941
|
-
$variant: ButtonVariant;
|
|
942
|
-
$loading?: boolean;
|
|
943
|
-
};
|
|
524
|
+
export declare type SpinnerClassNames = Record<string, never>;
|
|
944
525
|
|
|
945
|
-
export declare type
|
|
946
|
-
|
|
526
|
+
export declare type SpinnerProps = VacanoComponentProps<HTMLDivElement, SpinnerClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'children'> & {
|
|
527
|
+
size?: SpinnerSize;
|
|
528
|
+
'aria-label'?: string;
|
|
947
529
|
};
|
|
948
530
|
|
|
949
|
-
export declare type
|
|
950
|
-
$checked?: boolean;
|
|
951
|
-
$disabled?: boolean;
|
|
952
|
-
$fullWidth?: boolean;
|
|
953
|
-
$state?: CheckboxCardState;
|
|
954
|
-
};
|
|
531
|
+
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
955
532
|
|
|
956
|
-
export declare
|
|
957
|
-
$state?: CheckboxCardState;
|
|
958
|
-
};
|
|
533
|
+
export declare const StatusCard: ({ border, className, classnames, icon, label, ref, shadow, trend, trendVariant, value, ...rest }: StatusCardProps) => JSX.Element;
|
|
959
534
|
|
|
960
|
-
export declare type
|
|
961
|
-
|
|
535
|
+
export declare type StatusCardClassNames = {
|
|
536
|
+
label?: string;
|
|
537
|
+
value?: string;
|
|
538
|
+
trend?: string;
|
|
962
539
|
};
|
|
963
540
|
|
|
964
|
-
export declare type
|
|
965
|
-
|
|
966
|
-
|
|
541
|
+
export declare type StatusCardProps = VacanoComponentProps<HTMLDivElement, StatusCardClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className'> & {
|
|
542
|
+
border?: boolean;
|
|
543
|
+
icon?: ReactNode;
|
|
544
|
+
label: string;
|
|
545
|
+
shadow?: boolean;
|
|
546
|
+
trend?: string;
|
|
547
|
+
trendVariant?: StatusCardTrend;
|
|
548
|
+
value: string;
|
|
967
549
|
};
|
|
968
550
|
|
|
969
|
-
export declare type
|
|
970
|
-
$fullWidth?: boolean;
|
|
971
|
-
};
|
|
551
|
+
export declare type StatusCardTrend = 'positive' | 'negative' | 'neutral';
|
|
972
552
|
|
|
973
|
-
export declare type
|
|
974
|
-
|
|
553
|
+
export declare type StepItem = {
|
|
554
|
+
value: string;
|
|
555
|
+
label: string;
|
|
975
556
|
};
|
|
976
557
|
|
|
977
|
-
export declare
|
|
978
|
-
$fullWidth?: boolean;
|
|
979
|
-
};
|
|
558
|
+
export declare const Stepper: ({ className, classnames, onChange, orientation, ref, steps, value, ...rest }: StepperProps) => JSX.Element;
|
|
980
559
|
|
|
981
|
-
export declare type
|
|
982
|
-
|
|
560
|
+
export declare type StepperClassNames = {
|
|
561
|
+
step?: string;
|
|
562
|
+
circle?: string;
|
|
563
|
+
label?: string;
|
|
564
|
+
line?: string;
|
|
983
565
|
};
|
|
984
566
|
|
|
985
|
-
export declare type
|
|
986
|
-
$state?: InputState;
|
|
987
|
-
};
|
|
567
|
+
export declare type StepperOrientation = 'horizontal' | 'vertical';
|
|
988
568
|
|
|
989
|
-
export declare type
|
|
990
|
-
|
|
991
|
-
|
|
569
|
+
export declare type StepperProps = VacanoComponentProps<HTMLDivElement, StepperClassNames> & {
|
|
570
|
+
value: string;
|
|
571
|
+
steps: StepItem[];
|
|
572
|
+
onChange?: (value: string) => void;
|
|
573
|
+
orientation?: StepperOrientation;
|
|
992
574
|
};
|
|
993
575
|
|
|
994
|
-
export declare type
|
|
995
|
-
|
|
576
|
+
export declare type TabItem = {
|
|
577
|
+
value: string;
|
|
578
|
+
label: string;
|
|
579
|
+
disabled?: boolean;
|
|
996
580
|
};
|
|
997
581
|
|
|
998
|
-
export declare
|
|
999
|
-
$state?: InputState;
|
|
1000
|
-
$disabled?: boolean;
|
|
1001
|
-
};
|
|
582
|
+
export declare const Tabs: ({ className, classnames, onChange, ref, tabs, value, ...rest }: TabsProps) => JSX.Element;
|
|
1002
583
|
|
|
1003
|
-
export declare type
|
|
1004
|
-
|
|
1005
|
-
$disabled?: boolean;
|
|
584
|
+
export declare type TabsClassNames = {
|
|
585
|
+
tab?: string;
|
|
1006
586
|
};
|
|
1007
587
|
|
|
1008
|
-
export declare type
|
|
1009
|
-
|
|
588
|
+
export declare type TabsProps = VacanoComponentProps<HTMLDivElement, TabsClassNames> & {
|
|
589
|
+
value: string;
|
|
590
|
+
tabs: TabItem[];
|
|
591
|
+
onChange: (value: string) => void;
|
|
1010
592
|
};
|
|
1011
593
|
|
|
1012
|
-
export declare
|
|
1013
|
-
$state?: MultiSelectState;
|
|
1014
|
-
$disabled?: boolean;
|
|
1015
|
-
$isOpen?: boolean;
|
|
1016
|
-
};
|
|
594
|
+
export declare const Tags: ({ className, classnames, createKey, disabled, emptyMessage, freeSolo, label, onChange, options, placeholder, portalRenderNode, ref, value, variant, ...rest }: TagsProps) => JSX.Element;
|
|
1017
595
|
|
|
1018
|
-
export declare type
|
|
1019
|
-
|
|
1020
|
-
|
|
596
|
+
export declare type TagsClassNames = {
|
|
597
|
+
trigger?: string;
|
|
598
|
+
chip?: string;
|
|
599
|
+
input?: string;
|
|
600
|
+
dropdown?: string;
|
|
601
|
+
option?: string;
|
|
602
|
+
empty?: string;
|
|
1021
603
|
};
|
|
1022
604
|
|
|
1023
|
-
export declare type
|
|
1024
|
-
$state?: MultiSelectState;
|
|
1025
|
-
$disabled?: boolean;
|
|
1026
|
-
};
|
|
605
|
+
export declare type TagsCreateKey = 'Tab' | 'Enter';
|
|
1027
606
|
|
|
1028
|
-
export declare type
|
|
1029
|
-
|
|
607
|
+
export declare type TagsOption = {
|
|
608
|
+
value: string;
|
|
609
|
+
label: string;
|
|
1030
610
|
};
|
|
1031
611
|
|
|
1032
|
-
export declare type
|
|
1033
|
-
|
|
1034
|
-
|
|
612
|
+
export declare type TagsProps = VacanoComponentProps<HTMLDivElement, TagsClassNames> & {
|
|
613
|
+
value: string[];
|
|
614
|
+
onChange: (value: string[]) => void;
|
|
615
|
+
options?: TagsOption[];
|
|
616
|
+
label?: string;
|
|
617
|
+
placeholder?: string;
|
|
618
|
+
variant?: TagsVariant;
|
|
619
|
+
disabled?: boolean;
|
|
620
|
+
freeSolo?: boolean;
|
|
621
|
+
createKey?: TagsCreateKey;
|
|
622
|
+
emptyMessage?: ReactNode;
|
|
623
|
+
portalRenderNode?: HTMLElement | null;
|
|
1035
624
|
};
|
|
1036
625
|
|
|
1037
|
-
export declare type
|
|
1038
|
-
$state?: MultiSelectState;
|
|
1039
|
-
$disabled?: boolean;
|
|
1040
|
-
};
|
|
626
|
+
export declare type TagsVariant = 'normal' | 'error';
|
|
1041
627
|
|
|
1042
|
-
export declare type
|
|
1043
|
-
|
|
628
|
+
export declare type Toast = {
|
|
629
|
+
id: string;
|
|
630
|
+
message: string;
|
|
631
|
+
variant: ToastVariant;
|
|
632
|
+
duration?: number;
|
|
1044
633
|
};
|
|
1045
634
|
|
|
1046
|
-
export declare type
|
|
1047
|
-
|
|
635
|
+
export declare type ToastAction = {
|
|
636
|
+
type: 'ADD_TOAST';
|
|
637
|
+
payload: Toast;
|
|
638
|
+
} | {
|
|
639
|
+
type: 'REMOVE_TOAST';
|
|
640
|
+
payload: string;
|
|
641
|
+
} | {
|
|
642
|
+
type: 'SHOW_NEXT_FROM_QUEUE';
|
|
1048
643
|
};
|
|
1049
644
|
|
|
1050
|
-
export declare type
|
|
1051
|
-
|
|
645
|
+
export declare type ToastContainerProps = {
|
|
646
|
+
toasts: Toast[];
|
|
647
|
+
queueCount: number;
|
|
648
|
+
removeToast: (id: string) => void;
|
|
1052
649
|
};
|
|
1053
650
|
|
|
1054
|
-
export declare type
|
|
1055
|
-
|
|
651
|
+
export declare type ToastContextValue = {
|
|
652
|
+
addToast: (message: string, variant?: ToastVariant, duration?: number) => void;
|
|
653
|
+
removeToast: (id: string) => void;
|
|
1056
654
|
};
|
|
1057
655
|
|
|
1058
|
-
export declare type
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
$isOpen?: boolean;
|
|
1062
|
-
$hasValue?: boolean;
|
|
656
|
+
export declare type ToastItemProps = {
|
|
657
|
+
toast: Toast;
|
|
658
|
+
onRemove: (id: string) => void;
|
|
1063
659
|
};
|
|
1064
660
|
|
|
1065
|
-
export declare
|
|
1066
|
-
$checked?: boolean;
|
|
1067
|
-
$disabled?: boolean;
|
|
1068
|
-
$fullWidth?: boolean;
|
|
1069
|
-
$state?: RadioCardState;
|
|
1070
|
-
};
|
|
661
|
+
export declare const ToastProvider: ({ children }: PropsWithChildren) => JSX.Element;
|
|
1071
662
|
|
|
1072
|
-
export declare type
|
|
1073
|
-
|
|
663
|
+
export declare type ToastState = {
|
|
664
|
+
toasts: Toast[];
|
|
665
|
+
queue: Toast[];
|
|
1074
666
|
};
|
|
1075
667
|
|
|
1076
|
-
export declare type
|
|
1077
|
-
$state?: RadioCardState;
|
|
1078
|
-
};
|
|
668
|
+
export declare type ToastVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
1079
669
|
|
|
1080
|
-
export declare
|
|
1081
|
-
$state?: SelectState;
|
|
1082
|
-
$disabled?: boolean;
|
|
1083
|
-
$isOpen?: boolean;
|
|
1084
|
-
};
|
|
670
|
+
export declare const Tooltip: ({ children, className, classnames, content, delay, placement, portalRenderNode, ref, variant, ...rest }: TooltipProps) => JSX.Element;
|
|
1085
671
|
|
|
1086
|
-
export declare type
|
|
1087
|
-
|
|
672
|
+
export declare type TooltipClassNames = {
|
|
673
|
+
content?: string;
|
|
1088
674
|
};
|
|
1089
675
|
|
|
1090
|
-
export declare type
|
|
1091
|
-
$isOpen: boolean;
|
|
1092
|
-
$maxHeight: number;
|
|
1093
|
-
};
|
|
676
|
+
export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
1094
677
|
|
|
1095
|
-
export declare type
|
|
1096
|
-
|
|
1097
|
-
|
|
678
|
+
export declare type TooltipProps = VacanoComponentProps<HTMLDivElement, TooltipClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'content'> & {
|
|
679
|
+
children: ReactNode;
|
|
680
|
+
content: ReactNode;
|
|
681
|
+
delay?: number;
|
|
682
|
+
placement?: TooltipPlacement;
|
|
683
|
+
variant?: TooltipVariant;
|
|
684
|
+
portalRenderNode?: HTMLElement | null;
|
|
1098
685
|
};
|
|
1099
686
|
|
|
1100
|
-
export declare type
|
|
1101
|
-
$state?: SelectState;
|
|
1102
|
-
};
|
|
687
|
+
export declare type TooltipVariant = 'dark' | 'light' | 'success' | 'warning' | 'danger';
|
|
1103
688
|
|
|
1104
|
-
export declare
|
|
1105
|
-
$isSelected?: boolean;
|
|
1106
|
-
};
|
|
689
|
+
export declare const useImageCropper: (options?: UseImageCropperOptions) => UseImageCropperReturn;
|
|
1107
690
|
|
|
1108
|
-
export declare type
|
|
1109
|
-
|
|
691
|
+
export declare type UseImageCropperOptions = {
|
|
692
|
+
allowedTypes?: string[];
|
|
693
|
+
applyLabel?: string;
|
|
694
|
+
cancelLabel?: string;
|
|
695
|
+
compression?: number;
|
|
696
|
+
maxFileSize?: number;
|
|
697
|
+
onCrop?: (result: ImageCropperResult) => void;
|
|
698
|
+
onError?: (error: ImageCropperError) => void;
|
|
699
|
+
outputSize?: number;
|
|
700
|
+
portalSize?: number;
|
|
701
|
+
type?: ImageCropperOutputType;
|
|
1110
702
|
};
|
|
1111
703
|
|
|
1112
|
-
export declare type
|
|
1113
|
-
|
|
1114
|
-
$disabled?: boolean;
|
|
1115
|
-
$isOpen?: boolean;
|
|
704
|
+
export declare type UseImageCropperReturn = {
|
|
705
|
+
open: () => void;
|
|
1116
706
|
};
|
|
1117
707
|
|
|
1118
|
-
export declare
|
|
1119
|
-
$isPlaceholder?: boolean;
|
|
1120
|
-
$state?: SelectState;
|
|
1121
|
-
$disabled?: boolean;
|
|
1122
|
-
};
|
|
708
|
+
export declare const useToast: () => ToastContextValue;
|
|
1123
709
|
|
|
1124
|
-
|
|
1125
|
-
$size: number;
|
|
1126
|
-
};
|
|
710
|
+
declare type VacanoComponentClassNames<T> = T;
|
|
1127
711
|
|
|
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;
|
|
712
|
+
declare type VacanoComponentProps<E extends HTMLElement | null, T extends Record<string, string> = Record<string, never>> = {
|
|
713
|
+
'data-test-id'?: string;
|
|
714
|
+
className?: string;
|
|
715
|
+
classnames?: VacanoComponentClassNames<T>;
|
|
716
|
+
ref?: Ref<E>;
|
|
1161
717
|
};
|
|
1162
718
|
|
|
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;
|
|
719
|
+
declare type VacanoComponentSize = 'compact' | 'default';
|
|
1183
720
|
|
|
1184
721
|
export { }
|