@lumx/react 3.3.1-alpha.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/_internal/ClickAwayProvider.js.map +1 -1
  2. package/_internal/types.d.ts +0 -2
  3. package/index.d.ts +2 -0
  4. package/index.js +347 -75
  5. package/index.js.map +1 -1
  6. package/package.json +23 -19
  7. package/src/components/autocomplete/Autocomplete.test.tsx +55 -142
  8. package/src/components/autocomplete/AutocompleteMultiple.test.tsx +37 -75
  9. package/src/components/autocomplete/__mockData__/index.ts +6 -1
  10. package/src/components/badge/Badge.test.tsx +20 -64
  11. package/src/components/button/Button.test.tsx +44 -121
  12. package/src/components/button/ButtonGroup.test.tsx +16 -39
  13. package/src/components/button/IconButton.stories.tsx +7 -0
  14. package/src/components/button/IconButton.test.tsx +37 -78
  15. package/src/components/button/IconButton.tsx +8 -1
  16. package/src/components/checkbox/Checkbox.test.tsx +62 -67
  17. package/src/components/chip/Chip.test.tsx +89 -139
  18. package/src/components/chip/ChipGroup.test.tsx +27 -10
  19. package/src/components/date-picker/DatePicker.test.tsx +15 -23
  20. package/src/components/date-picker/DatePickerControlled.test.tsx +24 -20
  21. package/src/components/date-picker/DatePickerField.test.tsx +43 -27
  22. package/src/components/dialog/Dialog.test.tsx +36 -35
  23. package/src/components/divider/Divider.test.tsx +23 -69
  24. package/src/components/dropdown/Dropdown.test.tsx +30 -61
  25. package/src/components/expansion-panel/ExpansionPanel.test.tsx +12 -8
  26. package/src/components/flag/Flag.test.tsx +28 -53
  27. package/src/components/generic-block/GenericBlock.test.tsx +93 -89
  28. package/src/components/grid-column/GridColumn.stories.tsx +3 -3
  29. package/src/components/icon/Icon.test.tsx +80 -64
  30. package/src/components/index.ts +0 -2
  31. package/src/components/inline-list/InlineList.test.tsx +30 -17
  32. package/src/components/input-helper/InputHelper.test.tsx +21 -81
  33. package/src/components/input-label/InputLabel.test.tsx +19 -61
  34. package/src/components/lightbox/Lightbox.test.tsx +3 -2
  35. package/src/components/link/Link.test.tsx +47 -31
  36. package/src/components/link-preview/LinkPreview.test.tsx +51 -51
  37. package/src/components/message/Message.test.tsx +31 -52
  38. package/src/components/mosaic/Mosaic.test.tsx +56 -72
  39. package/src/components/notification/Notification.test.tsx +51 -82
  40. package/src/components/popover/Popover.tsx +7 -9
  41. package/src/components/progress-tracker/ProgressTracker.test.tsx +20 -33
  42. package/src/components/progress-tracker/ProgressTrackerProvider.test.tsx +61 -36
  43. package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +19 -109
  44. package/src/components/progress-tracker/ProgressTrackerStepPanel.test.tsx +21 -58
  45. package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +1 -1
  46. package/src/components/radio-button/RadioButton.test.tsx +78 -92
  47. package/src/components/radio-button/RadioGroup.test.tsx +13 -59
  48. package/src/components/select/Select.test.tsx +115 -284
  49. package/src/components/select/SelectMultiple.stories.tsx +105 -2
  50. package/src/components/select/SelectMultiple.test.tsx +126 -322
  51. package/src/components/select/WithSelectContext.tsx +10 -4
  52. package/src/components/side-navigation/SideNavigation.test.tsx +22 -35
  53. package/src/components/side-navigation/SideNavigationItem.test.tsx +72 -139
  54. package/src/components/switch/Switch.test.tsx +70 -149
  55. package/src/components/table/Table.test.tsx +2 -0
  56. package/src/components/table/TableBody.test.tsx +18 -8
  57. package/src/components/table/TableCell.test.tsx +34 -9
  58. package/src/components/table/TableHeader.test.tsx +18 -8
  59. package/src/components/table/TableRow.test.tsx +28 -8
  60. package/src/components/tabs/Tab.test.tsx +27 -96
  61. package/src/components/tabs/TabList.test.tsx +21 -56
  62. package/src/components/tabs/TabPanel.test.tsx +20 -55
  63. package/src/components/tabs/TabPanel.tsx +1 -1
  64. package/src/components/tabs/TabProvider.test.tsx +158 -37
  65. package/src/components/tabs/test-utils.ts +39 -0
  66. package/src/components/text-field/TextField.stories.tsx +14 -5
  67. package/src/components/text-field/TextField.test.tsx +54 -8
  68. package/src/components/text-field/TextField.tsx +49 -5
  69. package/src/components/tooltip/Tooltip.test.tsx +134 -75
  70. package/src/components/tooltip/useInjectTooltipRef.tsx +9 -2
  71. package/src/components/uploader/Uploader.test.tsx +60 -48
  72. package/src/components/user-block/UserBlock.test.tsx +69 -13
  73. package/src/hooks/useFocusTrap.ts +2 -2
  74. package/src/testing/utils/commonTestsSuiteRTL.ts +18 -8
  75. package/src/testing/utils/index.ts +0 -1
  76. package/src/utils/flattenChildren.ts +5 -0
  77. package/src/components/autocomplete/__snapshots__/Autocomplete.test.tsx.snap +0 -213
  78. package/src/components/autocomplete/__snapshots__/AutocompleteMultiple.test.tsx.snap +0 -88
  79. package/src/components/badge/__snapshots__/Badge.test.tsx.snap +0 -11
  80. package/src/components/button/ButtonRoot.test.tsx +0 -203
  81. package/src/components/button/__snapshots__/Button.test.tsx.snap +0 -96
  82. package/src/components/button/__snapshots__/ButtonGroup.test.tsx.snap +0 -22
  83. package/src/components/button/__snapshots__/ButtonRoot.test.tsx.snap +0 -160
  84. package/src/components/button/__snapshots__/IconButton.test.tsx.snap +0 -83
  85. package/src/components/checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -141
  86. package/src/components/chip/__snapshots__/Chip.test.tsx.snap +0 -12
  87. package/src/components/chip/__snapshots__/ChipGroup.test.tsx.snap +0 -29
  88. package/src/components/date-picker/__snapshots__/DatePicker.test.tsx.snap +0 -22
  89. package/src/components/date-picker/__snapshots__/DatePickerControlled.test.tsx.snap +0 -597
  90. package/src/components/date-picker/__snapshots__/DatePickerField.test.tsx.snap +0 -43
  91. package/src/components/divider/__snapshots__/Divider.test.tsx.snap +0 -9
  92. package/src/components/dropdown/__snapshots__/Dropdown.test.tsx.snap +0 -35
  93. package/src/components/icon/__snapshots__/Icon.test.tsx.snap +0 -49
  94. package/src/components/input-helper/__snapshots__/InputHelper.test.tsx.snap +0 -9
  95. package/src/components/input-label/__snapshots__/InputLabel.test.tsx.snap +0 -10
  96. package/src/components/link/__snapshots__/Link.test.tsx.snap +0 -29
  97. package/src/components/message/__snapshots__/Message.test.tsx.snap +0 -15
  98. package/src/components/notification/__snapshots__/Notification.test.tsx.snap +0 -34
  99. package/src/components/progress-tracker/__snapshots__/ProgressTracker.test.tsx.snap +0 -41
  100. package/src/components/progress-tracker/__snapshots__/ProgressTrackerStep.test.tsx.snap +0 -141
  101. package/src/components/progress-tracker/__snapshots__/ProgressTrackerStepPanel.test.tsx.snap +0 -25
  102. package/src/components/radio-button/__snapshots__/RadioButton.test.tsx.snap +0 -113
  103. package/src/components/radio-button/__snapshots__/RadioGroup.test.tsx.snap +0 -26
  104. package/src/components/select/__snapshots__/Select.test.tsx.snap +0 -43
  105. package/src/components/select/__snapshots__/SelectMultiple.test.tsx.snap +0 -87
  106. package/src/components/side-navigation/__snapshots__/SideNavigation.test.tsx.snap +0 -7
  107. package/src/components/side-navigation/__snapshots__/SideNavigationItem.test.tsx.snap +0 -30
  108. package/src/components/switch/__snapshots__/Switch.test.tsx.snap +0 -179
  109. package/src/components/tabs/__snapshots__/Tab.test.tsx.snap +0 -62
  110. package/src/components/tabs/__snapshots__/TabList.test.tsx.snap +0 -22
  111. package/src/components/tabs/__snapshots__/TabPanel.test.tsx.snap +0 -25
  112. package/src/components/tabs/test.mocks.ts +0 -33
  113. package/src/components/text-field/__snapshots__/TextField.test.tsx.snap +0 -42
  114. package/src/components/tooltip/__snapshots__/Tooltip.test.tsx.snap +0 -233
  115. package/src/components/uploader/__snapshots__/Uploader.test.tsx.snap +0 -14
  116. package/src/testing/utils/commonTestsSuite.ts +0 -71
  117. package/src/utils/flattenChildren.test.tsx +0 -58
