@lumx/react 2.2.20 → 2.2.22

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 (108) hide show
  1. package/esm/_internal/AutocompleteMultiple.js.map +1 -1
  2. package/esm/_internal/Avatar2.js.map +1 -1
  3. package/esm/_internal/ButtonRoot.js.map +1 -1
  4. package/esm/_internal/Checkbox2.js.map +1 -1
  5. package/esm/_internal/Chip2.js.map +1 -1
  6. package/esm/_internal/ClickAwayProvider.js +45 -26
  7. package/esm/_internal/ClickAwayProvider.js.map +1 -1
  8. package/esm/_internal/CommentBlock.js.map +1 -1
  9. package/esm/_internal/Dialog2.js +6 -3
  10. package/esm/_internal/Dialog2.js.map +1 -1
  11. package/esm/_internal/Divider2.js.map +1 -1
  12. package/esm/_internal/DragHandle.js.map +1 -1
  13. package/esm/_internal/Dropdown2.js.map +1 -1
  14. package/esm/_internal/ExpansionPanel.js.map +1 -1
  15. package/esm/_internal/Flag2.js.map +1 -1
  16. package/esm/_internal/GenericBlock.js +70 -15
  17. package/esm/_internal/GenericBlock.js.map +1 -1
  18. package/esm/_internal/Icon2.js.map +1 -1
  19. package/esm/_internal/ImageBlock.js.map +1 -1
  20. package/esm/_internal/InputHelper.js.map +1 -1
  21. package/esm/_internal/InputLabel.js.map +1 -1
  22. package/esm/_internal/Lightbox2.js +1 -1
  23. package/esm/_internal/Lightbox2.js.map +1 -1
  24. package/esm/_internal/LinkPreview.js.map +1 -1
  25. package/esm/_internal/Mosaic2.js.map +1 -1
  26. package/esm/_internal/Notification2.js.map +1 -1
  27. package/esm/_internal/Popover2.js +1 -1
  28. package/esm/_internal/Popover2.js.map +1 -1
  29. package/esm/_internal/PostBlock.js.map +1 -1
  30. package/esm/_internal/Progress2.js.map +1 -1
  31. package/esm/_internal/RadioGroup.js.map +1 -1
  32. package/esm/_internal/SelectMultiple.js.map +1 -1
  33. package/esm/_internal/SideNavigationItem.js.map +1 -1
  34. package/esm/_internal/SkeletonTypography.js.map +1 -1
  35. package/esm/_internal/Slider2.js.map +1 -1
  36. package/esm/_internal/Slides.js.map +1 -1
  37. package/esm/_internal/Switch2.js.map +1 -1
  38. package/esm/_internal/TabPanel.js.map +1 -1
  39. package/esm/_internal/TableRow.js.map +1 -1
  40. package/esm/_internal/TextField.js.map +1 -1
  41. package/esm/_internal/Thumbnail2.js.map +1 -1
  42. package/esm/_internal/Uploader2.js.map +1 -1
  43. package/esm/_internal/UserBlock.js.map +1 -1
  44. package/esm/_internal/_rollupPluginBabelHelpers.js +5 -1
  45. package/esm/_internal/_rollupPluginBabelHelpers.js.map +1 -1
  46. package/esm/_internal/generic-block.js +8 -0
  47. package/esm/_internal/generic-block.js.map +1 -1
  48. package/esm/_internal/type.js +11 -1
  49. package/esm/_internal/type.js.map +1 -1
  50. package/package.json +5 -5
  51. package/src/components/autocomplete/Autocomplete.tsx +6 -8
  52. package/src/components/avatar/Avatar.tsx +2 -4
  53. package/src/components/button/Button.test.tsx +1 -1
  54. package/src/components/button/ButtonRoot.tsx +3 -4
  55. package/src/components/button/IconButton.test.tsx +1 -1
  56. package/src/components/checkbox/Checkbox.tsx +2 -4
  57. package/src/components/chip/Chip.tsx +2 -4
  58. package/src/components/comment-block/CommentBlock.tsx +2 -4
  59. package/src/components/dialog/Dialog.stories.tsx +7 -3
  60. package/src/components/dialog/Dialog.tsx +11 -4
  61. package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +7 -0
  62. package/src/components/divider/Divider.tsx +2 -5
  63. package/src/components/drag-handle/DragHandle.tsx +2 -5
  64. package/src/components/dropdown/Dropdown.tsx +4 -3
  65. package/src/components/expansion-panel/ExpansionPanel.tsx +2 -3
  66. package/src/components/flag/Flag.tsx +2 -4
  67. package/src/components/generic-block/GenericBlock.stories.tsx +65 -124
  68. package/src/components/generic-block/GenericBlock.test.tsx +111 -4
  69. package/src/components/generic-block/GenericBlock.tsx +107 -18
  70. package/src/components/icon/Icon.tsx +2 -4
  71. package/src/components/image-block/ImageBlock.tsx +2 -4
  72. package/src/components/input-helper/InputHelper.tsx +2 -4
  73. package/src/components/input-label/InputLabel.tsx +2 -4
  74. package/src/components/lightbox/Lightbox.tsx +4 -6
  75. package/src/components/lightbox/__snapshots__/Lightbox.test.tsx.snap +1 -1
  76. package/src/components/link-preview/LinkPreview.tsx +2 -4
  77. package/src/components/mosaic/Mosaic.tsx +2 -4
  78. package/src/components/notification/Notification.tsx +2 -4
  79. package/src/components/popover/Popover.tsx +1 -1
  80. package/src/components/popover/__snapshots__/Popover.test.tsx.snap +10 -10
  81. package/src/components/post-block/PostBlock.tsx +2 -4
  82. package/src/components/progress/Progress.tsx +2 -4
  83. package/src/components/radio-button/RadioButton.tsx +2 -4
  84. package/src/components/select/constants.ts +2 -5
  85. package/src/components/side-navigation/SideNavigation.tsx +2 -4
  86. package/src/components/skeleton/SkeletonCircle.tsx +2 -4
  87. package/src/components/skeleton/SkeletonRectangle.tsx +2 -4
  88. package/src/components/skeleton/SkeletonTypography.tsx +2 -4
  89. package/src/components/slider/Slider.tsx +2 -4
  90. package/src/components/slideshow/Slides.tsx +2 -7
  91. package/src/components/slideshow/SlideshowControls.tsx +2 -4
  92. package/src/components/switch/Switch.tsx +2 -4
  93. package/src/components/table/Table.tsx +2 -4
  94. package/src/components/tabs/TabList.tsx +2 -4
  95. package/src/components/text-field/TextField.tsx +6 -8
  96. package/src/components/thumbnail/Thumbnail.tsx +3 -5
  97. package/src/components/uploader/Uploader.tsx +2 -4
  98. package/src/components/user-block/UserBlock.tsx +2 -4
  99. package/src/hooks/useClickAway.tsx +5 -5
  100. package/src/testing/utils/commonTestsSuite.ts +2 -2
  101. package/src/utils/ClickAwayProvider/ClickAwayProvider.stories.jsx +58 -0
  102. package/src/utils/ClickAwayProvider/ClickAwayProvider.tsx +51 -19
  103. package/src/utils/focus/getFirstAndLastFocusable.test.ts +6 -0
  104. package/src/utils/focus/getFirstAndLastFocusable.ts +2 -2
  105. package/src/utils/type.ts +19 -2
  106. package/types.d.ts +112 -139
  107. package/src/components/generic-block/__snapshots__/GenericBlock.test.tsx.snap +0 -92
  108. package/src/utils/ClickAwayProvider/ClickAwayProvider.stories.tsx +0 -75
