@moda/om 19.1.0 → 19.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/index.cjs.js +343 -241
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +343 -241
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/SearchInput/SearchInput.d.ts +1 -0
- package/dist/src/components/SearchInput/SearchInput.stories.d.ts +1 -0
- package/dist/src/components/Select/Select.d.ts +1 -0
- package/dist/styles.css +1 -1
- package/package.json +89 -87
- package/src/components/SearchInput/SearchInput.scss +4 -0
- package/src/components/SearchInput/SearchInput.stories.tsx +6 -0
- package/src/components/SearchInput/SearchInput.tsx +5 -1
- package/src/components/Select/Select.tsx +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1067,6 +1067,20 @@ function _objectSpread2(e) {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
return e;
|
|
1069
1069
|
}
|
|
1070
|
+
function _toPrimitive(t, r) {
|
|
1071
|
+
if ("object" != typeof t || !t) return t;
|
|
1072
|
+
var e = t[Symbol.toPrimitive];
|
|
1073
|
+
if (void 0 !== e) {
|
|
1074
|
+
var i = e.call(t, r || "default");
|
|
1075
|
+
if ("object" != typeof i) return i;
|
|
1076
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1077
|
+
}
|
|
1078
|
+
return ("string" === r ? String : Number)(t);
|
|
1079
|
+
}
|
|
1080
|
+
function _toPropertyKey(t) {
|
|
1081
|
+
var i = _toPrimitive(t, "string");
|
|
1082
|
+
return "symbol" == typeof i ? i : String(i);
|
|
1083
|
+
}
|
|
1070
1084
|
function _typeof$1(o) {
|
|
1071
1085
|
"@babel/helpers - typeof";
|
|
1072
1086
|
|
|
@@ -1077,7 +1091,7 @@ function _typeof$1(o) {
|
|
|
1077
1091
|
}, _typeof$1(o);
|
|
1078
1092
|
}
|
|
1079
1093
|
function _defineProperty$1(obj, key, value) {
|
|
1080
|
-
key = _toPropertyKey
|
|
1094
|
+
key = _toPropertyKey(key);
|
|
1081
1095
|
if (key in obj) {
|
|
1082
1096
|
Object.defineProperty(obj, key, {
|
|
1083
1097
|
value: value,
|
|
@@ -1219,20 +1233,6 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
1219
1233
|
}
|
|
1220
1234
|
};
|
|
1221
1235
|
}
|
|
1222
|
-
function _toPrimitive$1(input, hint) {
|
|
1223
|
-
if (typeof input !== "object" || input === null) return input;
|
|
1224
|
-
var prim = input[Symbol.toPrimitive];
|
|
1225
|
-
if (prim !== undefined) {
|
|
1226
|
-
var res = prim.call(input, hint || "default");
|
|
1227
|
-
if (typeof res !== "object") return res;
|
|
1228
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1229
|
-
}
|
|
1230
|
-
return (hint === "string" ? String : Number)(input);
|
|
1231
|
-
}
|
|
1232
|
-
function _toPropertyKey$1(arg) {
|
|
1233
|
-
var key = _toPrimitive$1(arg, "string");
|
|
1234
|
-
return typeof key === "symbol" ? key : String(key);
|
|
1235
|
-
}
|
|
1236
1236
|
|
|
1237
1237
|
var isRenderProps = function isRenderProps(children) {
|
|
1238
1238
|
return typeof children === 'function';
|
|
@@ -1247,33 +1247,44 @@ var classnames = {exports: {}};
|
|
|
1247
1247
|
|
|
1248
1248
|
var hasOwn = {}.hasOwnProperty;
|
|
1249
1249
|
function classNames() {
|
|
1250
|
-
var classes =
|
|
1250
|
+
var classes = '';
|
|
1251
1251
|
for (var i = 0; i < arguments.length; i++) {
|
|
1252
1252
|
var arg = arguments[i];
|
|
1253
|
-
if (
|
|
1254
|
-
|
|
1255
|
-
if (argType === 'string' || argType === 'number') {
|
|
1256
|
-
classes.push(arg);
|
|
1257
|
-
} else if (Array.isArray(arg)) {
|
|
1258
|
-
if (arg.length) {
|
|
1259
|
-
var inner = classNames.apply(null, arg);
|
|
1260
|
-
if (inner) {
|
|
1261
|
-
classes.push(inner);
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
} else if (argType === 'object') {
|
|
1265
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
1266
|
-
classes.push(arg.toString());
|
|
1267
|
-
continue;
|
|
1268
|
-
}
|
|
1269
|
-
for (var key in arg) {
|
|
1270
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1271
|
-
classes.push(key);
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1253
|
+
if (arg) {
|
|
1254
|
+
classes = appendClass(classes, parseValue(arg));
|
|
1274
1255
|
}
|
|
1275
1256
|
}
|
|
1276
|
-
return classes
|
|
1257
|
+
return classes;
|
|
1258
|
+
}
|
|
1259
|
+
function parseValue(arg) {
|
|
1260
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
1261
|
+
return arg;
|
|
1262
|
+
}
|
|
1263
|
+
if (_typeof$1(arg) !== 'object') {
|
|
1264
|
+
return '';
|
|
1265
|
+
}
|
|
1266
|
+
if (Array.isArray(arg)) {
|
|
1267
|
+
return classNames.apply(null, arg);
|
|
1268
|
+
}
|
|
1269
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
1270
|
+
return arg.toString();
|
|
1271
|
+
}
|
|
1272
|
+
var classes = '';
|
|
1273
|
+
for (var key in arg) {
|
|
1274
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1275
|
+
classes = appendClass(classes, key);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
return classes;
|
|
1279
|
+
}
|
|
1280
|
+
function appendClass(value, newClass) {
|
|
1281
|
+
if (!newClass) {
|
|
1282
|
+
return value;
|
|
1283
|
+
}
|
|
1284
|
+
if (value) {
|
|
1285
|
+
return value + ' ' + newClass;
|
|
1286
|
+
}
|
|
1287
|
+
return value + newClass;
|
|
1277
1288
|
}
|
|
1278
1289
|
if (module.exports) {
|
|
1279
1290
|
classNames["default"] = classNames;
|
|
@@ -1306,7 +1317,7 @@ var Stack = function Stack(_ref) {
|
|
|
1306
1317
|
}, rest), children);
|
|
1307
1318
|
};
|
|
1308
1319
|
|
|
1309
|
-
var omit$
|
|
1320
|
+
var omit$1 = function omit(obj) {
|
|
1310
1321
|
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1311
1322
|
keys[_key - 1] = arguments[_key];
|
|
1312
1323
|
}
|
|
@@ -1357,7 +1368,7 @@ var isEmpty = function isEmpty(obj) {
|
|
|
1357
1368
|
var StatesProps = function StatesProps(_ref) {
|
|
1358
1369
|
var props = _ref.props,
|
|
1359
1370
|
children = _ref.children;
|
|
1360
|
-
var childrenProps = omit$
|
|
1371
|
+
var childrenProps = omit$1.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1361
1372
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
1362
1373
|
className: "StatesProps",
|
|
1363
1374
|
space: 2,
|
|
@@ -1397,41 +1408,70 @@ var States = function States(_ref) {
|
|
|
1397
1408
|
}));
|
|
1398
1409
|
};
|
|
1399
1410
|
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1411
|
+
/******************************************************************************
|
|
1412
|
+
Copyright (c) Microsoft Corporation.
|
|
1413
|
+
|
|
1414
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1415
|
+
purpose with or without fee is hereby granted.
|
|
1416
|
+
|
|
1417
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1418
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1419
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1420
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1421
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1422
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1423
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1424
|
+
***************************************************************************** */
|
|
1425
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
var __assign$b = function() {
|
|
1429
|
+
__assign$b = Object.assign || function __assign(t) {
|
|
1430
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1431
|
+
s = arguments[i];
|
|
1432
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1433
|
+
}
|
|
1434
|
+
return t;
|
|
1407
1435
|
};
|
|
1408
|
-
return
|
|
1436
|
+
return __assign$b.apply(this, arguments);
|
|
1409
1437
|
};
|
|
1438
|
+
|
|
1410
1439
|
function __rest$a(s, e) {
|
|
1411
1440
|
var t = {};
|
|
1412
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1441
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1442
|
+
t[p] = s[p];
|
|
1443
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1444
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1445
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1446
|
+
t[p[i]] = s[p[i]];
|
|
1447
|
+
}
|
|
1416
1448
|
return t;
|
|
1417
1449
|
}
|
|
1418
1450
|
|
|
1419
1451
|
/** @deprecated */
|
|
1420
1452
|
function __spreadArrays() {
|
|
1421
1453
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
1422
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1454
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1455
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
1456
|
+
r[k] = a[j];
|
|
1423
1457
|
return r;
|
|
1424
1458
|
}
|
|
1459
|
+
|
|
1425
1460
|
function __spreadArray(to, from, pack) {
|
|
1426
1461
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1462
|
+
if (ar || !(i in from)) {
|
|
1463
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1464
|
+
ar[i] = from[i];
|
|
1465
|
+
}
|
|
1431
1466
|
}
|
|
1432
1467
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1433
1468
|
}
|
|
1434
1469
|
|
|
1470
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1471
|
+
var e = new Error(message);
|
|
1472
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1473
|
+
};
|
|
1474
|
+
|
|
1435
1475
|
var zeroRightClassName = 'right-scroll-bar-position';
|
|
1436
1476
|
var fullWidthClassName = 'width-before-scroll-bar';
|
|
1437
1477
|
var noScrollbarsClassName = 'with-scroll-bars-hidden';
|
|
@@ -1504,6 +1544,7 @@ function useCallbackRef(initialValue, callback) {
|
|
|
1504
1544
|
return ref.facade;
|
|
1505
1545
|
}
|
|
1506
1546
|
|
|
1547
|
+
var currentValues = new WeakMap();
|
|
1507
1548
|
/**
|
|
1508
1549
|
* Merges two or more refs together providing a single interface to set their value
|
|
1509
1550
|
* @param {RefObject|Ref} refs
|
|
@@ -1519,11 +1560,32 @@ function useCallbackRef(initialValue, callback) {
|
|
|
1519
1560
|
* }
|
|
1520
1561
|
*/
|
|
1521
1562
|
function useMergeRefs(refs, defaultValue) {
|
|
1522
|
-
|
|
1563
|
+
var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {
|
|
1523
1564
|
return refs.forEach(function (ref) {
|
|
1524
1565
|
return assignRef(ref, newValue);
|
|
1525
1566
|
});
|
|
1526
1567
|
});
|
|
1568
|
+
// handle refs changes - added or removed
|
|
1569
|
+
React__namespace.useLayoutEffect(function () {
|
|
1570
|
+
var oldValue = currentValues.get(callbackRef);
|
|
1571
|
+
if (oldValue) {
|
|
1572
|
+
var prevRefs_1 = new Set(oldValue);
|
|
1573
|
+
var nextRefs_1 = new Set(refs);
|
|
1574
|
+
var current_1 = callbackRef.current;
|
|
1575
|
+
prevRefs_1.forEach(function (ref) {
|
|
1576
|
+
if (!nextRefs_1.has(ref)) {
|
|
1577
|
+
assignRef(ref, null);
|
|
1578
|
+
}
|
|
1579
|
+
});
|
|
1580
|
+
nextRefs_1.forEach(function (ref) {
|
|
1581
|
+
if (!prevRefs_1.has(ref)) {
|
|
1582
|
+
assignRef(ref, current_1);
|
|
1583
|
+
}
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
currentValues.set(callbackRef, refs);
|
|
1587
|
+
}, [refs]);
|
|
1588
|
+
return callbackRef;
|
|
1527
1589
|
}
|
|
1528
1590
|
|
|
1529
1591
|
function ItoI(a) {
|
|
@@ -1614,7 +1676,7 @@ function createSidecarMedium(options) {
|
|
|
1614
1676
|
options = {};
|
|
1615
1677
|
}
|
|
1616
1678
|
var medium = innerCreateMedium(null);
|
|
1617
|
-
medium.options =
|
|
1679
|
+
medium.options = __assign$b({
|
|
1618
1680
|
async: true,
|
|
1619
1681
|
ssr: false
|
|
1620
1682
|
}, options);
|
|
@@ -1631,7 +1693,7 @@ var SideCar$1 = function SideCar(_a) {
|
|
|
1631
1693
|
if (!Target) {
|
|
1632
1694
|
throw new Error('Sidecar medium not found');
|
|
1633
1695
|
}
|
|
1634
|
-
return /*#__PURE__*/React__namespace.createElement(Target,
|
|
1696
|
+
return /*#__PURE__*/React__namespace.createElement(Target, __assign$b({}, rest));
|
|
1635
1697
|
};
|
|
1636
1698
|
SideCar$1.isSideCarExport = true;
|
|
1637
1699
|
function exportSidecar(medium, exported) {
|
|
@@ -1672,7 +1734,7 @@ var RemoveScroll = /*#__PURE__*/React__namespace.forwardRef(function (props, par
|
|
|
1672
1734
|
rest = __rest$a(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
1673
1735
|
var SideCar = sideCar;
|
|
1674
1736
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
1675
|
-
var containerProps =
|
|
1737
|
+
var containerProps = __assign$b(__assign$b({}, rest), callbacks);
|
|
1676
1738
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, enabled && ( /*#__PURE__*/React__namespace.createElement(SideCar, {
|
|
1677
1739
|
sideCar: effectCar$1,
|
|
1678
1740
|
removeScrollBar: removeScrollBar,
|
|
@@ -1683,9 +1745,9 @@ var RemoveScroll = /*#__PURE__*/React__namespace.forwardRef(function (props, par
|
|
|
1683
1745
|
allowPinchZoom: !!allowPinchZoom,
|
|
1684
1746
|
lockRef: ref,
|
|
1685
1747
|
gapMode: gapMode
|
|
1686
|
-
})), forwardProps ? ( /*#__PURE__*/React__namespace.cloneElement(React__namespace.Children.only(children),
|
|
1748
|
+
})), forwardProps ? ( /*#__PURE__*/React__namespace.cloneElement(React__namespace.Children.only(children), __assign$b(__assign$b({}, containerProps), {
|
|
1687
1749
|
ref: containerRef
|
|
1688
|
-
}))) : ( /*#__PURE__*/React__namespace.createElement(Container,
|
|
1750
|
+
}))) : ( /*#__PURE__*/React__namespace.createElement(Container, __assign$b({}, containerProps, {
|
|
1689
1751
|
className: className,
|
|
1690
1752
|
ref: containerRef
|
|
1691
1753
|
}), children)));
|
|
@@ -2991,7 +3053,7 @@ var FocusLock = /*#__PURE__*/React__namespace.forwardRef(function FocusLockUI(pr
|
|
|
2991
3053
|
var hasLeadingGuards = noFocusGuards !== true;
|
|
2992
3054
|
var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';
|
|
2993
3055
|
var mergedRef = useMergeRefs([parentRef, setObserveNode]);
|
|
2994
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, hasLeadingGuards && [
|
|
3056
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, hasLeadingGuards && [/*#__PURE__*/
|
|
2995
3057
|
// nearest focus guard
|
|
2996
3058
|
React__namespace.createElement("div", {
|
|
2997
3059
|
key: "guard-first",
|
|
@@ -3075,14 +3137,7 @@ FocusLock.defaultProps = {
|
|
|
3075
3137
|
var FocusLockUI = FocusLock;
|
|
3076
3138
|
|
|
3077
3139
|
function deferAction(action) {
|
|
3078
|
-
|
|
3079
|
-
var _window = window,
|
|
3080
|
-
setImmediate = _window.setImmediate;
|
|
3081
|
-
if (typeof setImmediate !== 'undefined') {
|
|
3082
|
-
setImmediate(action);
|
|
3083
|
-
} else {
|
|
3084
|
-
setTimeout(action, 1);
|
|
3085
|
-
}
|
|
3140
|
+
setTimeout(action, 1);
|
|
3086
3141
|
}
|
|
3087
3142
|
|
|
3088
3143
|
var effectCar = createSidecarMedium();
|
|
@@ -3121,7 +3176,7 @@ var FocusOn$1 = /*#__PURE__*/React__namespace.forwardRef(function (props, parent
|
|
|
3121
3176
|
var onActivation = lockProps.onActivation,
|
|
3122
3177
|
onDeactivation = lockProps.onDeactivation,
|
|
3123
3178
|
restProps = __rest$a(lockProps, ["onActivation", "onDeactivation"]);
|
|
3124
|
-
var appliedLockProps =
|
|
3179
|
+
var appliedLockProps = __assign$b(__assign$b({}, restProps), {
|
|
3125
3180
|
as: as,
|
|
3126
3181
|
style: style,
|
|
3127
3182
|
sideCar: sideCar,
|
|
@@ -3146,7 +3201,7 @@ var FocusOn$1 = /*#__PURE__*/React__namespace.forwardRef(function (props, parent
|
|
|
3146
3201
|
lockProps: appliedLockProps,
|
|
3147
3202
|
focusOptions: preventScrollOnFocus ? PREVENT_SCROLL : undefined,
|
|
3148
3203
|
as: RemoveScroll
|
|
3149
|
-
}, children), enabled && ( /*#__PURE__*/React__namespace.createElement(SideCar,
|
|
3204
|
+
}, children), enabled && ( /*#__PURE__*/React__namespace.createElement(SideCar, __assign$b({}, rest, {
|
|
3150
3205
|
sideCar: effectCar,
|
|
3151
3206
|
setLockProps: setLockProps,
|
|
3152
3207
|
shards: shards
|
|
@@ -3167,34 +3222,34 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
3167
3222
|
_setPrototypeOf(subClass, superClass);
|
|
3168
3223
|
}
|
|
3169
3224
|
|
|
3170
|
-
function _typeof(
|
|
3225
|
+
function _typeof(o) {
|
|
3171
3226
|
"@babel/helpers - typeof";
|
|
3172
3227
|
|
|
3173
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
3174
|
-
return typeof
|
|
3175
|
-
} : function (
|
|
3176
|
-
return
|
|
3177
|
-
}, _typeof(
|
|
3228
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3229
|
+
return typeof o;
|
|
3230
|
+
} : function (o) {
|
|
3231
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3232
|
+
}, _typeof(o);
|
|
3178
3233
|
}
|
|
3179
3234
|
|
|
3180
|
-
function
|
|
3181
|
-
if (
|
|
3182
|
-
var
|
|
3183
|
-
if (
|
|
3184
|
-
var
|
|
3185
|
-
if (
|
|
3235
|
+
function toPrimitive(t, r) {
|
|
3236
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
3237
|
+
var e = t[Symbol.toPrimitive];
|
|
3238
|
+
if (void 0 !== e) {
|
|
3239
|
+
var i = e.call(t, r || "default");
|
|
3240
|
+
if ("object" != _typeof(i)) return i;
|
|
3186
3241
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3187
3242
|
}
|
|
3188
|
-
return (
|
|
3243
|
+
return ("string" === r ? String : Number)(t);
|
|
3189
3244
|
}
|
|
3190
3245
|
|
|
3191
|
-
function
|
|
3192
|
-
var
|
|
3193
|
-
return _typeof(
|
|
3246
|
+
function toPropertyKey(t) {
|
|
3247
|
+
var i = toPrimitive(t, "string");
|
|
3248
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
|
3194
3249
|
}
|
|
3195
3250
|
|
|
3196
3251
|
function _defineProperty(obj, key, value) {
|
|
3197
|
-
key =
|
|
3252
|
+
key = toPropertyKey(key);
|
|
3198
3253
|
if (key in obj) {
|
|
3199
3254
|
Object.defineProperty(obj, key, {
|
|
3200
3255
|
value: value,
|
|
@@ -3459,17 +3514,29 @@ var filterAutoFocusable = function filterAutoFocusable(nodes, cache) {
|
|
|
3459
3514
|
});
|
|
3460
3515
|
};
|
|
3461
3516
|
/**
|
|
3462
|
-
*
|
|
3463
|
-
*
|
|
3517
|
+
* !__WARNING__! Low level API.
|
|
3518
|
+
* @returns all tabbable nodes
|
|
3519
|
+
*
|
|
3520
|
+
* @see {@link getFocusableNodes} to get any focusable element
|
|
3521
|
+
*
|
|
3522
|
+
* @param topNodes - array of top level HTMLElements to search inside
|
|
3523
|
+
* @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
|
|
3464
3524
|
*/
|
|
3465
3525
|
var getTabbableNodes = function getTabbableNodes(topNodes, visibilityCache, withGuards) {
|
|
3466
3526
|
return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);
|
|
3467
3527
|
};
|
|
3468
3528
|
/**
|
|
3469
|
-
*
|
|
3470
|
-
*
|
|
3529
|
+
* !__WARNING__! Low level API.
|
|
3530
|
+
*
|
|
3531
|
+
* @returns anything "focusable", not only tabbable. The difference is in `tabIndex=-1`
|
|
3532
|
+
* (without guards, as long as they are not expected to be ever focused)
|
|
3533
|
+
*
|
|
3534
|
+
* @see {@link getTabbableNodes} to get only tabble nodes element
|
|
3535
|
+
*
|
|
3536
|
+
* @param topNodes - array of top level HTMLElements to search inside
|
|
3537
|
+
* @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
|
|
3471
3538
|
*/
|
|
3472
|
-
var
|
|
3539
|
+
var getFocusableNodes = function getFocusableNodes(topNodes, visibilityCache) {
|
|
3473
3540
|
return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);
|
|
3474
3541
|
};
|
|
3475
3542
|
/**
|
|
@@ -3541,8 +3608,8 @@ var getTopParent = function getTopParent(node) {
|
|
|
3541
3608
|
};
|
|
3542
3609
|
/**
|
|
3543
3610
|
* returns all "focus containers" inside a given node
|
|
3544
|
-
* @param node
|
|
3545
|
-
* @returns
|
|
3611
|
+
* @param node - node or nodes to look inside
|
|
3612
|
+
* @returns Element[]
|
|
3546
3613
|
*/
|
|
3547
3614
|
var getAllAffectedNodes = function getAllAffectedNodes(node) {
|
|
3548
3615
|
var nodes = asArray(node);
|
|
@@ -3564,6 +3631,10 @@ var safeProbe = function safeProbe(cb) {
|
|
|
3564
3631
|
/**
|
|
3565
3632
|
* returns active element from document or from nested shadowdoms
|
|
3566
3633
|
*/
|
|
3634
|
+
/**
|
|
3635
|
+
* returns current active element. If the active element is a "container" itself(shadowRoot or iframe) returns active element inside it
|
|
3636
|
+
* @param [inDocument]
|
|
3637
|
+
*/
|
|
3567
3638
|
var getActiveElement = function getActiveElement(inDocument) {
|
|
3568
3639
|
if (inDocument === void 0) {
|
|
3569
3640
|
inDocument = document;
|
|
@@ -3586,7 +3657,8 @@ var focusInsideIframe = function focusInsideIframe(topNode, activeElement) {
|
|
|
3586
3657
|
}));
|
|
3587
3658
|
};
|
|
3588
3659
|
/**
|
|
3589
|
-
* @returns {Boolean} true, if the current focus is inside given node or nodes
|
|
3660
|
+
* @returns {Boolean} true, if the current focus is inside given node or nodes.
|
|
3661
|
+
* Supports nodes hidden inside shadowDom
|
|
3590
3662
|
*/
|
|
3591
3663
|
var focusInside = function focusInside(topNode, activeElement) {
|
|
3592
3664
|
// const activeElement = document && getActiveElement();
|
|
@@ -3602,8 +3674,11 @@ var focusInside = function focusInside(topNode, activeElement) {
|
|
|
3602
3674
|
};
|
|
3603
3675
|
|
|
3604
3676
|
/**
|
|
3605
|
-
* focus is hidden FROM the focus-lock
|
|
3677
|
+
* checks if focus is hidden FROM the focus-lock
|
|
3606
3678
|
* ie contained inside a node focus-lock shall ignore
|
|
3679
|
+
*
|
|
3680
|
+
* This is a utility function coupled with {@link FOCUS_ALLOW} constant
|
|
3681
|
+
*
|
|
3607
3682
|
* @returns {boolean} focus is currently is in "allow" area
|
|
3608
3683
|
*/
|
|
3609
3684
|
var focusIsHidden = function focusIsHidden(inDocument) {
|
|
@@ -3828,16 +3903,21 @@ var reorderNodes = function reorderNodes(srcNodes, dstNodes) {
|
|
|
3828
3903
|
}).filter(isDefined);
|
|
3829
3904
|
};
|
|
3830
3905
|
/**
|
|
3831
|
-
*
|
|
3906
|
+
* contains the main logic of the `focus-lock` package.
|
|
3907
|
+
*
|
|
3908
|
+
* ! you probably dont need this function !
|
|
3909
|
+
*
|
|
3910
|
+
* given top node(s) and the last active element returns the element to be focused next
|
|
3911
|
+
* @returns element which should be focused to move focus inside
|
|
3832
3912
|
* @param topNode
|
|
3833
3913
|
* @param lastNode
|
|
3834
3914
|
*/
|
|
3835
|
-
var
|
|
3915
|
+
var focusSolver = function focusSolver(topNode, lastNode) {
|
|
3836
3916
|
var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);
|
|
3837
3917
|
var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
|
|
3838
3918
|
var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
|
|
3839
3919
|
var visibilityCache = new Map();
|
|
3840
|
-
var anyFocusable =
|
|
3920
|
+
var anyFocusable = getFocusableNodes(entries, visibilityCache);
|
|
3841
3921
|
var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {
|
|
3842
3922
|
var node = _a.node;
|
|
3843
3923
|
return isNotAGuard(node);
|
|
@@ -3848,7 +3928,7 @@ var getFocusMerge = function getFocusMerge(topNode, lastNode) {
|
|
|
3848
3928
|
return undefined;
|
|
3849
3929
|
}
|
|
3850
3930
|
}
|
|
3851
|
-
var outerNodes =
|
|
3931
|
+
var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {
|
|
3852
3932
|
var node = _a.node;
|
|
3853
3933
|
return node;
|
|
3854
3934
|
});
|
|
@@ -3876,10 +3956,10 @@ var getFocusMerge = function getFocusMerge(topNode, lastNode) {
|
|
|
3876
3956
|
};
|
|
3877
3957
|
|
|
3878
3958
|
/**
|
|
3879
|
-
*
|
|
3880
|
-
* @
|
|
3959
|
+
* @returns list of focusable elements inside a given top node
|
|
3960
|
+
* @see {@link getFocusableNodes} for lower level access
|
|
3881
3961
|
*/
|
|
3882
|
-
var
|
|
3962
|
+
var expandFocusableNodes = function expandFocusableNodes(topNode) {
|
|
3883
3963
|
var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
|
|
3884
3964
|
var commonParent = getTopCommonParent(topNode, topNode, entries);
|
|
3885
3965
|
var visibilityCache = new Map();
|
|
@@ -3911,26 +3991,34 @@ var focusOn = function focusOn(target, focusOptions) {
|
|
|
3911
3991
|
target.contentWindow.focus();
|
|
3912
3992
|
}
|
|
3913
3993
|
};
|
|
3994
|
+
|
|
3914
3995
|
var guardCount = 0;
|
|
3915
3996
|
var lockDisabled = false;
|
|
3916
3997
|
/**
|
|
3917
|
-
*
|
|
3998
|
+
* The main functionality of the focus-lock package
|
|
3999
|
+
*
|
|
4000
|
+
* Contains focus at a given node.
|
|
4001
|
+
* The last focused element will help to determine which element(first or last) should be focused.
|
|
4002
|
+
* The found element will be focused.
|
|
4003
|
+
*
|
|
4004
|
+
* This is one time action (move), not a persistent focus-lock
|
|
4005
|
+
*
|
|
3918
4006
|
* HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus
|
|
3919
|
-
* @
|
|
3920
|
-
* @param lastNode
|
|
3921
|
-
* @param options
|
|
4007
|
+
* @see {@link focusSolver} for the same functionality without autofocus
|
|
3922
4008
|
*/
|
|
3923
|
-
var
|
|
4009
|
+
var moveFocusInside = function moveFocusInside(topNode, lastNode, options) {
|
|
3924
4010
|
if (options === void 0) {
|
|
3925
4011
|
options = {};
|
|
3926
4012
|
}
|
|
3927
|
-
var focusable =
|
|
4013
|
+
var focusable = focusSolver(topNode, lastNode);
|
|
4014
|
+
// global local side effect to countain recursive lock activation and resolve focus-fighting
|
|
3928
4015
|
if (lockDisabled) {
|
|
3929
4016
|
return;
|
|
3930
4017
|
}
|
|
3931
4018
|
if (focusable) {
|
|
4019
|
+
/** +FOCUS-FIGHTING prevention **/
|
|
3932
4020
|
if (guardCount > 2) {
|
|
3933
|
-
//
|
|
4021
|
+
// we have recursive entered back the lock activation
|
|
3934
4022
|
console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
|
|
3935
4023
|
lockDisabled = true;
|
|
3936
4024
|
setTimeout(function () {
|
|
@@ -4043,7 +4131,7 @@ var activateTrap = function activateTrap() {
|
|
|
4043
4131
|
}
|
|
4044
4132
|
document.body.focus();
|
|
4045
4133
|
} else {
|
|
4046
|
-
result =
|
|
4134
|
+
result = moveFocusInside(workingArea, lastActiveFocus, {
|
|
4047
4135
|
focusOptions: focusOptions
|
|
4048
4136
|
});
|
|
4049
4137
|
lastPortaledElement = {};
|
|
@@ -4055,7 +4143,7 @@ var activateTrap = function activateTrap() {
|
|
|
4055
4143
|
}
|
|
4056
4144
|
if (document) {
|
|
4057
4145
|
var newActiveElement = document && document.activeElement;
|
|
4058
|
-
var allNodes =
|
|
4146
|
+
var allNodes = expandFocusableNodes(workingArea);
|
|
4059
4147
|
var focusedIndex = allNodes.map(function (_ref) {
|
|
4060
4148
|
var node = _ref.node;
|
|
4061
4149
|
return node;
|
|
@@ -4105,9 +4193,9 @@ process.env.NODE_ENV !== "production" ? {
|
|
|
4105
4193
|
var onWindowBlur = function onWindowBlur() {
|
|
4106
4194
|
focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction
|
|
4107
4195
|
|
|
4108
|
-
|
|
4196
|
+
deferAction(function () {
|
|
4109
4197
|
focusWasOutsideWindow = 'meanwhile';
|
|
4110
|
-
}
|
|
4198
|
+
});
|
|
4111
4199
|
};
|
|
4112
4200
|
var attachHandler = function attachHandler() {
|
|
4113
4201
|
document.addEventListener('focusin', onTrap);
|
|
@@ -4161,7 +4249,7 @@ mediumFocus.assignSyncMedium(onFocus);
|
|
|
4161
4249
|
mediumBlur.assignMedium(onBlur);
|
|
4162
4250
|
mediumEffect.assignMedium(function (cb) {
|
|
4163
4251
|
return cb({
|
|
4164
|
-
moveFocusInside:
|
|
4252
|
+
moveFocusInside: moveFocusInside,
|
|
4165
4253
|
focusInside: focusInside
|
|
4166
4254
|
});
|
|
4167
4255
|
});
|
|
@@ -4169,11 +4257,7 @@ var FocusTrap = withSideEffect(reducePropsToState, handleStateChangeOnClient)(Fo
|
|
|
4169
4257
|
|
|
4170
4258
|
exportSidecar(mediumSidecar, FocusTrap);
|
|
4171
4259
|
|
|
4172
|
-
var currentNonce;
|
|
4173
4260
|
var getNonce = function getNonce() {
|
|
4174
|
-
if (currentNonce) {
|
|
4175
|
-
return currentNonce;
|
|
4176
|
-
}
|
|
4177
4261
|
if (typeof __webpack_nonce__ !== 'undefined') {
|
|
4178
4262
|
return __webpack_nonce__;
|
|
4179
4263
|
}
|
|
@@ -4442,15 +4526,20 @@ var handleScroll = function handleScroll(axis, endTarget, event, sourceDelta, no
|
|
|
4442
4526
|
availableScrollTop += position;
|
|
4443
4527
|
}
|
|
4444
4528
|
}
|
|
4445
|
-
target
|
|
4529
|
+
if (target instanceof ShadowRoot) {
|
|
4530
|
+
target = target.host;
|
|
4531
|
+
} else {
|
|
4532
|
+
target = target.parentNode;
|
|
4533
|
+
}
|
|
4446
4534
|
} while (
|
|
4447
4535
|
// portaled content
|
|
4448
4536
|
!targetInLock && target !== document.body ||
|
|
4449
4537
|
// self content
|
|
4450
4538
|
targetInLock && (endTarget.contains(target) || endTarget === target));
|
|
4451
|
-
|
|
4539
|
+
// handle epsilon around 0 (non standard zoom levels)
|
|
4540
|
+
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
4452
4541
|
shouldCancelScroll = true;
|
|
4453
|
-
} else if (!isDeltaPositive && (noOverscroll && availableScrollTop
|
|
4542
|
+
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
4454
4543
|
shouldCancelScroll = true;
|
|
4455
4544
|
}
|
|
4456
4545
|
return shouldCancelScroll;
|
|
@@ -4545,7 +4634,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4545
4634
|
}
|
|
4546
4635
|
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
|
|
4547
4636
|
var sourceEvent = shouldPreventQueue.current.filter(function (e) {
|
|
4548
|
-
return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);
|
|
4637
|
+
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
4549
4638
|
})[0];
|
|
4550
4639
|
// self event, and should be canceled
|
|
4551
4640
|
if (sourceEvent && sourceEvent.should) {
|
|
@@ -4572,7 +4661,8 @@ function RemoveScrollSideCar(props) {
|
|
|
4572
4661
|
name: name,
|
|
4573
4662
|
delta: delta,
|
|
4574
4663
|
target: target,
|
|
4575
|
-
should: should
|
|
4664
|
+
should: should,
|
|
4665
|
+
shadowParent: getOutermostShadowParent(target)
|
|
4576
4666
|
};
|
|
4577
4667
|
shouldPreventQueue.current.push(event);
|
|
4578
4668
|
setTimeout(function () {
|
|
@@ -4618,6 +4708,17 @@ function RemoveScrollSideCar(props) {
|
|
|
4618
4708
|
gapMode: props.gapMode
|
|
4619
4709
|
}) : null);
|
|
4620
4710
|
}
|
|
4711
|
+
function getOutermostShadowParent(node) {
|
|
4712
|
+
var shadowParent = null;
|
|
4713
|
+
while (node !== null) {
|
|
4714
|
+
if (node instanceof ShadowRoot) {
|
|
4715
|
+
shadowParent = node.host;
|
|
4716
|
+
node = node.host;
|
|
4717
|
+
}
|
|
4718
|
+
node = node.parentNode;
|
|
4719
|
+
}
|
|
4720
|
+
return shadowParent;
|
|
4721
|
+
}
|
|
4621
4722
|
|
|
4622
4723
|
exportSidecar(effectCar$1, RemoveScrollSideCar);
|
|
4623
4724
|
|
|
@@ -4871,10 +4972,10 @@ function Effect(_a) {
|
|
|
4871
4972
|
var SideCar = exportSidecar(effectCar, Effect);
|
|
4872
4973
|
|
|
4873
4974
|
var RequireSideCar = function RequireSideCar(props) {
|
|
4874
|
-
return /*#__PURE__*/React__namespace.createElement(SideCar,
|
|
4975
|
+
return /*#__PURE__*/React__namespace.createElement(SideCar, __assign$b({}, props));
|
|
4875
4976
|
};
|
|
4876
4977
|
var FocusOn = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
|
|
4877
|
-
return /*#__PURE__*/React__namespace.createElement(FocusOn$1,
|
|
4978
|
+
return /*#__PURE__*/React__namespace.createElement(FocusOn$1, __assign$b({}, props, {
|
|
4878
4979
|
ref: ref,
|
|
4879
4980
|
sideCar: RequireSideCar
|
|
4880
4981
|
}));
|
|
@@ -5361,7 +5462,6 @@ _curry2(function curryN(length, fn) {
|
|
|
5361
5462
|
}
|
|
5362
5463
|
return _arity(length, _curryN(length, [], fn));
|
|
5363
5464
|
});
|
|
5364
|
-
var curryN$1 = curryN;
|
|
5365
5465
|
|
|
5366
5466
|
/**
|
|
5367
5467
|
* Optimized internal three-arity curry function.
|
|
@@ -5520,16 +5620,15 @@ function _objectIs(a, b) {
|
|
|
5520
5620
|
}
|
|
5521
5621
|
var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
|
|
5522
5622
|
|
|
5523
|
-
var toString$
|
|
5623
|
+
var toString$1 = Object.prototype.toString;
|
|
5524
5624
|
var _isArguments = /*#__PURE__*/
|
|
5525
5625
|
function () {
|
|
5526
|
-
return toString$
|
|
5527
|
-
return toString$
|
|
5626
|
+
return toString$1.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
|
|
5627
|
+
return toString$1.call(x) === '[object Arguments]';
|
|
5528
5628
|
} : function _isArguments(x) {
|
|
5529
5629
|
return _has('callee', x);
|
|
5530
5630
|
};
|
|
5531
5631
|
}();
|
|
5532
|
-
var _isArguments$1 = _isArguments;
|
|
5533
5632
|
|
|
5534
5633
|
var hasEnumBug = ! /*#__PURE__*/
|
|
5535
5634
|
{
|
|
@@ -5581,7 +5680,7 @@ _curry1(function keys(obj) {
|
|
|
5581
5680
|
}
|
|
5582
5681
|
var prop, nIdx;
|
|
5583
5682
|
var ks = [];
|
|
5584
|
-
var checkArgsLength = hasArgsEnumBug && _isArguments
|
|
5683
|
+
var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
|
|
5585
5684
|
for (prop in obj) {
|
|
5586
5685
|
if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
|
|
5587
5686
|
ks[ks.length] = prop;
|
|
@@ -5599,7 +5698,6 @@ _curry1(function keys(obj) {
|
|
|
5599
5698
|
}
|
|
5600
5699
|
return ks;
|
|
5601
5700
|
});
|
|
5602
|
-
var keys$1 = keys;
|
|
5603
5701
|
|
|
5604
5702
|
/**
|
|
5605
5703
|
* Gives a single-word string description of the (native) type of a value,
|
|
@@ -5632,7 +5730,6 @@ var type = /*#__PURE__*/
|
|
|
5632
5730
|
_curry1(function type(val) {
|
|
5633
5731
|
return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
|
|
5634
5732
|
});
|
|
5635
|
-
var type$1 = type;
|
|
5636
5733
|
|
|
5637
5734
|
/**
|
|
5638
5735
|
* private _uniqContentEquals function.
|
|
@@ -5660,8 +5757,8 @@ function _equals(a, b, stackA, stackB) {
|
|
|
5660
5757
|
if (_objectIs$1(a, b)) {
|
|
5661
5758
|
return true;
|
|
5662
5759
|
}
|
|
5663
|
-
var typeA = type
|
|
5664
|
-
if (typeA !== type
|
|
5760
|
+
var typeA = type(a);
|
|
5761
|
+
if (typeA !== type(b)) {
|
|
5665
5762
|
return false;
|
|
5666
5763
|
}
|
|
5667
5764
|
if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
|
|
@@ -5740,8 +5837,8 @@ function _equals(a, b, stackA, stackB) {
|
|
|
5740
5837
|
// Values of other types are only equal if identical.
|
|
5741
5838
|
return false;
|
|
5742
5839
|
}
|
|
5743
|
-
var keysA = keys
|
|
5744
|
-
if (keysA.length !== keys
|
|
5840
|
+
var keysA = keys(a);
|
|
5841
|
+
if (keysA.length !== keys(b).length) {
|
|
5745
5842
|
return false;
|
|
5746
5843
|
}
|
|
5747
5844
|
var extendedStackA = stackA.concat([a]);
|
|
@@ -5787,7 +5884,6 @@ var equals = /*#__PURE__*/
|
|
|
5787
5884
|
_curry2(function equals(a, b) {
|
|
5788
5885
|
return _equals(a, b, [], []);
|
|
5789
5886
|
});
|
|
5790
|
-
var equals$1 = equals;
|
|
5791
5887
|
|
|
5792
5888
|
function _indexOf(list, a, idx) {
|
|
5793
5889
|
var inf, item; // Array.prototype.indexOf doesn't exist below IE9
|
|
@@ -5835,7 +5931,7 @@ function _indexOf(list, a, idx) {
|
|
|
5835
5931
|
} // anything else not covered above, defer to R.equals
|
|
5836
5932
|
|
|
5837
5933
|
while (idx < list.length) {
|
|
5838
|
-
if (equals
|
|
5934
|
+
if (equals(list[idx], a)) {
|
|
5839
5935
|
return idx;
|
|
5840
5936
|
}
|
|
5841
5937
|
idx += 1;
|
|
@@ -5875,7 +5971,6 @@ var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _
|
|
|
5875
5971
|
} : function _toISOString(d) {
|
|
5876
5972
|
return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';
|
|
5877
5973
|
};
|
|
5878
|
-
var _toISOString$1 = _toISOString;
|
|
5879
5974
|
|
|
5880
5975
|
function _complement(f) {
|
|
5881
5976
|
return function () {
|
|
@@ -5966,11 +6061,10 @@ _dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filte
|
|
|
5966
6061
|
acc[key] = filterable[key];
|
|
5967
6062
|
}
|
|
5968
6063
|
return acc;
|
|
5969
|
-
}, {}, keys
|
|
6064
|
+
}, {}, keys(filterable)) :
|
|
5970
6065
|
// else
|
|
5971
6066
|
_filter(pred, filterable);
|
|
5972
6067
|
}));
|
|
5973
|
-
var filter$1 = filter;
|
|
5974
6068
|
|
|
5975
6069
|
/**
|
|
5976
6070
|
* The complement of [`filter`](#filter).
|
|
@@ -5999,7 +6093,7 @@ var filter$1 = filter;
|
|
|
5999
6093
|
|
|
6000
6094
|
var reject = /*#__PURE__*/
|
|
6001
6095
|
_curry2(function reject(pred, filterable) {
|
|
6002
|
-
return filter
|
|
6096
|
+
return filter(_complement(pred), filterable);
|
|
6003
6097
|
});
|
|
6004
6098
|
var reject$1 = reject;
|
|
6005
6099
|
|
|
@@ -6020,11 +6114,11 @@ function _toString(x, seen) {
|
|
|
6020
6114
|
case '[object Array]':
|
|
6021
6115
|
return '[' + _map(recur, x).concat(mapPairs(x, reject$1(function (k) {
|
|
6022
6116
|
return /^\d+$/.test(k);
|
|
6023
|
-
}, keys
|
|
6117
|
+
}, keys(x)))).join(', ') + ']';
|
|
6024
6118
|
case '[object Boolean]':
|
|
6025
6119
|
return _typeof$1(x) === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();
|
|
6026
6120
|
case '[object Date]':
|
|
6027
|
-
return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString
|
|
6121
|
+
return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';
|
|
6028
6122
|
case '[object Map]':
|
|
6029
6123
|
return 'new Map(' + recur(Array.from(x)) + ')';
|
|
6030
6124
|
case '[object Null]':
|
|
@@ -6044,7 +6138,7 @@ function _toString(x, seen) {
|
|
|
6044
6138
|
return repr;
|
|
6045
6139
|
}
|
|
6046
6140
|
}
|
|
6047
|
-
return '{' + mapPairs(x, keys
|
|
6141
|
+
return '{' + mapPairs(x, keys(x)).join(', ') + '}';
|
|
6048
6142
|
}
|
|
6049
6143
|
}
|
|
6050
6144
|
|
|
@@ -6089,7 +6183,6 @@ var toString = /*#__PURE__*/
|
|
|
6089
6183
|
_curry1(function toString(val) {
|
|
6090
6184
|
return _toString(val, []);
|
|
6091
6185
|
});
|
|
6092
|
-
var toString$1 = toString;
|
|
6093
6186
|
|
|
6094
6187
|
/**
|
|
6095
6188
|
* Returns the larger of its two arguments.
|
|
@@ -6128,8 +6221,8 @@ _curry2(function max(a, b) {
|
|
|
6128
6221
|
if (maxByType !== undefined) {
|
|
6129
6222
|
return maxByType === _typeof$1(a) ? a : b;
|
|
6130
6223
|
}
|
|
6131
|
-
var stringA = toString
|
|
6132
|
-
var maxByStringValue = safeMax(stringA, toString
|
|
6224
|
+
var stringA = toString(a);
|
|
6225
|
+
var maxByStringValue = safeMax(stringA, toString(b));
|
|
6133
6226
|
if (maxByStringValue !== undefined) {
|
|
6134
6227
|
return maxByStringValue === stringA ? a : b;
|
|
6135
6228
|
}
|
|
@@ -6198,19 +6291,18 @@ _curry2( /*#__PURE__*/
|
|
|
6198
6291
|
_dispatchable(['fantasy-land/map', 'map'], _xmap$1, function map(fn, functor) {
|
|
6199
6292
|
switch (Object.prototype.toString.call(functor)) {
|
|
6200
6293
|
case '[object Function]':
|
|
6201
|
-
return curryN
|
|
6294
|
+
return curryN(functor.length, function () {
|
|
6202
6295
|
return fn.call(this, functor.apply(this, arguments));
|
|
6203
6296
|
});
|
|
6204
6297
|
case '[object Object]':
|
|
6205
6298
|
return _arrayReduce(function (acc, key) {
|
|
6206
6299
|
acc[key] = fn(functor[key]);
|
|
6207
6300
|
return acc;
|
|
6208
|
-
}, {}, keys
|
|
6301
|
+
}, {}, keys(functor));
|
|
6209
6302
|
default:
|
|
6210
6303
|
return _map(fn, functor);
|
|
6211
6304
|
}
|
|
6212
6305
|
}));
|
|
6213
|
-
var map$1 = map;
|
|
6214
6306
|
|
|
6215
6307
|
function _isString(x) {
|
|
6216
6308
|
return Object.prototype.toString.call(x) === '[object String]';
|
|
@@ -6257,12 +6349,11 @@ _curry1(function isArrayLike(x) {
|
|
|
6257
6349
|
}
|
|
6258
6350
|
return false;
|
|
6259
6351
|
});
|
|
6260
|
-
var _isArrayLike$1 = _isArrayLike;
|
|
6261
6352
|
|
|
6262
6353
|
var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';
|
|
6263
6354
|
function _createReduce(arrayReduce, methodReduce, iterableReduce) {
|
|
6264
6355
|
return function _reduce(xf, acc, list) {
|
|
6265
|
-
if (_isArrayLike
|
|
6356
|
+
if (_isArrayLike(list)) {
|
|
6266
6357
|
return arrayReduce(xf, acc, list);
|
|
6267
6358
|
}
|
|
6268
6359
|
if (list == null) {
|
|
@@ -6327,7 +6418,6 @@ _curry2(function bind(fn, thisObj) {
|
|
|
6327
6418
|
return fn.apply(thisObj, arguments);
|
|
6328
6419
|
});
|
|
6329
6420
|
});
|
|
6330
|
-
var bind$1 = bind;
|
|
6331
6421
|
|
|
6332
6422
|
function _xIterableReduce(xf, acc, iter) {
|
|
6333
6423
|
var step = iter.next();
|
|
@@ -6342,11 +6432,10 @@ function _xIterableReduce(xf, acc, iter) {
|
|
|
6342
6432
|
return xf['@@transducer/result'](acc);
|
|
6343
6433
|
}
|
|
6344
6434
|
function _xMethodReduce(xf, acc, obj, methodName) {
|
|
6345
|
-
return xf['@@transducer/result'](obj[methodName](bind
|
|
6435
|
+
return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
|
|
6346
6436
|
}
|
|
6347
6437
|
var _xReduce = /*#__PURE__*/
|
|
6348
6438
|
_createReduce(_xArrayReduce, _xMethodReduce, _xIterableReduce);
|
|
6349
|
-
var _xReduce$1 = _xReduce;
|
|
6350
6439
|
|
|
6351
6440
|
var XWrap = /*#__PURE__*/
|
|
6352
6441
|
function () {
|
|
@@ -6423,7 +6512,7 @@ function _xwrap(fn) {
|
|
|
6423
6512
|
|
|
6424
6513
|
var reduce = /*#__PURE__*/
|
|
6425
6514
|
_curry3(function (xf, acc, list) {
|
|
6426
|
-
return _xReduce
|
|
6515
|
+
return _xReduce(typeof xf === 'function' ? _xwrap(xf) : xf, acc, list);
|
|
6427
6516
|
});
|
|
6428
6517
|
var reduce$1 = reduce;
|
|
6429
6518
|
|
|
@@ -6489,7 +6578,7 @@ var identity$1 = identity;
|
|
|
6489
6578
|
|
|
6490
6579
|
var cond = /*#__PURE__*/
|
|
6491
6580
|
_curry1(function cond(pairs) {
|
|
6492
|
-
var arity = reduce$1(max$1, 0, map
|
|
6581
|
+
var arity = reduce$1(max$1, 0, map(function (pair) {
|
|
6493
6582
|
return pair[0].length;
|
|
6494
6583
|
}, pairs));
|
|
6495
6584
|
return _arity(arity, function () {
|
|
@@ -6502,7 +6591,6 @@ _curry1(function cond(pairs) {
|
|
|
6502
6591
|
}
|
|
6503
6592
|
});
|
|
6504
6593
|
});
|
|
6505
|
-
var cond$1 = cond;
|
|
6506
6594
|
|
|
6507
6595
|
var _Set = /*#__PURE__*/
|
|
6508
6596
|
function () {
|
|
@@ -6669,14 +6757,12 @@ function hasOrAdd(item, shouldAdd, set) {
|
|
|
6669
6757
|
}
|
|
6670
6758
|
} // A simple Set type that honours R.equals semantics
|
|
6671
6759
|
|
|
6672
|
-
var _Set$1 = _Set;
|
|
6673
|
-
|
|
6674
6760
|
var XUniqBy = /*#__PURE__*/
|
|
6675
6761
|
function () {
|
|
6676
6762
|
function XUniqBy(f, xf) {
|
|
6677
6763
|
this.xf = xf;
|
|
6678
6764
|
this.f = f;
|
|
6679
|
-
this.set = new _Set
|
|
6765
|
+
this.set = new _Set();
|
|
6680
6766
|
}
|
|
6681
6767
|
XUniqBy.prototype['@@transducer/init'] = _xfBase.init;
|
|
6682
6768
|
XUniqBy.prototype['@@transducer/result'] = _xfBase.result;
|
|
@@ -6715,7 +6801,7 @@ function _xuniqBy(f) {
|
|
|
6715
6801
|
var uniqBy = /*#__PURE__*/
|
|
6716
6802
|
_curry2( /*#__PURE__*/
|
|
6717
6803
|
_dispatchable([], _xuniqBy, function (fn, list) {
|
|
6718
|
-
var set = new _Set
|
|
6804
|
+
var set = new _Set();
|
|
6719
6805
|
var result = [];
|
|
6720
6806
|
var idx = 0;
|
|
6721
6807
|
var appliedItem, item;
|
|
@@ -6729,7 +6815,6 @@ _dispatchable([], _xuniqBy, function (fn, list) {
|
|
|
6729
6815
|
}
|
|
6730
6816
|
return result;
|
|
6731
6817
|
}));
|
|
6732
|
-
var uniqBy$1 = uniqBy;
|
|
6733
6818
|
|
|
6734
6819
|
/**
|
|
6735
6820
|
* Returns a new list containing only one copy of each element in the original
|
|
@@ -6750,8 +6835,7 @@ var uniqBy$1 = uniqBy;
|
|
|
6750
6835
|
*/
|
|
6751
6836
|
|
|
6752
6837
|
var uniq = /*#__PURE__*/
|
|
6753
|
-
uniqBy
|
|
6754
|
-
var uniq$1 = uniq;
|
|
6838
|
+
uniqBy(identity$1);
|
|
6755
6839
|
|
|
6756
6840
|
function _isNumber(x) {
|
|
6757
6841
|
return Object.prototype.toString.call(x) === '[object Number]';
|
|
@@ -6791,7 +6875,6 @@ _curry2(function omit(names, obj) {
|
|
|
6791
6875
|
}
|
|
6792
6876
|
return result;
|
|
6793
6877
|
});
|
|
6794
|
-
var omit$1 = omit;
|
|
6795
6878
|
|
|
6796
6879
|
/**
|
|
6797
6880
|
* Returns a list of numbers from `from` (inclusive) to `to` (exclusive).
|
|
@@ -6823,7 +6906,6 @@ _curry2(function range(from, to) {
|
|
|
6823
6906
|
}
|
|
6824
6907
|
return result;
|
|
6825
6908
|
});
|
|
6826
|
-
var range$1 = range;
|
|
6827
6909
|
|
|
6828
6910
|
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
6829
6911
|
|
|
@@ -6942,7 +7024,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
6942
7024
|
matches = _useBreakpoint.matches;
|
|
6943
7025
|
return matches ? /*#__PURE__*/React.createElement("div", _extends$1({
|
|
6944
7026
|
className: classNames('Breakpoint', "Breakpoint--".concat(mode, "-").concat(breakpoint), className)
|
|
6945
|
-
}, omit
|
|
7027
|
+
}, omit(['at', 'gt', 'lt'], rest)), children) : null;
|
|
6946
7028
|
};
|
|
6947
7029
|
|
|
6948
7030
|
var _excluded$v = ["secondary", "tertiary", "elevated", "chip", "hover", "focus", "disabled", "className"];
|
|
@@ -9697,6 +9779,7 @@ var Search20 = function Search20(_a) {
|
|
|
9697
9779
|
})
|
|
9698
9780
|
}, rest), /*#__PURE__*/React__namespace.createElement("svg", {
|
|
9699
9781
|
viewBox: "0 0 20 20",
|
|
9782
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
9700
9783
|
style: svgStyle
|
|
9701
9784
|
}, /*#__PURE__*/React__namespace.createElement("desc", null, "Created with Sketch."), /*#__PURE__*/React__namespace.createElement("g", {
|
|
9702
9785
|
id: "Search_20_svg__Icons/Search/20",
|
|
@@ -9711,12 +9794,14 @@ var Search20 = function Search20(_a) {
|
|
|
9711
9794
|
};
|
|
9712
9795
|
Search20.displayName = 'Search20';
|
|
9713
9796
|
|
|
9714
|
-
var _excluded$o = ["className", "onChange", "onClear", "value"];
|
|
9797
|
+
var _excluded$o = ["className", "onChange", "onClear", "roundBorders", "value"];
|
|
9715
9798
|
var DEFAULT_INPUT_VALUE = '';
|
|
9716
9799
|
var SearchInput = function SearchInput(_ref) {
|
|
9717
9800
|
var className = _ref.className,
|
|
9718
9801
|
onChange = _ref.onChange,
|
|
9719
9802
|
onClear = _ref.onClear,
|
|
9803
|
+
_ref$roundBorders = _ref.roundBorders,
|
|
9804
|
+
roundBorders = _ref$roundBorders === void 0 ? false : _ref$roundBorders,
|
|
9720
9805
|
_ref$value = _ref.value,
|
|
9721
9806
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
9722
9807
|
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
@@ -9744,7 +9829,9 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
9744
9829
|
}, /*#__PURE__*/React.createElement("div", {
|
|
9745
9830
|
className: "SearchInput__icon"
|
|
9746
9831
|
}, /*#__PURE__*/React.createElement(Search20, null)), /*#__PURE__*/React.createElement(TextInput, _extends$1({
|
|
9747
|
-
className:
|
|
9832
|
+
className: classNames('SearchInput__input', {
|
|
9833
|
+
'SearchInput__input--round-borders': roundBorders
|
|
9834
|
+
}),
|
|
9748
9835
|
onChange: handleChange,
|
|
9749
9836
|
value: controlledValue,
|
|
9750
9837
|
ref: ref
|
|
@@ -9763,8 +9850,8 @@ var t = function t(_t) {
|
|
|
9763
9850
|
},
|
|
9764
9851
|
n = function n(t, _n) {
|
|
9765
9852
|
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
9766
|
-
var
|
|
9767
|
-
return e$1(
|
|
9853
|
+
var _o = getComputedStyle(t, null);
|
|
9854
|
+
return e$1(_o.overflowY, _n) || e$1(_o.overflowX, _n) || function (t) {
|
|
9768
9855
|
var e = function (t) {
|
|
9769
9856
|
if (!t.ownerDocument || !t.ownerDocument.defaultView) return null;
|
|
9770
9857
|
try {
|
|
@@ -9778,84 +9865,97 @@ var t = function t(_t) {
|
|
|
9778
9865
|
}
|
|
9779
9866
|
return !1;
|
|
9780
9867
|
},
|
|
9781
|
-
|
|
9782
|
-
return
|
|
9868
|
+
o$1 = function o(t, e, n, _o2, l, r, i, s) {
|
|
9869
|
+
return r < t && i > e || r > t && i < e ? 0 : r <= t && s <= n || i >= e && s >= n ? r - t - _o2 : i > e && s < n || r < t && s > n ? i - e + l : 0;
|
|
9783
9870
|
},
|
|
9784
|
-
|
|
9871
|
+
l = function l(t) {
|
|
9785
9872
|
var e = t.parentElement;
|
|
9786
9873
|
return null == e ? t.getRootNode().host || null : e;
|
|
9787
9874
|
},
|
|
9788
|
-
|
|
9789
|
-
var
|
|
9875
|
+
r = function r(e, _r2) {
|
|
9876
|
+
var i, s, d, h;
|
|
9790
9877
|
if ("undefined" == typeof document) return [];
|
|
9791
|
-
var
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
a =
|
|
9795
|
-
g =
|
|
9796
|
-
|
|
9878
|
+
var c = _r2.scrollMode,
|
|
9879
|
+
f = _r2.block,
|
|
9880
|
+
u = _r2.inline,
|
|
9881
|
+
a = _r2.boundary,
|
|
9882
|
+
g = _r2.skipOverflowHiddenElements,
|
|
9883
|
+
p = "function" == typeof a ? a : function (t) {
|
|
9797
9884
|
return t !== a;
|
|
9798
9885
|
};
|
|
9799
9886
|
if (!t(e)) throw new TypeError("Invalid target");
|
|
9800
|
-
var
|
|
9801
|
-
w = []
|
|
9802
|
-
|
|
9803
|
-
for (; t(W) &&
|
|
9804
|
-
if (W =
|
|
9887
|
+
var m = document.scrollingElement || document.documentElement,
|
|
9888
|
+
w = [];
|
|
9889
|
+
var W = e;
|
|
9890
|
+
for (; t(W) && p(W);) {
|
|
9891
|
+
if (W = l(W), W === m) {
|
|
9805
9892
|
w.push(W);
|
|
9806
9893
|
break;
|
|
9807
9894
|
}
|
|
9808
9895
|
null != W && W === document.body && n(W) && !n(document.documentElement) || null != W && n(W, g) && w.push(W);
|
|
9809
9896
|
}
|
|
9810
|
-
var
|
|
9811
|
-
|
|
9897
|
+
var b = null != (s = null == (i = window.visualViewport) ? void 0 : i.width) ? s : innerWidth,
|
|
9898
|
+
H = null != (h = null == (d = window.visualViewport) ? void 0 : d.height) ? h : innerHeight,
|
|
9812
9899
|
_window = window,
|
|
9813
|
-
|
|
9814
|
-
|
|
9900
|
+
y = _window.scrollX,
|
|
9901
|
+
M = _window.scrollY,
|
|
9815
9902
|
_e$getBoundingClientR = e.getBoundingClientRect(),
|
|
9816
|
-
|
|
9817
|
-
|
|
9903
|
+
v = _e$getBoundingClientR.height,
|
|
9904
|
+
E = _e$getBoundingClientR.width,
|
|
9818
9905
|
x = _e$getBoundingClientR.top,
|
|
9819
|
-
|
|
9820
|
-
|
|
9906
|
+
C = _e$getBoundingClientR.right,
|
|
9907
|
+
I = _e$getBoundingClientR.bottom,
|
|
9821
9908
|
R = _e$getBoundingClientR.left,
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9909
|
+
_ref = function (t) {
|
|
9910
|
+
var e = window.getComputedStyle(t);
|
|
9911
|
+
return {
|
|
9912
|
+
top: parseFloat(e.scrollMarginTop) || 0,
|
|
9913
|
+
right: parseFloat(e.scrollMarginRight) || 0,
|
|
9914
|
+
bottom: parseFloat(e.scrollMarginBottom) || 0,
|
|
9915
|
+
left: parseFloat(e.scrollMarginLeft) || 0
|
|
9916
|
+
};
|
|
9917
|
+
}(e),
|
|
9918
|
+
T = _ref.top,
|
|
9919
|
+
B = _ref.right,
|
|
9920
|
+
F = _ref.bottom,
|
|
9921
|
+
V = _ref.left;
|
|
9922
|
+
var k = "start" === f || "nearest" === f ? x - T : "end" === f ? I + F : x + v / 2 - T + F,
|
|
9923
|
+
D = "center" === u ? R + E / 2 - V + B : "end" === u ? C + B : R - V;
|
|
9924
|
+
var L = [];
|
|
9825
9925
|
for (var _t2 = 0; _t2 < w.length; _t2++) {
|
|
9826
9926
|
var _e2 = w[_t2],
|
|
9827
9927
|
_e$getBoundingClientR2 = _e2.getBoundingClientRect(),
|
|
9828
9928
|
_n2 = _e$getBoundingClientR2.height,
|
|
9829
|
-
|
|
9830
|
-
|
|
9831
|
-
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
if ("if-needed" ===
|
|
9835
|
-
var
|
|
9836
|
-
_a = parseInt(
|
|
9837
|
-
_g = parseInt(
|
|
9838
|
-
|
|
9839
|
-
_W = parseInt(
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
9844
|
-
|
|
9845
|
-
|
|
9846
|
-
if (
|
|
9847
|
-
|
|
9929
|
+
_l = _e$getBoundingClientR2.width,
|
|
9930
|
+
_r = _e$getBoundingClientR2.top,
|
|
9931
|
+
_i = _e$getBoundingClientR2.right,
|
|
9932
|
+
_s = _e$getBoundingClientR2.bottom,
|
|
9933
|
+
_d = _e$getBoundingClientR2.left;
|
|
9934
|
+
if ("if-needed" === c && x >= 0 && R >= 0 && I <= H && C <= b && x >= _r && I <= _s && R >= _d && C <= _i) return L;
|
|
9935
|
+
var _h = getComputedStyle(_e2),
|
|
9936
|
+
_a = parseInt(_h.borderLeftWidth, 10),
|
|
9937
|
+
_g = parseInt(_h.borderTopWidth, 10),
|
|
9938
|
+
_p = parseInt(_h.borderRightWidth, 10),
|
|
9939
|
+
_W = parseInt(_h.borderBottomWidth, 10);
|
|
9940
|
+
var _T = 0,
|
|
9941
|
+
_B = 0;
|
|
9942
|
+
var _F = "offsetWidth" in _e2 ? _e2.offsetWidth - _e2.clientWidth - _a - _p : 0,
|
|
9943
|
+
_V = "offsetHeight" in _e2 ? _e2.offsetHeight - _e2.clientHeight - _g - _W : 0,
|
|
9944
|
+
S = "offsetWidth" in _e2 ? 0 === _e2.offsetWidth ? 0 : _l / _e2.offsetWidth : 0,
|
|
9945
|
+
X = "offsetHeight" in _e2 ? 0 === _e2.offsetHeight ? 0 : _n2 / _e2.offsetHeight : 0;
|
|
9946
|
+
if (m === _e2) _T = "start" === f ? k : "end" === f ? k - H : "nearest" === f ? o$1(M, M + H, H, _g, _W, M + k, M + k + v, v) : k - H / 2, _B = "start" === u ? D : "center" === u ? D - b / 2 : "end" === u ? D - b : o$1(y, y + b, b, _a, _p, y + D, y + D + E, E), _T = Math.max(0, _T + M), _B = Math.max(0, _B + y);else {
|
|
9947
|
+
_T = "start" === f ? k - _r - _g : "end" === f ? k - _s + _W + _V : "nearest" === f ? o$1(_r, _s, _n2, _g, _W + _V, k, k + v, v) : k - (_r + _n2 / 2) + _V / 2, _B = "start" === u ? D - _d - _a : "center" === u ? D - (_d + _l / 2) + _F / 2 : "end" === u ? D - _i + _p + _F : o$1(_d, _i, _l, _a, _p + _F, D, D + E, E);
|
|
9848
9948
|
var _t3 = _e2.scrollLeft,
|
|
9849
|
-
|
|
9850
|
-
|
|
9949
|
+
_h2 = _e2.scrollTop;
|
|
9950
|
+
_T = 0 === X ? 0 : Math.max(0, Math.min(_h2 + _T / X, _e2.scrollHeight - _n2 / X + _V)), _B = 0 === S ? 0 : Math.max(0, Math.min(_t3 + _B / S, _e2.scrollWidth - _l / S + _F)), k += _h2 - _T, D += _t3 - _B;
|
|
9851
9951
|
}
|
|
9852
|
-
|
|
9952
|
+
L.push({
|
|
9853
9953
|
el: _e2,
|
|
9854
|
-
top:
|
|
9855
|
-
left:
|
|
9954
|
+
top: _T,
|
|
9955
|
+
left: _B
|
|
9856
9956
|
});
|
|
9857
9957
|
}
|
|
9858
|
-
return
|
|
9958
|
+
return L;
|
|
9859
9959
|
};
|
|
9860
9960
|
|
|
9861
9961
|
var o = function o(t) {
|
|
@@ -9869,7 +9969,7 @@ var o = function o(t) {
|
|
|
9869
9969
|
inline: "nearest"
|
|
9870
9970
|
};
|
|
9871
9971
|
};
|
|
9872
|
-
function e(e, r) {
|
|
9972
|
+
function e(e, r$1) {
|
|
9873
9973
|
if (!e.isConnected || !function (t) {
|
|
9874
9974
|
var o = t;
|
|
9875
9975
|
for (; o && o.parentNode;) {
|
|
@@ -9889,9 +9989,9 @@ function e(e, r) {
|
|
|
9889
9989
|
}(e);
|
|
9890
9990
|
if (function (t) {
|
|
9891
9991
|
return "object" == _typeof$1(t) && "function" == typeof t.behavior;
|
|
9892
|
-
}(r)) return r.behavior(
|
|
9893
|
-
var l = "boolean" == typeof r || null == r ? void 0 : r.behavior;
|
|
9894
|
-
var _iterator = _createForOfIteratorHelper(
|
|
9992
|
+
}(r$1)) return r$1.behavior(r(e, r$1));
|
|
9993
|
+
var l = "boolean" == typeof r$1 || null == r$1 ? void 0 : r$1.behavior;
|
|
9994
|
+
var _iterator = _createForOfIteratorHelper(r(e, o(r$1))),
|
|
9895
9995
|
_step;
|
|
9896
9996
|
try {
|
|
9897
9997
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -10342,7 +10442,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10342
10442
|
dispatch({
|
|
10343
10443
|
type: 'SELECT',
|
|
10344
10444
|
payload: {
|
|
10345
|
-
value: uniq
|
|
10445
|
+
value: uniq([].concat(_toConsumableArray(values), [option.value]))
|
|
10346
10446
|
}
|
|
10347
10447
|
});
|
|
10348
10448
|
}, [dispatch, values]);
|
|
@@ -11090,6 +11190,7 @@ var ChevronLeft16 = function ChevronLeft16(_a) {
|
|
|
11090
11190
|
})
|
|
11091
11191
|
}, rest), /*#__PURE__*/React__namespace.createElement("svg", {
|
|
11092
11192
|
viewBox: "0 0 16 16",
|
|
11193
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
11093
11194
|
style: svgStyle
|
|
11094
11195
|
}, /*#__PURE__*/React__namespace.createElement("desc", null, "Created with Sketch."), /*#__PURE__*/React__namespace.createElement("g", {
|
|
11095
11196
|
id: "ChevronLeft_16_svg__Icons/Chevron/Left/16",
|
|
@@ -11150,6 +11251,7 @@ var ChevronRight16 = function ChevronRight16(_a) {
|
|
|
11150
11251
|
})
|
|
11151
11252
|
}, rest), /*#__PURE__*/React__namespace.createElement("svg", {
|
|
11152
11253
|
viewBox: "0 0 16 16",
|
|
11254
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
11153
11255
|
style: svgStyle
|
|
11154
11256
|
}, /*#__PURE__*/React__namespace.createElement("desc", null, "Created with Sketch."), /*#__PURE__*/React__namespace.createElement("g", {
|
|
11155
11257
|
id: "ChevronRight_16_svg__Icons/Chevron/Right/16",
|
|
@@ -11182,19 +11284,19 @@ var whenCurrentPageIsGreaterThanHalfTheTotal = function whenCurrentPageIsGreater
|
|
|
11182
11284
|
return page >= totalPages - Math.floor(maxPages / 2);
|
|
11183
11285
|
};
|
|
11184
11286
|
var showAllPages = function showAllPages(_, totalPages) {
|
|
11185
|
-
return range
|
|
11287
|
+
return range(1, totalPages + 1);
|
|
11186
11288
|
};
|
|
11187
11289
|
var showFirstNPagesAndLastPage = function showFirstNPagesAndLastPage(_, totalPages, maxPages) {
|
|
11188
|
-
return [].concat(_toConsumableArray(range
|
|
11290
|
+
return [].concat(_toConsumableArray(range(1, maxPages)), [totalPages]);
|
|
11189
11291
|
};
|
|
11190
11292
|
var showTheLastNPages = function showTheLastNPages(_, totalPages, maxPages) {
|
|
11191
|
-
return [1].concat(_toConsumableArray(range
|
|
11293
|
+
return [1].concat(_toConsumableArray(range(totalPages - maxPages + 2, totalPages + 1)));
|
|
11192
11294
|
};
|
|
11193
11295
|
var showAGroupOfPagesCenteredOnTheCurrentPage = function showAGroupOfPagesCenteredOnTheCurrentPage(page, totalPages, maxPages) {
|
|
11194
11296
|
var diff = Math.floor((maxPages - 2) / 2);
|
|
11195
|
-
return [1].concat(_toConsumableArray(range
|
|
11297
|
+
return [1].concat(_toConsumableArray(range(page - diff, page + diff + 1)), [totalPages]);
|
|
11196
11298
|
};
|
|
11197
|
-
var determinePagesToShow = cond
|
|
11299
|
+
var determinePagesToShow = cond([[whenThereAreFewerPagesThanWeDisplay, showAllPages], [whenCurrentPageIsLessThanHalfTheTotal, showFirstNPagesAndLastPage], [whenCurrentPageIsGreaterThanHalfTheTotal, showTheLastNPages], [otherwise, showAGroupOfPagesCenteredOnTheCurrentPage]]);
|
|
11198
11300
|
var Paginator = function Paginator(_ref) {
|
|
11199
11301
|
var selectedPage = _ref.selectedPage,
|
|
11200
11302
|
totalPages = _ref.totalPages,
|