@zvoove/unity-ui 2.19.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/README.md +175 -0
- package/dist/theme.css +586 -0
- package/dist/unity-ui.cjs.js +1 -0
- package/dist/unity-ui.css +1 -0
- package/dist/unity-ui.d.ts +3705 -0
- package/dist/unity-ui.es.js +2018 -0
- package/package.json +116 -0
|
@@ -0,0 +1,3705 @@
|
|
|
1
|
+
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { Dispatch } from 'react';
|
|
4
|
+
import { ForwardedRef } from 'react';
|
|
5
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
6
|
+
import { Icon as Icon_2 } from '@phosphor-icons/react';
|
|
7
|
+
import { IconWeight } from '@phosphor-icons/react';
|
|
8
|
+
import { JSX } from 'react/jsx-runtime';
|
|
9
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
10
|
+
import { PropsWithChildren } from 'react';
|
|
11
|
+
import { ReactNode } from 'react';
|
|
12
|
+
import { ReactPortal } from 'react';
|
|
13
|
+
import { RefAttributes } from 'react';
|
|
14
|
+
import { RefObject } from 'react';
|
|
15
|
+
import { SetStateAction } from 'react';
|
|
16
|
+
|
|
17
|
+
export declare const Accordion: {
|
|
18
|
+
<T extends readonly AccordionItem[]>({ items, onToggle, openItems, allowMultipleOpenItems, }: AccordionProps<T>): JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export declare interface AccordionItem {
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
supportingText?: string;
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
isOpen?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export declare type AccordionItemId<T extends readonly AccordionItem[]> = T[number]['id'];
|
|
32
|
+
|
|
33
|
+
export declare interface AccordionProps<T extends readonly AccordionItem[] = readonly AccordionItem[]> {
|
|
34
|
+
/**
|
|
35
|
+
* The children of the Accordion.
|
|
36
|
+
*/
|
|
37
|
+
items: AccordionItem[];
|
|
38
|
+
/**
|
|
39
|
+
* The open items of the Accordion. By default, all items are closed. <br />
|
|
40
|
+
* The ids must match the `id` of the item. <br />
|
|
41
|
+
* When allowMultipleOpenItems is false, this should be a single id or undefined. <br />
|
|
42
|
+
* When allowMultipleOpenItems is true, this can be an array of ids or undefined.
|
|
43
|
+
*/
|
|
44
|
+
openItems?: AccordionItemId<T> | AccordionItemId<T>[];
|
|
45
|
+
/**
|
|
46
|
+
* Callback when the accordion header is clicked <br />
|
|
47
|
+
* If provided, this will override the default behavior and you need to manage the open items yourself.
|
|
48
|
+
*/
|
|
49
|
+
onToggle?: (item: AccordionItem) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Whether to allow multiple open items or not.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
allowMultipleOpenItems?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const align: {
|
|
58
|
+
readonly LEFT: "left";
|
|
59
|
+
readonly CENTER: "center";
|
|
60
|
+
readonly RIGHT: "right";
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export declare type AlignItems = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline';
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Types of announcements that can be made to screen readers.
|
|
67
|
+
*/
|
|
68
|
+
export declare type AnnouncementType = 'added' | 'removed' | 'cleared' | 'component-error' | 'count-changed';
|
|
69
|
+
|
|
70
|
+
export declare const Avatar: ({ size, type, name, image, initialsAmount, variant, }: AvatarProps) => JSX.Element;
|
|
71
|
+
|
|
72
|
+
declare const AVATAR_SIZES: {
|
|
73
|
+
readonly SMALL: "small";
|
|
74
|
+
readonly MEDIUM: "medium";
|
|
75
|
+
readonly LARGE: "large";
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export declare const AvatarGroup: ({ children, maxLength, total }: AvatarGroupProps) => JSX.Element;
|
|
79
|
+
|
|
80
|
+
export declare interface AvatarGroupProps {
|
|
81
|
+
/**
|
|
82
|
+
* The children of the button.
|
|
83
|
+
*/
|
|
84
|
+
children: ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Maximum number of avatars to display before showing a count
|
|
87
|
+
*/
|
|
88
|
+
maxLength?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Total number of avatars in the group
|
|
91
|
+
*/
|
|
92
|
+
total?: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
96
|
+
/**
|
|
97
|
+
* The size of the avatar
|
|
98
|
+
* @default 'large'
|
|
99
|
+
*/
|
|
100
|
+
size?: ResponsiveType<AvatarSize>;
|
|
101
|
+
/**
|
|
102
|
+
* The type of the avatar
|
|
103
|
+
*/
|
|
104
|
+
type?: 'initials' | 'check' | 'avatar' | 'image';
|
|
105
|
+
/**
|
|
106
|
+
* The image of the avatar
|
|
107
|
+
*/
|
|
108
|
+
image?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The name of the avatar
|
|
111
|
+
*/
|
|
112
|
+
name?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The amount of initials of the avatar
|
|
115
|
+
*/
|
|
116
|
+
initialsAmount?: 1 | 2;
|
|
117
|
+
/**
|
|
118
|
+
* The variant of the avatar
|
|
119
|
+
*/
|
|
120
|
+
variant?: 'round' | 'square';
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare type AvatarSize = (typeof AVATAR_SIZES)[keyof typeof AVATAR_SIZES];
|
|
124
|
+
|
|
125
|
+
declare type AxisVariant = 'X' | 'Y';
|
|
126
|
+
|
|
127
|
+
export declare type BackgroundColors = 'background' | 'primary' | 'primary-hover' | 'primary-active' | 'secondary' | 'tertiary' | 'primary-container' | 'secondary-container' | 'tertiary-container' | 'tertiary-container-hover' | 'tertiary-container-active' | 'primary-fixed' | 'primary-fixed-dim' | 'secondary-fixed' | 'secondary-fixed-dim' | 'tertiary-fixed' | 'tertiary-fixed-dim' | 'surface' | 'surface-bright' | 'surface-dim' | 'surface-variant' | 'surface-container-lowest' | 'surface-container-low' | 'surface-container' | 'surface-container-high' | 'surface-container-highest' | 'error' | 'error-container' | 'inverse-surface' | 'inverse-on-surface' | 'inverse-primary' | 'scrim' | 'yellow' | 'dark-yellow' | 'yellow-container' | 'green' | 'dark-green' | 'green-container' | 'pink' | 'dark-pink' | 'pink-container' | 'steel-blue' | 'dark-steel-blue' | 'steel-blue-container';
|
|
128
|
+
|
|
129
|
+
export declare const Badge: ({ children, variant, content, dot, }: BadgeProps) => JSX.Element;
|
|
130
|
+
|
|
131
|
+
export declare interface BadgeProps {
|
|
132
|
+
/**
|
|
133
|
+
* The children of the button.
|
|
134
|
+
*/
|
|
135
|
+
children: ReactNode;
|
|
136
|
+
/**
|
|
137
|
+
* The variant of the component
|
|
138
|
+
*/
|
|
139
|
+
variant?: 'primary' | 'secondary';
|
|
140
|
+
/**
|
|
141
|
+
* The content of the badge. If undefined, the badge will be hidden.
|
|
142
|
+
*/
|
|
143
|
+
content?: ReactNode;
|
|
144
|
+
/**
|
|
145
|
+
* The dot prop changes a badge into a small dot
|
|
146
|
+
*/
|
|
147
|
+
dot?: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare const Breadcrumbs: <T extends default_2.ElementType = "a">({ items, linkComponent: LinkComponent, }: BreadcrumbsProps<T>) => JSX.Element;
|
|
151
|
+
|
|
152
|
+
export declare type BreadcrumbsItem<T extends React.ElementType = 'a'> = {
|
|
153
|
+
label: string;
|
|
154
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
155
|
+
|
|
156
|
+
export declare type BreadcrumbsProps<T extends React.ElementType = 'a'> = {
|
|
157
|
+
/**
|
|
158
|
+
* The items of the component. <br />
|
|
159
|
+
* The items are displayed in the order they are passed. <br />
|
|
160
|
+
* `type BreadcrumbsItem = { label: string; href: string; onItemClick?: () => void; }`
|
|
161
|
+
*/
|
|
162
|
+
items: BreadcrumbsItem<T>[];
|
|
163
|
+
/**
|
|
164
|
+
* The component to render for the link
|
|
165
|
+
* @default 'a'
|
|
166
|
+
*/
|
|
167
|
+
linkComponent?: T | 'a';
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
declare const BREAKPOINTS: {
|
|
171
|
+
readonly minimum: 0;
|
|
172
|
+
readonly mobile: 768;
|
|
173
|
+
readonly tablet: 1024;
|
|
174
|
+
readonly laptop: 1280;
|
|
175
|
+
readonly desktop: 1536;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export declare const Button: {
|
|
179
|
+
<T extends React.ElementType = "button">({ children, variant, hideLabel, as, icon, linkComponent, size, isLoading, ...props }: ButtonProps<T> & {
|
|
180
|
+
ref?: ForwardedRef<T>;
|
|
181
|
+
}): JSX.Element;
|
|
182
|
+
displayName: string;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export declare type ButtonProps<T extends React.ElementType = 'button'> = UnionAs & {
|
|
186
|
+
/**
|
|
187
|
+
* The children of the button.
|
|
188
|
+
*/
|
|
189
|
+
children?: ReactNode;
|
|
190
|
+
/**
|
|
191
|
+
* The size of the button.
|
|
192
|
+
*/
|
|
193
|
+
size?: ResponsiveType<'sm' | 'md' | 'lg'>;
|
|
194
|
+
/**
|
|
195
|
+
* The icon of the button.
|
|
196
|
+
*/
|
|
197
|
+
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
198
|
+
/**
|
|
199
|
+
* Hide the label of the button. <br />
|
|
200
|
+
* Only works if `icon` is provided.
|
|
201
|
+
*/
|
|
202
|
+
hideLabel?: ResponsiveType<boolean>;
|
|
203
|
+
/**
|
|
204
|
+
* Handle click events.
|
|
205
|
+
*/
|
|
206
|
+
onClick?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
207
|
+
/**
|
|
208
|
+
* The variant is used
|
|
209
|
+
* to change the visual communication.
|
|
210
|
+
*/
|
|
211
|
+
variant?: ResponsiveType<'text' | 'textSecondary' | 'filled' | 'outlined' | 'elevated' | 'tonal' | 'linkPrimary' | 'linkSecondary' | 'positive' | 'negative'>;
|
|
212
|
+
/**
|
|
213
|
+
* The component to render the button as. <br />
|
|
214
|
+
* This is useful if you want to use a different component for the button like a `Link` component from **Next.js** or **React Router**.
|
|
215
|
+
*/
|
|
216
|
+
linkComponent?: T;
|
|
217
|
+
/**
|
|
218
|
+
* The ref of the button.
|
|
219
|
+
*/
|
|
220
|
+
ref?: ForwardedRef<T>;
|
|
221
|
+
/**
|
|
222
|
+
* Whether the button is loading.
|
|
223
|
+
*/
|
|
224
|
+
isLoading?: boolean;
|
|
225
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
226
|
+
|
|
227
|
+
export declare type ButtonsTranslations = {
|
|
228
|
+
cancel?: string;
|
|
229
|
+
clear?: string;
|
|
230
|
+
ok?: string;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
|
|
234
|
+
|
|
235
|
+
export declare interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
236
|
+
/**
|
|
237
|
+
* The content of the card.
|
|
238
|
+
*/
|
|
239
|
+
children: ReactNode;
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated Use the `height`, `width`, `minHeight`, `maxHeight`, `minWidth`, `maxWidth` props instead.
|
|
242
|
+
*/
|
|
243
|
+
className?: string;
|
|
244
|
+
/**
|
|
245
|
+
* The height of the card.
|
|
246
|
+
* @default 'auto'
|
|
247
|
+
*/
|
|
248
|
+
height?: ResponsiveType<number | string>;
|
|
249
|
+
/**
|
|
250
|
+
* The width of the card.
|
|
251
|
+
* @default '100%'
|
|
252
|
+
*/
|
|
253
|
+
width?: ResponsiveType<number | string>;
|
|
254
|
+
/**
|
|
255
|
+
* The min height of the card.
|
|
256
|
+
* @default 'auto'
|
|
257
|
+
*/
|
|
258
|
+
minHeight?: ResponsiveType<number | string>;
|
|
259
|
+
/**
|
|
260
|
+
* The max height of the card.
|
|
261
|
+
* @default 'auto'
|
|
262
|
+
*/
|
|
263
|
+
maxHeight?: ResponsiveType<number | string>;
|
|
264
|
+
/**
|
|
265
|
+
* The min width of the card.
|
|
266
|
+
* @default 'auto'
|
|
267
|
+
*/
|
|
268
|
+
minWidth?: ResponsiveType<number | string>;
|
|
269
|
+
/**
|
|
270
|
+
* The max width of the card.
|
|
271
|
+
* @default 'auto'
|
|
272
|
+
*/
|
|
273
|
+
maxWidth?: ResponsiveType<number | string>;
|
|
274
|
+
/**
|
|
275
|
+
* The border radius of the card.
|
|
276
|
+
*/
|
|
277
|
+
borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
278
|
+
/**
|
|
279
|
+
* The padding of the card.
|
|
280
|
+
*/
|
|
281
|
+
padding?: ResponsiveType<Padding>;
|
|
282
|
+
/**
|
|
283
|
+
* The margin of the card.
|
|
284
|
+
*/
|
|
285
|
+
margin?: ResponsiveType<Margin>;
|
|
286
|
+
/**
|
|
287
|
+
* The elevation/shadow of the card.
|
|
288
|
+
*/
|
|
289
|
+
elevation?: 0 | 1 | 2 | 3 | 4 | 5;
|
|
290
|
+
/**
|
|
291
|
+
* The variant of the card.
|
|
292
|
+
*/
|
|
293
|
+
variant?: 'outlined' | 'filled';
|
|
294
|
+
/**
|
|
295
|
+
* The overflow of the card.
|
|
296
|
+
*/
|
|
297
|
+
overflow?: ResponsiveType<Overflow>;
|
|
298
|
+
/**
|
|
299
|
+
* The background color of the card.
|
|
300
|
+
*/
|
|
301
|
+
bgColor?: BackgroundColors;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Event emitted when files are changed (added, removed, replaced, or cleared).
|
|
306
|
+
*/
|
|
307
|
+
export declare interface ChangeEvent {
|
|
308
|
+
/**
|
|
309
|
+
* The type of change that occurred.
|
|
310
|
+
*/
|
|
311
|
+
action: 'add' | 'remove' | 'replace' | 'clear';
|
|
312
|
+
/**
|
|
313
|
+
* Files that were added in this action.
|
|
314
|
+
* Present when action is 'add' or 'replace'.
|
|
315
|
+
*/
|
|
316
|
+
addedFiles?: FileItem[];
|
|
317
|
+
/**
|
|
318
|
+
* Files that were removed in this action.
|
|
319
|
+
* Present when action is 'remove'.
|
|
320
|
+
*/
|
|
321
|
+
removedFiles?: FileItem[];
|
|
322
|
+
/**
|
|
323
|
+
* The complete list of files after the change.
|
|
324
|
+
*/
|
|
325
|
+
allFiles: FileItem[];
|
|
326
|
+
/**
|
|
327
|
+
* Component-level error if one occurred during the action.
|
|
328
|
+
*/
|
|
329
|
+
componentError?: {
|
|
330
|
+
code: COMPONENT_ERROR;
|
|
331
|
+
message: string;
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export declare const Checkbox: ({ checked, name, id, disabled, error, indeterminate, value, label, onChange, }: CheckboxProps) => JSX.Element;
|
|
336
|
+
|
|
337
|
+
export declare interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
338
|
+
/**
|
|
339
|
+
* Handle change events.
|
|
340
|
+
*/
|
|
341
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
342
|
+
/**
|
|
343
|
+
* Handle the label of the checkbox.
|
|
344
|
+
*/
|
|
345
|
+
label: ReactNode;
|
|
346
|
+
/**
|
|
347
|
+
* Handle the name of the checkbox.
|
|
348
|
+
*/
|
|
349
|
+
name?: string;
|
|
350
|
+
/**
|
|
351
|
+
* Handle the id of the checkbox.
|
|
352
|
+
* @default auto-generated
|
|
353
|
+
*/
|
|
354
|
+
id?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Handle the value of the checkbox.
|
|
357
|
+
*/
|
|
358
|
+
value?: string;
|
|
359
|
+
/**
|
|
360
|
+
* Handle if the checkbox is checked.
|
|
361
|
+
*/
|
|
362
|
+
checked?: boolean;
|
|
363
|
+
/**
|
|
364
|
+
* Handle if the checkbox is disabled.
|
|
365
|
+
*/
|
|
366
|
+
disabled?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Handle if the checkbox has an error.
|
|
369
|
+
*/
|
|
370
|
+
error?: boolean;
|
|
371
|
+
/**
|
|
372
|
+
* Handle if the checkbox has an indeterminate state.
|
|
373
|
+
*/
|
|
374
|
+
indeterminate?: boolean;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export declare const Chip: default_2.ForwardRefExoticComponent<ChipProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
378
|
+
|
|
379
|
+
export declare type ChipProps = ChipPropsTypeIcon & {
|
|
380
|
+
/**
|
|
381
|
+
* The children of the button.
|
|
382
|
+
*/
|
|
383
|
+
label: string;
|
|
384
|
+
/**
|
|
385
|
+
* The variant of the component
|
|
386
|
+
*/
|
|
387
|
+
variant?: 'primary' | 'secondary' | 'pending' | 'confirmed' | 'rejected' | 'skipped';
|
|
388
|
+
/**
|
|
389
|
+
* The drop shadow of the component
|
|
390
|
+
*/
|
|
391
|
+
elevated?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Whether the component is readonly or not. <br />
|
|
394
|
+
* This is used for `choice` chips.
|
|
395
|
+
*/
|
|
396
|
+
readonly?: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* Whether the component is disabled or not.
|
|
399
|
+
*/
|
|
400
|
+
disabled?: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* The size of the component
|
|
403
|
+
*/
|
|
404
|
+
size?: 'medium' | 'large';
|
|
405
|
+
/**
|
|
406
|
+
* The action to perform when the delete button is clicked.
|
|
407
|
+
* This is used only for `input` type chips.
|
|
408
|
+
*/
|
|
409
|
+
onDelete?: () => void;
|
|
410
|
+
/**
|
|
411
|
+
* The action to perform when the chip is clicked.
|
|
412
|
+
* This is used only for `filter` and 'choice' type chips.
|
|
413
|
+
*/
|
|
414
|
+
onToggleOpen?: () => void;
|
|
415
|
+
/**
|
|
416
|
+
* Whether to show the dropdown icon or not.
|
|
417
|
+
* This is used only for `filter` and 'choice' type chips.
|
|
418
|
+
* @default true
|
|
419
|
+
*/
|
|
420
|
+
showDropdownIcon?: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* The number of lines to truncate the text.
|
|
423
|
+
* @default undefined
|
|
424
|
+
*/
|
|
425
|
+
truncate?: TypographyProps['truncate'];
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
declare type ChipPropsTypeIcon = {
|
|
429
|
+
/**
|
|
430
|
+
* The type of the component
|
|
431
|
+
*/
|
|
432
|
+
type?: 'input' | 'filter' | 'assistive' | 'suggestion';
|
|
433
|
+
/**
|
|
434
|
+
* The icon to show on the left side of the button.
|
|
435
|
+
*/
|
|
436
|
+
icon?: CommonIconNames;
|
|
437
|
+
} | {
|
|
438
|
+
type?: 'choice';
|
|
439
|
+
icon?: never;
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
export declare const CodeBlock: {
|
|
443
|
+
({ code, filename, ...props }: CodeBlockProps): JSX.Element;
|
|
444
|
+
displayName: string;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export declare interface CodeBlockProps extends React.HTMLAttributes<HTMLPreElement> {
|
|
448
|
+
/**
|
|
449
|
+
* The source code to display.
|
|
450
|
+
*/
|
|
451
|
+
code: string;
|
|
452
|
+
/**
|
|
453
|
+
* Optional filename shown in the header bar.
|
|
454
|
+
*/
|
|
455
|
+
filename?: string;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export declare type ColumnAlign = (typeof align)[keyof typeof align];
|
|
459
|
+
|
|
460
|
+
export declare type ColumnId<T extends readonly TableColumnProps[]> = T[number]['id'];
|
|
461
|
+
|
|
462
|
+
export declare type CommonIconNames = keyof typeof commonIconsMap;
|
|
463
|
+
|
|
464
|
+
export declare const commonIconsMap: {
|
|
465
|
+
readonly add: Icon_2;
|
|
466
|
+
readonly 'add-circle': Icon_2;
|
|
467
|
+
readonly 'add-file': Icon_2;
|
|
468
|
+
readonly agent: Icon_2;
|
|
469
|
+
readonly airplane: Icon_2;
|
|
470
|
+
readonly archive: Icon_2;
|
|
471
|
+
readonly 'arrow-back': Icon_2;
|
|
472
|
+
readonly 'arrow-bend': Icon_2;
|
|
473
|
+
readonly 'arrow-down': Icon_2;
|
|
474
|
+
readonly 'arrow-forward': Icon_2;
|
|
475
|
+
readonly 'arrow-left-right': Icon_2;
|
|
476
|
+
readonly 'arrow-up': Icon_2;
|
|
477
|
+
readonly article: Icon_2;
|
|
478
|
+
readonly automate: Icon_2;
|
|
479
|
+
readonly backspace: Icon_2;
|
|
480
|
+
readonly bank: Icon_2;
|
|
481
|
+
readonly bicycle: Icon_2;
|
|
482
|
+
readonly billing: Icon_2;
|
|
483
|
+
readonly binoculars: Icon_2;
|
|
484
|
+
readonly break: Icon_2;
|
|
485
|
+
readonly bus: Icon_2;
|
|
486
|
+
readonly calendar: Icon_2;
|
|
487
|
+
readonly 'calendar-blank': Icon_2;
|
|
488
|
+
readonly 'calendar-check': Icon_2;
|
|
489
|
+
readonly 'calendar-dot': Icon_2;
|
|
490
|
+
readonly 'calendar-x': Icon_2;
|
|
491
|
+
readonly camera: Icon_2;
|
|
492
|
+
readonly car: Icon_2;
|
|
493
|
+
readonly cart: Icon_2;
|
|
494
|
+
readonly 'cash-money': Icon_2;
|
|
495
|
+
readonly certificate: Icon_2;
|
|
496
|
+
readonly 'chat-bubble': Icon_2;
|
|
497
|
+
readonly chats: Icon_2;
|
|
498
|
+
readonly check: Icon_2;
|
|
499
|
+
readonly 'check-circle': Icon_2;
|
|
500
|
+
readonly checkbox: Icon_2;
|
|
501
|
+
readonly 'checkbox-empty': Icon_2;
|
|
502
|
+
readonly 'checkbox-indefinitely': Icon_2;
|
|
503
|
+
readonly checks: Icon_2;
|
|
504
|
+
readonly 'chevron-down': Icon_2;
|
|
505
|
+
readonly 'chevron-left': Icon_2;
|
|
506
|
+
readonly 'chevron-right': Icon_2;
|
|
507
|
+
readonly 'chevron-up': Icon_2;
|
|
508
|
+
readonly 'circle-notch': Icon_2;
|
|
509
|
+
readonly close: Icon_2;
|
|
510
|
+
readonly 'close-circle': Icon_2;
|
|
511
|
+
readonly 'cloud-download': Icon_2;
|
|
512
|
+
readonly 'cloud-upload': Icon_2;
|
|
513
|
+
readonly 'clock-countdown': Icon_2;
|
|
514
|
+
readonly 'clock-person': Icon_2;
|
|
515
|
+
readonly columns: Icon_2;
|
|
516
|
+
readonly copy: Icon_2;
|
|
517
|
+
readonly 'dark-mode': Icon_2;
|
|
518
|
+
readonly deactivate: Icon_2;
|
|
519
|
+
readonly delete: Icon_2;
|
|
520
|
+
readonly 'diagram-view': Icon_2;
|
|
521
|
+
readonly download: Icon_2;
|
|
522
|
+
readonly drag: Icon_2;
|
|
523
|
+
readonly edit: Icon_2;
|
|
524
|
+
readonly error: Icon_2;
|
|
525
|
+
readonly 'exclamation-mark': Icon_2;
|
|
526
|
+
readonly expand: Icon_2;
|
|
527
|
+
readonly expenses: Icon_2;
|
|
528
|
+
readonly 'face-id': Icon_2;
|
|
529
|
+
readonly file: Icon_2;
|
|
530
|
+
readonly filter: Icon_2;
|
|
531
|
+
readonly filters: Icon_2;
|
|
532
|
+
readonly 'first-page': Icon_2;
|
|
533
|
+
readonly folder: Icon_2;
|
|
534
|
+
readonly 'grid-view': Icon_2;
|
|
535
|
+
readonly 'hard-hat': Icon_2;
|
|
536
|
+
readonly help: Icon_2;
|
|
537
|
+
readonly hide: Icon_2;
|
|
538
|
+
readonly home: Icon_2;
|
|
539
|
+
readonly images: Icon_2;
|
|
540
|
+
readonly info: Icon_2;
|
|
541
|
+
readonly invoice: Icon_2;
|
|
542
|
+
readonly job: Icon_2;
|
|
543
|
+
readonly keyboard: Icon_2;
|
|
544
|
+
readonly knowledge: Icon_2;
|
|
545
|
+
readonly language: Icon_2;
|
|
546
|
+
readonly 'last-page': Icon_2;
|
|
547
|
+
readonly 'light-mode': Icon_2;
|
|
548
|
+
readonly 'list-view': Icon_2;
|
|
549
|
+
readonly location: Icon_2;
|
|
550
|
+
readonly 'location-pin': Icon_2;
|
|
551
|
+
readonly lock: Icon_2;
|
|
552
|
+
readonly menu: Icon_2;
|
|
553
|
+
readonly metadata: Icon_2;
|
|
554
|
+
readonly microphone: Icon_2;
|
|
555
|
+
readonly minus: Icon_2;
|
|
556
|
+
readonly 'more-horizontal': Icon_2;
|
|
557
|
+
readonly 'more-vertical': Icon_2;
|
|
558
|
+
readonly moped: Icon_2;
|
|
559
|
+
readonly 'navigation-arrow': Icon_2;
|
|
560
|
+
readonly notifications: Icon_2;
|
|
561
|
+
readonly note: Icon_2;
|
|
562
|
+
readonly numpad: Icon_2;
|
|
563
|
+
readonly 'open-in-new-tab': Icon_2;
|
|
564
|
+
readonly order: Icon_2;
|
|
565
|
+
readonly organization: Icon_2;
|
|
566
|
+
readonly pause: Icon_2;
|
|
567
|
+
readonly attachment: Icon_2;
|
|
568
|
+
readonly phone: Icon_2;
|
|
569
|
+
readonly 'piggy-bank': Icon_2;
|
|
570
|
+
readonly plant: Icon_2;
|
|
571
|
+
readonly printer: Icon_2;
|
|
572
|
+
readonly privacy: Icon_2;
|
|
573
|
+
readonly 'qr-code': Icon_2;
|
|
574
|
+
readonly refresh: Icon_2;
|
|
575
|
+
readonly remark: Icon_2;
|
|
576
|
+
readonly save: Icon_2;
|
|
577
|
+
readonly search: Icon_2;
|
|
578
|
+
readonly 'send-message': Icon_2;
|
|
579
|
+
readonly settings: Icon_2;
|
|
580
|
+
readonly 'setup-time': Icon_2;
|
|
581
|
+
readonly shapes: Icon_2;
|
|
582
|
+
readonly show: Icon_2;
|
|
583
|
+
readonly sidebar: Icon_2;
|
|
584
|
+
readonly signature: Icon_2;
|
|
585
|
+
readonly 'sign-out': Icon_2;
|
|
586
|
+
readonly 'skip-forward': Icon_2;
|
|
587
|
+
readonly smartphone: Icon_2;
|
|
588
|
+
readonly sparkle: Icon_2;
|
|
589
|
+
readonly star: Icon_2;
|
|
590
|
+
readonly start: Icon_2;
|
|
591
|
+
readonly stop: Icon_2;
|
|
592
|
+
readonly sick: Icon_2;
|
|
593
|
+
readonly table: Icon_2;
|
|
594
|
+
readonly taxi: Icon_2;
|
|
595
|
+
readonly 'text-align-center': Icon_2;
|
|
596
|
+
readonly 'text-align-justify': Icon_2;
|
|
597
|
+
readonly 'text-align-left': Icon_2;
|
|
598
|
+
readonly 'text-align-right': Icon_2;
|
|
599
|
+
readonly 'text-t': Icon_2;
|
|
600
|
+
readonly notches: Icon_2;
|
|
601
|
+
readonly time: Icon_2;
|
|
602
|
+
readonly timer: Icon_2;
|
|
603
|
+
readonly 'time-sheet-download': Icon_2;
|
|
604
|
+
readonly 'time-sheet-upload': Icon_2;
|
|
605
|
+
readonly train: Icon_2;
|
|
606
|
+
readonly translate: Icon_2;
|
|
607
|
+
readonly travel: Icon_2;
|
|
608
|
+
readonly unfold: Icon_2;
|
|
609
|
+
readonly user: Icon_2;
|
|
610
|
+
readonly upload: Icon_2;
|
|
611
|
+
readonly 'user-account': Icon_2;
|
|
612
|
+
readonly users: Icon_2;
|
|
613
|
+
readonly vacation: Icon_2;
|
|
614
|
+
readonly wallet: Icon_2;
|
|
615
|
+
readonly warning: Icon_2;
|
|
616
|
+
readonly wrench: Icon_2;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Error types that affect the component as a whole.
|
|
621
|
+
*/
|
|
622
|
+
export declare enum COMPONENT_ERROR {
|
|
623
|
+
/** Total size of all files exceeds maxTotalSize. */
|
|
624
|
+
TOTAL_SIZE_EXCEEDED = "total-size-exceeded",
|
|
625
|
+
/** Number of files exceeds maxCount. */
|
|
626
|
+
MAX_COUNT_EXCEEDED = "max-count-exceeded",
|
|
627
|
+
/** Number of files is below minCount. */
|
|
628
|
+
MIN_COUNT_NOT_MET = "min-count-not-met",
|
|
629
|
+
/** A duplicate file was detected. */
|
|
630
|
+
DUPLICATE_FILE = "duplicate-file"
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export declare const ConfirmationCard: {
|
|
634
|
+
({ title, children, variant, icon, actions, status, statusLabel, }: ConfirmationCardProps): JSX.Element;
|
|
635
|
+
displayName: string;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
export declare interface ConfirmationCardAction {
|
|
639
|
+
/**
|
|
640
|
+
* The label of the action button.
|
|
641
|
+
*/
|
|
642
|
+
label: string;
|
|
643
|
+
/**
|
|
644
|
+
* Callback fired when the action button is clicked.
|
|
645
|
+
*/
|
|
646
|
+
onClick?: (event: MouseEvent_2<HTMLElement>) => void;
|
|
647
|
+
/**
|
|
648
|
+
* The visual variant of the button.
|
|
649
|
+
* @default 'outlined'
|
|
650
|
+
*/
|
|
651
|
+
variant?: ConfirmationCardActionVariant;
|
|
652
|
+
/**
|
|
653
|
+
* Icon to display in the action button.
|
|
654
|
+
*/
|
|
655
|
+
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export declare type ConfirmationCardActionVariant = 'text' | 'textSecondary' | 'filled' | 'outlined' | 'elevated' | 'tonal' | 'positive' | 'negative';
|
|
659
|
+
|
|
660
|
+
export declare interface ConfirmationCardProps {
|
|
661
|
+
/**
|
|
662
|
+
* The title displayed next to the icon.
|
|
663
|
+
*/
|
|
664
|
+
title: string;
|
|
665
|
+
/**
|
|
666
|
+
* The content of the ConfirmationCard. Accepts any valid ReactNode.
|
|
667
|
+
*/
|
|
668
|
+
children?: ReactNode;
|
|
669
|
+
/**
|
|
670
|
+
* The semantic variant of the ConfirmationCard.
|
|
671
|
+
* @default 'info'
|
|
672
|
+
*/
|
|
673
|
+
variant?: ConfirmationCardVariant;
|
|
674
|
+
/**
|
|
675
|
+
* Icon to display in the ConfirmationCard. If not provided, uses the default icon for the variant.
|
|
676
|
+
*/
|
|
677
|
+
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
678
|
+
/**
|
|
679
|
+
* Action buttons displayed below the card.
|
|
680
|
+
* Hidden when `status` is set.
|
|
681
|
+
*/
|
|
682
|
+
actions?: ConfirmationCardAction[];
|
|
683
|
+
/**
|
|
684
|
+
* The resolved status of the card. When set, action buttons are replaced
|
|
685
|
+
* by a readonly Chip indicating the outcome.
|
|
686
|
+
*/
|
|
687
|
+
status?: ConfirmationCardStatus;
|
|
688
|
+
/**
|
|
689
|
+
* Custom label for the status chip. Use this to provide translated labels.
|
|
690
|
+
* @default 'Confirmed', 'Rejected', or 'Skipped' based on `status`
|
|
691
|
+
*/
|
|
692
|
+
statusLabel?: string;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export declare type ConfirmationCardStatus = 'confirmed' | 'rejected' | 'skipped';
|
|
696
|
+
|
|
697
|
+
export declare type ConfirmationCardVariant = 'info' | 'success' | 'warning' | 'error';
|
|
698
|
+
|
|
699
|
+
export declare const ContentBlock: {
|
|
700
|
+
({ children }: ContentBlockProps): JSX.Element;
|
|
701
|
+
displayName: string;
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
export declare interface ContentBlockProps {
|
|
705
|
+
/**
|
|
706
|
+
* The children of the ContentBlock.
|
|
707
|
+
*/
|
|
708
|
+
children: ReactNode;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
declare interface CustomIconProps {
|
|
712
|
+
/**
|
|
713
|
+
* The type of the icon. <br />
|
|
714
|
+
* Only available for File Type Icons
|
|
715
|
+
*/
|
|
716
|
+
type?: IconTypes;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export declare const DatePicker: (props: DatePickerProps) => JSX.Element;
|
|
720
|
+
|
|
721
|
+
export declare interface DatePickerProps extends Omit<TextFieldProps, 'onChange' | 'value' | 'clearable' | 'icon' | 'isFocused' | 'onIconClick' | 'iconPosition'> {
|
|
722
|
+
/**
|
|
723
|
+
* The label that will be displayed above the input. <br />
|
|
724
|
+
* It is required for accessibility purposes.
|
|
725
|
+
*/
|
|
726
|
+
label: string;
|
|
727
|
+
/**
|
|
728
|
+
* The value of the date picker.
|
|
729
|
+
*/
|
|
730
|
+
value?: string;
|
|
731
|
+
/**
|
|
732
|
+
* The function that will be called when the date picker value changes.
|
|
733
|
+
*/
|
|
734
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>, date?: Date) => void;
|
|
735
|
+
/**
|
|
736
|
+
* If true, the date picker will be open when the input is focused.
|
|
737
|
+
*/
|
|
738
|
+
openOnFocus?: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* The name of the date picker.
|
|
741
|
+
*/
|
|
742
|
+
name: string;
|
|
743
|
+
/**
|
|
744
|
+
* The locale of the date picker.
|
|
745
|
+
* @default de-DE
|
|
746
|
+
*/
|
|
747
|
+
locale?: string;
|
|
748
|
+
/**
|
|
749
|
+
* The maximum date that can be selected. <br/>
|
|
750
|
+
* format: YYYY-MM-DD <br/>
|
|
751
|
+
* This will determine the end year range for the date picker.
|
|
752
|
+
* @default 50 years from now
|
|
753
|
+
*/
|
|
754
|
+
maxDate?: string;
|
|
755
|
+
/**
|
|
756
|
+
* The minimum date that can be selected. <br/>
|
|
757
|
+
* format: YYYY-MM-DD <br/>
|
|
758
|
+
* This will determine the start year range for the date picker.
|
|
759
|
+
* @default 90 years ago
|
|
760
|
+
*/
|
|
761
|
+
minDate?: string;
|
|
762
|
+
/**
|
|
763
|
+
* The translations of the buttons. <br/>
|
|
764
|
+
* In case the locale is not supported you can set custom translations.
|
|
765
|
+
* @default { cancel: 'Abbrechen ', clear: 'Löschen', ok: 'OK' }
|
|
766
|
+
*/
|
|
767
|
+
buttonsTranslations?: ButtonsTranslations;
|
|
768
|
+
/**
|
|
769
|
+
* If true, the date picker will close automatically when a date is selected.
|
|
770
|
+
* @default false
|
|
771
|
+
*/
|
|
772
|
+
closeOnSelect?: boolean;
|
|
773
|
+
/**
|
|
774
|
+
* The placeholder of the date picker. <br/>
|
|
775
|
+
* If not provided, the placeholder will be based on the locale (e.g. 'TT.MM.JJJJ' for 'de-DE').
|
|
776
|
+
*/
|
|
777
|
+
placeholder?: string;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export declare const DEFAULT_ANNOUNCEMENTS: {
|
|
781
|
+
added: (count: number, total: number) => string;
|
|
782
|
+
removed: (total: number) => string;
|
|
783
|
+
cleared: () => string;
|
|
784
|
+
'component-error': (message: string) => string;
|
|
785
|
+
'count-changed': (total: number) => string;
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Default icon for unknown file types
|
|
790
|
+
*/
|
|
791
|
+
export declare const DEFAULT_FILE_ICON: FileIconNames;
|
|
792
|
+
|
|
793
|
+
export declare const DEFAULT_LABELS: UploaderLabels;
|
|
794
|
+
|
|
795
|
+
export declare type Density = 'default' | '-2' | '-4';
|
|
796
|
+
|
|
797
|
+
export declare const Dialog: ({ open, onClose, children, closeOnBackdropClick, closeOnEsc, padding, size, zIndex, }: DialogProps) => ReactPortal | null;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Global manager for Dialog components to track open dialogs.
|
|
801
|
+
* Maintains a stack order so nested/stacked dialogs can determine
|
|
802
|
+
* which dialog is topmost (for focus trapping).
|
|
803
|
+
*/
|
|
804
|
+
declare class DialogManager {
|
|
805
|
+
private readonly dialogStack;
|
|
806
|
+
private readonly closeCallbacks;
|
|
807
|
+
/**
|
|
808
|
+
* Register a Dialog as open with its close callback.
|
|
809
|
+
* The dialog is pushed to the top of the stack.
|
|
810
|
+
*/
|
|
811
|
+
registerOpenDialog(dialogId: string, closeCallback: () => void): void;
|
|
812
|
+
/**
|
|
813
|
+
* Unregister a Dialog as closed.
|
|
814
|
+
* The dialog is removed from the stack.
|
|
815
|
+
*/
|
|
816
|
+
unregisterOpenDialog(dialogId: string): void;
|
|
817
|
+
/**
|
|
818
|
+
* Close all other Dialogs except the specified one
|
|
819
|
+
*/
|
|
820
|
+
closeOtherDialogs(excludeDialogId: string): void;
|
|
821
|
+
/**
|
|
822
|
+
* Check if the given dialog is the topmost (last opened) dialog
|
|
823
|
+
*/
|
|
824
|
+
isTopDialog(dialogId: string): boolean;
|
|
825
|
+
/**
|
|
826
|
+
* Check if any Dialogs are currently open
|
|
827
|
+
*/
|
|
828
|
+
hasOpenDialogs(): boolean;
|
|
829
|
+
/**
|
|
830
|
+
* Get all currently open Dialog IDs
|
|
831
|
+
*/
|
|
832
|
+
getOpenDialogs(): string[];
|
|
833
|
+
/**
|
|
834
|
+
* Clear all registered Dialogs (useful for cleanup)
|
|
835
|
+
*/
|
|
836
|
+
clear(): void;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export declare const dialogManager: DialogManager;
|
|
840
|
+
|
|
841
|
+
export declare interface DialogProps {
|
|
842
|
+
/**
|
|
843
|
+
* Controls whether the dialog is open or closed.
|
|
844
|
+
*/
|
|
845
|
+
open: boolean;
|
|
846
|
+
/**
|
|
847
|
+
* Callback function called when the dialog is closed.
|
|
848
|
+
*/
|
|
849
|
+
onClose: () => void;
|
|
850
|
+
/**
|
|
851
|
+
* The main content of the dialog.
|
|
852
|
+
*/
|
|
853
|
+
children: ReactNode;
|
|
854
|
+
/**
|
|
855
|
+
* Whether clicking the backdrop should close the dialog.
|
|
856
|
+
*/
|
|
857
|
+
closeOnBackdropClick?: boolean;
|
|
858
|
+
/**
|
|
859
|
+
* Whether pressing the Escape key should close the dialog.
|
|
860
|
+
*/
|
|
861
|
+
closeOnEsc?: boolean;
|
|
862
|
+
/**
|
|
863
|
+
* Whether to remove the default padding from the dialog content.
|
|
864
|
+
* Useful for when the dialog has full width content/dividers.
|
|
865
|
+
* @deprecated Use `padding` prop instead.
|
|
866
|
+
*/
|
|
867
|
+
removePadding?: boolean;
|
|
868
|
+
/**
|
|
869
|
+
* The padding of the dialog content.
|
|
870
|
+
*/
|
|
871
|
+
padding?: CardProps['padding'];
|
|
872
|
+
/**
|
|
873
|
+
* The size of the dialog.
|
|
874
|
+
* @default none
|
|
875
|
+
*/
|
|
876
|
+
size?: ResponsiveType<DialogSize>;
|
|
877
|
+
/**
|
|
878
|
+
* The z-index of the dialog.
|
|
879
|
+
* @default 20
|
|
880
|
+
*/
|
|
881
|
+
zIndex?: number;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
declare type DialogSize = 'sm' | 'md' | 'lg' | 'none' | 'fullscreen';
|
|
885
|
+
|
|
886
|
+
declare const direction: {
|
|
887
|
+
readonly ASC: "asc";
|
|
888
|
+
readonly DESC: "desc";
|
|
889
|
+
readonly NONE: "none";
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
export declare const Divider: ({ variant }: DividerProps) => JSX.Element;
|
|
893
|
+
|
|
894
|
+
export declare interface DividerProps {
|
|
895
|
+
/**
|
|
896
|
+
* The variant to use.
|
|
897
|
+
*/
|
|
898
|
+
variant?: 'fullWidth' | 'inset' | 'middle';
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
export declare const Expandable: {
|
|
902
|
+
<T extends React.ElementType = "div">({ children, isOpen, as: Component, ...props }: ExpandableProps<T>): JSX.Element;
|
|
903
|
+
displayName: string;
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
export declare type ExpandableProps<T extends React.ElementType = 'div'> = Omit<React.ComponentPropsWithoutRef<T>, 'as' | 'children'> & {
|
|
907
|
+
/**
|
|
908
|
+
* The children of the Expandable.
|
|
909
|
+
*/
|
|
910
|
+
children: ReactNode;
|
|
911
|
+
/**
|
|
912
|
+
* Whether the Expandable is open or closed.
|
|
913
|
+
*/
|
|
914
|
+
isOpen?: boolean;
|
|
915
|
+
as?: 'div' | 'td' | 'tr' | 'th' | 'tbody' | 'thead' | 'tfoot' | 'section' | 'article' | 'main' | 'footer' | 'header' | 'aside' | 'nav' | 'form' | 'iframe' | 'picture' | 'video' | 'audio' | 'canvas' | 'embed' | 'object' | T;
|
|
916
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
917
|
+
|
|
918
|
+
declare interface ExpandableRowConfig {
|
|
919
|
+
id: string;
|
|
920
|
+
render: React.ReactNode;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Recursively extracts the raw text content from a React node tree.
|
|
925
|
+
* Useful for pulling the string out of `<pre><code>…</code></pre>` children.
|
|
926
|
+
*/
|
|
927
|
+
export declare function extractText(node: ReactNode): string;
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* Error types that can occur for individual files during validation.
|
|
931
|
+
*/
|
|
932
|
+
export declare enum FILE_ERROR {
|
|
933
|
+
/** File size exceeds the maxFileSize limit. */
|
|
934
|
+
FILE_TOO_LARGE = "file-too-large",
|
|
935
|
+
/** File type does not match the accepted types. */
|
|
936
|
+
INVALID_TYPE = "invalid-type",
|
|
937
|
+
/** File has zero bytes. */
|
|
938
|
+
EMPTY_FILE = "empty-file",
|
|
939
|
+
/** Adding this file would exceed the maxCount limit. */
|
|
940
|
+
MAX_COUNT_EXCEEDED = "max-count-exceeded",
|
|
941
|
+
/** File is a duplicate of an existing file. */
|
|
942
|
+
DUPLICATE_FILE = "duplicate-file"
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Status of a file in the upload process.
|
|
947
|
+
*/
|
|
948
|
+
export declare enum FILE_STATUS {
|
|
949
|
+
/** File is added but upload has not started. */
|
|
950
|
+
IDLE = "idle",
|
|
951
|
+
/** File is queued and waiting for upload. */
|
|
952
|
+
PENDING = "pending",
|
|
953
|
+
/** File upload is in progress. */
|
|
954
|
+
UPLOADING = "uploading",
|
|
955
|
+
/** File upload was canceled by user. */
|
|
956
|
+
CANCELED = "canceled",
|
|
957
|
+
/** File upload failed. */
|
|
958
|
+
FAILED = "failed",
|
|
959
|
+
/** File upload completed successfully. */
|
|
960
|
+
SUCCESS = "success"
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Maps file extensions to their corresponding icon names.
|
|
965
|
+
* Use `getIconForFileExtension` to get an icon name from a file extension.
|
|
966
|
+
*/
|
|
967
|
+
export declare const fileExtensionToIconMap: Record<string, FileIconNames>;
|
|
968
|
+
|
|
969
|
+
export declare type FileIconNames = keyof typeof fileIconsMap;
|
|
970
|
+
|
|
971
|
+
export declare const fileIconsMap: {
|
|
972
|
+
readonly 'file-empty': ({ type }: CustomIconProps) => JSX.Element;
|
|
973
|
+
readonly 'file-pdf': ({ type }: CustomIconProps) => JSX.Element;
|
|
974
|
+
readonly 'file-folder': ({ type }: CustomIconProps) => JSX.Element;
|
|
975
|
+
readonly 'file-image': ({ type }: CustomIconProps) => JSX.Element;
|
|
976
|
+
readonly 'file-video': ({ type }: CustomIconProps) => JSX.Element;
|
|
977
|
+
readonly 'file-video-2': ({ type }: CustomIconProps) => JSX.Element;
|
|
978
|
+
readonly 'file-audio': ({ type }: CustomIconProps) => JSX.Element;
|
|
979
|
+
readonly 'file-code': ({ type }: CustomIconProps) => JSX.Element;
|
|
980
|
+
readonly 'file-document': ({ type }: CustomIconProps) => JSX.Element;
|
|
981
|
+
readonly 'file-spreadsheet': ({ type }: CustomIconProps) => JSX.Element;
|
|
982
|
+
readonly 'file-image-img': ({ type }: CustomIconProps) => JSX.Element;
|
|
983
|
+
readonly 'file-image-jpg': ({ type }: CustomIconProps) => JSX.Element;
|
|
984
|
+
readonly 'file-image-jpeg': ({ type }: CustomIconProps) => JSX.Element;
|
|
985
|
+
readonly 'file-image-png': ({ type }: CustomIconProps) => JSX.Element;
|
|
986
|
+
readonly 'file-image-webp': ({ type }: CustomIconProps) => JSX.Element;
|
|
987
|
+
readonly 'file-image-tiff': ({ type }: CustomIconProps) => JSX.Element;
|
|
988
|
+
readonly 'file-image-gif': ({ type }: CustomIconProps) => JSX.Element;
|
|
989
|
+
readonly 'file-image-svg': ({ type }: CustomIconProps) => JSX.Element;
|
|
990
|
+
readonly 'file-image-eps': ({ type }: CustomIconProps) => JSX.Element;
|
|
991
|
+
readonly 'file-document-pdf': ({ type }: CustomIconProps) => JSX.Element;
|
|
992
|
+
readonly 'file-document-doc': ({ type }: CustomIconProps) => JSX.Element;
|
|
993
|
+
readonly 'file-document-docx': ({ type }: CustomIconProps) => JSX.Element;
|
|
994
|
+
readonly 'file-document-txt': ({ type }: CustomIconProps) => JSX.Element;
|
|
995
|
+
readonly 'file-document-csv': ({ type }: CustomIconProps) => JSX.Element;
|
|
996
|
+
readonly 'file-document-xls': ({ type }: CustomIconProps) => JSX.Element;
|
|
997
|
+
readonly 'file-document-xlsx': ({ type }: CustomIconProps) => JSX.Element;
|
|
998
|
+
readonly 'file-document-ppt': ({ type }: CustomIconProps) => JSX.Element;
|
|
999
|
+
readonly 'file-document-pptx': ({ type }: CustomIconProps) => JSX.Element;
|
|
1000
|
+
readonly 'file-design-fig': ({ type }: CustomIconProps) => JSX.Element;
|
|
1001
|
+
readonly 'file-design-ai': ({ type }: CustomIconProps) => JSX.Element;
|
|
1002
|
+
readonly 'file-design-psd': ({ type }: CustomIconProps) => JSX.Element;
|
|
1003
|
+
readonly 'file-design-indd': ({ type }: CustomIconProps) => JSX.Element;
|
|
1004
|
+
readonly 'file-design-aep': ({ type }: CustomIconProps) => JSX.Element;
|
|
1005
|
+
readonly 'file-media-mp3': ({ type }: CustomIconProps) => JSX.Element;
|
|
1006
|
+
readonly 'file-media-wav': ({ type }: CustomIconProps) => JSX.Element;
|
|
1007
|
+
readonly 'file-media-mp4': ({ type }: CustomIconProps) => JSX.Element;
|
|
1008
|
+
readonly 'file-media-mpeg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1009
|
+
readonly 'file-media-avi': ({ type }: CustomIconProps) => JSX.Element;
|
|
1010
|
+
readonly 'file-media-mkv': ({ type }: CustomIconProps) => JSX.Element;
|
|
1011
|
+
readonly 'file-development-html': ({ type }: CustomIconProps) => JSX.Element;
|
|
1012
|
+
readonly 'file-development-css': ({ type }: CustomIconProps) => JSX.Element;
|
|
1013
|
+
readonly 'file-development-rss': ({ type }: CustomIconProps) => JSX.Element;
|
|
1014
|
+
readonly 'file-development-sql': ({ type }: CustomIconProps) => JSX.Element;
|
|
1015
|
+
readonly 'file-development-js': ({ type }: CustomIconProps) => JSX.Element;
|
|
1016
|
+
readonly 'file-development-json': ({ type }: CustomIconProps) => JSX.Element;
|
|
1017
|
+
readonly 'file-development-java': ({ type }: CustomIconProps) => JSX.Element;
|
|
1018
|
+
readonly 'file-development-xml': ({ type }: CustomIconProps) => JSX.Element;
|
|
1019
|
+
readonly 'file-development-exe': ({ type }: CustomIconProps) => JSX.Element;
|
|
1020
|
+
readonly 'file-development-dmg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1021
|
+
readonly 'file-archive-zip': ({ type }: CustomIconProps) => JSX.Element;
|
|
1022
|
+
readonly 'file-archive-rar': ({ type }: CustomIconProps) => JSX.Element;
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Additional information that can be attached to a file.
|
|
1027
|
+
*/
|
|
1028
|
+
export declare interface FileInfo {
|
|
1029
|
+
/**
|
|
1030
|
+
* Additional text to display below the file name.
|
|
1031
|
+
* @example "PDF Document"
|
|
1032
|
+
*/
|
|
1033
|
+
additionalInfo?: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* Custom React node to render as the file label.
|
|
1036
|
+
* When provided, replaces the default file name display.
|
|
1037
|
+
*/
|
|
1038
|
+
customLabel?: default_2.ReactNode;
|
|
1039
|
+
/**
|
|
1040
|
+
* Allow additional custom properties.
|
|
1041
|
+
*/
|
|
1042
|
+
[key: string]: unknown;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Represents a file in the uploader with its metadata and state.
|
|
1047
|
+
*/
|
|
1048
|
+
export declare interface FileItem {
|
|
1049
|
+
/**
|
|
1050
|
+
* Unique identifier for this file item.
|
|
1051
|
+
*/
|
|
1052
|
+
id: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* The actual File object.
|
|
1055
|
+
*/
|
|
1056
|
+
file: File;
|
|
1057
|
+
/**
|
|
1058
|
+
* Additional information about the file.
|
|
1059
|
+
*/
|
|
1060
|
+
info: FileInfo;
|
|
1061
|
+
/**
|
|
1062
|
+
* Current state of the file.
|
|
1063
|
+
*/
|
|
1064
|
+
state: FileState;
|
|
1065
|
+
/**
|
|
1066
|
+
* How the file was added to the uploader.
|
|
1067
|
+
*/
|
|
1068
|
+
source: FileSource;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Source from which a file was added to the uploader.
|
|
1073
|
+
*/
|
|
1074
|
+
export declare type FileSource = 'picker' | 'drop';
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Current state of a file in the uploader.
|
|
1078
|
+
*/
|
|
1079
|
+
export declare interface FileState {
|
|
1080
|
+
/**
|
|
1081
|
+
* Current status of the file.
|
|
1082
|
+
*/
|
|
1083
|
+
status: FILE_STATUS;
|
|
1084
|
+
/**
|
|
1085
|
+
* Whether the file has a validation or upload error.
|
|
1086
|
+
*/
|
|
1087
|
+
hasError: boolean;
|
|
1088
|
+
/**
|
|
1089
|
+
* The error type if the file has an error.
|
|
1090
|
+
*/
|
|
1091
|
+
error?: FILE_ERROR;
|
|
1092
|
+
/**
|
|
1093
|
+
* Human-readable error message.
|
|
1094
|
+
*/
|
|
1095
|
+
errorMessage?: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* Upload progress percentage (0-100).
|
|
1098
|
+
* Only relevant when status is UPLOADING.
|
|
1099
|
+
*/
|
|
1100
|
+
progress?: number;
|
|
1101
|
+
/**
|
|
1102
|
+
* Custom status message to display.
|
|
1103
|
+
* Overrides the default status text when provided.
|
|
1104
|
+
*/
|
|
1105
|
+
statusMessage?: string;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
export declare type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
1109
|
+
|
|
1110
|
+
export declare type FlexResponsiveStyles<Attr extends string, T extends string> = {
|
|
1111
|
+
[K in FlexResponsiveStylesKeys<Attr>]: Record<T, string>;
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
export declare type FlexResponsiveStylesKeys<Attr extends string> = GenerateSimpleResponsiveStyleKeys<Attr>;
|
|
1115
|
+
|
|
1116
|
+
export declare type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
1117
|
+
|
|
1118
|
+
export declare type ForegroundColors = 'primary' | 'secondary' | 'tertiary' | 'yellow' | 'green' | 'pink' | 'steel-blue' | 'dark-yellow' | 'dark-green' | 'dark-pink' | 'dark-steel-blue' | 'inverse-on-surface' | 'on-primary' | 'on-secondary' | 'on-tertiary' | 'on-primary-container' | 'on-secondary-container' | 'on-tertiary-container' | 'on-primary-fixed' | 'on-primary-fixed-variant' | 'on-secondary-fixed' | 'on-secondary-fixed-variant' | 'on-tertiary-fixed' | 'on-tertiary-fixed-variant' | 'on-surface' | 'on-surface-variant' | 'on-error' | 'on-error-container' | 'on-yellow' | 'on-dark-yellow' | 'on-yellow-container' | 'on-green' | 'on-dark-green' | 'on-green-container' | 'on-pink' | 'on-dark-pink' | 'on-pink-container' | 'on-steel-blue' | 'on-dark-steel-blue' | 'on-steel-blue-container' | 'error' | 'on-scrim';
|
|
1119
|
+
|
|
1120
|
+
export declare const FormLabel: ({ value, required, htmlFor, ...props }: FormLabelProps) => JSX.Element;
|
|
1121
|
+
|
|
1122
|
+
export declare interface FormLabelProps {
|
|
1123
|
+
/**
|
|
1124
|
+
* The content of the label.
|
|
1125
|
+
*/
|
|
1126
|
+
value: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* The ID of the input element that the label should be associated with.
|
|
1129
|
+
* If not provided, the label will not be associated with any input.
|
|
1130
|
+
*/
|
|
1131
|
+
htmlFor?: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Whether the field is required
|
|
1134
|
+
*/
|
|
1135
|
+
required?: boolean;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
export declare type GenerateResponsiveGenericStyleKeys<Attr extends string> = Attr | `${Attr}${ResponsiveBreakpoint}`;
|
|
1139
|
+
|
|
1140
|
+
declare type GenerateResponsiveStyleKeys<Attr extends string> = Attr | `${Attr}${ResponsiveBreakpoint}` | `${Attr}${AxisVariant}` | `${Attr}${SideVariant}` | `${Attr}${AxisVariant}${ResponsiveBreakpoint}` | `${Attr}${SideVariant}${ResponsiveBreakpoint}`;
|
|
1141
|
+
|
|
1142
|
+
declare type GenerateSimpleResponsiveStyleKeys<Attr extends string> = Attr | `${Attr}${ResponsiveBreakpoint}`;
|
|
1143
|
+
|
|
1144
|
+
export declare type GenericResponsiveKeys<T extends string> = {
|
|
1145
|
+
[key in Viewport]: Record<T, string>;
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1148
|
+
export declare type GetGenericPropsReturnType<Attr extends string, T extends string> = {
|
|
1149
|
+
[K in GenerateSimpleResponsiveStyleKeys<Attr>]: T | undefined;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
/**
|
|
1153
|
+
* Gets the appropriate icon name for a file extension.
|
|
1154
|
+
* @param extension - The file extension (e.g., "pdf", "jpg", ".pdf")
|
|
1155
|
+
* @returns The corresponding icon name, or 'file-empty' if not found
|
|
1156
|
+
*/
|
|
1157
|
+
export declare const getIconForFileExtension: (extension?: string) => FileIconNames;
|
|
1158
|
+
|
|
1159
|
+
export declare type GetSimpleSpacingPropsReturnType<Attr extends string> = {
|
|
1160
|
+
[K in GenerateSimpleResponsiveStyleKeys<Attr>]: SpacingKeys | undefined;
|
|
1161
|
+
};
|
|
1162
|
+
|
|
1163
|
+
export declare type GetSpacingPropsReturnType<Attr extends string> = {
|
|
1164
|
+
[K in GenerateResponsiveStyleKeys<Attr>]: SpacingKeys | undefined;
|
|
1165
|
+
};
|
|
1166
|
+
|
|
1167
|
+
export declare const Grid: GridComponent;
|
|
1168
|
+
|
|
1169
|
+
declare type GridComponent = React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>> & {
|
|
1170
|
+
Item: React.ForwardRefExoticComponent<GridItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1173
|
+
declare interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1174
|
+
/**
|
|
1175
|
+
* The children of the component.
|
|
1176
|
+
*/
|
|
1177
|
+
children: ReactNode;
|
|
1178
|
+
/**
|
|
1179
|
+
* The number of columns to span in the `Grid.Item`.
|
|
1180
|
+
*/
|
|
1181
|
+
colSpan?: ResponsiveType<number>;
|
|
1182
|
+
/**
|
|
1183
|
+
* The number of rows to span in the `Grid.Item`.
|
|
1184
|
+
*/
|
|
1185
|
+
rowSpan?: ResponsiveType<number>;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
export declare interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1189
|
+
/**
|
|
1190
|
+
* The children of the component.
|
|
1191
|
+
*/
|
|
1192
|
+
children: ReactNode;
|
|
1193
|
+
/**
|
|
1194
|
+
* The height of the grid.
|
|
1195
|
+
* @default 'auto'
|
|
1196
|
+
*/
|
|
1197
|
+
height?: ResponsiveType<number | string>;
|
|
1198
|
+
/**
|
|
1199
|
+
* The minimum height of the grid.
|
|
1200
|
+
* @default 'auto'
|
|
1201
|
+
*/
|
|
1202
|
+
minHeight?: ResponsiveType<number | string>;
|
|
1203
|
+
/**
|
|
1204
|
+
* The maximum height of the grid.
|
|
1205
|
+
* @default 'auto'
|
|
1206
|
+
*/
|
|
1207
|
+
maxHeight?: ResponsiveType<number | string>;
|
|
1208
|
+
/**
|
|
1209
|
+
* The width of the grid.
|
|
1210
|
+
* @default '100%'
|
|
1211
|
+
*/
|
|
1212
|
+
width?: ResponsiveType<number | string>;
|
|
1213
|
+
/**
|
|
1214
|
+
* The minimum width of the grid.
|
|
1215
|
+
* @default 'auto'
|
|
1216
|
+
*/
|
|
1217
|
+
minWidth?: ResponsiveType<number | string>;
|
|
1218
|
+
/**
|
|
1219
|
+
* The maximum width of the grid.
|
|
1220
|
+
* @default 'auto'
|
|
1221
|
+
*/
|
|
1222
|
+
maxWidth?: ResponsiveType<number | string>;
|
|
1223
|
+
/**
|
|
1224
|
+
* The number of columns to display or the grid-template-columns property.
|
|
1225
|
+
* @default 1
|
|
1226
|
+
*/
|
|
1227
|
+
columns?: ResponsiveType<number | string>;
|
|
1228
|
+
/**
|
|
1229
|
+
* The number of rows to display or the grid-template-rows property.
|
|
1230
|
+
* @default 1
|
|
1231
|
+
*/
|
|
1232
|
+
rows?: ResponsiveType<number | string>;
|
|
1233
|
+
/**
|
|
1234
|
+
* The gap between the columns.
|
|
1235
|
+
* @default 'none'
|
|
1236
|
+
*/
|
|
1237
|
+
gap?: ResponsiveType<SpacingKeys>;
|
|
1238
|
+
/**
|
|
1239
|
+
* Define padding to the grid wrapper.
|
|
1240
|
+
* @default 'none'
|
|
1241
|
+
*/
|
|
1242
|
+
padding?: ResponsiveType<Padding>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Define margin to the grid wrapper.
|
|
1245
|
+
* @default 'none'
|
|
1246
|
+
*/
|
|
1247
|
+
margin?: ResponsiveType<Margin>;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
export declare const Icon: ({ name, size, weight, color, type, featured, ...props }: IconProps) => JSX.Element;
|
|
1251
|
+
|
|
1252
|
+
declare const iconMap: {
|
|
1253
|
+
readonly add: Icon_2;
|
|
1254
|
+
readonly 'add-circle': Icon_2;
|
|
1255
|
+
readonly 'add-file': Icon_2;
|
|
1256
|
+
readonly agent: Icon_2;
|
|
1257
|
+
readonly airplane: Icon_2;
|
|
1258
|
+
readonly archive: Icon_2;
|
|
1259
|
+
readonly 'arrow-back': Icon_2;
|
|
1260
|
+
readonly 'arrow-bend': Icon_2;
|
|
1261
|
+
readonly 'arrow-down': Icon_2;
|
|
1262
|
+
readonly 'arrow-forward': Icon_2;
|
|
1263
|
+
readonly 'arrow-left-right': Icon_2;
|
|
1264
|
+
readonly 'arrow-up': Icon_2;
|
|
1265
|
+
readonly article: Icon_2;
|
|
1266
|
+
readonly automate: Icon_2;
|
|
1267
|
+
readonly backspace: Icon_2;
|
|
1268
|
+
readonly bank: Icon_2;
|
|
1269
|
+
readonly bicycle: Icon_2;
|
|
1270
|
+
readonly billing: Icon_2;
|
|
1271
|
+
readonly binoculars: Icon_2;
|
|
1272
|
+
readonly break: Icon_2;
|
|
1273
|
+
readonly bus: Icon_2;
|
|
1274
|
+
readonly calendar: Icon_2;
|
|
1275
|
+
readonly 'calendar-blank': Icon_2;
|
|
1276
|
+
readonly 'calendar-check': Icon_2;
|
|
1277
|
+
readonly 'calendar-dot': Icon_2;
|
|
1278
|
+
readonly 'calendar-x': Icon_2;
|
|
1279
|
+
readonly camera: Icon_2;
|
|
1280
|
+
readonly car: Icon_2;
|
|
1281
|
+
readonly cart: Icon_2;
|
|
1282
|
+
readonly 'cash-money': Icon_2;
|
|
1283
|
+
readonly certificate: Icon_2;
|
|
1284
|
+
readonly 'chat-bubble': Icon_2;
|
|
1285
|
+
readonly chats: Icon_2;
|
|
1286
|
+
readonly check: Icon_2;
|
|
1287
|
+
readonly 'check-circle': Icon_2;
|
|
1288
|
+
readonly checkbox: Icon_2;
|
|
1289
|
+
readonly 'checkbox-empty': Icon_2;
|
|
1290
|
+
readonly 'checkbox-indefinitely': Icon_2;
|
|
1291
|
+
readonly checks: Icon_2;
|
|
1292
|
+
readonly 'chevron-down': Icon_2;
|
|
1293
|
+
readonly 'chevron-left': Icon_2;
|
|
1294
|
+
readonly 'chevron-right': Icon_2;
|
|
1295
|
+
readonly 'chevron-up': Icon_2;
|
|
1296
|
+
readonly 'circle-notch': Icon_2;
|
|
1297
|
+
readonly close: Icon_2;
|
|
1298
|
+
readonly 'close-circle': Icon_2;
|
|
1299
|
+
readonly 'cloud-download': Icon_2;
|
|
1300
|
+
readonly 'cloud-upload': Icon_2;
|
|
1301
|
+
readonly 'clock-countdown': Icon_2;
|
|
1302
|
+
readonly 'clock-person': Icon_2;
|
|
1303
|
+
readonly columns: Icon_2;
|
|
1304
|
+
readonly copy: Icon_2;
|
|
1305
|
+
readonly 'dark-mode': Icon_2;
|
|
1306
|
+
readonly deactivate: Icon_2;
|
|
1307
|
+
readonly delete: Icon_2;
|
|
1308
|
+
readonly 'diagram-view': Icon_2;
|
|
1309
|
+
readonly download: Icon_2;
|
|
1310
|
+
readonly drag: Icon_2;
|
|
1311
|
+
readonly edit: Icon_2;
|
|
1312
|
+
readonly error: Icon_2;
|
|
1313
|
+
readonly 'exclamation-mark': Icon_2;
|
|
1314
|
+
readonly expand: Icon_2;
|
|
1315
|
+
readonly expenses: Icon_2;
|
|
1316
|
+
readonly 'face-id': Icon_2;
|
|
1317
|
+
readonly file: Icon_2;
|
|
1318
|
+
readonly filter: Icon_2;
|
|
1319
|
+
readonly filters: Icon_2;
|
|
1320
|
+
readonly 'first-page': Icon_2;
|
|
1321
|
+
readonly folder: Icon_2;
|
|
1322
|
+
readonly 'grid-view': Icon_2;
|
|
1323
|
+
readonly 'hard-hat': Icon_2;
|
|
1324
|
+
readonly help: Icon_2;
|
|
1325
|
+
readonly hide: Icon_2;
|
|
1326
|
+
readonly home: Icon_2;
|
|
1327
|
+
readonly images: Icon_2;
|
|
1328
|
+
readonly info: Icon_2;
|
|
1329
|
+
readonly invoice: Icon_2;
|
|
1330
|
+
readonly job: Icon_2;
|
|
1331
|
+
readonly keyboard: Icon_2;
|
|
1332
|
+
readonly knowledge: Icon_2;
|
|
1333
|
+
readonly language: Icon_2;
|
|
1334
|
+
readonly 'last-page': Icon_2;
|
|
1335
|
+
readonly 'light-mode': Icon_2;
|
|
1336
|
+
readonly 'list-view': Icon_2;
|
|
1337
|
+
readonly location: Icon_2;
|
|
1338
|
+
readonly 'location-pin': Icon_2;
|
|
1339
|
+
readonly lock: Icon_2;
|
|
1340
|
+
readonly menu: Icon_2;
|
|
1341
|
+
readonly metadata: Icon_2;
|
|
1342
|
+
readonly microphone: Icon_2;
|
|
1343
|
+
readonly minus: Icon_2;
|
|
1344
|
+
readonly 'more-horizontal': Icon_2;
|
|
1345
|
+
readonly 'more-vertical': Icon_2;
|
|
1346
|
+
readonly moped: Icon_2;
|
|
1347
|
+
readonly 'navigation-arrow': Icon_2;
|
|
1348
|
+
readonly notifications: Icon_2;
|
|
1349
|
+
readonly note: Icon_2;
|
|
1350
|
+
readonly numpad: Icon_2;
|
|
1351
|
+
readonly 'open-in-new-tab': Icon_2;
|
|
1352
|
+
readonly order: Icon_2;
|
|
1353
|
+
readonly organization: Icon_2;
|
|
1354
|
+
readonly pause: Icon_2;
|
|
1355
|
+
readonly attachment: Icon_2;
|
|
1356
|
+
readonly phone: Icon_2;
|
|
1357
|
+
readonly 'piggy-bank': Icon_2;
|
|
1358
|
+
readonly plant: Icon_2;
|
|
1359
|
+
readonly printer: Icon_2;
|
|
1360
|
+
readonly privacy: Icon_2;
|
|
1361
|
+
readonly 'qr-code': Icon_2;
|
|
1362
|
+
readonly refresh: Icon_2;
|
|
1363
|
+
readonly remark: Icon_2;
|
|
1364
|
+
readonly save: Icon_2;
|
|
1365
|
+
readonly search: Icon_2;
|
|
1366
|
+
readonly 'send-message': Icon_2;
|
|
1367
|
+
readonly settings: Icon_2;
|
|
1368
|
+
readonly 'setup-time': Icon_2;
|
|
1369
|
+
readonly shapes: Icon_2;
|
|
1370
|
+
readonly show: Icon_2;
|
|
1371
|
+
readonly sidebar: Icon_2;
|
|
1372
|
+
readonly signature: Icon_2;
|
|
1373
|
+
readonly 'sign-out': Icon_2;
|
|
1374
|
+
readonly 'skip-forward': Icon_2;
|
|
1375
|
+
readonly smartphone: Icon_2;
|
|
1376
|
+
readonly sparkle: Icon_2;
|
|
1377
|
+
readonly star: Icon_2;
|
|
1378
|
+
readonly start: Icon_2;
|
|
1379
|
+
readonly stop: Icon_2;
|
|
1380
|
+
readonly sick: Icon_2;
|
|
1381
|
+
readonly table: Icon_2;
|
|
1382
|
+
readonly taxi: Icon_2;
|
|
1383
|
+
readonly 'text-align-center': Icon_2;
|
|
1384
|
+
readonly 'text-align-justify': Icon_2;
|
|
1385
|
+
readonly 'text-align-left': Icon_2;
|
|
1386
|
+
readonly 'text-align-right': Icon_2;
|
|
1387
|
+
readonly 'text-t': Icon_2;
|
|
1388
|
+
readonly notches: Icon_2;
|
|
1389
|
+
readonly time: Icon_2;
|
|
1390
|
+
readonly timer: Icon_2;
|
|
1391
|
+
readonly 'time-sheet-download': Icon_2;
|
|
1392
|
+
readonly 'time-sheet-upload': Icon_2;
|
|
1393
|
+
readonly train: Icon_2;
|
|
1394
|
+
readonly translate: Icon_2;
|
|
1395
|
+
readonly travel: Icon_2;
|
|
1396
|
+
readonly unfold: Icon_2;
|
|
1397
|
+
readonly user: Icon_2;
|
|
1398
|
+
readonly upload: Icon_2;
|
|
1399
|
+
readonly 'user-account': Icon_2;
|
|
1400
|
+
readonly users: Icon_2;
|
|
1401
|
+
readonly vacation: Icon_2;
|
|
1402
|
+
readonly wallet: Icon_2;
|
|
1403
|
+
readonly warning: Icon_2;
|
|
1404
|
+
readonly wrench: Icon_2;
|
|
1405
|
+
readonly 'file-empty': ({ type }: CustomIconProps) => JSX.Element;
|
|
1406
|
+
readonly 'file-pdf': ({ type }: CustomIconProps) => JSX.Element;
|
|
1407
|
+
readonly 'file-folder': ({ type }: CustomIconProps) => JSX.Element;
|
|
1408
|
+
readonly 'file-image': ({ type }: CustomIconProps) => JSX.Element;
|
|
1409
|
+
readonly 'file-video': ({ type }: CustomIconProps) => JSX.Element;
|
|
1410
|
+
readonly 'file-video-2': ({ type }: CustomIconProps) => JSX.Element;
|
|
1411
|
+
readonly 'file-audio': ({ type }: CustomIconProps) => JSX.Element;
|
|
1412
|
+
readonly 'file-code': ({ type }: CustomIconProps) => JSX.Element;
|
|
1413
|
+
readonly 'file-document': ({ type }: CustomIconProps) => JSX.Element;
|
|
1414
|
+
readonly 'file-spreadsheet': ({ type }: CustomIconProps) => JSX.Element;
|
|
1415
|
+
readonly 'file-image-img': ({ type }: CustomIconProps) => JSX.Element;
|
|
1416
|
+
readonly 'file-image-jpg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1417
|
+
readonly 'file-image-jpeg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1418
|
+
readonly 'file-image-png': ({ type }: CustomIconProps) => JSX.Element;
|
|
1419
|
+
readonly 'file-image-webp': ({ type }: CustomIconProps) => JSX.Element;
|
|
1420
|
+
readonly 'file-image-tiff': ({ type }: CustomIconProps) => JSX.Element;
|
|
1421
|
+
readonly 'file-image-gif': ({ type }: CustomIconProps) => JSX.Element;
|
|
1422
|
+
readonly 'file-image-svg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1423
|
+
readonly 'file-image-eps': ({ type }: CustomIconProps) => JSX.Element;
|
|
1424
|
+
readonly 'file-document-pdf': ({ type }: CustomIconProps) => JSX.Element;
|
|
1425
|
+
readonly 'file-document-doc': ({ type }: CustomIconProps) => JSX.Element;
|
|
1426
|
+
readonly 'file-document-docx': ({ type }: CustomIconProps) => JSX.Element;
|
|
1427
|
+
readonly 'file-document-txt': ({ type }: CustomIconProps) => JSX.Element;
|
|
1428
|
+
readonly 'file-document-csv': ({ type }: CustomIconProps) => JSX.Element;
|
|
1429
|
+
readonly 'file-document-xls': ({ type }: CustomIconProps) => JSX.Element;
|
|
1430
|
+
readonly 'file-document-xlsx': ({ type }: CustomIconProps) => JSX.Element;
|
|
1431
|
+
readonly 'file-document-ppt': ({ type }: CustomIconProps) => JSX.Element;
|
|
1432
|
+
readonly 'file-document-pptx': ({ type }: CustomIconProps) => JSX.Element;
|
|
1433
|
+
readonly 'file-design-fig': ({ type }: CustomIconProps) => JSX.Element;
|
|
1434
|
+
readonly 'file-design-ai': ({ type }: CustomIconProps) => JSX.Element;
|
|
1435
|
+
readonly 'file-design-psd': ({ type }: CustomIconProps) => JSX.Element;
|
|
1436
|
+
readonly 'file-design-indd': ({ type }: CustomIconProps) => JSX.Element;
|
|
1437
|
+
readonly 'file-design-aep': ({ type }: CustomIconProps) => JSX.Element;
|
|
1438
|
+
readonly 'file-media-mp3': ({ type }: CustomIconProps) => JSX.Element;
|
|
1439
|
+
readonly 'file-media-wav': ({ type }: CustomIconProps) => JSX.Element;
|
|
1440
|
+
readonly 'file-media-mp4': ({ type }: CustomIconProps) => JSX.Element;
|
|
1441
|
+
readonly 'file-media-mpeg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1442
|
+
readonly 'file-media-avi': ({ type }: CustomIconProps) => JSX.Element;
|
|
1443
|
+
readonly 'file-media-mkv': ({ type }: CustomIconProps) => JSX.Element;
|
|
1444
|
+
readonly 'file-development-html': ({ type }: CustomIconProps) => JSX.Element;
|
|
1445
|
+
readonly 'file-development-css': ({ type }: CustomIconProps) => JSX.Element;
|
|
1446
|
+
readonly 'file-development-rss': ({ type }: CustomIconProps) => JSX.Element;
|
|
1447
|
+
readonly 'file-development-sql': ({ type }: CustomIconProps) => JSX.Element;
|
|
1448
|
+
readonly 'file-development-js': ({ type }: CustomIconProps) => JSX.Element;
|
|
1449
|
+
readonly 'file-development-json': ({ type }: CustomIconProps) => JSX.Element;
|
|
1450
|
+
readonly 'file-development-java': ({ type }: CustomIconProps) => JSX.Element;
|
|
1451
|
+
readonly 'file-development-xml': ({ type }: CustomIconProps) => JSX.Element;
|
|
1452
|
+
readonly 'file-development-exe': ({ type }: CustomIconProps) => JSX.Element;
|
|
1453
|
+
readonly 'file-development-dmg': ({ type }: CustomIconProps) => JSX.Element;
|
|
1454
|
+
readonly 'file-archive-zip': ({ type }: CustomIconProps) => JSX.Element;
|
|
1455
|
+
readonly 'file-archive-rar': ({ type }: CustomIconProps) => JSX.Element;
|
|
1456
|
+
};
|
|
1457
|
+
|
|
1458
|
+
export declare type IconNames = keyof typeof iconMap;
|
|
1459
|
+
|
|
1460
|
+
export declare interface IconProps extends CustomIconProps, React.HTMLAttributes<SVGElement> {
|
|
1461
|
+
/**
|
|
1462
|
+
* The name of the icon to display.
|
|
1463
|
+
*/
|
|
1464
|
+
name: IconNames;
|
|
1465
|
+
/**
|
|
1466
|
+
* The size of the icon.
|
|
1467
|
+
* @default 'lg'
|
|
1468
|
+
*/
|
|
1469
|
+
size?: IconSizes;
|
|
1470
|
+
/**
|
|
1471
|
+
* The weight of the icon.
|
|
1472
|
+
*/
|
|
1473
|
+
weight?: IconWeight;
|
|
1474
|
+
/**
|
|
1475
|
+
* The color of the icon.
|
|
1476
|
+
*/
|
|
1477
|
+
color?: ForegroundColors;
|
|
1478
|
+
/**
|
|
1479
|
+
* If true, the icon will be displayed in a featured style.
|
|
1480
|
+
*/
|
|
1481
|
+
featured?: boolean;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
declare const iconSizeMap: {
|
|
1485
|
+
readonly '2xs': 12;
|
|
1486
|
+
readonly xs: 16;
|
|
1487
|
+
readonly sm: 18;
|
|
1488
|
+
readonly md: 20;
|
|
1489
|
+
readonly lg: 24;
|
|
1490
|
+
readonly xl: 32;
|
|
1491
|
+
readonly '2xl': 40;
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
export declare type IconSizes = keyof typeof iconSizeMap;
|
|
1495
|
+
|
|
1496
|
+
declare type IconStates = {
|
|
1497
|
+
on: CommonIconNames;
|
|
1498
|
+
off: CommonIconNames;
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1501
|
+
declare type IconTypes = keyof typeof iconTypes;
|
|
1502
|
+
|
|
1503
|
+
declare const iconTypes: {
|
|
1504
|
+
readonly default: "default";
|
|
1505
|
+
readonly solid: "solid";
|
|
1506
|
+
readonly gray: "gray";
|
|
1507
|
+
};
|
|
1508
|
+
|
|
1509
|
+
export declare const InfoBox: {
|
|
1510
|
+
({ message, variant, icon, elevated, }: InfoBoxProps): JSX.Element;
|
|
1511
|
+
displayName: string;
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
export declare interface InfoBoxProps {
|
|
1515
|
+
/**
|
|
1516
|
+
* The message to display in the InfoBox.
|
|
1517
|
+
*/
|
|
1518
|
+
message: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* The semantic variant of the InfoBox
|
|
1521
|
+
* @default 'default'
|
|
1522
|
+
*/
|
|
1523
|
+
variant?: InfoBoxVariant;
|
|
1524
|
+
/**
|
|
1525
|
+
* Icon to display in the InfoBox. If not provided, uses the default icon for the variant.
|
|
1526
|
+
*/
|
|
1527
|
+
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Whether to elevate the InfoBox.
|
|
1530
|
+
* @default true
|
|
1531
|
+
*/
|
|
1532
|
+
elevated?: boolean;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
export declare type InfoBoxVariant = 'default' | 'positive' | 'warning' | 'error' | 'subtle' | 'neutral' | 'outlined';
|
|
1536
|
+
|
|
1537
|
+
export declare type JustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
1538
|
+
|
|
1539
|
+
declare type LabelStates = {
|
|
1540
|
+
on: string;
|
|
1541
|
+
off: string;
|
|
1542
|
+
};
|
|
1543
|
+
|
|
1544
|
+
export declare type Margin = SpacingKeys | {
|
|
1545
|
+
top?: SpacingKeys;
|
|
1546
|
+
right?: SpacingKeys;
|
|
1547
|
+
bottom?: SpacingKeys;
|
|
1548
|
+
left?: SpacingKeys;
|
|
1549
|
+
x?: SpacingKeys;
|
|
1550
|
+
y?: SpacingKeys;
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
export declare type MenuItem<T extends React.ElementType = 'a'> = {
|
|
1554
|
+
/**
|
|
1555
|
+
* The label of the menu item
|
|
1556
|
+
*/
|
|
1557
|
+
label: string;
|
|
1558
|
+
/**
|
|
1559
|
+
* The id of the menu item
|
|
1560
|
+
*/
|
|
1561
|
+
id: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* The icon of the menu item
|
|
1564
|
+
*/
|
|
1565
|
+
icon: CommonIconNames | React.ReactElement;
|
|
1566
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
1567
|
+
|
|
1568
|
+
declare type NonNullable_2<T> = Exclude<T, null | undefined>;
|
|
1569
|
+
export { NonNullable_2 as NonNullable }
|
|
1570
|
+
|
|
1571
|
+
export declare type Overflow = OverflowBase | {
|
|
1572
|
+
y?: OverflowYOrX;
|
|
1573
|
+
x?: OverflowYOrX;
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
export declare type OverflowBase = 'visible' | 'hidden' | 'scroll' | 'auto' | 'y-auto' | 'y-scroll' | 'x-auto' | 'x-scroll';
|
|
1577
|
+
|
|
1578
|
+
export declare type OverflowYOrX = 'auto' | 'scroll' | 'hidden' | 'visible';
|
|
1579
|
+
|
|
1580
|
+
export declare type Padding = SpacingKeys | {
|
|
1581
|
+
top?: SpacingKeys;
|
|
1582
|
+
right?: SpacingKeys;
|
|
1583
|
+
bottom?: SpacingKeys;
|
|
1584
|
+
left?: SpacingKeys;
|
|
1585
|
+
x?: SpacingKeys;
|
|
1586
|
+
y?: SpacingKeys;
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1589
|
+
export declare const Pagination: ({ currentPage, totalPages, rowsPerPage, onPageChange, onRowsPerPageChange, disabled, rowsPerPageLabel, pageOfPagesLabel, }: PaginationProps) => JSX.Element;
|
|
1590
|
+
|
|
1591
|
+
export declare interface PaginationProps {
|
|
1592
|
+
/**
|
|
1593
|
+
* The text for the rows per page.
|
|
1594
|
+
* @default "Zeilen pro Seite"
|
|
1595
|
+
*/
|
|
1596
|
+
rowsPerPageLabel?: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* The text for the "of" in "1 of 10".
|
|
1599
|
+
* @default "von"
|
|
1600
|
+
*/
|
|
1601
|
+
pageOfPagesLabel?: string;
|
|
1602
|
+
/**
|
|
1603
|
+
* The current page of the Pagination.
|
|
1604
|
+
*/
|
|
1605
|
+
currentPage: number;
|
|
1606
|
+
/**
|
|
1607
|
+
* The total pages of the Pagination.
|
|
1608
|
+
*/
|
|
1609
|
+
totalPages: number;
|
|
1610
|
+
/**
|
|
1611
|
+
* The rows per page of the Pagination.
|
|
1612
|
+
*/
|
|
1613
|
+
rowsPerPage?: RowsPerPage;
|
|
1614
|
+
/**
|
|
1615
|
+
* The callback function to handle page change.
|
|
1616
|
+
*/
|
|
1617
|
+
onPageChange: (page: number) => void;
|
|
1618
|
+
/**
|
|
1619
|
+
* The callback function to handle rows per page change.
|
|
1620
|
+
*/
|
|
1621
|
+
onRowsPerPageChange?: (rowsPerPage: RowsPerPage) => void;
|
|
1622
|
+
/**
|
|
1623
|
+
* The disabled state of the Pagination.
|
|
1624
|
+
*/
|
|
1625
|
+
disabled?: boolean;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
declare type Panel = {
|
|
1629
|
+
id: string;
|
|
1630
|
+
children: React.ReactNode;
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
export declare const PopUpMenu: ({ children, placement, disabled, trigger, density, closeOnItemClick, items, onItemClick, selectedItem, selectable, open, onClose, closeOnClickOutside, closeOnEscape, toggleOnClick, queryHighlight, showSearch, searchPlaceholder, allowClearAll, allowSelectAll, selectAllLabel, clearAllLabel, noResultsFoundMessage, onClearAllOrSelectAllClick, searchMode, onSearchChange, isLoading, wrapperWidth, onScrollEnd, isLoadingMore, ...props }: PopUpMenuProps) => JSX.Element;
|
|
1634
|
+
|
|
1635
|
+
export declare type PopUpMenuItem<T extends React.ElementType = 'button'> = UnionAs_2 & {
|
|
1636
|
+
/**
|
|
1637
|
+
* The id of the item
|
|
1638
|
+
* @required
|
|
1639
|
+
*/
|
|
1640
|
+
id: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* The label of the item
|
|
1643
|
+
* @required
|
|
1644
|
+
*/
|
|
1645
|
+
label: string;
|
|
1646
|
+
/**
|
|
1647
|
+
* The callback function that is called when the item is clicked
|
|
1648
|
+
*/
|
|
1649
|
+
onClick?: () => void;
|
|
1650
|
+
/**
|
|
1651
|
+
* The icon of the item
|
|
1652
|
+
* @see {@link CommonIconNames} for available icons
|
|
1653
|
+
*/
|
|
1654
|
+
icon?: CommonIconNames;
|
|
1655
|
+
/**
|
|
1656
|
+
* Whether the item is disabled
|
|
1657
|
+
* @default false
|
|
1658
|
+
*/
|
|
1659
|
+
disabled?: boolean;
|
|
1660
|
+
/**
|
|
1661
|
+
* The custom component to be used for the item <br />
|
|
1662
|
+
* `as` is ignored when `linkComponent` is set
|
|
1663
|
+
* @see {@link UnionAs}
|
|
1664
|
+
*/
|
|
1665
|
+
linkComponent?: T;
|
|
1666
|
+
} & Omit<React.ComponentProps<T>, 'className' | 'ref' | 'role' | 'tabIndex' | 'onClick' | 'disabled'>;
|
|
1667
|
+
|
|
1668
|
+
declare type PopUpMenuPlacement = 'top' | 'bottom' | 'left' | 'right' | 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom';
|
|
1669
|
+
|
|
1670
|
+
export declare interface PopUpMenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className'> {
|
|
1671
|
+
/**
|
|
1672
|
+
* The trigger element that the context menu is attached to
|
|
1673
|
+
*/
|
|
1674
|
+
children: React.ReactNode;
|
|
1675
|
+
/**
|
|
1676
|
+
* The items to be displayed in the context menu <br />
|
|
1677
|
+
* The Generic type `T` is type of the `linkComponent` prop. Default `T` is `button`. <br />
|
|
1678
|
+
* If you use the prop `as` the types of the the selected option are automatically inferred to that particular item
|
|
1679
|
+
* @see {@link PopUpMenuItem}
|
|
1680
|
+
* @example
|
|
1681
|
+
* ```ts
|
|
1682
|
+
* const items: PopUpMenuItem[] = [
|
|
1683
|
+
* {
|
|
1684
|
+
* id: 'delete',
|
|
1685
|
+
* label: 'Delete',
|
|
1686
|
+
* onClick: () => {
|
|
1687
|
+
* console.log('Deleted');
|
|
1688
|
+
* },
|
|
1689
|
+
* icon: 'delete',
|
|
1690
|
+
* },
|
|
1691
|
+
* ];
|
|
1692
|
+
* ```
|
|
1693
|
+
*/
|
|
1694
|
+
items: PopUpMenuItem[];
|
|
1695
|
+
/**
|
|
1696
|
+
* The selected items in the context menu
|
|
1697
|
+
* @see {@link PopUpMenuSelectionType}
|
|
1698
|
+
*/
|
|
1699
|
+
selectedItem?: PopUpMenuSelectionType;
|
|
1700
|
+
/**
|
|
1701
|
+
* The callback function that is called when the items are clicked
|
|
1702
|
+
* @see {@link PopUpMenuSelectionType}
|
|
1703
|
+
* @see {@link PopUpMenuItem}
|
|
1704
|
+
*/
|
|
1705
|
+
onItemClick?: (item: PopUpMenuItem, selectedItem?: PopUpMenuSelectionType) => void;
|
|
1706
|
+
/**
|
|
1707
|
+
* The callback function that is called when the clear all or select all buttons are clicked
|
|
1708
|
+
* @see {@link PopUpMenuSelectionType}
|
|
1709
|
+
* @see {@link PopUpMenuItem}
|
|
1710
|
+
*/
|
|
1711
|
+
onClearAllOrSelectAllClick?: (items: PopUpMenuItem[], selectedItems: PopUpMenuSelectionType) => void;
|
|
1712
|
+
/**
|
|
1713
|
+
* The position of the context menu relative to its trigger
|
|
1714
|
+
* @default 'bottom-left'
|
|
1715
|
+
*/
|
|
1716
|
+
placement?: ResponsiveType<PopUpMenuPlacement>;
|
|
1717
|
+
/**
|
|
1718
|
+
* The trigger event that opens the context menu
|
|
1719
|
+
* @default click
|
|
1720
|
+
*/
|
|
1721
|
+
trigger?: 'hover' | 'click' | 'right-click';
|
|
1722
|
+
/**
|
|
1723
|
+
* The density of the context menu
|
|
1724
|
+
* @default default
|
|
1725
|
+
*/
|
|
1726
|
+
density?: 'default' | '-2' | '-4';
|
|
1727
|
+
/**
|
|
1728
|
+
* Whether the context menu should be selectable
|
|
1729
|
+
* @default none
|
|
1730
|
+
*/
|
|
1731
|
+
selectable?: 'single' | 'multiple' | 'none';
|
|
1732
|
+
/**
|
|
1733
|
+
* Whether the context menu should be disabled
|
|
1734
|
+
* @default false
|
|
1735
|
+
*/
|
|
1736
|
+
disabled?: boolean;
|
|
1737
|
+
/**
|
|
1738
|
+
* Whether the context menu should be closed when the user clicks outside of it
|
|
1739
|
+
* @default true
|
|
1740
|
+
*/
|
|
1741
|
+
closeOnClickOutside?: boolean;
|
|
1742
|
+
/**
|
|
1743
|
+
* Whether the context menu should be closed when the user presses the escape key
|
|
1744
|
+
* @default true
|
|
1745
|
+
*/
|
|
1746
|
+
closeOnEscape?: boolean;
|
|
1747
|
+
/**
|
|
1748
|
+
* Whether the context menu should be toggled when the user clicks on the trigger
|
|
1749
|
+
* @default true
|
|
1750
|
+
*/
|
|
1751
|
+
toggleOnClick?: boolean;
|
|
1752
|
+
/**
|
|
1753
|
+
* Whether the context menu should be open
|
|
1754
|
+
* @default false
|
|
1755
|
+
*/
|
|
1756
|
+
open?: boolean;
|
|
1757
|
+
/**
|
|
1758
|
+
* The callback function that is called when the context menu is opened
|
|
1759
|
+
*/
|
|
1760
|
+
onOpen?: () => void;
|
|
1761
|
+
/**
|
|
1762
|
+
* The callback function that is called when the context menu is closed
|
|
1763
|
+
*/
|
|
1764
|
+
onClose?: () => void;
|
|
1765
|
+
/**
|
|
1766
|
+
* The query to be used to filter the items by label or id
|
|
1767
|
+
*/
|
|
1768
|
+
queryHighlight?: string;
|
|
1769
|
+
/**
|
|
1770
|
+
* Whether the context menu should be closed when the item is clicked
|
|
1771
|
+
* Default is `true` when the `selectable` prop is `none` or `single`
|
|
1772
|
+
* @default true
|
|
1773
|
+
*/
|
|
1774
|
+
closeOnItemClick?: boolean;
|
|
1775
|
+
/**
|
|
1776
|
+
* Whether the context menu should show a search input
|
|
1777
|
+
* @default false
|
|
1778
|
+
*/
|
|
1779
|
+
showSearch?: boolean;
|
|
1780
|
+
/**
|
|
1781
|
+
* The placeholder of the search input
|
|
1782
|
+
* @default 'Suchen'
|
|
1783
|
+
*/
|
|
1784
|
+
searchPlaceholder?: string;
|
|
1785
|
+
/**
|
|
1786
|
+
* Whether the context menu should allow clearing all selected items
|
|
1787
|
+
* @default false
|
|
1788
|
+
*/
|
|
1789
|
+
allowClearAll?: boolean;
|
|
1790
|
+
/**
|
|
1791
|
+
* The label of the clear all button
|
|
1792
|
+
* @default 'Alle löschen'
|
|
1793
|
+
*/
|
|
1794
|
+
clearAllLabel?: string;
|
|
1795
|
+
/**
|
|
1796
|
+
* Whether the context menu should allow selecting all items
|
|
1797
|
+
* @default false
|
|
1798
|
+
*/
|
|
1799
|
+
allowSelectAll?: boolean;
|
|
1800
|
+
/**
|
|
1801
|
+
* The label of the select all button
|
|
1802
|
+
* @default 'Alle auswählen'
|
|
1803
|
+
*/
|
|
1804
|
+
selectAllLabel?: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* The message of the no results found message
|
|
1807
|
+
* @default 'Keine Ergebnisse gefunden'
|
|
1808
|
+
*/
|
|
1809
|
+
noResultsFoundMessage?: string;
|
|
1810
|
+
/**
|
|
1811
|
+
* The mode of the search
|
|
1812
|
+
* @default 'built-in'
|
|
1813
|
+
*/
|
|
1814
|
+
searchMode?: 'built-in' | 'async';
|
|
1815
|
+
/**
|
|
1816
|
+
* The callback function that is called when the search query is changed <br />
|
|
1817
|
+
* This is only used when the `searchMode` prop is set to `async`
|
|
1818
|
+
*/
|
|
1819
|
+
onSearchChange?: (searchQuery: string) => void;
|
|
1820
|
+
/**
|
|
1821
|
+
* Whether the context menu is loading
|
|
1822
|
+
* @default false
|
|
1823
|
+
*/
|
|
1824
|
+
isLoading?: boolean;
|
|
1825
|
+
/**
|
|
1826
|
+
* The width of the wrapper div that contains the context menu,
|
|
1827
|
+
* this is useful if you need the wrapped element to be full width (like in a InputField for example)
|
|
1828
|
+
* @default 'fit'
|
|
1829
|
+
*/
|
|
1830
|
+
wrapperWidth?: 'fit' | 'full';
|
|
1831
|
+
/**
|
|
1832
|
+
* The callback function that is called when the scroll end is reached
|
|
1833
|
+
*/
|
|
1834
|
+
onScrollEnd?: () => void;
|
|
1835
|
+
/**
|
|
1836
|
+
* Whether the context menu is loading more items when the user scrolls to the bottom
|
|
1837
|
+
* @default false
|
|
1838
|
+
*/
|
|
1839
|
+
isLoadingMore?: boolean;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
export declare type PopUpMenuSelectionType = string | string[] | undefined;
|
|
1843
|
+
|
|
1844
|
+
export declare const ProgressIndicator: ({ value, indeterminate, variant, }: ProgressIndicatorProps) => JSX.Element;
|
|
1845
|
+
|
|
1846
|
+
export declare interface ProgressIndicatorProps {
|
|
1847
|
+
/**
|
|
1848
|
+
* The percentage of the progress indicator
|
|
1849
|
+
* @default 0
|
|
1850
|
+
*/
|
|
1851
|
+
value?: number;
|
|
1852
|
+
/**
|
|
1853
|
+
* Whether the progress indicator is indeterminate
|
|
1854
|
+
* @default false
|
|
1855
|
+
*/
|
|
1856
|
+
indeterminate?: boolean;
|
|
1857
|
+
/**
|
|
1858
|
+
* The variant of the progress indicator
|
|
1859
|
+
* @default 'linear'
|
|
1860
|
+
*/
|
|
1861
|
+
variant?: 'linear' | 'circular';
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
export declare const RadioButton: React.FC<RadioButtonProps>;
|
|
1865
|
+
|
|
1866
|
+
export declare interface RadioButtonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
1867
|
+
/**
|
|
1868
|
+
* Handle change events.
|
|
1869
|
+
*/
|
|
1870
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
1871
|
+
/**
|
|
1872
|
+
* Handle the label of the radio button.
|
|
1873
|
+
*/
|
|
1874
|
+
label: ReactNode;
|
|
1875
|
+
/**
|
|
1876
|
+
* Handle the name of the radio button.
|
|
1877
|
+
*/
|
|
1878
|
+
name?: string;
|
|
1879
|
+
/**
|
|
1880
|
+
* Handle the id of the radio button.
|
|
1881
|
+
* @default auto-generated
|
|
1882
|
+
*/
|
|
1883
|
+
id?: string;
|
|
1884
|
+
/**
|
|
1885
|
+
* Handle the value of the radio button.
|
|
1886
|
+
*/
|
|
1887
|
+
value?: string;
|
|
1888
|
+
/**
|
|
1889
|
+
* Handle if the radio button is checked.
|
|
1890
|
+
*/
|
|
1891
|
+
checked?: boolean;
|
|
1892
|
+
/**
|
|
1893
|
+
* Handle if the radio button is disabled.
|
|
1894
|
+
*/
|
|
1895
|
+
disabled?: boolean;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
export declare const RadioGroup: {
|
|
1899
|
+
({ children, name, value, onChange, row, disabled, }: RadioGroupProps): default_2.DetailedReactHTMLElement<{
|
|
1900
|
+
className: string;
|
|
1901
|
+
role: "radiogroup";
|
|
1902
|
+
'aria-labelledby': string;
|
|
1903
|
+
}, HTMLElement>;
|
|
1904
|
+
displayName: string;
|
|
1905
|
+
};
|
|
1906
|
+
|
|
1907
|
+
export declare interface RadioGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1908
|
+
/**
|
|
1909
|
+
* The children of the radio group.
|
|
1910
|
+
*/
|
|
1911
|
+
children: React.ReactNode;
|
|
1912
|
+
/**
|
|
1913
|
+
* The name of the radio group. This will be passed to the radio buttons.
|
|
1914
|
+
*/
|
|
1915
|
+
name: string;
|
|
1916
|
+
/**
|
|
1917
|
+
* The value of the selected radio button.
|
|
1918
|
+
*/
|
|
1919
|
+
value?: string;
|
|
1920
|
+
/**
|
|
1921
|
+
* Handle change events.
|
|
1922
|
+
*/
|
|
1923
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
1924
|
+
/**
|
|
1925
|
+
* Set the group to be displayed in a row
|
|
1926
|
+
*/
|
|
1927
|
+
row?: boolean;
|
|
1928
|
+
/**
|
|
1929
|
+
* Set the group to be disabled
|
|
1930
|
+
*/
|
|
1931
|
+
disabled?: boolean;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
declare type RefType<T extends Node = HTMLElement> = RefObject<T | null> | null | undefined;
|
|
1935
|
+
|
|
1936
|
+
/**
|
|
1937
|
+
* Represents a file that was rejected during validation.
|
|
1938
|
+
* These files are not added to the file list but shown in the rejection list.
|
|
1939
|
+
*/
|
|
1940
|
+
export declare interface RejectedFile {
|
|
1941
|
+
/**
|
|
1942
|
+
* The actual File object that was rejected.
|
|
1943
|
+
*/
|
|
1944
|
+
file: File;
|
|
1945
|
+
/**
|
|
1946
|
+
* The validation error that caused the rejection.
|
|
1947
|
+
*/
|
|
1948
|
+
error: FILE_ERROR;
|
|
1949
|
+
/**
|
|
1950
|
+
* Human-readable error message.
|
|
1951
|
+
*/
|
|
1952
|
+
errorMessage: string;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
declare type ResponsiveBreakpoint = 'SM' | 'MD' | 'LG' | 'XL' | '2XL';
|
|
1956
|
+
|
|
1957
|
+
export declare type ResponsiveGenericStyles<Attr extends string, T extends string = string> = {
|
|
1958
|
+
[K in GenerateResponsiveGenericStyleKeys<Attr>]: Record<T, string>;
|
|
1959
|
+
};
|
|
1960
|
+
|
|
1961
|
+
export declare type ResponsiveStyles<Attr extends string> = {
|
|
1962
|
+
[K in GenerateResponsiveStyleKeys<Attr>]: Record<SpacingKeys, string>;
|
|
1963
|
+
};
|
|
1964
|
+
|
|
1965
|
+
export declare type ResponsiveType<T> = T | {
|
|
1966
|
+
[key in Viewport]?: T;
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
export declare type ResponsiveTypeFixed<T> = {
|
|
1970
|
+
[key in Viewport]: T;
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1973
|
+
export declare type RowsPerPage = 10 | 20 | 50 | 100 | 200;
|
|
1974
|
+
|
|
1975
|
+
export declare const SegmentButton: <T extends React.ElementType = "button", V = string>({ label, active, matchSiblings, icon, value, as, linkComponent, ...props }: SegmentButtonProps<T, V>) => JSX.Element;
|
|
1976
|
+
|
|
1977
|
+
export declare type SegmentButtonProps<T extends React.ElementType, V = string> = React.ComponentPropsWithoutRef<T> & {
|
|
1978
|
+
/**
|
|
1979
|
+
* The label of the button.
|
|
1980
|
+
*/
|
|
1981
|
+
label?: string;
|
|
1982
|
+
/**
|
|
1983
|
+
* The icon of the button.
|
|
1984
|
+
*/
|
|
1985
|
+
icon?: CommonIconNames;
|
|
1986
|
+
/**
|
|
1987
|
+
* Whether the button is active.
|
|
1988
|
+
*/
|
|
1989
|
+
active?: boolean;
|
|
1990
|
+
/**
|
|
1991
|
+
* Whether the button should match width with sibling buttons. <br />
|
|
1992
|
+
* Only used in `SegmentGroup`.
|
|
1993
|
+
* @default false
|
|
1994
|
+
*/
|
|
1995
|
+
matchSiblings?: boolean;
|
|
1996
|
+
/**
|
|
1997
|
+
* The onClick event handler.
|
|
1998
|
+
*/
|
|
1999
|
+
onClick?: (value: V) => void;
|
|
2000
|
+
/**
|
|
2001
|
+
* The link component of the button.
|
|
2002
|
+
* @default 'button'
|
|
2003
|
+
*/
|
|
2004
|
+
as?: 'a' | 'button';
|
|
2005
|
+
/**
|
|
2006
|
+
* The link component of the button.
|
|
2007
|
+
* @default 'button'
|
|
2008
|
+
*/
|
|
2009
|
+
linkComponent?: T;
|
|
2010
|
+
/**
|
|
2011
|
+
* The value of the button.
|
|
2012
|
+
*/
|
|
2013
|
+
value: V;
|
|
2014
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
2015
|
+
|
|
2016
|
+
export declare const SegmentGroup: <T extends default_2.ElementType = "button", V = string>({ children, stretch, onChange, multiSelect, activeButton, disabled, linkComponent, }: SegmentGroupProps<T, V>) => default_2.DetailedReactHTMLElement<{
|
|
2017
|
+
className: string;
|
|
2018
|
+
}, HTMLElement>;
|
|
2019
|
+
|
|
2020
|
+
export declare interface SegmentGroupProps<T extends React.ElementType = 'button', V = string> {
|
|
2021
|
+
/**
|
|
2022
|
+
* The children of the button.
|
|
2023
|
+
*/
|
|
2024
|
+
children: React.ReactElement<SegmentButtonProps<T, V>> | React.ReactElement<SegmentButtonProps<T, V>>[];
|
|
2025
|
+
/**
|
|
2026
|
+
* Make the segment group stretch to fill the container.
|
|
2027
|
+
*/
|
|
2028
|
+
stretch?: boolean;
|
|
2029
|
+
/**
|
|
2030
|
+
* The active button value. <br />
|
|
2031
|
+
* If `multiSelect` is `true`, this should be an array of values. <br />
|
|
2032
|
+
* `V | V[]`
|
|
2033
|
+
*/
|
|
2034
|
+
activeButton?: SegmentValue<V>;
|
|
2035
|
+
/**
|
|
2036
|
+
* Whether to allow multiple selections.
|
|
2037
|
+
*/
|
|
2038
|
+
multiSelect?: boolean;
|
|
2039
|
+
/**
|
|
2040
|
+
* Handle change events.
|
|
2041
|
+
*/
|
|
2042
|
+
onChange?: (value: SegmentValue<V>) => void;
|
|
2043
|
+
/**
|
|
2044
|
+
* The custom link component. <br />
|
|
2045
|
+
* It will be passed to the all `SegmentButton` components.
|
|
2046
|
+
* @default 'button'
|
|
2047
|
+
*/
|
|
2048
|
+
linkComponent?: T;
|
|
2049
|
+
/**
|
|
2050
|
+
* Whether the segment group is disabled.
|
|
2051
|
+
*/
|
|
2052
|
+
disabled?: boolean;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
export declare type SegmentValue<T = string> = T | T[];
|
|
2056
|
+
|
|
2057
|
+
export declare const Select: ({ value, multiple, options, onChange, error, errorMessage, disabled, label, hideLabel, name, id, searchable, allowClearAll, allowSelectAll, selectAllLabel, clearAllLabel, noResultsFoundMessage, onScrollEnd, isLoadingMore, ...props }: SelectProps) => JSX.Element;
|
|
2058
|
+
|
|
2059
|
+
export declare type SelectOption = Omit<PopUpMenuItem, 'id' | 'onClick' | 'disabled' | 'linkComponent' | 'as'> & {
|
|
2060
|
+
/**
|
|
2061
|
+
* The value of the option
|
|
2062
|
+
* @required
|
|
2063
|
+
*/
|
|
2064
|
+
value: string;
|
|
2065
|
+
};
|
|
2066
|
+
|
|
2067
|
+
export declare type SelectProps = Union & {
|
|
2068
|
+
/**
|
|
2069
|
+
* The options of the select.
|
|
2070
|
+
*/
|
|
2071
|
+
options: SelectOption[];
|
|
2072
|
+
/**
|
|
2073
|
+
* The onChange event handler.
|
|
2074
|
+
*/
|
|
2075
|
+
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
2076
|
+
/**
|
|
2077
|
+
* Whether the select has a search input.
|
|
2078
|
+
*/
|
|
2079
|
+
searchable?: boolean;
|
|
2080
|
+
/**
|
|
2081
|
+
* Whether the select has an error.
|
|
2082
|
+
*/
|
|
2083
|
+
error?: boolean;
|
|
2084
|
+
/**
|
|
2085
|
+
* The error message of the select.
|
|
2086
|
+
*/
|
|
2087
|
+
errorMessage?: string;
|
|
2088
|
+
/**
|
|
2089
|
+
* Whether the select is disabled.
|
|
2090
|
+
*/
|
|
2091
|
+
disabled?: boolean;
|
|
2092
|
+
/**
|
|
2093
|
+
* The label of the select.
|
|
2094
|
+
*/
|
|
2095
|
+
label?: string;
|
|
2096
|
+
/**
|
|
2097
|
+
* Whether to hide the label.
|
|
2098
|
+
*/
|
|
2099
|
+
hideLabel?: boolean;
|
|
2100
|
+
/**
|
|
2101
|
+
* The name of the select.
|
|
2102
|
+
*/
|
|
2103
|
+
name: string;
|
|
2104
|
+
/**
|
|
2105
|
+
* The id of the select.
|
|
2106
|
+
*/
|
|
2107
|
+
id?: string;
|
|
2108
|
+
} & Pick<PopUpMenuProps, 'allowClearAll' | 'allowSelectAll' | 'selectAllLabel' | 'clearAllLabel' | 'noResultsFoundMessage' | 'onScrollEnd' | 'isLoadingMore'> & Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
|
2109
|
+
|
|
2110
|
+
export declare const Sheet: {
|
|
2111
|
+
({ open, onClose, children, title, subTitle, closeOnBackdropClick, closeOnEsc, padding, showHandle, size, placement, headerActions, footerActions, stickyFooter, stickyHeader, showCloseButton, showBackArrow, resizable, width, minWidth, maxWidth, onResizeEnd, }: SheetProps): ReactPortal | null;
|
|
2112
|
+
displayName: string;
|
|
2113
|
+
};
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* Global manager for Sheet components to track open sheets
|
|
2117
|
+
*/
|
|
2118
|
+
declare class SheetManager {
|
|
2119
|
+
private readonly openSheets;
|
|
2120
|
+
private readonly closeCallbacks;
|
|
2121
|
+
/**
|
|
2122
|
+
* Register a Sheet as open with its close callback
|
|
2123
|
+
* @param sheetId - Unique identifier for the Sheet
|
|
2124
|
+
* @param closeCallback - Function to close this specific Sheet
|
|
2125
|
+
*/
|
|
2126
|
+
registerOpenSheet(sheetId: string, closeCallback: () => void): void;
|
|
2127
|
+
/**
|
|
2128
|
+
* Unregister a Sheet as closed
|
|
2129
|
+
* @param sheetId - Unique identifier for the Sheet
|
|
2130
|
+
*/
|
|
2131
|
+
unregisterOpenSheet(sheetId: string): void;
|
|
2132
|
+
/**
|
|
2133
|
+
* Close all other Sheets except the specified one
|
|
2134
|
+
* @param excludeSheetId - Sheet ID to exclude from closing
|
|
2135
|
+
*/
|
|
2136
|
+
closeOtherSheets(excludeSheetId: string): void;
|
|
2137
|
+
/**
|
|
2138
|
+
* Check if any Sheets are currently open
|
|
2139
|
+
*/
|
|
2140
|
+
hasOpenSheets(): boolean;
|
|
2141
|
+
/**
|
|
2142
|
+
* Get all currently open Sheet IDs
|
|
2143
|
+
*/
|
|
2144
|
+
getOpenSheets(): string[];
|
|
2145
|
+
/**
|
|
2146
|
+
* Clear all registered Sheets (useful for cleanup)
|
|
2147
|
+
*/
|
|
2148
|
+
clear(): void;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
export declare const sheetManager: SheetManager;
|
|
2152
|
+
|
|
2153
|
+
export declare type SheetProps = UnionPlacement & {
|
|
2154
|
+
/**
|
|
2155
|
+
* Controls whether the sheet is open or closed.
|
|
2156
|
+
*/
|
|
2157
|
+
open: boolean;
|
|
2158
|
+
/**
|
|
2159
|
+
* Callback function called when the sheet is closed.
|
|
2160
|
+
* @default undefined
|
|
2161
|
+
*/
|
|
2162
|
+
onClose: () => void;
|
|
2163
|
+
/**
|
|
2164
|
+
* The main content of the sheet.
|
|
2165
|
+
*/
|
|
2166
|
+
children: ReactNode;
|
|
2167
|
+
/**
|
|
2168
|
+
* The title of the sheet.
|
|
2169
|
+
* @default undefined
|
|
2170
|
+
*/
|
|
2171
|
+
title?: string;
|
|
2172
|
+
/**
|
|
2173
|
+
* The subtitle of the sheet.
|
|
2174
|
+
* @default undefined
|
|
2175
|
+
*/
|
|
2176
|
+
subTitle?: string;
|
|
2177
|
+
/**
|
|
2178
|
+
* Whether clicking the backdrop should close the sheet.
|
|
2179
|
+
* @default true
|
|
2180
|
+
*/
|
|
2181
|
+
closeOnBackdropClick?: boolean;
|
|
2182
|
+
/**
|
|
2183
|
+
* Whether pressing the Escape key should close the sheet.
|
|
2184
|
+
* @default false
|
|
2185
|
+
*/
|
|
2186
|
+
closeOnEsc?: boolean;
|
|
2187
|
+
/**
|
|
2188
|
+
* The padding of the sheet content.
|
|
2189
|
+
* @default 'lg'
|
|
2190
|
+
*/
|
|
2191
|
+
padding?: SpacingKeys;
|
|
2192
|
+
/**
|
|
2193
|
+
* Whether to show the drag handle (typically shown on mobile).
|
|
2194
|
+
* @default true
|
|
2195
|
+
*/
|
|
2196
|
+
showHandle?: boolean;
|
|
2197
|
+
/**
|
|
2198
|
+
* The size of the sheet (affects width on desktop).
|
|
2199
|
+
* On mobile, the sheet always takes full width - 40px.
|
|
2200
|
+
* @default none
|
|
2201
|
+
*/
|
|
2202
|
+
size?: 'sm' | 'md' | 'lg';
|
|
2203
|
+
/**
|
|
2204
|
+
* The footer actions of the sheet.
|
|
2205
|
+
* @default undefined
|
|
2206
|
+
*/
|
|
2207
|
+
footerActions?: ReactNode;
|
|
2208
|
+
/**
|
|
2209
|
+
* The header actions of the sheet.
|
|
2210
|
+
* @default undefined
|
|
2211
|
+
*/
|
|
2212
|
+
headerActions?: ReactNode;
|
|
2213
|
+
/**
|
|
2214
|
+
* Whether to make the footer sticky of the sheet.
|
|
2215
|
+
* @default true
|
|
2216
|
+
*/
|
|
2217
|
+
stickyFooter?: boolean;
|
|
2218
|
+
/**
|
|
2219
|
+
* Whether to make the header sticky of the sheet.
|
|
2220
|
+
* @default true
|
|
2221
|
+
*/
|
|
2222
|
+
stickyHeader?: boolean;
|
|
2223
|
+
/**
|
|
2224
|
+
* Whether to show the close button in the header. <br />
|
|
2225
|
+
* onClose() will be called when the close button is clicked.
|
|
2226
|
+
* @default false
|
|
2227
|
+
*/
|
|
2228
|
+
showCloseButton?: boolean;
|
|
2229
|
+
/**
|
|
2230
|
+
* Whether to show the back button in the header. <br />
|
|
2231
|
+
* onClose() will be called when the back button is clicked.
|
|
2232
|
+
* @default false
|
|
2233
|
+
*/
|
|
2234
|
+
showBackArrow?: boolean;
|
|
2235
|
+
};
|
|
2236
|
+
|
|
2237
|
+
export declare const SideNavigation: <T extends React.ElementType = "a">({ menuItems, utilityItems, open, activeItem, onToggleOpen, onItemClick, linkComponent: LinkComponent, }: SideNavigationProps<T>) => JSX.Element;
|
|
2238
|
+
|
|
2239
|
+
export declare type SideNavigationProps<T extends React.ElementType = 'a'> = {
|
|
2240
|
+
/**
|
|
2241
|
+
* The variant of the component
|
|
2242
|
+
*/
|
|
2243
|
+
open?: boolean;
|
|
2244
|
+
/**
|
|
2245
|
+
* The list of menu items
|
|
2246
|
+
*/
|
|
2247
|
+
menuItems: MenuItem<T>[];
|
|
2248
|
+
/**
|
|
2249
|
+
* The list of utility items to stay at the bottom of the menu
|
|
2250
|
+
*/
|
|
2251
|
+
utilityItems?: MenuItem<T>[];
|
|
2252
|
+
/**
|
|
2253
|
+
* The active item must match the id of the menu item
|
|
2254
|
+
*/
|
|
2255
|
+
activeItem?: string;
|
|
2256
|
+
/**
|
|
2257
|
+
* The component to render for the link
|
|
2258
|
+
*/
|
|
2259
|
+
linkComponent?: T | 'a';
|
|
2260
|
+
/**
|
|
2261
|
+
* The callback to handle the open/close state
|
|
2262
|
+
*/
|
|
2263
|
+
onToggleOpen?: (open: boolean) => void;
|
|
2264
|
+
/**
|
|
2265
|
+
* The callback to handle the item click
|
|
2266
|
+
*/
|
|
2267
|
+
onItemClick?: (item: MenuItem) => void;
|
|
2268
|
+
};
|
|
2269
|
+
|
|
2270
|
+
declare type SideVariant = 'Top' | 'Bottom' | 'Left' | 'Right';
|
|
2271
|
+
|
|
2272
|
+
export declare type SimpleResponsiveStyles<Attr extends string> = {
|
|
2273
|
+
[K in GenerateSimpleResponsiveStyleKeys<Attr>]: Record<SpacingKeys, string>;
|
|
2274
|
+
};
|
|
2275
|
+
|
|
2276
|
+
export declare const Skeleton: ForwardRefExoticComponent<SkeletonProps & RefAttributes<HTMLDivElement>>;
|
|
2277
|
+
|
|
2278
|
+
export declare interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2279
|
+
/**
|
|
2280
|
+
* The animation type of the skeleton.
|
|
2281
|
+
* @default 'pulse'
|
|
2282
|
+
*/
|
|
2283
|
+
animation?: 'pulse' | 'wave' | false;
|
|
2284
|
+
/**
|
|
2285
|
+
* The width of the skeleton.
|
|
2286
|
+
*/
|
|
2287
|
+
width?: number | string;
|
|
2288
|
+
/**
|
|
2289
|
+
* The height of the skeleton.
|
|
2290
|
+
*/
|
|
2291
|
+
height?: number | string;
|
|
2292
|
+
/**
|
|
2293
|
+
* The border radius of the skeleton.
|
|
2294
|
+
* @default 'xs'
|
|
2295
|
+
*/
|
|
2296
|
+
borderRadius?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
/**
|
|
2300
|
+
* Snackbar component for displaying snackbar notifications
|
|
2301
|
+
* Must be used within a SnackbarProvider
|
|
2302
|
+
*
|
|
2303
|
+
* @example
|
|
2304
|
+
* ```tsx
|
|
2305
|
+
* import { SnackbarProvider, Snackbar, useSnackbar } from '@components';
|
|
2306
|
+
*
|
|
2307
|
+
* function App() {
|
|
2308
|
+
* return (
|
|
2309
|
+
* <SnackbarProvider>
|
|
2310
|
+
* <Snackbar />
|
|
2311
|
+
* <YourApp />
|
|
2312
|
+
* </SnackbarProvider>
|
|
2313
|
+
* );
|
|
2314
|
+
* }
|
|
2315
|
+
*
|
|
2316
|
+
* function YourComponent() {
|
|
2317
|
+
* const { snackbar, success, error } = useSnackbar();
|
|
2318
|
+
*
|
|
2319
|
+
* return (
|
|
2320
|
+
* <button onClick={() => success('Operation completed!')}>
|
|
2321
|
+
* Click me
|
|
2322
|
+
* </button>
|
|
2323
|
+
* );
|
|
2324
|
+
* }
|
|
2325
|
+
* ```
|
|
2326
|
+
*/
|
|
2327
|
+
export declare const Snackbar: default_2.FC<SnackbarProps>;
|
|
2328
|
+
|
|
2329
|
+
export declare interface SnackbarItem {
|
|
2330
|
+
/**
|
|
2331
|
+
* Unique identifier for the snackbar
|
|
2332
|
+
*/
|
|
2333
|
+
id: string;
|
|
2334
|
+
/**
|
|
2335
|
+
* Content of the snackbar
|
|
2336
|
+
*/
|
|
2337
|
+
children: string;
|
|
2338
|
+
/**
|
|
2339
|
+
* Timestamp when the snackbar was created
|
|
2340
|
+
*/
|
|
2341
|
+
createdAt: number;
|
|
2342
|
+
/**
|
|
2343
|
+
* Semantic variant of the snackbar
|
|
2344
|
+
*/
|
|
2345
|
+
variant: SnackbarVariant;
|
|
2346
|
+
/**
|
|
2347
|
+
* Placement of the snackbar on screen
|
|
2348
|
+
*/
|
|
2349
|
+
placement: SnackbarPlacement;
|
|
2350
|
+
/**
|
|
2351
|
+
* Whether to show the close button
|
|
2352
|
+
*/
|
|
2353
|
+
showCloseButton: boolean;
|
|
2354
|
+
/**
|
|
2355
|
+
* Icon to display in the snackbar
|
|
2356
|
+
*/
|
|
2357
|
+
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
2358
|
+
/**
|
|
2359
|
+
* Label for the action button
|
|
2360
|
+
*/
|
|
2361
|
+
actionLabel?: string;
|
|
2362
|
+
/**
|
|
2363
|
+
* Action to perform when the action button is clicked
|
|
2364
|
+
*/
|
|
2365
|
+
onAction?: (id: string) => void;
|
|
2366
|
+
/**
|
|
2367
|
+
* Callback when close button is clicked
|
|
2368
|
+
*/
|
|
2369
|
+
onClose?: (id: string) => void;
|
|
2370
|
+
/**
|
|
2371
|
+
* Duration in milliseconds before auto-dismissing (0 = no auto-dismiss)
|
|
2372
|
+
*/
|
|
2373
|
+
duration: number;
|
|
2374
|
+
/**
|
|
2375
|
+
* Whether the snackbar is currently being removed
|
|
2376
|
+
*/
|
|
2377
|
+
isRemoving?: boolean;
|
|
2378
|
+
}
|
|
2379
|
+
|
|
2380
|
+
export declare interface SnackbarOptions {
|
|
2381
|
+
/**
|
|
2382
|
+
* The semantic variant of the Snackbar
|
|
2383
|
+
*/
|
|
2384
|
+
variant?: SnackbarVariant;
|
|
2385
|
+
/**
|
|
2386
|
+
* Placement of the snackbar on screen
|
|
2387
|
+
* @default 'top-right'
|
|
2388
|
+
*/
|
|
2389
|
+
placement?: SnackbarPlacement;
|
|
2390
|
+
/**
|
|
2391
|
+
* Whether to show the close button
|
|
2392
|
+
*/
|
|
2393
|
+
showCloseButton?: boolean;
|
|
2394
|
+
/**
|
|
2395
|
+
* Icon to display in the Snackbar
|
|
2396
|
+
*/
|
|
2397
|
+
icon?: CommonIconNames | Omit<IconProps, 'size' | 'color'>;
|
|
2398
|
+
/**
|
|
2399
|
+
* Label for the action button
|
|
2400
|
+
*/
|
|
2401
|
+
actionLabel?: string;
|
|
2402
|
+
/**
|
|
2403
|
+
* Action to perform when the action button is clicked
|
|
2404
|
+
*/
|
|
2405
|
+
onAction?: (id: string) => void;
|
|
2406
|
+
/**
|
|
2407
|
+
* Callback when close button is clicked
|
|
2408
|
+
*/
|
|
2409
|
+
onClose?: (id: string) => void;
|
|
2410
|
+
/**
|
|
2411
|
+
* Duration in milliseconds before auto-dismissing (0 = no auto-dismiss)
|
|
2412
|
+
*/
|
|
2413
|
+
duration?: number;
|
|
2414
|
+
/**
|
|
2415
|
+
* Custom ID for the snackbar
|
|
2416
|
+
*/
|
|
2417
|
+
id?: string;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
export declare type SnackbarPlacement = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
2421
|
+
|
|
2422
|
+
export declare type SnackbarProps = Record<string, never>;
|
|
2423
|
+
|
|
2424
|
+
export declare const SnackbarProvider: default_2.FC<SnackbarProviderProps>;
|
|
2425
|
+
|
|
2426
|
+
declare interface SnackbarProviderProps {
|
|
2427
|
+
children: default_2.ReactNode;
|
|
2428
|
+
maxSnackbars?: number;
|
|
2429
|
+
defaultDuration?: number;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
export declare type SnackbarVariant = 'default' | 'positive' | 'warning' | 'error' | 'subtle';
|
|
2433
|
+
|
|
2434
|
+
export declare type SpacingKeys = 'none' | 'xs2' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xl2' | 'xl3' | 'xl4' | 'xl5' | 'xl6' | 'xl7';
|
|
2435
|
+
|
|
2436
|
+
export declare const Stack: ForwardRefExoticComponent<StackProps & RefAttributes<HTMLSpanElement>>;
|
|
2437
|
+
|
|
2438
|
+
export declare interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2439
|
+
/**
|
|
2440
|
+
* The children of the button.
|
|
2441
|
+
*/
|
|
2442
|
+
children: ReactNode;
|
|
2443
|
+
/**
|
|
2444
|
+
* Define gap between elements
|
|
2445
|
+
*/
|
|
2446
|
+
gap?: ResponsiveType<SpacingKeys>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Define the direction of the stack
|
|
2449
|
+
*/
|
|
2450
|
+
direction?: ResponsiveType<FlexDirection>;
|
|
2451
|
+
/**
|
|
2452
|
+
* Define how to justify the content
|
|
2453
|
+
* All CSS properties from `justify-content` are accepted
|
|
2454
|
+
*/
|
|
2455
|
+
justify?: ResponsiveType<JustifyContent>;
|
|
2456
|
+
/**
|
|
2457
|
+
* Define how to align the items
|
|
2458
|
+
* All CSS properties from `align-items` are accepted
|
|
2459
|
+
* @default 'baseline'
|
|
2460
|
+
*/
|
|
2461
|
+
align?: ResponsiveType<AlignItems>;
|
|
2462
|
+
/**
|
|
2463
|
+
* Define how to align the items
|
|
2464
|
+
* All CSS properties from `flex-wrap` are accepted
|
|
2465
|
+
*/
|
|
2466
|
+
wrap?: ResponsiveType<FlexWrap>;
|
|
2467
|
+
/**
|
|
2468
|
+
* Define padding to the stack wrapper.
|
|
2469
|
+
*/
|
|
2470
|
+
padding?: ResponsiveType<Padding>;
|
|
2471
|
+
/**
|
|
2472
|
+
* Define margin to the stack wrapper.
|
|
2473
|
+
*/
|
|
2474
|
+
margin?: ResponsiveType<Margin>;
|
|
2475
|
+
/**
|
|
2476
|
+
* @deprecated Use the `height`, `width`, `minHeight`, `maxHeight`, `minWidth`, `maxWidth` props instead.
|
|
2477
|
+
*/
|
|
2478
|
+
className?: string;
|
|
2479
|
+
/**
|
|
2480
|
+
* The height of the stack.
|
|
2481
|
+
* @default 'auto'
|
|
2482
|
+
*/
|
|
2483
|
+
height?: ResponsiveType<number | string>;
|
|
2484
|
+
/**
|
|
2485
|
+
* The width of the stack.
|
|
2486
|
+
* @default '100%'
|
|
2487
|
+
*/
|
|
2488
|
+
width?: ResponsiveType<number | string>;
|
|
2489
|
+
/**
|
|
2490
|
+
* The min height of the stack.
|
|
2491
|
+
* @default 'auto'
|
|
2492
|
+
*/
|
|
2493
|
+
minHeight?: ResponsiveType<number | string>;
|
|
2494
|
+
/**
|
|
2495
|
+
* The max height of the stack.
|
|
2496
|
+
* @default 'auto'
|
|
2497
|
+
*/
|
|
2498
|
+
maxHeight?: ResponsiveType<number | string>;
|
|
2499
|
+
/**
|
|
2500
|
+
* The min width of the stack.
|
|
2501
|
+
* @default 'auto'
|
|
2502
|
+
*/
|
|
2503
|
+
minWidth?: ResponsiveType<number | string>;
|
|
2504
|
+
/**
|
|
2505
|
+
* The max width of the stack.
|
|
2506
|
+
* @default 'auto'
|
|
2507
|
+
*/
|
|
2508
|
+
maxWidth?: ResponsiveType<number | string>;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
export declare const Switch: default_2.ForwardRefExoticComponent<SwitchProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
2512
|
+
|
|
2513
|
+
export declare interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
2514
|
+
/**
|
|
2515
|
+
* Whether the switch is checked.
|
|
2516
|
+
*/
|
|
2517
|
+
checked?: boolean;
|
|
2518
|
+
/**
|
|
2519
|
+
* Whether the switch is disabled.
|
|
2520
|
+
*/
|
|
2521
|
+
disabled?: boolean;
|
|
2522
|
+
/**
|
|
2523
|
+
* Handle change events.
|
|
2524
|
+
*/
|
|
2525
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
2526
|
+
/**
|
|
2527
|
+
* Whether to show icons on the switch.
|
|
2528
|
+
*/
|
|
2529
|
+
withIcons?: boolean | IconStates;
|
|
2530
|
+
/**
|
|
2531
|
+
* The labels for the switch.
|
|
2532
|
+
*/
|
|
2533
|
+
label?: string | LabelStates;
|
|
2534
|
+
/**
|
|
2535
|
+
* The placement of the label.
|
|
2536
|
+
* @default 'left'
|
|
2537
|
+
*/
|
|
2538
|
+
labelPlacement?: 'left' | 'right';
|
|
2539
|
+
/**
|
|
2540
|
+
* How the switch and label are aligned horizontally.
|
|
2541
|
+
*/
|
|
2542
|
+
justify?: JustifyContent;
|
|
2543
|
+
/**
|
|
2544
|
+
* The value of the switch.
|
|
2545
|
+
*/
|
|
2546
|
+
value?: string;
|
|
2547
|
+
/**
|
|
2548
|
+
* The name of the switch.
|
|
2549
|
+
*/
|
|
2550
|
+
name?: string;
|
|
2551
|
+
/**
|
|
2552
|
+
* The id of the switch.
|
|
2553
|
+
* @default auto-generated
|
|
2554
|
+
*/
|
|
2555
|
+
id?: string;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
declare type TabItem<T extends React.ElementType = 'button'> = {
|
|
2559
|
+
label: string;
|
|
2560
|
+
icon?: CommonIconNames;
|
|
2561
|
+
iconPosition?: 'left' | 'top';
|
|
2562
|
+
hideLabel?: boolean;
|
|
2563
|
+
hasActivity?: boolean;
|
|
2564
|
+
id: string;
|
|
2565
|
+
} & Omit<React.ComponentPropsWithoutRef<T>, 'children'>;
|
|
2566
|
+
|
|
2567
|
+
export declare const Table: {
|
|
2568
|
+
<T extends readonly TableColumnProps[]>({ data, columns, title, subtitle, actions, filters, footer, orderBy, onOrderByChange, emptyState, hiddenColumns, loading, expandedRows, }: TableProps<T>): JSX.Element;
|
|
2569
|
+
displayName: string;
|
|
2570
|
+
};
|
|
2571
|
+
|
|
2572
|
+
export declare type TableColumnDirection = (typeof direction)[keyof typeof direction];
|
|
2573
|
+
|
|
2574
|
+
export declare interface TableColumnProps extends React.HTMLAttributes<HTMLTableColElement> {
|
|
2575
|
+
/**
|
|
2576
|
+
* The children of the Table.
|
|
2577
|
+
*/
|
|
2578
|
+
label: React.ReactNode;
|
|
2579
|
+
/**
|
|
2580
|
+
* The id of the Table column.
|
|
2581
|
+
*/
|
|
2582
|
+
id: string;
|
|
2583
|
+
/**
|
|
2584
|
+
* The alignment of the Table column.
|
|
2585
|
+
*/
|
|
2586
|
+
align?: ColumnAlign;
|
|
2587
|
+
/**
|
|
2588
|
+
* The width of the Table column.
|
|
2589
|
+
*/
|
|
2590
|
+
width?: string;
|
|
2591
|
+
/**
|
|
2592
|
+
* The minimum width of the Table column.
|
|
2593
|
+
*/
|
|
2594
|
+
minWidth?: string;
|
|
2595
|
+
/**
|
|
2596
|
+
* If true, the column is orderable.
|
|
2597
|
+
*/
|
|
2598
|
+
orderable?: boolean;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
export declare interface TableProps<T extends readonly TableColumnProps[] = readonly TableColumnProps[]> extends React.HTMLAttributes<HTMLTableElement> {
|
|
2602
|
+
/**
|
|
2603
|
+
* The title of the Table.
|
|
2604
|
+
*/
|
|
2605
|
+
title?: string;
|
|
2606
|
+
/**
|
|
2607
|
+
* The subtitle of the Table.
|
|
2608
|
+
*/
|
|
2609
|
+
subtitle?: string;
|
|
2610
|
+
/**
|
|
2611
|
+
* The action of the Table.
|
|
2612
|
+
*/
|
|
2613
|
+
actions?: React.ReactNode;
|
|
2614
|
+
/**
|
|
2615
|
+
* The filters of the Table.
|
|
2616
|
+
*/
|
|
2617
|
+
filters?: React.ReactNode;
|
|
2618
|
+
/**
|
|
2619
|
+
* The data rows of the Table.
|
|
2620
|
+
*/
|
|
2621
|
+
data: TableRowData<T>[];
|
|
2622
|
+
/**
|
|
2623
|
+
* The loading state of the Table.
|
|
2624
|
+
*/
|
|
2625
|
+
loading?: boolean;
|
|
2626
|
+
/**
|
|
2627
|
+
* The columns of the Table.
|
|
2628
|
+
*/
|
|
2629
|
+
columns: T;
|
|
2630
|
+
/**
|
|
2631
|
+
* The hidden columns of the Table.
|
|
2632
|
+
*/
|
|
2633
|
+
hiddenColumns?: ColumnId<T>[];
|
|
2634
|
+
/**
|
|
2635
|
+
* The expanded rows of the Table.
|
|
2636
|
+
*/
|
|
2637
|
+
expandedRows?: string[];
|
|
2638
|
+
/**
|
|
2639
|
+
* The order by of the Table.
|
|
2640
|
+
*/
|
|
2641
|
+
orderBy?: {
|
|
2642
|
+
column: ColumnId<T>;
|
|
2643
|
+
direction: TableColumnDirection;
|
|
2644
|
+
};
|
|
2645
|
+
/**
|
|
2646
|
+
* Callback function to handle order by change.
|
|
2647
|
+
*/
|
|
2648
|
+
onOrderByChange?: ({ columnId, direction, }: {
|
|
2649
|
+
columnId: ColumnId<T>;
|
|
2650
|
+
direction: TableColumnDirection;
|
|
2651
|
+
}) => void;
|
|
2652
|
+
/**
|
|
2653
|
+
* The empty state of the Table.
|
|
2654
|
+
* @default 'Keine Daten gefunden'
|
|
2655
|
+
*/
|
|
2656
|
+
emptyState?: React.ReactNode;
|
|
2657
|
+
/**
|
|
2658
|
+
* The footer of the Table.
|
|
2659
|
+
*/
|
|
2660
|
+
footer?: React.ReactNode;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
export declare type TableRowData<T extends readonly TableColumnProps[]> = {
|
|
2664
|
+
[K in ColumnId<T>]: React.ReactNode;
|
|
2665
|
+
} & {
|
|
2666
|
+
expandableRow?: ExpandableRowConfig;
|
|
2667
|
+
};
|
|
2668
|
+
|
|
2669
|
+
export declare const Tabs: {
|
|
2670
|
+
<T extends React.ElementType = "button">({ items, activeItem, onChange, hideBorder, itemsAlignment, isSticky, panels, linkComponent: LinkComponent, }: TabsProps<T>): JSX.Element;
|
|
2671
|
+
displayName: string;
|
|
2672
|
+
};
|
|
2673
|
+
|
|
2674
|
+
export declare interface TabsProps<T extends React.ElementType = 'button'> {
|
|
2675
|
+
/**
|
|
2676
|
+
* The items to display in the tabs.
|
|
2677
|
+
*/
|
|
2678
|
+
items: TabItem<T>[];
|
|
2679
|
+
/**
|
|
2680
|
+
* Whether the tabs are sticky.
|
|
2681
|
+
*/
|
|
2682
|
+
isSticky?: boolean;
|
|
2683
|
+
/**
|
|
2684
|
+
* The panels to display in the tabs.
|
|
2685
|
+
*/
|
|
2686
|
+
panels?: Panel[];
|
|
2687
|
+
/**
|
|
2688
|
+
* The active item in the tabs.
|
|
2689
|
+
*/
|
|
2690
|
+
activeItem: string;
|
|
2691
|
+
/**
|
|
2692
|
+
* The callback function to handle the change of the active item.
|
|
2693
|
+
*/
|
|
2694
|
+
onChange?: (item: TabItem<T>) => void;
|
|
2695
|
+
/**
|
|
2696
|
+
* Whether to hide the border of the tabs.
|
|
2697
|
+
*/
|
|
2698
|
+
hideBorder?: boolean;
|
|
2699
|
+
/**
|
|
2700
|
+
* The link component to use for the tabs.
|
|
2701
|
+
*/
|
|
2702
|
+
linkComponent?: T | 'button' | 'a';
|
|
2703
|
+
/**
|
|
2704
|
+
* The alignment of the tabs.
|
|
2705
|
+
*/
|
|
2706
|
+
itemsAlignment?: 'left' | 'center' | 'right' | 'between' | 'around' | 'evenly';
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
export declare const Tag: ForwardRefExoticComponent<TagProps & RefAttributes<HTMLSpanElement>>;
|
|
2710
|
+
|
|
2711
|
+
export declare interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
2712
|
+
/**
|
|
2713
|
+
* The label of the tag.
|
|
2714
|
+
*/
|
|
2715
|
+
label: string;
|
|
2716
|
+
/**
|
|
2717
|
+
* The variant of the tag
|
|
2718
|
+
*/
|
|
2719
|
+
variant?: 'solid' | 'outlined' | 'ghost';
|
|
2720
|
+
/**
|
|
2721
|
+
* The color of the tag
|
|
2722
|
+
*/
|
|
2723
|
+
color?: 'green' | 'yellow' | 'pink' | 'steel-blue' | 'error' | 'primary' | 'neutral';
|
|
2724
|
+
/**
|
|
2725
|
+
* The tone of the tag `color` <br />
|
|
2726
|
+
* Only works with `variant` set to `solid`
|
|
2727
|
+
*/
|
|
2728
|
+
tone?: 'dark' | 'light';
|
|
2729
|
+
/**
|
|
2730
|
+
* The size of the tag
|
|
2731
|
+
*/
|
|
2732
|
+
size?: 'large' | 'medium' | 'small';
|
|
2733
|
+
/**
|
|
2734
|
+
* The icon of the tag
|
|
2735
|
+
*/
|
|
2736
|
+
icon?: CommonIconNames;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
export declare const Textarea: ForwardRefExoticComponent<TextareaProps & RefAttributes<HTMLTextAreaElement>>;
|
|
2740
|
+
|
|
2741
|
+
export declare interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'className' | 'style'> {
|
|
2742
|
+
/**
|
|
2743
|
+
* If true, the textarea will display an error state.
|
|
2744
|
+
*/
|
|
2745
|
+
error?: boolean;
|
|
2746
|
+
/**
|
|
2747
|
+
* The value of the textarea.
|
|
2748
|
+
*/
|
|
2749
|
+
value?: string;
|
|
2750
|
+
/**
|
|
2751
|
+
* The error message to display below the textarea.
|
|
2752
|
+
*/
|
|
2753
|
+
errorMessage?: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* The maximum length of the textarea.
|
|
2756
|
+
*/
|
|
2757
|
+
maxLength?: number;
|
|
2758
|
+
/**
|
|
2759
|
+
* The actions to display below the textarea.
|
|
2760
|
+
*/
|
|
2761
|
+
actions?: React.ReactNode;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
export declare const TextField: ForwardRefExoticComponent<TextFieldProps & RefAttributes<HTMLInputElement>>;
|
|
2765
|
+
|
|
2766
|
+
export declare interface TextFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
2767
|
+
/**
|
|
2768
|
+
* The label that will be displayed above the input. <br />
|
|
2769
|
+
* It is required for accessibility purposes.
|
|
2770
|
+
*/
|
|
2771
|
+
label: string;
|
|
2772
|
+
/**
|
|
2773
|
+
* When true, the input applies the error style. <br />
|
|
2774
|
+
* Will also display the error message is any is provided.
|
|
2775
|
+
*/
|
|
2776
|
+
error?: boolean;
|
|
2777
|
+
/**
|
|
2778
|
+
* The error message that will be displayed below the input. <br />
|
|
2779
|
+
* It is only displayed when the error prop is true.
|
|
2780
|
+
*/
|
|
2781
|
+
errorMessage?: string;
|
|
2782
|
+
/**
|
|
2783
|
+
* The value of the input. <br />
|
|
2784
|
+
*/
|
|
2785
|
+
value?: string;
|
|
2786
|
+
/**
|
|
2787
|
+
* The placeholder that will be displayed inside the input. <br />
|
|
2788
|
+
* If the label is visible, it will be shown in its active state.
|
|
2789
|
+
*/
|
|
2790
|
+
placeholder?: string;
|
|
2791
|
+
/**
|
|
2792
|
+
* The density of the input will control the size of the input.
|
|
2793
|
+
*/
|
|
2794
|
+
density?: ResponsiveType<Density>;
|
|
2795
|
+
/**
|
|
2796
|
+
* If true the label will be hidden. <br />
|
|
2797
|
+
* This will apply only visually, the label will still be present in the DOM for accessibility purposes.
|
|
2798
|
+
*/
|
|
2799
|
+
hideLabel?: boolean;
|
|
2800
|
+
/**
|
|
2801
|
+
* Make the input disabled.
|
|
2802
|
+
*/
|
|
2803
|
+
disabled?: boolean;
|
|
2804
|
+
/**
|
|
2805
|
+
* Make the input focused in a controlled way.
|
|
2806
|
+
*/
|
|
2807
|
+
isFocused?: boolean;
|
|
2808
|
+
/**
|
|
2809
|
+
* Make the input clearable. <br />
|
|
2810
|
+
* When true, a clear button will be displayed on the right side of the input. <br />
|
|
2811
|
+
* When there's a icon placed on the right side of the input, the clear button will be hidden. <br />
|
|
2812
|
+
* Important: only works with controlled inputs.
|
|
2813
|
+
*/
|
|
2814
|
+
clearable?: boolean;
|
|
2815
|
+
/**
|
|
2816
|
+
* The icon that will be displayed on the left side of the input.
|
|
2817
|
+
*/
|
|
2818
|
+
icon?: CommonIconNames;
|
|
2819
|
+
/**
|
|
2820
|
+
* The action that will be triggered when the icon is clicked.
|
|
2821
|
+
*/
|
|
2822
|
+
onIconClick?: () => void;
|
|
2823
|
+
/**
|
|
2824
|
+
* This prop controls the position of the icon.
|
|
2825
|
+
*/
|
|
2826
|
+
iconPosition?: 'left' | 'right';
|
|
2827
|
+
/**
|
|
2828
|
+
* Callback function that will be called when the input changes.
|
|
2829
|
+
*/
|
|
2830
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
export declare const Tooltip: ({ children, content, placement, disabled, }: TooltipProps) => JSX.Element;
|
|
2834
|
+
|
|
2835
|
+
export declare interface TooltipProps {
|
|
2836
|
+
/**
|
|
2837
|
+
* The trigger element that the tooltip is attached to
|
|
2838
|
+
*/
|
|
2839
|
+
children: React.ReactNode;
|
|
2840
|
+
/**
|
|
2841
|
+
* The content to be displayed in the tooltip
|
|
2842
|
+
*/
|
|
2843
|
+
content: React.ReactNode;
|
|
2844
|
+
/**
|
|
2845
|
+
* The position of the tooltip relative to its trigger
|
|
2846
|
+
*/
|
|
2847
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
2848
|
+
/**
|
|
2849
|
+
* Whether the tooltip should be disabled
|
|
2850
|
+
*/
|
|
2851
|
+
disabled?: boolean;
|
|
2852
|
+
/**
|
|
2853
|
+
* Whether the tooltip should be open
|
|
2854
|
+
*/
|
|
2855
|
+
isOpen?: boolean;
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
export declare const TopBar: ({ leftBottomContent, subtitle, leftTopContent, rightTopContent, rightBottomContent, density, }: TopBarProps) => JSX.Element;
|
|
2859
|
+
|
|
2860
|
+
export declare interface TopBarProps {
|
|
2861
|
+
/**
|
|
2862
|
+
* The content to be displayed in the left top section.
|
|
2863
|
+
*/
|
|
2864
|
+
leftTopContent?: ReactNode;
|
|
2865
|
+
/**
|
|
2866
|
+
* The content to be displayed in the right top section.
|
|
2867
|
+
*/
|
|
2868
|
+
rightTopContent?: ReactNode;
|
|
2869
|
+
/**
|
|
2870
|
+
* The content to be displayed in the left bottom section.
|
|
2871
|
+
*/
|
|
2872
|
+
leftBottomContent?: string | ReactNode;
|
|
2873
|
+
/**
|
|
2874
|
+
* The content to be displayed in the right bottom section.
|
|
2875
|
+
*/
|
|
2876
|
+
rightBottomContent?: ReactNode;
|
|
2877
|
+
/**
|
|
2878
|
+
* The subtitle to be displayed bellow the bottom section.
|
|
2879
|
+
*/
|
|
2880
|
+
subtitle?: string;
|
|
2881
|
+
/**
|
|
2882
|
+
* The density of the top bar. It can be used to adjust the spacing and font sizes.
|
|
2883
|
+
*/
|
|
2884
|
+
density?: 'default' | '-2' | '-4';
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
export declare const Typography: ({ children, variant, size, as: AsComponent, color, textAlign, truncate, textTransform, hyphenate, wrap, ...props }: TypographyProps) => JSX.Element;
|
|
2888
|
+
|
|
2889
|
+
declare type TypographyElements = 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
2890
|
+
|
|
2891
|
+
export declare type TypographyProps<T extends TypographyElements = 'p'> = Omit<React.ComponentPropsWithoutRef<T>, 'as' | 'children'> & {
|
|
2892
|
+
/**
|
|
2893
|
+
* The children of the typography.
|
|
2894
|
+
*/
|
|
2895
|
+
children: React.ReactNode;
|
|
2896
|
+
/**
|
|
2897
|
+
* The variant is used
|
|
2898
|
+
*/
|
|
2899
|
+
variant?: 'display' | 'body' | 'title' | 'headline' | 'label';
|
|
2900
|
+
/**
|
|
2901
|
+
* The size of the typography.
|
|
2902
|
+
*/
|
|
2903
|
+
size?: 'small' | 'medium' | 'large';
|
|
2904
|
+
/**
|
|
2905
|
+
* The html element of the typography. The TS type of the chosen element will be extended so you the component will accept all the props of the chosen element.
|
|
2906
|
+
*/
|
|
2907
|
+
as?: 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
2908
|
+
/**
|
|
2909
|
+
* The text alignment of the typography.
|
|
2910
|
+
*/
|
|
2911
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
2912
|
+
/**
|
|
2913
|
+
* CSS text-transform property
|
|
2914
|
+
*/
|
|
2915
|
+
textTransform?: 'uppercase' | 'lowercase' | 'capitalize';
|
|
2916
|
+
/**
|
|
2917
|
+
* The color of the typography.
|
|
2918
|
+
*/
|
|
2919
|
+
color?: ForegroundColors;
|
|
2920
|
+
/**
|
|
2921
|
+
* If true, the text will be hyphenated based on the `lang` attribute of the parent element.
|
|
2922
|
+
* @default true
|
|
2923
|
+
*/
|
|
2924
|
+
hyphenate?: boolean;
|
|
2925
|
+
/**
|
|
2926
|
+
* Sets a specific amount of lines to show based on it's container.
|
|
2927
|
+
* The text that doesn't fit the container will be hidden and replaced by ellipsis
|
|
2928
|
+
*/
|
|
2929
|
+
truncate?: number;
|
|
2930
|
+
/**
|
|
2931
|
+
* If true, the text will be wrapped.
|
|
2932
|
+
*/
|
|
2933
|
+
wrap?: boolean;
|
|
2934
|
+
};
|
|
2935
|
+
|
|
2936
|
+
declare type Union = {
|
|
2937
|
+
/**
|
|
2938
|
+
* Whether the select is multiple.
|
|
2939
|
+
*/
|
|
2940
|
+
multiple?: true;
|
|
2941
|
+
/**
|
|
2942
|
+
* The value of the select.
|
|
2943
|
+
*/
|
|
2944
|
+
value?: string[];
|
|
2945
|
+
} | {
|
|
2946
|
+
/**
|
|
2947
|
+
* Whether the select is multiple.
|
|
2948
|
+
*/
|
|
2949
|
+
multiple?: false;
|
|
2950
|
+
/**
|
|
2951
|
+
* The value of the select.
|
|
2952
|
+
*/
|
|
2953
|
+
value?: string;
|
|
2954
|
+
};
|
|
2955
|
+
|
|
2956
|
+
declare type UnionAs = ({
|
|
2957
|
+
/**
|
|
2958
|
+
* The component to render the button as.
|
|
2959
|
+
* @default button
|
|
2960
|
+
*/
|
|
2961
|
+
as?: 'a';
|
|
2962
|
+
} & Omit<React.ComponentProps<'a'>, 'className'>) | ({
|
|
2963
|
+
as?: 'button';
|
|
2964
|
+
} & Omit<React.ComponentProps<'button'>, 'className'>) | ({
|
|
2965
|
+
as?: 'span';
|
|
2966
|
+
} & Omit<React.ComponentProps<'span'>, 'className'>);
|
|
2967
|
+
|
|
2968
|
+
declare type UnionAs_2 = ({
|
|
2969
|
+
/**
|
|
2970
|
+
* The component to render the button as.
|
|
2971
|
+
* @default button
|
|
2972
|
+
*/
|
|
2973
|
+
as?: 'a';
|
|
2974
|
+
} & Omit<React.ComponentProps<'a'>, 'className' | 'ref' | 'role' | 'tabIndex' | 'onClick' | 'disabled'>) | ({
|
|
2975
|
+
/**
|
|
2976
|
+
* The component to render the button as.
|
|
2977
|
+
* @default button
|
|
2978
|
+
*/
|
|
2979
|
+
as?: 'button';
|
|
2980
|
+
} & Omit<React.ComponentProps<'button'>, 'className' | 'type' | 'onClick' | 'disabled' | 'ref' | 'role' | 'tabIndex'>);
|
|
2981
|
+
|
|
2982
|
+
declare type UnionPlacement = {
|
|
2983
|
+
/**
|
|
2984
|
+
* The placement of the sheet.
|
|
2985
|
+
* - 'bottom': Slides up from bottom, centered horizontally
|
|
2986
|
+
* - 'right': Slides in from right, full screen on mobile, max-width 570px on desktop
|
|
2987
|
+
* @default 'bottom'
|
|
2988
|
+
*/
|
|
2989
|
+
placement?: 'bottom';
|
|
2990
|
+
/**
|
|
2991
|
+
* Whether to make the sheet resizable. <br />
|
|
2992
|
+
* only available for right placement.
|
|
2993
|
+
* @default never
|
|
2994
|
+
*/
|
|
2995
|
+
resizable?: never;
|
|
2996
|
+
/**
|
|
2997
|
+
* Custom width for the sheet in pixels. <br />
|
|
2998
|
+
* only available for right placement.
|
|
2999
|
+
* @default never
|
|
3000
|
+
*/
|
|
3001
|
+
width?: never;
|
|
3002
|
+
/**
|
|
3003
|
+
* Minimum width for the sheet in pixels. <br />
|
|
3004
|
+
* only available for right placement.
|
|
3005
|
+
* @default never
|
|
3006
|
+
*/
|
|
3007
|
+
minWidth?: never;
|
|
3008
|
+
/**
|
|
3009
|
+
* Maximum width for the sheet in pixels. <br />
|
|
3010
|
+
* only available for right placement.
|
|
3011
|
+
* @default never
|
|
3012
|
+
*/
|
|
3013
|
+
maxWidth?: never;
|
|
3014
|
+
/**
|
|
3015
|
+
* Callback function called when the sheet resize finishes. <br />
|
|
3016
|
+
* only available for right placement.
|
|
3017
|
+
* @default never
|
|
3018
|
+
*/
|
|
3019
|
+
onResizeEnd?: never;
|
|
3020
|
+
} | {
|
|
3021
|
+
/**
|
|
3022
|
+
* The placement of the sheet.
|
|
3023
|
+
* - 'bottom': Slides up from bottom, centered horizontally
|
|
3024
|
+
* - 'right': Slides in from right, full screen on mobile, max-width 570px on desktop
|
|
3025
|
+
* @default 'bottom'
|
|
3026
|
+
*/
|
|
3027
|
+
placement?: 'right';
|
|
3028
|
+
/**
|
|
3029
|
+
* Whether to make the sheet resizable. <br />
|
|
3030
|
+
* Only available for right placement on desktop (768px/mobile breakpoint and above). <br />
|
|
3031
|
+
* On mobile, the sheet always takes 100% width and is not resizable.
|
|
3032
|
+
* @default false
|
|
3033
|
+
*/
|
|
3034
|
+
resizable?: boolean;
|
|
3035
|
+
/**
|
|
3036
|
+
* Custom width for the sheet. <br />
|
|
3037
|
+
* Accepts a number (pixels) or string (e.g., "50%", "30rem"). <br />
|
|
3038
|
+
* Will not go below the minimum width (default 570px or custom minWidth). <br />
|
|
3039
|
+
* Only available for right placement on desktop (768px/mobile breakpoint and above). <br />
|
|
3040
|
+
* On mobile, the sheet always takes 100% width.
|
|
3041
|
+
* @default undefined
|
|
3042
|
+
*/
|
|
3043
|
+
width?: number | string;
|
|
3044
|
+
/**
|
|
3045
|
+
* Minimum width for the sheet. <br />
|
|
3046
|
+
* Accepts a number (pixels) or string (e.g., "50%", "30rem"). <br />
|
|
3047
|
+
* Note: The absolute minimum of 570px is always enforced, regardless of this setting. <br />
|
|
3048
|
+
* Only available for right placement on desktop (768px/mobile breakpoint and above).
|
|
3049
|
+
* @default 570
|
|
3050
|
+
*/
|
|
3051
|
+
minWidth?: number | string;
|
|
3052
|
+
/**
|
|
3053
|
+
* Maximum width for the sheet. <br />
|
|
3054
|
+
* Accepts a number (pixels) or string (e.g., "80%", "50rem"). <br />
|
|
3055
|
+
* Only available for right placement on desktop (768px/mobile breakpoint and above).
|
|
3056
|
+
* @default undefined
|
|
3057
|
+
*/
|
|
3058
|
+
maxWidth?: number | string;
|
|
3059
|
+
/**
|
|
3060
|
+
* Callback function called when the sheet resize finishes. <br />
|
|
3061
|
+
* Provides the new width in pixels. <br />
|
|
3062
|
+
* Only available for right placement on desktop (768px/mobile breakpoint and above).
|
|
3063
|
+
* @param width - The new width of the sheet in pixels
|
|
3064
|
+
* @default undefined
|
|
3065
|
+
*/
|
|
3066
|
+
onResizeEnd?: (width: number) => void;
|
|
3067
|
+
};
|
|
3068
|
+
|
|
3069
|
+
export declare const Uploader: ForwardRefExoticComponent<UploaderProps & RefAttributes<UploaderRef>>;
|
|
3070
|
+
|
|
3071
|
+
/**
|
|
3072
|
+
* Context value provided by the Uploader component.
|
|
3073
|
+
* Contains all state and methods needed by child components.
|
|
3074
|
+
*/
|
|
3075
|
+
export declare interface UploaderContextValue {
|
|
3076
|
+
/**
|
|
3077
|
+
* Current list of files in the uploader.
|
|
3078
|
+
*/
|
|
3079
|
+
files: FileItem[];
|
|
3080
|
+
/**
|
|
3081
|
+
* Whether files are currently being processed.
|
|
3082
|
+
*/
|
|
3083
|
+
isProcessing: boolean;
|
|
3084
|
+
/**
|
|
3085
|
+
* Current component-level error, if any.
|
|
3086
|
+
*/
|
|
3087
|
+
componentError: {
|
|
3088
|
+
code: COMPONENT_ERROR;
|
|
3089
|
+
message: string;
|
|
3090
|
+
} | null;
|
|
3091
|
+
/**
|
|
3092
|
+
* List of files that were rejected during validation.
|
|
3093
|
+
*/
|
|
3094
|
+
rejectedFiles: RejectedFile[];
|
|
3095
|
+
/**
|
|
3096
|
+
* Whether files are being dragged over the drop zone.
|
|
3097
|
+
*/
|
|
3098
|
+
isDragging: boolean;
|
|
3099
|
+
/**
|
|
3100
|
+
* Current screen reader announcement text.
|
|
3101
|
+
*/
|
|
3102
|
+
announcement: string;
|
|
3103
|
+
/**
|
|
3104
|
+
* Whether the uploader is disabled.
|
|
3105
|
+
*/
|
|
3106
|
+
disabled?: boolean;
|
|
3107
|
+
/**
|
|
3108
|
+
* Whether files can be deleted from the list.
|
|
3109
|
+
*/
|
|
3110
|
+
canDeleteFile?: boolean;
|
|
3111
|
+
/**
|
|
3112
|
+
* Accepted file types string.
|
|
3113
|
+
*/
|
|
3114
|
+
accept?: string;
|
|
3115
|
+
/**
|
|
3116
|
+
* Whether multiple files can be selected.
|
|
3117
|
+
*/
|
|
3118
|
+
multiple?: boolean;
|
|
3119
|
+
/**
|
|
3120
|
+
* Localized label strings.
|
|
3121
|
+
*/
|
|
3122
|
+
labels: typeof DEFAULT_LABELS;
|
|
3123
|
+
/**
|
|
3124
|
+
* HTML name attribute for the input.
|
|
3125
|
+
*/
|
|
3126
|
+
name?: string;
|
|
3127
|
+
/**
|
|
3128
|
+
* Whether the input is required.
|
|
3129
|
+
*/
|
|
3130
|
+
required?: boolean;
|
|
3131
|
+
/**
|
|
3132
|
+
* HTML id attribute for the input.
|
|
3133
|
+
*/
|
|
3134
|
+
id?: string;
|
|
3135
|
+
/**
|
|
3136
|
+
* Form ID the input belongs to.
|
|
3137
|
+
*/
|
|
3138
|
+
form?: string;
|
|
3139
|
+
/**
|
|
3140
|
+
* ID of element labelling the uploader.
|
|
3141
|
+
*/
|
|
3142
|
+
ariaLabelledby?: string;
|
|
3143
|
+
/**
|
|
3144
|
+
* ID of element describing the uploader.
|
|
3145
|
+
*/
|
|
3146
|
+
ariaDescribedby?: string;
|
|
3147
|
+
/**
|
|
3148
|
+
* ID of the error message element.
|
|
3149
|
+
*/
|
|
3150
|
+
errorMessageId?: string;
|
|
3151
|
+
/**
|
|
3152
|
+
* Adds files to the uploader.
|
|
3153
|
+
*/
|
|
3154
|
+
addFiles: (files: FileItem[]) => void;
|
|
3155
|
+
/**
|
|
3156
|
+
* Removes a file by ID.
|
|
3157
|
+
*/
|
|
3158
|
+
removeFile: (id: string) => void;
|
|
3159
|
+
/**
|
|
3160
|
+
* Replaces all files with new files.
|
|
3161
|
+
*/
|
|
3162
|
+
replaceFiles: (files: FileItem[]) => void;
|
|
3163
|
+
/**
|
|
3164
|
+
* Removes all files.
|
|
3165
|
+
*/
|
|
3166
|
+
clearAll: () => void;
|
|
3167
|
+
/**
|
|
3168
|
+
* Updates the state of a specific file.
|
|
3169
|
+
*/
|
|
3170
|
+
updateFileState: (id: string, state: Partial<FileState>) => void;
|
|
3171
|
+
/**
|
|
3172
|
+
* Sets the processing state.
|
|
3173
|
+
*/
|
|
3174
|
+
setProcessing: (isProcessing: boolean, processingId?: string | null) => void;
|
|
3175
|
+
/**
|
|
3176
|
+
* Sets a component-level error.
|
|
3177
|
+
*/
|
|
3178
|
+
setComponentError: (error: {
|
|
3179
|
+
code: COMPONENT_ERROR;
|
|
3180
|
+
message: string;
|
|
3181
|
+
} | null) => void;
|
|
3182
|
+
/**
|
|
3183
|
+
* Clears all rejected files from the rejection list.
|
|
3184
|
+
*/
|
|
3185
|
+
clearRejectedFiles: () => void;
|
|
3186
|
+
/**
|
|
3187
|
+
* Makes a screen reader announcement.
|
|
3188
|
+
*/
|
|
3189
|
+
announce: (type: AnnouncementType, data: Record<string, unknown>) => void;
|
|
3190
|
+
/**
|
|
3191
|
+
* Ref to the hidden file input element.
|
|
3192
|
+
*/
|
|
3193
|
+
inputRef: default_2.RefObject<HTMLInputElement | null>;
|
|
3194
|
+
/**
|
|
3195
|
+
* Opens the native file picker.
|
|
3196
|
+
*/
|
|
3197
|
+
openPicker: () => void;
|
|
3198
|
+
/**
|
|
3199
|
+
* Handles file input change events.
|
|
3200
|
+
*/
|
|
3201
|
+
handleInputChange: (event: default_2.ChangeEvent<HTMLInputElement>) => void;
|
|
3202
|
+
/**
|
|
3203
|
+
* Handles file input invalid events.
|
|
3204
|
+
*/
|
|
3205
|
+
handleInputInvalid: (event: default_2.FormEvent<HTMLInputElement>) => void;
|
|
3206
|
+
/**
|
|
3207
|
+
* Event handlers for drag and drop functionality.
|
|
3208
|
+
*/
|
|
3209
|
+
dragHandlers: {
|
|
3210
|
+
onDragEnter: (event: default_2.DragEvent) => void;
|
|
3211
|
+
onDragOver: (event: default_2.DragEvent) => void;
|
|
3212
|
+
onDragLeave: (event: default_2.DragEvent) => void;
|
|
3213
|
+
onDrop: (event: default_2.DragEvent) => void;
|
|
3214
|
+
};
|
|
3215
|
+
/**
|
|
3216
|
+
* Custom function to generate file error messages.
|
|
3217
|
+
*/
|
|
3218
|
+
getFileErrorMessage?: (error: FILE_ERROR, file: File) => string;
|
|
3219
|
+
/**
|
|
3220
|
+
* Custom function to generate component error messages.
|
|
3221
|
+
*/
|
|
3222
|
+
getComponentErrorMessage?: (error: COMPONENT_ERROR, data: Record<string, unknown>) => string;
|
|
3223
|
+
/**
|
|
3224
|
+
* Custom function to generate announcements.
|
|
3225
|
+
*/
|
|
3226
|
+
getAnnouncement?: (type: AnnouncementType, data: Record<string, unknown>) => string;
|
|
3227
|
+
/**
|
|
3228
|
+
* Callback when upload is cancelled.
|
|
3229
|
+
*/
|
|
3230
|
+
onCancel?: (id: string) => void;
|
|
3231
|
+
/**
|
|
3232
|
+
* Callback when failed upload should be retried.
|
|
3233
|
+
*/
|
|
3234
|
+
onRetry?: (id: string) => void;
|
|
3235
|
+
/**
|
|
3236
|
+
* Additional input props to spread on the native input element.
|
|
3237
|
+
*/
|
|
3238
|
+
inputProps?: Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onInvalid' | 'className' | 'value' | 'type' | 'accept' | 'multiple' | 'name' | 'required' | 'id' | 'form' | 'disabled'>;
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
/**
|
|
3242
|
+
* Labels configuration for the Uploader component.
|
|
3243
|
+
* All fields are required when defining the full labels object.
|
|
3244
|
+
* Use Partial<UploaderLabels> for optional overrides.
|
|
3245
|
+
*/
|
|
3246
|
+
export declare type UploaderLabels = {
|
|
3247
|
+
/** Text displayed in the drop zone. */
|
|
3248
|
+
dropZoneText: string;
|
|
3249
|
+
/** Text for the browse link. */
|
|
3250
|
+
browseText: string;
|
|
3251
|
+
/** Text shown when dragging files over the drop zone. */
|
|
3252
|
+
dragOverText: string;
|
|
3253
|
+
/** Text shown while processing files. */
|
|
3254
|
+
processingText: string;
|
|
3255
|
+
/** Accessible label for the drop zone. */
|
|
3256
|
+
ariaLabel: string;
|
|
3257
|
+
/** Accessible label for the file list. */
|
|
3258
|
+
fileListLabel: string;
|
|
3259
|
+
/** Text shown when upload is canceled. */
|
|
3260
|
+
canceledText: string;
|
|
3261
|
+
/** Text shown when upload fails. */
|
|
3262
|
+
failedText: string;
|
|
3263
|
+
/** Text for cancel button. */
|
|
3264
|
+
cancelButtonText: string;
|
|
3265
|
+
/** Accessible label function for cancel button. */
|
|
3266
|
+
cancelButtonLabel: (fileName: string) => string;
|
|
3267
|
+
/** Text for retry button. */
|
|
3268
|
+
retryButtonText: string;
|
|
3269
|
+
/** Accessible label function for retry button. */
|
|
3270
|
+
retryButtonLabel: (fileName: string) => string;
|
|
3271
|
+
/** Accessible label function for remove button. */
|
|
3272
|
+
removeButtonLabel: (fileName: string) => string;
|
|
3273
|
+
/** Function returning upload progress text. */
|
|
3274
|
+
uploadingText: (progress: number) => string;
|
|
3275
|
+
/** Text shown while finalizing upload. */
|
|
3276
|
+
finalizingUploadText: string;
|
|
3277
|
+
/** Function to pluralize "file(s)" text. */
|
|
3278
|
+
pluralizeFiles: (count: number) => string;
|
|
3279
|
+
/** Text for dismiss all rejections button. */
|
|
3280
|
+
dismissAllRejectionsText: string;
|
|
3281
|
+
/** Header text for the rejection list. */
|
|
3282
|
+
rejectionListHeaderText: string;
|
|
3283
|
+
/** Function returning show more files text. */
|
|
3284
|
+
showMoreFilesText: (count: number) => string;
|
|
3285
|
+
/** Text to show less files. */
|
|
3286
|
+
showLessFilesText: string;
|
|
3287
|
+
/** Function returning max count exceeded error message with limit. */
|
|
3288
|
+
maxCountExceededWithLimitText: (maxCount: number) => string;
|
|
3289
|
+
/** Text for "added" in announcements. */
|
|
3290
|
+
addedText: string;
|
|
3291
|
+
/** Text for "total" in announcements. */
|
|
3292
|
+
totalText: string;
|
|
3293
|
+
/** Text for "selected" in announcements. */
|
|
3294
|
+
selectedText: string;
|
|
3295
|
+
/** Text for file removed announcement. */
|
|
3296
|
+
fileRemovedText: string;
|
|
3297
|
+
/** Text for all files removed announcement. */
|
|
3298
|
+
allFilesRemovedText: string;
|
|
3299
|
+
/** Error message for required field. */
|
|
3300
|
+
requiredErrorMessage: string;
|
|
3301
|
+
/** Error messages for file-level validation errors. Allows overriding individual messages. */
|
|
3302
|
+
fileErrorMessages: Partial<Record<FILE_ERROR, string>>;
|
|
3303
|
+
/** Error messages for component-level validation errors. Allows overriding individual messages. */
|
|
3304
|
+
componentErrorMessages: Partial<Record<COMPONENT_ERROR, string>>;
|
|
3305
|
+
};
|
|
3306
|
+
|
|
3307
|
+
export declare interface UploaderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onInvalid' | 'className' | 'value' | 'type' | 'accept' | 'multiple' | 'name' | 'required' | 'id' | 'form' | 'disabled'> {
|
|
3308
|
+
/**
|
|
3309
|
+
* Accepted file types (MIME types or file extensions).
|
|
3310
|
+
* Uses the same format as the HTML input accept attribute.
|
|
3311
|
+
* @example "image/*,.pdf,.doc,.docx"
|
|
3312
|
+
*/
|
|
3313
|
+
accept?: string;
|
|
3314
|
+
/**
|
|
3315
|
+
* Whether multiple files can be selected at once.
|
|
3316
|
+
* @default true
|
|
3317
|
+
*/
|
|
3318
|
+
multiple?: boolean;
|
|
3319
|
+
/**
|
|
3320
|
+
* Whether the uploader is disabled.
|
|
3321
|
+
* When disabled, files cannot be added or removed.
|
|
3322
|
+
* @default false
|
|
3323
|
+
*/
|
|
3324
|
+
disabled?: boolean;
|
|
3325
|
+
/**
|
|
3326
|
+
* Whether individual files can be deleted from the list.
|
|
3327
|
+
* When false, the delete button is hidden on file items.
|
|
3328
|
+
*/
|
|
3329
|
+
canDeleteFile?: boolean;
|
|
3330
|
+
/**
|
|
3331
|
+
* Determines how new files are handled when selected.
|
|
3332
|
+
* - 'append': New files are added to the existing list
|
|
3333
|
+
* - 'replace': New files replace the existing list
|
|
3334
|
+
* @default 'append'
|
|
3335
|
+
*/
|
|
3336
|
+
selectionMode?: 'append' | 'replace';
|
|
3337
|
+
/**
|
|
3338
|
+
* Maximum allowed size for a single file in bytes.
|
|
3339
|
+
* Files exceeding this limit will be marked as invalid.
|
|
3340
|
+
*/
|
|
3341
|
+
maxFileSize?: number;
|
|
3342
|
+
/**
|
|
3343
|
+
* Maximum allowed total size of all files combined in bytes.
|
|
3344
|
+
* Exceeding this limit triggers a component-level error.
|
|
3345
|
+
*/
|
|
3346
|
+
maxTotalSize?: number;
|
|
3347
|
+
/**
|
|
3348
|
+
* Maximum number of files allowed.
|
|
3349
|
+
* Exceeding this limit triggers a component-level error.
|
|
3350
|
+
*/
|
|
3351
|
+
maxCount?: number;
|
|
3352
|
+
/**
|
|
3353
|
+
* Minimum number of files required.
|
|
3354
|
+
* Having fewer files triggers a component-level error.
|
|
3355
|
+
*/
|
|
3356
|
+
minCount?: number;
|
|
3357
|
+
/**
|
|
3358
|
+
* Controlled value - the list of files.
|
|
3359
|
+
* When provided, the component operates in controlled mode.
|
|
3360
|
+
*/
|
|
3361
|
+
value?: FileItem[];
|
|
3362
|
+
/**
|
|
3363
|
+
* Callback fired when files are added, removed, replaced, or cleared.
|
|
3364
|
+
* Required when using controlled mode (value prop).
|
|
3365
|
+
*/
|
|
3366
|
+
onChange?: (event: ChangeEvent) => void;
|
|
3367
|
+
/**
|
|
3368
|
+
* Callback fired after file validation is complete.
|
|
3369
|
+
* Provides validation results for each file and any component-level errors.
|
|
3370
|
+
*/
|
|
3371
|
+
onValidation?: (event: ValidationEvent) => void;
|
|
3372
|
+
/**
|
|
3373
|
+
* Callback fired when a file upload is cancelled.
|
|
3374
|
+
* Receives the file ID that was cancelled.
|
|
3375
|
+
*/
|
|
3376
|
+
onCancel?: (id: string) => void;
|
|
3377
|
+
/**
|
|
3378
|
+
* Callback fired when a failed upload should be retried.
|
|
3379
|
+
* Receives the file ID that should be retried.
|
|
3380
|
+
*/
|
|
3381
|
+
onRetry?: (id: string) => void;
|
|
3382
|
+
/**
|
|
3383
|
+
* Custom labels for various UI elements.
|
|
3384
|
+
* Allows localization and customization of text content.
|
|
3385
|
+
*/
|
|
3386
|
+
labels?: Partial<UploaderLabels>;
|
|
3387
|
+
/**
|
|
3388
|
+
* Custom function to generate error messages for file-level errors.
|
|
3389
|
+
* @param error - The error type
|
|
3390
|
+
* @param file - The file that caused the error
|
|
3391
|
+
* @returns Custom error message
|
|
3392
|
+
*/
|
|
3393
|
+
getFileErrorMessage?: (error: FILE_ERROR, file: File) => string;
|
|
3394
|
+
/**
|
|
3395
|
+
* Custom function to generate error messages for component-level errors.
|
|
3396
|
+
* @param error - The error type
|
|
3397
|
+
* @param data - Additional data about the error (e.g., maxCount, totalSize)
|
|
3398
|
+
* @returns Custom error message
|
|
3399
|
+
*/
|
|
3400
|
+
getComponentErrorMessage?: (error: COMPONENT_ERROR, data: Record<string, unknown>) => string;
|
|
3401
|
+
/**
|
|
3402
|
+
* Custom function to generate announcement messages for screen readers.
|
|
3403
|
+
* @param type - The type of announcement
|
|
3404
|
+
* @param data - Additional data about the action
|
|
3405
|
+
* @returns Custom announcement message
|
|
3406
|
+
*/
|
|
3407
|
+
getAnnouncement?: (type: AnnouncementType, data: Record<string, unknown>) => string;
|
|
3408
|
+
/**
|
|
3409
|
+
* HTML name attribute for the file input.
|
|
3410
|
+
* Used for form submission.
|
|
3411
|
+
*/
|
|
3412
|
+
name?: string;
|
|
3413
|
+
/**
|
|
3414
|
+
* Whether the file input is required.
|
|
3415
|
+
* Used for form validation.
|
|
3416
|
+
*/
|
|
3417
|
+
required?: boolean;
|
|
3418
|
+
/**
|
|
3419
|
+
* HTML id attribute for the file input.
|
|
3420
|
+
*/
|
|
3421
|
+
id?: string;
|
|
3422
|
+
/**
|
|
3423
|
+
* Associates the input with a specific form element.
|
|
3424
|
+
*/
|
|
3425
|
+
form?: string;
|
|
3426
|
+
/**
|
|
3427
|
+
* ID of an element that labels the uploader.
|
|
3428
|
+
* Used for accessibility.
|
|
3429
|
+
*/
|
|
3430
|
+
ariaLabelledby?: string;
|
|
3431
|
+
/**
|
|
3432
|
+
* ID of an element that describes the uploader.
|
|
3433
|
+
* Used for accessibility.
|
|
3434
|
+
*/
|
|
3435
|
+
ariaDescribedby?: string;
|
|
3436
|
+
/**
|
|
3437
|
+
* Custom content to render instead of the default FileList.
|
|
3438
|
+
* When provided, showFileList is ignored.
|
|
3439
|
+
*/
|
|
3440
|
+
children?: React.ReactNode;
|
|
3441
|
+
/**
|
|
3442
|
+
* Whether to show the default file list below the drop zone.
|
|
3443
|
+
* @default true
|
|
3444
|
+
*/
|
|
3445
|
+
showFileList?: boolean;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3448
|
+
/**
|
|
3449
|
+
* Provider component that supplies the Uploader context to child components.
|
|
3450
|
+
*/
|
|
3451
|
+
export declare const UploaderProvider: ({ value, children, }: UploaderProviderProps) => default_2.JSX.Element;
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* Props for the UploaderProvider component.
|
|
3455
|
+
*/
|
|
3456
|
+
export declare interface UploaderProviderProps extends PropsWithChildren {
|
|
3457
|
+
/**
|
|
3458
|
+
* The context value to provide.
|
|
3459
|
+
*/
|
|
3460
|
+
value: UploaderContextValue;
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
/**
|
|
3464
|
+
* Ref handle for the Uploader component.
|
|
3465
|
+
* Provides imperative methods to control the uploader.
|
|
3466
|
+
*/
|
|
3467
|
+
export declare interface UploaderRef {
|
|
3468
|
+
/**
|
|
3469
|
+
* Focuses the file input element.
|
|
3470
|
+
*/
|
|
3471
|
+
focus: () => void;
|
|
3472
|
+
/**
|
|
3473
|
+
* Opens the file picker dialog.
|
|
3474
|
+
*/
|
|
3475
|
+
click: () => void;
|
|
3476
|
+
/**
|
|
3477
|
+
* Removes all files from the uploader.
|
|
3478
|
+
* Only works in uncontrolled mode.
|
|
3479
|
+
*/
|
|
3480
|
+
clearAll: () => void;
|
|
3481
|
+
/**
|
|
3482
|
+
* Updates the state of a specific file.
|
|
3483
|
+
* Only works in uncontrolled mode.
|
|
3484
|
+
* @param id - The ID of the file to update
|
|
3485
|
+
* @param state - Partial state to merge with existing state
|
|
3486
|
+
*/
|
|
3487
|
+
updateFileState: (id: string, state: Partial<FileState>) => void;
|
|
3488
|
+
/**
|
|
3489
|
+
* Removes a specific file from the uploader.
|
|
3490
|
+
* Only works in uncontrolled mode.
|
|
3491
|
+
* @param id - The ID of the file to remove
|
|
3492
|
+
*/
|
|
3493
|
+
removeFile: (id: string) => void;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
/**
|
|
3497
|
+
* Custom hook that tracks the current breakpoint based on window width.
|
|
3498
|
+
* Returns an object with the current breakpoint and utility functions for comparison.
|
|
3499
|
+
*
|
|
3500
|
+
* @param enabled - Whether to set up resize event listeners. Defaults to true.
|
|
3501
|
+
* Set to false to prevent unnecessary listeners when breakpoint tracking is not needed.
|
|
3502
|
+
* @returns An object containing the current breakpoint and comparison utilities
|
|
3503
|
+
*
|
|
3504
|
+
* @example
|
|
3505
|
+
* ```tsx
|
|
3506
|
+
* const { currentBreakpoint, isBiggerThan, isSmallerThan, isBetween } = useBreakpoint();
|
|
3507
|
+
*
|
|
3508
|
+
* // Check current breakpoint
|
|
3509
|
+
* console.log(currentBreakpoint); // 'tablet'
|
|
3510
|
+
*
|
|
3511
|
+
* // Check if viewport is bigger than mobile
|
|
3512
|
+
* if (isBiggerThan('mobile')) {
|
|
3513
|
+
* // Render desktop layout
|
|
3514
|
+
* }
|
|
3515
|
+
*
|
|
3516
|
+
* // Check if viewport is smaller than laptop
|
|
3517
|
+
* if (isSmallerThan('laptop')) {
|
|
3518
|
+
* // Render mobile layout
|
|
3519
|
+
* }
|
|
3520
|
+
*
|
|
3521
|
+
* // Check if viewport is between tablet and laptop (inclusive)
|
|
3522
|
+
* if (isBetween('tablet', 'laptop')) {
|
|
3523
|
+
* // Render medium layout
|
|
3524
|
+
* }
|
|
3525
|
+
* ```
|
|
3526
|
+
*/
|
|
3527
|
+
export declare const useBreakpoint: (enabled?: boolean) => UseBreakpointReturn;
|
|
3528
|
+
|
|
3529
|
+
export declare interface UseBreakpointReturn {
|
|
3530
|
+
/** The current viewport breakpoint */
|
|
3531
|
+
currentBreakpoint: Viewport;
|
|
3532
|
+
/** Returns true if the current breakpoint is larger than the specified breakpoint */
|
|
3533
|
+
isBiggerThan: (breakpoint: Viewport) => boolean;
|
|
3534
|
+
/** Returns true if the current breakpoint is smaller than the specified breakpoint */
|
|
3535
|
+
isSmallerThan: (breakpoint: Viewport) => boolean;
|
|
3536
|
+
/** Returns true if the current breakpoint is between the two specified breakpoints (inclusive) */
|
|
3537
|
+
isBetween: (minBreakpoint: Viewport, maxBreakpoint: Viewport) => boolean;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
export declare const useClickOutside: <T extends Node = HTMLElement>(refs: RefType<T> | RefType<T>[] | RefType<Node>[], callback: () => void, isOpen?: boolean) => void;
|
|
3541
|
+
|
|
3542
|
+
export declare const useSheetAnimation: (open: boolean) => {
|
|
3543
|
+
mounted: boolean;
|
|
3544
|
+
show: boolean;
|
|
3545
|
+
setShow: Dispatch<SetStateAction<boolean>>;
|
|
3546
|
+
};
|
|
3547
|
+
|
|
3548
|
+
/**
|
|
3549
|
+
* Custom hook to handle Sheet closing logic
|
|
3550
|
+
*
|
|
3551
|
+
* Centralizes the close animation pattern:
|
|
3552
|
+
* 1. Hide the sheet (trigger exit animation)
|
|
3553
|
+
* 2. Wait for animation to complete (500ms)
|
|
3554
|
+
* 3. Call onClose callback (unmount)
|
|
3555
|
+
*/
|
|
3556
|
+
export declare const useSheetClose: ({ setShow, onClose, closeOnBackdropClick, }: UseSheetCloseProps) => UseSheetCloseReturn;
|
|
3557
|
+
|
|
3558
|
+
declare interface UseSheetCloseProps {
|
|
3559
|
+
setShow: Dispatch<SetStateAction<boolean>>;
|
|
3560
|
+
onClose: () => void;
|
|
3561
|
+
closeOnBackdropClick: boolean;
|
|
3562
|
+
}
|
|
3563
|
+
|
|
3564
|
+
declare interface UseSheetCloseReturn {
|
|
3565
|
+
handleSwipeDismiss: () => void;
|
|
3566
|
+
handleBackdropClick: () => void;
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
export declare const useSheetEscape: (onClose: () => void, closeOnEsc: boolean) => void;
|
|
3570
|
+
|
|
3571
|
+
export declare const useSheetFocus: (sheetRef: React.RefObject<HTMLDivElement | null>, mounted: boolean) => void;
|
|
3572
|
+
|
|
3573
|
+
/**
|
|
3574
|
+
* Custom hook to register/unregister sheet with the global SheetManager
|
|
3575
|
+
*
|
|
3576
|
+
* Ensures proper lifecycle management of sheets in the manager,
|
|
3577
|
+
* allowing for global sheet coordination (e.g., closing all sheets)
|
|
3578
|
+
*/
|
|
3579
|
+
export declare const useSheetRegistration: ({ sheetId, mounted, open, onClose, }: UseSheetRegistrationProps) => void;
|
|
3580
|
+
|
|
3581
|
+
declare interface UseSheetRegistrationProps {
|
|
3582
|
+
sheetId: string;
|
|
3583
|
+
mounted: boolean;
|
|
3584
|
+
open: boolean;
|
|
3585
|
+
onClose: () => void;
|
|
3586
|
+
}
|
|
3587
|
+
|
|
3588
|
+
export declare const useSheetResize: ({ sheetRef, handleRef, enabled, minWidth: customMinWidth, maxWidth: customMaxWidth, onResizeEnd, }: UseSheetResizeProps) => void;
|
|
3589
|
+
|
|
3590
|
+
declare interface UseSheetResizeProps {
|
|
3591
|
+
sheetRef: React.RefObject<HTMLDivElement | null>;
|
|
3592
|
+
handleRef: React.RefObject<HTMLDivElement | null>;
|
|
3593
|
+
enabled: boolean;
|
|
3594
|
+
minWidth?: number | string;
|
|
3595
|
+
maxWidth?: number | string;
|
|
3596
|
+
onResizeEnd?: (width: number) => void;
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
/**
|
|
3600
|
+
* Custom hook to track scroll position and overflow state for Sheet component
|
|
3601
|
+
*
|
|
3602
|
+
* Monitors:
|
|
3603
|
+
* - Whether content is scrolled from top (for header border)
|
|
3604
|
+
* - Whether scrolled to bottom (for footer border)
|
|
3605
|
+
* - Whether content overflows container (for conditional styling)
|
|
3606
|
+
*/
|
|
3607
|
+
export declare const useSheetScrollTracking: ({ scrollableContentRef, sheetRef, contentRef, mounted, }: UseSheetScrollTrackingProps) => UseSheetScrollTrackingReturn;
|
|
3608
|
+
|
|
3609
|
+
declare interface UseSheetScrollTrackingProps {
|
|
3610
|
+
scrollableContentRef: React.RefObject<HTMLDivElement | null>;
|
|
3611
|
+
sheetRef: React.RefObject<HTMLDivElement | null>;
|
|
3612
|
+
contentRef: React.RefObject<HTMLDivElement | null>;
|
|
3613
|
+
mounted: boolean;
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
declare interface UseSheetScrollTrackingReturn {
|
|
3617
|
+
isScrolled: boolean;
|
|
3618
|
+
isAtBottom: boolean;
|
|
3619
|
+
hasOverflow: boolean;
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
export declare const useSheetSwipe: ({ sheetRef, onDismiss, enabled, placement, }: UseSheetSwipeProps) => void;
|
|
3623
|
+
|
|
3624
|
+
declare interface UseSheetSwipeProps {
|
|
3625
|
+
sheetRef: React.RefObject<HTMLDivElement | null>;
|
|
3626
|
+
onDismiss: () => void;
|
|
3627
|
+
enabled: boolean;
|
|
3628
|
+
placement?: 'bottom' | 'right';
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
/**
|
|
3632
|
+
* Custom hook to manage Sheet width constraints and validation
|
|
3633
|
+
*
|
|
3634
|
+
* Features:
|
|
3635
|
+
* - Applies custom width for right-placed sheets on desktop
|
|
3636
|
+
* - Enforces absolute minimum width (570px)
|
|
3637
|
+
* - Validates against min/max width constraints
|
|
3638
|
+
* - Ensures width doesn't exceed screen width
|
|
3639
|
+
* - Provides helpful console warnings for constraint violations
|
|
3640
|
+
*/
|
|
3641
|
+
export declare const useSheetWidth: ({ sheetRef, placement, width, minWidth, maxWidth, mounted, }: UseSheetWidthProps) => void;
|
|
3642
|
+
|
|
3643
|
+
declare interface UseSheetWidthProps {
|
|
3644
|
+
sheetRef: React.RefObject<HTMLDivElement | null>;
|
|
3645
|
+
placement: 'bottom' | 'right';
|
|
3646
|
+
width?: number | string;
|
|
3647
|
+
minWidth?: number | string;
|
|
3648
|
+
maxWidth?: number | string;
|
|
3649
|
+
mounted: boolean;
|
|
3650
|
+
}
|
|
3651
|
+
|
|
3652
|
+
/**
|
|
3653
|
+
* Hook to interact with the Snackbar system
|
|
3654
|
+
* Must be used within a SnackbarProvider
|
|
3655
|
+
*/
|
|
3656
|
+
export declare const useSnackbar: () => UseSnackbarReturn;
|
|
3657
|
+
|
|
3658
|
+
export declare interface UseSnackbarReturn {
|
|
3659
|
+
/**
|
|
3660
|
+
* Show a snackbar message
|
|
3661
|
+
*/
|
|
3662
|
+
snackbar: (message: SnackbarItem['children'], options?: SnackbarOptions) => SnackbarItem['id'];
|
|
3663
|
+
/**
|
|
3664
|
+
* Dismiss a specific snackbar by ID
|
|
3665
|
+
*/
|
|
3666
|
+
dismiss: (id: string) => void;
|
|
3667
|
+
/**
|
|
3668
|
+
* Dismiss all snackbars
|
|
3669
|
+
*/
|
|
3670
|
+
dismissAll: () => void;
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
/**
|
|
3674
|
+
* Event emitted after file validation is complete.
|
|
3675
|
+
*/
|
|
3676
|
+
export declare interface ValidationEvent {
|
|
3677
|
+
/**
|
|
3678
|
+
* Whether all files passed validation with no component errors.
|
|
3679
|
+
*/
|
|
3680
|
+
isValid: boolean;
|
|
3681
|
+
/**
|
|
3682
|
+
* Validation results for each file.
|
|
3683
|
+
*/
|
|
3684
|
+
fileResults: Array<{
|
|
3685
|
+
/** ID of the file. Optional for rejected files that are not added to the file list. */
|
|
3686
|
+
id?: string;
|
|
3687
|
+
/** Whether the file has a validation error. */
|
|
3688
|
+
hasError: boolean;
|
|
3689
|
+
/** The error type if validation failed. */
|
|
3690
|
+
error?: FILE_ERROR;
|
|
3691
|
+
/** Human-readable error message. */
|
|
3692
|
+
errorMessage?: string;
|
|
3693
|
+
}>;
|
|
3694
|
+
/**
|
|
3695
|
+
* Component-level errors that occurred during validation.
|
|
3696
|
+
*/
|
|
3697
|
+
componentErrors?: Array<{
|
|
3698
|
+
code: COMPONENT_ERROR;
|
|
3699
|
+
message: string;
|
|
3700
|
+
}>;
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
export declare type Viewport = keyof typeof BREAKPOINTS;
|
|
3704
|
+
|
|
3705
|
+
export { }
|