@zextras/carbonio-design-system 0.3.10 → 0.4.0-devel.1663244158706
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/CHANGELOG.md +80 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/zapp-ui.bundle.d.ts +1917 -0
- package/dist/zapp-ui.bundle.js +15265 -20573
- package/jest.config.ts +192 -0
- package/package.json +15 -13
|
@@ -0,0 +1,1917 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import DatePicker from 'react-datepicker';
|
|
4
|
+
import { DefaultTheme } from 'styled-components';
|
|
5
|
+
import { ErrorInfo } from 'react';
|
|
6
|
+
import { FlattenSimpleInterpolation } from 'styled-components';
|
|
7
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
8
|
+
import { HTMLAttributes } from 'react';
|
|
9
|
+
import { InputHTMLAttributes } from 'react';
|
|
10
|
+
import { Placement } from '@popperjs/core/lib/enums';
|
|
11
|
+
import { Placement as Placement_2 } from '@popperjs/core';
|
|
12
|
+
import { PropsWithoutRef } from 'react';
|
|
13
|
+
import { default as React_2 } from 'react';
|
|
14
|
+
import { ReactDatePickerProps } from 'react-datepicker';
|
|
15
|
+
import { RefAttributes } from 'react';
|
|
16
|
+
import { StyledComponent } from 'styled-components';
|
|
17
|
+
import { SVGAttributes } from 'react';
|
|
18
|
+
import { ThemeContext } from 'styled-components';
|
|
19
|
+
|
|
20
|
+
export declare const Accordion: React_2.ForwardRefExoticComponent<AccordionProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
|
|
22
|
+
export declare type AccordionDivider = {
|
|
23
|
+
divider: true;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare const AccordionItem: React_2.ForwardRefExoticComponent<AccordionItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
export declare interface AccordionItemProps extends ContainerProps {
|
|
29
|
+
item: AccordionItemType;
|
|
30
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export declare type AccordionItemType = {
|
|
34
|
+
id: string;
|
|
35
|
+
label?: string;
|
|
36
|
+
items?: AccordionItemType[];
|
|
37
|
+
onClick?: (event: KeyboardEvent | React_2.SyntheticEvent) => void;
|
|
38
|
+
icon?: keyof ThemeObj['icons'];
|
|
39
|
+
CustomComponent?: React_2.ComponentType<{
|
|
40
|
+
item: AccordionItemType;
|
|
41
|
+
}>;
|
|
42
|
+
iconCustomColor?: string;
|
|
43
|
+
iconColor?: string;
|
|
44
|
+
badgeType?: 'read' | 'unread';
|
|
45
|
+
badgeCounter?: number;
|
|
46
|
+
open?: boolean;
|
|
47
|
+
background?: keyof ThemeObj['palette'];
|
|
48
|
+
disableHover?: boolean;
|
|
49
|
+
active?: boolean;
|
|
50
|
+
level?: number;
|
|
51
|
+
textProps?: TextProps;
|
|
52
|
+
onOpen?: (e: React_2.SyntheticEvent | KeyboardEvent) => void;
|
|
53
|
+
onClose?: (e: React_2.SyntheticEvent | KeyboardEvent) => void;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export declare interface AccordionProps extends ContainerProps {
|
|
57
|
+
/** Items tree object, can be nested (each property is forwarded to the item component as a prop) */
|
|
58
|
+
items: Array<AccordionItemType | AccordionDivider>;
|
|
59
|
+
/** Depth level, internally used for recursion nesting */
|
|
60
|
+
level?: number;
|
|
61
|
+
/** Accordion background */
|
|
62
|
+
background?: keyof ThemeObj['palette'];
|
|
63
|
+
/** id of the currently active item (alternative to the active item flag) */
|
|
64
|
+
activeId?: string;
|
|
65
|
+
/** list of ids of the currently open items (alternative to the open item flag) */
|
|
66
|
+
openIds?: string[];
|
|
67
|
+
/** disable animation of the accordion when expanding folders */
|
|
68
|
+
disableTransition?: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare type Action = {
|
|
72
|
+
type?: never;
|
|
73
|
+
iconType?: IconButtonProps['type'];
|
|
74
|
+
} & IconButtonProps & DropdownItem;
|
|
75
|
+
|
|
76
|
+
export declare const Avatar: React_2.ForwardRefExoticComponent<AvatarPropTypes & React_2.RefAttributes<HTMLDivElement>>;
|
|
77
|
+
|
|
78
|
+
export declare interface AvatarPropTypes extends HTMLAttributes<HTMLDivElement> {
|
|
79
|
+
/** size of the Avatar circle */
|
|
80
|
+
size?: keyof ThemeObj['sizes']['avatar'];
|
|
81
|
+
/** url to the profile picture */
|
|
82
|
+
picture?: string;
|
|
83
|
+
/** string to be used as capitals, or for its calculation */
|
|
84
|
+
label: string;
|
|
85
|
+
/** string to be used for the background color calculation */
|
|
86
|
+
colorLabel?: string;
|
|
87
|
+
/** icon to display instead of the capitals */
|
|
88
|
+
icon?: string;
|
|
89
|
+
/** icon to display as capitals fallback */
|
|
90
|
+
fallbackIcon?: string;
|
|
91
|
+
/** used to force a background color */
|
|
92
|
+
background?: string;
|
|
93
|
+
/** used to force a color for the avatar text/icon color */
|
|
94
|
+
color?: string;
|
|
95
|
+
/** avatar selection mode */
|
|
96
|
+
selecting?: boolean;
|
|
97
|
+
/** avatar selected */
|
|
98
|
+
selected?: boolean;
|
|
99
|
+
/** Shape of the avatar */
|
|
100
|
+
shape?: ShapeType;
|
|
101
|
+
/** disabled status */
|
|
102
|
+
disabled?: boolean;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare type AvatarSkeletonComponentProps = {
|
|
106
|
+
variant?: string;
|
|
107
|
+
radius?: string;
|
|
108
|
+
size?: keyof typeof SIZES;
|
|
109
|
+
width?: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export declare const Badge: React_2.ForwardRefExoticComponent<BadgeProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
113
|
+
|
|
114
|
+
export declare interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
115
|
+
/** Badge type */
|
|
116
|
+
type?: 'read' | 'unread';
|
|
117
|
+
/** Badge text */
|
|
118
|
+
value: string | number;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare type BadgeSkeletonProps = {
|
|
122
|
+
variant?: string;
|
|
123
|
+
radius?: string;
|
|
124
|
+
width?: string;
|
|
125
|
+
height?: string;
|
|
126
|
+
size?: keyof typeof SIZES;
|
|
127
|
+
backgroundSize?: string;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
declare type BreadcrumbCollapersProps = {
|
|
131
|
+
all: string;
|
|
132
|
+
} & PaddingProps;
|
|
133
|
+
|
|
134
|
+
export declare const Breadcrumbs: React_2.ForwardRefExoticComponent<BreadcrumbsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
135
|
+
|
|
136
|
+
export declare interface BreadcrumbsProps extends HTMLAttributes<HTMLDivElement> {
|
|
137
|
+
/** Array of items, check Dropdown items prop to see the shape of an item */
|
|
138
|
+
crumbs: Crumb[];
|
|
139
|
+
/** Props to spread to the collapser element */
|
|
140
|
+
collapserProps?: Omit<BreadcrumbCollapersProps, 'all'>;
|
|
141
|
+
/** Props to spread to the dropdown element */
|
|
142
|
+
dropdownProps?: Omit<DropdownProps, 'items' | 'children'>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
146
|
+
|
|
147
|
+
declare type ButtonColorsByType = ({
|
|
148
|
+
type?: 'default' | 'outlined';
|
|
149
|
+
} & ({
|
|
150
|
+
/** Main color */
|
|
151
|
+
color?: string | keyof ThemeObj['palette'];
|
|
152
|
+
} | {
|
|
153
|
+
/** Background color of the button (only for 'default' and 'outlined' types, to use instead of color for more specificity) */
|
|
154
|
+
backgroundColor?: string | keyof ThemeObj['palette'];
|
|
155
|
+
/** Specific color of the content (only for 'default' and 'outlined' types, to use instead of color for more specificity) */
|
|
156
|
+
labelColor?: string | keyof ThemeObj['palette'];
|
|
157
|
+
})) | {
|
|
158
|
+
type: 'ghost';
|
|
159
|
+
/** Main color */
|
|
160
|
+
color?: string | keyof ThemeObj['palette'];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
declare type ButtonIconPlacement = 'left' | 'right';
|
|
164
|
+
|
|
165
|
+
export declare const ButtonOld: React_2.ForwardRefExoticComponent<ButtonOldProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
166
|
+
|
|
167
|
+
export declare interface ButtonOldProps {
|
|
168
|
+
/** Type of button */
|
|
169
|
+
type?: ButtonType;
|
|
170
|
+
/** Color of button */
|
|
171
|
+
color?: string | keyof ThemeObj['palette'];
|
|
172
|
+
/** Color of the Button label */
|
|
173
|
+
labelColor?: string | keyof ThemeObj['palette'];
|
|
174
|
+
/** Color of the Button background */
|
|
175
|
+
backgroundColor?: string | keyof ThemeObj['palette'];
|
|
176
|
+
/** Button text */
|
|
177
|
+
label: string;
|
|
178
|
+
/** `fit`: assume the size of the content
|
|
179
|
+
*
|
|
180
|
+
* `fill`: take the width of the container
|
|
181
|
+
*/
|
|
182
|
+
size?: 'fit' | 'fill';
|
|
183
|
+
/** optional icon to display beside the label */
|
|
184
|
+
icon?: keyof ThemeObj['icons'];
|
|
185
|
+
/** Icon position */
|
|
186
|
+
iconPlacement?: 'left' | 'right';
|
|
187
|
+
/** whether to show the loading icon */
|
|
188
|
+
loading?: boolean;
|
|
189
|
+
/** small item size */
|
|
190
|
+
isSmall?: boolean;
|
|
191
|
+
/** whether to disable the button or not */
|
|
192
|
+
disabled?: boolean;
|
|
193
|
+
/** Callback to be invoked when the button is pressed */
|
|
194
|
+
onClick: (event: React_2.SyntheticEvent | KeyboardEvent) => void;
|
|
195
|
+
/** whether to force active status or not */
|
|
196
|
+
forceActive?: boolean;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare type ButtonProps = ButtonPropsInternal & Omit<ButtonHTMLAttributes<HTMLButtonElement>, keyof ButtonPropsInternal>;
|
|
200
|
+
|
|
201
|
+
declare type ButtonPropsInternal = {
|
|
202
|
+
/** Force active status */
|
|
203
|
+
forceActive?: boolean;
|
|
204
|
+
/** Disabled status */
|
|
205
|
+
disabled?: boolean;
|
|
206
|
+
/** Icon to display beside the label */
|
|
207
|
+
icon?: IconProps['icon'];
|
|
208
|
+
/** Icon position relative to the label */
|
|
209
|
+
iconPlacement?: ButtonIconPlacement;
|
|
210
|
+
/** Text content of the button */
|
|
211
|
+
label?: string;
|
|
212
|
+
/** Whether to show the loading icon */
|
|
213
|
+
loading?: boolean;
|
|
214
|
+
/** Main action callback */
|
|
215
|
+
onClick: (e: React_2.MouseEvent<HTMLButtonElement> | KeyboardEvent) => void;
|
|
216
|
+
/** Shape of the button */
|
|
217
|
+
shape?: ButtonShape;
|
|
218
|
+
/** Width of the button */
|
|
219
|
+
width?: ButtonWidth;
|
|
220
|
+
} & ({
|
|
221
|
+
/** Size variant of the button */
|
|
222
|
+
size?: 'medium' | 'large' | 'extralarge';
|
|
223
|
+
/** Secondary action object (available only for medium and large buttons) */
|
|
224
|
+
secondaryAction?: ButtonSecondaryAction;
|
|
225
|
+
} | {
|
|
226
|
+
/** Size variant of the button */
|
|
227
|
+
size?: ButtonSize;
|
|
228
|
+
secondaryAction?: undefined;
|
|
229
|
+
}) & ButtonColorsByType;
|
|
230
|
+
|
|
231
|
+
export declare interface ButtonSecondaryAction {
|
|
232
|
+
/** Icon of the secondary action */
|
|
233
|
+
icon: IconProps['icon'];
|
|
234
|
+
/** Callback for the secondary action */
|
|
235
|
+
onClick: (e: React_2.MouseEvent<HTMLButtonElement> | KeyboardEvent) => void;
|
|
236
|
+
/** Disabled status for the secondary action */
|
|
237
|
+
disabled?: boolean;
|
|
238
|
+
/** forceActive status for the secondary action */
|
|
239
|
+
forceActive?: boolean;
|
|
240
|
+
/** Ref object to assign to secondary button */
|
|
241
|
+
ref?: React_2.RefObject<HTMLButtonElement>;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
declare type ButtonShape = 'regular' | 'round';
|
|
245
|
+
|
|
246
|
+
declare type ButtonSize = 'extrasmall' | 'small' | 'medium' | 'large' | 'extralarge';
|
|
247
|
+
|
|
248
|
+
declare type ButtonSkeletonProps = {
|
|
249
|
+
variant: string;
|
|
250
|
+
radius: string;
|
|
251
|
+
size: keyof typeof SIZES;
|
|
252
|
+
width: string;
|
|
253
|
+
height: string;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
declare type ButtonType = 'default' | 'outlined' | 'ghost';
|
|
257
|
+
|
|
258
|
+
declare type ButtonWidth = 'fit' | 'fill';
|
|
259
|
+
|
|
260
|
+
export declare class Catcher extends React_2.Component<CatcherProps, CatcherState> {
|
|
261
|
+
constructor(props: CatcherProps);
|
|
262
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
263
|
+
render(): React_2.ReactNode;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export declare interface CatcherProps {
|
|
267
|
+
/** error callback, use this to perform operations when an error is caught */
|
|
268
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
declare interface CatcherState {
|
|
272
|
+
hasError: boolean;
|
|
273
|
+
error: Error | null;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export declare const Checkbox: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
277
|
+
|
|
278
|
+
export declare interface CheckboxProps extends Omit<ContainerProps, 'onChange' | 'onClick'> {
|
|
279
|
+
/** status of the Checkbox */
|
|
280
|
+
defaultChecked?: boolean;
|
|
281
|
+
/** Checkbox value */
|
|
282
|
+
value?: boolean;
|
|
283
|
+
/** Checkbox size
|
|
284
|
+
* @deprecated use size instead
|
|
285
|
+
*/
|
|
286
|
+
iconSize?: keyof ThemeObj['sizes']['icon'];
|
|
287
|
+
/** Checkbox color */
|
|
288
|
+
iconColor?: keyof ThemeObj['palette'] | string;
|
|
289
|
+
/** Checkbox text */
|
|
290
|
+
label?: string;
|
|
291
|
+
/** Checkbox padding */
|
|
292
|
+
padding?: ContainerProps['padding'];
|
|
293
|
+
/** whether to disable the checkbox or not */
|
|
294
|
+
disabled?: boolean;
|
|
295
|
+
/** click callback */
|
|
296
|
+
onClick?: (event: Event) => void;
|
|
297
|
+
/** change callback */
|
|
298
|
+
onChange?: (checked: boolean) => void;
|
|
299
|
+
/** available sizes */
|
|
300
|
+
size?: CheckboxSize;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
declare type CheckboxSize = 'medium' | 'small';
|
|
304
|
+
|
|
305
|
+
export declare const Chip: React_2.ForwardRefExoticComponent<ChipProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
306
|
+
|
|
307
|
+
export declare type ChipAction = {
|
|
308
|
+
/** Chip action icon color */
|
|
309
|
+
color?: keyof ThemeObj['palette'];
|
|
310
|
+
/** Chip action disabled status */
|
|
311
|
+
disabled?: boolean;
|
|
312
|
+
/** Chip action icon */
|
|
313
|
+
icon: keyof ThemeObj['icons'];
|
|
314
|
+
/** Chip action id (required for key attribute) */
|
|
315
|
+
id: string;
|
|
316
|
+
/** Chip action label value. It is shown in a tooltip. To not render the tooltip, just don't value the prop.
|
|
317
|
+
* Tooltips of the actions are not shown in case the chip is disabled */
|
|
318
|
+
label?: string;
|
|
319
|
+
} & ({
|
|
320
|
+
/** Chip action type */
|
|
321
|
+
type: 'button';
|
|
322
|
+
/** Chip action click callback (button type only). NB: onClick event IS propagated. It's up to the dev to eventually stop the propagation */
|
|
323
|
+
onClick: IconButtonProps['onClick'];
|
|
324
|
+
/** Chip action background (button type only) */
|
|
325
|
+
background?: keyof ThemeObj['palette'];
|
|
326
|
+
} | {
|
|
327
|
+
/** Chip action type */
|
|
328
|
+
type: 'icon';
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
export declare type ChipInput = React_2.ForwardRefExoticComponent<ChipInputProps & React_2.RefAttributes<HTMLDivElement>> & {
|
|
332
|
+
_newId?: number;
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export declare const ChipInput: ChipInput;
|
|
336
|
+
|
|
337
|
+
export declare interface ChipInputProps extends Omit<ContainerProps, 'defaultValue' | 'onChange'> {
|
|
338
|
+
/** ref to the input element */
|
|
339
|
+
inputRef?: React_2.MutableRefObject<HTMLInputElement | null>;
|
|
340
|
+
/** HTML input name */
|
|
341
|
+
inputName?: string;
|
|
342
|
+
/** Input Placeholder */
|
|
343
|
+
placeholder?: string;
|
|
344
|
+
/** ChipInput value */
|
|
345
|
+
value?: ChipItem[];
|
|
346
|
+
/** ChipInput default value */
|
|
347
|
+
defaultValue?: ChipItem[];
|
|
348
|
+
/** Callback to call when ChipInput's value changes */
|
|
349
|
+
onChange?: (items: ChipItem[]) => void;
|
|
350
|
+
/**
|
|
351
|
+
* Dropdown items.
|
|
352
|
+
* If disableOptions is true but options are provided, dropdown is still shown.
|
|
353
|
+
* To avoid dropdown to open at all, leave this prop empty
|
|
354
|
+
*/
|
|
355
|
+
options?: Array<DropdownItem & {
|
|
356
|
+
value?: unknown;
|
|
357
|
+
}>;
|
|
358
|
+
/**
|
|
359
|
+
* Callback to call when Input typing occurs
|
|
360
|
+
* - returns the keyup event object with an additional textContent value
|
|
361
|
+
* - the event is debounced using the debounce function from lodash
|
|
362
|
+
*/
|
|
363
|
+
onInputType?: (event: React_2.KeyboardEvent & {
|
|
364
|
+
textContent: string | null;
|
|
365
|
+
}) => void;
|
|
366
|
+
/** Debounce value in ms to which debounce the 'onInputType' callback */
|
|
367
|
+
onInputTypeDebounce?: number;
|
|
368
|
+
/** Callback called when a value is going to be added in the Chip Input, should return the configuration for the Chip */
|
|
369
|
+
onAdd?: (value: string | unknown) => ChipItem;
|
|
370
|
+
/** Set the current input text as a Chip when it loses focus */
|
|
371
|
+
confirmChipOnBlur?: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Set the current input text as a Chip when 'Space' is pressed
|
|
374
|
+
* @deprecated use separators prop instead
|
|
375
|
+
*/
|
|
376
|
+
confirmChipOnSpace?: boolean;
|
|
377
|
+
/** ChipInput backgroundColor */
|
|
378
|
+
background?: keyof ThemeObj['palette'];
|
|
379
|
+
/** Chip generation triggers */
|
|
380
|
+
separators?: string[];
|
|
381
|
+
/** Show the error */
|
|
382
|
+
hasError?: boolean;
|
|
383
|
+
/**
|
|
384
|
+
* Set the label for the error
|
|
385
|
+
* @deprecated use description instead
|
|
386
|
+
*/
|
|
387
|
+
errorLabel?: string | undefined;
|
|
388
|
+
/** Background color for the error status */
|
|
389
|
+
errorBackgroundColor?: keyof ThemeObj['palette'];
|
|
390
|
+
/** Set the limit for chip inputs <br />
|
|
391
|
+
* <strong>Warning</strong>: be aware that this check is performed only on internal changes on items.
|
|
392
|
+
* If you change the value from outside, you are in charge of apply this check on the new value itself.
|
|
393
|
+
*/
|
|
394
|
+
maxChips?: number | null;
|
|
395
|
+
/**
|
|
396
|
+
* Hide options to select values (on click).
|
|
397
|
+
* This prop does not prevent dropdown to open if options are
|
|
398
|
+
* provided. It only prevents it to open when clicking on the input.
|
|
399
|
+
* To avoid options to be shown at all, leave options empty
|
|
400
|
+
*/
|
|
401
|
+
disableOptions?: boolean;
|
|
402
|
+
/** Icon on the right of the input */
|
|
403
|
+
icon?: keyof ThemeObj['icons'];
|
|
404
|
+
/** Action on Icon click */
|
|
405
|
+
iconAction?: React_2.ReactEventHandler;
|
|
406
|
+
/** Disable the icon */
|
|
407
|
+
iconDisabled?: boolean;
|
|
408
|
+
/** Icon color */
|
|
409
|
+
iconColor?: string | keyof ThemeObj['palette'];
|
|
410
|
+
/** select single replaceable value from options */
|
|
411
|
+
singleSelection?: boolean;
|
|
412
|
+
/** hide the input's bottom border */
|
|
413
|
+
hideBorder?: boolean;
|
|
414
|
+
/** disable the input (but not the dropdown, use disableOptions for this) */
|
|
415
|
+
disabled?: boolean;
|
|
416
|
+
/**
|
|
417
|
+
* Allow entering unique chips only <br />
|
|
418
|
+
* <strong>Warning</strong>: be aware that this check is performed only on internal changes on items.
|
|
419
|
+
* If you change the value from outside, you are in charge of apply this check on the new value itself.
|
|
420
|
+
*/
|
|
421
|
+
requireUniqueChips?: boolean;
|
|
422
|
+
/** Input divider color */
|
|
423
|
+
bottomBorderColor?: DividerProps['color'];
|
|
424
|
+
/** Dropdown max height */
|
|
425
|
+
dropdownMaxHeight?: string;
|
|
426
|
+
/** Description for the input */
|
|
427
|
+
description?: string | undefined;
|
|
428
|
+
/** Custom Chip component */
|
|
429
|
+
ChipComponent?: React_2.ComponentType<ChipItem>;
|
|
430
|
+
/** allow to create chips from pasted values */
|
|
431
|
+
createChipOnPaste?: boolean;
|
|
432
|
+
/** Chip generation triggers on paste */
|
|
433
|
+
pasteSeparators?: string[];
|
|
434
|
+
/** Strategy on chips overflow */
|
|
435
|
+
wrap?: 'nowrap' | 'wrap';
|
|
436
|
+
/** maxHeight of Input in case of no horizontal scroll */
|
|
437
|
+
maxHeight?: string;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export declare type ChipItem = {
|
|
441
|
+
label?: string;
|
|
442
|
+
} & ChipProps & {
|
|
443
|
+
value?: unknown;
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
export declare interface ChipProps extends RowProps {
|
|
447
|
+
/** Chip actions (buttons or icons) */
|
|
448
|
+
actions?: ChipAction[];
|
|
449
|
+
/** Chip Avatar Icon */
|
|
450
|
+
avatarIcon?: keyof ThemeObj['icons'];
|
|
451
|
+
/** Chip Avatar Background Color */
|
|
452
|
+
avatarBackground?: keyof ThemeObj['palette'];
|
|
453
|
+
/** Chip avatar color (icon color or capitals color) */
|
|
454
|
+
avatarColor?: keyof ThemeObj['palette'];
|
|
455
|
+
/** Chip avatar label. It allows to override the capitals for the avatar.
|
|
456
|
+
* If the main label is not a string, you have to fill this prop to show capitals in the avatar */
|
|
457
|
+
avatarLabel?: string;
|
|
458
|
+
/** Chip avatar picture */
|
|
459
|
+
avatarPicture?: string;
|
|
460
|
+
/** Chip background color */
|
|
461
|
+
background?: keyof ThemeObj['palette'];
|
|
462
|
+
/** Chip shape */
|
|
463
|
+
shape?: 'regular' | 'round';
|
|
464
|
+
/** If an onClose callback is provided, this prop defines if the close action should be active or disabled */
|
|
465
|
+
closable?: boolean;
|
|
466
|
+
/** Chip text color */
|
|
467
|
+
color?: keyof ThemeObj['palette'];
|
|
468
|
+
/** Chip disabled status. If a string is provided it is shown in a tooltip */
|
|
469
|
+
disabled?: boolean | string;
|
|
470
|
+
/** Chip error. If a string is provided it is shown in a tooltip */
|
|
471
|
+
error?: boolean | string;
|
|
472
|
+
/** Define if the chip avatar is visible or hidden */
|
|
473
|
+
hasAvatar?: boolean;
|
|
474
|
+
/** Chip content key text */
|
|
475
|
+
keyLabel?: string;
|
|
476
|
+
/** Chip content text. It can be a simple string or a custom Component, which is then rendered inside a Row */
|
|
477
|
+
label?: string | React_2.ReactElement;
|
|
478
|
+
/** Chip max width */
|
|
479
|
+
maxWidth?: string;
|
|
480
|
+
/** Chip click callback */
|
|
481
|
+
onClick?: React_2.ReactEventHandler;
|
|
482
|
+
/** Callback to call when user tries to remove the Chip. If not provided, the close icon is hidden.
|
|
483
|
+
* Be aware that the close action can be also provided with the actions prop */
|
|
484
|
+
onClose?: IconButtonProps['onClick'];
|
|
485
|
+
/** Chip double-click callback */
|
|
486
|
+
onDoubleClick?: React_2.ReactEventHandler;
|
|
487
|
+
/** Chip size */
|
|
488
|
+
size?: 'small' | 'medium' | 'large';
|
|
489
|
+
/** Tooltip placement */
|
|
490
|
+
tooltipPlacement?: React_2.ComponentPropsWithoutRef<typeof Tooltip>['placement'];
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export declare type CloseModalFn = () => void;
|
|
494
|
+
|
|
495
|
+
export declare const Collapse: React_2.ForwardRefExoticComponent<CollapseProps & React_2.RefAttributes<HTMLElement>>;
|
|
496
|
+
|
|
497
|
+
export declare interface CollapseProps extends HTMLAttributes<HTMLDivElement> {
|
|
498
|
+
/** Orientation of the collapsing action */
|
|
499
|
+
orientation?: 'vertical' | 'horizontal';
|
|
500
|
+
/** control prop */
|
|
501
|
+
open: boolean;
|
|
502
|
+
/** Size of the collapse element on the opposite axis
|
|
503
|
+
* (e.g. height if the collapse orientation is horizontal) */
|
|
504
|
+
crossSize?: string;
|
|
505
|
+
/** Disable the transition */
|
|
506
|
+
disableTransition?: boolean;
|
|
507
|
+
/** Content */
|
|
508
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export declare const Collapser: React_2.ForwardRefExoticComponent<CollapserProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
512
|
+
|
|
513
|
+
export declare interface CollapserProps {
|
|
514
|
+
clickCallback: React_2.ReactEventHandler;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export declare const CollapsingActions: React_2.ForwardRefExoticComponent<CollapsingActionsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
518
|
+
|
|
519
|
+
export declare interface CollapsingActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
520
|
+
/** Actions to show
|
|
521
|
+
* <br />
|
|
522
|
+
* <code>type Action = { type?: never; iconType?: IconButtonProps['type'] } & IconButtonProps & DropdownItem;</code>
|
|
523
|
+
*/
|
|
524
|
+
actions: Action[];
|
|
525
|
+
/** Size for all the icon buttons. Can be overwritten by the single action prop */
|
|
526
|
+
size?: IconButtonProps['size'];
|
|
527
|
+
/** Max number of actions to show when there is plenty of space */
|
|
528
|
+
maxVisible?: number;
|
|
529
|
+
/** Alignment of the actions inside the container */
|
|
530
|
+
alignment?: 'start' | 'end';
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export declare const Container: React_2.ForwardRefExoticComponent<ContainerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
534
|
+
|
|
535
|
+
declare interface ContainerElProps {
|
|
536
|
+
/** The Container orientation (css flex-direction prop or 'vertical' or 'horizontal') */
|
|
537
|
+
orientation?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
538
|
+
/** Type of the Container's corners */
|
|
539
|
+
borderRadius?: 'regular' | 'round' | 'half' | 'none';
|
|
540
|
+
borderColor?: string | keyof ThemeObj['palette'];
|
|
541
|
+
/** Container background color */
|
|
542
|
+
background?: string | keyof ThemeObj['palette'];
|
|
543
|
+
/** Container height: <br/>
|
|
544
|
+
* `fit`: shorthand for fit-content
|
|
545
|
+
* `fill`: semantic alternative for `100%`
|
|
546
|
+
* number: measure in px
|
|
547
|
+
* string: any measure in CSS syntax
|
|
548
|
+
*/
|
|
549
|
+
height?: 'fit' | 'fill' | CSSStyleDeclaration['height'] | number;
|
|
550
|
+
/** Container minHeight: <br/>
|
|
551
|
+
* `fit`: shorthand for fit-content
|
|
552
|
+
* `fill`: semantic alternative for `100%`
|
|
553
|
+
* number: measure in px
|
|
554
|
+
* string: any measure in CSS syntax
|
|
555
|
+
*/
|
|
556
|
+
minHeight?: 'fit' | 'fill' | CSSStyleDeclaration['minHeight'] | number;
|
|
557
|
+
/** Container maxHeight: <br/>
|
|
558
|
+
* `fit`: shorthand for fit-content
|
|
559
|
+
* `fill`: semantic alternative for `100%`
|
|
560
|
+
* number: measure in px
|
|
561
|
+
* string: any measure in CSS syntax
|
|
562
|
+
*/
|
|
563
|
+
maxHeight?: 'fit' | 'fill' | CSSStyleDeclaration['maxHeight'] | number;
|
|
564
|
+
/** Container width: <br/>
|
|
565
|
+
* `fit`: shorthand for fit-content
|
|
566
|
+
* `fill`: semantic alternative for `100%`
|
|
567
|
+
* number: measure in px
|
|
568
|
+
* string: any measure in CSS syntax
|
|
569
|
+
*/
|
|
570
|
+
width?: 'fit' | 'fill' | CSSStyleDeclaration['width'] | number;
|
|
571
|
+
/** Container minWidth: <br/>
|
|
572
|
+
* `fit`: shorthand for fit-content
|
|
573
|
+
* `fill`: semantic alternative for `100%`
|
|
574
|
+
* number: measure in px
|
|
575
|
+
* string: any measure in CSS syntax
|
|
576
|
+
*/
|
|
577
|
+
minWidth?: 'fit' | 'fill' | CSSStyleDeclaration['minWidth'] | number;
|
|
578
|
+
/** Container maxWidth: <br/>
|
|
579
|
+
* `fit`: shorthand for fit-content
|
|
580
|
+
* `fill`: semantic alternative for `100%`
|
|
581
|
+
* number: measure in px
|
|
582
|
+
* string: any measure in CSS syntax
|
|
583
|
+
*/
|
|
584
|
+
maxWidth?: 'fit' | 'fill' | CSSStyleDeclaration['maxWidth'] | number;
|
|
585
|
+
/** Container flex alignment along the main axis */
|
|
586
|
+
mainAlignment?: 'stretch' | 'center' | 'baseline' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'unset';
|
|
587
|
+
/** Container flex alignment along the cross axis */
|
|
588
|
+
crossAlignment?: 'stretch' | 'center' | 'baseline' | 'flex-start' | 'flex-end' | 'unset';
|
|
589
|
+
/** Whether the Container items should wrap or not */
|
|
590
|
+
wrap?: 'wrap' | 'nowrap' | 'wrap-reverse' | 'unset';
|
|
591
|
+
/** an object specifying the Container padding */
|
|
592
|
+
padding?: PaddingObj | string | 0;
|
|
593
|
+
/** Gap flex css property */
|
|
594
|
+
gap?: string;
|
|
595
|
+
/** Flex grow css property */
|
|
596
|
+
flexGrow?: string | number;
|
|
597
|
+
/** Flex shrink css property */
|
|
598
|
+
flexShrink?: string | number;
|
|
599
|
+
/** Flex basis css property */
|
|
600
|
+
flexBasis?: string;
|
|
601
|
+
/** Margin css property */
|
|
602
|
+
margin?: {
|
|
603
|
+
left?: string;
|
|
604
|
+
right?: string;
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
export declare interface ContainerProps extends Omit<ContainerElProps, 'orientation'>, Omit<HTMLAttributes<HTMLDivElement>, keyof ContainerElProps> {
|
|
609
|
+
orientation?: 'vertical' | 'horizontal' | ContainerElProps['orientation'];
|
|
610
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export declare type CreateModalArgs = [modalProps: ModalProps, customModal?: false] | [customModalProps: CustomModalProps, customModal: true];
|
|
614
|
+
|
|
615
|
+
export declare type CreateModalFn = (...args: CreateModalArgs) => CloseModalFn;
|
|
616
|
+
|
|
617
|
+
export declare type CreateSnackbarFn = (props: SnackbarProps & {
|
|
618
|
+
key?: string;
|
|
619
|
+
replace?: boolean;
|
|
620
|
+
}) => void;
|
|
621
|
+
|
|
622
|
+
export declare type Crumb = DropdownItem & HTMLAttributes<HTMLDivElement>;
|
|
623
|
+
|
|
624
|
+
declare type CSSObject = {
|
|
625
|
+
[K in keyof CSSProperties]: CSSProperties[K] | (() => NonNullable<CSSProperties[K]>);
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
export declare const CustomModal: React_2.ForwardRefExoticComponent<Pick<ModalProps, "open" | "background" | "maxHeight" | "zIndex" | "children" | "size" | "disablePortal" | "onClose"> & Omit<React_2.HTMLAttributes<HTMLDivElement>, keyof ModalProps> & React_2.RefAttributes<HTMLDivElement>>;
|
|
629
|
+
|
|
630
|
+
export declare type CustomModalProps = Pick<ModalProps, 'background' | 'size' | 'open' | 'onClose' | 'zIndex' | 'maxHeight' | 'disablePortal' | 'children'> & Omit<HTMLAttributes<HTMLDivElement>, keyof ModalProps>;
|
|
631
|
+
|
|
632
|
+
export declare const DateTimePicker: React_2.ForwardRefExoticComponent<DateTimePickerProps & React_2.RefAttributes<DatePicker<never, undefined>>>;
|
|
633
|
+
|
|
634
|
+
export declare interface DateTimePickerProps extends Omit<ReactDatePickerProps, 'onChange'> {
|
|
635
|
+
/** Input's background color */
|
|
636
|
+
backgroundColor?: keyof ThemeObj['palette'];
|
|
637
|
+
/** Close icon to clear the Input */
|
|
638
|
+
isClearable?: boolean;
|
|
639
|
+
/** Label for input */
|
|
640
|
+
label: string;
|
|
641
|
+
/** input change callback */
|
|
642
|
+
onChange?: (newValue: Date | null) => void;
|
|
643
|
+
/** default value of the input */
|
|
644
|
+
defaultValue?: Date;
|
|
645
|
+
/** Whether the input has an error */
|
|
646
|
+
hasError?: boolean;
|
|
647
|
+
/** Error Message */
|
|
648
|
+
errorLabel?: string;
|
|
649
|
+
/** Show time picker */
|
|
650
|
+
includeTime?: boolean;
|
|
651
|
+
/** Date format */
|
|
652
|
+
dateFormat?: string;
|
|
653
|
+
/** Time format */
|
|
654
|
+
timeFormat?: string;
|
|
655
|
+
/** Label for time options */
|
|
656
|
+
timeLabel?: string;
|
|
657
|
+
/** Minutes Gap between different time options */
|
|
658
|
+
timeIntervals?: number;
|
|
659
|
+
/** Use Chips to show selected value */
|
|
660
|
+
enableChips?: boolean;
|
|
661
|
+
/** Pass chip props */
|
|
662
|
+
chipProps?: Partial<ChipProps>;
|
|
663
|
+
/** Picker width: <br/>
|
|
664
|
+
* `fit`: shorthand for fit-content
|
|
665
|
+
* `fill`: semantic alternative for `100%`
|
|
666
|
+
* number: measure in px
|
|
667
|
+
* string: any measure in CSS syntax
|
|
668
|
+
*/
|
|
669
|
+
width?: 'fit' | 'fill' | string | number;
|
|
670
|
+
/** Use Custom Component to trigger the picker */
|
|
671
|
+
CustomComponent?: React_2.ComponentType<{
|
|
672
|
+
value?: string | undefined;
|
|
673
|
+
onClick?: React_2.ReactEventHandler;
|
|
674
|
+
}>;
|
|
675
|
+
/** Disable the input */
|
|
676
|
+
disabled?: boolean;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
export declare const DefaultTabBarItem: React_2.ForwardRefExoticComponent<DefaultTabBarItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
680
|
+
|
|
681
|
+
export declare interface DefaultTabBarItemProps extends ContainerProps {
|
|
682
|
+
item: Item;
|
|
683
|
+
selected: boolean;
|
|
684
|
+
background: string | keyof ThemeObj['palette'];
|
|
685
|
+
onClick: React_2.ReactEventHandler;
|
|
686
|
+
underlineColor: string | keyof ThemeObj['palette'];
|
|
687
|
+
forceWidthEquallyDistributed: boolean;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export declare const Divider: React_2.ForwardRefExoticComponent<Partial<DividerProps> & React_2.RefAttributes<HTMLDivElement>>;
|
|
691
|
+
|
|
692
|
+
export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
693
|
+
/** Divider color */
|
|
694
|
+
color: string | keyof ThemeObj['palette'];
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
export declare const Drag: React_2.ForwardRefExoticComponent<DragProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
698
|
+
|
|
699
|
+
export declare type DragObj = {
|
|
700
|
+
event: React_2.DragEvent;
|
|
701
|
+
data?: Record<string, unknown>;
|
|
702
|
+
type?: string;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
export declare interface DragProps {
|
|
706
|
+
/** Callback for on onDragStart */
|
|
707
|
+
onDragStart?: React_2.DragEventHandler;
|
|
708
|
+
/** Callback for on onDragStart */
|
|
709
|
+
onDragEnd?: React_2.DragEventHandler;
|
|
710
|
+
/** type to assign to data */
|
|
711
|
+
type?: string;
|
|
712
|
+
/** data assigned to the drag event */
|
|
713
|
+
data?: Record<string, unknown>;
|
|
714
|
+
/** style applied to drag container */
|
|
715
|
+
style?: HTMLAttributes<HTMLDivElement>['style'];
|
|
716
|
+
/** whether element should be draggable or not */
|
|
717
|
+
dragDisabled?: boolean;
|
|
718
|
+
/** Content to drag */
|
|
719
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export declare const Drop: React_2.ForwardRefExoticComponent<DropProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
723
|
+
|
|
724
|
+
export declare const Dropdown: React_2.ForwardRefExoticComponent<DropdownProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
725
|
+
|
|
726
|
+
export declare interface DropdownItem {
|
|
727
|
+
type?: 'divider';
|
|
728
|
+
id: string;
|
|
729
|
+
label: string;
|
|
730
|
+
icon?: string;
|
|
731
|
+
click?: (e: React_2.SyntheticEvent<HTMLElement> | KeyboardEvent) => void;
|
|
732
|
+
selected?: boolean;
|
|
733
|
+
customComponent?: React_2.ReactNode;
|
|
734
|
+
disabled?: boolean;
|
|
735
|
+
items?: Array<DropdownItem>;
|
|
736
|
+
keepOpen?: boolean;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
export declare interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'contextMenu'> {
|
|
740
|
+
/** Whether to disable the Dropdown or not */
|
|
741
|
+
disabled?: boolean;
|
|
742
|
+
/** Array of items to display */
|
|
743
|
+
items: Array<DropdownItem>;
|
|
744
|
+
/** Css display property */
|
|
745
|
+
display?: 'block' | 'inline-block';
|
|
746
|
+
/** Dropdown width type */
|
|
747
|
+
width?: string;
|
|
748
|
+
/** Css max-width property */
|
|
749
|
+
maxWidth?: string;
|
|
750
|
+
/** Css max-height property */
|
|
751
|
+
maxHeight?: string;
|
|
752
|
+
/** whether to manage the keyboard events for dropdown trigger */
|
|
753
|
+
handleTriggerEvents?: boolean;
|
|
754
|
+
/** whether to disable the re-focus of trigger */
|
|
755
|
+
disableRestoreFocus?: boolean;
|
|
756
|
+
/** whether to focus the first item of the Dropdown on open */
|
|
757
|
+
disableAutoFocus?: boolean;
|
|
758
|
+
/** whether user can select multiple items of dropdown aka do not close popover on item click */
|
|
759
|
+
multiple?: boolean;
|
|
760
|
+
/** Open dropdown on right click at cursor position */
|
|
761
|
+
contextMenu?: boolean;
|
|
762
|
+
/** Callback for opened Dropdown */
|
|
763
|
+
onOpen?: () => void;
|
|
764
|
+
/** Callback for closed Dropdown */
|
|
765
|
+
onClose?: () => void;
|
|
766
|
+
/** Only one component can be passed as children */
|
|
767
|
+
children: React_2.ReactElement;
|
|
768
|
+
/** trigger ref that can be used instead of lost children ref caused by cloneElement */
|
|
769
|
+
triggerRef?: React_2.Ref<HTMLElement>;
|
|
770
|
+
/** Placement of the dropdown */
|
|
771
|
+
placement?: 'auto' | 'auto-start' | 'auto-end' | 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
|
|
772
|
+
/** Flag to disable the Portal implementation */
|
|
773
|
+
disablePortal?: boolean;
|
|
774
|
+
/** Whether the Component is visible or not */
|
|
775
|
+
forceOpen?: boolean;
|
|
776
|
+
/** Whether to preventDefault on Dropdown click */
|
|
777
|
+
preventDefault?: boolean;
|
|
778
|
+
/** Customize selected background color */
|
|
779
|
+
selectedBackgroundColor?: keyof ThemeObj['palette'];
|
|
780
|
+
/** Item Icon size */
|
|
781
|
+
itemIconSize?: React_2.ComponentPropsWithRef<typeof Icon>['size'];
|
|
782
|
+
/** Item Text size */
|
|
783
|
+
itemTextSize?: React_2.ComponentPropsWithRef<typeof Text_2>['size'];
|
|
784
|
+
/** Item Padding Between */
|
|
785
|
+
itemPaddingBetween?: keyof ThemeObj['sizes']['padding'];
|
|
786
|
+
/** Ref assign to the dropdown list popper container */
|
|
787
|
+
dropdownListRef?: React_2.RefObject<HTMLDivElement>;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export declare interface DropProps {
|
|
791
|
+
/** Callback for on drop */
|
|
792
|
+
onDrop?: (dragObj: DragObj) => void;
|
|
793
|
+
/** Callback for on onDragEnter */
|
|
794
|
+
onDragEnter?: (dragObj: DragObj) => {
|
|
795
|
+
success: boolean;
|
|
796
|
+
} | undefined;
|
|
797
|
+
/** acceptType should be an array which accept base on dragged type */
|
|
798
|
+
acceptType?: string[];
|
|
799
|
+
/** Style object for drag accept */
|
|
800
|
+
acceptStyle?: StyleObj;
|
|
801
|
+
/** Style object for drag reject */
|
|
802
|
+
rejectStyle?: StyleObj;
|
|
803
|
+
/** Overlay component for drag accept */
|
|
804
|
+
overlayAcceptComponent: React_2.ReactNode;
|
|
805
|
+
/** Overlay component for drag Deny */
|
|
806
|
+
overlayDenyComponent: React_2.ReactNode;
|
|
807
|
+
/** Content where activate drop */
|
|
808
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export declare interface DSWindow {
|
|
812
|
+
draggedItem?: {
|
|
813
|
+
event: React_2.DragEvent<HTMLDivElement>;
|
|
814
|
+
data: Record<string, unknown>;
|
|
815
|
+
type: string;
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
declare type ElementType = 'listItem' | 'button' | 'list' | 'chipInputKeys' | 'chipInputSpace';
|
|
820
|
+
|
|
821
|
+
export declare const EmailComposerInput: React_2.ForwardRefExoticComponent<EmailComposerInputProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
822
|
+
|
|
823
|
+
export declare interface EmailComposerInputProps extends HTMLAttributes<HTMLDivElement> {
|
|
824
|
+
/** Input's Placeholder */
|
|
825
|
+
placeholder?: string;
|
|
826
|
+
/** Placeholder Type */
|
|
827
|
+
placeholderType?: 'default' | 'inline';
|
|
828
|
+
/** Input's value */
|
|
829
|
+
value?: string;
|
|
830
|
+
/** Callback to call when Input's value changes */
|
|
831
|
+
onChange?: (ev: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export declare const FileLoader: React_2.ForwardRefExoticComponent<FileLoaderProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
835
|
+
|
|
836
|
+
export declare type FileLoaderProps = IconButtonProps & {
|
|
837
|
+
onChange?: (event: React_2.ChangeEvent<HTMLInputElement>, files: FileList | null) => void;
|
|
838
|
+
/** icon name */
|
|
839
|
+
icon?: IconButtonProps['icon'];
|
|
840
|
+
/** accept multiple files */
|
|
841
|
+
multiple?: boolean;
|
|
842
|
+
/** capture mode (see <input type="file"> docs) */
|
|
843
|
+
capture?: string;
|
|
844
|
+
/** Accept attribute of input element */
|
|
845
|
+
accept?: string;
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
export declare interface FormElementProps extends ContainerProps {
|
|
849
|
+
label?: TextProps['children'];
|
|
850
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
export declare const FormRow: React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
854
|
+
|
|
855
|
+
export declare const FormSection: React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
856
|
+
|
|
857
|
+
export declare const FormSubSection: React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
858
|
+
|
|
859
|
+
export declare const generateColorSet: ({ regular, hover, active, disabled, focus }: Pick<ThemeColorObj, 'regular'> & Partial<Omit<ThemeColorObj, 'regular'>>, dark?: boolean) => ThemeColorObj;
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* Create a function to retrieve the color of the given name based on the theme palette if the name is a palette key,
|
|
863
|
+
* generating a set with the colorSet utility if the color is not a palette key.
|
|
864
|
+
* Useful for calling inside styledComponents in a short mode
|
|
865
|
+
* @param {string} color It can contain also the variant in the form color[.variant]
|
|
866
|
+
* @example
|
|
867
|
+
* getColor('primary.disabled');
|
|
868
|
+
*
|
|
869
|
+
* // from styled components
|
|
870
|
+
* const StyledComponent = styled.div`
|
|
871
|
+
* background-color: ${getColor('secondary')}
|
|
872
|
+
* `
|
|
873
|
+
* @returns {({theme?: Theme}) => string} a function that, given the theme, returns the wanted color
|
|
874
|
+
*/
|
|
875
|
+
export declare function getColor(color: string): (args: {
|
|
876
|
+
theme: ThemeObj;
|
|
877
|
+
}) => string;
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* Retrieve the color of the given name based on the theme palette if the name is a palette key,
|
|
881
|
+
* generating a set with the colorSet utility if the color is not a palette key
|
|
882
|
+
* @param {string} color - It can contain also the variant in the form color[.variant]
|
|
883
|
+
* @param {ThemeObj} theme - The theme object
|
|
884
|
+
* @example
|
|
885
|
+
* const theme = useTheme();
|
|
886
|
+
* getColor('gray5', theme);
|
|
887
|
+
*
|
|
888
|
+
* // from styled components
|
|
889
|
+
* const StyledComponent = styled.div`
|
|
890
|
+
* background-color: ${({ theme }) => getColor('secondary', theme)}
|
|
891
|
+
* `
|
|
892
|
+
* @returns {string} The wanted color
|
|
893
|
+
*/
|
|
894
|
+
export declare function getColor(color: string, theme: ThemeObj): string;
|
|
895
|
+
|
|
896
|
+
export declare function getKeyboardPreset(type: ElementType, callback: (e: KeyboardEvent) => void, ref?: React_2.MutableRefObject<HTMLElement | null> | undefined, keys?: string[], modifier?: boolean): KeyboardPreset;
|
|
897
|
+
|
|
898
|
+
declare function getPadding(padding: PaddingStringComposition | PaddingObj): (args: {
|
|
899
|
+
theme: ThemeObj;
|
|
900
|
+
}) => string;
|
|
901
|
+
|
|
902
|
+
declare function getPadding(padding: PaddingStringComposition | PaddingObj, theme: ThemeObj): string;
|
|
903
|
+
|
|
904
|
+
declare function getPadding(padding: PaddingStringComposition | PaddingObj, theme?: ThemeObj): string | ((args: {
|
|
905
|
+
theme: ThemeObj;
|
|
906
|
+
}) => string);
|
|
907
|
+
export { getPadding }
|
|
908
|
+
export { getPadding as parsePadding }
|
|
909
|
+
|
|
910
|
+
declare type HtmlElementKeyboardEventKey = {
|
|
911
|
+
[K in keyof HTMLElementEventMap]: HTMLElementEventMap[K] extends KeyboardEvent ? K : never;
|
|
912
|
+
}[keyof HTMLElementEventMap];
|
|
913
|
+
|
|
914
|
+
export declare const Icon: StyledComponent<React_2.ForwardRefExoticComponent<IconComponentProps & React_2.RefAttributes<SVGSVGElement>>, DefaultTheme, Required<Pick<IconProps, "color" | "size">> & IconProps & React_2.SVGAttributes<SVGSVGElement>, "color" | "size">;
|
|
915
|
+
|
|
916
|
+
export declare const IconButton: React_2.ForwardRefExoticComponent<IconButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
917
|
+
|
|
918
|
+
export declare type IconButtonProps = ButtonProps & {
|
|
919
|
+
/** Color of the icon */
|
|
920
|
+
iconColor?: string | keyof ThemeObj['palette'];
|
|
921
|
+
/** Color of the button */
|
|
922
|
+
backgroundColor?: string | keyof ThemeObj['palette'];
|
|
923
|
+
/** whether to disable the IconButton or not */
|
|
924
|
+
disabled?: boolean;
|
|
925
|
+
/** button size */
|
|
926
|
+
size?: ButtonProps['size'];
|
|
927
|
+
/** Custom button size */
|
|
928
|
+
customSize?: {
|
|
929
|
+
iconSize: string | keyof ThemeObj['sizes']['icon'];
|
|
930
|
+
paddingSize: 0 | string | keyof ThemeObj['sizes']['padding'];
|
|
931
|
+
};
|
|
932
|
+
/** icon name */
|
|
933
|
+
icon: keyof ThemeObj['icons'];
|
|
934
|
+
/** IconButton border radius */
|
|
935
|
+
borderRadius?: 'regular' | 'round';
|
|
936
|
+
/** Click callback */
|
|
937
|
+
onClick: (e: KeyboardEvent | React_2.MouseEvent<HTMLButtonElement>) => void;
|
|
938
|
+
/**
|
|
939
|
+
* Custom icon color
|
|
940
|
+
* @deprecated use iconColor instead
|
|
941
|
+
*/
|
|
942
|
+
customIconColor?: string;
|
|
943
|
+
secondaryAction?: never;
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
export declare const IconCheckbox: React_2.ForwardRefExoticComponent<IconCheckboxProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
947
|
+
|
|
948
|
+
export declare interface IconCheckboxProps extends Omit<ContainerProps, 'margin'> {
|
|
949
|
+
/** Status of the IconCheckbox */
|
|
950
|
+
defaultChecked?: boolean;
|
|
951
|
+
/** IconCheckbox text */
|
|
952
|
+
label?: string;
|
|
953
|
+
/** IconCheckbox radius */
|
|
954
|
+
borderRadius?: 'regular' | 'round';
|
|
955
|
+
/** whether to disable the IconCheckbox or not */
|
|
956
|
+
disabled?: boolean;
|
|
957
|
+
/** IconCheckbox icon */
|
|
958
|
+
icon: keyof ThemeObj['icons'];
|
|
959
|
+
/** IconCheckbox size */
|
|
960
|
+
size?: 'small' | 'regular' | 'large';
|
|
961
|
+
/** IconCheckbox margin */
|
|
962
|
+
margin?: keyof ThemeObj['sizes']['padding'];
|
|
963
|
+
/** IconCheckbox value */
|
|
964
|
+
value?: boolean;
|
|
965
|
+
/** change callback */
|
|
966
|
+
onChange: () => void;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
declare type IconComponent = React_2.ComponentType<React_2.SVGProps<SVGSVGElement> & {
|
|
970
|
+
ref: React_2.ForwardedRef<SVGSVGElement>;
|
|
971
|
+
}>;
|
|
972
|
+
|
|
973
|
+
export declare interface IconComponentProps extends SVGAttributes<SVGSVGElement> {
|
|
974
|
+
/** Icon to show. It can be a string key for the theme icons or a custom icon component */
|
|
975
|
+
icon: keyof ThemeObj['icons'] | IconComponent;
|
|
976
|
+
/** whether the icon is in a disabled element */
|
|
977
|
+
disabled?: boolean;
|
|
978
|
+
/** action to perform on Icon Click
|
|
979
|
+
* @deprecated consider using an IconButton instead of an Icon
|
|
980
|
+
*/
|
|
981
|
+
onClick?: React_2.ReactEventHandler<SVGSVGElement>;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export declare interface IconProps extends IconComponentProps {
|
|
985
|
+
/** Icon Color */
|
|
986
|
+
color?: string | keyof ThemeObj['palette'];
|
|
987
|
+
/** Custom color, css syntax
|
|
988
|
+
* @deprecated use color instead
|
|
989
|
+
*/
|
|
990
|
+
customColor?: string;
|
|
991
|
+
/** Icon size */
|
|
992
|
+
size?: keyof ThemeObj['sizes']['icon'];
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
declare type IconSkeletonProps = {
|
|
996
|
+
variant?: string;
|
|
997
|
+
backgroundSize?: string;
|
|
998
|
+
size?: keyof typeof SIZES;
|
|
999
|
+
width?: string;
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
export declare type Input = React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLDivElement>> & {
|
|
1003
|
+
_newId?: number;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
export declare const Input: Input;
|
|
1007
|
+
|
|
1008
|
+
export declare interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
1009
|
+
/** Input's background color */
|
|
1010
|
+
backgroundColor?: keyof ThemeObj['palette'];
|
|
1011
|
+
/** whether to disable the Input or not */
|
|
1012
|
+
disabled?: boolean;
|
|
1013
|
+
/** Input's text color */
|
|
1014
|
+
textColor?: keyof ThemeObj['palette'];
|
|
1015
|
+
/** Input's bottom border color */
|
|
1016
|
+
borderColor?: keyof ThemeObj['palette'];
|
|
1017
|
+
/** Label of the input, will act (graphically) as placeholder when the input is not focused */
|
|
1018
|
+
label?: string;
|
|
1019
|
+
/** input change callback */
|
|
1020
|
+
onChange?: (e: React_2.ChangeEvent<HTMLInputElement>) => void;
|
|
1021
|
+
/** ref to the input element */
|
|
1022
|
+
inputRef?: React_2.RefObject<HTMLInputElement>;
|
|
1023
|
+
/** value of the input */
|
|
1024
|
+
value?: string | number;
|
|
1025
|
+
/** default value of the input */
|
|
1026
|
+
defaultValue?: string | number;
|
|
1027
|
+
/** Whether the input has an error */
|
|
1028
|
+
hasError?: boolean;
|
|
1029
|
+
/** Whether the input should focus on load */
|
|
1030
|
+
autoFocus?: boolean;
|
|
1031
|
+
/** input autocompletion type (HTML input attribute) */
|
|
1032
|
+
autoComplete?: string;
|
|
1033
|
+
/** HTML input name */
|
|
1034
|
+
inputName?: string;
|
|
1035
|
+
/** Custom component to show on the right of the input, it occupies 56x42 px */
|
|
1036
|
+
CustomIcon?: React_2.ComponentType<{
|
|
1037
|
+
hasError: boolean;
|
|
1038
|
+
hasFocus: boolean;
|
|
1039
|
+
disabled: boolean;
|
|
1040
|
+
}>;
|
|
1041
|
+
/** input type attribute */
|
|
1042
|
+
type?: string;
|
|
1043
|
+
/** hide the inputs bottom line */
|
|
1044
|
+
hideBorder?: boolean;
|
|
1045
|
+
/** on Enter key callback */
|
|
1046
|
+
onEnter?: (e: KeyboardEvent) => void;
|
|
1047
|
+
/** Description of the input */
|
|
1048
|
+
description?: string | undefined;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
export declare function isThemeColor(color: string, theme: ThemeObj): color is ThemePaletteColorKey;
|
|
1052
|
+
|
|
1053
|
+
export declare function isThemeSize(size: string, sizeObj: ThemeSizeObj): size is keyof ThemeSizeObj;
|
|
1054
|
+
|
|
1055
|
+
declare interface Item {
|
|
1056
|
+
id: string;
|
|
1057
|
+
label: string | React_2.ReactElement;
|
|
1058
|
+
CustomComponent?: React_2.ComponentType<DefaultTabBarItemProps & HTMLAttributes<HTMLDivElement>>;
|
|
1059
|
+
disabled?: boolean;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
export declare interface ItemComponentProps<T extends ItemType> {
|
|
1063
|
+
item: T;
|
|
1064
|
+
visible: boolean;
|
|
1065
|
+
active: boolean;
|
|
1066
|
+
selected: boolean;
|
|
1067
|
+
background: keyof ThemeObj['palette'];
|
|
1068
|
+
selectedBackground: keyof ThemeObj['palette'];
|
|
1069
|
+
activeBackground: keyof ThemeObj['palette'];
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export declare interface ItemType {
|
|
1073
|
+
id: string;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
export declare type KeyboardPreset = Array<KeyboardPresetObj>;
|
|
1077
|
+
|
|
1078
|
+
declare type KeyboardPresetObj = {
|
|
1079
|
+
type: HtmlElementKeyboardEventKey;
|
|
1080
|
+
callback: (e: KeyboardEvent) => void;
|
|
1081
|
+
keys: string[];
|
|
1082
|
+
modifier?: boolean;
|
|
1083
|
+
haveToPreventDefault?: boolean;
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
export declare interface LabelFactoryProps {
|
|
1087
|
+
label: string | undefined;
|
|
1088
|
+
open: boolean;
|
|
1089
|
+
focus: boolean;
|
|
1090
|
+
background: string | keyof ThemeObj['palette'];
|
|
1091
|
+
multiple: boolean;
|
|
1092
|
+
disabled: boolean;
|
|
1093
|
+
selected: SelectItem[];
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
export declare const Link: React_2.ForwardRefExoticComponent<{
|
|
1097
|
+
/** Whether the link should be underlined */
|
|
1098
|
+
underlined?: boolean | undefined;
|
|
1099
|
+
} & React_2.AnchorHTMLAttributes<HTMLAnchorElement> & TextProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1100
|
+
|
|
1101
|
+
export declare type LinkProps = {
|
|
1102
|
+
/** Whether the link should be underlined */
|
|
1103
|
+
underlined?: boolean;
|
|
1104
|
+
} & React_2.AnchorHTMLAttributes<HTMLAnchorElement> & TextProps;
|
|
1105
|
+
|
|
1106
|
+
export declare const List: React_2.ForwardRefExoticComponent<ListProps<any> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1107
|
+
|
|
1108
|
+
export declare interface ListProps<T extends ItemType> extends ContainerProps {
|
|
1109
|
+
/** Array of items to be displayed */
|
|
1110
|
+
items: Array<T>;
|
|
1111
|
+
/** props to be passed down to each item */
|
|
1112
|
+
itemProps?: Record<string, unknown>;
|
|
1113
|
+
/** Component to be rendered for each item */
|
|
1114
|
+
ItemComponent: React_2.ComponentType<ItemComponentProps<T>>;
|
|
1115
|
+
/** object whose keys are the indexes of the selected items */
|
|
1116
|
+
selected?: Record<string, unknown>;
|
|
1117
|
+
/** id of the active item */
|
|
1118
|
+
active?: string;
|
|
1119
|
+
/** callback to be executed when the bottom element is rendered */
|
|
1120
|
+
onListBottom?: () => void;
|
|
1121
|
+
/** List background color */
|
|
1122
|
+
background?: keyof ThemeObj['palette'];
|
|
1123
|
+
/** Selected list item background color */
|
|
1124
|
+
selectedBackground?: keyof ThemeObj['palette'];
|
|
1125
|
+
/** Active List item background color */
|
|
1126
|
+
activeBackground?: keyof ThemeObj['palette'];
|
|
1127
|
+
/** Disable keyboard shortcuts */
|
|
1128
|
+
keyboardShortcutsIsDisabled?: boolean;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
export declare const LoadMore: React_2.ForwardRefExoticComponent<LoadMoreProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1132
|
+
|
|
1133
|
+
export declare interface LoadMoreProps extends ContainerProps {
|
|
1134
|
+
label?: TextProps['children'];
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
declare type LogoSkeletonProps = {
|
|
1138
|
+
variant?: string;
|
|
1139
|
+
backgroundSize?: string;
|
|
1140
|
+
radius?: string;
|
|
1141
|
+
size?: keyof typeof SIZES;
|
|
1142
|
+
width?: string;
|
|
1143
|
+
height?: string;
|
|
1144
|
+
};
|
|
1145
|
+
|
|
1146
|
+
export declare const Modal: React_2.ForwardRefExoticComponent<ModalProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1147
|
+
|
|
1148
|
+
export declare function ModalManager({ children }: ModalManagerProps): JSX.Element;
|
|
1149
|
+
|
|
1150
|
+
export declare const ModalManagerContext: React_2.Context<CreateModalFn>;
|
|
1151
|
+
|
|
1152
|
+
export declare interface ModalManagerProps {
|
|
1153
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
export declare interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1157
|
+
/** Modal background */
|
|
1158
|
+
background?: string | keyof ThemeObj['palette'];
|
|
1159
|
+
/** Modal type */
|
|
1160
|
+
type?: 'default' | 'error';
|
|
1161
|
+
/** Modal title */
|
|
1162
|
+
title?: string | React_2.ReactElement;
|
|
1163
|
+
/** Modal size */
|
|
1164
|
+
size?: 'extrasmall' | 'small' | 'medium' | 'large';
|
|
1165
|
+
/** Boolean to show the modal */
|
|
1166
|
+
open?: boolean;
|
|
1167
|
+
/** Centered Modal */
|
|
1168
|
+
centered?: boolean;
|
|
1169
|
+
/** Callback for main action */
|
|
1170
|
+
onConfirm?: (event: React_2.MouseEvent<HTMLButtonElement> | KeyboardEvent) => void;
|
|
1171
|
+
/** Label for the Main action Button */
|
|
1172
|
+
confirmLabel?: string;
|
|
1173
|
+
/** BackgroundColor for the Main action Button */
|
|
1174
|
+
confirmColor?: string | keyof ThemeObj['palette'];
|
|
1175
|
+
/** Callback for secondary action */
|
|
1176
|
+
onSecondaryAction?: (event: React_2.MouseEvent<HTMLButtonElement> | KeyboardEvent) => void;
|
|
1177
|
+
/** Label for the Secondary action Button */
|
|
1178
|
+
secondaryActionLabel?: string;
|
|
1179
|
+
/** Callback to close the Modal */
|
|
1180
|
+
onClose?: (event: React_2.MouseEvent | KeyboardEvent) => void;
|
|
1181
|
+
/** Label for the Modal close Button */
|
|
1182
|
+
dismissLabel?: string;
|
|
1183
|
+
/** Label for copy button in the Error Modal */
|
|
1184
|
+
copyLabel?: string;
|
|
1185
|
+
/** Optional element to show in the footer of the Modal */
|
|
1186
|
+
optionalFooter?: React_2.ReactElement;
|
|
1187
|
+
/** Prop to override the default footer buttons */
|
|
1188
|
+
customFooter?: React_2.ReactElement;
|
|
1189
|
+
/** Hide the footer completely */
|
|
1190
|
+
hideFooter?: boolean;
|
|
1191
|
+
/** Show icon to close Modal */
|
|
1192
|
+
showCloseIcon?: boolean;
|
|
1193
|
+
/** Css property to handle the stack order of multiple modals */
|
|
1194
|
+
zIndex?: number;
|
|
1195
|
+
/** max height of the modal body */
|
|
1196
|
+
maxHeight?: string;
|
|
1197
|
+
/** Flag to disable the Portal implementation */
|
|
1198
|
+
disablePortal?: boolean;
|
|
1199
|
+
/** Content of the modal */
|
|
1200
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
export declare const MultiButton: React_2.ForwardRefExoticComponent<{
|
|
1204
|
+
/** MultiButton text */
|
|
1205
|
+
label?: string | undefined;
|
|
1206
|
+
/** whether to disable the Primary Button or not */
|
|
1207
|
+
disabledPrimary?: boolean | undefined;
|
|
1208
|
+
/** whether to disable the Secondary Dropdown or not */
|
|
1209
|
+
disabledSecondary?: boolean | undefined;
|
|
1210
|
+
/** MultiButton icon */
|
|
1211
|
+
icon?: string | undefined;
|
|
1212
|
+
/** Main icon */
|
|
1213
|
+
primaryIcon?: string | undefined;
|
|
1214
|
+
/** Color of the Button label */
|
|
1215
|
+
color?: string | undefined;
|
|
1216
|
+
/** Color of the Button background */
|
|
1217
|
+
background?: string | undefined;
|
|
1218
|
+
/** Dropdown items */
|
|
1219
|
+
items: DropdownProps['items'];
|
|
1220
|
+
/** Button size */
|
|
1221
|
+
size?: "medium" | "large" | "extralarge" | undefined;
|
|
1222
|
+
/** Dropdown properties */
|
|
1223
|
+
dropdownProps?: DropdownProps | undefined;
|
|
1224
|
+
} & Omit<ButtonProps, "disabled" | "icon" | "secondaryAction"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1225
|
+
|
|
1226
|
+
export declare type MultiButtonProps = {
|
|
1227
|
+
/** MultiButton text */
|
|
1228
|
+
label?: string;
|
|
1229
|
+
/** whether to disable the Primary Button or not */
|
|
1230
|
+
disabledPrimary?: boolean;
|
|
1231
|
+
/** whether to disable the Secondary Dropdown or not */
|
|
1232
|
+
disabledSecondary?: boolean;
|
|
1233
|
+
/** MultiButton icon */
|
|
1234
|
+
icon?: keyof ThemeObj['icons'];
|
|
1235
|
+
/** Main icon */
|
|
1236
|
+
primaryIcon?: keyof ThemeObj['icons'];
|
|
1237
|
+
/** Color of the Button label */
|
|
1238
|
+
color?: string;
|
|
1239
|
+
/** Color of the Button background */
|
|
1240
|
+
background?: string;
|
|
1241
|
+
/** Dropdown items */
|
|
1242
|
+
items: DropdownProps['items'];
|
|
1243
|
+
/** Button size */
|
|
1244
|
+
size?: Extract<ButtonProps['size'], 'medium' | 'large' | 'extralarge'>;
|
|
1245
|
+
/** Dropdown properties */
|
|
1246
|
+
dropdownProps?: DropdownProps;
|
|
1247
|
+
} & Omit<ButtonProps, 'secondaryAction' | 'icon' | 'disabled'>;
|
|
1248
|
+
|
|
1249
|
+
declare type Options = {
|
|
1250
|
+
removeFrom: 'end' | 'start';
|
|
1251
|
+
maxVisible?: number;
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
export declare const Padding: React_2.ForwardRefExoticComponent<(PaddingProps & Omit<React_2.HTMLAttributes<HTMLDivElement>, "id" | "height" | "width" | "color" | "translate" | "hidden" | "dir" | "slot" | "style" | "title" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "tabIndex" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">) & React_2.RefAttributes<HTMLDivElement>>;
|
|
1255
|
+
|
|
1256
|
+
export declare type PaddingObj = {
|
|
1257
|
+
value: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1258
|
+
} | {
|
|
1259
|
+
all: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1260
|
+
} | RequireAtLeastOne<{
|
|
1261
|
+
vertical: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1262
|
+
horizontal: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1263
|
+
}> | RequireAtLeastOne<{
|
|
1264
|
+
top: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1265
|
+
right: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1266
|
+
bottom: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1267
|
+
left: string | keyof ThemeObj['sizes']['padding'] | 0;
|
|
1268
|
+
}>;
|
|
1269
|
+
|
|
1270
|
+
export declare type PaddingProps = {
|
|
1271
|
+
width?: string;
|
|
1272
|
+
height?: string;
|
|
1273
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
1274
|
+
} & PaddingObj & HTMLAttributes<HTMLDivElement>;
|
|
1275
|
+
|
|
1276
|
+
declare type PaddingString = `${string | keyof ThemeObj['sizes']['padding']}`;
|
|
1277
|
+
|
|
1278
|
+
declare type PaddingStringComposition = PaddingString | `${PaddingString} | ${PaddingString}` | `${PaddingString} ${PaddingString} ${PaddingString}` | `${PaddingString} ${PaddingString} ${PaddingString} ${PaddingString}`;
|
|
1279
|
+
|
|
1280
|
+
export declare const Paragraph: React_2.ForwardRefExoticComponent<TextProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1281
|
+
|
|
1282
|
+
export declare type ParagraphProps = TextProps;
|
|
1283
|
+
|
|
1284
|
+
export declare const PasswordInput: React_2.ForwardRefExoticComponent<InputProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1285
|
+
|
|
1286
|
+
export declare const Popover: React_2.ForwardRefExoticComponent<PopoverProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1287
|
+
|
|
1288
|
+
export declare interface PopoverProps extends PopperProps {
|
|
1289
|
+
/** Whether to activate the popover on hover of anchorEl. If true, the 'open' prop will be ignored. */
|
|
1290
|
+
activateOnHover?: boolean;
|
|
1291
|
+
/** Whether to style the popover container as a modal component */
|
|
1292
|
+
styleAsModal?: boolean;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
export declare const Popper: React_2.ForwardRefExoticComponent<PopperProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1296
|
+
|
|
1297
|
+
export declare interface PopperProps extends HTMLAttributes<HTMLDivElement> {
|
|
1298
|
+
/** Whether the popper is open or not */
|
|
1299
|
+
open?: boolean;
|
|
1300
|
+
/** Ref to the DOM element triggering the popper */
|
|
1301
|
+
anchorEl: React_2.RefObject<HTMLElement>;
|
|
1302
|
+
/** Optional parameter to anchor the popper to a virtual element, defined by his x, y coordinates (ex. {x: 2, y: 2}) */
|
|
1303
|
+
virtualElement?: {
|
|
1304
|
+
x: number;
|
|
1305
|
+
y: number;
|
|
1306
|
+
};
|
|
1307
|
+
/** Whether to disable the re-focus of Popper trigger */
|
|
1308
|
+
disableRestoreFocus?: boolean;
|
|
1309
|
+
/** Popper placement relative to the anchorEl */
|
|
1310
|
+
placement?: Placement_2;
|
|
1311
|
+
/** Callback for closed Popper */
|
|
1312
|
+
onClose: () => void;
|
|
1313
|
+
/** Flag to disable the Portal implementation */
|
|
1314
|
+
disablePortal?: boolean;
|
|
1315
|
+
/** Popper content */
|
|
1316
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export declare const Portal: React_2.ForwardRefExoticComponent<PortalProps & React_2.RefAttributes<React_2.ReactPortal>>;
|
|
1320
|
+
|
|
1321
|
+
export declare interface PortalProps {
|
|
1322
|
+
/** The children to render into the `container` */
|
|
1323
|
+
children: React_2.ReactElement;
|
|
1324
|
+
/**
|
|
1325
|
+
* HTML node where to insert the Portal's children.
|
|
1326
|
+
* The default value is 'windowObj.document'.
|
|
1327
|
+
* */
|
|
1328
|
+
container?: Element;
|
|
1329
|
+
/** Flag to show or hide Portal's content */
|
|
1330
|
+
show?: boolean;
|
|
1331
|
+
/** Flag to disable the Portal implementation */
|
|
1332
|
+
disablePortal?: boolean;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
export declare function pseudoClasses(theme: ThemeObj, color: string | keyof ThemeObj['palette'], cssProperty?: string): FlattenSimpleInterpolation;
|
|
1336
|
+
|
|
1337
|
+
export declare const Quota: React_2.ForwardRefExoticComponent<QuotaProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1338
|
+
|
|
1339
|
+
export declare interface QuotaProps extends ContainerProps {
|
|
1340
|
+
/** Quota background color */
|
|
1341
|
+
background?: keyof ThemeObj['palette'];
|
|
1342
|
+
/** Quota percentage */
|
|
1343
|
+
fill: number;
|
|
1344
|
+
/** Quota fill background color */
|
|
1345
|
+
fillBackground?: keyof ThemeObj['palette'];
|
|
1346
|
+
/** Quota height */
|
|
1347
|
+
height?: number | string;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
export declare const Radio: React_2.ForwardRefExoticComponent<RadioProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1351
|
+
|
|
1352
|
+
export declare const RadioGroup: React_2.ForwardRefExoticComponent<RadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1353
|
+
|
|
1354
|
+
export declare interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
1355
|
+
/** Default value for the radio group */
|
|
1356
|
+
defaultValue?: string;
|
|
1357
|
+
/** Radio group value */
|
|
1358
|
+
value?: string;
|
|
1359
|
+
/** change callback */
|
|
1360
|
+
onChange?: (value: string) => void;
|
|
1361
|
+
/** children elements of Radio Group */
|
|
1362
|
+
children: JSX.Element[];
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
export declare interface RadioProps extends Omit<ContainerProps, 'onChange'> {
|
|
1366
|
+
/** status of the Radio */
|
|
1367
|
+
defaultChecked?: boolean;
|
|
1368
|
+
/** Radio checked */
|
|
1369
|
+
checked?: boolean;
|
|
1370
|
+
/** value of the Radio */
|
|
1371
|
+
value?: string;
|
|
1372
|
+
/** Radio text */
|
|
1373
|
+
label?: string | React_2.ReactElement;
|
|
1374
|
+
/** whether to disable the radio or not */
|
|
1375
|
+
disabled?: boolean;
|
|
1376
|
+
/** click callback */
|
|
1377
|
+
onClick?: React_2.ReactEventHandler;
|
|
1378
|
+
/** change callback */
|
|
1379
|
+
onChange?: (checked: boolean) => void;
|
|
1380
|
+
/** radio padding */
|
|
1381
|
+
padding?: ContainerProps['padding'];
|
|
1382
|
+
/** available sizes */
|
|
1383
|
+
size?: RadioSize;
|
|
1384
|
+
/** icon color */
|
|
1385
|
+
iconColor?: keyof ThemeObj['palette'];
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
declare type RadioSize = 'medium' | 'small';
|
|
1389
|
+
|
|
1390
|
+
declare type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
1391
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
1392
|
+
}[Keys];
|
|
1393
|
+
|
|
1394
|
+
export declare function Responsive({ children, mode, target }: ResponsiveProps): JSX.Element;
|
|
1395
|
+
|
|
1396
|
+
export declare interface ResponsiveProps {
|
|
1397
|
+
/** Whether the component's children should be displayed on mobile or desktop mode */
|
|
1398
|
+
mode: ScreenMode;
|
|
1399
|
+
/** The Window element to use to determine the screenMode */
|
|
1400
|
+
target?: Window;
|
|
1401
|
+
/** Content to conditionally render */
|
|
1402
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
export declare const Row: React_2.ForwardRefExoticComponent<RowProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1406
|
+
|
|
1407
|
+
export declare interface RowProps extends ContainerProps {
|
|
1408
|
+
display?: string;
|
|
1409
|
+
flexBasis?: string;
|
|
1410
|
+
flexGrow?: 'unset' | number;
|
|
1411
|
+
flexShrink?: 'unset' | number;
|
|
1412
|
+
order?: 'unset' | number;
|
|
1413
|
+
takeAvailableSpace?: boolean;
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
export declare type ScreenMode = 'mobile' | 'desktop';
|
|
1417
|
+
|
|
1418
|
+
export declare const SearchInput: React_2.ForwardRefExoticComponent<SearchInputProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1419
|
+
|
|
1420
|
+
export declare interface SearchInputProps extends ContainerProps {
|
|
1421
|
+
onChange?: () => void;
|
|
1422
|
+
inputRef?: React_2.RefObject<HTMLInputElement>;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
export declare const Select: React_2.ForwardRefExoticComponent<SelectProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1426
|
+
|
|
1427
|
+
declare type SelectComponentProps = {
|
|
1428
|
+
label?: string;
|
|
1429
|
+
background?: string | keyof ThemeObj['palette'];
|
|
1430
|
+
disabled?: boolean;
|
|
1431
|
+
items?: SelectItem[];
|
|
1432
|
+
/** Css display property of select */
|
|
1433
|
+
display?: 'block' | 'inline-block';
|
|
1434
|
+
/** Css width property of dropdown */
|
|
1435
|
+
dropdownWidth?: string;
|
|
1436
|
+
/** Css max-width property of dropdown */
|
|
1437
|
+
dropdownMaxWidth?: string;
|
|
1438
|
+
/** Css max-height property of dropdown */
|
|
1439
|
+
dropdownMaxHeight?: string;
|
|
1440
|
+
LabelFactory?: React_2.ComponentType<LabelFactoryProps>;
|
|
1441
|
+
i18nAllLabel?: string;
|
|
1442
|
+
/** Flag to disable the Portal implementation of dropdown */
|
|
1443
|
+
disablePortal?: boolean;
|
|
1444
|
+
/** Whether to show checkboxes */
|
|
1445
|
+
showCheckbox?: boolean;
|
|
1446
|
+
onChange: (arg: SelectItem[] | string | null) => void;
|
|
1447
|
+
} & ({
|
|
1448
|
+
multiple: true;
|
|
1449
|
+
/** Initial selection value */
|
|
1450
|
+
defaultSelection?: SelectItem[];
|
|
1451
|
+
/** Selection value (controlled mode) */
|
|
1452
|
+
selection?: SelectItem[];
|
|
1453
|
+
onChange: (items: SelectItem[]) => void;
|
|
1454
|
+
} | {
|
|
1455
|
+
multiple?: false;
|
|
1456
|
+
/** Initial selection value */
|
|
1457
|
+
defaultSelection?: SelectItem;
|
|
1458
|
+
/** Selection value (controlled mode) */
|
|
1459
|
+
selection?: SelectItem;
|
|
1460
|
+
onChange: (value: string | null) => void;
|
|
1461
|
+
});
|
|
1462
|
+
|
|
1463
|
+
export declare type SelectItem = {
|
|
1464
|
+
label: string;
|
|
1465
|
+
value: string;
|
|
1466
|
+
disabled?: boolean;
|
|
1467
|
+
customComponent?: React_2.ReactElement;
|
|
1468
|
+
};
|
|
1469
|
+
|
|
1470
|
+
export declare type SelectProps = SelectComponentProps & Omit<DropdownProps, keyof SelectComponentProps | 'children'>;
|
|
1471
|
+
|
|
1472
|
+
declare type ShapeType = 'round' | 'square';
|
|
1473
|
+
|
|
1474
|
+
export declare type Shimmer = React_2.VFC<SkeletonProps> & {
|
|
1475
|
+
[K in keyof typeof ShimmerObject]: React_2.VFC<Parameters<typeof ShimmerObject[K]>[number]>;
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1478
|
+
export declare const Shimmer: Shimmer;
|
|
1479
|
+
|
|
1480
|
+
declare const ShimmerObject: {
|
|
1481
|
+
Accordion: ({ width, iconStart, iconEnd, badge }: {
|
|
1482
|
+
width: string;
|
|
1483
|
+
iconStart: boolean;
|
|
1484
|
+
iconEnd: boolean;
|
|
1485
|
+
badge: boolean;
|
|
1486
|
+
}) => JSX.Element;
|
|
1487
|
+
Avatar: ({ size, ...rest }: AvatarSkeletonComponentProps) => JSX.Element;
|
|
1488
|
+
Badge: ({ size, ...rest }: BadgeSkeletonProps) => JSX.Element;
|
|
1489
|
+
Button: ({ size, ...rest }: ButtonSkeletonProps) => JSX.Element;
|
|
1490
|
+
Checkbox: ({ size, ...rest }: IconSkeletonProps) => JSX.Element;
|
|
1491
|
+
EmailChip: ({ width, iconStart, iconEnd, iconEndAdditional }: {
|
|
1492
|
+
width?: string | undefined;
|
|
1493
|
+
iconStart?: boolean | undefined;
|
|
1494
|
+
iconEnd?: boolean | undefined;
|
|
1495
|
+
iconEndAdditional?: boolean | undefined;
|
|
1496
|
+
}) => JSX.Element;
|
|
1497
|
+
FormSection: StyledComponent<React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>, DefaultTheme, {
|
|
1498
|
+
variant: string;
|
|
1499
|
+
backgroundSize: string;
|
|
1500
|
+
}, never>;
|
|
1501
|
+
FormSubSection: StyledComponent<React_2.ForwardRefExoticComponent<FormElementProps & React_2.RefAttributes<HTMLDivElement>>, DefaultTheme, {
|
|
1502
|
+
variant: string;
|
|
1503
|
+
backgroundSize: string;
|
|
1504
|
+
}, never>;
|
|
1505
|
+
Icon: ({ size, ...rest }: IconSkeletonProps) => JSX.Element;
|
|
1506
|
+
Input: ({ width, checkbox }: {
|
|
1507
|
+
width?: string | undefined;
|
|
1508
|
+
checkbox?: boolean | undefined;
|
|
1509
|
+
}) => JSX.Element;
|
|
1510
|
+
ListItem: ({ width, type }: {
|
|
1511
|
+
width?: string | undefined;
|
|
1512
|
+
type?: number | undefined;
|
|
1513
|
+
}) => JSX.Element;
|
|
1514
|
+
Logo: ({ size, ...rest }: LogoSkeletonProps) => JSX.Element;
|
|
1515
|
+
Text: StyledComponent<"div", DefaultTheme, SkeletonProps, never>;
|
|
1516
|
+
Quota: (props: SkeletonProps) => JSX.Element;
|
|
1517
|
+
Searchbar: (props: SkeletonProps) => JSX.Element;
|
|
1518
|
+
Snackbar: ({ width, elementStart, elementEnd }: {
|
|
1519
|
+
width?: string | undefined;
|
|
1520
|
+
elementStart?: boolean | undefined;
|
|
1521
|
+
elementEnd?: boolean | undefined;
|
|
1522
|
+
}) => JSX.Element;
|
|
1523
|
+
Stepper: ({ size, steppersNumber, ...rest }: AvatarSkeletonComponentProps & {
|
|
1524
|
+
steppersNumber: number;
|
|
1525
|
+
}) => JSX.Element;
|
|
1526
|
+
TableListItem: ({ width, type }: {
|
|
1527
|
+
width?: string | undefined;
|
|
1528
|
+
type?: number | undefined;
|
|
1529
|
+
}) => JSX.Element;
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
declare const SIZES: {
|
|
1533
|
+
readonly small: 5;
|
|
1534
|
+
readonly medium: 10;
|
|
1535
|
+
readonly large: 15;
|
|
1536
|
+
};
|
|
1537
|
+
|
|
1538
|
+
export declare type SkeletonProps = {
|
|
1539
|
+
variant?: string;
|
|
1540
|
+
backgroundSize?: string;
|
|
1541
|
+
radius?: string;
|
|
1542
|
+
orientation?: string;
|
|
1543
|
+
mainAlignment?: string;
|
|
1544
|
+
width?: string;
|
|
1545
|
+
height?: string;
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
export declare const Snackbar: React_2.ForwardRefExoticComponent<SnackbarProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1549
|
+
|
|
1550
|
+
export declare function SnackbarManager({ children, autoHideDefaultTimeout }: SnackbarManagerProps): JSX.Element;
|
|
1551
|
+
|
|
1552
|
+
export declare const SnackbarManagerContext: React_2.Context<CreateSnackbarFn>;
|
|
1553
|
+
|
|
1554
|
+
export declare interface SnackbarManagerProps {
|
|
1555
|
+
autoHideDefaultTimeout?: number;
|
|
1556
|
+
children: React_2.ReactNode | React_2.ReactNode[];
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
export declare interface SnackbarProps extends ContainerProps {
|
|
1560
|
+
/** Whether to show the Snackbar or not */
|
|
1561
|
+
open?: boolean;
|
|
1562
|
+
/** Snackbar Type */
|
|
1563
|
+
type?: 'success' | 'info' | 'warning' | 'error';
|
|
1564
|
+
/** Snackbar text message */
|
|
1565
|
+
label: string;
|
|
1566
|
+
/** Snackbar button text */
|
|
1567
|
+
actionLabel?: string;
|
|
1568
|
+
/** Button's click callback */
|
|
1569
|
+
onActionClick?: () => void;
|
|
1570
|
+
/** Callback to handle Snackbar closing */
|
|
1571
|
+
onClose?: () => void;
|
|
1572
|
+
/** Disable the autoHide functionality */
|
|
1573
|
+
disableAutoHide?: boolean;
|
|
1574
|
+
/** Hide the button in the Snackbar */
|
|
1575
|
+
hideButton?: boolean;
|
|
1576
|
+
/** zIndex of the snackbar */
|
|
1577
|
+
zIndex?: number;
|
|
1578
|
+
/** autoHide timing in milliseconds */
|
|
1579
|
+
autoHideTimeout?: number;
|
|
1580
|
+
/** Window object to use as reference to determine the screenMode */
|
|
1581
|
+
target?: Window;
|
|
1582
|
+
/** Flag to disable the Portal implementation */
|
|
1583
|
+
disablePortal?: boolean;
|
|
1584
|
+
/** Flag to disable the multiline implementation */
|
|
1585
|
+
singleLine?: boolean;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
export declare const Spinner: React_2.ForwardRefExoticComponent<SpinnerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1589
|
+
|
|
1590
|
+
export declare interface SpinnerProps extends HTMLAttributes<HTMLDivElement> {
|
|
1591
|
+
color: string | keyof ThemeObj['palette'];
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
declare type StyleObj = HTMLAttributes<HTMLDivElement>['style'];
|
|
1595
|
+
|
|
1596
|
+
declare const STYLES: Record<Partial<CSSStyleDeclaration['transition']>, {
|
|
1597
|
+
from: CSSObject;
|
|
1598
|
+
to: CSSObject;
|
|
1599
|
+
end?: CSSObject;
|
|
1600
|
+
} & CSSObject & {
|
|
1601
|
+
transitionDuration?: number;
|
|
1602
|
+
}>;
|
|
1603
|
+
|
|
1604
|
+
export declare const Switch: React_2.ForwardRefExoticComponent<SwitchProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1605
|
+
|
|
1606
|
+
export declare interface SwitchProps extends Omit<ContainerProps, 'onChange' | 'onClick'> {
|
|
1607
|
+
/** status of the Switch */
|
|
1608
|
+
defaultChecked?: boolean;
|
|
1609
|
+
/** Switch value */
|
|
1610
|
+
value?: boolean;
|
|
1611
|
+
/** Switch text */
|
|
1612
|
+
label?: string;
|
|
1613
|
+
/** Switch padding */
|
|
1614
|
+
padding?: ContainerProps['padding'];
|
|
1615
|
+
/** whether to disable the Switch or not */
|
|
1616
|
+
disabled?: boolean;
|
|
1617
|
+
/** click callback */
|
|
1618
|
+
onClick?: (event: Event) => void;
|
|
1619
|
+
/** change callback */
|
|
1620
|
+
onChange?: (checked: boolean) => void;
|
|
1621
|
+
/** available sizes */
|
|
1622
|
+
size?: SwitchSize;
|
|
1623
|
+
/** icon color */
|
|
1624
|
+
iconColor?: keyof ThemeObj['palette'];
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
declare type SwitchSize = 'medium' | 'small';
|
|
1628
|
+
|
|
1629
|
+
export declare const TabBar: React_2.ForwardRefExoticComponent<TabBarProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1630
|
+
|
|
1631
|
+
export declare interface TabBarProps extends Omit<ContainerProps, 'onChange'> {
|
|
1632
|
+
/** List of elements, can have extra attributes to pass down to the CustomComponent */
|
|
1633
|
+
items: Array<Item>;
|
|
1634
|
+
/** id of the selected item */
|
|
1635
|
+
selected?: string;
|
|
1636
|
+
/** id of the default selected item */
|
|
1637
|
+
defaultSelected?: string;
|
|
1638
|
+
/** change callback, is called with the new selected id */
|
|
1639
|
+
onChange: (selectedId: string) => void;
|
|
1640
|
+
/** click (or also keyboard in the default component) event,
|
|
1641
|
+
* the selectedItemId field is added to the event object */
|
|
1642
|
+
onItemClick: (ev: React_2.SyntheticEvent & {
|
|
1643
|
+
selectedItemId: string;
|
|
1644
|
+
}) => void;
|
|
1645
|
+
/** background color of the tabBar */
|
|
1646
|
+
background: string | keyof ThemeObj['palette'];
|
|
1647
|
+
/** underline color of the selected tab */
|
|
1648
|
+
underlineColor?: string | keyof ThemeObj['palette'];
|
|
1649
|
+
/** Force tabs to have all the same width */
|
|
1650
|
+
forceWidthEquallyDistributed?: boolean;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
export declare const Table: React_2.ForwardRefExoticComponent<TableProps & React_2.RefAttributes<HTMLTableElement>>;
|
|
1654
|
+
|
|
1655
|
+
export declare interface TableProps extends HTMLAttributes<HTMLDivElement> {
|
|
1656
|
+
/** Table rows */
|
|
1657
|
+
rows?: TRow[];
|
|
1658
|
+
/** Table headers */
|
|
1659
|
+
headers?: THeader[];
|
|
1660
|
+
/** Whether the table should show checkboxes */
|
|
1661
|
+
showCheckbox?: boolean;
|
|
1662
|
+
/** Function to generate the single row */
|
|
1663
|
+
RowFactory?: React_2.ComponentType<TRowProps>;
|
|
1664
|
+
/** Function to generate the table head section */
|
|
1665
|
+
HeaderFactory?: React_2.ComponentType<THeaderProps>;
|
|
1666
|
+
/** Callback function, called when user changes selection of rows in table. */
|
|
1667
|
+
onSelectionChange?: (ids: string[]) => void;
|
|
1668
|
+
/** Row selected by default in the table (Array of rows ids). */
|
|
1669
|
+
defaultSelection?: string[];
|
|
1670
|
+
/** Array of the selected rows (Array of rows ids). To use only if you want the table to be in controlled mode. */
|
|
1671
|
+
selectedRows?: string[];
|
|
1672
|
+
/** Whether multiple rows are selectable. */
|
|
1673
|
+
multiSelect?: boolean;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
declare const Text_2: React_2.ForwardRefExoticComponent<TextProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1677
|
+
export { Text_2 as Text }
|
|
1678
|
+
|
|
1679
|
+
declare type TextOverflow = 'ellipsis' | 'break-word';
|
|
1680
|
+
|
|
1681
|
+
export declare interface TextProps extends HTMLAttributes<HTMLDivElement> {
|
|
1682
|
+
/** Text color */
|
|
1683
|
+
color?: string | keyof ThemeObj['palette'];
|
|
1684
|
+
/** Text size */
|
|
1685
|
+
size?: keyof ThemeObj['sizes']['font'];
|
|
1686
|
+
/** Text weight */
|
|
1687
|
+
weight?: keyof ThemeObj['fonts']['weight'];
|
|
1688
|
+
/** Overflow handling */
|
|
1689
|
+
overflow?: TextOverflow;
|
|
1690
|
+
/** Disabled status */
|
|
1691
|
+
disabled?: boolean;
|
|
1692
|
+
/** Content of the text */
|
|
1693
|
+
children?: React_2.ReactNode;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
export declare const TextWithTooltip: React_2.ForwardRefExoticComponent<TextWithTooltipProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1697
|
+
|
|
1698
|
+
export declare interface TextWithTooltipProps extends TextProps {
|
|
1699
|
+
/** Text content */
|
|
1700
|
+
children: string | React_2.ReactNode;
|
|
1701
|
+
tooltipMaxWidth?: string;
|
|
1702
|
+
tooltipPlacement?: Placement;
|
|
1703
|
+
/** Tooltip delay */
|
|
1704
|
+
triggerDelay?: number;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
export declare type THeader = {
|
|
1708
|
+
id: string;
|
|
1709
|
+
label: string;
|
|
1710
|
+
/** th align attribute */
|
|
1711
|
+
align?: React_2.ThHTMLAttributes<HTMLTableHeaderCellElement>['align'];
|
|
1712
|
+
/** th width attribute */
|
|
1713
|
+
width?: string;
|
|
1714
|
+
/** Select 'All' label translation */
|
|
1715
|
+
i18nAllLabel?: string;
|
|
1716
|
+
/** Select.propTypes.items */
|
|
1717
|
+
items?: SelectProps['items'];
|
|
1718
|
+
/** Whether the label should be bold */
|
|
1719
|
+
bold?: boolean;
|
|
1720
|
+
/** De/Select all rows callback */
|
|
1721
|
+
onChange: SelectProps['onChange'];
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1724
|
+
export declare interface THeaderProps {
|
|
1725
|
+
headers: THeader[];
|
|
1726
|
+
onChange: () => void;
|
|
1727
|
+
allSelected: boolean;
|
|
1728
|
+
selectionMode: boolean;
|
|
1729
|
+
multiSelect: boolean;
|
|
1730
|
+
showCheckbox: boolean;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
export declare type Theme = ThemeObj;
|
|
1734
|
+
|
|
1735
|
+
declare interface ThemeColorObj {
|
|
1736
|
+
regular: string;
|
|
1737
|
+
hover: string;
|
|
1738
|
+
active: string;
|
|
1739
|
+
focus: string;
|
|
1740
|
+
disabled: string;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
export { ThemeContext }
|
|
1744
|
+
|
|
1745
|
+
declare interface ThemeObj {
|
|
1746
|
+
windowObj: Window;
|
|
1747
|
+
breakpoints: {
|
|
1748
|
+
width: number;
|
|
1749
|
+
aspectRatio: number;
|
|
1750
|
+
};
|
|
1751
|
+
borderRadius: string;
|
|
1752
|
+
fonts: {
|
|
1753
|
+
default: string;
|
|
1754
|
+
weight: {
|
|
1755
|
+
light: number;
|
|
1756
|
+
regular: number;
|
|
1757
|
+
medium: number;
|
|
1758
|
+
bold: number;
|
|
1759
|
+
};
|
|
1760
|
+
};
|
|
1761
|
+
sizes: {
|
|
1762
|
+
font: ThemeSizeObjExtended;
|
|
1763
|
+
icon: ThemeSizeObj;
|
|
1764
|
+
avatar: Omit<ThemeSizeObjExtended<{
|
|
1765
|
+
diameter: string;
|
|
1766
|
+
font: string;
|
|
1767
|
+
}>, 'extrasmall'>;
|
|
1768
|
+
padding: ThemeSizeObjExtended;
|
|
1769
|
+
};
|
|
1770
|
+
icons: Record<string, IconComponent>;
|
|
1771
|
+
loginBackground: string;
|
|
1772
|
+
logo: {
|
|
1773
|
+
svg: IconComponent;
|
|
1774
|
+
size: ThemeSizeObj;
|
|
1775
|
+
};
|
|
1776
|
+
palette: Record<'currentColor' | 'transparent' | 'primary' | 'secondary' | 'header' | 'highlight' | 'gray0' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'gray6' | 'warning' | 'error' | 'success' | 'info' | 'text', ThemeColorObj>;
|
|
1777
|
+
avatarColors: Record<`avatar_${number}`, string>;
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
declare type ThemePaletteColorKey = keyof ThemePaletteObj;
|
|
1781
|
+
|
|
1782
|
+
declare type ThemePaletteObj = ThemeObj['palette'];
|
|
1783
|
+
|
|
1784
|
+
export declare const ThemeProvider: React_2.FC<ThemeProviderProps>;
|
|
1785
|
+
|
|
1786
|
+
export declare interface ThemeProviderProps {
|
|
1787
|
+
extension?: (theme: ThemeObj) => ThemeObj;
|
|
1788
|
+
loadDefaultFont?: boolean;
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
declare interface ThemeSizeObj<T = string> {
|
|
1792
|
+
small: T;
|
|
1793
|
+
medium: T;
|
|
1794
|
+
large: T;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
declare interface ThemeSizeObjExtended<T = string> extends ThemeSizeObj<T> {
|
|
1798
|
+
extrasmall: T;
|
|
1799
|
+
extralarge: T;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
export declare const Tooltip: React_2.ForwardRefExoticComponent<TooltipProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1803
|
+
|
|
1804
|
+
export declare interface TooltipProps extends TextProps {
|
|
1805
|
+
/** Tooltip text */
|
|
1806
|
+
label: string | React_2.ReactNode | undefined;
|
|
1807
|
+
/** Tooltip placement */
|
|
1808
|
+
placement?: Placement_2;
|
|
1809
|
+
/** Fallback placements to use when tooltip cannot fit in the primary placement */
|
|
1810
|
+
fallbackPlacements?: Placement_2[];
|
|
1811
|
+
/** Tooltip max-width css property */
|
|
1812
|
+
maxWidth?: string;
|
|
1813
|
+
/** Whether to disable the tooltip and render only the child component */
|
|
1814
|
+
disabled?: boolean;
|
|
1815
|
+
/** Flag to disable the Portal implementation */
|
|
1816
|
+
disablePortal?: boolean;
|
|
1817
|
+
/** Show tooltip only when child has class Text and text content is partially hidden */
|
|
1818
|
+
overflowTooltip?: boolean;
|
|
1819
|
+
/** Tooltip trigger */
|
|
1820
|
+
children: React_2.ReactElement;
|
|
1821
|
+
/** time before tooltip shows, in milliseconds */
|
|
1822
|
+
triggerDelay?: number;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
export declare const Transition: ForwardRefExoticComponent<PropsWithoutRef<TransitionProps> & RefAttributes<HTMLElement>> & {
|
|
1826
|
+
types?: Array<keyof typeof STYLES>;
|
|
1827
|
+
};
|
|
1828
|
+
|
|
1829
|
+
declare interface TransitionOnProps {
|
|
1830
|
+
/** Transition type, one of the default ones. Ignore if is a custom Transition */
|
|
1831
|
+
type?: keyof typeof STYLES;
|
|
1832
|
+
/** Initial styles of the component to which apply the Transition */
|
|
1833
|
+
from?: CSSObject;
|
|
1834
|
+
/** Final styles of the component to which apply the Transition */
|
|
1835
|
+
to?: CSSObject;
|
|
1836
|
+
/** Styles to keep after the Transition */
|
|
1837
|
+
end?: CSSObject;
|
|
1838
|
+
/** Whether to apply the Transition. If not applied, the component maybe not be visible. */
|
|
1839
|
+
apply?: boolean;
|
|
1840
|
+
/** Custom transition css target (all, opacity...). */
|
|
1841
|
+
transitionTarget?: CSSStyleDeclaration['transitionProperty'];
|
|
1842
|
+
/** Custom transition css timing (ease-in, ease-out...). */
|
|
1843
|
+
transitionTiming?: CSSStyleDeclaration['transitionTimingFunction'];
|
|
1844
|
+
/** Custom transition css duration in ms */
|
|
1845
|
+
transitionDuration?: number;
|
|
1846
|
+
/** Custom transition css delay in ms */
|
|
1847
|
+
transitionDelay?: CSSStyleDeclaration['transitionDelay'] | number;
|
|
1848
|
+
/** Children */
|
|
1849
|
+
children: JSX.Element;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
export declare interface TransitionProps extends TransitionOnProps {
|
|
1853
|
+
/** Turn off the Transition */
|
|
1854
|
+
disabled?: boolean;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
export declare type TRow = {
|
|
1858
|
+
id: string;
|
|
1859
|
+
/** Each column can be a string or a React component */
|
|
1860
|
+
columns: Array<string | React_2.ReactElement>;
|
|
1861
|
+
/** Whether to highlight this row */
|
|
1862
|
+
highlight?: boolean;
|
|
1863
|
+
/** Whether the row is clickable */
|
|
1864
|
+
clickable?: boolean;
|
|
1865
|
+
/** Row click callback */
|
|
1866
|
+
onClick?: React_2.ReactEventHandler;
|
|
1867
|
+
};
|
|
1868
|
+
|
|
1869
|
+
export declare interface TRowProps {
|
|
1870
|
+
index: number;
|
|
1871
|
+
row: TRow;
|
|
1872
|
+
onChange: (id: string) => void;
|
|
1873
|
+
selected: boolean;
|
|
1874
|
+
selectionMode: boolean;
|
|
1875
|
+
multiSelect: boolean;
|
|
1876
|
+
showCheckbox: boolean;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
export declare function useCheckbox({ ref, value, defaultChecked, disabled, onClick, onChange }: UseCheckboxArgs): boolean;
|
|
1880
|
+
|
|
1881
|
+
export declare type UseCheckboxArgs = {
|
|
1882
|
+
ref: React_2.RefObject<HTMLElement>;
|
|
1883
|
+
value?: boolean;
|
|
1884
|
+
defaultChecked?: boolean;
|
|
1885
|
+
disabled?: boolean;
|
|
1886
|
+
onClick?: (event: Event) => void;
|
|
1887
|
+
onChange?: (newValue: boolean) => void;
|
|
1888
|
+
};
|
|
1889
|
+
|
|
1890
|
+
export declare function useCombinedRefs<T>(...refs: React_2.ForwardedRef<T>[]): React_2.RefObject<T>;
|
|
1891
|
+
|
|
1892
|
+
export declare function useHiddenCount(containerRef: React_2.RefObject<HTMLElement>, listenForWindowResize: boolean): [number, () => void];
|
|
1893
|
+
|
|
1894
|
+
export declare const useIsVisible: <T extends HTMLElement>(listRef: React_2.RefObject<HTMLDivElement>) => [boolean, React_2.RefObject<T>];
|
|
1895
|
+
|
|
1896
|
+
export declare function useKeyboard(ref: React_2.RefObject<HTMLElement>, events: KeyboardPreset): void;
|
|
1897
|
+
|
|
1898
|
+
export declare function useModal(): CreateModalFn;
|
|
1899
|
+
|
|
1900
|
+
export declare function useScreenMode(target?: Window): ScreenMode;
|
|
1901
|
+
|
|
1902
|
+
export declare function useSnackbar(): CreateSnackbarFn;
|
|
1903
|
+
|
|
1904
|
+
export declare function useSplitVisibility<T, R extends HTMLElement = HTMLElement>(items: T[], optionsWithRetroCompatibility?: Options | 'end' | 'start'): [T[], T[], React_2.RefObject<R>];
|
|
1905
|
+
|
|
1906
|
+
export declare const useTheme: () => ThemeObj;
|
|
1907
|
+
|
|
1908
|
+
export declare function ZimbraClassicThemeContextProvider({ styleSheetTarget, children, extension, loadDefaultFont }: ZimbraClassicThemeContextProviderProps): JSX.Element;
|
|
1909
|
+
|
|
1910
|
+
export declare interface ZimbraClassicThemeContextProviderProps {
|
|
1911
|
+
styleSheetTarget?: HTMLElement;
|
|
1912
|
+
children: React_2.ReactElement;
|
|
1913
|
+
extension?: (theme: ThemeObj) => ThemeObj;
|
|
1914
|
+
loadDefaultFont?: boolean;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
export { }
|