@veeqo/ui 0.0.3 → 0.0.4

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/lib/components/ActionList/styled.d.ts +24 -3
  3. package/lib/components/Button/Button.d.ts +8 -2
  4. package/lib/components/Button/types.d.ts +2 -2
  5. package/lib/components/DimensionsInput/styled.d.ts +8 -1
  6. package/lib/components/PageHeader/styled.d.ts +8 -1
  7. package/lib/components/Pagination/styled.d.ts +8 -1
  8. package/lib/components/VideoModal/styled.d.ts +8 -1
  9. package/lib/components/WeightInput/styled.d.ts +8 -1
  10. package/lib/index.d.ts +5 -1702
  11. package/lib/index.esm.js.map +1 -1
  12. package/lib/index.js.map +1 -1
  13. package/package.json +1 -1
  14. package/rollup.config.mjs +6 -19
  15. package/src/components/Button/types.ts +2 -2
  16. package/tsconfig.json +1 -1
  17. package/lib/components/Button/components/DropdownIcon.d.ts +0 -2
  18. package/lib/components/CardHeader/icons/Cross.d.ts +0 -2
  19. package/lib/components/CardHeader/icons/DownArrow.d.ts +0 -2
  20. package/lib/components/CardHeader/icons/UpArrow.d.ts +0 -2
  21. package/lib/components/Choice/components/HelpIcon.d.ts +0 -2
  22. package/lib/components/DataTable/icons/DoubleArrowAsc.d.ts +0 -2
  23. package/lib/components/DataTable/icons/DoubleArrowDesc.d.ts +0 -2
  24. package/lib/components/DataTable/icons/DoubleArrowIcon.d.ts +0 -2
  25. package/lib/components/DataTableExp/components/icons/ArrowDown.d.ts +0 -2
  26. package/lib/components/DataTableExp/components/icons/ArrowUp.d.ts +0 -2
  27. package/lib/components/DataTableExp/components/icons/DoubleArrow.d.ts +0 -2
  28. package/lib/components/DataTableExp/components/icons/InfoIcon.d.ts +0 -2
  29. package/lib/components/DataTableExp/components/icons/Reorder.d.ts +0 -2
  30. package/lib/components/DataTableExp/components/icons/Visibility.d.ts +0 -2
  31. package/lib/components/DataTableExp/components/icons/VisibilityOff.d.ts +0 -2
  32. package/lib/components/Pagination/components/EndArrow.d.ts +0 -2
  33. package/lib/components/Pagination/components/LeftArrow.d.ts +0 -2
  34. package/lib/components/Pagination/components/RightArrow.d.ts +0 -2
  35. package/lib/components/Pagination/components/StartArrow.d.ts +0 -2
  36. package/lib/hoc/withLabels/HelpIcon.d.ts +0 -2
  37. package/lib/theme/utils/buildClassnames.d.ts +0 -1
  38. package/lib/theme/utils/color.d.ts +0 -13
  39. package/lib/theme/utils/generateId.d.ts +0 -1
  40. package/lib/theme/utils/index.d.ts +0 -3
  41. package/lib/theme/utils/paginationList.d.ts +0 -4
  42. package/lib/theme/utils/setupIntersectionObserverMock.d.ts +0 -18
  43. package/lib/utils/toMap.d.ts +0 -5
