@moda/om 16.2.0 → 16.2.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.
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs.js +310 -278
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +309 -277
- package/dist/index.esm.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +18 -8
- package/src/components/AspectRatioBox/AspectRatioBox.tsx +4 -4
- package/src/components/AspectRatioBox/index.ts +1 -1
- package/src/components/Badge/Badge.stories.tsx +5 -5
- package/src/components/Badge/Badge.test.tsx +1 -1
- package/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.tsx +6 -6
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +6 -6
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Breakpoint/Breakpoint.stories.tsx +10 -9
- package/src/components/Breakpoint/Breakpoint.test.tsx +2 -2
- package/src/components/Breakpoint/generateMediaQuery.ts +5 -4
- package/src/components/Button/Button.stories.tsx +4 -4
- package/src/components/Checkbox/Checkbox.stories.tsx +5 -5
- package/src/components/Checkbox/Checkbox.test.tsx +3 -3
- package/src/components/Checkbox/Checkbox.tsx +4 -4
- package/src/components/Clickable/Clickable.stories.tsx +3 -3
- package/src/components/ColorSwatch/ColorSwatch.stories.tsx +11 -11
- package/src/components/ColorSwatch/ColorSwatch.test.tsx +1 -1
- package/src/components/ColorSwatch/ColorSwatch.tsx +1 -1
- package/src/components/Constrain/Constrain.stories.tsx +1 -1
- package/src/components/Constrain/ExceedConstrain.stories.tsx +2 -2
- package/src/components/ControlLink/ControlLink.stories.tsx +1 -1
- package/src/components/ControlLink/index.ts +1 -1
- package/src/components/CreditCardNumberInput/CreditCardNumberInput.stories.tsx +1 -1
- package/src/components/CreditCardNumberInput/CreditCardNumberInput.test.tsx +4 -4
- package/src/components/CreditCardNumberInput/CreditCardNumberInput.tsx +1 -0
- package/src/components/DefinitionList/DefinitionList.stories.tsx +3 -3
- package/src/components/DefinitionList/DefinitionList.test.tsx +1 -1
- package/src/components/Divider/Divider.stories.tsx +4 -4
- package/src/components/Divider/Divider.test.tsx +1 -1
- package/src/components/Divider/Divider.tsx +1 -1
- package/src/components/Divider/NoLineDivider.tsx +1 -1
- package/src/components/Divider/TwoLineDivider.tsx +1 -1
- package/src/components/Expandable/Expandable.stories.tsx +8 -8
- package/src/components/Expandable/Expandable.test.tsx +1 -1
- package/src/components/Expandable/Expandable.tsx +3 -2
- package/src/components/Field/Field.stories.tsx +4 -4
- package/src/components/Field/Field.test.tsx +7 -7
- package/src/components/Field/Field.tsx +5 -5
- package/src/components/Field/index.ts +1 -0
- package/src/components/Loading/Loading.test.tsx +1 -1
- package/src/components/Loading/Loading.tsx +2 -1
- package/src/components/Modal/Modal.test.tsx +2 -2
- package/src/components/ModalOverlay/ModalOverlay.test.tsx +2 -2
- package/src/components/ModalOverlay/ModalOverlay.tsx +2 -2
- package/src/components/Overlay/Overlay.stories.tsx +1 -1
- package/src/components/Paginator/Paginator.tsx +3 -3
- package/src/components/PasswordInput/PasswordInput.stories.tsx +1 -1
- package/src/components/PasswordInput/PasswordInput.tsx +6 -6
- package/src/components/Popover/Popover.stories.tsx +1 -1
- package/src/components/Popover/Popover.tsx +10 -7
- package/src/components/PromoBanner/PromoBanner.stories.tsx +9 -9
- package/src/components/PromoBanner/PromoBanner.tsx +1 -1
- package/src/components/RadioButton/RadioButton.stories.tsx +2 -2
- package/src/components/RadioButton/RadioButton.tsx +4 -4
- package/src/components/SearchInput/SearchInput.stories.tsx +2 -2
- package/src/components/SearchInput/SearchInput.test.tsx +1 -1
- package/src/components/SearchInput/SearchInput.tsx +3 -3
- package/src/components/Select/MultiSelect.tsx +7 -7
- package/src/components/Select/Select.stories.tsx +15 -14
- package/src/components/Select/Select.test.tsx +13 -13
- package/src/components/Select/Select.tsx +7 -7
- package/src/components/Select/SelectOption.tsx +1 -1
- package/src/components/Select/SelectOptions.tsx +5 -5
- package/src/components/SelectableButton/SelectableButton.stories.tsx +1 -1
- package/src/components/Shape/ArcWindow.tsx +10 -10
- package/src/components/Shape/Bradley.tsx +4 -4
- package/src/components/Shape/Brancusi.tsx +4 -4
- package/src/components/Shape/Circle.tsx +10 -10
- package/src/components/Shape/Diamond.tsx +10 -10
- package/src/components/Shape/Keyhole.tsx +4 -4
- package/src/components/Shape/Mirror.tsx +4 -4
- package/src/components/Shape/Oval.tsx +4 -4
- package/src/components/Shape/Triangle.tsx +7 -7
- package/src/components/Shape/Window.tsx +4 -4
- package/src/components/Stack/Stack.stories.tsx +3 -3
- package/src/components/Stack/Stack.test.tsx +1 -1
- package/src/components/Tabs/TabList.tsx +1 -1
- package/src/components/Tabs/TabPanel.tsx +1 -1
- package/src/components/Tabs/TabPanels.tsx +1 -1
- package/src/components/Tabs/Tabs.stories.tsx +2 -2
- package/src/components/Tabs/Tabs.test.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +7 -1
- package/src/components/Tag/Tag.tsx +6 -5
- package/src/components/Text/Text.stories.tsx +5 -5
- package/src/components/Text/Text.test.tsx +1 -1
- package/src/components/TextInput/TextInput.stories.tsx +1 -1
- package/src/components/TextInput/TextInput.test.tsx +1 -1
- package/src/components/Textarea/Textarea.stories.tsx +1 -1
- package/src/components/Textarea/Textarea.test.tsx +3 -3
- package/src/components/Toast/Toast.stories.tsx +1 -1
- package/src/components/Toast/Toast.test.tsx +1 -1
- package/src/components/Toast/Toast.tsx +6 -6
- package/src/components/VerticalDivider/VerticalDivider.stories.tsx +3 -3
- package/src/components/VerticalDivider/VerticalDivider.test.tsx +2 -2
- package/src/hooks/useKeyboardListNavigation.spec.ts +2 -1
- package/src/hooks/useKeyboardListNavigation.ts +2 -0
- package/src/hooks/useUpdateEffect.ts +1 -0
- package/src/index.ts +2 -2
- package/src/mixins/font-smoothing/font-smoothing.stories.tsx +8 -8
- package/src/mixins/overflow-scroll/overflow-scroll.stories.tsx +2 -2
- package/src/mixins/stack/stack.stories.tsx +5 -6
- package/src/mixins/thin-underline/thin-underline.stories.tsx +1 -1
- package/src/mixins/visually-hidden/visually-hidden.stories.tsx +1 -1
- package/src/utilities/States/State.tsx +3 -2
- package/src/utilities/States/States.tsx +4 -3
- package/src/utilities/States/StatesProps.tsx +5 -2
- package/src/utilities/States/isRenderProps.ts +1 -0
- 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 : {};
|
|
@@ -1274,6 +1274,182 @@ function _nonIterableRest() {
|
|
|
1274
1274
|
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
1275
|
}
|
|
1276
1276
|
|
|
1277
|
+
var isRenderProps = function isRenderProps(children) {
|
|
1278
|
+
return typeof children === 'function';
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1281
|
+
var classnames = {exports: {}};
|
|
1282
|
+
|
|
1283
|
+
(function (module) {
|
|
1284
|
+
/* global define */
|
|
1285
|
+
(function () {
|
|
1286
|
+
|
|
1287
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1288
|
+
|
|
1289
|
+
function classNames() {
|
|
1290
|
+
var classes = [];
|
|
1291
|
+
|
|
1292
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1293
|
+
var arg = arguments[i];
|
|
1294
|
+
if (!arg) continue;
|
|
1295
|
+
|
|
1296
|
+
var argType = _typeof(arg);
|
|
1297
|
+
|
|
1298
|
+
if (argType === 'string' || argType === 'number') {
|
|
1299
|
+
classes.push(arg);
|
|
1300
|
+
} else if (Array.isArray(arg)) {
|
|
1301
|
+
if (arg.length) {
|
|
1302
|
+
var inner = classNames.apply(null, arg);
|
|
1303
|
+
|
|
1304
|
+
if (inner) {
|
|
1305
|
+
classes.push(inner);
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
} else if (argType === 'object') {
|
|
1309
|
+
if (arg.toString === Object.prototype.toString) {
|
|
1310
|
+
for (var key in arg) {
|
|
1311
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1312
|
+
classes.push(key);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
} else {
|
|
1316
|
+
classes.push(arg.toString());
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
return classes.join(' ');
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
if (module.exports) {
|
|
1325
|
+
classNames["default"] = classNames;
|
|
1326
|
+
module.exports = classNames;
|
|
1327
|
+
} else {
|
|
1328
|
+
window.classNames = classNames;
|
|
1329
|
+
}
|
|
1330
|
+
})();
|
|
1331
|
+
})(classnames);
|
|
1332
|
+
|
|
1333
|
+
var classNames = classnames.exports;
|
|
1334
|
+
|
|
1335
|
+
var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
1336
|
+
var Stack = function Stack(_ref) {
|
|
1337
|
+
var className = _ref.className,
|
|
1338
|
+
children = _ref.children,
|
|
1339
|
+
space = _ref.space,
|
|
1340
|
+
_ref$direction = _ref.direction,
|
|
1341
|
+
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
1342
|
+
alignItems = _ref.alignItems,
|
|
1343
|
+
justifyContent = _ref.justifyContent,
|
|
1344
|
+
style = _ref.style,
|
|
1345
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
1346
|
+
|
|
1347
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
1348
|
+
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
1349
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1350
|
+
alignItems: alignItems,
|
|
1351
|
+
justifyContent: justifyContent
|
|
1352
|
+
})
|
|
1353
|
+
}, rest), children);
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
var omit = function omit(obj) {
|
|
1357
|
+
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1358
|
+
keys[_key - 1] = arguments[_key];
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
return Object.entries(obj).filter(function (_ref) {
|
|
1362
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1363
|
+
key = _ref2[0];
|
|
1364
|
+
|
|
1365
|
+
return !keys.includes(key);
|
|
1366
|
+
}).reduce(function (obj, _ref3) {
|
|
1367
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1368
|
+
key = _ref4[0],
|
|
1369
|
+
val = _ref4[1];
|
|
1370
|
+
|
|
1371
|
+
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
1372
|
+
}, {});
|
|
1373
|
+
};
|
|
1374
|
+
|
|
1375
|
+
var truncate = function truncate(string) {
|
|
1376
|
+
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
1377
|
+
if (!string) return null;
|
|
1378
|
+
var ellipsis = string.length > maxLength;
|
|
1379
|
+
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
1380
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
var stringifyProps = function stringifyProps(props) {
|
|
1384
|
+
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
1385
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1386
|
+
key = _ref2[0],
|
|
1387
|
+
value = _ref2[1];
|
|
1388
|
+
|
|
1389
|
+
if (key === 'children') return "".concat(memo, " children={...}");
|
|
1390
|
+
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
1391
|
+
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
1392
|
+
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
1393
|
+
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
1394
|
+
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
1395
|
+
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
1396
|
+
}, '');
|
|
1397
|
+
return stringifiedProps.trim();
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1401
|
+
|
|
1402
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1403
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1404
|
+
var isEmpty = function isEmpty(obj) {
|
|
1405
|
+
return Object.entries(obj || {}).length === 0;
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
var StatesProps = function StatesProps(_ref) {
|
|
1409
|
+
var props = _ref.props,
|
|
1410
|
+
children = _ref.children;
|
|
1411
|
+
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1412
|
+
return /*#__PURE__*/React__default["default"].createElement(Stack, {
|
|
1413
|
+
className: "StatesProps",
|
|
1414
|
+
space: 2,
|
|
1415
|
+
direction: "horizontal"
|
|
1416
|
+
}, /*#__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, " "));
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
var _excluded$D = ["props", "children"];
|
|
1420
|
+
var State = function State(_ref) {
|
|
1421
|
+
var props = _ref.props,
|
|
1422
|
+
children = _ref.children,
|
|
1423
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
1424
|
+
|
|
1425
|
+
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default["default"].cloneElement(children, props);
|
|
1426
|
+
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
1427
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
1428
|
+
className: "State"
|
|
1429
|
+
}, rest), Specimen, /*#__PURE__*/React__default["default"].createElement("code", {
|
|
1430
|
+
className: "State__props"
|
|
1431
|
+
}, /*#__PURE__*/React__default["default"].createElement(StatesProps, {
|
|
1432
|
+
props: props
|
|
1433
|
+
}, innerChildren)));
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
var _excluded$C = ["states", "children"];
|
|
1437
|
+
var States = function States(_ref) {
|
|
1438
|
+
var _ref$states = _ref.states,
|
|
1439
|
+
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
1440
|
+
children = _ref.children,
|
|
1441
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
1442
|
+
|
|
1443
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1444
|
+
className: "States"
|
|
1445
|
+
}, states.map(function (props, index) {
|
|
1446
|
+
return /*#__PURE__*/React__default["default"].createElement(State, _extends$1({
|
|
1447
|
+
key: index,
|
|
1448
|
+
props: props
|
|
1449
|
+
}, rest), children);
|
|
1450
|
+
}));
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1277
1453
|
var _assign = function __assign() {
|
|
1278
1454
|
_assign = Object.assign || function __assign(t) {
|
|
1279
1455
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -1628,7 +1804,7 @@ RemoveScroll.classNames = {
|
|
|
1628
1804
|
};
|
|
1629
1805
|
|
|
1630
1806
|
function _extends() {
|
|
1631
|
-
_extends = Object.assign
|
|
1807
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1632
1808
|
for (var i = 1; i < arguments.length; i++) {
|
|
1633
1809
|
var source = arguments[i];
|
|
1634
1810
|
|
|
@@ -1641,7 +1817,6 @@ function _extends() {
|
|
|
1641
1817
|
|
|
1642
1818
|
return target;
|
|
1643
1819
|
};
|
|
1644
|
-
|
|
1645
1820
|
return _extends.apply(this, arguments);
|
|
1646
1821
|
}
|
|
1647
1822
|
|
|
@@ -3327,11 +3502,10 @@ var FocusOn$1 = /*#__PURE__*/React__namespace.forwardRef(function (props, parent
|
|
|
3327
3502
|
});
|
|
3328
3503
|
|
|
3329
3504
|
function _setPrototypeOf(o, p) {
|
|
3330
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
3505
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
3331
3506
|
o.__proto__ = p;
|
|
3332
3507
|
return o;
|
|
3333
3508
|
};
|
|
3334
|
-
|
|
3335
3509
|
return _setPrototypeOf(o, p);
|
|
3336
3510
|
}
|
|
3337
3511
|
|
|
@@ -4451,24 +4625,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
|
|
|
4451
4625
|
};
|
|
4452
4626
|
};
|
|
4453
4627
|
|
|
4628
|
+
/**
|
|
4629
|
+
* creates a hook to control style singleton
|
|
4630
|
+
* @see {@link styleSingleton} for a safer component version
|
|
4631
|
+
* @example
|
|
4632
|
+
* ```tsx
|
|
4633
|
+
* const useStyle = styleHookSingleton();
|
|
4634
|
+
* ///
|
|
4635
|
+
* useStyle('body { overflow: hidden}');
|
|
4636
|
+
*/
|
|
4637
|
+
|
|
4454
4638
|
var styleHookSingleton = function styleHookSingleton() {
|
|
4455
4639
|
var sheet = stylesheetSingleton();
|
|
4456
|
-
return function (styles) {
|
|
4640
|
+
return function (styles, isDynamic) {
|
|
4457
4641
|
React__namespace.useEffect(function () {
|
|
4458
4642
|
sheet.add(styles);
|
|
4459
4643
|
return function () {
|
|
4460
4644
|
sheet.remove();
|
|
4461
4645
|
};
|
|
4462
|
-
}, [styles]);
|
|
4646
|
+
}, [styles && isDynamic]);
|
|
4463
4647
|
};
|
|
4464
4648
|
};
|
|
4465
4649
|
|
|
4650
|
+
/**
|
|
4651
|
+
* create a Component to add styles on demand
|
|
4652
|
+
* - styles are added when first instance is mounted
|
|
4653
|
+
* - styles are removed when the last instance is unmounted
|
|
4654
|
+
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
|
|
4655
|
+
*/
|
|
4656
|
+
|
|
4466
4657
|
var styleSingleton = function styleSingleton() {
|
|
4467
4658
|
var useStyle = styleHookSingleton();
|
|
4468
4659
|
|
|
4469
4660
|
var Sheet = function Sheet(_a) {
|
|
4470
|
-
var styles = _a.styles
|
|
4471
|
-
|
|
4661
|
+
var styles = _a.styles,
|
|
4662
|
+
dynamic = _a.dynamic;
|
|
4663
|
+
useStyle(styles, dynamic);
|
|
4472
4664
|
return null;
|
|
4473
4665
|
};
|
|
4474
4666
|
|
|
@@ -4488,6 +4680,13 @@ var parse = function parse(x) {
|
|
|
4488
4680
|
|
|
4489
4681
|
var getOffset = function getOffset(gapMode) {
|
|
4490
4682
|
var cs = window.getComputedStyle(document.body);
|
|
4683
|
+
|
|
4684
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4685
|
+
if (cs.overflowY === 'hidden') {
|
|
4686
|
+
console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4491
4690
|
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
|
|
4492
4691
|
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
|
|
4493
4692
|
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
|
|
@@ -4536,17 +4735,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
|
|
|
4536
4735
|
|
|
4537
4736
|
|
|
4538
4737
|
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
4738
|
var noRelative = props.noRelative,
|
|
4547
4739
|
noImportant = props.noImportant,
|
|
4548
|
-
|
|
4549
|
-
gapMode =
|
|
4740
|
+
_a = props.gapMode,
|
|
4741
|
+
gapMode = _a === void 0 ? 'margin' : _a;
|
|
4742
|
+
var gap = React__namespace.useMemo(function () {
|
|
4743
|
+
return getGapWidth(gapMode);
|
|
4744
|
+
}, [gapMode]);
|
|
4550
4745
|
return /*#__PURE__*/React__namespace.createElement(Style$1, {
|
|
4551
4746
|
styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
|
|
4552
4747
|
});
|
|
@@ -5119,60 +5314,6 @@ var FocusOn = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
|
5119
5314
|
}));
|
|
5120
5315
|
});
|
|
5121
5316
|
|
|
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
5317
|
var dist$3 = {};
|
|
5177
5318
|
|
|
5178
5319
|
var scale = {};
|
|
@@ -5280,7 +5421,7 @@ var scale = {};
|
|
|
5280
5421
|
__exportStar(scale, exports);
|
|
5281
5422
|
})(dist$3);
|
|
5282
5423
|
|
|
5283
|
-
var _excluded$
|
|
5424
|
+
var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
|
|
5284
5425
|
var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
|
|
5285
5426
|
var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
|
|
5286
5427
|
var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
|
|
@@ -5295,7 +5436,7 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
5295
5436
|
outlined = _ref$outlined === void 0 ? false : _ref$outlined,
|
|
5296
5437
|
children = _ref.children,
|
|
5297
5438
|
className = _ref.className,
|
|
5298
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5439
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5299
5440
|
|
|
5300
5441
|
var _scale = dist$3.scale({
|
|
5301
5442
|
width: aspectWidth,
|
|
@@ -5325,23 +5466,23 @@ var AspectRatioBox = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
5325
5466
|
});
|
|
5326
5467
|
AspectRatioBox.displayName = 'AspectRatioBox';
|
|
5327
5468
|
|
|
5328
|
-
var _excluded$
|
|
5469
|
+
var _excluded$A = ["className", "theme", "children"];
|
|
5329
5470
|
var Badge = function Badge(_ref) {
|
|
5330
5471
|
var className = _ref.className,
|
|
5331
5472
|
theme = _ref.theme,
|
|
5332
5473
|
children = _ref.children,
|
|
5333
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5474
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5334
5475
|
|
|
5335
5476
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
|
|
5336
5477
|
className: classNames('Badge', theme && "Badge--".concat(theme), className)
|
|
5337
5478
|
}, rest), children);
|
|
5338
5479
|
};
|
|
5339
5480
|
|
|
5340
|
-
var _excluded$
|
|
5481
|
+
var _excluded$z = ["children", "className"];
|
|
5341
5482
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
5342
5483
|
var children = _ref.children,
|
|
5343
5484
|
className = _ref.className,
|
|
5344
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5485
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5345
5486
|
|
|
5346
5487
|
var position = 0;
|
|
5347
5488
|
return /*#__PURE__*/React__default["default"].createElement("ol", _extends$1({
|
|
@@ -5361,7 +5502,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
5361
5502
|
}));
|
|
5362
5503
|
};
|
|
5363
5504
|
|
|
5364
|
-
var _excluded$
|
|
5505
|
+
var _excluded$y = ["className", "styleless", "disabled"];
|
|
5365
5506
|
|
|
5366
5507
|
var isLink = function isLink(props) {
|
|
5367
5508
|
return 'to' in props;
|
|
@@ -5380,7 +5521,7 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
5380
5521
|
_ref$styleless = _ref.styleless,
|
|
5381
5522
|
styleless = _ref$styleless === void 0 ? false : _ref$styleless,
|
|
5382
5523
|
disabled = _ref.disabled,
|
|
5383
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5524
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
5384
5525
|
|
|
5385
5526
|
var props = _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5386
5527
|
className: classNames({
|
|
@@ -5403,14 +5544,14 @@ var Clickable = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
5403
5544
|
});
|
|
5404
5545
|
Clickable.displayName = 'Clickable';
|
|
5405
5546
|
|
|
5406
|
-
var _excluded$
|
|
5547
|
+
var _excluded$x = ["className", "disabled", "children", "underlined"];
|
|
5407
5548
|
var ControlLink = function ControlLink(_ref) {
|
|
5408
5549
|
var className = _ref.className,
|
|
5409
5550
|
disabled = _ref.disabled,
|
|
5410
5551
|
children = _ref.children,
|
|
5411
5552
|
_ref$underlined = _ref.underlined,
|
|
5412
5553
|
underlined = _ref$underlined === void 0 ? true : _ref$underlined,
|
|
5413
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5554
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
5414
5555
|
|
|
5415
5556
|
return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({}, rest, {
|
|
5416
5557
|
className: classNames('ControlLink', {
|
|
@@ -5422,12 +5563,12 @@ var ControlLink = function ControlLink(_ref) {
|
|
|
5422
5563
|
}), children);
|
|
5423
5564
|
};
|
|
5424
5565
|
|
|
5425
|
-
var _excluded$
|
|
5566
|
+
var _excluded$w = ["children", "position", "className"];
|
|
5426
5567
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
5427
5568
|
var children = _ref.children,
|
|
5428
5569
|
position = _ref.position,
|
|
5429
5570
|
className = _ref.className,
|
|
5430
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5571
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
5431
5572
|
|
|
5432
5573
|
return /*#__PURE__*/React__default["default"].createElement("li", {
|
|
5433
5574
|
className: classNames('Breadcrumb', className),
|
|
@@ -5446,7 +5587,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
5446
5587
|
}));
|
|
5447
5588
|
};
|
|
5448
5589
|
|
|
5449
|
-
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
5590
|
+
var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
5591
|
+
|
|
5450
5592
|
var ONE_PIXEL = 1 / 16;
|
|
5451
5593
|
var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
5452
5594
|
var mode = _ref.mode,
|
|
@@ -5456,21 +5598,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
|
5456
5598
|
case 'at':
|
|
5457
5599
|
{
|
|
5458
5600
|
var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
|
|
5459
|
-
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
|
|
5601
|
+
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
|
|
5460
5602
|
return {
|
|
5461
5603
|
min: prevWidth,
|
|
5462
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5604
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5463
5605
|
};
|
|
5464
5606
|
}
|
|
5465
5607
|
|
|
5466
5608
|
case 'gt':
|
|
5467
5609
|
return {
|
|
5468
|
-
min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
|
|
5610
|
+
min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
|
|
5469
5611
|
};
|
|
5470
5612
|
|
|
5471
5613
|
case 'lt':
|
|
5472
5614
|
return {
|
|
5473
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5615
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5474
5616
|
};
|
|
5475
5617
|
}
|
|
5476
5618
|
};
|
|
@@ -5560,10 +5702,10 @@ var useBreakpoint = function useBreakpoint(props) {
|
|
|
5560
5702
|
};
|
|
5561
5703
|
};
|
|
5562
5704
|
|
|
5563
|
-
var _excluded$
|
|
5705
|
+
var _excluded$v = ["children"];
|
|
5564
5706
|
var Breakpoint = function Breakpoint(_ref) {
|
|
5565
5707
|
var children = _ref.children,
|
|
5566
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5708
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
5567
5709
|
|
|
5568
5710
|
var _discriminate = discriminate(rest),
|
|
5569
5711
|
mode = _discriminate.mode,
|
|
@@ -5577,7 +5719,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
5577
5719
|
}, children) : null;
|
|
5578
5720
|
};
|
|
5579
5721
|
|
|
5580
|
-
var _excluded$
|
|
5722
|
+
var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
|
|
5581
5723
|
var Button = function Button(_ref) {
|
|
5582
5724
|
var secondary = _ref.secondary,
|
|
5583
5725
|
chip = _ref.chip,
|
|
@@ -5585,7 +5727,7 @@ var Button = function Button(_ref) {
|
|
|
5585
5727
|
focus = _ref.focus,
|
|
5586
5728
|
disabled = _ref.disabled,
|
|
5587
5729
|
className = _ref.className,
|
|
5588
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5730
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
5589
5731
|
|
|
5590
5732
|
return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
|
|
5591
5733
|
className: classNames('Button', {
|
|
@@ -5736,7 +5878,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
5736
5878
|
|
|
5737
5879
|
Circle12.displayName = 'Circle12';
|
|
5738
5880
|
|
|
5739
|
-
var _excluded$
|
|
5881
|
+
var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
|
|
5740
5882
|
var CHECKED_ITEM_PROPS = {
|
|
5741
5883
|
className: 'Checkbox__check-mark',
|
|
5742
5884
|
height: '85%',
|
|
@@ -5754,7 +5896,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5754
5896
|
disabled = _ref.disabled,
|
|
5755
5897
|
_ref$checkIcon = _ref.checkIcon,
|
|
5756
5898
|
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
5757
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5899
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
5758
5900
|
|
|
5759
5901
|
var _useState = React.useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
5760
5902
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5842,7 +5984,7 @@ var SKU_COLORS = {
|
|
|
5842
5984
|
yellow: '#ffca44'
|
|
5843
5985
|
};
|
|
5844
5986
|
|
|
5845
|
-
var _excluded$
|
|
5987
|
+
var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
|
|
5846
5988
|
var ColorSwatch = function ColorSwatch(_ref) {
|
|
5847
5989
|
var className = _ref.className,
|
|
5848
5990
|
size = _ref.size,
|
|
@@ -5856,7 +5998,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5856
5998
|
onClick = _ref.onClick,
|
|
5857
5999
|
onMouseEnter = _ref.onMouseEnter,
|
|
5858
6000
|
disabled = _ref.disabled,
|
|
5859
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6001
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
5860
6002
|
|
|
5861
6003
|
var handleClick = React.useCallback(function (_event) {
|
|
5862
6004
|
onClick && onClick(color);
|
|
@@ -5892,22 +6034,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5892
6034
|
}));
|
|
5893
6035
|
};
|
|
5894
6036
|
|
|
5895
|
-
var _excluded$
|
|
6037
|
+
var _excluded$r = ["className", "children"];
|
|
5896
6038
|
var Constrain = function Constrain(_ref) {
|
|
5897
6039
|
var className = _ref.className,
|
|
5898
6040
|
children = _ref.children,
|
|
5899
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6041
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
5900
6042
|
|
|
5901
6043
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
5902
6044
|
className: classNames('Constrain', className)
|
|
5903
6045
|
}, rest), children);
|
|
5904
6046
|
};
|
|
5905
6047
|
|
|
5906
|
-
var _excluded$
|
|
6048
|
+
var _excluded$q = ["className", "children"];
|
|
5907
6049
|
var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
5908
6050
|
var className = _ref.className,
|
|
5909
6051
|
children = _ref.children,
|
|
5910
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6052
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
5911
6053
|
|
|
5912
6054
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
5913
6055
|
className: classNames('ExceedConstrain', className)
|
|
@@ -8319,7 +8461,7 @@ var Warning16 = function Warning16(_a) {
|
|
|
8319
8461
|
|
|
8320
8462
|
Warning16.displayName = 'Warning16';
|
|
8321
8463
|
|
|
8322
|
-
var _excluded$
|
|
8464
|
+
var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
|
|
8323
8465
|
var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
8324
8466
|
var className = _ref.className,
|
|
8325
8467
|
disabled = _ref.disabled,
|
|
@@ -8329,7 +8471,7 @@ var TextInput = /*#__PURE__*/React__default["default"].forwardRef(function (_ref
|
|
|
8329
8471
|
label = _ref.label,
|
|
8330
8472
|
_onChange = _ref.onChange,
|
|
8331
8473
|
onChangeEvent = _ref.onChangeEvent,
|
|
8332
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8474
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
8333
8475
|
|
|
8334
8476
|
return /*#__PURE__*/React__default["default"].createElement("input", _extends$1({
|
|
8335
8477
|
className: classNames('TextInput', className, {
|
|
@@ -8668,7 +8810,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8668
8810
|
return function () {
|
|
8669
8811
|
el.removeEventListener('keydown', handleKeyDown);
|
|
8670
8812
|
};
|
|
8671
|
-
}, [handleKeyDown, ref, idleTimeout]);
|
|
8813
|
+
}, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8814
|
+
|
|
8672
8815
|
React.useEffect(function () {
|
|
8673
8816
|
return dispatch({
|
|
8674
8817
|
type: 'RESET',
|
|
@@ -8684,6 +8827,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8684
8827
|
});
|
|
8685
8828
|
};
|
|
8686
8829
|
|
|
8830
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
8687
8831
|
var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
8688
8832
|
var didMountRef = React.useRef(false);
|
|
8689
8833
|
React.useEffect(function () {
|
|
@@ -8695,7 +8839,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
|
8695
8839
|
}, deps);
|
|
8696
8840
|
};
|
|
8697
8841
|
|
|
8698
|
-
var _excluded$
|
|
8842
|
+
var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
|
|
8699
8843
|
var Text = function Text(_ref) {
|
|
8700
8844
|
var className = _ref.className,
|
|
8701
8845
|
_ref$treatment = _ref.treatment,
|
|
@@ -8705,7 +8849,7 @@ var Text = function Text(_ref) {
|
|
|
8705
8849
|
family = _ref.family,
|
|
8706
8850
|
children = _ref.children,
|
|
8707
8851
|
style = _ref.style,
|
|
8708
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8852
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
8709
8853
|
|
|
8710
8854
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends$1({
|
|
8711
8855
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
@@ -8862,7 +9006,7 @@ var Search20 = function Search20(_a) {
|
|
|
8862
9006
|
|
|
8863
9007
|
Search20.displayName = 'Search20';
|
|
8864
9008
|
|
|
8865
|
-
var _excluded$
|
|
9009
|
+
var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
|
|
8866
9010
|
var DEFAULT_INPUT_VALUE = '';
|
|
8867
9011
|
var SearchInput = function SearchInput(_ref) {
|
|
8868
9012
|
var className = _ref.className,
|
|
@@ -8871,7 +9015,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
8871
9015
|
onClear = _ref.onClear,
|
|
8872
9016
|
_ref$value = _ref.value,
|
|
8873
9017
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
8874
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9018
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
8875
9019
|
|
|
8876
9020
|
var ref = React.useRef(null);
|
|
8877
9021
|
|
|
@@ -9097,7 +9241,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9097
9241
|
}, option.label);
|
|
9098
9242
|
};
|
|
9099
9243
|
|
|
9100
|
-
var _excluded$
|
|
9244
|
+
var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className"];
|
|
9101
9245
|
var SelectOptions = function SelectOptions(_ref) {
|
|
9102
9246
|
var idRef = _ref.idRef,
|
|
9103
9247
|
searchable = _ref.searchable,
|
|
@@ -9108,7 +9252,7 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9108
9252
|
onSelect = _ref.onSelect,
|
|
9109
9253
|
onFocus = _ref.onFocus,
|
|
9110
9254
|
className = _ref.className,
|
|
9111
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9255
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
9112
9256
|
|
|
9113
9257
|
var _useState = React.useState(''),
|
|
9114
9258
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -9286,7 +9430,7 @@ var useSelect = function useSelect(_ref) {
|
|
|
9286
9430
|
};
|
|
9287
9431
|
};
|
|
9288
9432
|
|
|
9289
|
-
var _excluded$
|
|
9433
|
+
var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value"];
|
|
9290
9434
|
var Select = function Select(_ref) {
|
|
9291
9435
|
var _ref2;
|
|
9292
9436
|
|
|
@@ -9312,7 +9456,7 @@ var Select = function Select(_ref) {
|
|
|
9312
9456
|
_ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
|
|
9313
9457
|
shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
|
|
9314
9458
|
value = _ref.value,
|
|
9315
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9459
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
9316
9460
|
|
|
9317
9461
|
var _useSelect = useSelect({
|
|
9318
9462
|
value: value,
|
|
@@ -10978,7 +11122,7 @@ var Exit16 = function Exit16(_a) {
|
|
|
10978
11122
|
|
|
10979
11123
|
Exit16.displayName = 'Exit16';
|
|
10980
11124
|
|
|
10981
|
-
var _excluded$
|
|
11125
|
+
var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
|
|
10982
11126
|
var MultiSelect = function MultiSelect(_ref) {
|
|
10983
11127
|
var className = _ref.className,
|
|
10984
11128
|
defaultValue = _ref.defaultValue,
|
|
@@ -10993,7 +11137,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10993
11137
|
searchable = _ref.searchable,
|
|
10994
11138
|
shiftIconLeftwards = _ref.shiftIconLeftwards,
|
|
10995
11139
|
value = _ref.value,
|
|
10996
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11140
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
10997
11141
|
|
|
10998
11142
|
var _useSelect = useSelect({
|
|
10999
11143
|
value: value,
|
|
@@ -11093,14 +11237,14 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11093
11237
|
}));
|
|
11094
11238
|
};
|
|
11095
11239
|
|
|
11096
|
-
var _excluded$
|
|
11240
|
+
var _excluded$j = ["className", "children", "error", "label", "placeholder"];
|
|
11097
11241
|
var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
11098
11242
|
var className = _ref.className,
|
|
11099
11243
|
children = _ref.children,
|
|
11100
11244
|
error = _ref.error,
|
|
11101
11245
|
label = _ref.label,
|
|
11102
11246
|
placeholder = _ref.placeholder,
|
|
11103
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11247
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
11104
11248
|
|
|
11105
11249
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
11106
11250
|
className: classNames('Field', className)
|
|
@@ -11129,17 +11273,17 @@ var Field = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, re
|
|
|
11129
11273
|
});
|
|
11130
11274
|
Field.displayName = 'Field';
|
|
11131
11275
|
|
|
11132
|
-
var _excluded$
|
|
11276
|
+
var _excluded$i = ["onChange"];
|
|
11133
11277
|
var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
|
|
11134
11278
|
var onChange = _ref.onChange,
|
|
11135
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11279
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
11136
11280
|
|
|
11137
11281
|
return /*#__PURE__*/React__default["default"].createElement(Field, _extends$1({}, rest, {
|
|
11138
11282
|
onChangeEvent: onChange
|
|
11139
11283
|
}));
|
|
11140
11284
|
};
|
|
11141
11285
|
|
|
11142
|
-
var _excluded$
|
|
11286
|
+
var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
|
|
11143
11287
|
var DEFAULT_MASK = '9999 9999 9999 9999';
|
|
11144
11288
|
var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
11145
11289
|
var _ref2;
|
|
@@ -11154,7 +11298,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11154
11298
|
onFocus = _ref.onFocus,
|
|
11155
11299
|
onBlur = _ref.onBlur,
|
|
11156
11300
|
onChange = _ref.onChange,
|
|
11157
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11301
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
11158
11302
|
|
|
11159
11303
|
var _useState = React.useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
11160
11304
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11180,6 +11324,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11180
11324
|
setValue(event.target.value);
|
|
11181
11325
|
onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
|
|
11182
11326
|
}, [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
|
|
11327
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11183
11328
|
|
|
11184
11329
|
var renderInputField = function renderInputField(inputProps) {
|
|
11185
11330
|
return /*#__PURE__*/React__default["default"].createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
|
|
@@ -11199,19 +11344,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11199
11344
|
}, renderInputField);
|
|
11200
11345
|
};
|
|
11201
11346
|
|
|
11202
|
-
var _excluded$
|
|
11347
|
+
var _excluded$g = ["term", "children", "className"];
|
|
11203
11348
|
var DefinitionList = function DefinitionList(_ref) {
|
|
11204
11349
|
var term = _ref.term,
|
|
11205
11350
|
children = _ref.children,
|
|
11206
11351
|
className = _ref.className,
|
|
11207
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11352
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
11208
11353
|
|
|
11209
11354
|
return /*#__PURE__*/React__default["default"].createElement("dl", _extends$1({
|
|
11210
11355
|
className: classNames('DefinitionList', className)
|
|
11211
11356
|
}, rest), /*#__PURE__*/React__default["default"].createElement("dt", null, term), /*#__PURE__*/React__default["default"].createElement("dd", null, children));
|
|
11212
11357
|
};
|
|
11213
11358
|
|
|
11214
|
-
var _excluded$
|
|
11359
|
+
var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
|
|
11215
11360
|
var Expandable = function Expandable(_ref) {
|
|
11216
11361
|
var name = _ref.name,
|
|
11217
11362
|
children = _ref.children,
|
|
@@ -11223,7 +11368,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11223
11368
|
dataTestId = _ref['data-testid'],
|
|
11224
11369
|
_ref$expanded = _ref.expanded,
|
|
11225
11370
|
__expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
11226
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11371
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
11227
11372
|
|
|
11228
11373
|
var _useState = React.useState(__expanded__),
|
|
11229
11374
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11252,7 +11397,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11252
11397
|
}, expanded || !virtual ? children : null));
|
|
11253
11398
|
};
|
|
11254
11399
|
|
|
11255
|
-
var _excluded$
|
|
11400
|
+
var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
|
|
11256
11401
|
var Divider = function Divider(_ref) {
|
|
11257
11402
|
var text = _ref.text,
|
|
11258
11403
|
treatment = _ref.treatment,
|
|
@@ -11260,7 +11405,7 @@ var Divider = function Divider(_ref) {
|
|
|
11260
11405
|
family = _ref.family,
|
|
11261
11406
|
type = _ref.type,
|
|
11262
11407
|
className = _ref.className,
|
|
11263
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11408
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
11264
11409
|
|
|
11265
11410
|
var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
|
|
11266
11411
|
var defaultFamily = type === 'two-line' ? undefined : 'serif';
|
|
@@ -11276,21 +11421,21 @@ var Divider = function Divider(_ref) {
|
|
|
11276
11421
|
|
|
11277
11422
|
var TwoLineDivider = function TwoLineDivider(props) {
|
|
11278
11423
|
return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
|
|
11279
|
-
type:
|
|
11424
|
+
type: "two-line"
|
|
11280
11425
|
}));
|
|
11281
11426
|
};
|
|
11282
11427
|
|
|
11283
11428
|
var NoLineDivider = function NoLineDivider(props) {
|
|
11284
11429
|
return /*#__PURE__*/React__default["default"].createElement(Divider, _extends$1({}, props, {
|
|
11285
|
-
type:
|
|
11430
|
+
type: "no-line"
|
|
11286
11431
|
}));
|
|
11287
11432
|
};
|
|
11288
11433
|
|
|
11289
|
-
var _excluded$
|
|
11434
|
+
var _excluded$d = ["className", "hidden"];
|
|
11290
11435
|
var Label = function Label(_ref) {
|
|
11291
11436
|
var className = _ref.className,
|
|
11292
11437
|
hidden = _ref.hidden,
|
|
11293
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11438
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
11294
11439
|
|
|
11295
11440
|
return /*#__PURE__*/React__default["default"].createElement("label", _extends$1({
|
|
11296
11441
|
className: classNames('Label', className, {
|
|
@@ -11422,11 +11567,11 @@ var ArcWindow = function ArcWindow() {
|
|
|
11422
11567
|
}));
|
|
11423
11568
|
};
|
|
11424
11569
|
|
|
11425
|
-
var _excluded$
|
|
11570
|
+
var _excluded$c = ["className"];
|
|
11426
11571
|
var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
|
|
11427
11572
|
var Loading = function Loading(_ref) {
|
|
11428
11573
|
var className = _ref.className,
|
|
11429
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11574
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
11430
11575
|
|
|
11431
11576
|
var _useCursor = dist.useCursor({
|
|
11432
11577
|
max: FRAMES.length
|
|
@@ -11434,8 +11579,9 @@ var Loading = function Loading(_ref) {
|
|
|
11434
11579
|
index = _useCursor.index,
|
|
11435
11580
|
handleNext = _useCursor.handleNext;
|
|
11436
11581
|
|
|
11582
|
+
var ONE_SECOND_INTERVAL = 1000;
|
|
11437
11583
|
React.useEffect(function () {
|
|
11438
|
-
var interval = setInterval(handleNext,
|
|
11584
|
+
var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
|
|
11439
11585
|
return function () {
|
|
11440
11586
|
return clearInterval(interval);
|
|
11441
11587
|
};
|
|
@@ -11501,13 +11647,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
|
|
|
11501
11647
|
})));
|
|
11502
11648
|
};
|
|
11503
11649
|
|
|
11504
|
-
var _excluded$
|
|
11650
|
+
var _excluded$b = ["className", "children", "onClose", "shards"];
|
|
11505
11651
|
var Modal = function Modal(_ref) {
|
|
11506
11652
|
var className = _ref.className,
|
|
11507
11653
|
children = _ref.children,
|
|
11508
11654
|
onClose = _ref.onClose,
|
|
11509
11655
|
shards = _ref.shards,
|
|
11510
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11656
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
11511
11657
|
|
|
11512
11658
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
11513
11659
|
className: classNames('Modal', className)
|
|
@@ -11518,14 +11664,14 @@ var Modal = function Modal(_ref) {
|
|
|
11518
11664
|
}, children));
|
|
11519
11665
|
};
|
|
11520
11666
|
|
|
11521
|
-
var _excluded$
|
|
11667
|
+
var _excluded$a = ["className", "children", "show"];
|
|
11522
11668
|
var UNMOUNT_DELAY_MS = 500;
|
|
11523
11669
|
var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
11524
11670
|
var className = _ref.className,
|
|
11525
11671
|
children = _ref.children,
|
|
11526
11672
|
_ref$show = _ref.show,
|
|
11527
11673
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11528
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11674
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
11529
11675
|
|
|
11530
11676
|
var _useState = React.useState(show),
|
|
11531
11677
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11555,7 +11701,7 @@ var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
11555
11701
|
});
|
|
11556
11702
|
Overlay.displayName = 'Overlay';
|
|
11557
11703
|
|
|
11558
|
-
var _excluded$
|
|
11704
|
+
var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
|
|
11559
11705
|
var ModalOverlay = function ModalOverlay(_ref) {
|
|
11560
11706
|
var children = _ref.children,
|
|
11561
11707
|
className = _ref.className,
|
|
@@ -11565,7 +11711,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
11565
11711
|
_ref$show = _ref.show,
|
|
11566
11712
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11567
11713
|
shards = _ref.shards,
|
|
11568
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11714
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
11569
11715
|
|
|
11570
11716
|
var element = React.useMemo(function () {
|
|
11571
11717
|
return typeof document !== 'undefined' ? document.createElement('div') : null;
|
|
@@ -11836,8 +11982,11 @@ var Paginator = function Paginator(_ref) {
|
|
|
11836
11982
|
})));
|
|
11837
11983
|
};
|
|
11838
11984
|
|
|
11839
|
-
var _excluded$
|
|
11985
|
+
var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
|
|
11840
11986
|
var POPOVER_MOUSEOUT_DELAY_MS = 200;
|
|
11987
|
+
var THREE_QUARTER_SECOND_DELAY = 750;
|
|
11988
|
+
var ONE_SECOND_DELAY = 1000;
|
|
11989
|
+
var FIVE_SECOND_DELAY = 5000;
|
|
11841
11990
|
var Mode;
|
|
11842
11991
|
|
|
11843
11992
|
(function (Mode) {
|
|
@@ -11861,7 +12010,7 @@ var Popover = function Popover(_ref) {
|
|
|
11861
12010
|
autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
|
|
11862
12011
|
_ref$smoothTransition = _ref.smoothTransitioning,
|
|
11863
12012
|
smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
|
|
11864
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12013
|
+
rest = _objectWithoutProperties(_ref, _excluded$8);
|
|
11865
12014
|
|
|
11866
12015
|
var _useState = React.useState(function () {
|
|
11867
12016
|
if (open && smoothTransitioning) {
|
|
@@ -11905,7 +12054,7 @@ var Popover = function Popover(_ref) {
|
|
|
11905
12054
|
if (mode !== Mode.Closing) return;
|
|
11906
12055
|
var closingTimeout = setTimeout(function () {
|
|
11907
12056
|
return setMode(Mode.Closed);
|
|
11908
|
-
},
|
|
12057
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11909
12058
|
return function () {
|
|
11910
12059
|
return clearTimeout(closingTimeout);
|
|
11911
12060
|
};
|
|
@@ -11914,7 +12063,7 @@ var Popover = function Popover(_ref) {
|
|
|
11914
12063
|
if (mode !== Mode.AutoOpening) return;
|
|
11915
12064
|
var openingTimeout = setTimeout(function () {
|
|
11916
12065
|
return setMode(Mode.AutoOpen);
|
|
11917
|
-
},
|
|
12066
|
+
}, ONE_SECOND_DELAY);
|
|
11918
12067
|
return function () {
|
|
11919
12068
|
return clearTimeout(openingTimeout);
|
|
11920
12069
|
};
|
|
@@ -11923,14 +12072,14 @@ var Popover = function Popover(_ref) {
|
|
|
11923
12072
|
if (mode !== Mode.Opening) return;
|
|
11924
12073
|
var openingTimeout = setTimeout(function () {
|
|
11925
12074
|
return setMode(Mode.Open);
|
|
11926
|
-
},
|
|
12075
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11927
12076
|
return function () {
|
|
11928
12077
|
return clearTimeout(openingTimeout);
|
|
11929
12078
|
};
|
|
11930
12079
|
}, [mode]);
|
|
11931
12080
|
React.useEffect(function () {
|
|
11932
12081
|
if (mode !== Mode.AutoOpen) return;
|
|
11933
|
-
var stayingTimeout = setTimeout(handleClose,
|
|
12082
|
+
var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
|
|
11934
12083
|
return function () {
|
|
11935
12084
|
return clearTimeout(stayingTimeout);
|
|
11936
12085
|
};
|
|
@@ -11964,11 +12113,11 @@ var Popover = function Popover(_ref) {
|
|
|
11964
12113
|
}, content)), children));
|
|
11965
12114
|
};
|
|
11966
12115
|
|
|
11967
|
-
var _excluded$
|
|
12116
|
+
var _excluded$7 = ["className", "children"];
|
|
11968
12117
|
var PromoBanner = function PromoBanner(_ref) {
|
|
11969
12118
|
var className = _ref.className,
|
|
11970
12119
|
children = _ref.children,
|
|
11971
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12120
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
11972
12121
|
|
|
11973
12122
|
var length = React.Children.count(children);
|
|
11974
12123
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
@@ -11987,7 +12136,7 @@ var PromoBanner = function PromoBanner(_ref) {
|
|
|
11987
12136
|
})));
|
|
11988
12137
|
};
|
|
11989
12138
|
|
|
11990
|
-
var _excluded$
|
|
12139
|
+
var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
|
|
11991
12140
|
var RadioButton = function RadioButton(_ref) {
|
|
11992
12141
|
var className = _ref.className,
|
|
11993
12142
|
checked = _ref.checked,
|
|
@@ -11995,7 +12144,7 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
11995
12144
|
value = _ref.value,
|
|
11996
12145
|
tabIndex = _ref.tabIndex,
|
|
11997
12146
|
disabled = _ref.disabled,
|
|
11998
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12147
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
11999
12148
|
|
|
12000
12149
|
var inputRef = React.useRef(null);
|
|
12001
12150
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
@@ -12032,14 +12181,14 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
12032
12181
|
}, children));
|
|
12033
12182
|
};
|
|
12034
12183
|
|
|
12035
|
-
var _excluded$
|
|
12184
|
+
var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
|
|
12036
12185
|
var SelectableButton = function SelectableButton(_ref) {
|
|
12037
12186
|
var className = _ref.className,
|
|
12038
12187
|
hover = _ref.hover,
|
|
12039
12188
|
selected = _ref.selected,
|
|
12040
12189
|
unavailable = _ref.unavailable,
|
|
12041
12190
|
children = _ref.children,
|
|
12042
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12191
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
12043
12192
|
|
|
12044
12193
|
return /*#__PURE__*/React__default["default"].createElement(Clickable, _extends$1({
|
|
12045
12194
|
className: classNames('SelectableButton', {
|
|
@@ -12050,34 +12199,13 @@ var SelectableButton = function SelectableButton(_ref) {
|
|
|
12050
12199
|
}, rest), /*#__PURE__*/React__default["default"].createElement("span", null, children));
|
|
12051
12200
|
};
|
|
12052
12201
|
|
|
12053
|
-
var _excluded$
|
|
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"];
|
|
12202
|
+
var _excluded$4 = ["className", "disabled", "onRemove", "children"];
|
|
12075
12203
|
var Tag = function Tag(_ref) {
|
|
12076
12204
|
var className = _ref.className,
|
|
12077
12205
|
disabled = _ref.disabled,
|
|
12078
12206
|
onRemove = _ref.onRemove,
|
|
12079
12207
|
children = _ref.children,
|
|
12080
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12208
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
12081
12209
|
|
|
12082
12210
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
12083
12211
|
className: classNames('Tag', className, {
|
|
@@ -12090,13 +12218,13 @@ var Tag = function Tag(_ref) {
|
|
|
12090
12218
|
}, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
|
|
12091
12219
|
};
|
|
12092
12220
|
|
|
12093
|
-
var _excluded$
|
|
12221
|
+
var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
|
|
12094
12222
|
var Tabs = function Tabs(_ref) {
|
|
12095
12223
|
var tabs = _ref.tabs,
|
|
12096
12224
|
onTabClicked = _ref.onTabClicked,
|
|
12097
12225
|
activeTab = _ref.activeTab,
|
|
12098
12226
|
className = _ref.className,
|
|
12099
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12227
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
12100
12228
|
|
|
12101
12229
|
var _useState = React.useState(activeTab || tabs[0].name),
|
|
12102
12230
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12176,7 +12304,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
12176
12304
|
}, children);
|
|
12177
12305
|
};
|
|
12178
12306
|
|
|
12179
|
-
var _excluded$
|
|
12307
|
+
var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
|
|
12180
12308
|
var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
|
12181
12309
|
var className = _ref.className,
|
|
12182
12310
|
disabled = _ref.disabled,
|
|
@@ -12185,7 +12313,7 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
12185
12313
|
placeholder = _ref.placeholder,
|
|
12186
12314
|
label = _ref.label,
|
|
12187
12315
|
_onChange = _ref.onChange,
|
|
12188
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12316
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
12189
12317
|
|
|
12190
12318
|
return /*#__PURE__*/React__default["default"].createElement("textarea", _extends$1({
|
|
12191
12319
|
className: classNames('Textarea', className, {
|
|
@@ -12204,13 +12332,13 @@ var Textarea = /*#__PURE__*/React__default["default"].forwardRef(function (_ref,
|
|
|
12204
12332
|
});
|
|
12205
12333
|
Textarea.displayName = 'Textarea';
|
|
12206
12334
|
|
|
12207
|
-
var _excluded$
|
|
12335
|
+
var _excluded$1 = ["theme", "className", "onRemove", "children"];
|
|
12208
12336
|
var Toast = function Toast(_ref) {
|
|
12209
12337
|
var theme = _ref.theme,
|
|
12210
12338
|
className = _ref.className,
|
|
12211
12339
|
onRemove = _ref.onRemove,
|
|
12212
12340
|
children = _ref.children,
|
|
12213
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12341
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12214
12342
|
|
|
12215
12343
|
return /*#__PURE__*/React__default["default"].createElement(Stack, _extends$1({
|
|
12216
12344
|
className: classNames('Toast', "Toast--".concat(theme), className),
|
|
@@ -12227,11 +12355,11 @@ var Toast = function Toast(_ref) {
|
|
|
12227
12355
|
}, /*#__PURE__*/React__default["default"].createElement(Exit16, null)));
|
|
12228
12356
|
};
|
|
12229
12357
|
|
|
12230
|
-
var _excluded
|
|
12358
|
+
var _excluded = ["className", "double"];
|
|
12231
12359
|
var VerticalDivider = function VerticalDivider(_ref) {
|
|
12232
12360
|
var className = _ref.className,
|
|
12233
12361
|
_double = _ref["double"],
|
|
12234
|
-
rest = _objectWithoutProperties(_ref, _excluded
|
|
12362
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12235
12363
|
|
|
12236
12364
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
12237
12365
|
className: classNames('VerticalDivider', {
|
|
@@ -12270,102 +12398,6 @@ var PasswordInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12270
12398
|
});
|
|
12271
12399
|
PasswordInput.displayName = 'PasswordInput';
|
|
12272
12400
|
|
|
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
12401
|
var tokens = {
|
|
12370
12402
|
colors: dist$4.colors,
|
|
12371
12403
|
typography: dist$4.typography,
|