@moda/om 16.2.0 → 17.0.0

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 (120) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/index.cjs.js +349 -299
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.esm.js +348 -298
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/src/components/Expandable/Expandable.d.ts +1 -0
  7. package/dist/src/components/Select/Select.d.ts +1 -0
  8. package/dist/src/components/Select/SelectOption.d.ts +1 -0
  9. package/dist/src/components/Select/SelectOptions.d.ts +1 -0
  10. package/dist/styles.css +1 -1
  11. package/package.json +18 -8
  12. package/src/components/AspectRatioBox/AspectRatioBox.tsx +4 -4
  13. package/src/components/AspectRatioBox/index.ts +1 -1
  14. package/src/components/Badge/Badge.stories.tsx +5 -5
  15. package/src/components/Badge/Badge.test.tsx +1 -1
  16. package/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.tsx +6 -6
  17. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +6 -6
  18. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +2 -2
  19. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  20. package/src/components/Breakpoint/Breakpoint.stories.tsx +10 -9
  21. package/src/components/Breakpoint/Breakpoint.test.tsx +2 -2
  22. package/src/components/Breakpoint/generateMediaQuery.ts +5 -4
  23. package/src/components/Button/Button.stories.tsx +4 -4
  24. package/src/components/Checkbox/Checkbox.stories.tsx +5 -5
  25. package/src/components/Checkbox/Checkbox.test.tsx +3 -3
  26. package/src/components/Checkbox/Checkbox.tsx +4 -4
  27. package/src/components/Clickable/Clickable.stories.tsx +3 -3
  28. package/src/components/ColorSwatch/ColorSwatch.stories.tsx +11 -11
  29. package/src/components/ColorSwatch/ColorSwatch.test.tsx +1 -1
  30. package/src/components/ColorSwatch/ColorSwatch.tsx +1 -1
  31. package/src/components/Constrain/Constrain.stories.tsx +1 -1
  32. package/src/components/Constrain/ExceedConstrain.stories.tsx +2 -2
  33. package/src/components/ControlLink/ControlLink.stories.tsx +1 -1
  34. package/src/components/ControlLink/index.ts +1 -1
  35. package/src/components/CreditCardNumberInput/CreditCardNumberInput.stories.tsx +1 -1
  36. package/src/components/CreditCardNumberInput/CreditCardNumberInput.test.tsx +4 -4
  37. package/src/components/CreditCardNumberInput/CreditCardNumberInput.tsx +1 -0
  38. package/src/components/DefinitionList/DefinitionList.stories.tsx +3 -3
  39. package/src/components/DefinitionList/DefinitionList.test.tsx +1 -1
  40. package/src/components/Divider/Divider.stories.tsx +4 -4
  41. package/src/components/Divider/Divider.test.tsx +1 -1
  42. package/src/components/Divider/Divider.tsx +1 -1
  43. package/src/components/Divider/NoLineDivider.tsx +1 -1
  44. package/src/components/Divider/TwoLineDivider.tsx +1 -1
  45. package/src/components/Expandable/Expandable.stories.tsx +8 -8
  46. package/src/components/Expandable/Expandable.test.tsx +1 -1
  47. package/src/components/Expandable/Expandable.tsx +12 -5
  48. package/src/components/Field/Field.stories.tsx +4 -4
  49. package/src/components/Field/Field.test.tsx +7 -7
  50. package/src/components/Field/Field.tsx +5 -5
  51. package/src/components/Field/index.ts +1 -0
  52. package/src/components/Loading/Loading.test.tsx +1 -1
  53. package/src/components/Loading/Loading.tsx +2 -1
  54. package/src/components/Modal/Modal.test.tsx +2 -2
  55. package/src/components/ModalOverlay/ModalOverlay.test.tsx +2 -2
  56. package/src/components/ModalOverlay/ModalOverlay.tsx +2 -2
  57. package/src/components/Overlay/Overlay.stories.tsx +1 -1
  58. package/src/components/Paginator/Paginator.tsx +3 -3
  59. package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
  60. package/src/components/PasswordInput/PasswordInput.tsx +6 -6
  61. package/src/components/Popover/Popover.stories.tsx +1 -1
  62. package/src/components/Popover/Popover.tsx +10 -7
  63. package/src/components/PromoBanner/PromoBanner.stories.tsx +9 -9
  64. package/src/components/PromoBanner/PromoBanner.tsx +1 -1
  65. package/src/components/RadioButton/RadioButton.stories.tsx +2 -2
  66. package/src/components/RadioButton/RadioButton.tsx +4 -4
  67. package/src/components/SearchInput/SearchInput.stories.tsx +2 -2
  68. package/src/components/SearchInput/SearchInput.test.tsx +1 -1
  69. package/src/components/SearchInput/SearchInput.tsx +3 -3
  70. package/src/components/Select/MultiSelect.tsx +7 -7
  71. package/src/components/Select/Select.stories.tsx +15 -14
  72. package/src/components/Select/Select.test.tsx +13 -13
  73. package/src/components/Select/Select.tsx +11 -7
  74. package/src/components/Select/SelectOption.tsx +5 -2
  75. package/src/components/Select/SelectOptions.tsx +8 -5
  76. package/src/components/SelectableButton/SelectableButton.stories.tsx +1 -1
  77. package/src/components/Shape/ArcWindow.tsx +10 -10
  78. package/src/components/Shape/Bradley.tsx +4 -4
  79. package/src/components/Shape/Brancusi.tsx +4 -4
  80. package/src/components/Shape/Circle.tsx +10 -10
  81. package/src/components/Shape/Diamond.tsx +10 -10
  82. package/src/components/Shape/Keyhole.tsx +4 -4
  83. package/src/components/Shape/Mirror.tsx +4 -4
  84. package/src/components/Shape/Oval.tsx +4 -4
  85. package/src/components/Shape/Triangle.tsx +7 -7
  86. package/src/components/Shape/Window.tsx +4 -4
  87. package/src/components/Stack/Stack.stories.tsx +3 -3
  88. package/src/components/Stack/Stack.test.tsx +1 -1
  89. package/src/components/Tabs/TabList.tsx +1 -1
  90. package/src/components/Tabs/TabPanel.tsx +1 -1
  91. package/src/components/Tabs/TabPanels.tsx +1 -1
  92. package/src/components/Tabs/Tabs.stories.tsx +2 -2
  93. package/src/components/Tabs/Tabs.test.tsx +2 -2
  94. package/src/components/Tabs/Tabs.tsx +7 -1
  95. package/src/components/Tag/Tag.tsx +6 -5
  96. package/src/components/Text/Text.stories.tsx +5 -5
  97. package/src/components/Text/Text.test.tsx +1 -1
  98. package/src/components/TextInput/TextInput.stories.tsx +1 -1
  99. package/src/components/TextInput/TextInput.test.tsx +1 -1
  100. package/src/components/Textarea/Textarea.stories.tsx +1 -1
  101. package/src/components/Textarea/Textarea.test.tsx +3 -3
  102. package/src/components/Toast/Toast.stories.tsx +1 -1
  103. package/src/components/Toast/Toast.test.tsx +1 -1
  104. package/src/components/Toast/Toast.tsx +6 -6
  105. package/src/components/VerticalDivider/VerticalDivider.stories.tsx +3 -3
  106. package/src/components/VerticalDivider/VerticalDivider.test.tsx +2 -2
  107. package/src/hooks/useKeyboardListNavigation.spec.ts +2 -1
  108. package/src/hooks/useKeyboardListNavigation.ts +2 -0
  109. package/src/hooks/useUpdateEffect.ts +1 -0
  110. package/src/index.ts +2 -2
  111. package/src/mixins/font-smoothing/font-smoothing.stories.tsx +8 -8
  112. package/src/mixins/overflow-scroll/overflow-scroll.stories.tsx +2 -2
  113. package/src/mixins/stack/stack.stories.tsx +5 -6
  114. package/src/mixins/thin-underline/thin-underline.stories.tsx +1 -1
  115. package/src/mixins/visually-hidden/visually-hidden.stories.tsx +1 -1
  116. package/src/utilities/States/State.tsx +3 -2
  117. package/src/utilities/States/States.tsx +4 -3
  118. package/src/utilities/States/StatesProps.tsx +5 -2
  119. package/src/utilities/States/isRenderProps.ts +1 -0
  120. package/src/utilities/States/stringifyProps.tsx +1 -0
package/dist/index.cjs.js CHANGED
@@ -26,8 +26,8 @@ function _interopNamespace(e) {
26
26
  return Object.freeze(n);
27
27
  }
