@vacano/ui 0.0.1 → 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/{Minus-BxmZQPsb.js → X-Cm-i8Bh7.js} +411 -340
- 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 +3018 -3097
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +1761 -569
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +514 -692
- package/dist/index.js +4862 -6180
- 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/Minus-BxmZQPsb.js.map +0 -1
- package/dist/Minus-C6HNRQfO.cjs +0 -16
- package/dist/Minus-C6HNRQfO.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,156 +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 Button: ({
|
|
12
|
+
export declare const Button: ({ children, className, classnames, disabled, fullWidth, icon, loading, onClick, ref, keyBindings, size, type, variant, ...rest }: ButtonProps) => JSX.Element;
|
|
11
13
|
|
|
12
|
-
export declare type
|
|
13
|
-
|
|
14
|
-
content?: string;
|
|
14
|
+
export declare type ButtonClassNames = {
|
|
15
|
+
label?: string;
|
|
15
16
|
icon?: string;
|
|
16
|
-
|
|
17
|
-
char?: string;
|
|
18
|
-
loader?: string;
|
|
17
|
+
binding?: string;
|
|
19
18
|
};
|
|
20
19
|
|
|
21
|
-
export declare type ButtonProps = Omit<
|
|
22
|
-
char?: string;
|
|
20
|
+
export declare type ButtonProps = VacanoComponentProps<HTMLButtonElement, ButtonClassNames> & Omit<HTMLAttributes<HTMLButtonElement>, 'children' | 'className'> & {
|
|
23
21
|
children?: string;
|
|
24
|
-
|
|
25
|
-
'data-test-id'?: string;
|
|
22
|
+
disabled?: boolean;
|
|
26
23
|
fullWidth?: boolean;
|
|
27
24
|
icon?: ReactNode;
|
|
25
|
+
keyBindings?: KeyboardEventKey[];
|
|
28
26
|
loading?: boolean;
|
|
27
|
+
size?: VacanoComponentSize;
|
|
28
|
+
type?: ButtonType;
|
|
29
29
|
variant?: ButtonVariant;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export declare type
|
|
33
|
-
|
|
34
|
-
declare type
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
color: string;
|
|
51
|
-
backgroundColor: string;
|
|
52
|
-
borderColor: string;
|
|
53
|
-
};
|
|
54
|
-
char: {
|
|
55
|
-
color: string;
|
|
56
|
-
backgroundColor: string;
|
|
57
|
-
};
|
|
58
|
-
icon: {
|
|
59
|
-
color: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export declare const Checkbox: ({ checked, className, classnames, disabled, indeterminate, label, onChange, ref, state, ...rest }: CheckboxProps) => JSX.Element;
|
|
64
|
-
|
|
65
|
-
export declare const CheckboxCard: ({ checked, className, classnames, description, disabled, fullWidth, label, onChange, ref, state, ...rest }: CheckboxCardProps) => JSX.Element;
|
|
66
|
-
|
|
67
|
-
export declare type CheckboxCardClassnames = {
|
|
68
|
-
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 = {
|
|
69
50
|
checkbox?: string;
|
|
70
51
|
content?: string;
|
|
71
52
|
label?: string;
|
|
72
53
|
description?: string;
|
|
73
54
|
};
|
|
74
55
|
|
|
75
|
-
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'> & {
|
|
76
57
|
checked: boolean;
|
|
77
58
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
78
59
|
label: string;
|
|
79
60
|
description?: string;
|
|
80
61
|
fullWidth?: boolean;
|
|
81
|
-
|
|
82
|
-
className?: string;
|
|
83
|
-
classnames?: CheckboxCardClassnames;
|
|
84
|
-
ref?: Ref<HTMLInputElement>;
|
|
85
|
-
'data-test-id'?: string;
|
|
62
|
+
variant?: CheckboxCardVariant;
|
|
86
63
|
};
|
|
87
64
|
|
|
88
|
-
export declare type
|
|
89
|
-
|
|
90
|
-
declare type
|
|
91
|
-
container: {
|
|
92
|
-
borderColor: string;
|
|
93
|
-
checked: {
|
|
94
|
-
borderColor: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
label: {
|
|
98
|
-
color: string;
|
|
99
|
-
};
|
|
100
|
-
description: {
|
|
101
|
-
color: string;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
declare type CheckboxCardTheme = {
|
|
106
|
-
container: {
|
|
107
|
-
backgroundColor: string;
|
|
108
|
-
borderColor: string;
|
|
109
|
-
hover: {
|
|
110
|
-
borderColor: string;
|
|
111
|
-
};
|
|
112
|
-
checked: {
|
|
113
|
-
backgroundColor: string;
|
|
114
|
-
borderColor: string;
|
|
115
|
-
};
|
|
116
|
-
focus: {
|
|
117
|
-
outlineColor: string;
|
|
118
|
-
};
|
|
119
|
-
disabled: {
|
|
120
|
-
backgroundColor: string;
|
|
121
|
-
borderColor: string;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
label: {
|
|
125
|
-
color: string;
|
|
126
|
-
disabled: {
|
|
127
|
-
color: string;
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
description: {
|
|
131
|
-
color: string;
|
|
132
|
-
disabled: {
|
|
133
|
-
color: string;
|
|
134
|
-
};
|
|
135
|
-
};
|
|
136
|
-
state: {
|
|
137
|
-
warning: CheckboxCardStateTheme;
|
|
138
|
-
error: CheckboxCardStateTheme;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export declare type CheckboxClassnames = {
|
|
143
|
-
container?: string;
|
|
65
|
+
export declare type CheckboxCardVariant = 'normal' | 'error';
|
|
66
|
+
|
|
67
|
+
export declare type CheckboxClassNames = {
|
|
144
68
|
input?: string;
|
|
145
69
|
box?: string;
|
|
146
70
|
icon?: string;
|
|
147
71
|
label?: string;
|
|
148
72
|
};
|
|
149
73
|
|
|
150
|
-
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;
|
|
151
75
|
|
|
152
|
-
export declare type
|
|
153
|
-
container?: string;
|
|
76
|
+
export declare type CheckboxGroupClassNames = {
|
|
154
77
|
label?: string;
|
|
155
78
|
options?: string;
|
|
156
79
|
checkbox?: string;
|
|
@@ -161,318 +84,383 @@ export declare type CheckboxGroupOption = {
|
|
|
161
84
|
value: string;
|
|
162
85
|
};
|
|
163
86
|
|
|
164
|
-
export declare type CheckboxGroupProps = {
|
|
87
|
+
export declare type CheckboxGroupProps = VacanoComponentProps<HTMLDivElement, CheckboxGroupClassNames> & {
|
|
165
88
|
options: CheckboxGroupOption[];
|
|
166
89
|
value: string[];
|
|
167
90
|
onChange: (values: string[]) => void;
|
|
168
91
|
label?: string;
|
|
169
92
|
disabled?: boolean;
|
|
170
|
-
className?: string;
|
|
171
|
-
classnames?: CheckboxGroupClassnames;
|
|
172
|
-
'data-test-id'?: string;
|
|
173
93
|
};
|
|
174
94
|
|
|
175
|
-
declare type
|
|
176
|
-
label: {
|
|
177
|
-
color: string;
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
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'> & {
|
|
182
96
|
checked: boolean;
|
|
183
97
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
184
|
-
'data-test-id'?: string;
|
|
185
|
-
classnames?: CheckboxClassnames;
|
|
186
98
|
indeterminate?: boolean;
|
|
187
99
|
label?: string;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
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 */
|
|
244
187
|
fullWidth?: boolean;
|
|
245
|
-
|
|
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;
|
|
246
198
|
};
|
|
247
199
|
|
|
248
|
-
export declare type
|
|
200
|
+
export declare type DatePickerVariant = 'normal' | 'error';
|
|
249
201
|
|
|
250
|
-
export declare const
|
|
202
|
+
export declare const Drawer: ({ animated, children, className, open, position, ref, size, ...rest }: DrawerProps) => ReactPortal | null;
|
|
251
203
|
|
|
252
|
-
export declare type
|
|
204
|
+
export declare type DrawerPosition = 'left' | 'right' | 'top' | 'bottom';
|
|
253
205
|
|
|
254
|
-
export declare type
|
|
255
|
-
|
|
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 = {
|
|
256
219
|
trigger?: string;
|
|
257
220
|
content?: string;
|
|
258
221
|
};
|
|
259
222
|
|
|
260
|
-
export declare type
|
|
223
|
+
export declare type DropdownPosition = 'top' | 'bottom';
|
|
261
224
|
|
|
262
|
-
export declare type DropdownProps =
|
|
263
|
-
trigger: ReactNode;
|
|
264
|
-
children: ReactNode;
|
|
265
|
-
placement?: DropdownPlacement;
|
|
225
|
+
export declare type DropdownProps = VacanoComponentProps<HTMLDivElement, DropdownClassNames> & {
|
|
266
226
|
align?: DropdownAlign;
|
|
267
|
-
|
|
227
|
+
children?: ReactNode;
|
|
228
|
+
onClose?: () => void;
|
|
229
|
+
onOpen?: () => void;
|
|
268
230
|
open?: boolean;
|
|
269
|
-
onOpenChange?: (open: boolean) => void;
|
|
270
231
|
portalRenderNode?: HTMLElement | null;
|
|
271
|
-
|
|
272
|
-
fullWidth?: boolean;
|
|
273
|
-
'data-test-id'?: string;
|
|
232
|
+
trigger: ReactElement;
|
|
274
233
|
};
|
|
275
234
|
|
|
276
|
-
declare
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
};
|
|
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;
|
|
283
270
|
|
|
284
271
|
export declare const GlobalStyle: () => JSX.Element;
|
|
285
272
|
|
|
286
|
-
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;
|
|
287
274
|
|
|
288
|
-
export declare type
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
275
|
+
export declare type ImageCropperClassNames = {
|
|
276
|
+
button?: string;
|
|
277
|
+
preview?: string;
|
|
278
|
+
};
|
|
279
|
+
|
|
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 = {
|
|
292
310
|
input?: string;
|
|
293
|
-
|
|
294
|
-
|
|
311
|
+
label?: string;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export declare type InputProps = VacanoComponentProps<HTMLInputElement, InputClassNames> & Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size'> & {
|
|
315
|
+
fullWidth?: boolean;
|
|
316
|
+
label?: string;
|
|
317
|
+
size?: VacanoComponentSize;
|
|
318
|
+
variant?: InputVariant;
|
|
319
|
+
};
|
|
320
|
+
|
|
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;
|
|
295
333
|
};
|
|
296
334
|
|
|
297
|
-
export declare type
|
|
335
|
+
export declare type KeysBindingsProps = VacanoComponentProps<HTMLDivElement, KeysBindingsClassNames> & {
|
|
336
|
+
keys?: KeyboardEventKey[];
|
|
337
|
+
variant?: KeysBindingsVariant;
|
|
338
|
+
};
|
|
339
|
+
|
|
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;
|
|
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 = {
|
|
368
|
+
trigger?: string;
|
|
369
|
+
chips?: string;
|
|
370
|
+
chip?: string;
|
|
371
|
+
placeholder?: string;
|
|
372
|
+
modal?: string;
|
|
373
|
+
search?: string;
|
|
374
|
+
options?: string;
|
|
375
|
+
option?: string;
|
|
376
|
+
empty?: string;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
export declare type MultiSelectOption = {
|
|
298
380
|
value: string;
|
|
299
|
-
|
|
300
|
-
|
|
381
|
+
label: string;
|
|
382
|
+
disabled?: boolean;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
export declare type MultiSelectProps = VacanoComponentProps<HTMLDivElement, MultiSelectClassNames> & {
|
|
386
|
+
value: string[];
|
|
387
|
+
options: MultiSelectOption[];
|
|
388
|
+
onChange: (value: string[]) => void;
|
|
301
389
|
label?: string;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
390
|
+
placeholder?: string;
|
|
391
|
+
variant?: MultiSelectVariant;
|
|
392
|
+
disabled?: boolean;
|
|
393
|
+
maxVisible?: number;
|
|
394
|
+
emptyMessage?: ReactNode;
|
|
395
|
+
searchPlaceholder?: string;
|
|
396
|
+
modalTitle?: string;
|
|
309
397
|
};
|
|
310
398
|
|
|
311
|
-
export declare type
|
|
312
|
-
|
|
313
|
-
declare
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
};
|
|
320
|
-
};
|
|
321
|
-
label: {
|
|
322
|
-
color: string;
|
|
323
|
-
};
|
|
324
|
-
input: {
|
|
325
|
-
color: string;
|
|
326
|
-
placeholderColor: string;
|
|
327
|
-
};
|
|
328
|
-
icon: {
|
|
329
|
-
color: string;
|
|
330
|
-
};
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
declare type InputTheme = {
|
|
334
|
-
wrapper: {
|
|
335
|
-
backgroundColor: string;
|
|
336
|
-
borderColor: string;
|
|
337
|
-
focus: {
|
|
338
|
-
outlineColor: string;
|
|
339
|
-
};
|
|
340
|
-
disabled: {
|
|
341
|
-
backgroundColor: string;
|
|
342
|
-
borderColor: string;
|
|
343
|
-
};
|
|
344
|
-
};
|
|
345
|
-
label: {
|
|
346
|
-
color: string;
|
|
347
|
-
};
|
|
348
|
-
input: {
|
|
349
|
-
color: string;
|
|
350
|
-
placeholderColor: string;
|
|
351
|
-
disabled: {
|
|
352
|
-
color: string;
|
|
353
|
-
};
|
|
354
|
-
};
|
|
355
|
-
icon: {
|
|
356
|
-
color: string;
|
|
357
|
-
disabled: {
|
|
358
|
-
color: string;
|
|
359
|
-
};
|
|
360
|
-
};
|
|
361
|
-
toggle: {
|
|
362
|
-
color: string;
|
|
363
|
-
};
|
|
364
|
-
state: {
|
|
365
|
-
warning: InputStateTheme;
|
|
366
|
-
error: InputStateTheme;
|
|
367
|
-
};
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
export declare type InputType = InputHTMLAttributes<HTMLInputElement>['type'];
|
|
371
|
-
|
|
372
|
-
export declare const Loader: ({ "aria-label": ariaLabel, className, classnames, size, ...rest }: LoaderProps) => JSX.Element;
|
|
373
|
-
|
|
374
|
-
export declare type LoaderClassnames = {
|
|
375
|
-
container?: string;
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
export declare type LoaderProps = HTMLAttributes<HTMLSpanElement> & {
|
|
379
|
-
'aria-label'?: string;
|
|
380
|
-
'data-test-id'?: string;
|
|
381
|
-
classnames?: LoaderClassnames;
|
|
382
|
-
size?: number;
|
|
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;
|
|
383
407
|
};
|
|
384
408
|
|
|
385
|
-
export declare
|
|
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
|
+
};
|
|
386
424
|
|
|
387
|
-
export declare
|
|
425
|
+
export declare type ProgressProps = VacanoComponentProps<HTMLDivElement, ProgressClassNames> & {
|
|
426
|
+
/** Progress value from 0 to 100 */
|
|
427
|
+
value: number;
|
|
428
|
+
/** Size variant */
|
|
429
|
+
size?: VacanoComponentSize;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
export declare const Radio: ({ checked, className, classnames, disabled, label, onChange, ref, variant, ...rest }: RadioProps) => JSX.Element;
|
|
388
433
|
|
|
389
|
-
export declare
|
|
390
|
-
|
|
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 = {
|
|
391
437
|
radio?: string;
|
|
392
438
|
content?: string;
|
|
393
439
|
label?: string;
|
|
394
440
|
description?: string;
|
|
395
441
|
};
|
|
396
442
|
|
|
397
|
-
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'> & {
|
|
398
444
|
checked: boolean;
|
|
399
445
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
400
446
|
label: string;
|
|
401
447
|
description?: string;
|
|
402
448
|
fullWidth?: boolean;
|
|
403
|
-
|
|
404
|
-
className?: string;
|
|
405
|
-
classnames?: RadioCardClassnames;
|
|
406
|
-
ref?: Ref<HTMLInputElement>;
|
|
407
|
-
'data-test-id'?: string;
|
|
449
|
+
variant?: RadioCardVariant;
|
|
408
450
|
};
|
|
409
451
|
|
|
410
|
-
export declare type
|
|
411
|
-
|
|
412
|
-
declare type
|
|
413
|
-
container: {
|
|
414
|
-
borderColor: string;
|
|
415
|
-
checked: {
|
|
416
|
-
borderColor: string;
|
|
417
|
-
};
|
|
418
|
-
};
|
|
419
|
-
label: {
|
|
420
|
-
color: string;
|
|
421
|
-
};
|
|
422
|
-
description: {
|
|
423
|
-
color: string;
|
|
424
|
-
};
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
declare type RadioCardTheme = {
|
|
428
|
-
container: {
|
|
429
|
-
backgroundColor: string;
|
|
430
|
-
borderColor: string;
|
|
431
|
-
hover: {
|
|
432
|
-
borderColor: string;
|
|
433
|
-
};
|
|
434
|
-
checked: {
|
|
435
|
-
backgroundColor: string;
|
|
436
|
-
borderColor: string;
|
|
437
|
-
};
|
|
438
|
-
focus: {
|
|
439
|
-
outlineColor: string;
|
|
440
|
-
};
|
|
441
|
-
disabled: {
|
|
442
|
-
backgroundColor: string;
|
|
443
|
-
borderColor: string;
|
|
444
|
-
};
|
|
445
|
-
};
|
|
446
|
-
label: {
|
|
447
|
-
color: string;
|
|
448
|
-
disabled: {
|
|
449
|
-
color: string;
|
|
450
|
-
};
|
|
451
|
-
};
|
|
452
|
-
description: {
|
|
453
|
-
color: string;
|
|
454
|
-
disabled: {
|
|
455
|
-
color: string;
|
|
456
|
-
};
|
|
457
|
-
};
|
|
458
|
-
state: {
|
|
459
|
-
warning: RadioCardStateTheme;
|
|
460
|
-
error: RadioCardStateTheme;
|
|
461
|
-
};
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
export declare type RadioClassnames = {
|
|
465
|
-
container?: string;
|
|
452
|
+
export declare type RadioCardVariant = 'normal' | 'error';
|
|
453
|
+
|
|
454
|
+
export declare type RadioClassNames = {
|
|
466
455
|
input?: string;
|
|
467
|
-
|
|
456
|
+
box?: string;
|
|
468
457
|
dot?: string;
|
|
469
458
|
label?: string;
|
|
470
459
|
};
|
|
471
460
|
|
|
472
|
-
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;
|
|
473
462
|
|
|
474
|
-
export declare type
|
|
475
|
-
container?: string;
|
|
463
|
+
export declare type RadioGroupClassNames = {
|
|
476
464
|
label?: string;
|
|
477
465
|
options?: string;
|
|
478
466
|
radio?: string;
|
|
@@ -483,417 +471,251 @@ export declare type RadioGroupOption = {
|
|
|
483
471
|
value: string;
|
|
484
472
|
};
|
|
485
473
|
|
|
486
|
-
export declare type RadioGroupProps = {
|
|
487
|
-
value: string;
|
|
474
|
+
export declare type RadioGroupProps = VacanoComponentProps<HTMLDivElement, RadioGroupClassNames> & {
|
|
488
475
|
options: RadioGroupOption[];
|
|
476
|
+
value: string | null;
|
|
489
477
|
onChange: (value: string) => void;
|
|
490
478
|
label?: string;
|
|
491
479
|
name?: string;
|
|
492
480
|
disabled?: boolean;
|
|
493
|
-
className?: string;
|
|
494
|
-
classnames?: RadioGroupClassnames;
|
|
495
|
-
'data-test-id'?: string;
|
|
496
481
|
};
|
|
497
482
|
|
|
498
|
-
declare type
|
|
499
|
-
label: {
|
|
500
|
-
color: string;
|
|
501
|
-
};
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
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'> & {
|
|
505
484
|
checked: boolean;
|
|
506
|
-
classnames?: RadioClassnames;
|
|
507
|
-
'data-test-id'?: string;
|
|
508
|
-
label?: string;
|
|
509
485
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
export declare type
|
|
515
|
-
|
|
516
|
-
declare
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
checked: {
|
|
520
|
-
borderColor: string;
|
|
521
|
-
};
|
|
522
|
-
focus: {
|
|
523
|
-
shadowColor: string;
|
|
524
|
-
};
|
|
525
|
-
};
|
|
526
|
-
dot: {
|
|
527
|
-
color: string;
|
|
528
|
-
};
|
|
529
|
-
label: {
|
|
530
|
-
color: string;
|
|
531
|
-
};
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
declare type RadioTheme = {
|
|
535
|
-
circle: {
|
|
536
|
-
borderColor: string;
|
|
537
|
-
checked: {
|
|
538
|
-
borderColor: string;
|
|
539
|
-
};
|
|
540
|
-
focus: {
|
|
541
|
-
shadowColor: string;
|
|
542
|
-
};
|
|
543
|
-
};
|
|
544
|
-
dot: {
|
|
545
|
-
color: string;
|
|
546
|
-
};
|
|
547
|
-
label: {
|
|
548
|
-
color: string;
|
|
549
|
-
};
|
|
550
|
-
state: {
|
|
551
|
-
warning: RadioStateTheme;
|
|
552
|
-
error: RadioStateTheme;
|
|
553
|
-
};
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
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;
|
|
557
|
-
|
|
558
|
-
export declare type SelectClassnames = {
|
|
559
|
-
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 = {
|
|
560
495
|
label?: string;
|
|
561
496
|
trigger?: string;
|
|
562
|
-
|
|
563
|
-
search?: string;
|
|
564
|
-
list?: string;
|
|
497
|
+
dropdown?: string;
|
|
565
498
|
option?: string;
|
|
566
|
-
empty?: string;
|
|
567
499
|
};
|
|
568
500
|
|
|
569
501
|
export declare type SelectOption = {
|
|
570
|
-
label: string;
|
|
571
502
|
value: string;
|
|
503
|
+
label: string;
|
|
504
|
+
disabled?: boolean;
|
|
572
505
|
};
|
|
573
506
|
|
|
574
|
-
export declare type
|
|
575
|
-
|
|
576
|
-
export declare type SelectProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & {
|
|
507
|
+
export declare type SelectProps = VacanoComponentProps<HTMLDivElement, SelectClassNames> & {
|
|
508
|
+
value: string;
|
|
577
509
|
options: SelectOption[];
|
|
578
|
-
value?: string;
|
|
579
510
|
onChange?: (value: string) => void;
|
|
580
|
-
placeholder?: string;
|
|
581
|
-
searchPlaceholder?: string;
|
|
582
|
-
emptyMessage?: string;
|
|
583
511
|
label?: string;
|
|
584
|
-
|
|
585
|
-
|
|
512
|
+
placeholder?: string;
|
|
513
|
+
variant?: SelectVariant;
|
|
514
|
+
size?: VacanoComponentSize;
|
|
586
515
|
disabled?: boolean;
|
|
587
516
|
fullWidth?: boolean;
|
|
588
|
-
placement?: SelectPlacement;
|
|
589
|
-
maxHeight?: number;
|
|
590
|
-
virtualized?: boolean;
|
|
591
|
-
searchable?: boolean;
|
|
592
517
|
portalRenderNode?: HTMLElement | null;
|
|
593
|
-
classnames?: SelectClassnames;
|
|
594
|
-
'data-test-id'?: string;
|
|
595
518
|
};
|
|
596
519
|
|
|
597
|
-
export declare type
|
|
598
|
-
|
|
599
|
-
declare
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
};
|
|
606
|
-
};
|
|
607
|
-
label: {
|
|
608
|
-
color: string;
|
|
609
|
-
};
|
|
610
|
-
value: {
|
|
611
|
-
color: string;
|
|
612
|
-
placeholderColor: string;
|
|
613
|
-
};
|
|
614
|
-
icon: {
|
|
615
|
-
color: string;
|
|
616
|
-
};
|
|
617
|
-
chevron: {
|
|
618
|
-
color: string;
|
|
619
|
-
};
|
|
620
|
-
};
|
|
621
|
-
|
|
622
|
-
declare type SelectTheme = {
|
|
623
|
-
trigger: {
|
|
624
|
-
backgroundColor: string;
|
|
625
|
-
borderColor: string;
|
|
626
|
-
focus: {
|
|
627
|
-
outlineColor: string;
|
|
628
|
-
};
|
|
629
|
-
disabled: {
|
|
630
|
-
backgroundColor: string;
|
|
631
|
-
borderColor: string;
|
|
632
|
-
};
|
|
633
|
-
};
|
|
634
|
-
label: {
|
|
635
|
-
color: string;
|
|
636
|
-
};
|
|
637
|
-
value: {
|
|
638
|
-
color: string;
|
|
639
|
-
placeholderColor: string;
|
|
640
|
-
disabled: {
|
|
641
|
-
color: string;
|
|
642
|
-
};
|
|
643
|
-
};
|
|
644
|
-
icon: {
|
|
645
|
-
color: string;
|
|
646
|
-
disabled: {
|
|
647
|
-
color: string;
|
|
648
|
-
};
|
|
649
|
-
};
|
|
650
|
-
chevron: {
|
|
651
|
-
color: string;
|
|
652
|
-
disabled: {
|
|
653
|
-
color: string;
|
|
654
|
-
};
|
|
655
|
-
};
|
|
656
|
-
content: {
|
|
657
|
-
backgroundColor: string;
|
|
658
|
-
borderColor: string;
|
|
659
|
-
shadow: string;
|
|
660
|
-
};
|
|
661
|
-
option: {
|
|
662
|
-
color: string;
|
|
663
|
-
backgroundColor: string;
|
|
664
|
-
hover: {
|
|
665
|
-
backgroundColor: string;
|
|
666
|
-
};
|
|
667
|
-
selected: {
|
|
668
|
-
backgroundColor: string;
|
|
669
|
-
color: string;
|
|
670
|
-
};
|
|
671
|
-
};
|
|
672
|
-
search: {
|
|
673
|
-
backgroundColor: string;
|
|
674
|
-
borderColor: string;
|
|
675
|
-
color: string;
|
|
676
|
-
placeholderColor: string;
|
|
677
|
-
};
|
|
678
|
-
empty: {
|
|
679
|
-
color: string;
|
|
680
|
-
};
|
|
681
|
-
state: {
|
|
682
|
-
warning: SelectStateTheme;
|
|
683
|
-
error: SelectStateTheme;
|
|
684
|
-
};
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
export declare const Spinner: ({ "aria-label": ariaLabel, className, classnames, size, ...rest }: SpinnerProps) => JSX.Element;
|
|
688
|
-
|
|
689
|
-
export declare type SpinnerClassnames = {
|
|
690
|
-
container?: string;
|
|
691
|
-
};
|
|
692
|
-
|
|
693
|
-
export declare type SpinnerProps = HTMLAttributes<HTMLSpanElement> & {
|
|
520
|
+
export declare type SelectVariant = 'normal' | 'error';
|
|
521
|
+
|
|
522
|
+
export declare const Spinner: ({ "aria-label": ariaLabel, className, ref, size, ...rest }: SpinnerProps) => JSX.Element;
|
|
523
|
+
|
|
524
|
+
export declare type SpinnerClassNames = Record<string, never>;
|
|
525
|
+
|
|
526
|
+
export declare type SpinnerProps = VacanoComponentProps<HTMLDivElement, SpinnerClassNames> & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'children'> & {
|
|
527
|
+
size?: SpinnerSize;
|
|
694
528
|
'aria-label'?: string;
|
|
695
|
-
classnames?: SpinnerClassnames;
|
|
696
|
-
'data-test-id'?: string;
|
|
697
|
-
size?: number;
|
|
698
529
|
};
|
|
699
530
|
|
|
700
|
-
export declare type
|
|
701
|
-
$variant: ButtonVariant;
|
|
702
|
-
$loading?: boolean;
|
|
703
|
-
};
|
|
531
|
+
export declare type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
704
532
|
|
|
705
|
-
export declare
|
|
706
|
-
$variant: ButtonVariant;
|
|
707
|
-
$fullWidth?: boolean;
|
|
708
|
-
$loading?: boolean;
|
|
709
|
-
$iconOnly?: boolean;
|
|
710
|
-
};
|
|
533
|
+
export declare const StatusCard: ({ border, className, classnames, icon, label, ref, shadow, trend, trendVariant, value, ...rest }: StatusCardProps) => JSX.Element;
|
|
711
534
|
|
|
712
|
-
export declare type
|
|
713
|
-
|
|
714
|
-
|
|
535
|
+
export declare type StatusCardClassNames = {
|
|
536
|
+
label?: string;
|
|
537
|
+
value?: string;
|
|
538
|
+
trend?: string;
|
|
715
539
|
};
|
|
716
540
|
|
|
717
|
-
export declare type
|
|
718
|
-
|
|
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;
|
|
719
549
|
};
|
|
720
550
|
|
|
721
|
-
export declare type
|
|
722
|
-
$checked?: boolean;
|
|
723
|
-
$disabled?: boolean;
|
|
724
|
-
$fullWidth?: boolean;
|
|
725
|
-
$state?: CheckboxCardState;
|
|
726
|
-
};
|
|
551
|
+
export declare type StatusCardTrend = 'positive' | 'negative' | 'neutral';
|
|
727
552
|
|
|
728
|
-
export declare type
|
|
729
|
-
|
|
553
|
+
export declare type StepItem = {
|
|
554
|
+
value: string;
|
|
555
|
+
label: string;
|
|
730
556
|
};
|
|
731
557
|
|
|
732
|
-
export declare
|
|
733
|
-
$state?: CheckboxCardState;
|
|
734
|
-
};
|
|
558
|
+
export declare const Stepper: ({ className, classnames, onChange, orientation, ref, steps, value, ...rest }: StepperProps) => JSX.Element;
|
|
735
559
|
|
|
736
|
-
export declare type
|
|
737
|
-
|
|
738
|
-
|
|
560
|
+
export declare type StepperClassNames = {
|
|
561
|
+
step?: string;
|
|
562
|
+
circle?: string;
|
|
563
|
+
label?: string;
|
|
564
|
+
line?: string;
|
|
739
565
|
};
|
|
740
566
|
|
|
741
|
-
export declare type
|
|
742
|
-
$fullWidth?: boolean;
|
|
743
|
-
};
|
|
567
|
+
export declare type StepperOrientation = 'horizontal' | 'vertical';
|
|
744
568
|
|
|
745
|
-
export declare type
|
|
746
|
-
|
|
569
|
+
export declare type StepperProps = VacanoComponentProps<HTMLDivElement, StepperClassNames> & {
|
|
570
|
+
value: string;
|
|
571
|
+
steps: StepItem[];
|
|
572
|
+
onChange?: (value: string) => void;
|
|
573
|
+
orientation?: StepperOrientation;
|
|
747
574
|
};
|
|
748
575
|
|
|
749
|
-
export declare type
|
|
750
|
-
|
|
576
|
+
export declare type TabItem = {
|
|
577
|
+
value: string;
|
|
578
|
+
label: string;
|
|
579
|
+
disabled?: boolean;
|
|
751
580
|
};
|
|
752
581
|
|
|
753
|
-
export declare
|
|
754
|
-
$fullWidth?: boolean;
|
|
755
|
-
};
|
|
582
|
+
export declare const Tabs: ({ className, classnames, onChange, ref, tabs, value, ...rest }: TabsProps) => JSX.Element;
|
|
756
583
|
|
|
757
|
-
export declare type
|
|
758
|
-
|
|
584
|
+
export declare type TabsClassNames = {
|
|
585
|
+
tab?: string;
|
|
759
586
|
};
|
|
760
587
|
|
|
761
|
-
export declare type
|
|
762
|
-
|
|
763
|
-
|
|
588
|
+
export declare type TabsProps = VacanoComponentProps<HTMLDivElement, TabsClassNames> & {
|
|
589
|
+
value: string;
|
|
590
|
+
tabs: TabItem[];
|
|
591
|
+
onChange: (value: string) => void;
|
|
764
592
|
};
|
|
765
593
|
|
|
766
|
-
export declare
|
|
767
|
-
$state?: InputState;
|
|
768
|
-
};
|
|
594
|
+
export declare const Tags: ({ className, classnames, createKey, disabled, emptyMessage, freeSolo, label, onChange, options, placeholder, portalRenderNode, ref, value, variant, ...rest }: TagsProps) => JSX.Element;
|
|
769
595
|
|
|
770
|
-
export declare type
|
|
771
|
-
|
|
772
|
-
|
|
596
|
+
export declare type TagsClassNames = {
|
|
597
|
+
trigger?: string;
|
|
598
|
+
chip?: string;
|
|
599
|
+
input?: string;
|
|
600
|
+
dropdown?: string;
|
|
601
|
+
option?: string;
|
|
602
|
+
empty?: string;
|
|
773
603
|
};
|
|
774
604
|
|
|
775
|
-
export declare type
|
|
776
|
-
$state?: InputState;
|
|
777
|
-
$disabled?: boolean;
|
|
778
|
-
};
|
|
605
|
+
export declare type TagsCreateKey = 'Tab' | 'Enter';
|
|
779
606
|
|
|
780
|
-
export declare type
|
|
781
|
-
|
|
607
|
+
export declare type TagsOption = {
|
|
608
|
+
value: string;
|
|
609
|
+
label: string;
|
|
782
610
|
};
|
|
783
611
|
|
|
784
|
-
export declare type
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
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;
|
|
789
624
|
};
|
|
790
625
|
|
|
791
|
-
export declare type
|
|
792
|
-
$state?: RadioCardState;
|
|
793
|
-
};
|
|
626
|
+
export declare type TagsVariant = 'normal' | 'error';
|
|
794
627
|
|
|
795
|
-
export declare type
|
|
796
|
-
|
|
628
|
+
export declare type Toast = {
|
|
629
|
+
id: string;
|
|
630
|
+
message: string;
|
|
631
|
+
variant: ToastVariant;
|
|
632
|
+
duration?: number;
|
|
797
633
|
};
|
|
798
634
|
|
|
799
|
-
export declare type
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
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';
|
|
803
643
|
};
|
|
804
644
|
|
|
805
|
-
export declare type
|
|
806
|
-
|
|
645
|
+
export declare type ToastContainerProps = {
|
|
646
|
+
toasts: Toast[];
|
|
647
|
+
queueCount: number;
|
|
648
|
+
removeToast: (id: string) => void;
|
|
807
649
|
};
|
|
808
650
|
|
|
809
|
-
export declare type
|
|
810
|
-
|
|
811
|
-
|
|
651
|
+
export declare type ToastContextValue = {
|
|
652
|
+
addToast: (message: string, variant?: ToastVariant, duration?: number) => void;
|
|
653
|
+
removeToast: (id: string) => void;
|
|
812
654
|
};
|
|
813
655
|
|
|
814
|
-
export declare type
|
|
815
|
-
|
|
816
|
-
|
|
656
|
+
export declare type ToastItemProps = {
|
|
657
|
+
toast: Toast;
|
|
658
|
+
onRemove: (id: string) => void;
|
|
817
659
|
};
|
|
818
660
|
|
|
819
|
-
export declare
|
|
820
|
-
$state?: SelectState;
|
|
821
|
-
};
|
|
661
|
+
export declare const ToastProvider: ({ children }: PropsWithChildren) => JSX.Element;
|
|
822
662
|
|
|
823
|
-
export declare type
|
|
824
|
-
|
|
825
|
-
|
|
663
|
+
export declare type ToastState = {
|
|
664
|
+
toasts: Toast[];
|
|
665
|
+
queue: Toast[];
|
|
826
666
|
};
|
|
827
667
|
|
|
828
|
-
export declare type
|
|
829
|
-
$state?: SelectState;
|
|
830
|
-
$disabled?: boolean;
|
|
831
|
-
$isOpen?: boolean;
|
|
832
|
-
};
|
|
668
|
+
export declare type ToastVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
833
669
|
|
|
834
|
-
export declare
|
|
835
|
-
$isPlaceholder?: boolean;
|
|
836
|
-
$state?: SelectState;
|
|
837
|
-
$disabled?: boolean;
|
|
838
|
-
};
|
|
670
|
+
export declare const Tooltip: ({ children, className, classnames, content, delay, placement, portalRenderNode, ref, variant, ...rest }: TooltipProps) => JSX.Element;
|
|
839
671
|
|
|
840
|
-
export declare type
|
|
841
|
-
|
|
672
|
+
export declare type TooltipClassNames = {
|
|
673
|
+
content?: string;
|
|
842
674
|
};
|
|
843
675
|
|
|
844
|
-
export declare type
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
backgroundColor: {
|
|
854
|
-
default: string;
|
|
855
|
-
neutral: string;
|
|
856
|
-
success: string;
|
|
857
|
-
warning: string;
|
|
858
|
-
error: string;
|
|
859
|
-
};
|
|
860
|
-
};
|
|
861
|
-
button: {
|
|
862
|
-
primary: ButtonVariantTheme;
|
|
863
|
-
secondary: ButtonVariantTheme;
|
|
864
|
-
ghost: ButtonVariantTheme;
|
|
865
|
-
danger: ButtonVariantTheme;
|
|
866
|
-
};
|
|
867
|
-
checkbox: CheckboxTheme;
|
|
868
|
-
checkboxCard: CheckboxCardTheme;
|
|
869
|
-
checkboxGroup: CheckboxGroupTheme;
|
|
870
|
-
input: InputTheme;
|
|
871
|
-
radio: RadioTheme;
|
|
872
|
-
radioCard: RadioCardTheme;
|
|
873
|
-
radioGroup: RadioGroupTheme;
|
|
874
|
-
dropdown: DropdownTheme;
|
|
875
|
-
select: SelectTheme;
|
|
676
|
+
export declare type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
677
|
+
|
|
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;
|
|
876
685
|
};
|
|
877
686
|
|
|
878
|
-
export declare
|
|
879
|
-
theme: Theme;
|
|
880
|
-
mode: ThemeMode;
|
|
881
|
-
setMode: (mode: ThemeMode) => void;
|
|
882
|
-
}
|
|
687
|
+
export declare type TooltipVariant = 'dark' | 'light' | 'success' | 'warning' | 'danger';
|
|
883
688
|
|
|
884
|
-
export declare const
|
|
689
|
+
export declare const useImageCropper: (options?: UseImageCropperOptions) => UseImageCropperReturn;
|
|
885
690
|
|
|
886
|
-
export declare
|
|
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;
|
|
702
|
+
};
|
|
887
703
|
|
|
888
|
-
export declare type
|
|
704
|
+
export declare type UseImageCropperReturn = {
|
|
705
|
+
open: () => void;
|
|
706
|
+
};
|
|
889
707
|
|
|
890
|
-
export declare
|
|
708
|
+
export declare const useToast: () => ToastContextValue;
|
|
891
709
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
710
|
+
declare type VacanoComponentClassNames<T> = T;
|
|
711
|
+
|
|
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>;
|
|
717
|
+
};
|
|
896
718
|
|
|
897
|
-
|
|
719
|
+
declare type VacanoComponentSize = 'compact' | 'default';
|
|
898
720
|
|
|
899
721
|
export { }
|