@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.esm.js
CHANGED
|
@@ -1247,6 +1247,182 @@ function _nonIterableRest() {
|
|
|
1247
1247
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
|
+
var isRenderProps = function isRenderProps(children) {
|
|
1251
|
+
return typeof children === 'function';
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
var classnames = {exports: {}};
|
|
1255
|
+
|
|
1256
|
+
(function (module) {
|
|
1257
|
+
/* global define */
|
|
1258
|
+
(function () {
|
|
1259
|
+
|
|
1260
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1261
|
+
|
|
1262
|
+
function classNames() {
|
|
1263
|
+
var classes = [];
|
|
1264
|
+
|
|
1265
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1266
|
+
var arg = arguments[i];
|
|
1267
|
+
if (!arg) continue;
|
|
1268
|
+
|
|
1269
|
+
var argType = _typeof(arg);
|
|
1270
|
+
|
|
1271
|
+
if (argType === 'string' || argType === 'number') {
|
|
1272
|
+
classes.push(arg);
|
|
1273
|
+
} else if (Array.isArray(arg)) {
|
|
1274
|
+
if (arg.length) {
|
|
1275
|
+
var inner = classNames.apply(null, arg);
|
|
1276
|
+
|
|
1277
|
+
if (inner) {
|
|
1278
|
+
classes.push(inner);
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
} else if (argType === 'object') {
|
|
1282
|
+
if (arg.toString === Object.prototype.toString) {
|
|
1283
|
+
for (var key in arg) {
|
|
1284
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1285
|
+
classes.push(key);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
} else {
|
|
1289
|
+
classes.push(arg.toString());
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
return classes.join(' ');
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
if (module.exports) {
|
|
1298
|
+
classNames["default"] = classNames;
|
|
1299
|
+
module.exports = classNames;
|
|
1300
|
+
} else {
|
|
1301
|
+
window.classNames = classNames;
|
|
1302
|
+
}
|
|
1303
|
+
})();
|
|
1304
|
+
})(classnames);
|
|
1305
|
+
|
|
1306
|
+
var classNames = classnames.exports;
|
|
1307
|
+
|
|
1308
|
+
var _excluded$E = ["className", "children", "space", "direction", "alignItems", "justifyContent", "style"];
|
|
1309
|
+
var Stack = function Stack(_ref) {
|
|
1310
|
+
var className = _ref.className,
|
|
1311
|
+
children = _ref.children,
|
|
1312
|
+
space = _ref.space,
|
|
1313
|
+
_ref$direction = _ref.direction,
|
|
1314
|
+
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
1315
|
+
alignItems = _ref.alignItems,
|
|
1316
|
+
justifyContent = _ref.justifyContent,
|
|
1317
|
+
style = _ref.style,
|
|
1318
|
+
rest = _objectWithoutProperties(_ref, _excluded$E);
|
|
1319
|
+
|
|
1320
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
1321
|
+
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
1322
|
+
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
1323
|
+
alignItems: alignItems,
|
|
1324
|
+
justifyContent: justifyContent
|
|
1325
|
+
})
|
|
1326
|
+
}, rest), children);
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
var omit = function omit(obj) {
|
|
1330
|
+
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1331
|
+
keys[_key - 1] = arguments[_key];
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
return Object.entries(obj).filter(function (_ref) {
|
|
1335
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1336
|
+
key = _ref2[0];
|
|
1337
|
+
|
|
1338
|
+
return !keys.includes(key);
|
|
1339
|
+
}).reduce(function (obj, _ref3) {
|
|
1340
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
1341
|
+
key = _ref4[0],
|
|
1342
|
+
val = _ref4[1];
|
|
1343
|
+
|
|
1344
|
+
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
1345
|
+
}, {});
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
var truncate = function truncate(string) {
|
|
1349
|
+
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
1350
|
+
if (!string) return null;
|
|
1351
|
+
var ellipsis = string.length > maxLength;
|
|
1352
|
+
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
1353
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
var stringifyProps = function stringifyProps(props) {
|
|
1357
|
+
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
1358
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
1359
|
+
key = _ref2[0],
|
|
1360
|
+
value = _ref2[1];
|
|
1361
|
+
|
|
1362
|
+
if (key === 'children') return "".concat(memo, " children={...}");
|
|
1363
|
+
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
1364
|
+
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
1365
|
+
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
1366
|
+
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
1367
|
+
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
1368
|
+
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
1369
|
+
}, '');
|
|
1370
|
+
return stringifiedProps.trim();
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1374
|
+
|
|
1375
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
1376
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1377
|
+
var isEmpty = function isEmpty(obj) {
|
|
1378
|
+
return Object.entries(obj || {}).length === 0;
|
|
1379
|
+
};
|
|
1380
|
+
|
|
1381
|
+
var StatesProps = function StatesProps(_ref) {
|
|
1382
|
+
var props = _ref.props,
|
|
1383
|
+
children = _ref.children;
|
|
1384
|
+
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1385
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
1386
|
+
className: "StatesProps",
|
|
1387
|
+
space: 2,
|
|
1388
|
+
direction: "horizontal"
|
|
1389
|
+
}, /*#__PURE__*/React__default.createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default.createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default.createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default.createElement("span", null, " "));
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1392
|
+
var _excluded$D = ["props", "children"];
|
|
1393
|
+
var State = function State(_ref) {
|
|
1394
|
+
var props = _ref.props,
|
|
1395
|
+
children = _ref.children,
|
|
1396
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
1397
|
+
|
|
1398
|
+
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default.cloneElement(children, props);
|
|
1399
|
+
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
1400
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
1401
|
+
className: "State"
|
|
1402
|
+
}, rest), Specimen, /*#__PURE__*/React__default.createElement("code", {
|
|
1403
|
+
className: "State__props"
|
|
1404
|
+
}, /*#__PURE__*/React__default.createElement(StatesProps, {
|
|
1405
|
+
props: props
|
|
1406
|
+
}, innerChildren)));
|
|
1407
|
+
};
|
|
1408
|
+
|
|
1409
|
+
var _excluded$C = ["states", "children"];
|
|
1410
|
+
var States = function States(_ref) {
|
|
1411
|
+
var _ref$states = _ref.states,
|
|
1412
|
+
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
1413
|
+
children = _ref.children,
|
|
1414
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
1415
|
+
|
|
1416
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1417
|
+
className: "States"
|
|
1418
|
+
}, states.map(function (props, index) {
|
|
1419
|
+
return /*#__PURE__*/React__default.createElement(State, _extends$1({
|
|
1420
|
+
key: index,
|
|
1421
|
+
props: props
|
|
1422
|
+
}, rest), children);
|
|
1423
|
+
}));
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1250
1426
|
var _assign = function __assign() {
|
|
1251
1427
|
_assign = Object.assign || function __assign(t) {
|
|
1252
1428
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -1601,7 +1777,7 @@ RemoveScroll.classNames = {
|
|
|
1601
1777
|
};
|
|
1602
1778
|
|
|
1603
1779
|
function _extends() {
|
|
1604
|
-
_extends = Object.assign
|
|
1780
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
1605
1781
|
for (var i = 1; i < arguments.length; i++) {
|
|
1606
1782
|
var source = arguments[i];
|
|
1607
1783
|
|
|
@@ -1614,7 +1790,6 @@ function _extends() {
|
|
|
1614
1790
|
|
|
1615
1791
|
return target;
|
|
1616
1792
|
};
|
|
1617
|
-
|
|
1618
1793
|
return _extends.apply(this, arguments);
|
|
1619
1794
|
}
|
|
1620
1795
|
|
|
@@ -3300,11 +3475,10 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3300
3475
|
});
|
|
3301
3476
|
|
|
3302
3477
|
function _setPrototypeOf(o, p) {
|
|
3303
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
3478
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
3304
3479
|
o.__proto__ = p;
|
|
3305
3480
|
return o;
|
|
3306
3481
|
};
|
|
3307
|
-
|
|
3308
3482
|
return _setPrototypeOf(o, p);
|
|
3309
3483
|
}
|
|
3310
3484
|
|
|
@@ -4424,24 +4598,42 @@ var stylesheetSingleton = function stylesheetSingleton() {
|
|
|
4424
4598
|
};
|
|
4425
4599
|
};
|
|
4426
4600
|
|
|
4601
|
+
/**
|
|
4602
|
+
* creates a hook to control style singleton
|
|
4603
|
+
* @see {@link styleSingleton} for a safer component version
|
|
4604
|
+
* @example
|
|
4605
|
+
* ```tsx
|
|
4606
|
+
* const useStyle = styleHookSingleton();
|
|
4607
|
+
* ///
|
|
4608
|
+
* useStyle('body { overflow: hidden}');
|
|
4609
|
+
*/
|
|
4610
|
+
|
|
4427
4611
|
var styleHookSingleton = function styleHookSingleton() {
|
|
4428
4612
|
var sheet = stylesheetSingleton();
|
|
4429
|
-
return function (styles) {
|
|
4613
|
+
return function (styles, isDynamic) {
|
|
4430
4614
|
React.useEffect(function () {
|
|
4431
4615
|
sheet.add(styles);
|
|
4432
4616
|
return function () {
|
|
4433
4617
|
sheet.remove();
|
|
4434
4618
|
};
|
|
4435
|
-
}, [styles]);
|
|
4619
|
+
}, [styles && isDynamic]);
|
|
4436
4620
|
};
|
|
4437
4621
|
};
|
|
4438
4622
|
|
|
4623
|
+
/**
|
|
4624
|
+
* create a Component to add styles on demand
|
|
4625
|
+
* - styles are added when first instance is mounted
|
|
4626
|
+
* - styles are removed when the last instance is unmounted
|
|
4627
|
+
* - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
|
|
4628
|
+
*/
|
|
4629
|
+
|
|
4439
4630
|
var styleSingleton = function styleSingleton() {
|
|
4440
4631
|
var useStyle = styleHookSingleton();
|
|
4441
4632
|
|
|
4442
4633
|
var Sheet = function Sheet(_a) {
|
|
4443
|
-
var styles = _a.styles
|
|
4444
|
-
|
|
4634
|
+
var styles = _a.styles,
|
|
4635
|
+
dynamic = _a.dynamic;
|
|
4636
|
+
useStyle(styles, dynamic);
|
|
4445
4637
|
return null;
|
|
4446
4638
|
};
|
|
4447
4639
|
|
|
@@ -4461,6 +4653,13 @@ var parse = function parse(x) {
|
|
|
4461
4653
|
|
|
4462
4654
|
var getOffset = function getOffset(gapMode) {
|
|
4463
4655
|
var cs = window.getComputedStyle(document.body);
|
|
4656
|
+
|
|
4657
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4658
|
+
if (cs.overflowY === 'hidden') {
|
|
4659
|
+
console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
|
|
4464
4663
|
var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
|
|
4465
4664
|
var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
|
|
4466
4665
|
var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
|
|
@@ -4509,17 +4708,13 @@ var getStyles = function getStyles(_a, allowRelative, gapMode, important) {
|
|
|
4509
4708
|
|
|
4510
4709
|
|
|
4511
4710
|
var RemoveScrollBar = function RemoveScrollBar(props) {
|
|
4512
|
-
var _a = React.useState(getGapWidth(props.gapMode)),
|
|
4513
|
-
gap = _a[0],
|
|
4514
|
-
setGap = _a[1];
|
|
4515
|
-
|
|
4516
|
-
React.useEffect(function () {
|
|
4517
|
-
setGap(getGapWidth(props.gapMode));
|
|
4518
|
-
}, [props.gapMode]);
|
|
4519
4711
|
var noRelative = props.noRelative,
|
|
4520
4712
|
noImportant = props.noImportant,
|
|
4521
|
-
|
|
4522
|
-
gapMode =
|
|
4713
|
+
_a = props.gapMode,
|
|
4714
|
+
gapMode = _a === void 0 ? 'margin' : _a;
|
|
4715
|
+
var gap = React.useMemo(function () {
|
|
4716
|
+
return getGapWidth(gapMode);
|
|
4717
|
+
}, [gapMode]);
|
|
4523
4718
|
return /*#__PURE__*/React.createElement(Style$1, {
|
|
4524
4719
|
styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '')
|
|
4525
4720
|
});
|
|
@@ -5092,60 +5287,6 @@ var FocusOn = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
5092
5287
|
}));
|
|
5093
5288
|
});
|
|
5094
5289
|
|
|
5095
|
-
var classnames = {exports: {}};
|
|
5096
|
-
|
|
5097
|
-
(function (module) {
|
|
5098
|
-
/* global define */
|
|
5099
|
-
(function () {
|
|
5100
|
-
|
|
5101
|
-
var hasOwn = {}.hasOwnProperty;
|
|
5102
|
-
|
|
5103
|
-
function classNames() {
|
|
5104
|
-
var classes = [];
|
|
5105
|
-
|
|
5106
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
5107
|
-
var arg = arguments[i];
|
|
5108
|
-
if (!arg) continue;
|
|
5109
|
-
|
|
5110
|
-
var argType = _typeof(arg);
|
|
5111
|
-
|
|
5112
|
-
if (argType === 'string' || argType === 'number') {
|
|
5113
|
-
classes.push(arg);
|
|
5114
|
-
} else if (Array.isArray(arg)) {
|
|
5115
|
-
if (arg.length) {
|
|
5116
|
-
var inner = classNames.apply(null, arg);
|
|
5117
|
-
|
|
5118
|
-
if (inner) {
|
|
5119
|
-
classes.push(inner);
|
|
5120
|
-
}
|
|
5121
|
-
}
|
|
5122
|
-
} else if (argType === 'object') {
|
|
5123
|
-
if (arg.toString === Object.prototype.toString) {
|
|
5124
|
-
for (var key in arg) {
|
|
5125
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
5126
|
-
classes.push(key);
|
|
5127
|
-
}
|
|
5128
|
-
}
|
|
5129
|
-
} else {
|
|
5130
|
-
classes.push(arg.toString());
|
|
5131
|
-
}
|
|
5132
|
-
}
|
|
5133
|
-
}
|
|
5134
|
-
|
|
5135
|
-
return classes.join(' ');
|
|
5136
|
-
}
|
|
5137
|
-
|
|
5138
|
-
if (module.exports) {
|
|
5139
|
-
classNames["default"] = classNames;
|
|
5140
|
-
module.exports = classNames;
|
|
5141
|
-
} else {
|
|
5142
|
-
window.classNames = classNames;
|
|
5143
|
-
}
|
|
5144
|
-
})();
|
|
5145
|
-
})(classnames);
|
|
5146
|
-
|
|
5147
|
-
var classNames = classnames.exports;
|
|
5148
|
-
|
|
5149
5290
|
var dist$3 = {};
|
|
5150
5291
|
|
|
5151
5292
|
var scale = {};
|
|
@@ -5253,7 +5394,7 @@ var scale = {};
|
|
|
5253
5394
|
__exportStar(scale, exports);
|
|
5254
5395
|
})(dist$3);
|
|
5255
5396
|
|
|
5256
|
-
var _excluded$
|
|
5397
|
+
var _excluded$B = ["aspectWidth", "aspectHeight", "maxWidth", "maxHeight", "outlined", "children", "className"];
|
|
5257
5398
|
var DEFAULT_PRODUCT_ASPECT_WIDTH = 128;
|
|
5258
5399
|
var DEFAULT_PRODUCT_ASPECT_HEIGHT = 205;
|
|
5259
5400
|
var DEFAULT_PRODUCT_ASPECT_RATIO = DEFAULT_PRODUCT_ASPECT_HEIGHT / DEFAULT_PRODUCT_ASPECT_WIDTH;
|
|
@@ -5268,7 +5409,7 @@ var AspectRatioBox = /*#__PURE__*/React__default.forwardRef(function (_ref, forw
|
|
|
5268
5409
|
outlined = _ref$outlined === void 0 ? false : _ref$outlined,
|
|
5269
5410
|
children = _ref.children,
|
|
5270
5411
|
className = _ref.className,
|
|
5271
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5412
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
5272
5413
|
|
|
5273
5414
|
var _scale = dist$3.scale({
|
|
5274
5415
|
width: aspectWidth,
|
|
@@ -5298,23 +5439,23 @@ var AspectRatioBox = /*#__PURE__*/React__default.forwardRef(function (_ref, forw
|
|
|
5298
5439
|
});
|
|
5299
5440
|
AspectRatioBox.displayName = 'AspectRatioBox';
|
|
5300
5441
|
|
|
5301
|
-
var _excluded$
|
|
5442
|
+
var _excluded$A = ["className", "theme", "children"];
|
|
5302
5443
|
var Badge = function Badge(_ref) {
|
|
5303
5444
|
var className = _ref.className,
|
|
5304
5445
|
theme = _ref.theme,
|
|
5305
5446
|
children = _ref.children,
|
|
5306
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5447
|
+
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
5307
5448
|
|
|
5308
5449
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({
|
|
5309
5450
|
className: classNames('Badge', theme && "Badge--".concat(theme), className)
|
|
5310
5451
|
}, rest), children);
|
|
5311
5452
|
};
|
|
5312
5453
|
|
|
5313
|
-
var _excluded$
|
|
5454
|
+
var _excluded$z = ["children", "className"];
|
|
5314
5455
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
5315
5456
|
var children = _ref.children,
|
|
5316
5457
|
className = _ref.className,
|
|
5317
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5458
|
+
rest = _objectWithoutProperties(_ref, _excluded$z);
|
|
5318
5459
|
|
|
5319
5460
|
var position = 0;
|
|
5320
5461
|
return /*#__PURE__*/React__default.createElement("ol", _extends$1({
|
|
@@ -5334,7 +5475,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
5334
5475
|
}));
|
|
5335
5476
|
};
|
|
5336
5477
|
|
|
5337
|
-
var _excluded$
|
|
5478
|
+
var _excluded$y = ["className", "styleless", "disabled"];
|
|
5338
5479
|
|
|
5339
5480
|
var isLink = function isLink(props) {
|
|
5340
5481
|
return 'to' in props;
|
|
@@ -5353,7 +5494,7 @@ var Clickable = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
5353
5494
|
_ref$styleless = _ref.styleless,
|
|
5354
5495
|
styleless = _ref$styleless === void 0 ? false : _ref$styleless,
|
|
5355
5496
|
disabled = _ref.disabled,
|
|
5356
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5497
|
+
rest = _objectWithoutProperties(_ref, _excluded$y);
|
|
5357
5498
|
|
|
5358
5499
|
var props = _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
5359
5500
|
className: classNames({
|
|
@@ -5376,14 +5517,14 @@ var Clickable = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
5376
5517
|
});
|
|
5377
5518
|
Clickable.displayName = 'Clickable';
|
|
5378
5519
|
|
|
5379
|
-
var _excluded$
|
|
5520
|
+
var _excluded$x = ["className", "disabled", "children", "underlined"];
|
|
5380
5521
|
var ControlLink = function ControlLink(_ref) {
|
|
5381
5522
|
var className = _ref.className,
|
|
5382
5523
|
disabled = _ref.disabled,
|
|
5383
5524
|
children = _ref.children,
|
|
5384
5525
|
_ref$underlined = _ref.underlined,
|
|
5385
5526
|
underlined = _ref$underlined === void 0 ? true : _ref$underlined,
|
|
5386
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5527
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
5387
5528
|
|
|
5388
5529
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({}, rest, {
|
|
5389
5530
|
className: classNames('ControlLink', {
|
|
@@ -5395,12 +5536,12 @@ var ControlLink = function ControlLink(_ref) {
|
|
|
5395
5536
|
}), children);
|
|
5396
5537
|
};
|
|
5397
5538
|
|
|
5398
|
-
var _excluded$
|
|
5539
|
+
var _excluded$w = ["children", "position", "className"];
|
|
5399
5540
|
var Breadcrumb = function Breadcrumb(_ref) {
|
|
5400
5541
|
var children = _ref.children,
|
|
5401
5542
|
position = _ref.position,
|
|
5402
5543
|
className = _ref.className,
|
|
5403
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5544
|
+
rest = _objectWithoutProperties(_ref, _excluded$w);
|
|
5404
5545
|
|
|
5405
5546
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
5406
5547
|
className: classNames('Breadcrumb', className),
|
|
@@ -5419,7 +5560,8 @@ var Breadcrumb = function Breadcrumb(_ref) {
|
|
|
5419
5560
|
}));
|
|
5420
5561
|
};
|
|
5421
5562
|
|
|
5422
|
-
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
5563
|
+
var breakpointKeys = Object.keys(dist$4.breakpoints); // eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
5564
|
+
|
|
5423
5565
|
var ONE_PIXEL = 1 / 16;
|
|
5424
5566
|
var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
5425
5567
|
var mode = _ref.mode,
|
|
@@ -5429,21 +5571,21 @@ var getMediaQueryBounds = function getMediaQueryBounds(_ref) {
|
|
|
5429
5571
|
case 'at':
|
|
5430
5572
|
{
|
|
5431
5573
|
var prevIndex = breakpointKeys.indexOf(breakpoint) - 1;
|
|
5432
|
-
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]]) + ONE_PIXEL;
|
|
5574
|
+
var prevWidth = prevIndex === -1 ? 0 : parseInt(dist$4.breakpoints[breakpointKeys[prevIndex]], 10) + ONE_PIXEL;
|
|
5433
5575
|
return {
|
|
5434
5576
|
min: prevWidth,
|
|
5435
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5577
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5436
5578
|
};
|
|
5437
5579
|
}
|
|
5438
5580
|
|
|
5439
5581
|
case 'gt':
|
|
5440
5582
|
return {
|
|
5441
|
-
min: parseInt(dist$4.breakpoints[breakpoint]) + ONE_PIXEL
|
|
5583
|
+
min: parseInt(dist$4.breakpoints[breakpoint], 10) + ONE_PIXEL
|
|
5442
5584
|
};
|
|
5443
5585
|
|
|
5444
5586
|
case 'lt':
|
|
5445
5587
|
return {
|
|
5446
|
-
max: parseInt(dist$4.breakpoints[breakpoint])
|
|
5588
|
+
max: parseInt(dist$4.breakpoints[breakpoint], 10)
|
|
5447
5589
|
};
|
|
5448
5590
|
}
|
|
5449
5591
|
};
|
|
@@ -5533,10 +5675,10 @@ var useBreakpoint = function useBreakpoint(props) {
|
|
|
5533
5675
|
};
|
|
5534
5676
|
};
|
|
5535
5677
|
|
|
5536
|
-
var _excluded$
|
|
5678
|
+
var _excluded$v = ["children"];
|
|
5537
5679
|
var Breakpoint = function Breakpoint(_ref) {
|
|
5538
5680
|
var children = _ref.children,
|
|
5539
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5681
|
+
rest = _objectWithoutProperties(_ref, _excluded$v);
|
|
5540
5682
|
|
|
5541
5683
|
var _discriminate = discriminate(rest),
|
|
5542
5684
|
mode = _discriminate.mode,
|
|
@@ -5550,7 +5692,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
5550
5692
|
}, children) : null;
|
|
5551
5693
|
};
|
|
5552
5694
|
|
|
5553
|
-
var _excluded$
|
|
5695
|
+
var _excluded$u = ["secondary", "chip", "hover", "focus", "disabled", "className"];
|
|
5554
5696
|
var Button = function Button(_ref) {
|
|
5555
5697
|
var secondary = _ref.secondary,
|
|
5556
5698
|
chip = _ref.chip,
|
|
@@ -5558,7 +5700,7 @@ var Button = function Button(_ref) {
|
|
|
5558
5700
|
focus = _ref.focus,
|
|
5559
5701
|
disabled = _ref.disabled,
|
|
5560
5702
|
className = _ref.className,
|
|
5561
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5703
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
5562
5704
|
|
|
5563
5705
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({
|
|
5564
5706
|
className: classNames('Button', {
|
|
@@ -5709,7 +5851,7 @@ var Circle12 = function Circle12(_a) {
|
|
|
5709
5851
|
|
|
5710
5852
|
Circle12.displayName = 'Circle12';
|
|
5711
5853
|
|
|
5712
|
-
var _excluded$
|
|
5854
|
+
var _excluded$t = ["className", "defaultChecked", "checked", "children", "value", "onChange", "disabled", "checkIcon"];
|
|
5713
5855
|
var CHECKED_ITEM_PROPS = {
|
|
5714
5856
|
className: 'Checkbox__check-mark',
|
|
5715
5857
|
height: '85%',
|
|
@@ -5727,7 +5869,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
5727
5869
|
disabled = _ref.disabled,
|
|
5728
5870
|
_ref$checkIcon = _ref.checkIcon,
|
|
5729
5871
|
checkIcon = _ref$checkIcon === void 0 ? 'checkmark' : _ref$checkIcon,
|
|
5730
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5872
|
+
rest = _objectWithoutProperties(_ref, _excluded$t);
|
|
5731
5873
|
|
|
5732
5874
|
var _useState = useState((_ref2 = checked !== null && checked !== void 0 ? checked : defaultChecked) !== null && _ref2 !== void 0 ? _ref2 : false),
|
|
5733
5875
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -5815,7 +5957,7 @@ var SKU_COLORS = {
|
|
|
5815
5957
|
yellow: '#ffca44'
|
|
5816
5958
|
};
|
|
5817
5959
|
|
|
5818
|
-
var _excluded$
|
|
5960
|
+
var _excluded$s = ["className", "size", "color", "backgroundUrl", "focus", "hover", "selected", "soldOut", "onSale", "onClick", "onMouseEnter", "disabled"];
|
|
5819
5961
|
var ColorSwatch = function ColorSwatch(_ref) {
|
|
5820
5962
|
var className = _ref.className,
|
|
5821
5963
|
size = _ref.size,
|
|
@@ -5829,7 +5971,7 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5829
5971
|
onClick = _ref.onClick,
|
|
5830
5972
|
onMouseEnter = _ref.onMouseEnter,
|
|
5831
5973
|
disabled = _ref.disabled,
|
|
5832
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
5974
|
+
rest = _objectWithoutProperties(_ref, _excluded$s);
|
|
5833
5975
|
|
|
5834
5976
|
var handleClick = useCallback(function (_event) {
|
|
5835
5977
|
onClick && onClick(color);
|
|
@@ -5865,22 +6007,22 @@ var ColorSwatch = function ColorSwatch(_ref) {
|
|
|
5865
6007
|
}));
|
|
5866
6008
|
};
|
|
5867
6009
|
|
|
5868
|
-
var _excluded$
|
|
6010
|
+
var _excluded$r = ["className", "children"];
|
|
5869
6011
|
var Constrain = function Constrain(_ref) {
|
|
5870
6012
|
var className = _ref.className,
|
|
5871
6013
|
children = _ref.children,
|
|
5872
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6014
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
5873
6015
|
|
|
5874
6016
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5875
6017
|
className: classNames('Constrain', className)
|
|
5876
6018
|
}, rest), children);
|
|
5877
6019
|
};
|
|
5878
6020
|
|
|
5879
|
-
var _excluded$
|
|
6021
|
+
var _excluded$q = ["className", "children"];
|
|
5880
6022
|
var ExceedConstrain = function ExceedConstrain(_ref) {
|
|
5881
6023
|
var className = _ref.className,
|
|
5882
6024
|
children = _ref.children,
|
|
5883
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
6025
|
+
rest = _objectWithoutProperties(_ref, _excluded$q);
|
|
5884
6026
|
|
|
5885
6027
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
5886
6028
|
className: classNames('ExceedConstrain', className)
|
|
@@ -8292,7 +8434,7 @@ var Warning16 = function Warning16(_a) {
|
|
|
8292
8434
|
|
|
8293
8435
|
Warning16.displayName = 'Warning16';
|
|
8294
8436
|
|
|
8295
|
-
var _excluded$
|
|
8437
|
+
var _excluded$p = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange", "onChangeEvent"];
|
|
8296
8438
|
var TextInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
8297
8439
|
var className = _ref.className,
|
|
8298
8440
|
disabled = _ref.disabled,
|
|
@@ -8302,7 +8444,7 @@ var TextInput = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
8302
8444
|
label = _ref.label,
|
|
8303
8445
|
_onChange = _ref.onChange,
|
|
8304
8446
|
onChangeEvent = _ref.onChangeEvent,
|
|
8305
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8447
|
+
rest = _objectWithoutProperties(_ref, _excluded$p);
|
|
8306
8448
|
|
|
8307
8449
|
return /*#__PURE__*/React__default.createElement("input", _extends$1({
|
|
8308
8450
|
className: classNames('TextInput', className, {
|
|
@@ -8641,7 +8783,8 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8641
8783
|
return function () {
|
|
8642
8784
|
el.removeEventListener('keydown', handleKeyDown);
|
|
8643
8785
|
};
|
|
8644
|
-
}, [handleKeyDown, ref, idleTimeout]);
|
|
8786
|
+
}, [handleKeyDown, ref, idleTimeout]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
8787
|
+
|
|
8645
8788
|
useEffect(function () {
|
|
8646
8789
|
return dispatch({
|
|
8647
8790
|
type: 'RESET',
|
|
@@ -8657,6 +8800,7 @@ var useKeyboardListNavigation = function useKeyboardListNavigation(_ref) {
|
|
|
8657
8800
|
});
|
|
8658
8801
|
};
|
|
8659
8802
|
|
|
8803
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
8660
8804
|
var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
8661
8805
|
var didMountRef = useRef(false);
|
|
8662
8806
|
useEffect(function () {
|
|
@@ -8668,7 +8812,7 @@ var useUpdateEffect = function useUpdateEffect(effect, deps) {
|
|
|
8668
8812
|
}, deps);
|
|
8669
8813
|
};
|
|
8670
8814
|
|
|
8671
|
-
var _excluded$
|
|
8815
|
+
var _excluded$o = ["className", "treatment", "color", "family", "children", "style"];
|
|
8672
8816
|
var Text = function Text(_ref) {
|
|
8673
8817
|
var className = _ref.className,
|
|
8674
8818
|
_ref$treatment = _ref.treatment,
|
|
@@ -8678,7 +8822,7 @@ var Text = function Text(_ref) {
|
|
|
8678
8822
|
family = _ref.family,
|
|
8679
8823
|
children = _ref.children,
|
|
8680
8824
|
style = _ref.style,
|
|
8681
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8825
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
8682
8826
|
|
|
8683
8827
|
return /*#__PURE__*/React__default.createElement("span", _extends$1({
|
|
8684
8828
|
className: classNames("Text Text--".concat(treatment, " ").concat(family ? "Text--".concat(family) : ''), className),
|
|
@@ -8835,7 +8979,7 @@ var Search20 = function Search20(_a) {
|
|
|
8835
8979
|
|
|
8836
8980
|
Search20.displayName = 'Search20';
|
|
8837
8981
|
|
|
8838
|
-
var _excluded$
|
|
8982
|
+
var _excluded$n = ["className", "onChange", "onChangeValue", "onClear", "value"];
|
|
8839
8983
|
var DEFAULT_INPUT_VALUE = '';
|
|
8840
8984
|
var SearchInput = function SearchInput(_ref) {
|
|
8841
8985
|
var className = _ref.className,
|
|
@@ -8844,7 +8988,7 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
8844
8988
|
onClear = _ref.onClear,
|
|
8845
8989
|
_ref$value = _ref.value,
|
|
8846
8990
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
8847
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
8991
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
8848
8992
|
|
|
8849
8993
|
var ref = useRef(null);
|
|
8850
8994
|
|
|
@@ -9070,7 +9214,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
9070
9214
|
}, option.label);
|
|
9071
9215
|
};
|
|
9072
9216
|
|
|
9073
|
-
var _excluded$
|
|
9217
|
+
var _excluded$m = ["idRef", "searchable", "autoFocus", "options", "selectedOption", "onSelect", "onFocus", "className"];
|
|
9074
9218
|
var SelectOptions = function SelectOptions(_ref) {
|
|
9075
9219
|
var idRef = _ref.idRef,
|
|
9076
9220
|
searchable = _ref.searchable,
|
|
@@ -9081,7 +9225,7 @@ var SelectOptions = function SelectOptions(_ref) {
|
|
|
9081
9225
|
onSelect = _ref.onSelect,
|
|
9082
9226
|
onFocus = _ref.onFocus,
|
|
9083
9227
|
className = _ref.className,
|
|
9084
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9228
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
9085
9229
|
|
|
9086
9230
|
var _useState = useState(''),
|
|
9087
9231
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -9259,7 +9403,7 @@ var useSelect = function useSelect(_ref) {
|
|
|
9259
9403
|
};
|
|
9260
9404
|
};
|
|
9261
9405
|
|
|
9262
|
-
var _excluded$
|
|
9406
|
+
var _excluded$l = ["allowAutoFill", "autoSelect", "className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "label", "name", "onChange", "options", "placeholder", "searchable", "shiftIconLeftwards", "value"];
|
|
9263
9407
|
var Select = function Select(_ref) {
|
|
9264
9408
|
var _ref2;
|
|
9265
9409
|
|
|
@@ -9285,7 +9429,7 @@ var Select = function Select(_ref) {
|
|
|
9285
9429
|
_ref$shiftIconLeftwar = _ref.shiftIconLeftwards,
|
|
9286
9430
|
shiftIconLeftwards = _ref$shiftIconLeftwar === void 0 ? false : _ref$shiftIconLeftwar,
|
|
9287
9431
|
value = _ref.value,
|
|
9288
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
9432
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
9289
9433
|
|
|
9290
9434
|
var _useSelect = useSelect({
|
|
9291
9435
|
value: value,
|
|
@@ -10951,7 +11095,7 @@ var Exit16 = function Exit16(_a) {
|
|
|
10951
11095
|
|
|
10952
11096
|
Exit16.displayName = 'Exit16';
|
|
10953
11097
|
|
|
10954
|
-
var _excluded$
|
|
11098
|
+
var _excluded$k = ["className", "defaultValue", "disabled", "dropDirection", "error", "idRef", "onChange", "options", "searchable", "shiftIconLeftwards", "value"];
|
|
10955
11099
|
var MultiSelect = function MultiSelect(_ref) {
|
|
10956
11100
|
var className = _ref.className,
|
|
10957
11101
|
defaultValue = _ref.defaultValue,
|
|
@@ -10966,7 +11110,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10966
11110
|
searchable = _ref.searchable,
|
|
10967
11111
|
shiftIconLeftwards = _ref.shiftIconLeftwards,
|
|
10968
11112
|
value = _ref.value,
|
|
10969
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11113
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
10970
11114
|
|
|
10971
11115
|
var _useSelect = useSelect({
|
|
10972
11116
|
value: value,
|
|
@@ -11066,14 +11210,14 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
11066
11210
|
}));
|
|
11067
11211
|
};
|
|
11068
11212
|
|
|
11069
|
-
var _excluded$
|
|
11213
|
+
var _excluded$j = ["className", "children", "error", "label", "placeholder"];
|
|
11070
11214
|
var Field = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
11071
11215
|
var className = _ref.className,
|
|
11072
11216
|
children = _ref.children,
|
|
11073
11217
|
error = _ref.error,
|
|
11074
11218
|
label = _ref.label,
|
|
11075
11219
|
placeholder = _ref.placeholder,
|
|
11076
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11220
|
+
rest = _objectWithoutProperties(_ref, _excluded$j);
|
|
11077
11221
|
|
|
11078
11222
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
11079
11223
|
className: classNames('Field', className)
|
|
@@ -11102,17 +11246,17 @@ var Field = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
11102
11246
|
});
|
|
11103
11247
|
Field.displayName = 'Field';
|
|
11104
11248
|
|
|
11105
|
-
var _excluded$
|
|
11249
|
+
var _excluded$i = ["onChange"];
|
|
11106
11250
|
var CreditCardNumberInputField = function CreditCardNumberInputField(_ref) {
|
|
11107
11251
|
var onChange = _ref.onChange,
|
|
11108
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11252
|
+
rest = _objectWithoutProperties(_ref, _excluded$i);
|
|
11109
11253
|
|
|
11110
11254
|
return /*#__PURE__*/React__default.createElement(Field, _extends$1({}, rest, {
|
|
11111
11255
|
onChangeEvent: onChange
|
|
11112
11256
|
}));
|
|
11113
11257
|
};
|
|
11114
11258
|
|
|
11115
|
-
var _excluded$
|
|
11259
|
+
var _excluded$h = ["value", "disabled", "readOnly", "defaultValue", "maskChar", "alwaysShowMask", "onMouseDown", "onFocus", "onBlur", "onChange"];
|
|
11116
11260
|
var DEFAULT_MASK = '9999 9999 9999 9999';
|
|
11117
11261
|
var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
11118
11262
|
var _ref2;
|
|
@@ -11127,7 +11271,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11127
11271
|
onFocus = _ref.onFocus,
|
|
11128
11272
|
onBlur = _ref.onBlur,
|
|
11129
11273
|
onChange = _ref.onChange,
|
|
11130
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11274
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
11131
11275
|
|
|
11132
11276
|
var _useState = useState((_ref2 = propsValue !== null && propsValue !== void 0 ? propsValue : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
11133
11277
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11153,6 +11297,7 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11153
11297
|
setValue(event.target.value);
|
|
11154
11298
|
onChange === null || onChange === void 0 ? void 0 : onChange(event.target.value);
|
|
11155
11299
|
}, [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
|
|
11300
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11156
11301
|
|
|
11157
11302
|
var renderInputField = function renderInputField(inputProps) {
|
|
11158
11303
|
return /*#__PURE__*/React__default.createElement(CreditCardNumberInputField, _extends$1({}, rest, inputProps));
|
|
@@ -11172,19 +11317,19 @@ var CreditCardNumberInput = function CreditCardNumberInput(_ref) {
|
|
|
11172
11317
|
}, renderInputField);
|
|
11173
11318
|
};
|
|
11174
11319
|
|
|
11175
|
-
var _excluded$
|
|
11320
|
+
var _excluded$g = ["term", "children", "className"];
|
|
11176
11321
|
var DefinitionList = function DefinitionList(_ref) {
|
|
11177
11322
|
var term = _ref.term,
|
|
11178
11323
|
children = _ref.children,
|
|
11179
11324
|
className = _ref.className,
|
|
11180
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11325
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
11181
11326
|
|
|
11182
11327
|
return /*#__PURE__*/React__default.createElement("dl", _extends$1({
|
|
11183
11328
|
className: classNames('DefinitionList', className)
|
|
11184
11329
|
}, rest), /*#__PURE__*/React__default.createElement("dt", null, term), /*#__PURE__*/React__default.createElement("dd", null, children));
|
|
11185
11330
|
};
|
|
11186
11331
|
|
|
11187
|
-
var _excluded$
|
|
11332
|
+
var _excluded$f = ["name", "children", "className", "virtual", "icon", "data-testid", "expanded"];
|
|
11188
11333
|
var Expandable = function Expandable(_ref) {
|
|
11189
11334
|
var name = _ref.name,
|
|
11190
11335
|
children = _ref.children,
|
|
@@ -11196,7 +11341,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11196
11341
|
dataTestId = _ref['data-testid'],
|
|
11197
11342
|
_ref$expanded = _ref.expanded,
|
|
11198
11343
|
__expanded__ = _ref$expanded === void 0 ? false : _ref$expanded,
|
|
11199
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11344
|
+
rest = _objectWithoutProperties(_ref, _excluded$f);
|
|
11200
11345
|
|
|
11201
11346
|
var _useState = useState(__expanded__),
|
|
11202
11347
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11225,7 +11370,7 @@ var Expandable = function Expandable(_ref) {
|
|
|
11225
11370
|
}, expanded || !virtual ? children : null));
|
|
11226
11371
|
};
|
|
11227
11372
|
|
|
11228
|
-
var _excluded$
|
|
11373
|
+
var _excluded$e = ["text", "treatment", "color", "family", "type", "className"];
|
|
11229
11374
|
var Divider = function Divider(_ref) {
|
|
11230
11375
|
var text = _ref.text,
|
|
11231
11376
|
treatment = _ref.treatment,
|
|
@@ -11233,7 +11378,7 @@ var Divider = function Divider(_ref) {
|
|
|
11233
11378
|
family = _ref.family,
|
|
11234
11379
|
type = _ref.type,
|
|
11235
11380
|
className = _ref.className,
|
|
11236
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11381
|
+
rest = _objectWithoutProperties(_ref, _excluded$e);
|
|
11237
11382
|
|
|
11238
11383
|
var defaultTreatment = type === 'two-line' ? 'eyebrow' : 'h5';
|
|
11239
11384
|
var defaultFamily = type === 'two-line' ? undefined : 'serif';
|
|
@@ -11249,21 +11394,21 @@ var Divider = function Divider(_ref) {
|
|
|
11249
11394
|
|
|
11250
11395
|
var TwoLineDivider = function TwoLineDivider(props) {
|
|
11251
11396
|
return /*#__PURE__*/React__default.createElement(Divider, _extends$1({}, props, {
|
|
11252
|
-
type:
|
|
11397
|
+
type: "two-line"
|
|
11253
11398
|
}));
|
|
11254
11399
|
};
|
|
11255
11400
|
|
|
11256
11401
|
var NoLineDivider = function NoLineDivider(props) {
|
|
11257
11402
|
return /*#__PURE__*/React__default.createElement(Divider, _extends$1({}, props, {
|
|
11258
|
-
type:
|
|
11403
|
+
type: "no-line"
|
|
11259
11404
|
}));
|
|
11260
11405
|
};
|
|
11261
11406
|
|
|
11262
|
-
var _excluded$
|
|
11407
|
+
var _excluded$d = ["className", "hidden"];
|
|
11263
11408
|
var Label = function Label(_ref) {
|
|
11264
11409
|
var className = _ref.className,
|
|
11265
11410
|
hidden = _ref.hidden,
|
|
11266
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11411
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
11267
11412
|
|
|
11268
11413
|
return /*#__PURE__*/React__default.createElement("label", _extends$1({
|
|
11269
11414
|
className: classNames('Label', className, {
|
|
@@ -11395,11 +11540,11 @@ var ArcWindow = function ArcWindow() {
|
|
|
11395
11540
|
}));
|
|
11396
11541
|
};
|
|
11397
11542
|
|
|
11398
|
-
var _excluded$
|
|
11543
|
+
var _excluded$c = ["className"];
|
|
11399
11544
|
var FRAMES = [Triangle, Diamond, ArcWindow, Circle];
|
|
11400
11545
|
var Loading = function Loading(_ref) {
|
|
11401
11546
|
var className = _ref.className,
|
|
11402
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11547
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
11403
11548
|
|
|
11404
11549
|
var _useCursor = dist.useCursor({
|
|
11405
11550
|
max: FRAMES.length
|
|
@@ -11407,8 +11552,9 @@ var Loading = function Loading(_ref) {
|
|
|
11407
11552
|
index = _useCursor.index,
|
|
11408
11553
|
handleNext = _useCursor.handleNext;
|
|
11409
11554
|
|
|
11555
|
+
var ONE_SECOND_INTERVAL = 1000;
|
|
11410
11556
|
useEffect(function () {
|
|
11411
|
-
var interval = setInterval(handleNext,
|
|
11557
|
+
var interval = setInterval(handleNext, ONE_SECOND_INTERVAL);
|
|
11412
11558
|
return function () {
|
|
11413
11559
|
return clearInterval(interval);
|
|
11414
11560
|
};
|
|
@@ -11474,13 +11620,13 @@ var LoadingBalls = function LoadingBalls(_ref) {
|
|
|
11474
11620
|
})));
|
|
11475
11621
|
};
|
|
11476
11622
|
|
|
11477
|
-
var _excluded$
|
|
11623
|
+
var _excluded$b = ["className", "children", "onClose", "shards"];
|
|
11478
11624
|
var Modal = function Modal(_ref) {
|
|
11479
11625
|
var className = _ref.className,
|
|
11480
11626
|
children = _ref.children,
|
|
11481
11627
|
onClose = _ref.onClose,
|
|
11482
11628
|
shards = _ref.shards,
|
|
11483
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11629
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
11484
11630
|
|
|
11485
11631
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
11486
11632
|
className: classNames('Modal', className)
|
|
@@ -11491,14 +11637,14 @@ var Modal = function Modal(_ref) {
|
|
|
11491
11637
|
}, children));
|
|
11492
11638
|
};
|
|
11493
11639
|
|
|
11494
|
-
var _excluded$
|
|
11640
|
+
var _excluded$a = ["className", "children", "show"];
|
|
11495
11641
|
var UNMOUNT_DELAY_MS = 500;
|
|
11496
11642
|
var Overlay = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
11497
11643
|
var className = _ref.className,
|
|
11498
11644
|
children = _ref.children,
|
|
11499
11645
|
_ref$show = _ref.show,
|
|
11500
11646
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11501
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11647
|
+
rest = _objectWithoutProperties(_ref, _excluded$a);
|
|
11502
11648
|
|
|
11503
11649
|
var _useState = useState(show),
|
|
11504
11650
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -11528,7 +11674,7 @@ var Overlay = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
11528
11674
|
});
|
|
11529
11675
|
Overlay.displayName = 'Overlay';
|
|
11530
11676
|
|
|
11531
|
-
var _excluded$
|
|
11677
|
+
var _excluded$9 = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
|
|
11532
11678
|
var ModalOverlay = function ModalOverlay(_ref) {
|
|
11533
11679
|
var children = _ref.children,
|
|
11534
11680
|
className = _ref.className,
|
|
@@ -11538,7 +11684,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
11538
11684
|
_ref$show = _ref.show,
|
|
11539
11685
|
show = _ref$show === void 0 ? true : _ref$show,
|
|
11540
11686
|
shards = _ref.shards,
|
|
11541
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11687
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
11542
11688
|
|
|
11543
11689
|
var element = useMemo(function () {
|
|
11544
11690
|
return typeof document !== 'undefined' ? document.createElement('div') : null;
|
|
@@ -11809,8 +11955,11 @@ var Paginator = function Paginator(_ref) {
|
|
|
11809
11955
|
})));
|
|
11810
11956
|
};
|
|
11811
11957
|
|
|
11812
|
-
var _excluded$
|
|
11958
|
+
var _excluded$8 = ["className", "children", "content", "open", "anchor", "zIndex", "autoPreview", "smoothTransitioning"];
|
|
11813
11959
|
var POPOVER_MOUSEOUT_DELAY_MS = 200;
|
|
11960
|
+
var THREE_QUARTER_SECOND_DELAY = 750;
|
|
11961
|
+
var ONE_SECOND_DELAY = 1000;
|
|
11962
|
+
var FIVE_SECOND_DELAY = 5000;
|
|
11814
11963
|
var Mode;
|
|
11815
11964
|
|
|
11816
11965
|
(function (Mode) {
|
|
@@ -11834,7 +11983,7 @@ var Popover = function Popover(_ref) {
|
|
|
11834
11983
|
autoPreview = _ref$autoPreview === void 0 ? false : _ref$autoPreview,
|
|
11835
11984
|
_ref$smoothTransition = _ref.smoothTransitioning,
|
|
11836
11985
|
smoothTransitioning = _ref$smoothTransition === void 0 ? false : _ref$smoothTransition,
|
|
11837
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
11986
|
+
rest = _objectWithoutProperties(_ref, _excluded$8);
|
|
11838
11987
|
|
|
11839
11988
|
var _useState = useState(function () {
|
|
11840
11989
|
if (open && smoothTransitioning) {
|
|
@@ -11878,7 +12027,7 @@ var Popover = function Popover(_ref) {
|
|
|
11878
12027
|
if (mode !== Mode.Closing) return;
|
|
11879
12028
|
var closingTimeout = setTimeout(function () {
|
|
11880
12029
|
return setMode(Mode.Closed);
|
|
11881
|
-
},
|
|
12030
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11882
12031
|
return function () {
|
|
11883
12032
|
return clearTimeout(closingTimeout);
|
|
11884
12033
|
};
|
|
@@ -11887,7 +12036,7 @@ var Popover = function Popover(_ref) {
|
|
|
11887
12036
|
if (mode !== Mode.AutoOpening) return;
|
|
11888
12037
|
var openingTimeout = setTimeout(function () {
|
|
11889
12038
|
return setMode(Mode.AutoOpen);
|
|
11890
|
-
},
|
|
12039
|
+
}, ONE_SECOND_DELAY);
|
|
11891
12040
|
return function () {
|
|
11892
12041
|
return clearTimeout(openingTimeout);
|
|
11893
12042
|
};
|
|
@@ -11896,14 +12045,14 @@ var Popover = function Popover(_ref) {
|
|
|
11896
12045
|
if (mode !== Mode.Opening) return;
|
|
11897
12046
|
var openingTimeout = setTimeout(function () {
|
|
11898
12047
|
return setMode(Mode.Open);
|
|
11899
|
-
},
|
|
12048
|
+
}, THREE_QUARTER_SECOND_DELAY);
|
|
11900
12049
|
return function () {
|
|
11901
12050
|
return clearTimeout(openingTimeout);
|
|
11902
12051
|
};
|
|
11903
12052
|
}, [mode]);
|
|
11904
12053
|
useEffect(function () {
|
|
11905
12054
|
if (mode !== Mode.AutoOpen) return;
|
|
11906
|
-
var stayingTimeout = setTimeout(handleClose,
|
|
12055
|
+
var stayingTimeout = setTimeout(handleClose, FIVE_SECOND_DELAY);
|
|
11907
12056
|
return function () {
|
|
11908
12057
|
return clearTimeout(stayingTimeout);
|
|
11909
12058
|
};
|
|
@@ -11937,11 +12086,11 @@ var Popover = function Popover(_ref) {
|
|
|
11937
12086
|
}, content)), children));
|
|
11938
12087
|
};
|
|
11939
12088
|
|
|
11940
|
-
var _excluded$
|
|
12089
|
+
var _excluded$7 = ["className", "children"];
|
|
11941
12090
|
var PromoBanner = function PromoBanner(_ref) {
|
|
11942
12091
|
var className = _ref.className,
|
|
11943
12092
|
children = _ref.children,
|
|
11944
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12093
|
+
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
11945
12094
|
|
|
11946
12095
|
var length = Children.count(children);
|
|
11947
12096
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
@@ -11960,7 +12109,7 @@ var PromoBanner = function PromoBanner(_ref) {
|
|
|
11960
12109
|
})));
|
|
11961
12110
|
};
|
|
11962
12111
|
|
|
11963
|
-
var _excluded$
|
|
12112
|
+
var _excluded$6 = ["className", "checked", "children", "value", "tabIndex", "disabled"];
|
|
11964
12113
|
var RadioButton = function RadioButton(_ref) {
|
|
11965
12114
|
var className = _ref.className,
|
|
11966
12115
|
checked = _ref.checked,
|
|
@@ -11968,7 +12117,7 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
11968
12117
|
value = _ref.value,
|
|
11969
12118
|
tabIndex = _ref.tabIndex,
|
|
11970
12119
|
disabled = _ref.disabled,
|
|
11971
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12120
|
+
rest = _objectWithoutProperties(_ref, _excluded$6);
|
|
11972
12121
|
|
|
11973
12122
|
var inputRef = useRef(null);
|
|
11974
12123
|
return /*#__PURE__*/React__default.createElement("label", {
|
|
@@ -12005,14 +12154,14 @@ var RadioButton = function RadioButton(_ref) {
|
|
|
12005
12154
|
}, children));
|
|
12006
12155
|
};
|
|
12007
12156
|
|
|
12008
|
-
var _excluded$
|
|
12157
|
+
var _excluded$5 = ["className", "hover", "selected", "unavailable", "children"];
|
|
12009
12158
|
var SelectableButton = function SelectableButton(_ref) {
|
|
12010
12159
|
var className = _ref.className,
|
|
12011
12160
|
hover = _ref.hover,
|
|
12012
12161
|
selected = _ref.selected,
|
|
12013
12162
|
unavailable = _ref.unavailable,
|
|
12014
12163
|
children = _ref.children,
|
|
12015
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12164
|
+
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
12016
12165
|
|
|
12017
12166
|
return /*#__PURE__*/React__default.createElement(Clickable, _extends$1({
|
|
12018
12167
|
className: classNames('SelectableButton', {
|
|
@@ -12023,34 +12172,13 @@ var SelectableButton = function SelectableButton(_ref) {
|
|
|
12023
12172
|
}, rest), /*#__PURE__*/React__default.createElement("span", null, children));
|
|
12024
12173
|
};
|
|
12025
12174
|
|
|
12026
|
-
var _excluded$
|
|
12027
|
-
var Stack = function Stack(_ref) {
|
|
12028
|
-
var className = _ref.className,
|
|
12029
|
-
children = _ref.children,
|
|
12030
|
-
space = _ref.space,
|
|
12031
|
-
_ref$direction = _ref.direction,
|
|
12032
|
-
direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
|
|
12033
|
-
alignItems = _ref.alignItems,
|
|
12034
|
-
justifyContent = _ref.justifyContent,
|
|
12035
|
-
style = _ref.style,
|
|
12036
|
-
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
12037
|
-
|
|
12038
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12039
|
-
className: classNames("Stack Stack--".concat(direction, "-").concat(space), className),
|
|
12040
|
-
style: _objectSpread2(_objectSpread2({}, style), {}, {
|
|
12041
|
-
alignItems: alignItems,
|
|
12042
|
-
justifyContent: justifyContent
|
|
12043
|
-
})
|
|
12044
|
-
}, rest), children);
|
|
12045
|
-
};
|
|
12046
|
-
|
|
12047
|
-
var _excluded$6 = ["className", "disabled", "onRemove", "children"];
|
|
12175
|
+
var _excluded$4 = ["className", "disabled", "onRemove", "children"];
|
|
12048
12176
|
var Tag = function Tag(_ref) {
|
|
12049
12177
|
var className = _ref.className,
|
|
12050
12178
|
disabled = _ref.disabled,
|
|
12051
12179
|
onRemove = _ref.onRemove,
|
|
12052
12180
|
children = _ref.children,
|
|
12053
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12181
|
+
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
12054
12182
|
|
|
12055
12183
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12056
12184
|
className: classNames('Tag', className, {
|
|
@@ -12063,13 +12191,13 @@ var Tag = function Tag(_ref) {
|
|
|
12063
12191
|
}, /*#__PURE__*/React__default.createElement(Exit16, null)));
|
|
12064
12192
|
};
|
|
12065
12193
|
|
|
12066
|
-
var _excluded$
|
|
12194
|
+
var _excluded$3 = ["tabs", "onTabClicked", "activeTab", "className"];
|
|
12067
12195
|
var Tabs = function Tabs(_ref) {
|
|
12068
12196
|
var tabs = _ref.tabs,
|
|
12069
12197
|
onTabClicked = _ref.onTabClicked,
|
|
12070
12198
|
activeTab = _ref.activeTab,
|
|
12071
12199
|
className = _ref.className,
|
|
12072
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12200
|
+
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
12073
12201
|
|
|
12074
12202
|
var _useState = useState(activeTab || tabs[0].name),
|
|
12075
12203
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -12149,7 +12277,7 @@ var TabPanel = function TabPanel(_ref) {
|
|
|
12149
12277
|
}, children);
|
|
12150
12278
|
};
|
|
12151
12279
|
|
|
12152
|
-
var _excluded$
|
|
12280
|
+
var _excluded$2 = ["className", "disabled", "error", "focus", "placeholder", "label", "onChange"];
|
|
12153
12281
|
var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
12154
12282
|
var className = _ref.className,
|
|
12155
12283
|
disabled = _ref.disabled,
|
|
@@ -12158,7 +12286,7 @@ var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
12158
12286
|
placeholder = _ref.placeholder,
|
|
12159
12287
|
label = _ref.label,
|
|
12160
12288
|
_onChange = _ref.onChange,
|
|
12161
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12289
|
+
rest = _objectWithoutProperties(_ref, _excluded$2);
|
|
12162
12290
|
|
|
12163
12291
|
return /*#__PURE__*/React__default.createElement("textarea", _extends$1({
|
|
12164
12292
|
className: classNames('Textarea', className, {
|
|
@@ -12177,13 +12305,13 @@ var Textarea = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
12177
12305
|
});
|
|
12178
12306
|
Textarea.displayName = 'Textarea';
|
|
12179
12307
|
|
|
12180
|
-
var _excluded$
|
|
12308
|
+
var _excluded$1 = ["theme", "className", "onRemove", "children"];
|
|
12181
12309
|
var Toast = function Toast(_ref) {
|
|
12182
12310
|
var theme = _ref.theme,
|
|
12183
12311
|
className = _ref.className,
|
|
12184
12312
|
onRemove = _ref.onRemove,
|
|
12185
12313
|
children = _ref.children,
|
|
12186
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
12314
|
+
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12187
12315
|
|
|
12188
12316
|
return /*#__PURE__*/React__default.createElement(Stack, _extends$1({
|
|
12189
12317
|
className: classNames('Toast', "Toast--".concat(theme), className),
|
|
@@ -12200,11 +12328,11 @@ var Toast = function Toast(_ref) {
|
|
|
12200
12328
|
}, /*#__PURE__*/React__default.createElement(Exit16, null)));
|
|
12201
12329
|
};
|
|
12202
12330
|
|
|
12203
|
-
var _excluded
|
|
12331
|
+
var _excluded = ["className", "double"];
|
|
12204
12332
|
var VerticalDivider = function VerticalDivider(_ref) {
|
|
12205
12333
|
var className = _ref.className,
|
|
12206
12334
|
_double = _ref["double"],
|
|
12207
|
-
rest = _objectWithoutProperties(_ref, _excluded
|
|
12335
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12208
12336
|
|
|
12209
12337
|
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12210
12338
|
className: classNames('VerticalDivider', {
|
|
@@ -12243,102 +12371,6 @@ var PasswordInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
12243
12371
|
});
|
|
12244
12372
|
PasswordInput.displayName = 'PasswordInput';
|
|
12245
12373
|
|
|
12246
|
-
var isRenderProps = function isRenderProps(children) {
|
|
12247
|
-
return typeof children === 'function';
|
|
12248
|
-
};
|
|
12249
|
-
|
|
12250
|
-
var truncate = function truncate(string) {
|
|
12251
|
-
var maxLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 25;
|
|
12252
|
-
if (!string) return null;
|
|
12253
|
-
var ellipsis = string.length > maxLength;
|
|
12254
|
-
return "".concat(string.substring(0, maxLength)).concat(ellipsis ? '...' : '');
|
|
12255
|
-
};
|
|
12256
|
-
|
|
12257
|
-
var stringifyProps = function stringifyProps(props) {
|
|
12258
|
-
var stringifiedProps = Object.entries(props || {}).reduce(function (memo, _ref) {
|
|
12259
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
12260
|
-
key = _ref2[0],
|
|
12261
|
-
value = _ref2[1];
|
|
12262
|
-
|
|
12263
|
-
if (key === 'children') return "".concat(memo, " children={...}");
|
|
12264
|
-
if (typeof value === 'string') return "".concat(memo, " ").concat(key, "=\"").concat(truncate(value), "\"");
|
|
12265
|
-
if (typeof value === 'function') return "".concat(memo, " ").concat(key, "={fn}");
|
|
12266
|
-
if (typeof value === 'boolean') return "".concat(memo, " ").concat(key).concat(value ? '' : '={false}');
|
|
12267
|
-
if (typeof value === 'number') return "".concat(memo, " ").concat(key, "={").concat(value, "}");
|
|
12268
|
-
if (_typeof(value) === 'object') return "".concat(memo, " ").concat(key, "={...}");
|
|
12269
|
-
return "".concat(memo, " ").concat(key, "=").concat(value);
|
|
12270
|
-
}, '');
|
|
12271
|
-
return stringifiedProps.trim();
|
|
12272
|
-
};
|
|
12273
|
-
|
|
12274
|
-
var omit = function omit(obj) {
|
|
12275
|
-
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12276
|
-
keys[_key - 1] = arguments[_key];
|
|
12277
|
-
}
|
|
12278
|
-
|
|
12279
|
-
return Object.entries(obj).filter(function (_ref) {
|
|
12280
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
12281
|
-
key = _ref2[0];
|
|
12282
|
-
|
|
12283
|
-
return !keys.includes(key);
|
|
12284
|
-
}).reduce(function (obj, _ref3) {
|
|
12285
|
-
var _ref4 = _slicedToArray(_ref3, 2),
|
|
12286
|
-
key = _ref4[0],
|
|
12287
|
-
val = _ref4[1];
|
|
12288
|
-
|
|
12289
|
-
return Object.assign(obj, _defineProperty$1({}, key, val));
|
|
12290
|
-
}, {});
|
|
12291
|
-
};
|
|
12292
|
-
|
|
12293
|
-
var isEmpty = function isEmpty(obj) {
|
|
12294
|
-
return Object.entries(obj || {}).length === 0;
|
|
12295
|
-
};
|
|
12296
|
-
|
|
12297
|
-
var StatesProps = function StatesProps(_ref) {
|
|
12298
|
-
var props = _ref.props,
|
|
12299
|
-
children = _ref.children;
|
|
12300
|
-
var childrenProps = omit.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
12301
|
-
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
12302
|
-
className: "StatesProps",
|
|
12303
|
-
space: 2,
|
|
12304
|
-
direction: "horizontal"
|
|
12305
|
-
}, /*#__PURE__*/React__default.createElement("span", null, children.type.displayName || children.type.name), !isEmpty(props) && /*#__PURE__*/React__default.createElement("strong", null, stringifyProps(props)), !isRenderProps(children) && !isEmpty(childrenProps) && /*#__PURE__*/React__default.createElement("span", null, stringifyProps(childrenProps)), /*#__PURE__*/React__default.createElement("span", null, " "));
|
|
12306
|
-
};
|
|
12307
|
-
|
|
12308
|
-
var _excluded$1 = ["props", "children"];
|
|
12309
|
-
var State = function State(_ref) {
|
|
12310
|
-
var props = _ref.props,
|
|
12311
|
-
children = _ref.children,
|
|
12312
|
-
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
12313
|
-
|
|
12314
|
-
var Specimen = isRenderProps(children) ? children(props) : /*#__PURE__*/React__default.cloneElement(children, props);
|
|
12315
|
-
var innerChildren = isRenderProps(children) ? children(props) : children;
|
|
12316
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12317
|
-
className: "State"
|
|
12318
|
-
}, rest), Specimen, /*#__PURE__*/React__default.createElement("code", {
|
|
12319
|
-
className: "State__props"
|
|
12320
|
-
}, /*#__PURE__*/React__default.createElement(StatesProps, {
|
|
12321
|
-
props: props
|
|
12322
|
-
}, innerChildren)));
|
|
12323
|
-
};
|
|
12324
|
-
|
|
12325
|
-
var _excluded = ["states", "children"];
|
|
12326
|
-
var States = function States(_ref) {
|
|
12327
|
-
var _ref$states = _ref.states,
|
|
12328
|
-
states = _ref$states === void 0 ? [{}] : _ref$states,
|
|
12329
|
-
children = _ref.children,
|
|
12330
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12331
|
-
|
|
12332
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
12333
|
-
className: "States"
|
|
12334
|
-
}, states.map(function (props, i) {
|
|
12335
|
-
return /*#__PURE__*/React__default.createElement(State, _extends$1({
|
|
12336
|
-
key: i,
|
|
12337
|
-
props: props
|
|
12338
|
-
}, rest), children);
|
|
12339
|
-
}));
|
|
12340
|
-
};
|
|
12341
|
-
|
|
12342
12374
|
var tokens = {
|
|
12343
12375
|
colors: dist$4.colors,
|
|
12344
12376
|
typography: dist$4.typography,
|