28
28
 
29
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
30
29
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
31
  var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
32
32
 
33
33
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -1000,20 +1000,20 @@ var typography_1 = typography;
1000
1000
 
1001
1001
  var text = function text(name, font) {
1002
1002
  if (font === void 0) {
1003
- font = "sans";
1003
+ font = 'sans';
1004
1004
  }
1005
1005
 
1006
- var treatment = typography_1.typography["text-treatments"][name];
1006
+ var treatment = typography_1.typography['text-treatments'][name];
1007
1007
  return __assign$b(__assign$b({}, treatment), {
1008
- "font-family": typography_1.typography.fonts[font].join(","),
1009
- "line-height": "" + treatment["line-height"]
1008
+ 'font-family': typography_1.typography.fonts[font].join(','),
1009
+ 'line-height': "".concat(treatment['line-height'])
1010
1010
  });
1011
1011
  };
1012
1012
 
1013
1013
  helpers.text = text;
1014
1014
 
1015
1015
  var remToUnitlessPx = function remToUnitlessPx(value) {
1016
- return parseFloat(value) * parseInt(typography_1.typography["root-font-size"], 0);
1016
+ return parseFloat(value) * parseInt(typography_1.typography['root-font-size'], 10);
1017
1017
  };
1018
1018
 
1019
1019
  helpers.remToUnitlessPx = remToUnitlessPx;
@@ -1022,18 +1022,19 @@ var color = function color(name, alpha) {
1022
1022
  var _a;
1023
1023
 
1024
1024
  var color = colors_1.colors.all[name];
1025
- return alpha != null ? colorString.to.rgb(__spreadArray$1(__spreadArray$1([], ((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || [], true), [alpha], false)) : color;
1025
+ return alpha != null ? // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1026
+ colorString.to.rgb(__spreadArray$1(__spreadArray$1([], ((_a = colorString.get.rgb(color)) === null || _a === void 0 ? void 0 : _a.slice(0, 3)) || [], true), [alpha], false)) : color;
1026
1027
  };
1027
1028
 
1028
1029
  helpers.color = color;
1029
1030
 
1030
- var spacing = function spacing(ty, rx, b, l) {
1031
- return [ty, rx, b, l].reduce(function (acc, v) {
1031
+ var spacing = function spacing(topY, rightX, bottom, left) {
1032
+ return [topY, rightX, bottom, left].reduce(function (acc, value) {
1032
1033
  var _a;
1033
1034
 
1034
- if (v === undefined) return acc;
1035
- return [acc, (_a = space_1.space.scale[v]) !== null && _a !== void 0 ? _a : v].join(" ");
1036
- }, "");
1035
+ if (value === undefined) return acc;
1036
+ return [acc, (_a = space_1.space.scale[value]) !== null && _a !== void 0 ? _a : value].join(' ');
1037
+ }, '');
1037
1038
  };
1038
1039
 
1039
1040
  helpers.spacing = spacing;
@@ -1042,12 +1043,18 @@ helpers.spacing = spacing;
1042
1043
 
1043
1044
  var __createBinding = commonjsGlobal && commonjsGlobal.__createBinding || (Object.create ? function (o, m, k, k2) {
1044
1045
  if (k2 === undefined) k2 = k;
1045
- Object.defineProperty(o, k2, {
1046
- enumerable: true,
1047
- get: function get() {
1048
- return m[k];
1049
- }
1050
- });
1046
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1047
+
1048
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1049
+ desc = {
1050
+ enumerable: true,
1051
+ get: function get() {
1052
+ return m[k];
1053
+ }
1054
+ };
1055
+ }
1056
+
1057
+ Object.defineProperty(o, k2, desc);
1051
1058
  } : function (o, m, k, k2) {
1052
1059
  if (k2 === undefined) k2 = k;
1053
1060
  o[k2] = m[k];
@@ -1274,6 +1281,182 @@ function _nonIterableRest() {
1274
1281
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1275
1282
  }
1276
1283
 
1284
+ var isRenderProps = function isRenderProps(children) {
1285
+ return typeof children === 'function';
1286
+ };
1287
+
1288
+ var classnames = {exports: {}};
1289
+
1290
+ (function (module) {
1291
+ /* global define */
1292
+ (function () {
1293
+
1294
+ var hasOwn = {}.hasOwnProperty;
1295
+
1296
+ function classNames() {
1297
+ var classes = [];
1298
+
1299
+ for (var i = 0; i < arguments.length; i++) {
1300
+ var arg = arguments[i];
1301
+ if (!arg) continue;
1302
+
1303
+ var argType = _typeof(arg);
1304
+
1305
+ if (argType === 'string' || argType === 'number') {
1306
+ classes.push(arg);
1307
+ } else if (Array.isArray(arg)) {
1308
+ if (arg.length) {
1309
+ var inner = classNames.apply(null, arg);
1310
+
1311
+ if (inner) {
1312
+ classes.push(inner);
1313
+ }
1314
+ }
1315
+ } else if (argType === 'object') {
1316
+ if (arg.toString === Object.prototype.toString) {
1317
+ for (var key in arg) {
1318
+ if (hasOwn.call(arg, key) && arg[key]) {
1319
+ classes.push(key);
1320
+ }
1321
+ }
1322
+ } else {
1323
+ classes.push(arg.toString());
1324
+ }
1325
+ }
1326
+ }
1327
+
1328
+ return classes.join(' ');
1329
+ }
1330
+
1331
+ if (module.exports) {
1332
+ classNames["default"] = classNames;
1333
+ module.exports = classNames;
1334
+ } else {
1335
+ window.classNames = classNames;
1336
+ }
1337
+ })();
1338
+ })(classnames);
1339
+
1340
+ var classNames = classnames.exports;
1341
+
1342
+ var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
1343
+ var Stack = function Stack(_ref) {
1344
+ var className = _ref.className,
1345
+ children = _ref.children,
1346
+ space = _ref.space,
1347
+ _ref$direction = _ref.direction,
1348
+ direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
1349
+ alignItems = _ref.alignItems,
1350
+ justifyContent = _ref.justifyContent,
1351
+ style = _ref.style,
1352
+ rest = _objectWithoutProperties(_ref, _excluded$E);
1353
+
1354
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
1355
+ className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
1356
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1357
+ alignItems: alignItems,
1358
+ justifyContent: justifyContent
1359
+ })
1360
+ }, rest), children);
1361
+ };
1362
+
1363
+ var omit = function omit(obj) {
1364
+ for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1365
+ keys[_key - 1] = arguments[_key];
1366
+ }
1367
+
1368
+ return Object.entries(obj).filter(function (_ref) {
1369
+ var _ref2 = _slicedToArray(_ref, 1),
1370
+ key = _ref2[0];
1371
+
1372
+ return !keys.includes(key);
1373
+ }).reduce(function (obj, _ref3) {
1374
+ var _ref4 = _slicedToArray(_ref3, 2),
1375
+ key = _ref4[0],
1376
+ val = _ref4[1];
1377
+
1378
+ return Object.assign(obj, _defineProperty$1({}, key, val));
1379
+ }, {});
1380
+ };
1381
+
1382
+ var truncate = function truncate(string) {
1383
+ var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
1384
+ if (!string) return null;
1385
+ var ellipsis = string.length > maxLength;
1386
+ return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
1387
+ }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
1388
+
1389
+
1390
+ var stringifyProps = function stringifyProps(props) {
1391
+ var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
1392
+ var _ref2 = _slicedToArray(_ref, 2),
1393
+ key = _ref2[0],
1394
+ value = _ref2[1];
1395
+
1396
+ if (key === 'children') return "".concat(memo, " children={...}");
1397
+ if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
1398
+ if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
1399
+ if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
1400
+ if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
1401
+ if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
1402
+ return "".concat(memo, " ").concat(key, "=").concat(value);
1403
+ }, '');
1404
+ return stringifiedProps.trim();
1405
+ };
1406
+
1407
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1408
+
1409
+ /* eslint-enable @typescript-eslint/no-explicit-any */
1410
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1411
+ var isEmpty = function isEmpty(obj) {
1412
+ return Object.entries(obj || {}).length === 0;
1413
+ };
1414
+
1415
+ var StatesProps = function StatesProps(_ref) {
1416
+ var props = _ref.props,
1417
+ children = _ref.children;
1418
+ var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
1419
+ return /*#__PURE__*/React__default["default"].createElement(Stack, {
1420
+ className: "StatesProps",
1421
+ space: 2,
1422
+ direction: "horizontal"
1423
+ }, /*#__PURE__*/React__default["default"].createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default["default"].createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default["default"].createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default["default"].createElement("span", null, " "));
1424
+ };
1425
+
1426
+ var _excluded$D = ["props", "children"];
1427
+ var State = function State(_ref) {
1428
+ var props = _ref.props,
1429
+ children = _ref.children,
1430
+ rest = _objectWithoutProperties(_ref, _excluded$D);
1431
+
1432
+ var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
1433
+ var innerChildren = isRenderProps(children) ? children(props) : children;
1434
+ return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
1435
+ className: "State"
1436
+ }, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
1437
+ className: "State__props"
1438
+ }, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
1439
+ props: props
1440
+ }, innerChildren)));
1441
+ };
1442
+
1443
+ var _excluded$C = ["states", "children"];
1444
+ var States = function States(_ref) {
1445
+ var _ref$states = _ref.states,
1446
+ states = _ref$states === void 0 ? [{}] : _ref$states,
1447
+ children = _ref.children,
1448
+ rest = _objectWithoutProperties(_ref, _excluded$C);
1449
+
1450
+ return /*#__PURE__*/React__default["default"].createElement("div", {
1451
+ className: "States"
1452
+ }, states.map(function (props, index) {
1453
+ return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
1454
+ key: index,
1455
+ props: props
1456
+ }, rest), children);
1457
+ }));
1458
+ };
1459
+
1277
1460
  var _assign = function __assign() {
1278
1461
  _assign = Object.assign || function __assign(t) {
1279
1462
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -1628,7 +1811,7 @@ RemoveScroll.classNames = {
1628
1811
  };
1629
1812
 
1630
1813
  function _extends() {
1631
- _extends = Object.assign || function (target) {
1814
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
1632
1815
  for (var i = 1; i < arguments.length; i++) {
1633
1816
  var source = arguments[i];
1634
1817
 
@@ -1641,7 +1824,6 @@ function _extends() {
1641
1824
 
1642
1825
  return target;
1643
1826
  };
1644
-
1645
1827
  return _extends.apply(this, arguments);
1646
1828
  }
1647
1829
 
@@ -3327,11 +3509,10 @@ var FocusOn$1 = /*#__PURE__*/React__namespace.forwardRef(function (props, parent
3327
3509
  });
3328
3510
 
3329
3511
  function _setPrototypeOf(o, p) {
3330
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
3512
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
3331
3513
  o.__proto__ = p;
3332
3514
  return o;
3333
3515
  };
3334
-
3335
3516
  return _setPrototypeOf(o, p);
3336
3517
  }
3337
3518
 
@@ -4451,24 +4632,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
4451
4632
  };
4452
4633
  };
4453
4634
 
4635
+ /**
4636
+ * creates a hook to control style singleton
4637
+ * @see {@link styleSingleton} for a safer component version
4638
+ * @example
4639
+ * ```tsx
4640
+ * const useStyle = styleHookSingleton();
4641
+ * ///
4642
+ * useStyle('body { overflow: hidden}');
4643
+ */
4644
+
4454
4645
  var styleHookSingleton = function styleHookSingleton() {
4455
4646
  var sheet = stylesheetSingleton();
4456
- return function (styles) {
4647
+ return function (styles, isDynamic) {
4457
4648
  React__namespace.useEffect(function () {
4458
4649
  sheet.add(styles);
4459
4650
  return function () {
4460
4651
  sheet.remove();
4461
4652
  };
4462
- }, [styles]);
4653
+ }, [styles && isDynamic]);
4463
4654
  };
4464
4655
  };