package/types.d.ts CHANGED
@@ -1,6 +1,13 @@
1
1
  // Generated by dts-bundle-generator v5.6.0
2
2
 
3
- /// <reference types="react" />
3
+ /// <reference types="cheerio" />
4
+ /// <reference types="node" />
5
+ /// <reference types="prop-types" />
6
+
7
+ import * as CSS from 'csstype';
8
+ import * as PropTypes from 'prop-types';
9
+ import React from 'react';
10
+ import { AriaAttributes, ButtonHTMLAttributes, CSSProperties, DetailedHTMLProps, ImgHTMLAttributes, InputHTMLAttributes, Key, KeyboardEventHandler, MouseEventHandler, ReactElement, ReactNode, Ref, RefObject, SetStateAction, SyntheticEvent } from 'react';
4
11
 
5
12
  /** Get types of the values of a record. */
6
13
  export declare type ValueOf<T extends Record<any, any>> = T[keyof T];
@@ -20,13 +27,22 @@ export declare type Comp<P, T = HTMLElement> = {
20
27
  };
21
28
  /** Union type of all heading elements */
22
29
  export declare type HeadingElement = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
30
+ export interface HasTheme {
31
+ /**
32
+ * Theme adapting the component to light or dark background.
33
+ */
34
+ theme?: Theme;
35
+ }
23
36
  /**
24
37
  * Define a generic props types.
25
38
  */
26
39
  export interface GenericProps {
40
+ /**
41
+ * Class name forwarded to the root element of the component.
42
+ */
43
+ className?: string;
27
44
  /**
28
45
  * Any prop (particularly any supported prop for a HTML element).
29
- * E.g. classNames, onClick, disabled, ...
30
46
  */
31
47
  [propName: string]: any;
32
48
  }
