@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.esm.js
CHANGED
|
@@ -1047,6 +1047,20 @@ function _objectSpread2(e) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return e;
|
|
1049
1049
|
}
|
|
1050
|
+
function _toPrimitive(t, r) {
|
|
1051
|
+
if ("object" != typeof t || !t) return t;
|
|
1052
|
+
var e = t[Symbol.toPrimitive];
|
|
1053
|
+
if (void 0 !== e) {
|
|
1054
|
+
var i = e.call(t, r || "default");
|
|
1055
|
+
if ("object" != typeof i) return i;
|
|
1056
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1057
|
+
}
|
|
1058
|
+
return ("string" === r ? String : Number)(t);
|
|
1059
|
+
}
|
|
1060
|
+
function _toPropertyKey(t) {
|
|
1061
|
+
var i = _toPrimitive(t, "string");
|
|
1062
|
+
return "symbol" == typeof i ? i : String(i);
|
|
1063
|
+
}
|
|
1050
1064
|
function _typeof$1(o) {
|
|
1051
1065
|
"@babel/helpers - typeof";
|
|
1052
1066
|
|
|
@@ -1057,7 +1071,7 @@ function _typeof$1(o) {
|
|
|
1057
1071
|
}, _typeof$1(o);
|
|
1058
1072
|
}
|
|
1059
1073
|
function _defineProperty$1(obj, key, value) {
|
|
1060
|
-
key = _toPropertyKey
|
|
1074
|
+
key = _toPropertyKey(key);
|
|
1061
1075
|
if (key in obj) {
|
|
1062
1076
|
Object.defineProperty(obj, key, {
|
|
1063
1077
|
value: value,
|
|
@@ -1199,20 +1213,6 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
1199
1213
|
}
|
|
1200
1214
|
};
|
|
1201
1215
|
}
|
|
1202
|
-
function _toPrimitive$1(input, hint) {
|
|
1203
|
-
if (typeof input !== "object" || input === null) return input;
|
|
1204
|
-
var prim = input[Symbol.toPrimitive];
|
|
1205
|
-
if (prim !== undefined) {
|
|
1206
|
-
var res = prim.call(input, hint || "default");
|
|
1207
|
-
if (typeof res !== "object") return res;
|
|
1208
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1209
|
-
}
|
|
1210
|
-
return (hint === "string" ? String : Number)(input);
|
|
1211
|
-
}
|
|
1212
|
-
function _toPropertyKey$1(arg) {
|
|
1213
|
-
var key = _toPrimitive$1(arg, "string");
|
|
1214
|
-
return typeof key === "symbol" ? key : String(key);
|
|
1215
|
-
}
|
|
1216
1216
|
|
|
1217
1217
|
var isRenderProps = function isRenderProps(children) {
|
|
1218
1218
|
return typeof children === 'function';
|
|
@@ -1227,33 +1227,44 @@ var classnames = {exports: {}};
|
|
|
1227
1227
|
|
|
1228
1228
|
var hasOwn = {}.hasOwnProperty;
|
|
1229
1229
|
function classNames() {
|
|
1230
|
-
var classes =
|
|
1230
|
+
var classes = '';
|
|
1231
1231
|
for (var i = 0; i < arguments.length; i++) {
|
|
1232
1232
|
var arg = arguments[i];
|
|
1233
|
-
if (
|
|
1234
|
-
|
|
1235
|
-
if (argType === 'string' || argType === 'number') {
|
|
1236
|
-
classes.push(arg);
|
|
1237
|
-
} else if (Array.isArray(arg)) {
|
|
1238
|
-
if (arg.length) {
|
|
1239
|
-
var inner = classNames.apply(null, arg);
|
|
1240
|
-
if (inner) {
|
|
1241
|
-
classes.push(inner);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
} else if (argType === 'object') {
|
|
1245
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
1246
|
-
classes.push(arg.toString());
|
|
1247
|
-
continue;
|
|
1248
|
-
}
|
|
1249
|
-
for (var key in arg) {
|
|
1250
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1251
|
-
classes.push(key);
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1233
|
+
if (arg) {
|
|
1234
|
+
classes = appendClass(classes, parseValue(arg));
|
|
1254
1235
|
}
|
|
1255
1236
|
}
|
|
1256
|
-
return classes
|
|
1237
|
+
return classes;
|
|
1238
|
+
}
|
|
1239
|
+
function parseValue(arg) {
|
|
1240
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
1241
|
+
return arg;
|
|
1242
|
+
}
|
|
1243
|
+
if (_typeof$1(arg) !== 'object') {
|
|
1244
|
+
return '';
|
|
1245
|
+
}
|
|
1246
|
+
if (Array.isArray(arg)) {
|
|
1247
|
+
return classNames.apply(null, arg);
|
|
1248
|
+
}
|
|
1249
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
1250
|
+
return arg.toString();
|
|
1251
|
+
}
|
|
1252
|
+
var classes = '';
|
|
1253
|
+
for (var key in arg) {
|
|
1254
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1255
|
+
classes = appendClass(classes, key);
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
return classes;
|
|
1259
|
+
}
|
|
1260
|
+
function appendClass(value, newClass) {
|
|
1261
|
+
if (!newClass) {
|
|
1262
|
+
return value;
|
|
1263
|
+
}
|
|
1264
|
+
if (value) {
|
|
1265
|
+
return value + ' ' + newClass;
|
|
1266
|
+
}
|
|
1267
|
+
return value + newClass;
|
|
1257
1268
|
}
|
|
1258
1269
|
if (module.exports) {
|
|
1259
1270
|
classNames["default"] = classNames;
|
|
@@ -1286,7 +1297,7 @@ var Stack = function Stack(_ref) {
|
|
|
1286
1297
|
}, rest), children);
|
|
1287
1298
|
};
|
|
1288
1299
|
|
|
1289
|
-
var omit$
|
|
1300
|
+
var omit$1 = function omit(obj) {
|
|
1290
1301
|
for (var _len = arguments.length, keys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1291
1302
|
keys[_key - 1] = arguments[_key];
|
|
1292
1303
|
}
|
|
@@ -1337,7 +1348,7 @@ var isEmpty = function isEmpty(obj) {
|
|
|
1337
1348
|
var StatesProps = function StatesProps(_ref) {
|
|
1338
1349
|
var props = _ref.props,
|
|
1339
1350
|
children = _ref.children;
|
|
1340
|
-
var childrenProps = omit$
|
|
1351
|
+
var childrenProps = omit$1.apply(void 0, [children.props].concat(_toConsumableArray(Object.keys(props || {}))));
|
|
1341
1352
|
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
1342
1353
|
className: "StatesProps",
|
|
1343
1354
|
space: 2,
|
|
@@ -1377,41 +1388,70 @@ var States = function States(_ref) {
|
|
|
1377
1388
|
}));
|
|
1378
1389
|
};
|
|
1379
1390
|
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1391
|
+
/******************************************************************************
|
|
1392
|
+
Copyright (c) Microsoft Corporation.
|
|
1393
|
+
|
|
1394
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1395
|
+
purpose with or without fee is hereby granted.
|
|
1396
|
+
|
|
1397
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1398
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1399
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1400
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1401
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1402
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1403
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1404
|
+
***************************************************************************** */
|
|
1405
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
var __assign$b = function() {
|
|
1409
|
+
__assign$b = Object.assign || function __assign(t) {
|
|
1410
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
1411
|
+
s = arguments[i];
|
|
1412
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
1413
|
+
}
|
|
1414
|
+
return t;
|
|
1387
1415
|
};
|
|
1388
|
-
return
|
|
1416
|
+
return __assign$b.apply(this, arguments);
|
|
1389
1417
|
};
|
|
1418
|
+
|
|
1390
1419
|
function __rest$a(s, e) {
|
|
1391
1420
|
var t = {};
|
|
1392
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1421
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
1422
|
+
t[p] = s[p];
|
|
1423
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
1424
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
1425
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
1426
|
+
t[p[i]] = s[p[i]];
|
|
1427
|
+
}
|
|
1396
1428
|
return t;
|
|
1397
1429
|
}
|
|
1398
1430
|
|
|
1399
1431
|
/** @deprecated */
|
|
1400
1432
|
function __spreadArrays() {
|
|
1401
1433
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
1402
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1434
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
1435
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
1436
|
+
r[k] = a[j];
|
|
1403
1437
|
return r;
|
|
1404
1438
|
}
|
|
1439
|
+
|
|
1405
1440
|
function __spreadArray(to, from, pack) {
|
|
1406
1441
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1442
|
+
if (ar || !(i in from)) {
|
|
1443
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1444
|
+
ar[i] = from[i];
|
|
1445
|
+
}
|
|
1411
1446
|
}
|
|
1412
1447
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1413
1448
|
}
|
|
1414
1449
|
|
|
1450
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1451
|
+
var e = new Error(message);
|
|
1452
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1453
|
+
};
|
|
1454
|
+
|
|
1415
1455
|
var zeroRightClassName = 'right-scroll-bar-position';
|
|
1416
1456
|
var fullWidthClassName = 'width-before-scroll-bar';
|
|
1417
1457
|
var noScrollbarsClassName = 'with-scroll-bars-hidden';
|
|
@@ -1484,6 +1524,7 @@ function useCallbackRef(initialValue, callback) {
|
|
|
1484
1524
|
return ref.facade;
|
|
1485
1525
|
}
|
|
1486
1526
|
|
|
1527
|
+
var currentValues = new WeakMap();
|
|
1487
1528
|
/**
|
|
1488
1529
|
* Merges two or more refs together providing a single interface to set their value
|
|
1489
1530
|
* @param {RefObject|Ref} refs
|
|
@@ -1499,11 +1540,32 @@ function useCallbackRef(initialValue, callback) {
|
|
|
1499
1540
|
* }
|
|
1500
1541
|
*/
|
|
1501
1542
|
function useMergeRefs(refs, defaultValue) {
|
|
1502
|
-
|
|
1543
|
+
var callbackRef = useCallbackRef(defaultValue || null, function (newValue) {
|
|
1503
1544
|
return refs.forEach(function (ref) {
|
|
1504
1545
|
return assignRef(ref, newValue);
|
|
1505
1546
|
});
|
|
1506
1547
|
});
|
|
1548
|
+
// handle refs changes - added or removed
|
|
1549
|
+
React.useLayoutEffect(function () {
|
|
1550
|
+
var oldValue = currentValues.get(callbackRef);
|
|
1551
|
+
if (oldValue) {
|
|
1552
|
+
var prevRefs_1 = new Set(oldValue);
|
|
1553
|
+
var nextRefs_1 = new Set(refs);
|
|
1554
|
+
var current_1 = callbackRef.current;
|
|
1555
|
+
prevRefs_1.forEach(function (ref) {
|
|
1556
|
+
if (!nextRefs_1.has(ref)) {
|
|
1557
|
+
assignRef(ref, null);
|
|
1558
|
+
}
|
|
1559
|
+
});
|
|
1560
|
+
nextRefs_1.forEach(function (ref) {
|
|
1561
|
+
if (!prevRefs_1.has(ref)) {
|
|
1562
|
+
assignRef(ref, current_1);
|
|
1563
|
+
}
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
currentValues.set(callbackRef, refs);
|
|
1567
|
+
}, [refs]);
|
|
1568
|
+
return callbackRef;
|
|
1507
1569
|
}
|
|
1508
1570
|
|
|
1509
1571
|
function ItoI(a) {
|
|
@@ -1594,7 +1656,7 @@ function createSidecarMedium(options) {
|
|
|
1594
1656
|
options = {};
|
|
1595
1657
|
}
|
|
1596
1658
|
var medium = innerCreateMedium(null);
|
|
1597
|
-
medium.options =
|
|
1659
|
+
medium.options = __assign$b({
|
|
1598
1660
|
async: true,
|
|
1599
1661
|
ssr: false
|
|
1600
1662
|
}, options);
|
|
@@ -1611,7 +1673,7 @@ var SideCar$1 = function SideCar(_a) {
|
|
|
1611
1673
|
if (!Target) {
|
|
1612
1674
|
throw new Error('Sidecar medium not found');
|
|
1613
1675
|
}
|
|
1614
|
-
return /*#__PURE__*/React.createElement(Target,
|
|
1676
|
+
return /*#__PURE__*/React.createElement(Target, __assign$b({}, rest));
|
|
1615
1677
|
};
|
|
1616
1678
|
SideCar$1.isSideCarExport = true;
|
|
1617
1679
|
function exportSidecar(medium, exported) {
|
|
@@ -1652,7 +1714,7 @@ var RemoveScroll = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
1652
1714
|
rest = __rest$a(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
1653
1715
|
var SideCar = sideCar;
|
|
1654
1716
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
1655
|
-
var containerProps =
|
|
1717
|
+
var containerProps = __assign$b(__assign$b({}, rest), callbacks);
|
|
1656
1718
|
return /*#__PURE__*/React.createElement(React.Fragment, null, enabled && ( /*#__PURE__*/React.createElement(SideCar, {
|
|
1657
1719
|
sideCar: effectCar$1,
|
|
1658
1720
|
removeScrollBar: removeScrollBar,
|
|
@@ -1663,9 +1725,9 @@ var RemoveScroll = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
1663
1725
|
allowPinchZoom: !!allowPinchZoom,
|
|
1664
1726
|
lockRef: ref,
|
|
1665
1727
|
gapMode: gapMode
|
|
1666
|
-
})), forwardProps ? ( /*#__PURE__*/React.cloneElement(React.Children.only(children),
|
|
1728
|
+
})), forwardProps ? ( /*#__PURE__*/React.cloneElement(React.Children.only(children), __assign$b(__assign$b({}, containerProps), {
|
|
1667
1729
|
ref: containerRef
|
|
1668
|
-
}))) : ( /*#__PURE__*/React.createElement(Container,
|
|
1730
|
+
}))) : ( /*#__PURE__*/React.createElement(Container, __assign$b({}, containerProps, {
|
|
1669
1731
|
className: className,
|
|
1670
1732
|
ref: containerRef
|
|
1671
1733
|
}), children)));
|
|
@@ -2971,7 +3033,7 @@ var FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parent
|
|
|
2971
3033
|
var hasLeadingGuards = noFocusGuards !== true;
|
|
2972
3034
|
var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';
|
|
2973
3035
|
var mergedRef = useMergeRefs([parentRef, setObserveNode]);
|
|
2974
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [
|
|
3036
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [/*#__PURE__*/
|
|
2975
3037
|
// nearest focus guard
|
|
2976
3038
|
React.createElement("div", {
|
|
2977
3039
|
key: "guard-first",
|
|
@@ -3055,14 +3117,7 @@ FocusLock.defaultProps = {
|
|
|
3055
3117
|
var FocusLockUI = FocusLock;
|
|
3056
3118
|
|
|
3057
3119
|
function deferAction(action) {
|
|
3058
|
-
|
|
3059
|
-
var _window = window,
|
|
3060
|
-
setImmediate = _window.setImmediate;
|
|
3061
|
-
if (typeof setImmediate !== 'undefined') {
|
|
3062
|
-
setImmediate(action);
|
|
3063
|
-
} else {
|
|
3064
|
-
setTimeout(action, 1);
|
|
3065
|
-
}
|
|
3120
|
+
setTimeout(action, 1);
|
|
3066
3121
|
}
|
|
3067
3122
|
|
|
3068
3123
|
var effectCar = createSidecarMedium();
|
|
@@ -3101,7 +3156,7 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3101
3156
|
var onActivation = lockProps.onActivation,
|
|
3102
3157
|
onDeactivation = lockProps.onDeactivation,
|
|
3103
3158
|
restProps = __rest$a(lockProps, ["onActivation", "onDeactivation"]);
|
|
3104
|
-
var appliedLockProps =
|
|
3159
|
+
var appliedLockProps = __assign$b(__assign$b({}, restProps), {
|
|
3105
3160
|
as: as,
|
|
3106
3161
|
style: style,
|
|
3107
3162
|
sideCar: sideCar,
|
|
@@ -3126,7 +3181,7 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3126
3181
|
lockProps: appliedLockProps,
|
|
3127
3182
|
focusOptions: preventScrollOnFocus ? PREVENT_SCROLL : undefined,
|
|
3128
3183
|
as: RemoveScroll
|
|
3129
|
-
}, children), enabled && ( /*#__PURE__*/React.createElement(SideCar,
|
|
3184
|
+
}, children), enabled && ( /*#__PURE__*/React.createElement(SideCar, __assign$b({}, rest, {
|
|
3130
3185
|
sideCar: effectCar,
|
|
3131
3186
|
setLockProps: setLockProps,
|
|
3132
3187
|
shards: shards
|
|
@@ -3147,34 +3202,34 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
3147
3202
|
_setPrototypeOf(subClass, superClass);
|
|
3148
3203
|
}
|
|
3149
3204
|
|
|
3150
|
-
function _typeof(
|
|
3205
|
+
function _typeof(o) {
|
|
3151
3206
|
"@babel/helpers - typeof";
|
|
3152
3207
|
|
|
3153
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
3154
|
-
return typeof
|
|
3155
|
-
} : function (
|
|
3156
|
-
return
|
|
3157
|
-
}, _typeof(
|
|
3208
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
3209
|
+
return typeof o;
|
|
3210
|
+
} : function (o) {
|
|
3211
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
3212
|
+
}, _typeof(o);
|
|
3158
3213
|
}
|
|
3159
3214
|
|
|
3160
|
-
function
|
|
3161
|
-
if (
|
|
3162
|
-
var
|
|
3163
|
-
if (
|
|
3164
|
-
var
|
|
3165
|
-
if (
|
|
3215
|
+
function toPrimitive(t, r) {
|
|
3216
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
3217
|
+
var e = t[Symbol.toPrimitive];
|
|
3218
|
+
if (void 0 !== e) {
|
|
3219
|
+
var i = e.call(t, r || "default");
|
|
3220
|
+
if ("object" != _typeof(i)) return i;
|
|
3166
3221
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3167
3222
|
}
|
|
3168
|
-
return (
|
|
3223
|
+
return ("string" === r ? String : Number)(t);
|
|
3169
3224
|
}
|
|
3170
3225
|
|
|
3171
|
-
function
|
|
3172
|
-
var
|
|
3173
|
-
return _typeof(
|
|
3226
|
+
function toPropertyKey(t) {
|
|
3227
|
+
var i = toPrimitive(t, "string");
|
|
3228
|
+
return "symbol" == _typeof(i) ? i : String(i);
|
|
3174
3229
|
}
|
|
3175
3230
|
|
|
3176
3231
|
function _defineProperty(obj, key, value) {
|
|
3177
|
-
key =
|
|
3232
|
+
key = toPropertyKey(key);
|
|
3178
3233
|
if (key in obj) {
|
|
3179
3234
|
Object.defineProperty(obj, key, {
|
|
3180
3235
|
value: value,
|
|
@@ -3439,17 +3494,29 @@ var filterAutoFocusable = function filterAutoFocusable(nodes, cache) {
|
|
|
3439
3494
|
});
|
|
3440
3495
|
};
|
|
3441
3496
|
/**
|
|
3442
|
-
*
|
|
3443
|
-
*
|
|
3497
|
+
* !__WARNING__! Low level API.
|
|
3498
|
+
* @returns all tabbable nodes
|
|
3499
|
+
*
|
|
3500
|
+
* @see {@link getFocusableNodes} to get any focusable element
|
|
3501
|
+
*
|
|
3502
|
+
* @param topNodes - array of top level HTMLElements to search inside
|
|
3503
|
+
* @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
|
|
3444
3504
|
*/
|
|
3445
3505
|
var getTabbableNodes = function getTabbableNodes(topNodes, visibilityCache, withGuards) {
|
|
3446
3506
|
return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);
|
|
3447
3507
|
};
|
|
3448
3508
|
/**
|
|
3449
|
-
*
|
|
3450
|
-
*
|
|
3509
|
+
* !__WARNING__! Low level API.
|
|
3510
|
+
*
|
|
3511
|
+
* @returns anything "focusable", not only tabbable. The difference is in `tabIndex=-1`
|
|
3512
|
+
* (without guards, as long as they are not expected to be ever focused)
|
|
3513
|
+
*
|
|
3514
|
+
* @see {@link getTabbableNodes} to get only tabble nodes element
|
|
3515
|
+
*
|
|
3516
|
+
* @param topNodes - array of top level HTMLElements to search inside
|
|
3517
|
+
* @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
|
|
3451
3518
|
*/
|
|
3452
|
-
var
|
|
3519
|
+
var getFocusableNodes = function getFocusableNodes(topNodes, visibilityCache) {
|
|
3453
3520
|
return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);
|
|
3454
3521
|
};
|
|
3455
3522
|
/**
|
|
@@ -3521,8 +3588,8 @@ var getTopParent = function getTopParent(node) {
|
|
|
3521
3588
|
};
|
|
3522
3589
|
/**
|
|
3523
3590
|
* returns all "focus containers" inside a given node
|
|
3524
|
-
* @param node
|
|
3525
|
-
* @returns
|
|
3591
|
+
* @param node - node or nodes to look inside
|
|
3592
|
+
* @returns Element[]
|
|
3526
3593
|
*/
|
|
3527
3594
|
var getAllAffectedNodes = function getAllAffectedNodes(node) {
|
|
3528
3595
|
var nodes = asArray(node);
|
|
@@ -3544,6 +3611,10 @@ var safeProbe = function safeProbe(cb) {
|
|
|
3544
3611
|
/**
|
|
3545
3612
|
* returns active element from document or from nested shadowdoms
|
|
3546
3613
|
*/
|
|
3614
|
+
/**
|
|
3615
|
+
* returns current active element. If the active element is a "container" itself(shadowRoot or iframe) returns active element inside it
|
|
3616
|
+
* @param [inDocument]
|
|
3617
|
+
*/
|
|
3547
3618
|
var getActiveElement = function getActiveElement(inDocument) {
|
|
3548
3619
|
if (inDocument === void 0) {
|
|
3549
3620
|
inDocument = document;
|
|
@@ -3566,7 +3637,8 @@ var focusInsideIframe = function focusInsideIframe(topNode, activeElement) {
|
|
|
3566
3637
|
}));
|
|
3567
3638
|
};
|
|
3568
3639
|
/**
|
|
3569
|
-
* @returns {Boolean} true, if the current focus is inside given node or nodes
|
|
3640
|
+
* @returns {Boolean} true, if the current focus is inside given node or nodes.
|
|
3641
|
+
* Supports nodes hidden inside shadowDom
|
|
3570
3642
|
*/
|
|
3571
3643
|
var focusInside = function focusInside(topNode, activeElement) {
|
|
3572
3644
|
// const activeElement = document && getActiveElement();
|
|
@@ -3582,8 +3654,11 @@ var focusInside = function focusInside(topNode, activeElement) {
|
|
|
3582
3654
|
};
|
|
3583
3655
|
|
|
3584
3656
|
/**
|
|
3585
|
-
* focus is hidden FROM the focus-lock
|
|
3657
|
+
* checks if focus is hidden FROM the focus-lock
|
|
3586
3658
|
* ie contained inside a node focus-lock shall ignore
|
|
3659
|
+
*
|
|
3660
|
+
* This is a utility function coupled with {@link FOCUS_ALLOW} constant
|
|
3661
|
+
*
|
|
3587
3662
|
* @returns {boolean} focus is currently is in "allow" area
|
|
3588
3663
|
*/
|
|
3589
3664
|
var focusIsHidden = function focusIsHidden(inDocument) {
|
|
@@ -3808,16 +3883,21 @@ var reorderNodes = function reorderNodes(srcNodes, dstNodes) {
|
|
|
3808
3883
|
}).filter(isDefined);
|
|
3809
3884
|
};
|
|
3810
3885
|
/**
|
|
3811
|
-
*
|
|
3886
|
+
* contains the main logic of the `focus-lock` package.
|
|
3887
|
+
*
|
|
3888
|
+
* ! you probably dont need this function !
|
|
3889
|
+
*
|
|
3890
|
+
* given top node(s) and the last active element returns the element to be focused next
|
|
3891
|
+
* @returns element which should be focused to move focus inside
|
|
3812
3892
|
* @param topNode
|
|
3813
3893
|
* @param lastNode
|
|
3814
3894
|
*/
|
|
3815
|
-
var
|
|
3895
|
+
var focusSolver = function focusSolver(topNode, lastNode) {
|
|
3816
3896
|
var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);
|
|
3817
3897
|
var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
|
|
3818
3898
|
var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
|
|
3819
3899
|
var visibilityCache = new Map();
|
|
3820
|
-
var anyFocusable =
|
|
3900
|
+
var anyFocusable = getFocusableNodes(entries, visibilityCache);
|
|
3821
3901
|
var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {
|
|
3822
3902
|
var node = _a.node;
|
|
3823
3903
|
return isNotAGuard(node);
|
|
@@ -3828,7 +3908,7 @@ var getFocusMerge = function getFocusMerge(topNode, lastNode) {
|
|
|
3828
3908
|
return undefined;
|
|
3829
3909
|
}
|
|
3830
3910
|
}
|
|
3831
|
-
var outerNodes =
|
|
3911
|
+
var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {
|
|
3832
3912
|
var node = _a.node;
|
|
3833
3913
|
return node;
|
|
3834
3914
|
});
|
|
@@ -3856,10 +3936,10 @@ var getFocusMerge = function getFocusMerge(topNode, lastNode) {
|
|
|
3856
3936
|
};
|
|
3857
3937
|
|
|
3858
3938
|
/**
|
|
3859
|
-
*
|
|
3860
|
-
* @
|
|
3939
|
+
* @returns list of focusable elements inside a given top node
|
|
3940
|
+
* @see {@link getFocusableNodes} for lower level access
|
|
3861
3941
|
*/
|
|
3862
|
-
var
|
|
3942
|
+
var expandFocusableNodes = function expandFocusableNodes(topNode) {
|
|
3863
3943
|
var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
|
|
3864
3944
|
var commonParent = getTopCommonParent(topNode, topNode, entries);
|
|
3865
3945
|
var visibilityCache = new Map();
|
|
@@ -3891,26 +3971,34 @@ var focusOn = function focusOn(target, focusOptions) {
|
|
|
3891
3971
|
target.contentWindow.focus();
|
|
3892
3972
|
}
|
|
3893
3973
|
};
|
|
3974
|
+
|
|
3894
3975
|
var guardCount = 0;
|
|
3895
3976
|
var lockDisabled = false;
|
|
3896
3977
|
/**
|
|
3897
|
-
*
|
|
3978
|
+
* The main functionality of the focus-lock package
|
|
3979
|
+
*
|
|
3980
|
+
* Contains focus at a given node.
|
|
3981
|
+
* The last focused element will help to determine which element(first or last) should be focused.
|
|
3982
|
+
* The found element will be focused.
|
|
3983
|
+
*
|
|
3984
|
+
* This is one time action (move), not a persistent focus-lock
|
|
3985
|
+
*
|
|
3898
3986
|
* HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus
|
|
3899
|
-
* @
|
|
3900
|
-
* @param lastNode
|
|
3901
|
-
* @param options
|
|
3987
|
+
* @see {@link focusSolver} for the same functionality without autofocus
|
|
3902
3988
|
*/
|
|
3903
|
-
var
|
|
3989
|
+
var moveFocusInside = function moveFocusInside(topNode, lastNode, options) {
|
|
3904
3990
|
if (options === void 0) {
|
|
3905
3991
|
options = {};
|
|
3906
3992
|
}
|
|
3907
|
-
var focusable =
|
|
3993
|
+
var focusable = focusSolver(topNode, lastNode);
|
|
3994
|
+
// global local side effect to countain recursive lock activation and resolve focus-fighting
|
|
3908
3995
|
if (lockDisabled) {
|
|
3909
3996
|
return;
|
|
3910
3997
|
}
|
|
3911
3998
|
if (focusable) {
|
|
3999
|
+
/** +FOCUS-FIGHTING prevention **/
|
|
3912
4000
|
if (guardCount > 2) {
|
|
3913
|
-
//
|
|
4001
|
+
// we have recursive entered back the lock activation
|
|
3914
4002
|
console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
|
|
3915
4003
|
lockDisabled = true;
|
|
3916
4004
|
setTimeout(function () {
|
|
@@ -4023,7 +4111,7 @@ var activateTrap = function activateTrap() {
|
|
|
4023
4111
|
}
|
|
4024
4112
|
document.body.focus();
|
|
4025
4113
|
} else {
|
|
4026
|
-
result =
|
|
4114
|
+
result = moveFocusInside(workingArea, lastActiveFocus, {
|
|
4027
4115
|
focusOptions: focusOptions
|
|
4028
4116
|
});
|
|
4029
4117
|
lastPortaledElement = {};
|
|
@@ -4035,7 +4123,7 @@ var activateTrap = function activateTrap() {
|
|
|
4035
4123
|
}
|
|
4036
4124
|
if (document) {
|
|
4037
4125
|
var newActiveElement = document && document.activeElement;
|
|
4038
|
-
var allNodes =
|
|
4126
|
+
var allNodes = expandFocusableNodes(workingArea);
|
|
4039
4127
|
var focusedIndex = allNodes.map(function (_ref) {
|
|
4040
4128
|
var node = _ref.node;
|
|
4041
4129
|
return node;
|
|
@@ -4085,9 +4173,9 @@ process.env.NODE_ENV !== "production" ? {
|
|
|
4085
4173
|
var onWindowBlur = function onWindowBlur() {
|
|
4086
4174
|
focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction
|
|
4087
4175
|
|
|
4088
|
-
|
|
4176
|
+
deferAction(function () {
|
|
4089
4177
|
focusWasOutsideWindow = 'meanwhile';
|
|
4090
|
-
}
|
|
4178
|
+
});
|
|
4091
4179
|
};
|
|
4092
4180
|
var attachHandler = function attachHandler() {
|
|
4093
4181
|
document.addEventListener('focusin', onTrap);
|
|
@@ -4141,7 +4229,7 @@ mediumFocus.assignSyncMedium(onFocus);
|
|
|
4141
4229
|
mediumBlur.assignMedium(onBlur);
|
|
4142
4230
|
mediumEffect.assignMedium(function (cb) {
|
|
4143
4231
|
return cb({
|
|
4144
|
-
moveFocusInside:
|
|
4232
|
+
moveFocusInside: moveFocusInside,
|
|
4145
4233
|
focusInside: focusInside
|
|
4146
4234
|
});
|
|
4147
4235
|
});
|
|
@@ -4149,11 +4237,7 @@ var FocusTrap = withSideEffect(reducePropsToState, handleStateChangeOnClient)(Fo
|
|
|
4149
4237
|
|
|
4150
4238
|
exportSidecar(mediumSidecar, FocusTrap);
|
|
4151
4239
|
|
|
4152
|
-
var currentNonce;
|
|
4153
4240
|
var getNonce = function getNonce() {
|
|
4154
|
-
if (currentNonce) {
|
|
4155
|
-
return currentNonce;
|
|
4156
|
-
}
|
|
4157
4241
|
if (typeof __webpack_nonce__ !== 'undefined') {
|
|
4158
4242
|
return __webpack_nonce__;
|
|
4159
4243
|
}
|
|
@@ -4422,15 +4506,20 @@ var handleScroll = function handleScroll(axis, endTarget, event, sourceDelta, no
|
|
|
4422
4506
|
availableScrollTop += position;
|
|
4423
4507
|
}
|
|
4424
4508
|
}
|
|
4425
|
-
target
|
|
4509
|
+
if (target instanceof ShadowRoot) {
|
|
4510
|
+
target = target.host;
|
|
4511
|
+
} else {
|
|
4512
|
+
target = target.parentNode;
|
|
4513
|
+
}
|
|
4426
4514
|
} while (
|
|
4427
4515
|
// portaled content
|
|
4428
4516
|
!targetInLock && target !== document.body ||
|
|
4429
4517
|
// self content
|
|
4430
4518
|
targetInLock && (endTarget.contains(target) || endTarget === target));
|
|
4431
|
-
|
|
4519
|
+
// handle epsilon around 0 (non standard zoom levels)
|
|
4520
|
+
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
4432
4521
|
shouldCancelScroll = true;
|
|
4433
|
-
} else if (!isDeltaPositive && (noOverscroll && availableScrollTop
|
|
4522
|
+
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
4434
4523
|
shouldCancelScroll = true;
|
|
4435
4524
|
}
|
|
4436
4525
|
return shouldCancelScroll;
|
|
@@ -4525,7 +4614,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4525
4614
|
}
|
|
4526
4615
|
var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
|
|
4527
4616
|
var sourceEvent = shouldPreventQueue.current.filter(function (e) {
|
|
4528
|
-
return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);
|
|
4617
|
+
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
4529
4618
|
})[0];
|
|
4530
4619
|
// self event, and should be canceled
|
|
4531
4620
|
if (sourceEvent && sourceEvent.should) {
|
|
@@ -4552,7 +4641,8 @@ function RemoveScrollSideCar(props) {
|
|
|
4552
4641
|
name: name,
|
|
4553
4642
|
delta: delta,
|
|
4554
4643
|
target: target,
|
|
4555
|
-
should: should
|
|
4644
|
+
should: should,
|
|
4645
|
+
shadowParent: getOutermostShadowParent(target)
|
|
4556
4646
|
};
|
|
4557
4647
|
shouldPreventQueue.current.push(event);
|
|
4558
4648
|
setTimeout(function () {
|
|
@@ -4598,6 +4688,17 @@ function RemoveScrollSideCar(props) {
|
|
|
4598
4688
|
gapMode: props.gapMode
|
|
4599
4689
|
}) : null);
|
|
4600
4690
|
}
|
|
4691
|
+
function getOutermostShadowParent(node) {
|
|
4692
|
+
var shadowParent = null;
|
|
4693
|
+
while (node !== null) {
|
|
4694
|
+
if (node instanceof ShadowRoot) {
|
|
4695
|
+
shadowParent = node.host;
|
|
4696
|
+
node = node.host;
|
|
4697
|
+
}
|
|
4698
|
+
node = node.parentNode;
|
|
4699
|
+
}
|
|
4700
|
+
return shadowParent;
|
|
4701
|
+
}
|
|
4601
4702
|
|
|
4602
4703
|
exportSidecar(effectCar$1, RemoveScrollSideCar);
|
|
4603
4704
|
|
|
@@ -4851,10 +4952,10 @@ function Effect(_a) {
|
|
|
4851
4952
|
var SideCar = exportSidecar(effectCar, Effect);
|
|
4852
4953
|
|
|
4853
4954
|
var RequireSideCar = function RequireSideCar(props) {
|
|
4854
|
-
return /*#__PURE__*/React.createElement(SideCar,
|
|
4955
|
+
return /*#__PURE__*/React.createElement(SideCar, __assign$b({}, props));
|
|
4855
4956
|
};
|
|
4856
4957
|
var FocusOn = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4857
|
-
return /*#__PURE__*/React.createElement(FocusOn$1,
|
|
4958
|
+
return /*#__PURE__*/React.createElement(FocusOn$1, __assign$b({}, props, {
|
|
4858
4959
|
ref: ref,
|
|
4859
4960
|
sideCar: RequireSideCar
|
|
4860
4961
|
}));
|
|
@@ -5341,7 +5442,6 @@ _curry2(function curryN(length, fn) {
|
|
|
5341
5442
|
}
|
|
5342
5443
|
return _arity(length, _curryN(length, [], fn));
|
|
5343
5444
|
});
|
|
5344
|
-
var curryN$1 = curryN;
|
|
5345
5445
|
|
|
5346
5446
|
/**
|
|
5347
5447
|
* Optimized internal three-arity curry function.
|
|
@@ -5500,16 +5600,15 @@ function _objectIs(a, b) {
|
|
|
5500
5600
|
}
|
|
5501
5601
|
var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs;
|
|
5502
5602
|
|
|
5503
|
-
var toString$
|
|
5603
|
+
var toString$1 = Object.prototype.toString;
|
|
5504
5604
|
var _isArguments = /*#__PURE__*/
|
|
5505
5605
|
function () {
|
|
5506
|
-
return toString$
|
|
5507
|
-
return toString$
|
|
5606
|
+
return toString$1.call(arguments) === '[object Arguments]' ? function _isArguments(x) {
|
|
5607
|
+
return toString$1.call(x) === '[object Arguments]';
|
|
5508
5608
|
} : function _isArguments(x) {
|
|
5509
5609
|
return _has('callee', x);
|
|
5510
5610
|
};
|
|
5511
5611
|
}();
|
|
5512
|
-
var _isArguments$1 = _isArguments;
|
|
5513
5612
|
|
|
5514
5613
|
var hasEnumBug = ! /*#__PURE__*/
|
|
5515
5614
|
{
|
|
@@ -5561,7 +5660,7 @@ _curry1(function keys(obj) {
|
|
|
5561
5660
|
}
|
|
5562
5661
|
var prop, nIdx;
|
|
5563
5662
|
var ks = [];
|
|
5564
|
-
var checkArgsLength = hasArgsEnumBug && _isArguments
|
|
5663
|
+
var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
|
|
5565
5664
|
for (prop in obj) {
|
|
5566
5665
|
if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
|
|
5567
5666
|
ks[ks.length] = prop;
|
|
@@ -5579,7 +5678,6 @@ _curry1(function keys(obj) {
|
|
|
5579
5678
|
}
|
|
5580
5679
|
return ks;
|
|
5581
5680
|
});
|
|
5582
|
-
var keys$1 = keys;
|
|
5583
5681
|
|
|
5584
5682
|
/**
|
|
5585
5683
|
* Gives a single-word string description of the (native) type of a value,
|
|
@@ -5612,7 +5710,6 @@ var type = /*#__PURE__*/
|
|
|
5612
5710
|
_curry1(function type(val) {
|
|
5613
5711
|
return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
|
|
5614
5712
|
});
|
|
5615
|
-
var type$1 = type;
|
|
5616
5713
|
|
|
5617
5714
|
/**
|
|
5618
5715
|
* private _uniqContentEquals function.
|
|
@@ -5640,8 +5737,8 @@ function _equals(a, b, stackA, stackB) {
|
|
|
5640
5737
|
if (_objectIs$1(a, b)) {
|
|
5641
5738
|
return true;
|
|
5642
5739
|
}
|
|
5643
|
-
var typeA = type
|
|
5644
|
-
if (typeA !== type
|
|
5740
|
+
var typeA = type(a);
|
|
5741
|
+
if (typeA !== type(b)) {
|
|
5645
5742
|
return false;
|
|
5646
5743
|
}
|
|
5647
5744
|
if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
|
|
@@ -5720,8 +5817,8 @@ function _equals(a, b, stackA, stackB) {
|
|
|
5720
5817
|
// Values of other types are only equal if identical.
|
|
5721
5818
|
return false;
|
|
5722
5819
|
}
|
|
5723
|
-
var keysA = keys
|
|
5724
|
-
if (keysA.length !== keys
|
|
5820
|
+
var keysA = keys(a);
|
|
5821
|
+
if (keysA.length !== keys(b).length) {
|
|
5725
5822
|
return false;
|
|
5726
5823
|
}
|
|
5727
5824
|
var extendedStackA = stackA.concat([a]);
|
|
@@ -5767,7 +5864,6 @@ var equals = /*#__PURE__*/
|
|
|
5767
5864
|
_curry2(function equals(a, b) {
|
|
5768
5865
|
return _equals(a, b, [], []);
|
|
5769
5866
|
});
|
|
5770
|
-
var equals$1 = equals;
|
|
5771
5867
|
|
|
5772
5868
|
function _indexOf(list, a, idx) {
|
|
5773
5869
|
var inf, item; // Array.prototype.indexOf doesn't exist below IE9
|
|
@@ -5815,7 +5911,7 @@ function _indexOf(list, a, idx) {
|
|
|
5815
5911
|
} // anything else not covered above, defer to R.equals
|
|
5816
5912
|
|
|
5817
5913
|
while (idx < list.length) {
|
|
5818
|
-
if (equals
|
|
5914
|
+
if (equals(list[idx], a)) {
|
|
5819
5915
|
return idx;
|
|
5820
5916
|
}
|
|
5821
5917
|
idx += 1;
|
|
@@ -5855,7 +5951,6 @@ var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _
|
|
|
5855
5951
|
} : function _toISOString(d) {
|
|
5856
5952
|
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';
|
|
5857
5953
|
};
|
|
5858
|
-
var _toISOString$1 = _toISOString;
|
|
5859
5954
|
|
|
5860
5955
|
function _complement(f) {
|
|
5861
5956
|
return function () {
|
|
@@ -5946,11 +6041,10 @@ _dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filte
|
|
|
5946
6041
|
acc[key] = filterable[key];
|
|
5947
6042
|
}
|
|
5948
6043
|
return acc;
|
|
5949
|
-
}, {}, keys
|
|
6044
|
+
}, {}, keys(filterable)) :
|
|
5950
6045
|
// else
|
|
5951
6046
|
_filter(pred, filterable);
|
|
5952
6047
|
}));
|
|
5953
|
-
var filter$1 = filter;
|
|
5954
6048
|
|
|
5955
6049
|
/**
|
|
5956
6050
|
* The complement of [`filter`](#filter).
|
|
@@ -5979,7 +6073,7 @@ var filter$1 = filter;
|
|
|
5979
6073
|
|
|
5980
6074
|
var reject = /*#__PURE__*/
|
|
5981
6075
|
_curry2(function reject(pred, filterable) {
|
|
5982
|
-
return filter
|
|
6076
|
+
return filter(_complement(pred), filterable);
|
|
5983
6077
|
});
|
|
5984
6078
|
var reject$1 = reject;
|
|
5985
6079
|
|
|
@@ -6000,11 +6094,11 @@ function _toString(x, seen) {
|
|
|
6000
6094
|
case '[object Array]':
|
|
6001
6095
|
return '[' + _map(recur, x).concat(mapPairs(x, reject$1(function (k) {
|
|
6002
6096
|
return /^\d+$/.test(k);
|
|
6003
|
-
}, keys
|
|
6097
|
+
}, keys(x)))).join(', ') + ']';
|
|
6004
6098
|
case '[object Boolean]':
|
|
6005
6099
|
return _typeof$1(x) === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();
|
|
6006
6100
|
case '[object Date]':
|
|
6007
|
-
return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString
|
|
6101
|
+
return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';
|
|
6008
6102
|
case '[object Map]':
|
|
6009
6103
|
return 'new Map(' + recur(Array.from(x)) + ')';
|
|
6010
6104
|
case '[object Null]':
|
|
@@ -6024,7 +6118,7 @@ function _toString(x, seen) {
|
|
|
6024
6118
|
return repr;
|
|
6025
6119
|
}
|
|
6026
6120
|
}
|
|
6027
|
-
return '{' + mapPairs(x, keys
|
|
6121
|
+
return '{' + mapPairs(x, keys(x)).join(', ') + '}';
|
|
6028
6122
|
}
|
|
6029
6123
|
}
|
|
6030
6124
|
|
|
@@ -6069,7 +6163,6 @@ var toString = /*#__PURE__*/
|
|
|
6069
6163
|
_curry1(function toString(val) {
|
|
6070
6164
|
return _toString(val, []);
|
|
6071
6165
|
});
|
|
6072
|
-
var toString$1 = toString;
|
|
6073
6166
|
|
|
6074
6167
|
/**
|
|
6075
6168
|
* Returns the larger of its two arguments.
|
|
@@ -6108,8 +6201,8 @@ _curry2(function max(a, b) {
|
|
|
6108
6201
|
if (maxByType !== undefined) {
|
|
6109
6202
|
return maxByType === _typeof$1(a) ? a : b;
|
|
6110
6203
|
}
|
|
6111
|
-
var stringA = toString
|
|
6112
|
-
var maxByStringValue = safeMax(stringA, toString
|
|
6204
|
+
var stringA = toString(a);
|
|
6205
|
+
var maxByStringValue = safeMax(stringA, toString(b));
|
|
6113
6206
|
if (maxByStringValue !== undefined) {
|
|
6114
6207
|
return maxByStringValue === stringA ? a : b;
|
|
6115
6208
|
}
|
|
@@ -6178,19 +6271,18 @@ _curry2( /*#__PURE__*/
|
|
|
6178
6271
|
_dispatchable(['fantasy-land/map', 'map'], _xmap$1, function map(fn, functor) {
|
|
6179
6272
|
switch (Object.prototype.toString.call(functor)) {
|
|
6180
6273
|
case '[object Function]':
|
|
6181
|
-
return curryN
|
|
6274
|
+
return curryN(functor.length, function () {
|
|
6182
6275
|
return fn.call(this, functor.apply(this, arguments));
|
|
6183
6276
|
});
|
|
6184
6277
|
case '[object Object]':
|
|
6185
6278
|
return _arrayReduce(function (acc, key) {
|
|
6186
6279
|
acc[key] = fn(functor[key]);
|
|
6187
6280
|
return acc;
|
|
6188
|
-
}, {}, keys
|
|
6281
|
+
}, {}, keys(functor));
|
|
6189
6282
|
default:
|
|
6190
6283
|
return _map(fn, functor);
|
|
6191
6284
|
}
|
|
6192
6285
|
}));
|
|
6193
|
-
var map$1 = map;
|
|
6194
6286
|
|
|
6195
6287
|
function _isString(x) {
|
|
6196
6288
|
return Object.prototype.toString.call(x) === '[object String]';
|
|
@@ -6237,12 +6329,11 @@ _curry1(function isArrayLike(x) {
|
|
|
6237
6329
|
}
|
|
6238
6330
|
return false;
|
|
6239
6331
|
});
|
|
6240
|
-
var _isArrayLike$1 = _isArrayLike;
|
|
6241
6332
|
|
|
6242
6333
|
var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';
|
|
6243
6334
|
function _createReduce(arrayReduce, methodReduce, iterableReduce) {
|
|
6244
6335
|
return function _reduce(xf, acc, list) {
|
|
6245
|
-
if (_isArrayLike
|
|
6336
|
+
if (_isArrayLike(list)) {
|
|
6246
6337
|
return arrayReduce(xf, acc, list);
|
|
6247
6338
|
}
|
|
6248
6339
|
if (list == null) {
|
|
@@ -6307,7 +6398,6 @@ _curry2(function bind(fn, thisObj) {
|
|
|
6307
6398
|
return fn.apply(thisObj, arguments);
|
|
6308
6399
|
});
|
|
6309
6400
|
});
|
|
6310
|
-
var bind$1 = bind;
|
|
6311
6401
|
|
|
6312
6402
|
function _xIterableReduce(xf, acc, iter) {
|
|
6313
6403
|
var step = iter.next();
|
|
@@ -6322,11 +6412,10 @@ function _xIterableReduce(xf, acc, iter) {
|
|
|
6322
6412
|
return xf['@@transducer/result'](acc);
|
|
6323
6413
|
}
|
|
6324
6414
|
function _xMethodReduce(xf, acc, obj, methodName) {
|
|
6325
|
-
return xf['@@transducer/result'](obj[methodName](bind
|
|
6415
|
+
return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
|
|
6326
6416
|
}
|
|
6327
6417
|
var _xReduce = /*#__PURE__*/
|
|
6328
6418
|
_createReduce(_xArrayReduce, _xMethodReduce, _xIterableReduce);
|
|
6329
|
-
var _xReduce$1 = _xReduce;
|
|
6330
6419
|
|
|
6331
6420
|
var XWrap = /*#__PURE__*/
|
|
6332
6421
|
function () {
|
|
@@ -6403,7 +6492,7 @@ function _xwrap(fn) {
|
|
|
6403
6492
|
|
|
6404
6493
|
var reduce = /*#__PURE__*/
|
|
6405
6494
|
_curry3(function (xf, acc, list) {
|
|
6406
|
-
return _xReduce
|
|
6495
|
+
return _xReduce(typeof xf === 'function' ? _xwrap(xf) : xf, acc, list);
|
|
6407
6496
|
});
|
|
6408
6497
|
var reduce$1 = reduce;
|
|
6409
6498
|
|
|
@@ -6469,7 +6558,7 @@ var identity$1 = identity;
|
|
|
6469
6558
|
|
|
6470
6559
|
var cond = /*#__PURE__*/
|
|
6471
6560
|
_curry1(function cond(pairs) {
|
|
6472
|
-
var arity = reduce$1(max$1, 0, map
|
|
6561
|
+
var arity = reduce$1(max$1, 0, map(function (pair) {
|
|
6473
6562
|
return pair[0].length;
|
|
6474
6563
|
}, pairs));
|
|
6475
6564
|
return _arity(arity, function () {
|
|
@@ -6482,7 +6571,6 @@ _curry1(function cond(pairs) {
|
|
|
6482
6571
|
}
|
|
6483
6572
|
});
|
|
6484
6573
|
});
|
|
6485
|
-
var cond$1 = cond;
|
|
6486
6574
|
|
|
6487
6575
|
var _Set = /*#__PURE__*/
|
|
6488
6576
|
function () {
|
|
@@ -6649,14 +6737,12 @@ function hasOrAdd(item, shouldAdd, set) {
|
|
|
6649
6737
|
}
|
|
6650
6738
|
} // A simple Set type that honours R.equals semantics
|
|
6651
6739
|
|
|
6652
|
-
var _Set$1 = _Set;
|
|
6653
|
-
|
|
6654
6740
|
var XUniqBy = /*#__PURE__*/
|
|
6655
6741
|
function () {
|
|
6656
6742
|
function XUniqBy(f, xf) {
|
|
6657
6743
|
this.xf = xf;
|
|
6658
6744
|
this.f = f;
|
|
6659
|
-
this.set = new _Set
|
|
6745
|
+
this.set = new _Set();
|
|
6660
6746
|
}
|
|
6661
6747
|
XUniqBy.prototype['@@transducer/init'] = _xfBase.init;
|
|
6662
6748
|
XUniqBy.prototype['@@transducer/result'] = _xfBase.result;
|
|
@@ -6695,7 +6781,7 @@ function _xuniqBy(f) {
|
|
|
6695
6781
|
var uniqBy = /*#__PURE__*/
|
|
6696
6782
|
_curry2( /*#__PURE__*/
|
|
6697
6783
|
_dispatchable([], _xuniqBy, function (fn, list) {
|
|
6698
|
-
var set = new _Set
|
|
6784
|
+
var set = new _Set();
|
|
6699
6785
|
var result = [];
|
|
6700
6786
|
var idx = 0;
|
|
6701
6787
|
var appliedItem, item;
|
|
@@ -6709,7 +6795,6 @@ _dispatchable([], _xuniqBy, function (fn, list) {
|
|
|
6709
6795
|
}
|
|
6710
6796
|
return result;
|
|
6711
6797
|
}));
|
|
6712
|
-
var uniqBy$1 = uniqBy;
|
|
6713
6798
|
|
|
6714
6799
|
/**
|
|
6715
6800
|
* Returns a new list containing only one copy of each element in the original
|
|
@@ -6730,8 +6815,7 @@ var uniqBy$1 = uniqBy;
|
|
|
6730
6815
|
*/
|
|
6731
6816
|
|
|
6732
6817
|
var uniq = /*#__PURE__*/
|
|
6733
|
-
uniqBy
|
|
6734
|
-
var uniq$1 = uniq;
|
|
6818
|
+
uniqBy(identity$1);
|
|
6735
6819
|
|
|
6736
6820
|
function _isNumber(x) {
|
|
6737
6821
|
return Object.prototype.toString.call(x) === '[object Number]';
|
|
@@ -6771,7 +6855,6 @@ _curry2(function omit(names, obj) {
|
|
|
6771
6855
|
}
|
|
6772
6856
|
return result;
|
|
6773
6857
|
});
|
|
6774
|
-
var omit$1 = omit;
|
|
6775
6858
|
|
|
6776
6859
|
/**
|
|
6777
6860
|
* Returns a list of numbers from `from` (inclusive) to `to` (exclusive).
|
|
@@ -6803,7 +6886,6 @@ _curry2(function range(from, to) {
|
|
|
6803
6886
|
}
|
|
6804
6887
|
return result;
|
|
6805
6888
|
});
|
|
6806
|
-
var range$1 = range;
|
|
6807
6889
|
|
|
6808
6890
|
var breakpointKeys = Object.keys(dist$4.breakpoints);
|
|
6809
6891
|
|
|
@@ -6922,7 +7004,7 @@ var Breakpoint = function Breakpoint(_ref) {
|
|
|
6922
7004
|
matches = _useBreakpoint.matches;
|
|
6923
7005
|
return matches ? /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
6924
7006
|
className: classNames('Breakpoint', "Breakpoint--".concat(mode, "-").concat(breakpoint), className)
|
|
6925
|
-
}, omit
|
|
7007
|
+
}, omit(['at', 'gt', 'lt'], rest)), children) : null;
|
|
6926
7008
|
};
|
|
6927
7009
|
|
|
6928
7010
|
var _excluded$v = ["secondary", "tertiary", "elevated", "chip", "hover", "focus", "disabled", "className"];
|
|
@@ -9677,6 +9759,7 @@ var Search20 = function Search20(_a) {
|
|
|
9677
9759
|
})
|
|
9678
9760
|
}, rest), /*#__PURE__*/React.createElement("svg", {
|
|
9679
9761
|
viewBox: "0 0 20 20",
|
|
9762
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
9680
9763
|
style: svgStyle
|
|
9681
9764
|
}, /*#__PURE__*/React.createElement("desc", null, "Created with Sketch."), /*#__PURE__*/React.createElement("g", {
|
|
9682
9765
|
id: "Search_20_svg__Icons/Search/20",
|
|
@@ -9691,12 +9774,14 @@ var Search20 = function Search20(_a) {
|
|
|
9691
9774
|
};
|
|
9692
9775
|
Search20.displayName = 'Search20';
|
|
9693
9776
|
|
|
9694
|
-
var _excluded$o = ["className", "onChange", "onClear", "value"];
|
|
9777
|
+
var _excluded$o = ["className", "onChange", "onClear", "roundBorders", "value"];
|
|
9695
9778
|
var DEFAULT_INPUT_VALUE = '';
|
|
9696
9779
|
var SearchInput = function SearchInput(_ref) {
|
|
9697
9780
|
var className = _ref.className,
|
|
9698
9781
|
onChange = _ref.onChange,
|
|
9699
9782
|
onClear = _ref.onClear,
|
|
9783
|
+
_ref$roundBorders = _ref.roundBorders,
|
|
9784
|
+
roundBorders = _ref$roundBorders === void 0 ? false : _ref$roundBorders,
|
|
9700
9785
|
_ref$value = _ref.value,
|
|
9701
9786
|
value = _ref$value === void 0 ? DEFAULT_INPUT_VALUE : _ref$value,
|
|
9702
9787
|
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
@@ -9724,7 +9809,9 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
9724
9809
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9725
9810
|
className: "SearchInput__icon"
|
|
9726
9811
|
}, /*#__PURE__*/React__default.createElement(Search20, null)), /*#__PURE__*/React__default.createElement(TextInput, _extends$1({
|
|
9727
|
-
className:
|
|
9812
|
+
className: classNames('SearchInput__input', {
|
|
9813
|
+
'SearchInput__input--round-borders': roundBorders
|
|
9814
|
+
}),
|
|
9728
9815
|
onChange: handleChange,
|
|
9729
9816
|
value: controlledValue,
|
|
9730
9817
|
ref: ref
|
|
@@ -9743,8 +9830,8 @@ var t = function t(_t) {
|
|
|
9743
9830
|
},
|
|
9744
9831
|
n = function n(t, _n) {
|
|
9745
9832
|
if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
|
|
9746
|
-
var
|
|
9747
|
-
return e$1(
|
|
9833
|
+
var _o = getComputedStyle(t, null);
|
|
9834
|
+
return e$1(_o.overflowY, _n) || e$1(_o.overflowX, _n) || function (t) {
|
|
9748
9835
|
var e = function (t) {
|
|
9749
9836
|
if (!t.ownerDocument || !t.ownerDocument.defaultView) return null;
|
|
9750
9837
|
try {
|
|
@@ -9758,84 +9845,97 @@ var t = function t(_t) {
|
|
|
9758
9845
|
}
|
|
9759
9846
|
return !1;
|
|
9760
9847
|
},
|
|
9761
|
-
|
|
9762
|
-
return
|
|
9848
|
+
o$1 = function o(t, e, n, _o2, l, r, i, s) {
|
|
9849
|
+
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;
|
|
9763
9850
|
},
|
|
9764
|
-
|
|
9851
|
+
l = function l(t) {
|
|
9765
9852
|
var e = t.parentElement;
|
|
9766
9853
|
return null == e ? t.getRootNode().host || null : e;
|
|
9767
9854
|
},
|
|
9768
|
-
|
|
9769
|
-
var
|
|
9855
|
+
r = function r(e, _r2) {
|
|
9856
|
+
var i, s, d, h;
|
|
9770
9857
|
if ("undefined" == typeof document) return [];
|
|
9771
|
-
var
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
a =
|
|
9775
|
-
g =
|
|
9776
|
-
|
|
9858
|
+
var c = _r2.scrollMode,
|
|
9859
|
+
f = _r2.block,
|
|
9860
|
+
u = _r2.inline,
|
|
9861
|
+
a = _r2.boundary,
|
|
9862
|
+
g = _r2.skipOverflowHiddenElements,
|
|
9863
|
+
p = "function" == typeof a ? a : function (t) {
|
|
9777
9864
|
return t !== a;
|
|
9778
9865
|
};
|
|
9779
9866
|
if (!t(e)) throw new TypeError("Invalid target");
|
|
9780
|
-
var
|
|
9781
|
-
w = []
|
|
9782
|
-
|
|
9783
|
-
for (; t(W) &&
|
|
9784
|
-
if (W =
|
|
9867
|
+
var m = document.scrollingElement || document.documentElement,
|
|
9868
|
+
w = [];
|
|
9869
|
+
var W = e;
|
|
9870
|
+
for (; t(W) && p(W);) {
|
|
9871
|
+
if (W = l(W), W === m) {
|
|
9785
9872
|
w.push(W);
|
|
9786
9873
|
break;
|
|
9787
9874
|
}
|
|
9788
9875
|
null != W && W === document.body && n(W) && !n(document.documentElement) || null != W && n(W, g) && w.push(W);
|
|
9789
9876
|
}
|
|
9790
|
-
var
|
|
9791
|
-
|
|
9877
|
+
var b = null != (s = null == (i = window.visualViewport) ? void 0 : i.width) ? s : innerWidth,
|
|
9878
|
+
H = null != (h = null == (d = window.visualViewport) ? void 0 : d.height) ? h : innerHeight,
|
|
9792
9879
|
_window = window,
|
|
9793
|
-
|
|
9794
|
-
|
|
9880
|
+
y = _window.scrollX,
|
|
9881
|
+
M = _window.scrollY,
|
|
9795
9882
|
_e$getBoundingClientR = e.getBoundingClientRect(),
|
|
9796
|
-
|
|
9797
|
-
|
|
9883
|
+
v = _e$getBoundingClientR.height,
|
|
9884
|
+
E = _e$getBoundingClientR.width,
|
|
9798
9885
|
x = _e$getBoundingClientR.top,
|
|
9799
|
-
|
|
9800
|
-
|
|
9886
|
+
C = _e$getBoundingClientR.right,
|
|
9887
|
+
I = _e$getBoundingClientR.bottom,
|
|
9801
9888
|
R = _e$getBoundingClientR.left,
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9889
|
+
_ref = function (t) {
|
|
9890
|
+
var e = window.getComputedStyle(t);
|
|
9891
|
+
return {
|
|
9892
|
+
top: parseFloat(e.scrollMarginTop) || 0,
|
|
9893
|
+
right: parseFloat(e.scrollMarginRight) || 0,
|
|
9894
|
+
bottom: parseFloat(e.scrollMarginBottom) || 0,
|
|
9895
|
+
left: parseFloat(e.scrollMarginLeft) || 0
|
|
9896
|
+
};
|
|
9897
|
+
}(e),
|
|
9898
|
+
T = _ref.top,
|
|
9899
|
+
B = _ref.right,
|
|
9900
|
+
F = _ref.bottom,
|
|
9901
|
+
V = _ref.left;
|
|
9902
|
+
var k = "start" === f || "nearest" === f ? x - T : "end" === f ? I + F : x + v / 2 - T + F,
|
|
9903
|
+
D = "center" === u ? R + E / 2 - V + B : "end" === u ? C + B : R - V;
|
|
9904
|
+
var L = [];
|
|
9805
9905
|
for (var _t2 = 0; _t2 < w.length; _t2++) {
|
|
9806
9906
|
var _e2 = w[_t2],
|
|
9807
9907
|
_e$getBoundingClientR2 = _e2.getBoundingClientRect(),
|
|
9808
9908
|
_n2 = _e$getBoundingClientR2.height,
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
if ("if-needed" ===
|
|
9815
|
-
var
|
|
9816
|
-
_a = parseInt(
|
|
9817
|
-
_g = parseInt(
|
|
9818
|
-
|
|
9819
|
-
_W = parseInt(
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
if (
|
|
9827
|
-
|
|
9909
|
+
_l = _e$getBoundingClientR2.width,
|
|
9910
|
+
_r = _e$getBoundingClientR2.top,
|
|
9911
|
+
_i = _e$getBoundingClientR2.right,
|
|
9912
|
+
_s = _e$getBoundingClientR2.bottom,
|
|
9913
|
+
_d = _e$getBoundingClientR2.left;
|
|
9914
|
+
if ("if-needed" === c && x >= 0 && R >= 0 && I <= H && C <= b && x >= _r && I <= _s && R >= _d && C <= _i) return L;
|
|
9915
|
+
var _h = getComputedStyle(_e2),
|
|
9916
|
+
_a = parseInt(_h.borderLeftWidth, 10),
|
|
9917
|
+
_g = parseInt(_h.borderTopWidth, 10),
|
|
9918
|
+
_p = parseInt(_h.borderRightWidth, 10),
|
|
9919
|
+
_W = parseInt(_h.borderBottomWidth, 10);
|
|
9920
|
+
var _T = 0,
|
|
9921
|
+
_B = 0;
|
|
9922
|
+
var _F = "offsetWidth" in _e2 ? _e2.offsetWidth - _e2.clientWidth - _a - _p : 0,
|
|
9923
|
+
_V = "offsetHeight" in _e2 ? _e2.offsetHeight - _e2.clientHeight - _g - _W : 0,
|
|
9924
|
+
S = "offsetWidth" in _e2 ? 0 === _e2.offsetWidth ? 0 : _l / _e2.offsetWidth : 0,
|
|
9925
|
+
X = "offsetHeight" in _e2 ? 0 === _e2.offsetHeight ? 0 : _n2 / _e2.offsetHeight : 0;
|
|
9926
|
+
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 {
|
|
9927
|
+
_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);
|
|
9828
9928
|
var _t3 = _e2.scrollLeft,
|
|
9829
|
-
|
|
9830
|
-
|
|
9929
|
+
_h2 = _e2.scrollTop;
|
|
9930
|
+
_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;
|
|
9831
9931
|
}
|
|
9832
|
-
|
|
9932
|
+
L.push({
|
|
9833
9933
|
el: _e2,
|
|
9834
|
-
top:
|
|
9835
|
-
left:
|
|
9934
|
+
top: _T,
|
|
9935
|
+
left: _B
|
|
9836
9936
|
});
|
|
9837
9937
|
}
|
|
9838
|
-
return
|
|
9938
|
+
return L;
|
|
9839
9939
|
};
|
|
9840
9940
|
|
|
9841
9941
|
var o = function o(t) {
|
|
@@ -9849,7 +9949,7 @@ var o = function o(t) {
|
|
|
9849
9949
|
inline: "nearest"
|
|
9850
9950
|
};
|
|
9851
9951
|
};
|
|
9852
|
-
function e(e, r) {
|
|
9952
|
+
function e(e, r$1) {
|
|
9853
9953
|
if (!e.isConnected || !function (t) {
|
|
9854
9954
|
var o = t;
|
|
9855
9955
|
for (; o && o.parentNode;) {
|
|
@@ -9869,9 +9969,9 @@ function e(e, r) {
|
|
|
9869
9969
|
}(e);
|
|
9870
9970
|
if (function (t) {
|
|
9871
9971
|
return "object" == _typeof$1(t) && "function" == typeof t.behavior;
|
|
9872
|
-
}(r)) return r.behavior(
|
|
9873
|
-
var l = "boolean" == typeof r || null == r ? void 0 : r.behavior;
|
|
9874
|
-
var _iterator = _createForOfIteratorHelper(
|
|
9972
|
+
}(r$1)) return r$1.behavior(r(e, r$1));
|
|
9973
|
+
var l = "boolean" == typeof r$1 || null == r$1 ? void 0 : r$1.behavior;
|
|
9974
|
+
var _iterator = _createForOfIteratorHelper(r(e, o(r$1))),
|
|
9875
9975
|
_step;
|
|
9876
9976
|
try {
|
|
9877
9977
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -10322,7 +10422,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
10322
10422
|
dispatch({
|
|
10323
10423
|
type: 'SELECT',
|
|
10324
10424
|
payload: {
|
|
10325
|
-
value: uniq
|
|
10425
|
+
value: uniq([].concat(_toConsumableArray(values), [option.value]))
|
|
10326
10426
|
}
|
|
10327
10427
|
});
|
|
10328
10428
|
}, [dispatch, values]);
|
|
@@ -11070,6 +11170,7 @@ var ChevronLeft16 = function ChevronLeft16(_a) {
|
|
|
11070
11170
|
})
|
|
11071
11171
|
}, rest), /*#__PURE__*/React.createElement("svg", {
|
|
11072
11172
|
viewBox: "0 0 16 16",
|
|
11173
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
11073
11174
|
style: svgStyle
|
|
11074
11175
|
}, /*#__PURE__*/React.createElement("desc", null, "Created with Sketch."), /*#__PURE__*/React.createElement("g", {
|
|
11075
11176
|
id: "ChevronLeft_16_svg__Icons/Chevron/Left/16",
|
|
@@ -11130,6 +11231,7 @@ var ChevronRight16 = function ChevronRight16(_a) {
|
|
|
11130
11231
|
})
|
|
11131
11232
|
}, rest), /*#__PURE__*/React.createElement("svg", {
|
|
11132
11233
|
viewBox: "0 0 16 16",
|
|
11234
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
11133
11235
|
style: svgStyle
|
|
11134
11236
|
}, /*#__PURE__*/React.createElement("desc", null, "Created with Sketch."), /*#__PURE__*/React.createElement("g", {
|
|
11135
11237
|
id: "ChevronRight_16_svg__Icons/Chevron/Right/16",
|
|
@@ -11162,19 +11264,19 @@ var whenCurrentPageIsGreaterThanHalfTheTotal = function whenCurrentPageIsGreater
|
|
|
11162
11264
|
return page >= totalPages - Math.floor(maxPages / 2);
|
|
11163
11265
|
};
|
|
11164
11266
|
var showAllPages = function showAllPages(_, totalPages) {
|
|
11165
|
-
return range
|
|
11267
|
+
return range(1, totalPages + 1);
|
|
11166
11268
|
};
|
|
11167
11269
|
var showFirstNPagesAndLastPage = function showFirstNPagesAndLastPage(_, totalPages, maxPages) {
|
|
11168
|
-
return [].concat(_toConsumableArray(range
|
|
11270
|
+
return [].concat(_toConsumableArray(range(1, maxPages)), [totalPages]);
|
|
11169
11271
|
};
|
|
11170
11272
|
var showTheLastNPages = function showTheLastNPages(_, totalPages, maxPages) {
|
|
11171
|
-
return [1].concat(_toConsumableArray(range
|
|
11273
|
+
return [1].concat(_toConsumableArray(range(totalPages - maxPages + 2, totalPages + 1)));
|
|
11172
11274
|
};
|
|
11173
11275
|
var showAGroupOfPagesCenteredOnTheCurrentPage = function showAGroupOfPagesCenteredOnTheCurrentPage(page, totalPages, maxPages) {
|
|
11174
11276
|
var diff = Math.floor((maxPages - 2) / 2);
|
|
11175
|
-
return [1].concat(_toConsumableArray(range
|
|
11277
|
+
return [1].concat(_toConsumableArray(range(page - diff, page + diff + 1)), [totalPages]);
|
|
11176
11278
|
};
|
|
11177
|
-
var determinePagesToShow = cond
|
|
11279
|
+
var determinePagesToShow = cond([[whenThereAreFewerPagesThanWeDisplay, showAllPages], [whenCurrentPageIsLessThanHalfTheTotal, showFirstNPagesAndLastPage], [whenCurrentPageIsGreaterThanHalfTheTotal, showTheLastNPages], [otherwise, showAGroupOfPagesCenteredOnTheCurrentPage]]);
|
|
11178
11280
|
var Paginator = function Paginator(_ref) {
|
|
11179
11281
|
var selectedPage = _ref.selectedPage,
|
|
11180
11282
|
totalPages = _ref.totalPages,
|