4465
4656
 
4657
+ /**
4658
+ * create a Component to add styles on demand
4659
+ * - styles are added when first instance is mounted
4660
+ * - styles are removed when the last instance is unmounted
4661
+ * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
4662
+ */
4663
+
4466
4664
  var styleSingleton = function styleSingleton() {
4467
4665
  var useStyle = styleHookSingleton();
4468
4666
 
4469
4667
  var Sheet = function Sheet(_a) {
4470
- var styles = _a.styles;
4471
- useStyle(styles);
4668
+ var styles = _a.styles,
4669
+ dynamic = _a.dynamic;
4670
+ useStyle(styles, dynamic);
4472
4671
  return null;
4473
4672
  };
4474
4673
 
@@ -4488,6 +4687,13 @@ var parse = function parse(x) {
4488
4687
 
4489
4688
  var getOffset = function getOffset(gapMode) {
4490
4689
  var cs = window.getComputedStyle(document.body);
4690
+
4691
+ if (process.env.NODE_ENV !== 'production') {
4692
+ if (cs.overflowY === 'hidden') {
4693
+ console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
4694
+ }
4695
+ }
4696
+
4491
4697
  var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
4492
4698
  var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
4493
4699
  var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
@@ -4536,17 +4742,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
4536
4742
 
4537
4743
 
4538
4744
  var RemoveScrollBar = function RemoveScrollBar(props) {
4539
- var _a = React__namespace.useState(getGapWidth(props.gapMode)),
4540
- gap = _a[0],
4541
- setGap = _a[1];
4542
-
4543
- React__namespace.useEffect(function () {
4544
- setGap(getGapWidth(props.gapMode));
4545
- }, [props.gapMode]);
4546
4745
  var noRelative = props.noRelative,
4547
4746
  noImportant = props.noImportant,
4548
- _b = props.gapMode,
4549
- gapMode = _b === void 0 ? 'margin' : _b;
4747
+ _a = props.gapMode,
4748
+ gapMode = _a === void 0 ? 'margin' : _a;
4749
+ var gap = React__namespace.useMemo(function () {
4750
+ return getGapWidth(gapMode);
4751
+ }, [gapMode]);
4550
4752
  return /*#__PURE__*/React__namespace.createElement(Style$1, {
4551
4753
  styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
4552
4754
  });
@@ -5119,60 +5321,6 @@ var FocusOn = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
5119
5321
  }));
5120
5322
  });
5121
5323
 
5122
- var classnames = {exports: {}};
5123
-
5124
- (function (module) {
5125
- /* global define */
5126
- (function () {
5127
-
5128
- var hasOwn = {}.hasOwnProperty;
5129
-
5130
- function classNames() {
5131
- var classes = [];
5132
-
5133
- for (var i = 0; i < arguments.length; i++) {
5134
- var arg = arguments[i];
5135
- if (!arg) continue;
5136
-
5137
- var argType = _typeof(arg);
5138
-
5139
- if (argType === 'string' || argType === 'number') {
5140
- classes.push(arg);
5141
- } else if (Array.isArray(arg)) {
5142
- if (arg.length) {
5143
- var inner = classNames.apply(null, arg);
5144
-
5145
- if (inner) {
5146
- classes.push(inner);
5147
- }
5148
- }
5149
- } else if (argType === 'object') {
5150
- if (arg.toString === Object.prototype.toString) {
5151
- for (var key in arg) {
5152
- if (hasOwn.call(arg, key) && arg[key]) {
5153
- classes.push(key);
5154
- }
5155
- }
5156
- } else {
5157
- classes.push(arg.toString());
5158
- }
5159
- }
5160
- }
5161
-
5162
- return classes.join(' ');
5163
- }
5164
-
5165
- if (module.exports) {
5166
- classNames["default"] = classNames;
5167
- module.exports = classNames;
5168
- } else {
5169
- window.classNames = classNames;
5170
- }
5171
- })();
5172
- })(classnames);
5173
-
5174
- var classNames = classnames.exports;
5175
-
5176
5324
  var dist$3 = {};
5177
5325
 
5178
5326
  var scale = {};
@@ -5280,7 +5428,7 @@ var scale = {};
5280
5428
  __exportStar(scale, exports);
5281
5429
  })(dist$3);
5282
5430
 
5283
- var _excluded$E = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
5431
+ var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
5284
5432
  var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
5285
5433
  var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
5286
5434
  var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
@@ -5295,7 +5443,7 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
5295
5443
  outlined = _ref$outlined === void 0 ? false : _ref$outlined,
5296
5444
  children = _ref.children,
5297
5445
  className = _ref.className,
5298
- rest = _objectWithoutProperties(_ref, _excluded$E);
5446
+ rest = _objectWithoutProperties(_ref, _excluded$B);
5299
5447
 
5300
5448
  var _scale = dist$3.scale({
5301
5449
  width: aspectWidth,
@@ -5325,23 +5473,23 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
5325
5473
  });
5326
5474
  AspectRatioBox.displayName = 'AspectRatioBox';
5327
5475
 