@@ -34,6 +50,11 @@ export interface GenericProps {
34
50
  * Callback function type alias (use for readability)
35
51
  */
36
52
  export declare type Callback = () => void;
53
+ /**
54
+ * JS falsy values.
55
+ * (excluding `NaN` as it can't be distinguished from `number`)
56
+ */
57
+ export declare type Falsy = false | undefined | null | 0 | "";
37
58
  /**
38
59
  * Alignments.
39
60
  */
@@ -245,7 +266,7 @@ export declare const AlertDialog: Comp<AlertDialogProps, HTMLDivElement>;
245
266
  /**
246
267
  * Defines the props of the component.
247
268
  */
248
- export interface AutocompleteProps extends GenericProps {
269
+ export interface AutocompleteProps extends GenericProps, HasTheme {
249
270
  /**
250
271
  * Whether the suggestions list should display anchored to the input or to the wrapper.
251
272
  * @see {@link DropdownProps#anchorToInput}
@@ -261,7 +282,7 @@ export interface AutocompleteProps extends GenericProps {
261
282
  * Reference to the <input> or <textarea> element.
262
283
  * @see {@link TextFieldProps#inputRef}
263
284
  */
264
- inputRef?: RefObject<HTMLInputElement>;
285
+ inputRef?: TextFieldProps["inputRef"];
265
286
  /**
266
287
  * The offset that will be applied to the Dropdown position.
267
288
  * @see {@link DropdownProps#offset}
@@ -326,8 +347,6 @@ export interface AutocompleteProps extends GenericProps {
326
347
  * @see {@link TextFieldProps#placeholder}
327
348
  */
328
349
  placeholder?: string;
329
- /** Theme adapting the component to light or dark background. */
330
- theme?: Theme;
331
350
  /** List of suggestions to display during autocomplete. */
332
351
  children: React.ReactNode;
333
352
  /**
@@ -424,7 +443,7 @@ export declare type AvatarSize = Extract<Size, "xs" | "s" | "m" | "l" | "xl" | "
424
443
  /**
425
444
  * Defines the props of the component.
426
445
  */
427
- export interface AvatarProps extends GenericProps {
446
+ export interface AvatarProps extends GenericProps, HasTheme {
428
447
  /** Action toolbar content. */
429
448
  actions?: ReactNode;
430
449
  /** Image alternative text. */
@@ -443,8 +462,6 @@ export interface AvatarProps extends GenericProps {
443
462
  onKeyPress?: KeyboardEventHandler<HTMLDivElement>;
444
463
  /** Size variant. */
445
464
  size?: AvatarSize;
446
- /** Theme adapting the component to light or dark background. */
447
- theme?: Theme;
448
465
  /** Props to pass to the thumbnail (minus those already set by the Avatar props). */
449
466
  thumbnailProps?: Omit<ThumbnailProps, "image" | "alt" | "size" | "theme" | "align" | "fillHeight" | "variant" | "aspectRatio">;
450
467
  }
@@ -478,7 +495,7 @@ export declare type HTMLButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTM
478
495
  * Button size definition.
479
496
  */
480
497
  export declare type ButtonSize = Extract<Size, "s" | "m">;
481
- export interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, "aria-expanded" | "aria-haspopup" | "aria-pressed" | "aria-label"> {
498
+ export interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, "aria-expanded" | "aria-haspopup" | "aria-pressed" | "aria-label">, HasTheme {
482
499
  /** Color variant. */
483
500
  color?: Color;
484
501
  /** Emphasis variant. */
@@ -497,8 +514,6 @@ export interface BaseButtonProps extends GenericProps, Pick<AriaAttributes, "ari
497
514
  size?: ButtonSize;
498
515
  /** Native anchor target property. */
499
516
  target?: "_self" | "_blank" | "_parent" | "_top";
500
- /** Theme adapting the component to light or dark background. */
501
- theme?: Theme;
502
517
  /** Native button type. */
503
518
  type?: HTMLButtonProps["type"];
504
519
  /** Custom react component for the link (can be used to inject react router Link). */
@@ -581,7 +596,7 @@ export declare const ButtonGroup: Comp<ButtonGroupProps, HTMLDivElement>;
581
596
  /**
582
597
  * Defines the props of the component.
583
598
  */
584
- export interface CheckboxProps extends GenericProps {
599
+ export interface CheckboxProps extends GenericProps, HasTheme {
585
600
  /** Helper text. */
586
601
  helper?: string;
587
602
  /** Native input id property. */
@@ -596,8 +611,6 @@ export interface CheckboxProps extends GenericProps {
596
611
  label?: ReactNode;
597
612
  /** Native input name property. */
598
613
  name?: string;
599
- /** Theme adapting the component to light or dark background. */
600
- theme?: Theme;
601
614
  /** Native input value property. */
602
615
  value?: string;
603
616
  /** On change callback. */
@@ -620,7 +633,7 @@ export declare type ChipSize = Extract<Size, "s" | "m">;
620
633
  /**
621
634
  * Defines the props of the component.
622
635
  */
623
- export interface ChipProps extends GenericProps {
636
+ export interface ChipProps extends GenericProps, HasTheme {
624
637
  /** A component to be rendered after the content. */
625
638
  after?: ReactNode;
626
639
  /** A component to be rendered before the content. */
@@ -637,8 +650,6 @@ export interface ChipProps extends GenericProps {
637
650
  isSelected?: boolean;
638
651
  /** Size variant. */
639
652
  size?: ChipSize;
640
- /** Theme adapting the component to light or dark background. */
641
- theme?: Theme;
642
653
  /** On "after" element clicked callback. */
643
654
  onAfterClick?: MouseEventHandler;
644
655
  /** On "before" element clicked callback. */
@@ -684,7 +695,7 @@ export declare type CommentBlockVariant = ValueOf<typeof CommentBlockVariant>;
684
695
  /**
685
696
  * Defines the props of the component.
686
697
  */
687
- export interface CommentBlockProps extends GenericProps {
698
+ export interface CommentBlockProps extends GenericProps, HasTheme {
688
699
  /** Action toolbar content. */
689
700
  actions?: ReactNode;
690
701
  /** Props to pass to the avatar. */
@@ -713,8 +724,6 @@ export interface CommentBlockProps extends GenericProps {
713
724
  onMouseLeave?(): void;
714
725
  /** Comment content. */
715
726
  text: ReactNode | string;
716
- /** Theme adapting the component to light or dark background. */
717
- theme?: Theme;
718
727
  /** Comment variant. */
719
728
  variant?: CommentBlockVariant;
720
729
  }
@@ -828,7 +837,7 @@ export interface DialogProps extends GenericProps {
828
837
  /** Reference to the parent element that triggered modal opening (will get back focus on close). */
829
838
  parentElement?: RefObject<HTMLElement>;
830
839
  /** Reference to the dialog content element. */
831
- contentRef?: RefObject<HTMLDivElement>;
840
+ contentRef?: Ref<HTMLDivElement>;
832
841
  /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */
833
842
  focusElement?: RefObject<HTMLElement>;
834
843
  /** Whether to keep the dialog open on clickaway or escape press. */
@@ -856,9 +865,7 @@ export declare const Dialog: Comp<DialogProps, HTMLDivElement>;
856
865
  /**
857
866
  * Defines the props of the component.
858
867
  */
859
- export interface DividerProps extends GenericProps {
860
- /** Theme adapting the component to light or dark background. */
861
- theme?: Theme;
868
+ export interface DividerProps extends GenericProps, HasTheme {
862
869
  }
863
870
  /**
864
871
  * Component default props.
@@ -875,9 +882,7 @@ export declare const Divider: Comp<DividerProps, HTMLHRElement>;
875
882
  /**
876
883
  * Defines the props of the component.
877
884
  */
878
- export interface DragHandleProps extends GenericProps {
879
- /** Theme adapting the component to light or dark background. */
880
- theme?: Theme;
885
+ export interface DragHandleProps extends GenericProps, HasTheme {
881
886
  }
882
887
  /**
883
888
  * DragHandle component.
@@ -974,10 +979,11 @@ export declare const Popover: Comp<PopoverProps, HTMLDivElement>;
974
979
  * Defines the props of the component.
975
980
  */
976
981
  export interface DropdownProps extends GenericProps {
977
- /** Reference to the element around which the dropdown is placed.
982
+ /**
983
+ * Reference to the element around which the dropdown is placed.
978
984
  * @see {@link PopoverProps#anchorRef}
979
985
  */
980
- anchorRef: React.RefObject<HTMLElement>;
986
+ anchorRef: PopoverProps["anchorRef"];
981
987
  /** Dropdown content. */
982
988
  children: React.ReactNode;
983
989
  /**
@@ -1047,7 +1053,7 @@ export declare const Dropdown: Comp<DropdownProps, HTMLDivElement>;
1047
1053
  /**
1048
1054
  * Defines the props of the component.
1049
1055
  */
1050
- export interface ExpansionPanelProps extends GenericProps {
1056
+ export interface ExpansionPanelProps extends GenericProps, HasTheme {
1051
1057
  /** Whether the expansion panel has a background. */
1052
1058
  hasBackground?: boolean;
1053
1059
  /** Whether the header has a divider. */
@@ -1056,8 +1062,6 @@ export interface ExpansionPanelProps extends GenericProps {
1056
1062
  isOpen?: boolean;
1057
1063
  /** Label text (overwritten if a `<header>` is provided in the children). */
1058
1064
  label?: string;
1059
- /** Theme adapting the component to light or dark background. */
1060
- theme?: Theme;
1061
1065
  /** On open callback. */
1062
1066
  onOpen?: Callback;
1063
1067
  /** On close callback. */
@@ -1075,9 +1079,7 @@ export interface ExpansionPanelProps extends GenericProps {
1075
1079
  * @return React element.
1076
1080
  */
1077
1081
  export declare const ExpansionPanel: Comp<ExpansionPanelProps, HTMLDivElement>;
1078
- export interface FlagProps extends GenericProps {
1079
- /** Theme adapting the component to light or dark background. */
1080
- theme?: Theme;
1082
+ export interface FlagProps extends GenericProps, HasTheme {
1081
1083
  /** Color of the component. */
1082
1084
  color?: ColorPalette;
1083
1085
  /** Icon to use before the label. */
@@ -1127,40 +1129,65 @@ export interface FlexBoxProps extends GenericProps {
1127
1129
  */
1128
1130
  export declare const FlexBox: Comp<FlexBoxProps, HTMLDivElement>;
1129
1131
  export interface GenericBlockProps extends FlexBoxProps {
1130
- /** Component to use as visual element. */
1132
+ /**
1133
+ * Component to use as visual element.
1134
+ */
1131
1135
  figure?: ReactNode;
1132
- /** Actions to set after the main content. */
1136
+ /**
1137
+ * Actions to set after the main content.
1138
+ */
1133
1139
  actions?: ReactNode;
1134
- /** Main content to display */
1140
+ /**
1141
+ * Main content to display or sections components
1142
+ * ({@see GenericBlock.Figure}, {@see GenericBlock.Content} & {@see GenericBlock.Actions})
1143
+ */
1135
1144
  children: ReactNode;
1136
- /** Orientation of the 3 sections */
1145
+ /**
1146
+ * Orientation of the 3 sections
1147
+ */
1137
1148
  orientation?: FlexBoxProps["orientation"];
1138
- /** Horizontal alignment. */
1149
+ /**
1150
+ * Horizontal alignment.
1151
+ */
1139
1152
  hAlign?: FlexBoxProps["hAlign"];
1140
- /** Vertical alignment. */
1153
+ /**
1154
+ * Vertical alignment.
1155
+ */
1141
1156
  vAlign?: FlexBoxProps["vAlign"];
1142
1157
  /**
1143
1158
  * The props to forward to the content.
1144
1159
  * By default, the content will have the same alignment as wrapper.
1145
1160
  */
1146
1161
  contentProps?: Omit<FlexBoxProps, "children">;
1147
- /** props to forward to the actions element. */
1162
+ /**
1163
+ * props to forward to the actions element.
1164
+ */
1148
1165
  actionsProps?: Omit<FlexBoxProps, "children">;
1149
- /** props to forward to the figure element. */
1166
+ /**
1167
+ * props to forward to the figure element.
1168
+ */
1150
1169
  figureProps?: Omit<FlexBoxProps, "children">;
1151
1170
  }
1152
- /**
1153
- * The GenericBlock is a layout component made of 3 sections that can be
1154
- * displayed either horizontally of vertically with the same gap between each section.
1155
- *
1156
- * The sections are:
1157
- * * (Optional) `Figure` => A visual element to display before the main content.
1158
- * * (Required) `Content` => The main content displayed
1159
- * * (Optional) `Actions` => One or more actions to set after the element.
1160
- *
1161
- * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076
1162
- */
1163
- export declare const GenericBlock: Comp<GenericBlockProps, HTMLDivElement>;
1171
+ export declare type BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;
1172
+ export interface GenericBlock extends BaseGenericBlock {
1173
+ /**
1174
+ * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject
1175
+ * the "figure" section of the block (instead of using `figure` and `figureProps` props).
1176
+ */
1177
+ Figure: Comp<FlexBoxProps>;
1178
+ /**
1179
+ * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject
1180
+ * the "content" section of the block (instead of using `content` and `contentProps` props).
1181
+ */
1182
+ Content: Comp<FlexBoxProps>;
1183
+ /**
1184
+ * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject
1185
+ * the "actions" section of the block (instead of using `actions` and `actionsProps` props).
1186
+ */
1187
+ Actions: Comp<FlexBoxProps>;
1188
+ }
1189
+ declare const BaseGenericBlock: BaseGenericBlock;
1190
+ export declare const GenericBlock: GenericBlock;
1164
1191
  export declare type GridGutterSize = Extract<Size, "regular" | "big" | "huge">;
1165
1192
  /**
1166
1193
  * Defines the props of the component.
@@ -1209,7 +1236,7 @@ export declare type IconSizes = Extract<Size, "xxs" | "xs" | "s" | "m" | "l" | "
1209
1236
  /**
1210
1237
  * Defines the props of the component.
1211
1238
  */
1212
- export interface IconProps extends GenericProps {
1239
+ export interface IconProps extends GenericProps, HasTheme {
1213
1240
  /** Color variant. */
1214
1241
  color?: Color;
1215
1242
  /** Lightened or darkened variant of the selected icon color. */
@@ -1223,8 +1250,6 @@ export interface IconProps extends GenericProps {
1223
1250
  icon: string;
1224
1251
  /** Size variant. */
1225
1252
  size?: IconSizes;
1226
- /** Theme adapting the component to light or dark background. */
1227
- theme?: Theme;
1228
1253
  /** Sets an alternative text on the svg. Will set an `img` role to the svg. */
1229
1254
  alt?: string;
1230
1255
  }
@@ -1264,7 +1289,7 @@ export declare type ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;
1264
1289
  /**
1265
1290
  * Defines the props of the component.
1266
1291
  */
1267
- export interface ThumbnailProps extends GenericProps {
1292
+ export interface ThumbnailProps extends GenericProps, HasTheme {
1268
1293
  /** Alignment of the thumbnail in it's parent (requires flex parent). */
1269
1294
  align?: HorizontalAlignment;
1270
1295
  /** Image alternative text. */
@@ -1272,7 +1297,7 @@ export interface ThumbnailProps extends GenericProps {
1272
1297
  /** Image aspect ratio. */
1273
1298
  aspectRatio?: AspectRatio;
1274
1299
  /** Badge. */
1275
- badge?: ReactElement;
1300
+ badge?: ReactElement | Falsy;
1276
1301
  /** Image cross origin resource policy. */
1277
1302
  crossOrigin?: ImgHTMLProps["crossOrigin"];
1278
1303
  /** Fallback icon (SVG path) or react node when image fails to load. */
@@ -1297,8 +1322,6 @@ export interface ThumbnailProps extends GenericProps {
1297
1322
  onClick?: MouseEventHandler<HTMLDivElement>;
1298
1323
  /** On key press callback. */
1299
1324
  onKeyPress?: KeyboardEventHandler<HTMLDivElement>;
1300
- /** Theme adapting the component to light or dark background. */
1301
- theme?: Theme;
1302
1325
  /** Variant of the component. */
1303
1326
  variant?: ThumbnailVariant;
1304
1327
  /** Props to pass to the link wrapping the thumbnail. */
@@ -1329,7 +1352,7 @@ export declare type ImageBlockSize = Extract<Size, "xl" | "xxl">;
1329
1352
  /**
1330
1353
  * Defines the props of the component.
1331
1354
  */
1332
- export interface ImageBlockProps extends GenericProps {
1355
+ export interface ImageBlockProps extends GenericProps, HasTheme {
1333
1356
  /** Action toolbar content. */
1334
1357
  actions?: ReactNode;
1335
1358
  /** Alignment. */
@@ -1352,8 +1375,6 @@ export interface ImageBlockProps extends GenericProps {
1352
1375
  size?: ImageBlockSize;
1353
1376
  /** Tag content. */
1354
1377
  tags?: ReactNode;
1355
- /** Theme adapting the component to light or dark background. */
1356
- theme?: Theme;
1357
1378
  /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */
1358
1379
  thumbnailProps?: Omit<ThumbnailProps, "image" | "size" | "theme" | "align" | "fillHeight">;
1359
1380
  /** Image title to display in the caption. */
@@ -1370,13 +1391,11 @@ export declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
1370
1391
  /**
1371
1392
  * Defines the props of the component.
1372
1393
  */
1373
- export interface InputHelperProps extends GenericProps {
1394
+ export interface InputHelperProps extends GenericProps, HasTheme {
1374
1395
  /** Helper content. */
1375
1396
  children: string | ReactNode;
1376
1397
  /** Helper variant. */
1377
1398
  kind?: Kind;
1378
- /** Theme adapting the component to light or dark background. */
1379
- theme?: Theme;
1380
1399
  }
1381
1400
  /**
1382
1401
  * InputHelper component.
@@ -1389,15 +1408,13 @@ export declare const InputHelper: Comp<InputHelperProps, HTMLSpanElement>;
1389
1408
  /**
1390
1409
  * Defines the props of the component.
1391
1410
  */
1392
- export interface InputLabelProps extends GenericProps {
1411
+ export interface InputLabelProps extends GenericProps, HasTheme {
1393
1412
  /** Label content. */
1394
1413
  children: string | ReactNode;
1395
1414
  /** Native htmlFor property. */
1396
1415
  htmlFor: string;
1397
1416
  /** Whether the component is required or not. */
1398
1417
  isRequired?: boolean;
1399
- /** Theme adapting the component to light or dark background. */
1400
- theme?: Theme;
1401
1418
  }
1402
1419
  /**
1403
1420
  * InputLabel component.
@@ -1410,7 +1427,7 @@ export declare const InputLabel: Comp<InputLabelProps, HTMLLabelElement>;
1410
1427
  /**
1411
1428
  * Defines the props of the component.
1412
1429
  */
1413
- export interface LightboxProps extends GenericProps {
1430
+ export interface LightboxProps extends GenericProps, HasTheme {
1414
1431
  /** Props to pass to the close button (minus those already set by the Lightbox props). */
1415
1432
  closeButtonProps?: Pick<IconButtonProps, "label"> & Omit<IconButtonProps, "label" | "onClick" | "icon" | "emphasis" | "color">;
1416
1433
  /** Whether the component is open or not. */
@@ -1419,8 +1436,6 @@ export interface LightboxProps extends GenericProps {
1419
1436
  parentElement: RefObject<any>;
1420
1437
  /** Whether to keep the dialog open on clickaway or escape press. */
1421
1438
  preventAutoClose?: boolean;
1422
- /** Theme adapting the component to light or dark background. */
1423
- theme?: Theme;
1424
1439
  /** Z-axis position. */
1425
1440
  zIndex?: number;
1426
1441
  /** On close callback. */
@@ -1469,7 +1484,7 @@ export declare const Link: Comp<LinkProps, HTMLAnchorElement | HTMLButtonElement
1469
1484
  /**
1470
1485
  * Defines the props of the component.
1471
1486
  */
1472
- export interface LinkPreviewProps extends GenericProps {
1487
+ export interface LinkPreviewProps extends GenericProps, HasTheme {
1473
1488
  /** Description. */
1474
1489
  description?: string;
1475
1490
  /** Link URL. */
@@ -1480,8 +1495,6 @@ export interface LinkPreviewProps extends GenericProps {
1480
1495
  linkProps?: Omit<LinkProps, "color" | "colorVariant" | "href" | "target">;
1481
1496
  /** Size variant. */
1482
1497
  size?: Extract<Size, "regular" | "big">;
1483
- /** Theme adapting the component to light or dark background. */
1484
- theme?: Theme;
1485
1498
  /** Thumbnail for the link preview. */
1486
1499
  thumbnailProps?: ThumbnailProps;
1487
1500
  /** Title. */
@@ -1630,9 +1643,7 @@ export declare const Message: Comp<MessageProps, HTMLDivElement>;
1630
1643
  /**
1631
1644
  * Defines the props of the component.
1632
1645
  */
1633
- export interface MosaicProps extends GenericProps {
1634
- /** Theme adapting the component to light or dark background. */
1635
- theme?: Theme;
1646
+ export interface MosaicProps extends GenericProps, HasTheme {
1636
1647
  /** Thumbnails. */
1637
1648
  thumbnails: ThumbnailProps[];
1638
1649
  /** On image click callback. */
@@ -1649,15 +1660,13 @@ export declare const Mosaic: Comp<MosaicProps, HTMLDivElement>;
1649
1660
  /**
1650
1661
  * Defines the props of the component.
1651
1662
  */
1652
- export interface NotificationProps extends GenericProps {
1663
+ export interface NotificationProps extends GenericProps, HasTheme {
1653
1664
  /** Action button label. */
1654
1665
  actionLabel?: string;
1655
1666
  /** Content. */
1656
1667
  content?: React.ReactNode;
1657
1668
  /** Whether the component is open or not. */
1658
1669
  isOpen?: boolean;
1659
- /** Theme adapting the component to light or dark background. */
1660
- theme?: Theme;
1661
1670
  /** Notification type. */
1662
1671
  type?: Kind;
1663
1672
  /** Z-axis position. */
@@ -1678,7 +1687,7 @@ export declare const Notification: Comp<NotificationProps, HTMLDivElement>;
1678
1687
  /**
1679
1688
  * Defines the props of the component.
1680
1689
  */
1681
- export interface PostBlockProps extends GenericProps {
1690
+ export interface PostBlockProps extends GenericProps, HasTheme {
1682
1691
  /** Action toolbar content. */
1683
1692
  actions?: ReactNode;
1684
1693
  /** Attachment content. */
@@ -1695,8 +1704,6 @@ export interface PostBlockProps extends GenericProps {
1695
1704
  text?: string | {
1696
1705
  __html: string;
1697
1706
  };
1698
- /** Theme adapting the component to light or dark background. */
1699
- theme?: Theme;
1700
1707
  /** Thumbnail. */
1701
1708
  thumbnailProps?: ThumbnailProps;
1702
1709
  /** Title. */
@@ -1723,9 +1730,7 @@ export declare type ProgressVariant = ValueOf<typeof ProgressVariant>;
1723
1730
  /**
1724
1731
  * Defines the props of the component.
1725
1732
  */
1726
- export interface ProgressProps extends GenericProps {
1727
- /** Theme adapting the component to light or dark background. */
1728
- theme?: Theme;
1733
+ export interface ProgressProps extends GenericProps, HasTheme {
1729
1734
  /** Progress variant. */
1730
1735
  variant?: ProgressVariant;
1731
1736
  }
@@ -1833,7 +1838,7 @@ export declare const ProgressTrackerStepPanel: Comp<ProgressTrackerStepPanelProp
1833
1838
  /**
1834
1839
  * Defines the props of the component.
1835
1840
  */
1836
- export interface RadioButtonProps extends GenericProps {
1841
+ export interface RadioButtonProps extends GenericProps, HasTheme {
1837
1842
  /** Helper text. */
1838
1843
  helper?: string;
1839
1844
  /** Native input id property. */
@@ -1848,8 +1853,6 @@ export interface RadioButtonProps extends GenericProps {
1848
1853
  label?: ReactNode;
1849
1854
  /** Native input name property. */
1850
1855
  name?: string;
1851
- /** Theme adapting the component to light or dark background. */
1852
- theme?: Theme;
1853
1856
  /** Native input value property. */
1854
1857
  value?: string;
1855
1858
  /** On change callback. */
@@ -1886,7 +1889,7 @@ export declare const SelectVariant: {
1886
1889
  readonly chip: "chip";
1887
1890
  };
1888
1891
  export declare type SelectVariant = ValueOf<typeof SelectVariant>;
1889
- export interface CoreSelectProps extends GenericProps {
1892
+ export interface CoreSelectProps extends GenericProps, HasTheme {
1890
1893
  /** Props to pass to the clear button (minus those already set by the Select props). If not specified, the button won't be displayed. */
1891
1894
  clearButtonProps?: Pick<IconButtonProps, "label"> & Omit<IconButtonProps, "label" | "onClick" | "icon" | "emphasis">;
1892
1895
  /** Whether the select (input variant) is displayed with error style or not. */
@@ -1911,8 +1914,6 @@ export interface CoreSelectProps extends GenericProps {
1911
1914
  label?: string;
1912
1915
  /** Placeholder input text. */
1913
1916
  placeholder?: string;
1914
- /** Theme adapting the component to light or dark background. */
1915
- theme?: Theme;
1916
1917
  /** Select variant. */
1917
1918
  variant?: SelectVariant;
1918
1919
  /** On clear callback. */
@@ -1962,11 +1963,9 @@ export declare const SelectMultiple: Comp<SelectMultipleProps, HTMLDivElement>;
1962
1963
  /**
1963
1964
  * Defines the props of the component.
1964
1965
  */
1965
- export interface SideNavigationProps extends GenericProps {
1966
+ export interface SideNavigationProps extends GenericProps, HasTheme {
1966
1967
  /** SideNavigationItem elements. */
1967
1968
  children: ReactNode;
1968
- /** Theme adapting the component to light or dark background. */
1969
- theme?: Theme;
1970
1969
  }
1971
1970
  /**
1972
1971
  * SideNavigation component.
@@ -2019,11 +2018,9 @@ export declare const SideNavigationItem: Comp<SideNavigationItemProps, HTMLLIEle
2019
2018
  /**
2020
2019
  * Defines the props of the component.
2021
2020
  */
2022
- export interface SkeletonCircleProps extends GenericProps {
2021
+ export interface SkeletonCircleProps extends GenericProps, HasTheme {
2023
2022
  /** Size variant. */
2024
2023
  size: GlobalSize;
2025
- /** Theme. */
2026
- theme?: Theme;
2027
2024
  /** The color of the skeleton. */
2028
2025
  color?: ColorPalette;
2029
2026
  }
@@ -2047,13 +2044,11 @@ export declare type SkeletonRectangleVariant = ValueOf<typeof SkeletonRectangleV
2047
2044
  /**
2048
2045
  * Defines the props of the component.
2049
2046
  */
2050
- export interface SkeletonRectangleProps extends GenericProps {
2047
+ export interface SkeletonRectangleProps extends GenericProps, HasTheme {
2051
2048
  /** Aspect ratio (use with width and not height). */
2052
2049
  aspectRatio?: Extract<AspectRatio, "square" | "horizontal" | "vertical" | "wide">;
2053
2050
  /** Height size. */
2054
2051
  height?: GlobalSize;
2055
- /** Theme adapting the component to light or dark background. */
2056
- theme?: Theme;
2057
2052
  /** Border variant. */
2058
2053
  variant?: SkeletonRectangleVariant;
2059
2054
  /** Width size. */
@@ -2072,9 +2067,7 @@ export declare const SkeletonRectangle: Comp<SkeletonRectangleProps, HTMLDivElem
2072
2067
  /**
2073
2068
  * Defines the props of the component.
2074
2069
  */
2075
- export interface SkeletonTypographyProps extends GenericProps {
2076
- /** Theme adapting the component to light or dark background. */
2077
- theme?: Theme;
2070
+ export interface SkeletonTypographyProps extends GenericProps, HasTheme {
2078
2071
  /** Typography variant. */
2079
2072
  typography: TypographyInterface;
2080
2073
  /** Width CSS property. */
@@ -2093,7 +2086,7 @@ export declare const SkeletonTypography: Comp<SkeletonTypographyProps, HTMLDivEl
2093
2086
  /**
2094
2087
  * Defines the props of the component.
2095
2088
  */
2096
- export interface SliderProps extends GenericProps {
2089
+ export interface SliderProps extends GenericProps, HasTheme {
2097
2090
  /** Helper text. */
2098
2091
  helper?: string;
2099
2092
  /** Whether the min and max labels should be hidden or not. */
@@ -2112,8 +2105,6 @@ export interface SliderProps extends GenericProps {
2112
2105
  precision?: number;
2113
2106
  /** Range step value. */
2114
2107
  steps?: number;
2115
- /** Theme adapting the component to light or dark background. */
2116
- theme?: Theme;
2117
2108
  /** Selected ranged value. */
2118
2109
  value: number;
2119
2110
  /** On change callback. */
@@ -2239,7 +2230,7 @@ export interface UseSlideshowControls {
2239
2230
  /**
2240
2231
  * Defines the props of the component.
2241
2232
  */
2242
- export interface SlideshowControlsProps extends GenericProps {
2233
+ export interface SlideshowControlsProps extends GenericProps, HasTheme {
2243
2234
  /** Index of the current slide. */
2244
2235
  activeIndex?: number;
2245
2236
  /** Props to pass to the next button (minus those already set by the SlideshowControls props). */
@@ -2250,8 +2241,6 @@ export interface SlideshowControlsProps extends GenericProps {
2250
2241
  previousButtonProps: Pick<IconButtonProps, "label"> & Omit<IconButtonProps, "label" | "onClick" | "icon" | "emphasis" | "color">;
2251
2242
  /** Number of slides. */
2252
2243
  slidesCount: number;
2253
- /** Theme adapting the component to light or dark background. */
2254
- theme?: Theme;
2255
2244
  /** On next button click callback. */
2256
2245
  onNextClick?(loopback?: boolean): void;
2257
2246
  /** On pagination change callback. */
@@ -2269,15 +2258,11 @@ export declare const SlideshowControls: Comp<SlideshowControlsProps, HTMLDivElem
2269
2258
  useSlideshowControls: ({ activeIndex, groupBy, interval, autoPlay, defaultActiveIndex, onChange, itemsCount, id, slidesId, }: import("../../hooks/useSlideshowControls").UseSlideshowControlsOptions) => import("../../hooks/useSlideshowControls").UseSlideshowControls;
2270
2259
  useSlideshowControlsDefaultOptions: Partial<import("../../hooks/useSlideshowControls").UseSlideshowControlsOptions>;
2271
2260
  };
2272
- export interface SlidesProps extends GenericProps {
2261
+ export interface SlidesProps extends GenericProps, HasTheme {
2273
2262
  /** current slide active */
2274
2263
  activeIndex: number;
2275
2264
  /** slides id to be added to the wrapper */
2276
2265
  id?: string;
2277
- /** custom classname */
2278
- className?: string;
2279
- /** custom theme */
2280
- theme?: Theme;
2281
2266
  /** Whether the automatic rotation of the slideshow is enabled or not. */
2282
2267
  autoPlay?: boolean;
2283
2268
  /** Whether the image has to fill its container height or not. */
@@ -2304,7 +2289,7 @@ export declare const Slides: Comp<SlidesProps, HTMLDivElement>;
2304
2289
  /**
2305
2290
  * Defines the props of the component.
2306
2291
  */
2307
- export interface SwitchProps extends GenericProps {
2292
+ export interface SwitchProps extends GenericProps, HasTheme {
2308
2293
  /** Helper text. */
2309
2294
  helper?: string;
2310
2295
  /** Whether it is checked or not. */
@@ -2315,8 +2300,6 @@ export interface SwitchProps extends GenericProps {
2315
2300
  name?: string;
2316
2301
  /** Position of the switch relative to the label. */
2317
2302
  position?: Extract<Alignment, "right" | "left">;
2318
- /** Theme adapting the component to light or dark background. */
2319
- theme?: Theme;
2320
2303
  /** Native input value property. */
2321
2304
  value?: string;
2322
2305
  /** On change callback. */
@@ -2335,13 +2318,11 @@ export declare const Switch: Comp<SwitchProps, HTMLDivElement>;
2335
2318
  /**
2336
2319
  * Defines the props of the component.
2337
2320
  */
2338
- export interface TableProps extends GenericProps {
2321
+ export interface TableProps extends GenericProps, HasTheme {
2339
2322
  /** Whether the table has checkbox or thumbnail on first cell or not. */
2340
2323
  hasBefore?: boolean;
2341
2324
  /** Whether the table has dividers or not. */
2342
2325
  hasDividers?: boolean;
2343
- /** Theme adapting the component to light or dark background. */
2344
- theme?: Theme;
2345
2326
  }
2346
2327
  /**
2347
2328
  * Table component.
@@ -2462,7 +2443,7 @@ export declare enum TabListLayout {
2462
2443
  /**
2463
2444
  * Defines the props of the component.
2464
2445
  */
2465
- export interface TabListProps extends GenericProps {
2446
+ export interface TabListProps extends GenericProps, HasTheme {
2466
2447
  /** ARIA label (purpose of the set of tabs). */
2467
2448
  ["aria-label"]: string;
2468
2449
  /** Tab list. */
@@ -2471,8 +2452,6 @@ export interface TabListProps extends GenericProps {
2471
2452
  layout?: TabListLayout;
2472
2453
  /** Position of the tabs in the list (requires 'clustered' layout). */
2473
2454
  position?: Alignment;
2474
- /** Theme adapting the component to light or dark background. */
2475
- theme?: Theme;
2476
2455
  }
2477
2456
  /**
2478
2457
  * TabList component.
@@ -2533,7 +2512,7 @@ export declare const TabPanel: Comp<TabPanelProps, HTMLDivElement>;
2533
2512
  /**
2534
2513
  * Defines the props of the component.
2535
2514
  */
2536
- export interface TextFieldProps extends GenericProps {
2515
+ export interface TextFieldProps extends GenericProps, HasTheme {
2537
2516
  /** Chip Group to be rendered before the main text input. */
2538
2517
  chips?: HTMLElement | ReactNode;
2539
2518
  /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
@@ -2553,7 +2532,7 @@ export interface TextFieldProps extends GenericProps {
2553
2532
  /** Native input id property (generated if not provided to link the label element). */
2554
2533
  id?: string;
2555
2534
  /** Reference to the <input> or <textarea> element. */
2556
- inputRef?: RefObject<HTMLInputElement> | RefObject<HTMLTextAreaElement>;
2535
+ inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
2557
2536
  /** Whether the component is disabled or not. */
2558
2537
  isDisabled?: boolean;
2559
2538
  /** Whether the component is required or not. */
@@ -2573,9 +2552,7 @@ export interface TextFieldProps extends GenericProps {
2573
2552
  /** Placeholder text. */
2574
2553
  placeholder?: string;
2575
2554
  /** Reference to the wrapper. */
2576
- textFieldRef?: RefObject<HTMLDivElement>;
2577
- /** Theme adapting the component to light or dark background. */
2578
- theme?: Theme;
2555
+ textFieldRef?: Ref<HTMLDivElement>;
2579
2556
  /** Value. */
2580
2557
  value?: string;
2581
2558
  /** On blur callback. */
@@ -2654,7 +2631,7 @@ export declare type UploaderSize = Extract<Size, "xl" | "xxl">;
2654
2631
  /**
2655
2632
  * Defines the props of the component.
2656
2633
  */
2657
- export interface UploaderProps extends GenericProps {
2634
+ export interface UploaderProps extends GenericProps, HasTheme {
2658
2635
  /** Image aspect ratio. */
2659
2636
  aspectRatio?: AspectRatio;
2660
2637
  /** Icon (SVG path). */
@@ -2663,8 +2640,6 @@ export interface UploaderProps extends GenericProps {
2663
2640
  label?: string;
2664
2641
  /** Size variant. */
2665
2642
  size?: UploaderSize;
2666
- /** Theme adapting the component to light or dark background. */
2667
- theme?: Theme;
2668
2643
  /** Variant. */
2669
2644
  variant?: UploaderVariant;
2670
2645
  /** On click callback. */
@@ -2685,7 +2660,7 @@ export declare type UserBlockSize = Extract<Size, "s" | "m" | "l">;
2685
2660
  /**
2686
2661
  * Defines the props of the component.
2687
2662
  */
2688
- export interface UserBlockProps extends GenericProps {
2663
+ export interface UserBlockProps extends GenericProps, HasTheme {
2689
2664
  /** Props to pass to the avatar. */
2690
2665
  avatarProps?: Omit<AvatarProps, "alt">;
2691
2666
  /** Additional fields used to describe the user. */
@@ -2706,8 +2681,6 @@ export interface UserBlockProps extends GenericProps {
2706
2681
  simpleAction?: ReactNode;
2707
2682
  /** Size variant. */
2708
2683
  size?: UserBlockSize;
2709
- /** Theme adapting the component to light or dark background. */
2710
- theme?: Theme;
2711
2684
  /** On click callback. */
2712
2685
  onClick?(): void;
2713
2686
  /** On mouse enter callback. */