package/lib/index.d.ts CHANGED
@@ -1,1702 +1,5 @@
1
- /// <reference types="react" />
2
- import * as React$1 from 'react';
3
- import React__default, { FC, ReactNode, ButtonHTMLAttributes, SyntheticEvent, ReactEventHandler, Component, CSSProperties, PureComponent } from 'react';
4
- import * as styled_components from 'styled-components';
5
- import { Placement } from '@popperjs/core';
6
-
7
- interface AccordionProps {
8
- children: ReactNode;
9
- label: string;
10
- iconSlot?: ReactNode;
11
- className?: string;
12
- timeout?: number;
13
- transitionClassnames?: string;
14
- description?: string;
15
- shouldOpenOnMount?: boolean;
16
- }
17
- declare const Accordion: FC<AccordionProps>;
18
-
19
- type ButtonVariant = 'default' | 'destructive' | 'primary' | 'primaryDestructive' | 'flat' | 'link' | 'unstyled';
20
- /**
21
- * Button properties.
22
- */
23
- interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
24
- children?: ReactNode;
25
- /** Variant styles */
26
- variant?: ButtonVariant;
27
- /** Button sizes */
28
- size?: 'sm' | 'base';
29
- /** Icon */
30
- icon?: ReactNode;
31
- /** Renders a dropdown indicator inside the button */
32
- dropdown?: boolean;
33
- /** Renders a loading indicator inside the button */
34
- loading?: boolean;
35
- }
36
-
37
- type ActionListItem = {
38
- title: string;
39
- icon?: Omit<ReactNode, string>;
40
- variant?: 'item' | 'action' | 'link';
41
- onClick: () => void;
42
- };
43
- type ActionListSection = {
44
- title?: string;
45
- items: ActionListItem[];
46
- };
47
- interface ActionListProps {
48
- title: string;
49
- items?: ActionListItem[];
50
- sections?: ActionListSection[];
51
- buttonVariant?: ButtonVariant;
52
- buttonSize?: 'sm' | 'base';
53
- }
54
-
55
- declare const ActionList: ({ title, items, sections, buttonVariant, buttonSize, }: ActionListProps) => React__default.JSX.Element;
56
-
57
- interface AnchorProps {
58
- children?: ReactNode;
59
- href: string;
60
- text?: string;
61
- className?: string;
62
- target?: string;
63
- }
64
- declare const Anchor: ({ children, className, text, href, target }: AnchorProps) => React__default.JSX.Element;
65
-
66
- declare enum ComponentSize {
67
- base = "base",
68
- sm = "sm"
69
- }
70
- declare enum WeightUnit {
71
- g = "g",
72
- lb = "lb"
73
- }
74
- type EventHandlerProps = {
75
- onClick?: (event: SyntheticEvent) => void;
76
- onKeyUp?: (event: SyntheticEvent) => void;
77
- onKeyDown?: (event: SyntheticEvent) => void;
78
- onKeyPress?: (event: SyntheticEvent) => void;
79
- onMouseEnter?: (event: SyntheticEvent) => void;
80
- onMouseLeave?: (event: SyntheticEvent) => void;
81
- onChange?: (event: SyntheticEvent) => void;
82
- onBlur?: (event: SyntheticEvent) => void;
83
- onFocus?: (event: SyntheticEvent) => void;
84
- };
85
-
86
- type BasicDropdownProps = EventHandlerProps & {
87
- className?: string;
88
- children: ReactNode;
89
- };
90
- type AnimatedDropdownProps = BasicDropdownProps & {
91
- cta?: ReactNode;
92
- shouldShowDropdown: boolean;
93
- timeout?: number;
94
- transitionClassnames?: string;
95
- onClickAway?: (event: Event) => void;
96
- reversed?: boolean;
97
- };
98
-
99
- declare const AnimatedDropdown: ({ cta, shouldShowDropdown, children, className, reversed, onClickAway, timeout, transitionClassnames, onClick, onMouseEnter, onMouseLeave, }: AnimatedDropdownProps) => React__default.JSX.Element;
100
-
101
- interface AvatarProps {
102
- name: string;
103
- width?: string;
104
- bgColor?: string;
105
- textColor?: string;
106
- }
107
-
108
- declare const Avatar: ({ width, name, bgColor, textColor, }: AvatarProps) => React__default.JSX.Element;
109
-
110
- type BadgeVariant = 'default' | 'primary' | 'warning';
111
- /**
112
- * Badge properties.
113
- */
114
- type BadgeProps = {
115
- /**
116
- * Specifies the Badge variant.
117
- */
118
- variant?: BadgeVariant;
119
- /**
120
- * Renders an optional icon inside the Badge.
121
- */
122
- iconSlot?: Omit<ReactNode, string>;
123
- /**
124
- * Specifies tooltip text to display on hover.
125
- */
126
- tooltip?: string;
127
- /**
128
- * Specifies whether or not to hide the Badge border.
129
- */
130
- hideBorder?: boolean;
131
- /**
132
- * Specifies an optional class name.
133
- */
134
- className?: string;
135
- /**
136
- * Specifies an optional class name for E2E testing.
137
- */
138
- e2eClassName?: string;
139
- /**
140
- * Children.
141
- */
142
- children: React__default.ReactNode;
143
- };
144
-
145
- declare const Badge: ({ variant, hideBorder, iconSlot, tooltip, className, e2eClassName, children, }: BadgeProps) => React__default.JSX.Element;
146
-
147
- declare enum BannerTypes {
148
- help = "help",
149
- info = "info",
150
- error = "error",
151
- success = "success"
152
- }
153
- type BannerProps = {
154
- type?: keyof typeof BannerTypes | string;
155
- text?: string;
156
- icon?: Omit<ReactNode, string>;
157
- onClose?: ReactEventHandler;
158
- className?: string;
159
- header?: ReactNode;
160
- };
161
-
162
- /**
163
- * The `Banner` component was previously called `Alert` (and similarly `Pill`).
164
- */
165
- declare const Banner: ({ type, text, icon, onClose, className, header, }: BannerProps) => React__default.JSX.Element;
166
-
167
- declare const BaseContainer: styled_components.StyledComponent<"div", any, {}, never>;
168
-
169
- type Item = {
170
- pathname: string;
171
- title: string;
172
- };
173
- type LinkComponentProps = false | React.ComponentType<any>;
174
- interface BreadcrumbsProps {
175
- items: Item[];
176
- Separator?: string | React.ReactNode;
177
- LinkComponent?: LinkComponentProps;
178
- }
179
-
180
- declare const Breadcrumbs: ({ items, Separator, LinkComponent, }: BreadcrumbsProps) => React__default.JSX.Element;
181
-
182
- declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
183
-
184
- type CardElevation = 0 | 1 | 2 | 3 | 4;
185
- declare const accents: {
186
- info: string;
187
- success: string;
188
- error: string;
189
- };
190
- interface SurfaceProps {
191
- elevation?: CardElevation;
192
- accent?: keyof typeof accents;
193
- }
194
-
195
- type CardAction = {
196
- title: string;
197
- onClick: () => void;
198
- };
199
- type CardProps = {
200
- className?: string;
201
- style?: React__default.CSSProperties;
202
- title?: string;
203
- subtitle?: string;
204
- HeaderActionSlot?: React__default.ReactNode;
205
- action?: CardAction;
206
- collapsable?: boolean;
207
- elevation?: CardElevation;
208
- accent?: 'info' | 'success' | 'error';
209
- children: ReactNode;
210
- onClose?: () => void;
211
- renderFooter?: () => ReactNode;
212
- };
213
- declare const Card: {
214
- ({ className, style, title, subtitle, HeaderActionSlot, action, collapsable, elevation, accent, children, onClose, renderFooter, }: CardProps): React__default.JSX.Element;
215
- Surface: styled_components.StyledComponent<"div", any, SurfaceProps, never>;
216
- Section: styled_components.StyledComponent<"section", any, {}, never>;
217
- FullBleed: styled_components.StyledComponent<"div", any, {}, never>;
218
- Footer: styled_components.StyledComponent<"footer", any, {}, never>;
219
- };
220
-
221
- declare const headerVariants: readonly ["headingXXL", "headingXL", "headingLarge", "headingMedium", "headingSmall"];
222
- declare const textVariants: readonly ["headingXXL", "headingXL", "headingLarge", "headingMedium", "headingSmall", "headingTable", "subheadingLarge", "subheadingMedium", "subheadingSmall", "subheadingSmallBold", "body", "bodySmall", "bodyBold", "bodyBoldDark", "bodySmallBold", "inputLabel", "inputLabelSmall", "hintText", "placeholder", "placeholderSmall", "placeholderCode", "placeholderCodeSmall", "error", "errorSmall", "successSmall"];
223
- /** @deprecated do not use me */
224
- declare const deprecatedTextVariants: readonly ["button", "buttonSmall", "linkLarge", "linkMedium", "link", "linkSmall"];
225
-
226
- type HeaderVariant = (typeof headerVariants)[number];
227
- type TextVariant = (typeof textVariants)[number];
228
- type DeprecatedTextVariants = (typeof deprecatedTextVariants)[number];
229
- type ValidTextTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label' | 'li' | 'ol' | 'ul' | 'blockquote' | 'code';
230
- type TextProps = {
231
- as?: ValidTextTag;
232
- muted?: boolean;
233
- } & ({
234
- variant: TextVariant;
235
- } | {
236
- /** @deprecated to be removed, bad for accessibility. Use `Button` or `Anchor` */
237
- variant?: DeprecatedTextVariants;
238
- });
239
-
240
- type CardHeaderAction = {
241
- title: string;
242
- onClick: () => void;
243
- };
244
- interface CardHeaderProps {
245
- id?: string;
246
- title?: string;
247
- subtitle?: string;
248
- headerVariant?: HeaderVariant;
249
- action?: CardHeaderAction;
250
- ActionSlot?: React__default.ReactNode;
251
- isCollapsed?: boolean;
252
- onClickCollapse?: () => void;
253
- onClickClose?: () => void;
254
- }
255
- declare const CardHeader: ({ id, title, subtitle, headerVariant, action, ActionSlot, isCollapsed, onClickCollapse, onClickClose, }: CardHeaderProps) => React__default.JSX.Element;
256
-
257
- interface ForwardedChoiceProps {
258
- disabled?: boolean;
259
- label?: string;
260
- hint?: string;
261
- tooltip?: string;
262
- error?: string;
263
- bordered?: boolean;
264
- Badge?: ReactNode;
265
- Accessory?: ReactNode;
266
- Footer?: ReactNode;
267
- }
268
- interface ChoiceProps extends ForwardedChoiceProps {
269
- id: string;
270
- children: ReactNode;
271
- }
272
- declare const Choice: ({ id, label, hint, tooltip, error, bordered, Badge, Accessory, Footer, children, disabled, }: ChoiceProps) => React__default.JSX.Element;
273
-
274
- type CheckboxValue = string | number;
275
- interface CheckboxProps extends ForwardedChoiceProps {
276
- checked: boolean;
277
- indeterminate?: boolean;
278
- value?: CheckboxValue;
279
- name?: string;
280
- disabled?: boolean;
281
- ariaLabel?: string;
282
- onChange: (checked: boolean, value?: CheckboxValue) => void;
283
- }
284
- declare const Checkbox: ({ checked, indeterminate, value, name, disabled, ariaLabel, onChange, ...otherProps }: CheckboxProps) => React__default.JSX.Element;
285
-
286
- type ChoiceListOptionValue = string | number;
287
- interface ChoiceListOption {
288
- value: ChoiceListOptionValue;
289
- name?: string;
290
- label: string;
291
- hint?: string;
292
- disabled?: boolean;
293
- Badge?: ReactNode;
294
- Accessory?: ReactNode;
295
- Footer?: ReactNode;
296
- }
297
- interface ChoiceListProps {
298
- options: ChoiceListOption[];
299
- selected: ChoiceListOptionValue[];
300
- title?: string;
301
- allowMultiple?: boolean;
302
- disabled?: boolean;
303
- bordered?: boolean;
304
- error?: string;
305
- onChange: (selected: ChoiceListOptionValue[]) => void;
306
- }
307
- declare class ChoiceList extends Component<ChoiceListProps> {
308
- handleChange: (value: ChoiceListOptionValue, checked: boolean) => void;
309
- handleChangeSingle: (value: ChoiceListOptionValue, checked: boolean) => void;
310
- handleChangeMultiple: (value: ChoiceListOptionValue, checked: boolean) => void;
311
- render(): React__default.JSX.Element;
312
- }
313
-
314
- interface CopyToClipboardProps {
315
- className?: string;
316
- text: string;
317
- onCopy?: () => void;
318
- }
319
- /**
320
- * A dynamic button to facilitate copying text to a users' keyboard when clicked.
321
- */
322
- declare const CopyToClipboard: ({ className, text, onCopy }: CopyToClipboardProps) => React__default.JSX.Element;
323
-
324
- type DataTableId = string | number;
325
- type RowData = any;
326
- type DataTableHeader = {
327
- id: DataTableId;
328
- title?: string;
329
- icon?: ReactNode;
330
- tooltip?: string;
331
- align?: 'left' | 'center' | 'right';
332
- sortable?: boolean;
333
- grow?: boolean;
334
- width?: number | string;
335
- skeleton?: string;
336
- skeletonStyle?: CSSProperties;
337
- };
338
- type DataTableRow = {
339
- id: DataTableId;
340
- data: RowData;
341
- nestedRows?: DataTableNestedRow[];
342
- accentColor?: string;
343
- };
344
- type DataTableNestedRow = {
345
- id: DataTableId;
346
- data: RowData;
347
- };
348
- type DataTableSortDirection = 'ascending' | 'descending';
349
- type DataTableSelectionMode = 'multiple' | 'single';
350
- type SpecificStateType = {
351
- icon: ReactNode;
352
- title: string;
353
- subTitle?: string;
354
- };
355
- type StripedType = boolean;
356
- type NoWrapType = boolean;
357
- type ShowScrollbarType = boolean;
358
- /**
359
- * DataTable properties.
360
- */
361
- interface DataTableProps$1 {
362
- /** Removes the outer border */
363
- borderless?: boolean;
364
- /** Enables row zebra striping */
365
- striped?: StripedType;
366
- /** Disables text wrapping in header cells */
367
- noWrap?: NoWrapType;
368
- /** Forces OSX to render scrollbars */
369
- showScrollbar?: ShowScrollbarType;
370
- /** Configure column headers */
371
- headers?: DataTableHeader[];
372
- /** Configure content rows */
373
- rows: DataTableRow[];
374
- /** Render a content row */
375
- renderRow: (row: DataTableRow) => ReactNode;
376
- /** Render a nested content row */
377
- renderNestedRow?: (nestedRow: DataTableNestedRow) => ReactNode;
378
- /** List of row IDs that are expanded - their nested rows will be rendered */
379
- expandedRowIds?: DataTableId[];
380
- /** Render a content row when in the LOADING state */
381
- renderLoadingRow?: () => ReactNode;
382
- /** Render a footer row */
383
- renderFooterRow?: (rows: DataTableRow[]) => ReactNode;
384
- /** Render a footer row when in the LOADING state */
385
- renderFooterLoadingRow?: () => ReactNode;
386
- /** Hides the extra first cell added to the footer when row selection is enabled */
387
- omitFooterSelectionCell?: boolean;
388
- /** List of selected row IDs */
389
- selectedRowIds?: Array<DataTableId>;
390
- /** Sets the mode of row selection */
391
- selectionMode?: DataTableSelectionMode;
392
- /** Disable ability to select specified rows */
393
- disabledSelectionInputRowIds?: DataTableId[];
394
- /** Event triggered when rows are selected/deselected */
395
- onChangeSelectedRowIds?: (selectedRowIds: Array<DataTableId>) => void;
396
- /** Current sorted column ID (see headers config) */
397
- sortColumnId?: DataTableId;
398
- /** Current sort direction */
399
- sortDirection?: DataTableSortDirection;
400
- /** Event triggered when sortable column headers are clicked */
401
- onChangeSort?: (columnId: DataTableId, direction: DataTableSortDirection) => void;
402
- /** Shows the ERROR state */
403
- isError: boolean;
404
- /** Shows the LOADING state */
405
- isLoading: boolean;
406
- /** Default number of rows shown in LOADING state */
407
- skeletonRowsNumber?: number;
408
- /** Enables sticky headers row */
409
- isHeaderSticky?: boolean;
410
- /** Custom styles for stick header container - e.g. adding `top` offset */
411
- stickyHeaderStyle?: CSSProperties;
412
- /**
413
- * Config object to show custom content when in ERROR or EMPTY states.
414
- * Accepts `title`, `subTitle` and `icon`.
415
- * */
416
- customSpecificState?: SpecificStateType;
417
- /** Override the table content height when using customSpecificState */
418
- bodyHeightInSpecificStates?: number;
419
- /** Number of fixed columns at the start of the table */
420
- startFixedColumnsNumber?: number;
421
- /** Number of fixed columns at the end of the table */
422
- endFixedColumnsNumber?: number;
423
- }
424
-
425
- interface CellProps$1 {
426
- align?: 'left' | 'center' | 'right';
427
- grow?: boolean;
428
- }
429
-
430
- interface SkeletonCellProps extends CellProps$1 {
431
- style?: CSSProperties;
432
- }
433
-
434
- interface EditableCellProps extends CellProps$1 {
435
- onClick: React__default.MouseEventHandler<HTMLButtonElement>;
436
- children: React__default.ReactNode;
437
- }
438
-
439
- interface ClickableCellProps extends CellProps$1 {
440
- onClick: React__default.MouseEventHandler<HTMLButtonElement>;
441
- children: React__default.ReactNode;
442
- }
443
-
444
- declare const DataTable: {
445
- ({ borderless, striped, noWrap, showScrollbar, headers, rows, renderRow, renderNestedRow, expandedRowIds, renderLoadingRow, renderFooterRow, renderFooterLoadingRow, omitFooterSelectionCell, selectedRowIds, disabledSelectionInputRowIds, selectionMode, onChangeSelectedRowIds, sortColumnId, sortDirection, onChangeSort, isError, isLoading, skeletonRowsNumber, isHeaderSticky, stickyHeaderStyle, customSpecificState, bodyHeightInSpecificStates, startFixedColumnsNumber, endFixedColumnsNumber, }: DataTableProps$1): React__default.JSX.Element;
446
- Cell: styled_components.StyledComponent<"td", any, CellProps$1, never>;
447
- ClickableCell: ({ onClick, children, ...otherProps }: ClickableCellProps) => React__default.JSX.Element;
448
- EditableCell: ({ onClick, children, ...otherProps }: EditableCellProps) => React__default.JSX.Element;
449
- SkeletonCell: {
450
- ({ style, ...otherProps }: SkeletonCellProps): React__default.JSX.Element;
451
- defaultProps: {
452
- style: {};
453
- };
454
- };
455
- SkeletonContent: ({ isLoading, style }: {
456
- isLoading?: boolean | undefined;
457
- style?: React__default.CSSProperties | undefined;
458
- }) => React__default.JSX.Element;
459
- };
460
-
461
- declare enum Alignments {
462
- start = "flex-start",
463
- center = "center",
464
- end = "flex-end",
465
- stretch = "stretch",
466
- between = "space-between",
467
- around = "space-around"
468
- }
469
-
470
- type Alignment = keyof typeof Alignments;
471
- type SizeScale$1 = {
472
- [index: number]: string;
473
- [index: string]: string;
474
- };
475
- declare const sizes: SizeScale$1;
476
- type Size = keyof typeof sizes;
477
- type StackProps = {
478
- children: ReactNode;
479
- /**
480
- * Classname for description
481
- */
482
- className?: string;
483
- /**
484
- * Direction of component
485
- */
486
- direction?: 'vertical' | 'horizontal';
487
- alignX?: Alignment;
488
- alignY?: Alignment;
489
- spacing?: Size;
490
- };
491
-
492
- type RowState = {
493
- selected: boolean;
494
- expanded: boolean;
495
- disabled: boolean;
496
- };
497
- type ColumnId = string | number;
498
- type ColumnAlignment = 'left' | 'center' | 'right';
499
- type ColumnPinned = 'left' | 'right' | 'none';
500
- type ColumnSpacing = Size;
501
- type ColumnWidth = number | string;
502
- type ColumnWidthFixed = ColumnWidth;
503
- type ColumnWidthBounded = {
504
- min?: ColumnWidth;
505
- max?: ColumnWidth;
506
- };
507
- type ColumnConfig = {
508
- id: ColumnId;
509
- align?: ColumnAlignment;
510
- hidden?: boolean;
511
- icon?: Omit<ReactNode, string>;
512
- pinned?: ColumnPinned;
513
- sortable?: boolean;
514
- spacing?: ColumnSpacing;
515
- span?: number;
516
- title?: string;
517
- tooltip?: string;
518
- width?: ColumnWidthFixed | ColumnWidthBounded;
519
- renderCell: CellRenderer;
520
- renderFooter?: FooterRenderer;
521
- renderHeader?: HeaderRenderer;
522
- renderNestedCell?: NestedCellRenderer;
523
- };
524
- type ColumnConfigs = Array<ColumnConfig>;
525
- declare enum SortDirection {
526
- ascending = "ascending",
527
- descending = "descending"
528
- }
529
- type SortState = {
530
- columnId: ColumnId;
531
- direction: SortDirection;
532
- };
533
- type SortChangeHandler = (sortState: SortState) => void;
534
- type RowId = number | string;
535
- interface NestedTableRow {
536
- id: RowId;
537
- data: any;
538
- }
539
- type NestedTableRows = Array<NestedTableRow>;
540
- interface TableRow {
541
- id: RowId;
542
- data: any;
543
- nestedRows?: NestedTableRows;
544
- accentColor?: string;
545
- e2eClassName?: string;
546
- }
547
- type TableRows = Array<TableRow>;
548
- interface HeaderProps extends React.HtmlHTMLAttributes<HTMLTableCellElement> {
549
- id: string;
550
- align?: ColumnAlignment;
551
- spacing?: ColumnSpacing;
552
- span?: number;
553
- }
554
- interface RendererHeaderProps extends HeaderProps {
555
- key: string;
556
- }
557
- interface SelectionHeaderProps extends Omit<HeaderProps, 'onChange'> {
558
- selected: boolean;
559
- indeterminate: boolean;
560
- onChange: (selected: boolean, value: RowId | undefined) => void;
561
- selectionMode: SelectionMode;
562
- }
563
- type HeaderRenderer = (column: ColumnConfig, headerProps: RendererHeaderProps) => ReactNode;
564
- type FooterRenderer = (column: ColumnConfig, footerProps: object) => ReactNode;
565
- type CellRenderer = (row: TableRow, cellProps: object, actions: TableActions, rowState: RowState) => ReactNode;
566
- type ParentRowState = RowState;
567
- type NestedCellRenderer = (nestedRow: NestedTableRow, cellProps: object, parentRowState: ParentRowState) => ReactNode;
568
- type SetSelectedAction = (selected: boolean, rowId: RowId | undefined) => void;
569
- type SetExpandedAction = (expanded: boolean, rowId: RowId | undefined) => void;
570
- type TableActions = {
571
- setSelected: SetSelectedAction;
572
- setExpanded: SetExpandedAction;
573
- };
574
- type BorderMode = 'full' | 'vertical' | 'none';
575
- type CustomState = {
576
- icon: ReactNode;
577
- heading: string;
578
- subheading?: string;
579
- };
580
- type SelectionMode = 'single' | 'multiple';
581
- type SelectionState = [RowId[], (rowIds: RowId[]) => void];
582
- type StripingMode = 'row' | 'nested';
583
- interface DataTableProps {
584
- ActionBarSlot?: ReactNode;
585
- borderMode?: BorderMode;
586
- columns: ColumnConfigs;
587
- disabledRowIds?: Array<RowId>;
588
- enableStickyHeader?: boolean;
589
- emptyState?: CustomState;
590
- expandedRowIds?: Array<RowId>;
591
- loading?: boolean;
592
- loadingRowCount?: number;
593
- onChangeSort?: SortChangeHandler;
594
- rows: TableRows;
595
- selectionMode?: SelectionMode;
596
- selectionState?: SelectionState;
597
- setExpanded?: SetExpandedAction;
598
- sortState?: SortState;
599
- stripingMode?: StripingMode;
600
- }
601
-
602
- interface CellProps {
603
- align?: ColumnAlignment;
604
- spacing?: ColumnSpacing;
605
- span?: number;
606
- }
607
-
608
- interface ColumnMenuProps {
609
- columns: ColumnConfigs;
610
- columnGroups: ColumnId[][];
611
- setColumns: (columns: ColumnConfigs) => void;
612
- }
613
- declare function ColumnMenu({ columns, columnGroups, setColumns }: ColumnMenuProps): React__default.JSX.Element;
614
-
615
- interface SelectionCellProps extends CellProps {
616
- rowId: RowId;
617
- selected: boolean;
618
- onChange: (selected: boolean, value: RowId | undefined) => void;
619
- selectionMode: SelectionMode;
620
- disabled: boolean;
621
- }
622
- declare function SelectionCell({ selected, rowId, onChange, selectionMode, disabled, ...cellProps }: SelectionCellProps): React__default.JSX.Element;
623
-
624
- declare function SelectionHeader({ selected, indeterminate, onChange, selectionMode, ...headerProps }: SelectionHeaderProps): React__default.JSX.Element;
625
-
626
- declare const DataTableExp: {
627
- ({ ActionBarSlot, borderMode, columns, emptyState, expandedRowIds, loading, loadingRowCount, onChangeSort, rows, disabledRowIds, selectionMode, selectionState, setExpanded, sortState, stripingMode, enableStickyHeader, }: DataTableProps): React__default.JSX.Element;
628
- defaultProps: {
629
- loading: boolean;
630
- loadingRowCount: number;
631
- selectionMode: string;
632
- stripingMode: string;
633
- enableStickyHeader: boolean;
634
- };
635
- Cell: styled_components.StyledComponent<"td", any, CellProps, never>;
636
- ColumnMenu: typeof ColumnMenu;
637
- SelectionCell: typeof SelectionCell;
638
- SelectionHeader: typeof SelectionHeader;
639
- Header: styled_components.StyledComponent<"th", any, HeaderProps, never>;
640
- Truncate: styled_components.StyledComponent<"div", any, {}, never>;
641
- NoWrap: styled_components.StyledComponent<"div", any, {}, never>;
642
- };
643
-
644
- type DescriptionListItem = {
645
- term: string;
646
- description: string | string[];
647
- };
648
- interface DescriptionListProps {
649
- items: DescriptionListItem[];
650
- horizontal?: boolean;
651
- }
652
- declare const DescriptionList: ({ items, horizontal }: DescriptionListProps) => React__default.JSX.Element;
653
-
654
- interface PageHeaderProps$1 {
655
- renderHeader: (toggleSidebar: () => void, shouldShowSidebar?: boolean) => ReactNode;
656
- children: ReactNode;
657
- }
658
- declare const DetailPage: ({ renderHeader, children }: PageHeaderProps$1) => React__default.JSX.Element;
659
-
660
- interface DimensionsProps {
661
- size?: ComponentSize;
662
- handleChangeHeight: (value: string) => void;
663
- handleChangeWidth: (value: string) => void;
664
- handleChangeLength: (value: string) => void;
665
- label?: string;
666
- hint?: string;
667
- error?: string;
668
- height: string;
669
- width: string;
670
- length: string;
671
- unit?: string;
672
- className?: string;
673
- }
674
-
675
- declare const DimensionsInput: FC<DimensionsProps>;
676
-
677
- interface FilterTagProps {
678
- className?: string;
679
- e2eClassName?: string;
680
- iconSlot?: Omit<ReactNode, string>;
681
- label?: string;
682
- text: string;
683
- fill?: string;
684
- content?: ReactNode;
685
- footer?: ReactNode;
686
- onClickAway?: (event: Event, closeDropdown?: () => void) => void;
687
- onClick?: () => void;
688
- shouldCloseOnClickAway?: boolean;
689
- }
690
-
691
- declare const FilterTag: ({ className, e2eClassName, label, text, iconSlot, fill, content, footer, onClickAway, onClick, shouldCloseOnClickAway, }: FilterTagProps) => React__default.JSX.Element;
692
-
693
- type GridProps = {
694
- children: ReactNode;
695
- className?: string;
696
- columns: number;
697
- spacing?: Size;
698
- };
699
-
700
- declare const Grid: styled_components.StyledComponent<"div", any, GridProps, never>;
701
-
702
- type ImageProps = {
703
- src: string;
704
- alt?: string;
705
- className?: string;
706
- e2eClassName?: string;
707
- width?: string;
708
- height?: string;
709
- previewWidth?: string;
710
- previewHeight?: string;
711
- previewPlacement?: Placement;
712
- previewEnabled?: boolean;
713
- placeholder?: React__default.ReactNode;
714
- placeholderWidth?: string;
715
- placeholderHeight?: string;
716
- disablePlaceholder?: boolean;
717
- };
718
- declare const Image: ({ src, alt, className, e2eClassName, width, height, previewWidth, previewHeight, previewPlacement, previewEnabled, placeholder, placeholderWidth, placeholderHeight, disablePlaceholder, }: ImageProps) => React__default.JSX.Element;
719
-
720
- declare const InputGroup: styled_components.StyledComponent<"div", any, {}, never>;
721
-
722
- type LoaderType = 'Grid' | 'TailSpin' | 'ThreeDots';
723
- interface LoaderProps {
724
- className?: string;
725
- height?: number;
726
- width?: number;
727
- color?: string;
728
- type?: LoaderType;
729
- }
730
-
731
- declare const Loader: ({ className, height, width, color, type, }: LoaderProps) => React__default.JSX.Element;
732
-
733
- /**
734
- * Image used in this button is to comply with official
735
- * Amazon button guidelines (https://developer.amazon.com/docs/login-with-amazon/button.html#android-images).
736
- */
737
- declare const LoginWithAmazonButton: React__default.FC<React__default.ButtonHTMLAttributes<HTMLButtonElement>>;
738
-
739
- type ModalVariants = 'xs' | 'sm' | 'base' | 'lg';
740
- type BaseModalProps = {
741
- shouldShow: boolean;
742
- showHeaderCloseButton?: boolean;
743
- fullBleed?: boolean;
744
- variant?: ModalVariants;
745
- onClose: () => void;
746
- children: React.ReactNode;
747
- };
748
- type WithHeaderSlot = {
749
- headerSlot: React.ReactNode;
750
- };
751
- type WithFooterSlot = {
752
- footerSlot: React.ReactNode;
753
- };
754
- type DefaultHeaderOptions = {
755
- headerTitle: string;
756
- headerSubtitle?: string;
757
- };
758
- type ModalAction = {
759
- label: string;
760
- } & ButtonProps;
761
- type DefaultFooterOptions = {
762
- leftActions?: ModalAction[];
763
- rightActions?: ModalAction[];
764
- };
765
- type HeaderOptions = WithHeaderSlot | DefaultHeaderOptions;
766
- type FooterOptions = WithFooterSlot | DefaultFooterOptions;
767
- type ModalProps = BaseModalProps & HeaderOptions & FooterOptions;
768
-
769
- declare const Modal: (props: ModalProps) => React__default.JSX.Element;
770
-
771
- declare enum Shadows {
772
- sm = "0px 1px 3px rgba(55, 66, 77, 0.15)",
773
- base = "0px 4px 6px rgba(27, 33, 38, 0.2)",
774
- md = "0px 10px 15px rgba(27, 33, 38, 0.2)",
775
- lg = "0px 20px 25px rgba(27, 33, 38, 0.2)"
776
- }
777
-
778
- declare const shadows: typeof Shadows;
779
- type ShadowPropType = keyof typeof shadows | 'none';
780
-
781
- type QuickAction = {
782
- title: string;
783
- icon: Omit<ReactNode, string>;
784
- variant: ButtonVariant;
785
- onClick: () => void;
786
- };
787
- type BackAction = {
788
- title: string;
789
- onClick: () => void;
790
- };
791
- type PageHeaderProps = {
792
- title: string;
793
- subtitle?: string;
794
- imageSrc?: string;
795
- actions?: ActionListSection[];
796
- quickActions?: QuickAction[];
797
- backAction?: BackAction;
798
- Accessory?: ReactNode;
799
- shadow?: ShadowPropType;
800
- onClickPrevious?: () => void;
801
- onClickNext?: () => void;
802
- onClickToggleSidebar?: () => void;
803
- };
804
- declare const PageHeader: ({ title, subtitle, imageSrc, actions, quickActions, backAction, Accessory, shadow, onClickPrevious, onClickNext, onClickToggleSidebar, }: PageHeaderProps) => React__default.JSX.Element;
805
-
806
- type PaginationProps = {
807
- testId?: string;
808
- e2eClassName?: string;
809
- currentPage: number;
810
- totalPagesCount: number;
811
- handleChangePage: (newPageIndex: number) => void;
812
- };
813
-
814
- declare const Pagination: ({ testId, e2eClassName, currentPage, totalPagesCount, handleChangePage, }: PaginationProps) => React__default.JSX.Element;
815
-
816
- interface PaginationRangeOption {
817
- label: string;
818
- value: number;
819
- }
820
- interface PaginationRangeProps {
821
- className?: string;
822
- dropdownValue?: PaginationRangeOption;
823
- paginationRange?: PaginationRangeOption[];
824
- reversedDropdown?: boolean;
825
- onPaginationRangeChange: (currentItem: PaginationRangeOption) => void;
826
- }
827
- interface PaginationRangeState {
828
- dropdownValue: PaginationRangeOption;
829
- shouldShowDropdown: boolean;
830
- }
831
-
832
- declare class PaginationRange extends Component<PaginationRangeProps, PaginationRangeState> {
833
- constructor(props: PaginationRangeProps);
834
- handleRangeListChange: (item: PaginationRangeOption) => void;
835
- setDropdownValue: (currentValue: PaginationRangeOption) => void;
836
- toggleShouldShow: () => void;
837
- render(): React__default.JSX.Element;
838
- }
839
-
840
- type PopoverProps = {
841
- children: ReactNode;
842
- className?: string;
843
- anchorElement: HTMLElement | null;
844
- rootElementRef?: HTMLElement;
845
- placement?: Placement;
846
- onShouldClose?: () => void;
847
- zIndex?: number;
848
- };
849
- declare const Popover: ({ children, className, anchorElement, rootElementRef, placement, onShouldClose, zIndex, }: PopoverProps) => React__default.JSX.Element;
850
-
851
- type PortalProps = {
852
- children: ReactNode;
853
- rootElementRef?: HTMLElement;
854
- };
855
- type PortalState = {
856
- isMounted: boolean;
857
- };
858
- /**
859
- * The portal component renders content on the document `body` unless `rootElementRef` is passed.
860
- */
861
- declare class Portal extends PureComponent<PortalProps, PortalState> {
862
- id: string;
863
- portalNode: HTMLElement | null;
864
- constructor(props: PortalProps);
865
- componentDidMount(): void;
866
- componentWillUnmount(): void;
867
- render(): React.ReactPortal | null;
868
- }
869
-
870
- interface WithLabelsProps {
871
- label?: string;
872
- hint?: string | React__default.ReactNode;
873
- error?: string;
874
- tooltip?: string;
875
- }
876
- declare const withLabels: <P extends object>(Component: React__default.ComponentType<P>) => React__default.FC<P & WithLabelsProps>;
877
-
878
- interface CurrencyProps {
879
- className?: string;
880
- disabled?: boolean;
881
- size?: ComponentSize;
882
- currency: string;
883
- step?: string;
884
- hasError?: boolean;
885
- priceValue: string;
886
- onChange: (value: string) => void;
887
- onPriceChange: (value: string) => void;
888
- }
889
-
890
- declare const PriceInput: React__default.FC<CurrencyProps & WithLabelsProps>;
891
-
892
- type RadioValue = string | number;
893
- interface RadioProps extends ForwardedChoiceProps {
894
- checked: boolean;
895
- value?: RadioValue;
896
- disabled?: boolean;
897
- name?: string;
898
- onChange: (checked: boolean, value?: RadioValue) => void;
899
- }
900
- declare const Radio: ({ checked, value, name, disabled, onChange, ...otherProps }: RadioProps) => React__default.JSX.Element;
901
-
902
- type TextFieldType = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
903
- /**
904
- * TextField properties.
905
- */
906
- type TextFieldProps = Omit<EventHandlerProps, 'onChange' | 'onKeyDown'> & Pick<React.InputHTMLAttributes<HTMLInputElement>, 'autoComplete' | 'onKeyDown'> & {
907
- className?: string;
908
- /** Input element type */
909
- type?: TextFieldType;
910
- value: string;
911
- onChange: (value: string) => void;
912
- placeholder?: string;
913
- step?: string;
914
- name?: string;
915
- min?: string;
916
- max?: string;
917
- pattern?: string;
918
- hasError?: boolean;
919
- size?: ComponentSize;
920
- multiline?: boolean;
921
- rows?: string;
922
- invalid?: boolean;
923
- disabled?: boolean;
924
- spellCheck?: boolean;
925
- };
926
-
927
- type SearchProps = TextFieldProps & {
928
- isLoading?: boolean;
929
- fill?: string;
930
- onClearClick?: (event: SyntheticEvent) => void;
931
- reversed?: boolean;
932
- error?: string;
933
- };
934
-
935
- declare const Search: ({ type, disabled, onClearClick, onChange, onBlur, onFocus, onKeyUp, onKeyDown, onKeyPress, value, error, placeholder, className, name, isLoading, fill, reversed, autoComplete, }: SearchProps) => React__default.JSX.Element;
936
-
937
- type Option = {
938
- key: string;
939
- label: string;
940
- value: string;
941
- disabled?: boolean;
942
- };
943
- type SegmentedControlProps = {
944
- options: Option[];
945
- selected: string;
946
- className?: string;
947
- onChange: (selectedButton: string) => void;
948
- };
949
-
950
- declare const SegmentedControl: ({ options, selected, className, onChange, }: SegmentedControlProps) => React__default.JSX.Element;
951
-
952
- type SelectOption = {
953
- label: string;
954
- value: string;
955
- disabled?: boolean;
956
- };
957
- interface SelectProps {
958
- className?: string;
959
- options: Array<SelectOption>;
960
- value: string;
961
- size?: 'sm' | 'base';
962
- disabled?: boolean;
963
- hasError?: boolean;
964
- onChange: (value: string) => void;
965
- }
966
- declare const Select: React__default.FC<SelectProps & WithLabelsProps>;
967
-
968
- type TableCellProps = {
969
- align?: 'left' | 'right' | 'center';
970
- };
971
-
972
- type SimpleTableProps = {
973
- striped?: boolean;
974
- className?: string;
975
- children?: ReactNode;
976
- };
977
-
978
- /**
979
- * A simple table component which provides flexible, pre-styled table elements.
980
- */
981
- declare const SimpleTable: {
982
- ({ striped, className, children }: SimpleTableProps): React__default.JSX.Element;
983
- Header: styled_components.StyledComponent<"thead", any, {}, never>;
984
- Body: styled_components.StyledComponent<"tbody", any, {}, never>;
985
- Row: styled_components.StyledComponent<"tr", any, {}, never>;
986
- HeaderCell: styled_components.StyledComponent<"td", any, TableCellProps & {
987
- as: string;
988
- }, "as">;
989
- Cell: styled_components.StyledComponent<"td", any, TableCellProps, never>;
990
- };
991
-
992
- type SliderComponentPropTypes = {
993
- id?: string;
994
- value: number | number[];
995
- min: number;
996
- max: number;
997
- step?: number;
998
- className?: string;
999
- e2eClassName?: string;
1000
- onChange: (value: number | number[]) => void;
1001
- onSlideStart?: () => void;
1002
- onSlideEnd?: () => void;
1003
- };
1004
-
1005
- declare const Slider: ({ id, value, min, max, step, onChange, className, e2eClassName, onSlideStart, onSlideEnd, }: SliderComponentPropTypes) => React__default.JSX.Element;
1006
-
1007
- /**
1008
- * Layout component.
1009
- */
1010
- declare const Stack: styled_components.StyledComponent<"div", any, StackProps, never>;
1011
-
1012
- interface StepperProps {
1013
- onIncrement: () => void;
1014
- onDecrement: () => void;
1015
- disabled?: boolean;
1016
- size?: ComponentSize;
1017
- }
1018
- declare const Stepper: ({ onIncrement, onDecrement, disabled, size }: StepperProps) => React__default.JSX.Element;
1019
-
1020
- interface TagProps {
1021
- backgroundColor?: string;
1022
- color?: string;
1023
- }
1024
- declare const Tag: styled_components.StyledComponent<"div", any, TagProps, never>;
1025
-
1026
- declare const Text: styled_components.StyledComponent<"span", any, {} & TextProps, never>;
1027
-
1028
- declare const TextField: React$1.FC<Omit<EventHandlerProps, "onChange" | "onKeyDown"> & Pick<React$1.InputHTMLAttributes<HTMLInputElement>, "onKeyDown" | "autoComplete"> & {
1029
- className?: string | undefined;
1030
- type?: TextFieldType | undefined;
1031
- value: string;
1032
- onChange: (value: string) => void;
1033
- placeholder?: string | undefined;
1034
- step?: string | undefined;
1035
- name?: string | undefined;
1036
- min?: string | undefined;
1037
- max?: string | undefined;
1038
- pattern?: string | undefined;
1039
- hasError?: boolean | undefined;
1040
- size?: ComponentSize | undefined;
1041
- multiline?: boolean | undefined;
1042
- rows?: string | undefined;
1043
- invalid?: boolean | undefined;
1044
- disabled?: boolean | undefined;
1045
- spellCheck?: boolean | undefined;
1046
- } & WithLabelsProps>;
1047
-
1048
- declare enum ToastTypes {
1049
- info = "info",
1050
- error = "error",
1051
- success = "success",
1052
- merge = "merge"
1053
- }
1054
- type ToastsLayoutPropTypes = {
1055
- className?: string;
1056
- e2eClassName?: string;
1057
- toasts: Notification[];
1058
- minWidth?: number | string;
1059
- max?: number | null;
1060
- onClose: (key: string) => void;
1061
- };
1062
- type Notification = {
1063
- key: string;
1064
- type: keyof typeof ToastTypes;
1065
- iconSlot?: Omit<ReactNode, string>;
1066
- text: string;
1067
- cta?: React.ReactNode;
1068
- };
1069
-
1070
- declare const ToastsLayout: FC<ToastsLayoutPropTypes>;
1071
-
1072
- interface ToggleProps extends EventHandlerProps {
1073
- switched?: boolean;
1074
- name?: string;
1075
- small?: boolean;
1076
- className?: string;
1077
- disabled?: boolean;
1078
- ariaLabel?: string;
1079
- }
1080
-
1081
- /**
1082
- * A toggle switch component, use-cases should wrap with a label or
1083
- */
1084
- declare const Toggle: FC<ToggleProps>;
1085
-
1086
- interface ToggleButtonProps {
1087
- children: ReactNode;
1088
- checked: boolean;
1089
- size?: 'sm' | 'base';
1090
- disabled?: boolean;
1091
- onChange: (checked: boolean) => void;
1092
- }
1093
- declare const ToggleButton: ({ children, checked, size, disabled, onChange, }: ToggleButtonProps) => React__default.JSX.Element;
1094
-
1095
- interface IConfig {
1096
- duration: number;
1097
- side: Sides.TOP | Sides.BOTTOM;
1098
- triangleOffset: number;
1099
- tipMinWidth: number;
1100
- tipMaxWidth: number;
1101
- tipOffset?: number;
1102
- }
1103
- interface TooltipProps {
1104
- children?: any;
1105
- text?: string;
1106
- content?: ReactNode;
1107
- config?: IConfig;
1108
- reversed?: boolean;
1109
- additionalOffset?: number;
1110
- className?: string;
1111
- withTriangle?: boolean;
1112
- unmountOnExit?: boolean;
1113
- initialShouldShow?: boolean;
1114
- useReactPortal?: boolean;
1115
- }
1116
- declare enum Sides {
1117
- BOTTOM = "bottom",
1118
- TOP = "top"
1119
- }
1120
-
1121
- declare const Tooltip: ({ children, text, content, config, reversed, className, withTriangle, initialShouldShow, useReactPortal, }: TooltipProps) => JSX.Element | null;
1122
-
1123
- interface VideoModalProps {
1124
- id: string;
1125
- youtubeVideoId: string;
1126
- showVideoModal: boolean;
1127
- handleCloseClick: () => void;
1128
- }
1129
-
1130
- declare const VideoModal: ({ id, youtubeVideoId, showVideoModal, handleCloseClick, }: VideoModalProps) => React__default.JSX.Element;
1131
-
1132
- type ViewId = string;
1133
- declare enum ViewTypes {
1134
- saved = "saved",
1135
- fixed = "fixed",
1136
- draft = "draft"
1137
- }
1138
- interface ViewProps {
1139
- /** ClassName to override styles on outer root element */
1140
- className?: string;
1141
- /** Flag to toggle active state styles on the Tab */
1142
- active?: boolean;
1143
- /** View name, eg.: Jade's view */
1144
- name: string;
1145
- /** View's unique identifier */
1146
- id: ViewId;
1147
- /** View type */
1148
- type?: keyof typeof ViewTypes;
1149
- /** Number or string value to show near view label */
1150
- count?: number | string;
1151
- /** Event handler for when View component is clicked (should get activated) */
1152
- onClick: (id: ViewId) => void;
1153
- /** Event handler for when user clicks the delete/cross icon */
1154
- onDelete?: (id: ViewId) => void;
1155
- /** Event handler for when user clicks to edit the view */
1156
- onEdit?: (id: ViewId) => void;
1157
- /** Event handler for when user clicks to show options for FIXED view */
1158
- onOptions?: (id: ViewId) => void;
1159
- /** Class name for e2e testing */
1160
- e2eClassName?: string;
1161
- }
1162
-
1163
- declare const View: ({ id, name, type, className, count, active, onClick, onDelete, onEdit, onOptions, e2eClassName, }: ViewProps) => React__default.JSX.Element;
1164
-
1165
- interface BaseWeightProps {
1166
- hasError?: boolean;
1167
- size?: ComponentSize;
1168
- className?: string;
1169
- }
1170
- interface GramWeightProps extends BaseWeightProps {
1171
- weightUnit: WeightUnit.g;
1172
- gram: string;
1173
- handleChangeGram: (value: string) => void;
1174
- }
1175
- interface LbWeightProps extends BaseWeightProps {
1176
- weightUnit: WeightUnit.lb;
1177
- ounce: string;
1178
- pound: string;
1179
- handleChangeOunce: (value: string) => void;
1180
- handleChangePound: (value: string) => void;
1181
- }
1182
- type WeightProps = GramWeightProps | LbWeightProps;
1183
-
1184
- declare const WeightInput: FC<WeightProps>;
1185
-
1186
- /**
1187
- * Close a menu or modal by clicking out of it
1188
- */
1189
- declare const useClickOutside: (isOpen: boolean, onClose: () => void) => React$1.MutableRefObject<null>;
1190
-
1191
- declare const useDebounce: (value: any, timeout: number) => any;
1192
-
1193
- declare function useDropdown(): {
1194
- shouldShowDropdown: boolean;
1195
- toggleShouldShowDropdown: () => void;
1196
- setShouldShowDropdown: (state: boolean) => void;
1197
- closeDropdown: () => void;
1198
- };
1199
-
1200
- declare function useFocusVisible(): {
1201
- focusVisible: boolean;
1202
- onFocus: () => void;
1203
- onBlur: () => void;
1204
- };
1205
-
1206
- declare const useHover: (initialState?: boolean) => readonly [boolean, () => void, () => void];
1207
-
1208
- /**
1209
- * A hook to check if a component's contents are overflowing from its boundaries
1210
- * (scrollbar is visible).
1211
- */
1212
- declare const useIsOverflowing: (ref: HTMLElement | null) => {
1213
- isOverflowing: boolean;
1214
- onScroll: React$1.UIEventHandler<HTMLElement>;
1215
- };
1216
-
1217
- interface TabsConfig {
1218
- defaultActiveIndex?: number;
1219
- }
1220
- type ITab = any;
1221
- declare const useTabs: (tabs: ITab[], config?: TabsConfig) => readonly [any, (key: string) => void];
1222
-
1223
- declare const withDeprecated: <P extends object>(Component: React__default.ComponentType<P>) => React__default.FC<P>;
1224
-
1225
- declare const buildClassnames: (names: (string | undefined)[]) => string;
1226
-
1227
- /**
1228
- * A function to convert hex color to rgb.
1229
- */
1230
- declare const hexToRgb: (hex: string) => {
1231
- r: number;
1232
- g: number;
1233
- b: number;
1234
- } | null;
1235
- /**
1236
- * A function to get a hex color with opacity, after converting to `rgba`.
1237
- * @param hex color in hex format
1238
- */
1239
- declare const getOpaqueHexColor: (hex: string, opacity: number) => string;
1240
-
1241
- declare const generateId: (prefix: string) => string;
1242
-
1243
- type SizeScale = {
1244
- [index: number]: string;
1245
- [index: string]: string;
1246
- };
1247
-
1248
- declare const theme: {
1249
- breakpoints: {
1250
- readonly mobile: "640px";
1251
- readonly tablet: "720px";
1252
- readonly lgTablet: "960px";
1253
- readonly desktop: "1280px";
1254
- readonly lgDesktop: "1440px";
1255
- };
1256
- colors: {
1257
- brand: {
1258
- blue: {
1259
- lightest: string;
1260
- light: string;
1261
- base: string;
1262
- dark: string;
1263
- darkest: string;
1264
- };
1265
- peach: {
1266
- lightest: string;
1267
- light: string;
1268
- base: string;
1269
- dark: string;
1270
- darkest: string;
1271
- };
1272
- };
1273
- neutral: {
1274
- ink: {
1275
- lightest: string;
1276
- light: string;
1277
- base: string;
1278
- dark: string;
1279
- };
1280
- grey: {
1281
- lightest: string;
1282
- light: string;
1283
- base: string;
1284
- dark: string;
1285
- };
1286
- greyBlue: {
1287
- lightest: string;
1288
- light: string;
1289
- base: string;
1290
- dark: string;
1291
- };
1292
- };
1293
- secondary: {
1294
- red: {
1295
- lightest: string;
1296
- light: string;
1297
- base: string;
1298
- dark: string;
1299
- darkest: string;
1300
- };
1301
- yellow: {
1302
- lightest: string;
1303
- light: string;
1304
- base: string;
1305
- dark: string;
1306
- darkest: string;
1307
- };
1308
- green: {
1309
- lightest: string;
1310
- light: string;
1311
- base: string;
1312
- dark: string;
1313
- darkest: string;
1314
- };
1315
- lime: {
1316
- lightest: string;
1317
- light: string;
1318
- base: string;
1319
- dark: string;
1320
- darkest: string;
1321
- };
1322
- teal: {
1323
- lightest: string;
1324
- light: string;
1325
- base: string;
1326
- dark: string;
1327
- darkest: string;
1328
- };
1329
- aqua: {
1330
- lightest: string;
1331
- light: string;
1332
- base: string;
1333
- dark: string;
1334
- darkest: string;
1335
- };
1336
- purple: {
1337
- lightest: string;
1338
- light: string;
1339
- base: string;
1340
- dark: string;
1341
- darkest: string;
1342
- };
1343
- blue: {
1344
- lightest: string;
1345
- light: string;
1346
- base: string;
1347
- dark: string;
1348
- darkest: string;
1349
- };
1350
- pink: {
1351
- lightest: string;
1352
- light: string;
1353
- base: string;
1354
- dark: string;
1355
- darkest: string;
1356
- };
1357
- orange: {
1358
- lightest: string;
1359
- light: string;
1360
- base: string;
1361
- dark: string;
1362
- darkest: string;
1363
- };
1364
- };
1365
- system: {
1366
- scrollbar: {
1367
- thumb: string;
1368
- background: string;
1369
- };
1370
- };
1371
- };
1372
- layers: {
1373
- base: number;
1374
- popup: number;
1375
- modal: number;
1376
- tooltip: number;
1377
- };
1378
- radius: {
1379
- sm: string;
1380
- base: string;
1381
- md: string;
1382
- lg: string;
1383
- full: string;
1384
- };
1385
- shadows: typeof Shadows;
1386
- sizes: SizeScale;
1387
- text: {
1388
- headingXXL: {
1389
- fontFamily: string;
1390
- fontStyle: string;
1391
- fontWeight: number;
1392
- fontSize: string;
1393
- lineHeight: string;
1394
- color: string;
1395
- textDecoration: string;
1396
- letterSpacing: string;
1397
- };
1398
- headingXL: {
1399
- fontFamily: string;
1400
- fontStyle: string;
1401
- fontWeight: number;
1402
- fontSize: string;
1403
- lineHeight: string;
1404
- color: string;
1405
- textDecoration: string;
1406
- letterSpacing: string;
1407
- };
1408
- headingLarge: {
1409
- fontFamily: string;
1410
- fontStyle: string;
1411
- fontWeight: number;
1412
- fontSize: string;
1413
- lineHeight: string;
1414
- color: string;
1415
- textDecoration: string;
1416
- letterSpacing: string;
1417
- };
1418
- headingMedium: {
1419
- fontFamily: string;
1420
- fontStyle: string;
1421
- fontWeight: number;
1422
- fontSize: string;
1423
- lineHeight: string;
1424
- color: string;
1425
- textDecoration: string;
1426
- letterSpacing: string;
1427
- };
1428
- headingSmall: {
1429
- fontFamily: string;
1430
- fontStyle: string;
1431
- fontWeight: number;
1432
- fontSize: string;
1433
- lineHeight: string;
1434
- color: string;
1435
- textDecoration: string;
1436
- letterSpacing: string;
1437
- };
1438
- headingTable: {
1439
- fontFamily: string;
1440
- fontStyle: string;
1441
- fontWeight: number;
1442
- fontSize: string;
1443
- lineHeight: string;
1444
- color: string;
1445
- textDecoration: string;
1446
- letterSpacing: string;
1447
- };
1448
- subheadingLarge: {
1449
- fontFamily: string;
1450
- fontStyle: string;
1451
- fontWeight: string;
1452
- fontSize: string;
1453
- lineHeight: string;
1454
- color: string;
1455
- textDecoration: string;
1456
- letterSpacing: string;
1457
- };
1458
- subheadingMedium: {
1459
- fontFamily: string;
1460
- fontStyle: string;
1461
- fontWeight: string;
1462
- fontSize: string;
1463
- lineHeight: string;
1464
- color: string;
1465
- textDecoration: string;
1466
- letterSpacing: string;
1467
- };
1468
- subheadingSmall: {
1469
- fontFamily: string;
1470
- fontStyle: string;
1471
- fontWeight: string;
1472
- fontSize: string;
1473
- lineHeight: string;
1474
- color: string;
1475
- textDecoration: string;
1476
- letterSpacing: string;
1477
- };
1478
- subheadingSmallBold: {
1479
- fontFamily: string;
1480
- fontStyle: string;
1481
- fontWeight: number;
1482
- fontSize: string;
1483
- lineHeight: string;
1484
- color: string;
1485
- textDecoration: string;
1486
- letterSpacing: string;
1487
- };
1488
- body: {
1489
- fontFamily: string;
1490
- fontStyle: string;
1491
- fontWeight: string;
1492
- fontSize: string;
1493
- lineHeight: string;
1494
- color: string;
1495
- textDecoration: string;
1496
- letterSpacing: string;
1497
- };
1498
- bodySmall: {
1499
- fontFamily: string;
1500
- fontStyle: string;
1501
- fontWeight: string;
1502
- fontSize: string;
1503
- lineHeight: string;
1504
- color: string;
1505
- textDecoration: string;
1506
- letterSpacing: string;
1507
- };
1508
- bodyBold: {
1509
- fontFamily: string;
1510
- fontStyle: string;
1511
- fontWeight: number;
1512
- fontSize: string;
1513
- lineHeight: string;
1514
- color: string;
1515
- textDecoration: string;
1516
- letterSpacing: string;
1517
- };
1518
- bodyBoldDark: {
1519
- fontFamily: string;
1520
- fontStyle: string;
1521
- fontWeight: number;
1522
- fontSize: string;
1523
- lineHeight: string;
1524
- color: string;
1525
- textDecoration: string;
1526
- letterSpacing: string;
1527
- };
1528
- bodySmallBold: {
1529
- fontFamily: string;
1530
- fontStyle: string;
1531
- fontWeight: number;
1532
- fontSize: string;
1533
- lineHeight: string;
1534
- color: string;
1535
- textDecoration: string;
1536
- letterSpacing: string;
1537
- };
1538
- button: {
1539
- fontFamily: string;
1540
- fontStyle: string;
1541
- fontWeight: number;
1542
- fontSize: string;
1543
- lineHeight: string;
1544
- color: string;
1545
- textDecoration: string;
1546
- letterSpacing: string;
1547
- };
1548
- buttonSmall: {
1549
- fontFamily: string;
1550
- fontStyle: string;
1551
- fontWeight: number;
1552
- fontSize: string;
1553
- lineHeight: string;
1554
- color: string;
1555
- textDecoration: string;
1556
- letterSpacing: string;
1557
- };
1558
- linkLarge: {
1559
- fontFamily: string;
1560
- fontStyle: string;
1561
- fontWeight: string;
1562
- fontSize: string;
1563
- lineHeight: string;
1564
- color: string;
1565
- textDecoration: string;
1566
- letterSpacing: string;
1567
- };
1568
- linkMedium: {
1569
- fontFamily: string;
1570
- fontStyle: string;
1571
- fontWeight: string;
1572
- fontSize: string;
1573
- lineHeight: string;
1574
- color: string;
1575
- textDecoration: string;
1576
- letterSpacing: string;
1577
- };
1578
- link: {
1579
- fontFamily: string;
1580
- fontStyle: string;
1581
- fontWeight: string;
1582
- fontSize: string;
1583
- lineHeight: string;
1584
- color: string;
1585
- textDecoration: string;
1586
- letterSpacing: string;
1587
- };
1588
- linkSmall: {
1589
- fontFamily: string;
1590
- fontStyle: string;
1591
- fontWeight: string;
1592
- fontSize: string;
1593
- lineHeight: string;
1594
- color: string;
1595
- textDecoration: string;
1596
- letterSpacing: string;
1597
- };
1598
- inputLabel: {
1599
- fontFamily: string;
1600
- fontStyle: string;
1601
- fontWeight: number;
1602
- fontSize: string;
1603
- lineHeight: string;
1604
- color: string;
1605
- textDecoration: string;
1606
- letterSpacing: string;
1607
- };
1608
- inputLabelSmall: {
1609
- fontFamily: string;
1610
- fontStyle: string;
1611
- fontWeight: number;
1612
- fontSize: string;
1613
- lineHeight: string;
1614
- color: string;
1615
- textDecoration: string;
1616
- letterSpacing: string;
1617
- };
1618
- hintText: {
1619
- fontFamily: string;
1620
- fontStyle: string;
1621
- fontWeight: string;
1622
- fontSize: string;
1623
- lineHeight: string;
1624
- color: string;
1625
- textDecoration: string;
1626
- letterSpacing: string;
1627
- };
1628
- placeholder: {
1629
- fontFamily: string;
1630
- fontStyle: string;
1631
- fontWeight: string;
1632
- fontSize: string;
1633
- lineHeight: string;
1634
- color: string;
1635
- textDecoration: string;
1636
- letterSpacing: string;
1637
- };
1638
- placeholderSmall: {
1639
- fontFamily: string;
1640
- fontStyle: string;
1641
- fontWeight: string;
1642
- fontSize: string;
1643
- lineHeight: string;
1644
- color: string;
1645
- textDecoration: string;
1646
- letterSpacing: string;
1647
- };
1648
- placeholderCode: {
1649
- fontFamily: string;
1650
- fontStyle: string;
1651
- fontWeight: string;
1652
- fontSize: string;
1653
- lineHeight: string;
1654
- color: string;
1655
- textDecoration: string;
1656
- letterSpacing: string;
1657
- };
1658
- placeholderCodeSmall: {
1659
- fontFamily: string;
1660
- fontStyle: string;
1661
- fontWeight: string;
1662
- fontSize: string;
1663
- lineHeight: string;
1664
- color: string;
1665
- textDecoration: string;
1666
- letterSpacing: string;
1667
- };
1668
- error: {
1669
- fontFamily: string;
1670
- fontStyle: string;
1671
- fontWeight: number;
1672
- fontSize: string;
1673
- lineHeight: string;
1674
- color: string;
1675
- textDecoration: string;
1676
- letterSpacing: string;
1677
- };
1678
- errorSmall: {
1679
- fontFamily: string;
1680
- fontStyle: string;
1681
- fontWeight: number;
1682
- fontSize: string;
1683
- lineHeight: string;
1684
- color: string;
1685
- textDecoration: string;
1686
- letterSpacing: string;
1687
- };
1688
- successSmall: {
1689
- fontFamily: string;
1690
- fontStyle: string;
1691
- fontWeight: number;
1692
- fontSize: string;
1693
- lineHeight: string;
1694
- color: string;
1695
- textDecoration: string;
1696
- letterSpacing: string;
1697
- };
1698
- };
1699
- fontFamily: string;
1700
- };
1701
-
1702
- export { Accordion, ActionList, Anchor, AnimatedDropdown, Avatar, Badge, Banner, BaseContainer, Breadcrumbs, Button, Card, CardHeader, Checkbox, Choice, ChoiceList, CopyToClipboard, DataTable, DataTableExp, DescriptionList, DetailPage, DimensionsInput, FilterTag, Grid, Image, InputGroup, Loader, LoginWithAmazonButton, Modal, PageHeader, Pagination, PaginationRange, Popover, Portal, PriceInput, Radio, Search, SegmentedControl, Select, SimpleTable, Slider, Stack, Stepper, Tag, Text, TextField, ToastsLayout, Toggle, ToggleButton, Tooltip, VideoModal, View, WeightInput, buildClassnames, generateId, getOpaqueHexColor, hexToRgb, theme, useClickOutside, useDebounce, useDropdown, useFocusVisible, useHover, useIsOverflowing, useTabs, withDeprecated, withLabels };
1
+ export * from './components';
2
+ export * from './hooks';
3
+ export * from './hoc';
4
+ export * from './utils';
5
+ export * from './theme';