5328
- var _excluded$D = ["className", "theme", "children"];
5476
+ var _excluded$A = ["className", "theme", "children"];
5329
5477
  var Badge = function Badge(_ref) {
5330
5478
  var className = _ref.className,
5331
5479
  theme = _ref.theme,
5332
5480
  children = _ref.children,
5333
- rest = _objectWithoutProperties(_ref, _excluded$D);
5481
+ rest = _objectWithoutProperties(_ref, _excluded$A);
5334
5482
 
5335
5483
  return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
5336
5484
  className: classNames('Badge', theme && "Badge--".concat(theme), className)
5337
5485
  }, rest), children);
5338
5486
  };
5339
5487
 
5340
- var _excluded$C = ["children", "className"];
5488
+ var _excluded$z = ["children", "className"];
5341
5489
  var Breadcrumbs = function Breadcrumbs(_ref) {
5342
5490
  var children = _ref.children,
5343
5491
  className = _ref.className,
5344
- rest = _objectWithoutProperties(_ref, _excluded$C);
5492
+ rest = _objectWithoutProperties(_ref, _excluded$z);
5345
5493
 
5346
5494
  var position = 0;
5347
5495
  return /*#__PURE__*/React__default["default"].createElement("ol", _extends$1({
@@ -5361,7 +5509,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
5361
5509
  }));
5362
5510
  };
5363
5511
 
5364
- var _excluded$B = ["className", "styleless", "disabled"];
5512
+ var _excluded$y = ["className", "styleless", "disabled"];
5365
5513
 
5366
5514
  var isLink = function isLink(props) {
5367
5515
  return 'to' in props;
@@ -5380,7 +5528,7 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
5380
5528
  _ref$styleless = _ref.styleless,
5381
5529
  styleless = _ref$styleless === void 0 ? false : _ref$styleless,
5382
5530
  disabled = _ref.disabled,
5383
- rest = _objectWithoutProperties(_ref, _excluded$B);
5531
+ rest = _objectWithoutProperties(_ref, _excluded$y);
5384
5532
 
5385
5533
  var props = _objectSpread2(_objectSpread2({}, rest), {}, {
5386
5534
  className: classNames({
@@ -5403,14 +5551,14 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
5403
5551
  });
5404
5552
  Clickable.displayName = 'Clickable';
5405
5553
 
5406
- var _excluded$A = ["className", "disabled", "children", "underlined"];
5554
+ var _excluded$x = ["className", "disabled", "children", "underlined"];
5407
5555
  var ControlLink = function ControlLink(_ref) {
5408
5556
  var className = _ref.className,
5409
5557
  disabled = _ref.disabled,
5410
5558
  children = _ref.children,
5411
5559
  _ref$underlined = _ref.underlined,
5412
5560
  underlined = _ref$underlined === void 0 ? true : _ref$underlined,
5413
- rest = _objectWithoutProperties(_ref, _excluded$A);
5561
+ rest = _objectWithoutProperties(_ref, _excluded$x);
5414
5562
 
5415
5563
  return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({}, rest, {
5416
5564
  className: classNames('ControlLink', {
@@ -5422,12 +5570,12 @@ var ControlLink = function ControlLink(_ref) {
5422
5570
  }), children);
5423
5571
  };
5424
5572
 
5425
- var _excluded$z = ["children", "position", "className"];
5573
+ var _excluded$w = ["children", "position", "className"];
5426
5574
  var Breadcrumb = function Breadcrumb(_ref) {
5427
5575
  var children = _ref.children,
5428
5576
  position = _ref.position,
5429
5577
  className = _ref.className,
5430
- rest = _objectWithoutProperties(_ref, _excluded$z);
5578
+ rest = _objectWithoutProperties(_ref, _excluded$w);
5431
5579
 
5432
5580
  return /*#__PURE__*/React__default["default"].createElement("li", {
5433
5581
  className: classNames('Breadcrumb', className),
@@ -5446,7 +5594,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
5446
5594
  }));
5447
5595
  };
5448
5596
 
5449
- var breakpointKeys = Object.keys(dist$4.breakpoints);
5597
+ var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
5598
+
5450
5599
  var ONE_PIXEL = 1 / 16;
5451
5600
  var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
5452
5601
  var mode = _ref.mode,
@@ -5456,21 +5605,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
5456
5605
  case 'at':
5457
5606
  {
5458
5607
  var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
5459
- var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
5608
+ var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
5460
5609
  return {
5461
5610
  min: prevWidth,
5462
- max: parseInt(dist$4.breakpoints[breakpoint])
5611
+ max: parseInt(dist$4.breakpoints[breakpoint], 10)
5463
5612
  };
5464
5613
  }
5465
5614
 
5466
5615
  case 'gt':
5467
5616
  return {
5468
- min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
5617
+ min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
5469
5618
  };
5470
5619
 
5471
5620
  case 'lt':
5472
5621
  return {
5473
- max: parseInt(dist$4.breakpoints[breakpoint])
5622
+ max: parseInt(dist$4.breakpoints[breakpoint], 10)
5474
5623
  };
5475
5624
  }
5476
5625
  };
@@ -5560,10 +5709,10 @@ var useBreakpoint = function useBreakpoint(props) {
5560
5709
  };
5561
5710
  };
5562
5711
 
5563
- var _excluded$y = ["children"];
5712
+ var _excluded$v = ["children"];
5564
5713
  var Breakpoint = function Breakpoint(_ref) {
5565
5714
  var children = _ref.children,
5566
- rest = _objectWithoutProperties(_ref, _excluded$y);
5715
+ rest = _objectWithoutProperties(_ref, _excluded$v);
5567
5716
 
5568
5717
  var _discriminate = discriminate(rest),
5569
5718
  mode = _discriminate.mode,
@@ -5577,7 +5726,7 @@ var Breakpoint = function Breakpoint(_ref) {
5577
5726
  }, children) : null;
5578
5727
  };
5579
5728
 