package/index.js CHANGED
@@ -24,6 +24,7 @@ import isObject from 'lodash/isObject';
24
24
  import take from 'lodash/take';
25
25
  import uniqueId from 'lodash/uniqueId';
26
26
  import chunk from 'lodash/chunk';
27
+ import isUndefined from 'lodash/isUndefined';
27
28
  import set from 'lodash/set';
28
29
 
29
30
  function ownKeys(object, enumerableOnly) {
@@ -48,6 +49,7 @@ function _objectSpread2(target) {
48
49
  return target;
49
50
  }
50
51
  function _defineProperty(obj, key, value) {
52
+ key = _toPropertyKey(key);
51
53
  if (key in obj) {
52
54
  Object.defineProperty(obj, key, {
53
55
  value: value,
@@ -101,6 +103,20 @@ function _objectWithoutProperties(source, excluded) {
101
103
  }
102
104
  return target;
103
105
  }
106
+ function _toPrimitive(input, hint) {
107
+ if (typeof input !== "object" || input === null) return input;
108
+ var prim = input[Symbol.toPrimitive];
109
+ if (prim !== undefined) {
110
+ var res = prim.call(input, hint || "default");
111
+ if (typeof res !== "object") return res;
112
+ throw new TypeError("@@toPrimitive must return a primitive value.");
113
+ }
114
+ return (hint === "string" ? String : Number)(input);
115
+ }
116
+ function _toPropertyKey(arg) {
117
+ var key = _toPrimitive(arg, "string");
118
+ return typeof key === "symbol" ? key : String(key);
119
+ }
104
120
 
105
121
  /**
106
122
  * Alignments.
@@ -220,8 +236,6 @@ const Typography = _objectSpread2(_objectSpread2({}, TypographyInterface), {}, {
220
236
  const AspectRatio = {
221
237
  /** Intrinsic content ratio. */
222
238
  original: 'original',
223
- /** Ratio 3:1 */
224
- panoramic: 'panoramic',
225
239
  /** Ratio 16:9 */
226
240
  wide: 'wide',
227
241
  /** Ratio 3:2 */
@@ -243,6 +257,10 @@ const Kind = {
243
257
  error: 'error'
244
258
  };
245
259
 
260
+ /**
261
+ * Re-exporting some utils types.
262
+ */
263
+
246
264
  function createCommonjsModule(fn, basedir, module) {
247
265
  return module = {
248
266
  path: basedir,
@@ -1038,6 +1056,10 @@ const _excluded$4 = ["actions", "alt", "badge", "className", "image", "linkProps
1038
1056
  * Avatar sizes.
1039
1057
  */
1040
1058
 
1059
+ /**
1060
+ * Defines the props of the component.
1061
+ */
1062
+
1041
1063
  /**
1042
1064
  * Component display name.
1043
1065
  */
@@ -1159,6 +1181,8 @@ Badge.displayName = COMPONENT_NAME$4;
1159
1181
  Badge.className = CLASSNAME$4;
1160
1182
  Badge.defaultProps = DEFAULT_PROPS$4;
1161
1183
 
1184
+ /** Get types of the values of a record. */
1185
+
1162
1186
  /**
1163
1187
  * Properties of a component to use to determine it's name.
1164
1188
  * In the order of preference.
@@ -1167,6 +1191,18 @@ const NAME_PROPERTIES = ['type', 'type.displayName', 'displayName', 'name', 'typ
1167
1191
 
1168
1192
  /** LumX Component Type. */
1169
1193
 
1194
+ /** Union type of all heading elements */
1195
+
1196
+ /** Union type of all text elements */
1197
+
1198
+ /**
1199
+ * Define a generic props types.
1200
+ */
1201
+
1202
+ /**
1203
+ * Callback function type alias (use for readability)
1204
+ */
1205
+
1170
1206
  /**
1171
1207
  * Create a predicate function that checks if a ReactNode is a react element from the given component.
1172
1208
  *
@@ -1188,6 +1224,19 @@ const isComponentType = type => node => /*#__PURE__*/React.isValidElement(node)
1188
1224
  * (excluding `NaN` as it can't be distinguished from `number`)
1189
1225
  */
1190
1226
 
1227
+ /**
1228
+ * Require either `aria-label` or `arial-labelledby` prop.
1229
+ * If none are set, the order will prioritize `aria-labelledby` over `aria-label` as it
1230
+ * needs a visible element.
1231
+ */
1232
+
1233
+ /**
1234
+ * Extract ref type for a component or JSX intrinsic element
1235
+ *
1236
+ * @example ComponentRef<'div'> => React.Ref<HTMLDivElement>
1237
+ * @example ComponentRef<Button> => React.Ref<HTMLButtonElement
1238
+ */
1239
+
1191
1240
  const _excluded$6 = ["linkAs"];
1192
1241
  /**
1193
1242
  * Render link with default <a> HTML component or a custom one provided by `linkAs`.
@@ -1210,6 +1259,11 @@ const renderLink = function (_ref) {
1210
1259
  };
1211
1260
 
1212
1261
  const _excluded$7 = ["aria-label", "children", "className", "color", "disabled", "emphasis", "hasBackground", "href", "isDisabled", "isSelected", "isActive", "isFocused", "isHovered", "linkAs", "name", "size", "target", "theme", "variant", "type", "fullWidth"];
1262
+
1263
+ /**
1264
+ * Button size definition.
1265
+ */
1266
+
1213
1267
  /**
1214
1268
  * Component display name.
1215
1269
  */
@@ -1459,6 +1513,9 @@ const IconButton = /*#__PURE__*/forwardRef((props, ref) => {
1459
1513
  }, forwardedProps), {
1460
1514
  "aria-label": label,
1461
1515
  variant: "icon"
1516
+ // Remove the aria-describedby added by the tooltip when it is the same text as the aria-label
1517
+ ,
1518
+ "aria-describedby": (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.label) && (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.label) === label && undefined
1462
1519
  }), image ? /*#__PURE__*/React.createElement("img", {
1463
1520
  // no need to set alt as an aria-label is already set on the button
1464
1521
  alt: "",
@@ -1639,6 +1696,10 @@ const _excluded$c = ["after", "before", "children", "className", "color", "disab
1639
1696
  * Chip sizes.
1640
1697
  */
1641
1698
 
1699
+ /**
1700
+ * Defines the props of the component.
1701
+ */
1702
+
1642
1703
  /**
1643
1704
  * Component display name.
1644
1705
  */
@@ -1852,6 +1913,11 @@ const CommentBlockVariant = {
1852
1913
  indented: 'indented',
1853
1914
  linear: 'linear'
1854
1915
  };
1916
+
1917
+ /**
1918
+ * Defines the props of the component.
1919
+ */
1920
+
1855
1921
  /**
1856
1922
  * Component display name.
1857
1923
  */
@@ -2284,11 +2350,15 @@ function useFocusTrap(focusZoneElement, focusElement) {
2284
2350
  // SETUP:
2285
2351
  if (focusElement && focusZoneElement.contains(focusElement)) {
2286
2352
  // Focus the given element.
2287
- focusElement.focus();
2353
+ focusElement.focus({
2354
+ preventScroll: true
2355
+ });
2288
2356
  } else {
2289
2357
  var _getFirstAndLastFocus;
2290
2358
  // Focus the first focusable element in the zone.
2291
- (_getFirstAndLastFocus = getFirstAndLastFocusable(focusZoneElement).first) === null || _getFirstAndLastFocus === void 0 ? void 0 : _getFirstAndLastFocus.focus();
2359
+ (_getFirstAndLastFocus = getFirstAndLastFocusable(focusZoneElement).first) === null || _getFirstAndLastFocus === void 0 ? void 0 : _getFirstAndLastFocus.focus({
2360
+ preventScroll: true
2361
+ });
2292
2362
  }
2293
2363
  FOCUS_TRAPS.register(focusTrap);
2294
2364
 
@@ -2298,6 +2368,11 @@ function useFocusTrap(focusZoneElement, focusElement) {
2298
2368
  }
2299
2369
 
2300
2370
  const _excluded$g = ["defaultMonth", "disabled", "isDisabled", "locale", "maxDate", "minDate", "name", "nextButtonProps", "onChange", "previousButtonProps", "value"];
2371
+
2372
+ /**
2373
+ * Defines the props of the component.
2374
+ */
2375
+
2301
2376
  /**
2302
2377
  * Component display name.
2303
2378
  */
@@ -3170,6 +3245,11 @@ const useKeyboardListNavigation = function (items, ref, onListItemSelected, onLi
3170
3245
  };
3171
3246
 
3172
3247
  const _excluded$k = ["after", "before", "children", "className", "isHighlighted", "isSelected", "isDisabled", "linkAs", "linkProps", "linkRef", "onItemSelected", "size"];
3248
+
3249
+ /**
3250
+ * Defines the props of the component.
3251
+ */
3252
+
3173
3253
  /**
3174
3254
  * Component display name.
3175
3255
  */
@@ -3273,7 +3353,8 @@ ListItem.displayName = COMPONENT_NAME$j;
3273
3353
  ListItem.className = CLASSNAME$g;
3274
3354
  ListItem.defaultProps = DEFAULT_PROPS$e;
3275
3355
 
3276
- /** @license React v16.13.1
3356
+ /**
3357
+ * @license React
3277
3358
  * react-is.production.min.js
3278
3359
  *
3279
3360
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -3281,16 +3362,13 @@ ListItem.defaultProps = DEFAULT_PROPS$e;
3281
3362
  * This source code is licensed under the MIT license found in the
3282
3363
  * LICENSE file in the root directory of this source tree.
3283
3364
  */
3284
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
3285
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
3286
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}var AsyncMode=l;var ConcurrentMode=m;var ContextConsumer=k;var ContextProvider=h;var Element$1=c;var ForwardRef=n;var Fragment=e;var Lazy=t;var Memo=r;var Portal=d;
3287
- var Profiler=g;var StrictMode=f;var Suspense=p;var isAsyncMode=function(a){return A(a)||z(a)===l};var isConcurrentMode=A;var isContextConsumer=function(a){return z(a)===k};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};var isForwardRef=function(a){return z(a)===n};var isFragment=function(a){return z(a)===e};var isLazy=function(a){return z(a)===t};
3288
- var isMemo=function(a){return z(a)===r};var isPortal=function(a){return z(a)===d};var isProfiler=function(a){return z(a)===g};var isStrictMode=function(a){return z(a)===f};var isSuspense=function(a){return z(a)===p};
3289
- var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
3365
+ var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
3366
+ function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}var ContextConsumer=h;var ContextProvider=g;var Element$1=b;var ForwardRef=l;var Fragment=d;var Lazy=q;var Memo=p;var Portal=c;var Profiler=f;var StrictMode=e;var Suspense=m;
3367
+ var SuspenseList=n;var isAsyncMode=function(){return !1};var isConcurrentMode=function(){return !1};var isContextConsumer=function(a){return v(a)===h};var isContextProvider=function(a){return v(a)===g};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};var isForwardRef=function(a){return v(a)===l};var isFragment=function(a){return v(a)===d};var isLazy=function(a){return v(a)===q};var isMemo=function(a){return v(a)===p};
3368
+ var isPortal=function(a){return v(a)===c};var isProfiler=function(a){return v(a)===f};var isStrictMode=function(a){return v(a)===e};var isSuspense=function(a){return v(a)===m};var isSuspenseList=function(a){return v(a)===n};
3369
+ var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};var typeOf=v;
3290
3370
 
3291
3371
  var reactIs_production_min = {
3292
- AsyncMode: AsyncMode,
3293
- ConcurrentMode: ConcurrentMode,
3294
3372
  ContextConsumer: ContextConsumer,
3295
3373
  ContextProvider: ContextProvider,
3296
3374
  Element: Element$1,
@@ -3302,6 +3380,7 @@ var reactIs_production_min = {
3302
3380
  Profiler: Profiler,
3303
3381
  StrictMode: StrictMode,
3304
3382
  Suspense: Suspense,
3383
+ SuspenseList: SuspenseList,
3305
3384
  isAsyncMode: isAsyncMode,
3306
3385
  isConcurrentMode: isConcurrentMode,
3307
3386
  isContextConsumer: isContextConsumer,
@@ -3315,44 +3394,74 @@ var reactIs_production_min = {
3315
3394
  isProfiler: isProfiler,
3316
3395
  isStrictMode: isStrictMode,
3317
3396
  isSuspense: isSuspense,
3397
+ isSuspenseList: isSuspenseList,
3318
3398
  isValidElementType: isValidElementType,
3319
3399
  typeOf: typeOf
3320
3400
  };
3321
3401
 
3322
3402
  var reactIs_development = createCommonjsModule(function (module, exports) {
3323
3403
 
3324
-
3325
-
3326
3404
  if (process.env.NODE_ENV !== "production") {
3327
3405
  (function() {
3328
3406
 
3329
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
3330
- // nor polyfill, then a plain number is used for performance.
3331
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
3332
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
3333
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
3334
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
3335
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
3336
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
3337
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
3338
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
3339
- // (unstable) APIs that have been removed. Can we remove the symbols?
3340
-
3341
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
3342
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
3343
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
3344
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
3345
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
3346
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
3347
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
3348
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
3349
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
3350
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
3351
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
3407
+ // ATTENTION
3408
+ // When adding new symbols to this file,
3409
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
3410
+ // The Symbol used to tag the ReactElement-like types.
3411
+ var REACT_ELEMENT_TYPE = Symbol.for('react.element');
3412
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
3413
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
3414
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
3415
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
3416
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
3417
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
3418
+ var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
3419
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
3420
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
3421
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
3422
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
3423
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
3424
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
3425
+
3426
+ // -----------------------------------------------------------------------------
3427
+
3428
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
3429
+ var enableCacheElement = false;
3430
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
3431
+
3432
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
3433
+ // stuff. Intended to enable React core members to more easily debug scheduling
3434
+ // issues in DEV builds.
3435
+
3436
+ var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
3437
+
3438
+ var REACT_MODULE_REFERENCE;
3439
+
3440
+ {
3441
+ REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
3442
+ }
3352
3443
 
3353
3444
  function isValidElementType(type) {
3354
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
3355
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
3445
+ if (typeof type === 'string' || typeof type === 'function') {
3446
+ return true;
3447
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
3448
+
3449
+
3450
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
3451
+ return true;
3452
+ }
3453
+
3454
+ if (typeof type === 'object' && type !== null) {
3455
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
3456
+ // types supported by any Flight configuration anywhere since
3457
+ // we don't know which Flight build this will end up being used
3458
+ // with.
3459
+ type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
3460
+ return true;
3461
+ }
3462
+ }
3463
+
3464
+ return false;
3356
3465
  }
3357
3466
 
3358
3467
  function typeOf(object) {
@@ -3364,18 +3473,18 @@ function typeOf(object) {
3364
3473
  var type = object.type;
3365
3474
 
3366
3475
  switch (type) {
3367
- case REACT_ASYNC_MODE_TYPE:
3368
- case REACT_CONCURRENT_MODE_TYPE:
3369
3476
  case REACT_FRAGMENT_TYPE:
3370
3477
  case REACT_PROFILER_TYPE:
3371
3478
  case REACT_STRICT_MODE_TYPE:
3372
3479
  case REACT_SUSPENSE_TYPE:
3480
+ case REACT_SUSPENSE_LIST_TYPE:
3373
3481
  return type;
3374
3482
 
3375
3483
  default:
3376
3484
  var $$typeofType = type && type.$$typeof;
3377
3485
 
3378
3486
  switch ($$typeofType) {
3487
+ case REACT_SERVER_CONTEXT_TYPE:
3379
3488
  case REACT_CONTEXT_TYPE:
3380
3489
  case REACT_FORWARD_REF_TYPE:
3381
3490
  case REACT_LAZY_TYPE:
@@ -3395,10 +3504,7 @@ function typeOf(object) {
3395
3504
  }
3396
3505
 
3397
3506
  return undefined;
3398
- } // AsyncMode is deprecated along with isAsyncMode
3399
-
3400
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
3401
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
3507
+ }
3402
3508
  var ContextConsumer = REACT_CONTEXT_TYPE;
3403
3509
  var ContextProvider = REACT_PROVIDER_TYPE;
3404
3510
  var Element = REACT_ELEMENT_TYPE;
@@ -3410,21 +3516,31 @@ var Portal = REACT_PORTAL_TYPE;
3410
3516
  var Profiler = REACT_PROFILER_TYPE;
3411
3517
  var StrictMode = REACT_STRICT_MODE_TYPE;
3412
3518
  var Suspense = REACT_SUSPENSE_TYPE;
3413
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
3519
+ var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
3520
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
3521
+ var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
3414
3522
 
3415
3523
  function isAsyncMode(object) {
3416
3524
  {
3417
3525
  if (!hasWarnedAboutDeprecatedIsAsyncMode) {
3418
3526
  hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
3419
3527
 
3420
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
3528
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
3421
3529
  }
3422
3530
  }
3423
3531
 
3424
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
3532
+ return false;
3425
3533
  }
3426
3534
  function isConcurrentMode(object) {
3427
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
3535
+ {
3536
+ if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
3537
+ hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
3538
+
3539
+ console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
3540
+ }
3541
+ }
3542
+
3543
+ return false;
3428
3544
  }
3429
3545
  function isContextConsumer(object) {
3430
3546
  return typeOf(object) === REACT_CONTEXT_TYPE;
@@ -3459,9 +3575,10 @@ function isStrictMode(object) {
3459
3575
  function isSuspense(object) {
3460
3576
  return typeOf(object) === REACT_SUSPENSE_TYPE;
3461
3577
  }
3578
+ function isSuspenseList(object) {
3579
+ return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
3580
+ }
3462
3581
 
3463
- exports.AsyncMode = AsyncMode;
3464
- exports.ConcurrentMode = ConcurrentMode;
3465
3582
  exports.ContextConsumer = ContextConsumer;
3466
3583
  exports.ContextProvider = ContextProvider;
3467
3584
  exports.Element = Element;
@@ -3473,6 +3590,7 @@ exports.Portal = Portal;
3473
3590
  exports.Profiler = Profiler;
3474
3591
  exports.StrictMode = StrictMode;
3475
3592
  exports.Suspense = Suspense;
3593
+ exports.SuspenseList = SuspenseList;
3476
3594
  exports.isAsyncMode = isAsyncMode;
3477
3595
  exports.isConcurrentMode = isConcurrentMode;
3478
3596
  exports.isContextConsumer = isContextConsumer;
@@ -3486,6 +3604,7 @@ exports.isPortal = isPortal;
3486
3604
  exports.isProfiler = isProfiler;
3487
3605
  exports.isStrictMode = isStrictMode;
3488
3606
  exports.isSuspense = isSuspense;
3607
+ exports.isSuspenseList = isSuspenseList;
3489
3608
  exports.isValidElementType = isValidElementType;
3490
3609
  exports.typeOf = typeOf;
3491
3610
  })();
@@ -3507,6 +3626,11 @@ if (process.env.NODE_ENV === 'production') {
3507
3626
  *
3508
3627
  * @param children React nodes to flatten.
3509
3628
  * @return Flattened react nodes.
3629
+ * @deprecated This function was used to develop keyboard navigation in the List component,
3630
+ * but we will replace this with a better method that does not require to hack the children inspection
3631
+ *
3632
+ * TODO: remove List keyboard navigation once we have provided alternative component (Menu, Combobox, etc.),
3633
+ * remove this function and then remove react-is from the dependencies
3510
3634
  */
3511
3635
  function flattenChildren(children) {
3512
3636
  function recur(nodes) {
@@ -5893,6 +6017,15 @@ const Placement = {
5893
6017
  LEFT_END: 'left-end',
5894
6018
  LEFT_START: 'left-start'
5895
6019
  };
6020
+
6021
+ /**
6022
+ * Offset of the popover.
6023
+ */
6024
+
6025
+ /**
6026
+ * Popover elevation index.
6027
+ */
6028
+
5896
6029
  /**
5897
6030
  * Popover fit anchor width options.
5898
6031
  */
@@ -6200,18 +6333,19 @@ const _InnerPopover = /*#__PURE__*/forwardRef((props, ref) => {
6200
6333
  * unless specifically requested not to.
6201
6334
  */
6202
6335
  if (isFocusedWithin.current && focusAnchorOnClose) {
6203
- if (parentElement !== null && parentElement !== void 0 && parentElement.current) {
6204
- parentElement === null || parentElement === void 0 ? void 0 : parentElement.current.focus();
6205
- }
6206
- const firstFocusable = (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && getFirstAndLastFocusable(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current).first;
6207
- if (firstFocusable) {
6336
+ var _elementToFocus;
6337
+ let elementToFocus = parentElement === null || parentElement === void 0 ? void 0 : parentElement.current;
6338
+ if (!elementToFocus && anchorRef !== null && anchorRef !== void 0 && anchorRef.current) {
6208
6339
  // Focus the first focusable element in anchor.
6209
- firstFocusable.focus();
6210
- } else {
6211
- var _anchorRef$current;
6340
+ elementToFocus = getFirstAndLastFocusable(anchorRef.current).first;
6341
+ }
6342
+ if (!elementToFocus) {
6212
6343
  // Fallback on the anchor element.
6213
- anchorRef === null || anchorRef === void 0 ? void 0 : (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.focus();
6344
+ elementToFocus = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current;
6214
6345
  }
6346
+ (_elementToFocus = elementToFocus) === null || _elementToFocus === void 0 ? void 0 : _elementToFocus.focus({
6347
+ preventScroll: true
6348
+ });
6215
6349
  }
6216
6350
  onClose();
6217
6351
  }, [anchorRef, focusAnchorOnClose, onClose, parentElement]);
@@ -6567,6 +6701,11 @@ Flag.className = CLASSNAME$l;
6567
6701
  Flag.defaultProps = DEFAULT_PROPS$j;
6568
6702
 
6569
6703
  const _excluded$q = ["as", "children", "className", "fillSpace", "gap", "hAlign", "marginAuto", "noShrink", "orientation", "vAlign", "wrap"];
6704
+
6705
+ /**
6706
+ * Defines the props of the component.
6707
+ */
6708
+
6570
6709
  /**
6571
6710
  * Component display name.
6572
6711
  */
@@ -6895,6 +7034,11 @@ const HeadingLevelProvider = _ref => {
6895
7034
  };
6896
7035
 
6897
7036
  const _excluded$u = ["children", "className", "gutter", "hAlign", "orientation", "vAlign", "wrap"];
7037
+
7038
+ /**
7039
+ * Defines the props of the component.
7040
+ */
7041
+
6898
7042
  /**
6899
7043
  * Component display name.
6900
7044
  */
@@ -6951,6 +7095,11 @@ Grid.className = CLASSNAME$q;
6951
7095
  Grid.defaultProps = DEFAULT_PROPS$n;
6952
7096
 
6953
7097
  const _excluded$v = ["children", "className", "width", "align", "order"];
7098
+
7099
+ /**
7100
+ * Defines the props of the component.
7101
+ */
7102
+
6954
7103
  /**
6955
7104
  * Component display name.
6956
7105
  */
@@ -6992,6 +7141,11 @@ GridItem.displayName = COMPONENT_NAME$u;
6992
7141
  GridItem.className = CLASSNAME$r;
6993
7142
 
6994
7143
  const _excluded$w = ["as", "gap", "maxColumns", "itemMinWidth", "children", "className", "style"];
7144
+
7145
+ /**
7146
+ * Defines the props of the component.
7147
+ */
7148
+
6995
7149
  /**
6996
7150
  * Component display name.
6997
7151
  */
@@ -7044,6 +7198,11 @@ GridColumn.className = CLASSNAME$s;
7044
7198
  GridColumn.defaultProps = DEFAULT_PROPS$o;
7045
7199
 
7046
7200
  const _excluded$x = ["className", "color", "colorVariant", "hasShape", "icon", "size", "theme", "alt"];
7201
+
7202
+ /**
7203
+ * Defines the props of the component.
7204
+ */
7205
+
7047
7206
  /**
7048
7207
  * Component display name.
7049
7208
  */
@@ -7141,6 +7300,15 @@ const ImageBlockCaptionPosition = {
7141
7300
  below: 'below',
7142
7301
  over: 'over'
7143
7302
  };
7303
+
7304
+ /**
7305
+ * Image block sizes.
7306
+ */
7307
+
7308
+ /**
7309
+ * Defines the props of the component.
7310
+ */
7311
+
7144
7312
  /**
7145
7313
  * Component display name.
7146
7314
  */
@@ -7538,6 +7706,11 @@ Lightbox.displayName = COMPONENT_NAME$B;
7538
7706
  Lightbox.className = CLASSNAME$y;
7539
7707
 
7540
7708
  const _excluded$D = ["children", "className", "color", "colorVariant", "disabled", "isDisabled", "href", "leftIcon", "linkAs", "rightIcon", "target", "typography"];
7709
+
7710
+ /**
7711
+ * Defines the props of the component.
7712
+ */
7713
+
7541
7714
  /**
7542
7715
  * Component display name.
7543
7716
  */
@@ -7993,6 +8166,13 @@ function forwardRefPolymorphic(render) {
7993
8166
  }
7994
8167
 
7995
8168
  const _excluded$J = ["className", "icon", "label", "isCurrentPage", "as"];
8169
+
8170
+ /** Make `href` required when `as` is `a` */
8171
+
8172
+ /**
8173
+ * Navigation item props
8174
+ */
8175
+
7996
8176
  /**
7997
8177
  * Component display name.
7998
8178
  */
@@ -8509,6 +8689,10 @@ const _excluded$Q = ["className", "theme", "size"];
8509
8689
  * Progress sizes.
8510
8690
  */
8511
8691
 
8692
+ /**
8693
+ * Defines the props of the component.
8694
+ */
8695
+
8512
8696
  /**
8513
8697
  * Component display name.
8514
8698
  */
@@ -8578,6 +8762,11 @@ const ProgressVariant = {
8578
8762
  linear: 'linear',
8579
8763
  circular: 'circular'
8580
8764
  };
8765
+
8766
+ /**
8767
+ * Defines the props of the component.
8768
+ */
8769
+
8581
8770
  /**
8582
8771
  * Component display name.
8583
8772
  */
@@ -9113,7 +9302,7 @@ const ProgressTrackerStepPanel = /*#__PURE__*/forwardRef((props, ref) => {
9113
9302
  isActive
9114
9303
  })),
9115
9304
  role: "tabpanel",
9116
- tabIndex: 0,
9305
+ tabIndex: isActive ? 0 : -1,
9117
9306
  "aria-labelledby": state === null || state === void 0 ? void 0 : state.tabId
9118
9307
  }), (!(state !== null && state !== void 0 && state.isLazy) || isActive) && children);
9119
9308
  });
@@ -9293,7 +9482,7 @@ const SelectVariant = {
9293
9482
  chip: 'chip'
9294
9483
  };
9295
9484
 
9296
- const _excluded$Y = ["children", "className", "isMultiple", "closeOnClick", "disabled", "error", "hasError", "helper", "id", "isDisabled", "isEmpty", "isOpen", "isRequired", "isValid", "label", "onClear", "onDropdownClose", "onInfiniteScroll", "onInputClick", "placeholder", "theme", "value", "variant"];
9485
+ const _excluded$Y = ["children", "className", "focusElement", "isMultiple", "closeOnClick", "disabled", "error", "hasError", "helper", "id", "isDisabled", "isEmpty", "isOpen", "isRequired", "isValid", "label", "onClear", "onDropdownClose", "onInfiniteScroll", "onInputClick", "placeholder", "theme", "value", "variant"];
9297
9486
 
9298
9487
  /** The display name of the component. */
9299
9488
  const COMPONENT_NAME$W = 'Select';
@@ -9310,6 +9499,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
9310
9499
  let {
9311
9500
  children,
9312
9501
  className,
9502
+ focusElement,
9313
9503
  isMultiple,
9314
9504
  closeOnClick = !isMultiple,
9315
9505
  disabled,
@@ -9336,6 +9526,7 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
9336
9526
  const selectId = useMemo(() => id || `select-${uid()}`, [id]);
9337
9527
  const anchorRef = useRef(null);
9338
9528
  const selectRef = useRef(null);
9529
+ const dropdownRef = useRef(null);
9339
9530
  const isFocus = useListenFocus(anchorRef);
9340
9531
  const handleKeyboardNav = useCallback(evt => {
9341
9532
  if ((evt.key === 'Enter' || evt.key === ' ' || evt.key === 'ArrowDown') && onInputClick) {
@@ -9350,6 +9541,9 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
9350
9541
  }
9351
9542
  anchorRef === null || anchorRef === void 0 ? void 0 : (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.blur();
9352
9543
  };
9544
+
9545
+ // Handle focus trap.
9546
+ useFocusTrap(isOpen && dropdownRef.current, focusElement === null || focusElement === void 0 ? void 0 : focusElement.current);
9353
9547
  return /*#__PURE__*/React.createElement("div", {
9354
9548
  ref: mergeRefs(ref, selectRef),
9355
9549
  className: classnames(className, handleBasicClasses({
@@ -9390,7 +9584,8 @@ const WithSelectContext = (SelectElement, _ref, ref) => {
9390
9584
  isOpen: !!isOpen,
9391
9585
  placement: Placement.BOTTOM_START,
9392
9586
  onClose: onClose,
9393
- onInfiniteScroll: onInfiniteScroll
9587
+ onInfiniteScroll: onInfiniteScroll,
9588
+ ref: dropdownRef
9394
9589
  }, children), hasError && error && /*#__PURE__*/React.createElement(InputHelper, {
9395
9590
  className: `${CLASSNAME$T}__helper`,
9396
9591
  kind: Kind.error,
@@ -9844,6 +10039,11 @@ const SkeletonRectangleVariant = {
9844
10039
  rounded: 'rounded',
9845
10040
  pill: 'pill'
9846
10041
  };
10042
+
10043
+ /**
10044
+ * Defines the props of the component.
10045
+ */
10046
+
9847
10047
  const DEFAULT_PROPS$M = {
9848
10048
  theme: Theme.light,
9849
10049
  variant: SkeletonRectangleVariant.squared
@@ -11253,6 +11453,11 @@ const TableCellVariant = {
11253
11453
  body: 'body',
11254
11454
  head: 'head'
11255
11455
  };
11456
+
11457
+ /**
11458
+ * Defines the props of the component.
11459
+ */
11460
+
11256
11461
  /**
11257
11462
  * Component display name.
11258
11463
  */
@@ -11701,7 +11906,7 @@ const TabPanel = /*#__PURE__*/forwardRef((props, ref) => {
11701
11906
  isActive
11702
11907
  })),
11703
11908
  role: "tabpanel",
11704
- tabIndex: 0,
11909
+ tabIndex: isActive ? 0 : -1,
11705
11910
  "aria-labelledby": state === null || state === void 0 ? void 0 : state.tabId
11706
11911
  }), (!(state !== null && state !== void 0 && state.isLazy) || isActive) && children);
11707
11912
  });
@@ -11709,8 +11914,8 @@ TabPanel.displayName = COMPONENT_NAME$1f;
11709
11914
  TabPanel.className = CLASSNAME$1c;
11710
11915
  TabPanel.defaultProps = DEFAULT_PROPS$Z;
11711
11916
 
11712
- const _excluded$1k = ["id", "isDisabled", "isRequired", "placeholder", "multiline", "value", "setFocus", "onChange", "onFocus", "onBlur", "inputRef", "rows", "recomputeNumberOfRows", "type", "name"],
11713
- _excluded2$3 = ["chips", "className", "clearButtonProps", "disabled", "error", "forceFocusStyle", "hasError", "helper", "icon", "id", "inputRef", "isDisabled", "isRequired", "isValid", "label", "maxLength", "minimumRows", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "textFieldRef", "theme", "type", "value", "afterElement"];
11917
+ const _excluded$1k = ["id", "isDisabled", "isRequired", "placeholder", "multiline", "value", "setFocus", "onChange", "onFocus", "onBlur", "inputRef", "rows", "recomputeNumberOfRows", "type", "name", "hasError", "describedById"],
11918
+ _excluded2$3 = ["chips", "className", "clearButtonProps", "disabled", "error", "forceFocusStyle", "hasError", "helper", "icon", "id", "inputRef", "isDisabled", "isRequired", "isValid", "label", "maxLength", "minimumRows", "multiline", "name", "onBlur", "onChange", "onClear", "onFocus", "placeholder", "textFieldRef", "theme", "type", "value", "afterElement"];
11714
11919
 
11715
11920
  /**
11716
11921
  * Defines the props of the component.
@@ -11790,7 +11995,9 @@ const renderInputNative = props => {
11790
11995
  rows,
11791
11996
  recomputeNumberOfRows,
11792
11997
  type,
11793
- name
11998
+ name,
11999
+ hasError,
12000
+ describedById
11794
12001
  } = props,
11795
12002
  forwardedProps = _objectWithoutProperties(props, _excluded$1k);
11796
12003
  // eslint-disable-next-line react-hooks/rules-of-hooks
@@ -11826,6 +12033,8 @@ const renderInputNative = props => {
11826
12033
  onFocus: onTextFieldFocus,
11827
12034
  onBlur: onTextFieldBlur,
11828
12035
  onChange: handleChange,
12036
+ 'aria-invalid': hasError ? 'true' : undefined,
12037
+ 'aria-describedby': describedById,
11829
12038
  ref: mergeRefs(inputRef, ref)
11830
12039
  });
11831
12040
  if (multiline) {
@@ -11866,6 +12075,7 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11866
12075
  name,
11867
12076
  onBlur,
11868
12077
  onChange,
12078
+ onClear,
11869
12079
  onFocus,
11870
12080
  placeholder,
11871
12081
  textFieldRef,
@@ -11876,6 +12086,16 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11876
12086
  } = props,
11877
12087
  forwardedProps = _objectWithoutProperties(props, _excluded2$3);
11878
12088
  const textFieldId = useMemo(() => id || `text-field-${uid()}`, [id]);
12089
+ /**
12090
+ * Generate unique ids for both the helper and error texts, in order to
12091
+ * later on add them to the input native as aria-describedby. If both the error and the helper are present,
12092
+ * we want to first use the most important one, which is the errorId. That way, screen readers will read first
12093
+ * the error and then the helper
12094
+ */
12095
+ const helperId = helper ? `text-field-helper-${uid()}` : undefined;
12096
+ const errorId = error ? `text-field-error-${uid()}` : undefined;
12097
+ const describedByIds = [errorId, helperId].filter(Boolean);
12098
+ const describedById = describedByIds.length === 0 ? undefined : describedByIds.join(' ');
11879
12099
  const [isFocus, setFocus] = useState(false);
11880
12100
  const {
11881
12101
  rows,
@@ -11890,11 +12110,18 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11890
12110
  * and remove focus from the clear button.
11891
12111
  * @param evt On clear event.
11892
12112
  */
11893
- const onClear = evt => {
12113
+ const handleClear = evt => {
11894
12114
  evt.nativeEvent.preventDefault();
11895
12115
  evt.nativeEvent.stopPropagation();
11896
12116
  evt.currentTarget.blur();
11897
12117
  onChange('');
12118
+ if (onClear) {
12119
+ onClear(evt);
12120
+ }
12121
+ const inputElement = inputRef;
12122
+ if (inputElement && inputElement.current) {
12123
+ inputElement.current.focus();
12124
+ }
11898
12125
  };
11899
12126
  return /*#__PURE__*/React.createElement("div", {
11900
12127
  ref: ref,
@@ -11952,7 +12179,9 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11952
12179
  setFocus,
11953
12180
  type,
11954
12181
  value,
11955
- name
12182
+ name,
12183
+ hasError,
12184
+ describedById
11956
12185
  }, forwardedProps))), !chips && /*#__PURE__*/React.createElement("div", {
11957
12186
  className: `${CLASSNAME$1d}__input-wrapper`
11958
12187
  }, renderInputNative(_objectSpread2({
@@ -11971,7 +12200,9 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11971
12200
  setFocus,
11972
12201
  type,
11973
12202
  value,
11974
- name
12203
+ name,
12204
+ hasError,
12205
+ describedById
11975
12206
  }, forwardedProps))), (isValid || hasError) && /*#__PURE__*/React.createElement(Icon, {
11976
12207
  className: `${CLASSNAME$1d}__input-validity`,
11977
12208
  color: theme === Theme.dark ? 'light' : undefined,
@@ -11983,17 +12214,19 @@ const TextField = /*#__PURE__*/forwardRef((props, ref) => {
11983
12214
  emphasis: Emphasis.low,
11984
12215
  size: Size.s,
11985
12216
  theme: theme,
11986
- onClick: onClear,
12217
+ onClick: handleClear,
11987
12218
  type: "button"
11988
12219
  })), afterElement && /*#__PURE__*/React.createElement("div", {
11989
12220
  className: `${CLASSNAME$1d}__after-element`
11990
12221
  }, afterElement)), hasError && error && /*#__PURE__*/React.createElement(InputHelper, {
11991
12222
  className: `${CLASSNAME$1d}__helper`,
11992
12223
  kind: Kind.error,
11993
- theme: theme
12224
+ theme: theme,
12225
+ id: errorId
11994
12226
  }, error), helper && /*#__PURE__*/React.createElement(InputHelper, {
11995
12227
  className: `${CLASSNAME$1d}__helper`,
11996
- theme: theme
12228
+ theme: theme,
12229
+ id: helperId
11997
12230
  }, helper));
11998
12231
  });
11999
12232
  TextField.displayName = COMPONENT_NAME$1g;
@@ -12143,6 +12376,11 @@ const useFocusPointStyle = (_ref2, element, isLoaded) => {
12143
12376
  };
12144
12377
 
12145
12378
  const _excluded$1l = ["align", "alt", "aspectRatio", "badge", "className", "crossOrigin", "fallback", "fillHeight", "focusPoint", "image", "imgProps", "imgRef", "isLoading", "loading", "size", "theme", "variant", "linkProps", "linkAs"];
12379
+
12380
+ /**
12381
+ * Defines the props of the component.
12382
+ */
12383
+
12146
12384
  /**
12147
12385
  * Component display name.
12148
12386
  */
@@ -12271,6 +12509,16 @@ Thumbnail.displayName = COMPONENT_NAME$1h;
12271
12509
  Thumbnail.className = CLASSNAME$1e;
12272
12510
  Thumbnail.defaultProps = DEFAULT_PROPS$$;
12273
12511
 
12512
+ /**
12513
+ * Focal point using vertical alignment, horizontal alignment or coordinates (from -1 to 1).
12514
+ */
12515
+
12516
+ /**
12517
+ * Loading attribute is not yet supported in typescript, so we need
12518
+ * to add it in order to avoid a ts error.
12519
+ * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes
12520
+ */
12521
+
12274
12522
  /**
12275
12523
  * All available aspect ratios.
12276
12524
  * @deprecated
@@ -12359,8 +12607,10 @@ Toolbar.defaultProps = DEFAULT_PROPS$10;
12359
12607
  */
12360
12608
  const useInjectTooltipRef = (children, setAnchorElement, isOpen, id) => {
12361
12609
  return useMemo(() => {
12610
+ // Let the children remove the aria-describedby attribute by setting it to undefined
12611
+ const childrenHasAriaProp = get(children, 'props') ? 'aria-describedby' in get(children, 'props') && isUndefined(get(children, 'props.aria-describedby')) : false;
12362
12612
  const ariaProps = {
12363
- 'aria-describedby': isOpen ? id : undefined
12613
+ 'aria-describedby': isOpen && !childrenHasAriaProp ? id : undefined
12364
12614
  };
12365
12615
  if (children && get(children, '$$typeof') && get(children, 'props.disabled') !== true && get(children, 'props.isDisabled') !== true) {
12366
12616
  const element = children;
@@ -12482,6 +12732,10 @@ const _excluded$1n = ["label", "children", "className", "delay", "placement", "f
12482
12732
 
12483
12733
  /** Position of the tooltip relative to the anchor element. */
12484
12734
 
12735
+ /**
12736
+ * Defines the props of the component.
12737
+ */
12738
+
12485
12739
  /**
12486
12740
  * Component display name.
12487
12741
  */
@@ -12577,6 +12831,15 @@ const UploaderVariant = {
12577
12831
  rounded: 'rounded',
12578
12832
  circle: 'circle'
12579
12833
  };
12834
+
12835
+ /**
12836
+ * Uploader sizes.
12837
+ */
12838
+
12839
+ /**
12840
+ * Defines the props of the component.
12841
+ */
12842
+
12580
12843
  /**
12581
12844
  * Component display name.
12582
12845
  */
@@ -12645,6 +12908,15 @@ Uploader.className = CLASSNAME$1h;
12645
12908
  Uploader.defaultProps = DEFAULT_PROPS$12;
12646
12909
 
12647
12910
  const _excluded$1p = ["avatarProps", "className", "fields", "linkProps", "linkAs", "multipleActions", "name", "nameProps", "onClick", "onMouseEnter", "onMouseLeave", "orientation", "simpleAction", "size", "theme"];
12911
+
12912
+ /**
12913
+ * User block sizes.
12914
+ */
12915
+
12916
+ /**
12917
+ * Defines the props of the component.
12918
+ */
12919
+
12648
12920
  /**
12649
12921
  * Component display name.
12650
12922
  */