5580
- var _excluded$x = ["secondary", "chip", "hover", "focus", "disabled", "className"];
5729
+ var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
5581
5730
  var Button = function Button(_ref) {
5582
5731
  var secondary = _ref.secondary,
5583
5732
  chip = _ref.chip,
@@ -5585,7 +5734,7 @@ var Button = function Button(_ref) {
5585
5734
  focus = _ref.focus,
5586
5735
  disabled = _ref.disabled,
5587
5736
  className = _ref.className,
5588
- rest = _objectWithoutProperties(_ref, _excluded$x);
5737
+ rest = _objectWithoutProperties(_ref, _excluded$u);
5589
5738
 
5590
5739
  return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
5591
5740
  className: classNames('Button', {
@@ -5736,7 +5885,7 @@ var Circle12 = function Circle12(_a) {
5736
5885
 
5737
5886
  Circle12.displayName = 'Circle12';
5738
5887
 
5739
- var _excluded$w = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
5888
+ var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
5740
5889
  var CHECKED_ITEM_PROPS = {
5741
5890
  className: 'Checkbox__check-mark',
5742
5891
  height: '85%',
@@ -5754,7 +5903,7 @@ var Checkbox = function Checkbox(_ref) {
5754
5903
  disabled = _ref.disabled,
5755
5904
  _ref$checkIcon = _ref.checkIcon,
5756
5905
  checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
5757
- rest = _objectWithoutProperties(_ref, _excluded$w);
5906
+ rest = _objectWithoutProperties(_ref, _excluded$t);
5758
5907
 
5759
5908
  var _useState = React.useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
5760
5909
  _useState2 = _slicedToArray(_useState, 2),
@@ -5842,7 +5991,7 @@ var SKU_COLORS = {
5842
5991
  yellow: '#ffca44'
5843
5992
  };
5844
5993
 
5845
- var _excluded$v = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
5994
+ var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
5846
5995
  var ColorSwatch = function ColorSwatch(_ref) {
5847
5996
  var className = _ref.className,
5848
5997
  size = _ref.size,
@@ -5856,7 +6005,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
5856
6005
  onClick = _ref.onClick,
5857
6006
  onMouseEnter = _ref.onMouseEnter,
5858
6007
  disabled = _ref.disabled,
5859
- rest = _objectWithoutProperties(_ref, _excluded$v);
6008
+ rest = _objectWithoutProperties(_ref, _excluded$s);
5860
6009
 
5861
6010
  var handleClick = React.useCallback(function (_event) {
5862
6011
  onClick && onClick(color);
@@ -5892,22 +6041,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
5892
6041
  }));
5893
6042
  };
5894
6043
 
5895
- var _excluded$u = ["className", "children"];
6044
+ var _excluded$r = ["className", "children"];
5896
6045
  var Constrain = function Constrain(_ref) {
5897
6046
  var className = _ref.className,
5898
6047
  children = _ref.children,
5899
- rest = _objectWithoutProperties(_ref, _excluded$u);
6048
+ rest = _objectWithoutProperties(_ref, _excluded$r);
5900
6049
 
5901
6050
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
5902
6051
  className: classNames('Constrain', className)
5903
6052
  }, rest), children);
5904
6053
  };
5905
6054
 
5906
- var _excluded$t = ["className", "children"];
6055
+ var _excluded$q = ["className", "children"];
5907
6056
  var ExceedConstrain = function ExceedConstrain(_ref) {
5908
6057
  var className = _ref.className,
5909
6058
  children = _ref.children,
5910
- rest = _objectWithoutProperties(_ref, _excluded$t);
6059
+ rest = _objectWithoutProperties(_ref, _excluded$q);
5911
6060
 
5912
6061
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
5913
6062
  className: classNames('ExceedConstrain', className)
@@ -8319,7 +8468,7 @@ var Warning16 = function Warning16(_a) {
8319
8468
 
8320
8469
  Warning16.displayName = 'Warning16';
8321
8470
 
8322
- var _excluded$s = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
8471
+ var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
8323
8472
  var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
8324
8473
  var className = _ref.className,
8325
8474
  disabled = _ref.disabled,
@@ -8329,7 +8478,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
8329
8478
  label = _ref.label,
8330
8479
  _onChange = _ref.onChange,
8331
8480
  onChangeEvent = _ref.onChangeEvent,
8332
- rest = _objectWithoutProperties(_ref, _excluded$s);
8481
+ rest = _objectWithoutProperties(_ref, _excluded$p);
8333
8482
 
8334
8483
  return /*#__PURE__*/React__default["default"].createElement("input", _extends$1({
8335
8484
  className: classNames('TextInput', className, {
@@ -8668,7 +8817,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
8668
8817
  return function () {
8669
8818
  el.removeEventListener('keydown', handleKeyDown);
8670
8819
  };
8671
- }, [handleKeyDown, ref, idleTimeout]);
8820
+ }, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
8821
+
8672
8822
  React.useEffect(function () {
8673
8823
  return dispatch({
8674
8824
  type: 'RESET',
@@ -8684,6 +8834,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
8684
8834
  });
8685
8835
  };
8686
8836
 
8837
+ /* eslint-disable react-hooks/exhaustive-deps */
8687
8838
  var useUpdateEffect = function useUpdateEffect(effect, deps) {
8688
8839
  var didMountRef = React.useRef(false);
8689
8840
  React.useEffect(function () {
@@ -8695,7 +8846,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
8695
8846
  }, deps);
8696
8847
  };
8697
8848
 
8698
- var _excluded$r = ["className", "treatment", "color", "family", "children", "style"];
8849
+ var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
8699
8850
  var Text = function Text(_ref) {
8700
8851
  var className = _ref.className,
8701
8852
  _ref$treatment = _ref.treatment,
@@ -8705,7 +8856,7 @@ var Text = function Text(_ref) {
8705
8856
  family = _ref.family,
8706
8857
  children = _ref.children,
8707
8858
  style = _ref.style,
8708
- rest = _objectWithoutProperties(_ref, _excluded$r);
8859
+ rest = _objectWithoutProperties(_ref, _excluded$o);
8709
8860
 
8710
8861
  return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
8711
8862
  className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
@@ -8862,7 +9013,7 @@ var Search20 = function Search20(_a) {
8862
9013
 
8863
9014
  Search20.displayName = 'Search20';
8864
9015
 
8865
- var _excluded$q = ["className", "onChange", "onChangeValue", "onClear", "value"];
9016
+ var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
8866
9017
  var DEFAULT_INPUT_VALUE = '';
8867
9018
  var SearchInput = function SearchInput(_ref) {
8868
9019
  var className = _ref.className,
@@ -8871,7 +9022,7 @@ var SearchInput = function SearchInput(_ref) {
8871
9022
  onClear = _ref.onClear,
8872
9023
  _ref$value = _ref.value,
8873
9024
  value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
8874
- rest = _objectWithoutProperties(_ref, _excluded$q);
9025
+ rest = _objectWithoutProperties(_ref, _excluded$n);
8875
9026
 
8876
9027
  var ref = React.useRef(null);
8877
9028
 
@@ -9069,7 +9220,8 @@ var SelectOption = function SelectOption(_ref) {
9069
9220
  selected = _ref.selected,
9070
9221
  option = _ref.option,
9071
9222
  onClick = _ref.onClick,
9072
- className = _ref.className;
9223
+ className = _ref.className,
9224
+ dataTestId = _ref.dataTestId;
9073
9225
  var ref = React.useRef(null);
9074
9226
  var handleClick = React.useCallback(function (event) {
9075
9227
  event.preventDefault();
@@ -9091,13 +9243,14 @@ var SelectOption = function SelectOption(_ref) {
9091
9243
  'SelectOption--disabled': option.disabled
9092
9244
  }),
9093
9245
  onClick: handleClick,
9246
+ "data-test-id": dataTestId ? "".concat(dataTestId, "--").concat(option.label.replace(' ', '-')) : undefined,
9094
9247
  "aria-label": option.label,
9095
9248
  "aria-selected": selected,
9096
9249
  role: "option"
9097
9250
  }, option.label);
9098
9251
  };
9099
9252
 
9100
- var _excluded$p = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className"];
9253
+ var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className", "dataTestId"];
9101
9254
  var SelectOptions = function SelectOptions(_ref) {
9102
9255
  var idRef = _ref.idRef,
9103
9256
  searchable = _ref.searchable,
@@ -9108,7 +9261,8 @@ var SelectOptions = function SelectOptions(_ref) {
9108
9261
  onSelect = _ref.onSelect,
9109
9262
  onFocus = _ref.onFocus,
9110
9263
  className = _ref.className,
9111
- rest = _objectWithoutProperties(_ref, _excluded$p);
9264
+ dataTestId = _ref.dataTestId,
9265
+ rest = _objectWithoutProperties(_ref, _excluded$m);
9112
9266
 
9113
9267
  var _useState = React.useState(''),
9114
9268
  _useState2 = _slicedToArray(_useState, 2),
@@ -9165,6 +9319,7 @@ var SelectOptions = function SelectOptions(_ref) {
9165
9319
  id: "SelectOption--".concat(option.value, "-").concat(idRef),
9166
9320
  key: option.value,
9167
9321
  option: option,
9322
+ dataTestId: dataTestId,
9168
9323
  active: (activeOption === null || activeOption === void 0 ? void 0 : activeOption.value) === option.value,
9169
9324
  selected: (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) === option.value,
9170
9325
  onClick: onSelect
@@ -9286,7 +9441,7 @@ var useSelect = function useSelect(_ref) {
9286
9441
  };
9287
9442
  };
9288
9443
 
9289
- var _excluded$o = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value"];
9444
+ var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value", "dataTestId"];
9290
9445
  var Select = function Select(_ref) {
9291
9446
  var _ref2;
9292
9447
 
@@ -9312,7 +9467,8 @@ var Select = function Select(_ref) {
9312
9467
  _ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
9313
9468
  shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
9314
9469
  value = _ref.value,
9315
- rest = _objectWithoutProperties(_ref, _excluded$o);
9470
+ dataTestId = _ref.dataTestId,
9471
+ rest = _objectWithoutProperties(_ref, _excluded$l);
9316
9472
 
9317
9473
  var _useSelect = useSelect({
9318
9474
  value: value,
@@ -9380,6 +9536,7 @@ var Select = function Select(_ref) {
9380
9536
  className: "Select__value",
9381
9537
  disabled: disabled,
9382
9538
  onClick: handleToggle,
9539
+ "data-test-id": dataTestId,
9383
9540
  "aria-haspopup": "listbox",
9384
9541
  "aria-expanded": state.mode === Mode.Open,
9385
9542
  "aria-labelledby": "Select__label--".concat(idRef, " Select__value--").concat(idRef),
@@ -9399,6 +9556,7 @@ var Select = function Select(_ref) {
9399
9556
  'Select__options--up': dropDirection === 'up',
9400
9557
  'Select__options--down': dropDirection === 'down'
9401
9558
  }),
9559
+ dataTestId: dataTestId,
9402
9560
  searchable: searchable,
9403
9561
  options: options,
9404
9562
  onSelect: handleSelect,
@@ -10978,7 +11136,7 @@ var Exit16 = function Exit16(_a) {
10978
11136
 
10979
11137
  Exit16.displayName = 'Exit16';
10980
11138
 
10981
- var _excluded$n = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
11139
+ var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
10982
11140
  var MultiSelect = function MultiSelect(_ref) {
10983
11141
  var className = _ref.className,
10984
11142
  defaultValue = _ref.defaultValue,
@@ -10993,7 +11151,7 @@ var MultiSelect = function MultiSelect(_ref) {
10993
11151
  searchable = _ref.searchable,
10994
11152
  shiftIconLeftwards = _ref.shiftIconLeftwards,
10995
11153
  value = _ref.value,
10996
- rest = _objectWithoutProperties(_ref, _excluded$n);
11154
+ rest = _objectWithoutProperties(_ref, _excluded$k);
10997
11155
 
10998
11156
  var _useSelect = useSelect({
10999
11157
  value: value,
@@ -11093,14 +11251,14 @@ var MultiSelect = function MultiSelect(_ref) {
11093
11251
  }));
11094
11252
  };
11095
11253
 
11096
- var _excluded$m = ["className", "children", "error", "label", "placeholder"];
11254
+ var _excluded$j = ["className", "children", "error", "label", "placeholder"];
11097
11255
  var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
11098
11256
  var className = _ref.className,
11099
11257
  children = _ref.children,
11100
11258
  error = _ref.error,
11101
11259
  label = _ref.label,
11102
11260
  placeholder = _ref.placeholder,
11103
- rest = _objectWithoutProperties(_ref, _excluded$m);
11261
+ rest = _objectWithoutProperties(_ref, _excluded$j);
11104
11262
 
11105
11263
  return /*#__PURE__*/React__default["default"].createElement("label", {
11106
11264
  className: classNames('Field', className)
@@ -11129,17 +11287,17 @@ var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
11129
11287
  });
11130
11288
  Field.displayName = 'Field';
11131
11289
 
11132
- var _excluded$l = ["onChange"];
11290
+ var _excluded$i = ["onChange"];
11133
11291
  var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
11134
11292
  var onChange = _ref.onChange,
11135
- rest = _objectWithoutProperties(_ref, _excluded$l);
11293
+ rest = _objectWithoutProperties(_ref, _excluded$i);
11136
11294
 
11137
11295
  return /*#__PURE__*/React__default["default"].createElement(Field, _extends$1({}, rest, {
11138
11296
  onChangeEvent: onChange
11139
11297
  }));
11140
11298
  };
11141
11299
 
11142
- var _excluded$k = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
11300
+ var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
11143
11301
  var DEFAULT_MASK = '9999 9999 9999 9999';
11144
11302
  var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11145
11303
  var _ref2;
@@ -11154,7 +11312,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11154
11312
  onFocus = _ref.onFocus,
11155
11313
  onBlur = _ref.onBlur,
11156
11314
  onChange = _ref.onChange,
11157
- rest = _objectWithoutProperties(_ref, _excluded$k);
11315
+ rest = _objectWithoutProperties(_ref, _excluded$h);
11158
11316
 
11159
11317
  var _useState = React.useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
11160
11318
  _useState2 = _slicedToArray(_useState, 2),
@@ -11180,6 +11338,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11180
11338
  setValue(event.target.value);
11181
11339
  onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
11182
11340
  }, [setValue, onChange]); // TODO: get rid of the any, the types of react-input-mask are incorrect here, it should expect a function as a child, but it expects a ReactNode
11341
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11183
11342
 
11184
11343
  var renderInputField = function renderInputField(inputProps) {
11185
11344
  return /*#__PURE__*/React__default["default"].createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
@@ -11199,19 +11358,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
11199
11358
  }, renderInputField);
11200
11359
  };
11201
11360
 
11202
- var _excluded$j = ["term", "children", "className"];
11361
+ var _excluded$g = ["term", "children", "className"];
11203
11362
  var DefinitionList = function DefinitionList(_ref) {
11204
11363
  var term = _ref.term,
11205
11364
  children = _ref.children,
11206
11365
  className = _ref.className,
11207
- rest = _objectWithoutProperties(_ref, _excluded$j);
11366
+ rest = _objectWithoutProperties(_ref, _excluded$g);
11208
11367
 
11209
11368
  return /*#__PURE__*/React__default["default"].createElement("dl", _extends$1({
11210
11369
  className: classNames('DefinitionList', className)
11211
11370
  }, rest), /*#__PURE__*/React__default["default"].createElement("dt", null, term), /*#__PURE__*/React__default["default"].createElement("dd", null, children));
11212
11371
  };
11213
11372
 
11214
- var _excluded$i = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
11373
+ var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "defaultExpanded", "expanded"];
11215
11374
  var Expandable = function Expandable(_ref) {
11216
11375
  var name = _ref.name,
11217
11376
  children = _ref.children,
@@ -11221,15 +11380,19 @@ var Expandable = function Expandable(_ref) {
11221
11380
  _ref$icon = _ref.icon,
11222
11381
  icon = _ref$icon === void 0 ? 'plus-minus' : _ref$icon,
11223
11382
  dataTestId = _ref['data-testid'],
11224
- _ref$expanded = _ref.expanded,
11225
- __expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
11226
- rest = _objectWithoutProperties(_ref, _excluded$i);
11383
+ _ref$defaultExpanded = _ref.defaultExpanded,
11384
+ defaultExpanded = _ref$defaultExpanded === void 0 ? false : _ref$defaultExpanded,
11385
+ __expanded__ = _ref.expanded,
11386
+ rest = _objectWithoutProperties(_ref, _excluded$f);
11227
11387
 
11228
- var _useState = React.useState(__expanded__),
11388
+ var _useState = React.useState(defaultExpanded),
11229
11389
  _useState2 = _slicedToArray(_useState, 2),
11230
11390
  expanded = _useState2[0],
11231
11391
  setExpanded = _useState2[1];
11232
11392
 
11393
+ React.useEffect(function () {
11394
+ if (__expanded__ != null && __expanded__ !== expanded) setExpanded(__expanded__);
11395
+ }, [expanded, __expanded__]);
11233
11396
  var handleClick = React.useCallback(function () {
11234
11397
  return setExpanded(function (expanded) {
11235
11398
  return !expanded;
@@ -11252,7 +11415,7 @@ var Expandable = function Expandable(_ref) {
11252
11415
  }, expanded || !virtual ? children : null));
11253
11416
  };
11254
11417
 
11255
- var _excluded$h = ["text", "treatment", "color", "family", "type", "className"];
11418
+ var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
11256
11419
  var Divider = function Divider(_ref) {
11257
11420
  var text = _ref.text,
11258
11421
  treatment = _ref.treatment,
@@ -11260,7 +11423,7 @@ var Divider = function Divider(_ref) {
11260
11423
  family = _ref.family,
11261
11424
  type = _ref.type,
11262
11425
  className = _ref.className,
11263
- rest = _objectWithoutProperties(_ref, _excluded$h);
11426
+ rest = _objectWithoutProperties(_ref, _excluded$e);
11264
11427
 
11265
11428
  var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
11266
11429
  var defaultFamily = type === 'two-line' ? undefined : 'serif';
@@ -11276,21 +11439,21 @@ var Divider = function Divider(_ref) {
11276
11439
 
11277
11440
  var TwoLineDivider = function TwoLineDivider(props) {
11278
11441
  return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
11279
- type: 'two-line'
11442
+ type: "two-line"
11280
11443
  }));
11281
11444
  };
11282
11445
 
11283
11446
  var NoLineDivider = function NoLineDivider(props) {
11284
11447
  return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
11285
- type: 'no-line'
11448
+ type: "no-line"
11286
11449
  }));
11287
11450
  };
11288
11451
 
11289
- var _excluded$g = ["className", "hidden"];
11452
+ var _excluded$d = ["className", "hidden"];
11290
11453
  var Label = function Label(_ref) {
11291
11454
  var className = _ref.className,
11292
11455
  hidden = _ref.hidden,
11293
- rest = _objectWithoutProperties(_ref, _excluded$g);
11456
+ rest = _objectWithoutProperties(_ref, _excluded$d);
11294
11457
 
11295
11458
  return /*#__PURE__*/React__default["default"].createElement("label", _extends$1({
11296
11459
  className: classNames('Label', className, {
@@ -11422,11 +11585,11 @@ var ArcWindow = function ArcWindow() {
11422
11585
  }));
11423
11586
  };
11424
11587
 
11425
- var _excluded$f = ["className"];
11588
+ var _excluded$c = ["className"];
11426
11589
  var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
11427
11590
  var Loading = function Loading(_ref) {
11428
11591
  var className = _ref.className,
11429
- rest = _objectWithoutProperties(_ref, _excluded$f);
11592
+ rest = _objectWithoutProperties(_ref, _excluded$c);
11430
11593
 
11431
11594
  var _useCursor = dist.useCursor({
11432
11595
  max: FRAMES.length
@@ -11434,8 +11597,9 @@ var Loading = function Loading(_ref) {
11434
11597
  index = _useCursor.index,
11435
11598
  handleNext = _useCursor.handleNext;
11436
11599
 
11600
+ var ONE_SECOND_INTERVAL = 1000;
11437
11601
  React.useEffect(function () {
11438
- var interval = setInterval(handleNext, 1000);
11602
+ var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
11439
11603
  return function () {
11440
11604
  return clearInterval(interval);
11441
11605
  };
@@ -11501,13 +11665,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
11501
11665
  })));
11502
11666
  };
11503
11667
 
11504
- var _excluded$e = ["className", "children", "onClose", "shards"];
11668
+ var _excluded$b = ["className", "children", "onClose", "shards"];
11505
11669
  var Modal = function Modal(_ref) {
11506
11670
  var className = _ref.className,
11507
11671
  children = _ref.children,
11508
11672
  onClose = _ref.onClose,
11509
11673
  shards = _ref.shards,
11510
- rest = _objectWithoutProperties(_ref, _excluded$e);
11674
+ rest = _objectWithoutProperties(_ref, _excluded$b);
11511
11675
 
11512
11676
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
11513
11677
  className: classNames('Modal', className)
@@ -11518,14 +11682,14 @@ var Modal = function Modal(_ref) {
11518
11682
  }, children));
11519
11683
  };
11520
11684
 
11521
- var _excluded$d = ["className", "children", "show"];
11685
+ var _excluded$a = ["className", "children", "show"];
11522
11686
  var UNMOUNT_DELAY_MS = 500;
11523
11687
  var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
11524
11688
  var className = _ref.className,
11525
11689
  children = _ref.children,
11526
11690
  _ref$show = _ref.show,
11527
11691
  show = _ref$show === void 0 ? true : _ref$show,
11528
- rest = _objectWithoutProperties(_ref, _excluded$d);
11692
+ rest = _objectWithoutProperties(_ref, _excluded$a);
11529
11693
 
11530
11694
  var _useState = React.useState(show),
11531
11695
  _useState2 = _slicedToArray(_useState, 2),
@@ -11555,7 +11719,7 @@ var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
11555
11719
  });
11556
11720
  Overlay.displayName = 'Overlay';
11557
11721
 
11558
- var _excluded$c = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
11722
+ var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
11559
11723
  var ModalOverlay = function ModalOverlay(_ref) {
11560
11724
  var children = _ref.children,
11561
11725
  className = _ref.className,
@@ -11565,7 +11729,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
11565
11729
  _ref$show = _ref.show,
11566
11730
  show = _ref$show === void 0 ? true : _ref$show,
11567
11731
  shards = _ref.shards,
11568
- rest = _objectWithoutProperties(_ref, _excluded$c);
11732
+ rest = _objectWithoutProperties(_ref, _excluded$9);
11569
11733
 
11570
11734
  var element = React.useMemo(function () {
11571
11735
  return typeof document !== 'undefined' ? document.createElement('div') : null;
@@ -11836,8 +12000,11 @@ var Paginator = function Paginator(_ref) {
11836
12000
  })));
11837
12001
  };
11838
12002
 
11839
- var _excluded$b = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
12003
+ var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
11840
12004
  var POPOVER_MOUSEOUT_DELAY_MS = 200;
12005
+ var THREE_QUARTER_SECOND_DELAY = 750;
12006
+ var ONE_SECOND_DELAY = 1000;
12007
+ var FIVE_SECOND_DELAY = 5000;
11841
12008
  var Mode;
11842
12009
 
11843
12010
  (function (Mode) {
@@ -11861,7 +12028,7 @@ var Popover = function Popover(_ref) {
11861
12028
  autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
11862
12029
  _ref$smoothTransition = _ref.smoothTransitioning,
11863
12030
  smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
11864
- rest = _objectWithoutProperties(_ref, _excluded$b);
12031
+ rest = _objectWithoutProperties(_ref, _excluded$8);
11865
12032
 
11866
12033
  var _useState = React.useState(function () {
11867
12034
  if (open && smoothTransitioning) {
@@ -11905,7 +12072,7 @@ var Popover = function Popover(_ref) {
11905
12072
  if (mode !== Mode.Closing) return;
11906
12073
  var closingTimeout = setTimeout(function () {
11907
12074
  return setMode(Mode.Closed);
11908
- }, 750);
12075
+ }, THREE_QUARTER_SECOND_DELAY);
11909
12076
  return function () {
11910
12077
  return clearTimeout(closingTimeout);
11911
12078
  };
@@ -11914,7 +12081,7 @@ var Popover = function Popover(_ref) {
11914
12081
  if (mode !== Mode.AutoOpening) return;
11915
12082
  var openingTimeout = setTimeout(function () {
11916
12083
  return setMode(Mode.AutoOpen);
11917
- }, 1000);
12084
+ }, ONE_SECOND_DELAY);
11918
12085
  return function () {
11919
12086
  return clearTimeout(openingTimeout);
11920
12087
  };
@@ -11923,14 +12090,14 @@ var Popover = function Popover(_ref) {
11923
12090
  if (mode !== Mode.Opening) return;
11924
12091
  var openingTimeout = setTimeout(function () {
11925
12092
  return setMode(Mode.Open);
11926
- }, 750);
12093
+ }, THREE_QUARTER_SECOND_DELAY);
11927
12094
  return function () {
11928
12095
  return clearTimeout(openingTimeout);
11929
12096
  };
11930
12097
  }, [mode]);
11931
12098
  React.useEffect(function () {
11932
12099
  if (mode !== Mode.AutoOpen) return;
11933
- var stayingTimeout = setTimeout(handleClose, 5000);
12100
+ var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
11934
12101
  return function () {
11935
12102
  return clearTimeout(stayingTimeout);
11936
12103
  };
@@ -11964,11 +12131,11 @@ var Popover = function Popover(_ref) {
11964
12131
  }, content)), children));
11965
12132
  };
11966
12133
 
11967
- var _excluded$a = ["className", "children"];
12134
+ var _excluded$7 = ["className", "children"];
11968
12135
  var PromoBanner = function PromoBanner(_ref) {
11969
12136
  var className = _ref.className,
11970
12137
  children = _ref.children,
11971
- rest = _objectWithoutProperties(_ref, _excluded$a);
12138
+ rest = _objectWithoutProperties(_ref, _excluded$7);
11972
12139
 
11973
12140
  var length = React.Children.count(children);
11974
12141
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
@@ -11987,7 +12154,7 @@ var PromoBanner = function PromoBanner(_ref) {
11987
12154
  })));
11988
12155
  };
11989
12156
 
11990
- var _excluded$9 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
12157
+ var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
11991
12158
  var RadioButton = function RadioButton(_ref) {
11992
12159
  var className = _ref.className,
11993
12160
  checked = _ref.checked,
@@ -11995,7 +12162,7 @@ var RadioButton = function RadioButton(_ref) {
11995
12162
  value = _ref.value,
11996
12163
  tabIndex = _ref.tabIndex,
11997
12164
  disabled = _ref.disabled,
11998
- rest = _objectWithoutProperties(_ref, _excluded$9);
12165
+ rest = _objectWithoutProperties(_ref, _excluded$6);
11999
12166
 
12000
12167
  var inputRef = React.useRef(null);
12001
12168
  return /*#__PURE__*/React__default["default"].createElement("label", {
@@ -12032,14 +12199,14 @@ var RadioButton = function RadioButton(_ref) {
12032
12199
  }, children));
12033
12200
  };
12034
12201
 
12035
- var _excluded$8 = ["className", "hover", "selected", "unavailable", "children"];
12202
+ var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
12036
12203
  var SelectableButton = function SelectableButton(_ref) {
12037
12204
  var className = _ref.className,
12038
12205
  hover = _ref.hover,
12039
12206
  selected = _ref.selected,
12040
12207
  unavailable = _ref.unavailable,
12041
12208
  children = _ref.children,
12042
- rest = _objectWithoutProperties(_ref, _excluded$8);
12209
+ rest = _objectWithoutProperties(_ref, _excluded$5);
12043
12210
 
12044
12211
  return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
12045
12212
  className: classNames('SelectableButton', {
@@ -12050,34 +12217,13 @@ var SelectableButton = function SelectableButton(_ref) {
12050
12217
  }, rest), /*#__PURE__*/React__default["default"].createElement("span", null, children));
12051
12218
  };
12052
12219
 
12053
- var _excluded$7 = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
12054
- var Stack = function Stack(_ref) {
12055
- var className = _ref.className,
12056
- children = _ref.children,
12057
- space = _ref.space,
12058
- _ref$direction = _ref.direction,
12059
- direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
12060
- alignItems = _ref.alignItems,
12061
- justifyContent = _ref.justifyContent,
12062
- style = _ref.style,
12063
- rest = _objectWithoutProperties(_ref, _excluded$7);
12064
-
12065
- return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12066
- className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
12067
- style: _objectSpread2(_objectSpread2({}, style), {}, {
12068
- alignItems: alignItems,
12069
- justifyContent: justifyContent
12070
- })
12071
- }, rest), children);
12072
- };
12073
-
12074
- var _excluded$6 = ["className", "disabled", "onRemove", "children"];
12220
+ var _excluded$4 = ["className", "disabled", "onRemove", "children"];
12075
12221
  var Tag = function Tag(_ref) {
12076
12222
  var className = _ref.className,
12077
12223
  disabled = _ref.disabled,
12078
12224
  onRemove = _ref.onRemove,
12079
12225
  children = _ref.children,
12080
- rest = _objectWithoutProperties(_ref, _excluded$6);
12226
+ rest = _objectWithoutProperties(_ref, _excluded$4);
12081
12227
 
12082
12228
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12083
12229
  className: classNames('Tag', className, {
@@ -12090,13 +12236,13 @@ var Tag = function Tag(_ref) {
12090
12236
  }, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
12091
12237
  };
12092
12238
 
12093
- var _excluded$5 = ["tabs", "onTabClicked", "activeTab", "className"];
12239
+ var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
12094
12240
  var Tabs = function Tabs(_ref) {
12095
12241
  var tabs = _ref.tabs,
12096
12242
  onTabClicked = _ref.onTabClicked,
12097
12243
  activeTab = _ref.activeTab,
12098
12244
  className = _ref.className,
12099
- rest = _objectWithoutProperties(_ref, _excluded$5);
12245
+ rest = _objectWithoutProperties(_ref, _excluded$3);
12100
12246
 
12101
12247
  var _useState = React.useState(activeTab || tabs[0].name),
12102
12248
  _useState2 = _slicedToArray(_useState, 2),
@@ -12176,7 +12322,7 @@ var TabPanel = function TabPanel(_ref) {
12176
12322
  }, children);
12177
12323
  };
12178
12324
 
12179
- var _excluded$4 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
12325
+ var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
12180
12326
  var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
12181
12327
  var className = _ref.className,
12182
12328
  disabled = _ref.disabled,
@@ -12185,7 +12331,7 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
12185
12331
  placeholder = _ref.placeholder,
12186
12332
  label = _ref.label,
12187
12333
  _onChange = _ref.onChange,
12188
- rest = _objectWithoutProperties(_ref, _excluded$4);
12334
+ rest = _objectWithoutProperties(_ref, _excluded$2);
12189
12335
 
12190
12336
  return /*#__PURE__*/React__default["default"].createElement("textarea", _extends$1({
12191
12337
  className: classNames('Textarea', className, {
@@ -12204,13 +12350,13 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
12204
12350
  });
12205
12351
  Textarea.displayName = 'Textarea';
12206
12352
 
12207
- var _excluded$3 = ["theme", "className", "onRemove", "children"];
12353
+ var _excluded$1 = ["theme", "className", "onRemove", "children"];
12208
12354
  var Toast = function Toast(_ref) {
12209
12355
  var theme = _ref.theme,
12210
12356
  className = _ref.className,
12211
12357
  onRemove = _ref.onRemove,
12212
12358
  children = _ref.children,
12213
- rest = _objectWithoutProperties(_ref, _excluded$3);
12359
+ rest = _objectWithoutProperties(_ref, _excluded$1);
12214
12360
 
12215
12361
  return /*#__PURE__*/React__default["default"].createElement(Stack, _extends$1({
12216
12362
  className: classNames('Toast', "Toast--".concat(theme), className),
@@ -12227,11 +12373,11 @@ var Toast = function Toast(_ref) {
12227
12373
  }, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
12228
12374
  };
12229
12375
 
12230
- var _excluded$2 = ["className", "double"];
12376
+ var _excluded = ["className", "double"];
12231
12377
  var VerticalDivider = function VerticalDivider(_ref) {
12232
12378
  var className = _ref.className,
12233
12379
  _double = _ref["double"],
12234
- rest = _objectWithoutProperties(_ref, _excluded$2);
12380
+ rest = _objectWithoutProperties(_ref, _excluded);
12235
12381
 
12236
12382
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12237
12383
  className: classNames('VerticalDivider', {
@@ -12270,102 +12416,6 @@ var PasswordInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
12270
12416
  });
12271
12417
  PasswordInput.displayName = 'PasswordInput';
12272
12418
 
12273
- var isRenderProps = function isRenderProps(children) {
12274
- return typeof children === 'function';
12275
- };
12276
-
12277
- var truncate = function truncate(string) {
12278
- var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
12279
- if (!string) return null;
12280
- var ellipsis = string.length > maxLength;
12281
- return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
12282
- };
12283
-
12284
- var stringifyProps = function stringifyProps(props) {
12285
- var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
12286
- var _ref2 = _slicedToArray(_ref, 2),
12287
- key = _ref2[0],
12288
- value = _ref2[1];
12289
-
12290
- if (key === 'children') return "".concat(memo, " children={...}");
12291
- if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
12292
- if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
12293
- if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
12294
- if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
12295
- if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
12296
- return "".concat(memo, " ").concat(key, "=").concat(value);
12297
- }, '');
12298
- return stringifiedProps.trim();
12299
- };
12300
-
12301
- var omit = function omit(obj) {
12302
- for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
12303
- keys[_key - 1] = arguments[_key];
12304
- }
12305
-
12306
- return Object.entries(obj).filter(function (_ref) {
12307
- var _ref2 = _slicedToArray(_ref, 1),
12308
- key = _ref2[0];
12309
-
12310
- return !keys.includes(key);
12311
- }).reduce(function (obj, _ref3) {
12312
- var _ref4 = _slicedToArray(_ref3, 2),
12313
- key = _ref4[0],
12314
- val = _ref4[1];
12315
-
12316
- return Object.assign(obj, _defineProperty$1({}, key, val));
12317
- }, {});
12318
- };
12319
-
12320
- var isEmpty = function isEmpty(obj) {
12321
- return Object.entries(obj || {}).length === 0;
12322
- };
12323
-
12324
- var StatesProps = function StatesProps(_ref) {
12325
- var props = _ref.props,
12326
- children = _ref.children;
12327
- var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
12328
- return /*#__PURE__*/React__default["default"].createElement(Stack, {
12329
- className: "StatesProps",
12330
- space: 2,
12331
- direction: "horizontal"
12332
- }, /*#__PURE__*/React__default["default"].createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default["default"].createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default["default"].createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default["default"].createElement("span", null, " "));
12333
- };
12334
-
12335
- var _excluded$1 = ["props", "children"];
12336
- var State = function State(_ref) {
12337
- var props = _ref.props,
12338
- children = _ref.children,
12339
- rest = _objectWithoutProperties(_ref, _excluded$1);
12340
-
12341
- var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
12342
- var innerChildren = isRenderProps(children) ? children(props) : children;
12343
- return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
12344
- className: "State"
12345
- }, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
12346
- className: "State__props"
12347
- }, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
12348
- props: props
12349
- }, innerChildren)));
12350
- };
12351
-
12352
- var _excluded = ["states", "children"];
12353
- var States = function States(_ref) {
12354
- var _ref$states = _ref.states,
12355
- states = _ref$states === void 0 ? [{}] : _ref$states,
12356
- children = _ref.children,
12357
- rest = _objectWithoutProperties(_ref, _excluded);
12358
-
12359
- return /*#__PURE__*/React__default["default"].createElement("div", {
12360
- className: "States"
12361
- }, states.map(function (props, i) {
12362
- return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
12363
- key: i,
12364
- props: props
12365
- }, rest), children);
12366
- }));
12367
- };
12368
-
12369
12419
  var tokens = {
12370
12420
  colors: dist$4.colors,
12371
12421
  typography: dist$4.typography,