@kaizen/components 1.8.3 → 1.8.4
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/dist/cjs/future.js +1 -1
- package/dist/cjs/{index-80c270e5.js → index-8e4ba0a1.js} +45 -8
- package/dist/cjs/{index-80c270e5.js.map → index-8e4ba0a1.js.map} +1 -1
- package/dist/cjs/index.js +325 -292
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/future.js +1 -1
- package/dist/esm/{index-5498ce7a.js → index-d2699925.js} +42 -9
- package/dist/esm/{index-5498ce7a.js.map → index-d2699925.js.map} +1 -1
- package/dist/esm/index.js +246 -213
- package/dist/esm/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +24 -24
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as __assign, a as __rest, b as __spreadArray, c as __spreadArrays, d as classNames, e as classnamesExports } from './index-
|
|
1
|
+
import { _ as __assign, a as __rest, g as getDefaultExportFromCjs, b as __spreadArray, c as __spreadArrays, d as classNames, e as getAugmentedNamespace, f as commonjsGlobal, h as classnamesExports } from './index-d2699925.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, { useState, useEffect, PureComponent, useRef, forwardRef, useMemo, useCallback, useContext,
|
|
3
|
+
import React__default, { useState, useEffect, PureComponent, useRef, forwardRef, useMemo, useCallback, useContext, createContext } from 'react';
|
|
4
4
|
import { makeCssVariableDefinitionsMap } from '@kaizen/design-tokens';
|
|
5
5
|
|
|
6
6
|
var zeroRightClassName = 'right-scroll-bar-position';
|
|
@@ -202,12 +202,12 @@ var RemoveScroll = React.forwardRef(function (props, parentRef) {
|
|
|
202
202
|
onWheelCapture: nothing,
|
|
203
203
|
onTouchMoveCapture: nothing,
|
|
204
204
|
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
205
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
|
|
205
|
+
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
206
206
|
var SideCar = sideCar;
|
|
207
207
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
208
208
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
209
209
|
return (React.createElement(React.Fragment, null,
|
|
210
|
-
enabled && (React.createElement(SideCar, { sideCar: effectCar$1, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
|
|
210
|
+
enabled && (React.createElement(SideCar, { sideCar: effectCar$1, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
|
|
211
211
|
forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
212
212
|
});
|
|
213
213
|
RemoveScroll.defaultProps = {
|
|
@@ -235,47 +235,9 @@ function _extends() {
|
|
|
235
235
|
return _extends.apply(this, arguments);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
var
|
|
238
|
+
var propTypes = {exports: {}};
|
|
239
239
|
|
|
240
|
-
|
|
241
|
-
if (n.__esModule) return n;
|
|
242
|
-
var f = n.default;
|
|
243
|
-
if (typeof f == "function") {
|
|
244
|
-
var a = function a () {
|
|
245
|
-
if (this instanceof a) {
|
|
246
|
-
var args = [null];
|
|
247
|
-
args.push.apply(args, arguments);
|
|
248
|
-
var Ctor = Function.bind.apply(f, args);
|
|
249
|
-
return new Ctor();
|
|
250
|
-
}
|
|
251
|
-
return f.apply(this, arguments);
|
|
252
|
-
};
|
|
253
|
-
a.prototype = f.prototype;
|
|
254
|
-
} else a = {};
|
|
255
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
256
|
-
Object.keys(n).forEach(function (k) {
|
|
257
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
258
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
259
|
-
enumerable: true,
|
|
260
|
-
get: function () {
|
|
261
|
-
return n[k];
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
});
|
|
265
|
-
return a;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
var propTypesExports = {};
|
|
269
|
-
var propTypes = {
|
|
270
|
-
get exports(){ return propTypesExports; },
|
|
271
|
-
set exports(v){ propTypesExports = v; },
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
var reactIsExports = {};
|
|
275
|
-
var reactIs = {
|
|
276
|
-
get exports(){ return reactIsExports; },
|
|
277
|
-
set exports(v){ reactIsExports = v; },
|
|
278
|
-
};
|
|
240
|
+
var reactIs = {exports: {}};
|
|
279
241
|
|
|
280
242
|
var reactIs_production_min = {};
|
|
281
243
|
|
|
@@ -494,17 +456,15 @@ function requireReactIs_development () {
|
|
|
494
456
|
var hasRequiredReactIs;
|
|
495
457
|
|
|
496
458
|
function requireReactIs () {
|
|
497
|
-
if (hasRequiredReactIs) return
|
|
459
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
498
460
|
hasRequiredReactIs = 1;
|
|
499
|
-
(function (module) {
|
|
500
461
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
return reactIsExports;
|
|
462
|
+
if (process.env.NODE_ENV === 'production') {
|
|
463
|
+
reactIs.exports = requireReactIs_production_min();
|
|
464
|
+
} else {
|
|
465
|
+
reactIs.exports = requireReactIs_development();
|
|
466
|
+
}
|
|
467
|
+
return reactIs.exports;
|
|
508
468
|
}
|
|
509
469
|
|
|
510
470
|
/*
|
|
@@ -1455,6 +1415,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1455
1415
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1456
1416
|
}
|
|
1457
1417
|
|
|
1418
|
+
var propTypesExports = propTypes.exports;
|
|
1419
|
+
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
1420
|
+
|
|
1458
1421
|
/**
|
|
1459
1422
|
* defines a focus group
|
|
1460
1423
|
*/
|
|
@@ -1489,7 +1452,7 @@ var hiddenGuard = {
|
|
|
1489
1452
|
};
|
|
1490
1453
|
|
|
1491
1454
|
process.env.NODE_ENV !== "production" ? {
|
|
1492
|
-
children:
|
|
1455
|
+
children: PropTypes.node
|
|
1493
1456
|
} : {};
|
|
1494
1457
|
|
|
1495
1458
|
var mediumFocus = createMedium({}, function (_ref) {
|
|
@@ -1724,20 +1687,20 @@ function deferAction(action) {
|
|
|
1724
1687
|
}
|
|
1725
1688
|
|
|
1726
1689
|
process.env.NODE_ENV !== "production" ? {
|
|
1727
|
-
children:
|
|
1728
|
-
disabled:
|
|
1729
|
-
className:
|
|
1690
|
+
children: PropTypes.node.isRequired,
|
|
1691
|
+
disabled: PropTypes.bool,
|
|
1692
|
+
className: PropTypes.string
|
|
1730
1693
|
} : {};
|
|
1731
1694
|
|
|
1732
1695
|
process.env.NODE_ENV !== "production" ? {
|
|
1733
|
-
children:
|
|
1734
|
-
disabled:
|
|
1735
|
-
className:
|
|
1696
|
+
children: PropTypes.node.isRequired,
|
|
1697
|
+
disabled: PropTypes.bool,
|
|
1698
|
+
className: PropTypes.string
|
|
1736
1699
|
} : {};
|
|
1737
1700
|
|
|
1738
1701
|
process.env.NODE_ENV !== "production" ? {
|
|
1739
|
-
children:
|
|
1740
|
-
className:
|
|
1702
|
+
children: PropTypes.node.isRequired,
|
|
1703
|
+
className: PropTypes.string
|
|
1741
1704
|
} : {};
|
|
1742
1705
|
|
|
1743
1706
|
var effectCar = createSidecarMedium();
|
|
@@ -2722,7 +2685,7 @@ var FocusWatcher = function FocusWatcher() {
|
|
|
2722
2685
|
};
|
|
2723
2686
|
|
|
2724
2687
|
process.env.NODE_ENV !== "production" ? {
|
|
2725
|
-
children:
|
|
2688
|
+
children: PropTypes.node.isRequired
|
|
2726
2689
|
} : {};
|
|
2727
2690
|
|
|
2728
2691
|
var onWindowBlur = function onWindowBlur() {
|
|
@@ -2994,6 +2957,7 @@ var elementCanBeScrolled = function (node, overflow) {
|
|
|
2994
2957
|
var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
|
|
2995
2958
|
var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
|
|
2996
2959
|
var locationCouldBeScrolled = function (axis, node) {
|
|
2960
|
+
var ownerDocument = node.ownerDocument;
|
|
2997
2961
|
var current = node;
|
|
2998
2962
|
do {
|
|
2999
2963
|
// Skip over shadow root
|
|
@@ -3008,7 +2972,7 @@ var locationCouldBeScrolled = function (axis, node) {
|
|
|
3008
2972
|
}
|
|
3009
2973
|
}
|
|
3010
2974
|
current = current.parentNode;
|
|
3011
|
-
} while (current && current !==
|
|
2975
|
+
} while (current && current !== ownerDocument.body);
|
|
3012
2976
|
return false;
|
|
3013
2977
|
};
|
|
3014
2978
|
var getVScrollVariables = function (_a) {
|
|
@@ -3092,7 +3056,7 @@ function RemoveScrollSideCar(props) {
|
|
|
3092
3056
|
var touchStartRef = React.useRef([0, 0]);
|
|
3093
3057
|
var activeAxis = React.useRef();
|
|
3094
3058
|
var id = React.useState(idCounter++)[0];
|
|
3095
|
-
var Style = React.useState(
|
|
3059
|
+
var Style = React.useState(styleSingleton)[0];
|
|
3096
3060
|
var lastProps = React.useRef(props);
|
|
3097
3061
|
React.useEffect(function () {
|
|
3098
3062
|
lastProps.current = props;
|
|
@@ -3214,7 +3178,7 @@ function RemoveScrollSideCar(props) {
|
|
|
3214
3178
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
3215
3179
|
return (React.createElement(React.Fragment, null,
|
|
3216
3180
|
inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,
|
|
3217
|
-
removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode:
|
|
3181
|
+
removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));
|
|
3218
3182
|
}
|
|
3219
3183
|
|
|
3220
3184
|
exportSidecar(effectCar$1, RemoveScrollSideCar);
|
|
@@ -3542,19 +3506,11 @@ var fromEntries = function fromEntries(entries) {
|
|
|
3542
3506
|
|
|
3543
3507
|
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;
|
|
3544
3508
|
|
|
3545
|
-
var
|
|
3546
|
-
var reactDom = {
|
|
3547
|
-
get exports(){ return reactDomExports; },
|
|
3548
|
-
set exports(v){ reactDomExports = v; },
|
|
3549
|
-
};
|
|
3509
|
+
var reactDom = {exports: {}};
|
|
3550
3510
|
|
|
3551
3511
|
var reactDom_production_min = {};
|
|
3552
3512
|
|
|
3553
|
-
var
|
|
3554
|
-
var scheduler = {
|
|
3555
|
-
get exports(){ return schedulerExports; },
|
|
3556
|
-
set exports(v){ schedulerExports = v; },
|
|
3557
|
-
};
|
|
3513
|
+
var scheduler = {exports: {}};
|
|
3558
3514
|
|
|
3559
3515
|
var scheduler_production_min = {};
|
|
3560
3516
|
|
|
@@ -3583,8 +3539,8 @@ function f(a,b){var c=a.length;a.push(b);a:for(;0<c;){var d=c-1>>>1,e=a[d];if(0<
|
|
|
3583
3539
|
exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<a?Math.floor(1E3/a):5;};exports.unstable_getCurrentPriorityLevel=function(){return y};exports.unstable_getFirstCallbackNode=function(){return h(r)};exports.unstable_next=function(a){switch(y){case 1:case 2:case 3:var b=3;break;default:b=y;}var c=y;y=b;try{return a()}finally{y=c;}};exports.unstable_pauseExecution=function(){};
|
|
3584
3540
|
exports.unstable_requestPaint=function(){};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=y;y=a;try{return b()}finally{y=c;}};
|
|
3585
3541
|
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3;}e=c+e;a={id:u++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};
|
|
3586
|
-
exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c;}}};
|
|
3587
|
-
} (scheduler_production_min));
|
|
3542
|
+
exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c;}}};
|
|
3543
|
+
} (scheduler_production_min));
|
|
3588
3544
|
return scheduler_production_min;
|
|
3589
3545
|
}
|
|
3590
3546
|
|
|
@@ -4214,25 +4170,23 @@ function requireScheduler_development () {
|
|
|
4214
4170
|
}
|
|
4215
4171
|
|
|
4216
4172
|
})();
|
|
4217
|
-
}
|
|
4218
|
-
} (scheduler_development));
|
|
4173
|
+
}
|
|
4174
|
+
} (scheduler_development));
|
|
4219
4175
|
return scheduler_development;
|
|
4220
4176
|
}
|
|
4221
4177
|
|
|
4222
4178
|
var hasRequiredScheduler;
|
|
4223
4179
|
|
|
4224
4180
|
function requireScheduler () {
|
|
4225
|
-
if (hasRequiredScheduler) return
|
|
4181
|
+
if (hasRequiredScheduler) return scheduler.exports;
|
|
4226
4182
|
hasRequiredScheduler = 1;
|
|
4227
|
-
(function (module) {
|
|
4228
4183
|
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
return schedulerExports;
|
|
4184
|
+
if (process.env.NODE_ENV === 'production') {
|
|
4185
|
+
scheduler.exports = requireScheduler_production_min();
|
|
4186
|
+
} else {
|
|
4187
|
+
scheduler.exports = requireScheduler_development();
|
|
4188
|
+
}
|
|
4189
|
+
return scheduler.exports;
|
|
4236
4190
|
}
|
|
4237
4191
|
|
|
4238
4192
|
/**
|
|
@@ -34414,45 +34368,44 @@ function requireReactDom_development () {
|
|
|
34414
34368
|
return reactDom_development;
|
|
34415
34369
|
}
|
|
34416
34370
|
|
|
34417
|
-
|
|
34371
|
+
function checkDCE() {
|
|
34372
|
+
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
34373
|
+
if (
|
|
34374
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
|
|
34375
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
|
|
34376
|
+
) {
|
|
34377
|
+
return;
|
|
34378
|
+
}
|
|
34379
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
34380
|
+
// This branch is unreachable because this function is only called
|
|
34381
|
+
// in production, but the condition is true only in development.
|
|
34382
|
+
// Therefore if the branch is still here, dead code elimination wasn't
|
|
34383
|
+
// properly applied.
|
|
34384
|
+
// Don't change the message. React DevTools relies on it. Also make sure
|
|
34385
|
+
// this message doesn't occur elsewhere in this function, or it will cause
|
|
34386
|
+
// a false positive.
|
|
34387
|
+
throw new Error('^_^');
|
|
34388
|
+
}
|
|
34389
|
+
try {
|
|
34390
|
+
// Verify that the code above has been dead code eliminated (DCE'd).
|
|
34391
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
34392
|
+
} catch (err) {
|
|
34393
|
+
// DevTools shouldn't crash React, no matter what.
|
|
34394
|
+
// We should still report in case we break this code.
|
|
34395
|
+
console.error(err);
|
|
34396
|
+
}
|
|
34397
|
+
}
|
|
34418
34398
|
|
|
34419
|
-
|
|
34420
|
-
|
|
34421
|
-
|
|
34422
|
-
|
|
34423
|
-
|
|
34424
|
-
|
|
34425
|
-
|
|
34426
|
-
|
|
34427
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
34428
|
-
// This branch is unreachable because this function is only called
|
|
34429
|
-
// in production, but the condition is true only in development.
|
|
34430
|
-
// Therefore if the branch is still here, dead code elimination wasn't
|
|
34431
|
-
// properly applied.
|
|
34432
|
-
// Don't change the message. React DevTools relies on it. Also make sure
|
|
34433
|
-
// this message doesn't occur elsewhere in this function, or it will cause
|
|
34434
|
-
// a false positive.
|
|
34435
|
-
throw new Error('^_^');
|
|
34436
|
-
}
|
|
34437
|
-
try {
|
|
34438
|
-
// Verify that the code above has been dead code eliminated (DCE'd).
|
|
34439
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
34440
|
-
} catch (err) {
|
|
34441
|
-
// DevTools shouldn't crash React, no matter what.
|
|
34442
|
-
// We should still report in case we break this code.
|
|
34443
|
-
console.error(err);
|
|
34444
|
-
}
|
|
34445
|
-
}
|
|
34399
|
+
if (process.env.NODE_ENV === 'production') {
|
|
34400
|
+
// DCE check should happen before ReactDOM bundle executes so that
|
|
34401
|
+
// DevTools can report bad minification during injection.
|
|
34402
|
+
checkDCE();
|
|
34403
|
+
reactDom.exports = requireReactDom_production_min();
|
|
34404
|
+
} else {
|
|
34405
|
+
reactDom.exports = requireReactDom_development();
|
|
34406
|
+
}
|
|
34446
34407
|
|
|
34447
|
-
|
|
34448
|
-
// DCE check should happen before ReactDOM bundle executes so that
|
|
34449
|
-
// DevTools can report bad minification during injection.
|
|
34450
|
-
checkDCE();
|
|
34451
|
-
module.exports = requireReactDom_production_min();
|
|
34452
|
-
} else {
|
|
34453
|
-
module.exports = requireReactDom_development();
|
|
34454
|
-
}
|
|
34455
|
-
} (reactDom));
|
|
34408
|
+
var reactDomExports = reactDom.exports;
|
|
34456
34409
|
|
|
34457
34410
|
var top = 'top';
|
|
34458
34411
|
var bottom = 'bottom';
|
|
@@ -36562,6 +36515,8 @@ var reactFastCompare = function isEqual(a, b) {
|
|
|
36562
36515
|
}
|
|
36563
36516
|
};
|
|
36564
36517
|
|
|
36518
|
+
var isEqual = /*@__PURE__*/getDefaultExportFromCjs(reactFastCompare);
|
|
36519
|
+
|
|
36565
36520
|
var EMPTY_MODIFIERS$1 = [];
|
|
36566
36521
|
var usePopper = function usePopper(referenceElement, popperElement, options) {
|
|
36567
36522
|
if (options === void 0) {
|
|
@@ -36625,7 +36580,7 @@ var usePopper = function usePopper(referenceElement, popperElement, options) {
|
|
|
36625
36580
|
}])
|
|
36626
36581
|
};
|
|
36627
36582
|
|
|
36628
|
-
if (
|
|
36583
|
+
if (isEqual(prevOptions.current, newOptions)) {
|
|
36629
36584
|
return prevOptions.current || newOptions;
|
|
36630
36585
|
} else {
|
|
36631
36586
|
prevOptions.current = newOptions;
|
|
@@ -36793,6 +36748,8 @@ if (__DEV__) {
|
|
|
36793
36748
|
|
|
36794
36749
|
var warning_1 = warning;
|
|
36795
36750
|
|
|
36751
|
+
var warning$1 = /*@__PURE__*/getDefaultExportFromCjs(warning_1);
|
|
36752
|
+
|
|
36796
36753
|
function Reference(_ref) {
|
|
36797
36754
|
var children = _ref.children,
|
|
36798
36755
|
innerRef = _ref.innerRef;
|
|
@@ -36809,7 +36766,7 @@ function Reference(_ref) {
|
|
|
36809
36766
|
};
|
|
36810
36767
|
}, []);
|
|
36811
36768
|
React.useEffect(function () {
|
|
36812
|
-
|
|
36769
|
+
warning$1(Boolean(setReferenceNode), '`Reference` should not be used outside of a `Manager` component.');
|
|
36813
36770
|
}, [setReferenceNode]);
|
|
36814
36771
|
return unwrapArray(children)({
|
|
36815
36772
|
ref: refHandler
|
|
@@ -38194,15 +38151,16 @@ function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange
|
|
|
38194
38151
|
// being on the page at once, the prefix is set to a random number. SSRProvider
|
|
38195
38152
|
// will reset this to zero for consistency between server and client, so in the
|
|
38196
38153
|
// SSR case multiple copies of React Aria is not supported.
|
|
38197
|
-
const $704cf1d3b684cc5c$var$defaultContext
|
|
38154
|
+
const $704cf1d3b684cc5c$var$defaultContext = {
|
|
38198
38155
|
prefix: String(Math.round(Math.random() * 10000000000)),
|
|
38199
|
-
current: 0
|
|
38156
|
+
current: 0,
|
|
38157
|
+
isSSR: false
|
|
38200
38158
|
};
|
|
38201
|
-
const $704cf1d3b684cc5c$var$SSRContext
|
|
38159
|
+
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (React__default).createContext($704cf1d3b684cc5c$var$defaultContext);
|
|
38202
38160
|
let $704cf1d3b684cc5c$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
38203
38161
|
let $704cf1d3b684cc5c$var$componentIds = new WeakMap();
|
|
38204
38162
|
function $704cf1d3b684cc5c$var$useCounter(isDisabled = false) {
|
|
38205
|
-
let ctx = (useContext)($704cf1d3b684cc5c$var$SSRContext
|
|
38163
|
+
let ctx = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
38206
38164
|
let ref = (useRef)(null);
|
|
38207
38165
|
if (ref.current === null && !isDisabled) {
|
|
38208
38166
|
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
|
|
@@ -38237,13 +38195,17 @@ function $704cf1d3b684cc5c$var$useCounter(isDisabled = false) {
|
|
|
38237
38195
|
return ref.current;
|
|
38238
38196
|
}
|
|
38239
38197
|
function $704cf1d3b684cc5c$export$619500959fc48b26(defaultId) {
|
|
38240
|
-
let ctx = (useContext)($704cf1d3b684cc5c$var$SSRContext
|
|
38198
|
+
let ctx = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
38241
38199
|
// If we are rendering in a non-DOM environment, and there's no SSRProvider,
|
|
38242
38200
|
// provide a warning to hint to the developer to add one.
|
|
38243
|
-
if (ctx === $704cf1d3b684cc5c$var$defaultContext
|
|
38201
|
+
if (ctx === $704cf1d3b684cc5c$var$defaultContext && !$704cf1d3b684cc5c$var$canUseDOM) console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
38244
38202
|
let counter = $704cf1d3b684cc5c$var$useCounter(!!defaultId);
|
|
38245
38203
|
return defaultId || `react-aria${ctx.prefix}-${counter}`;
|
|
38246
38204
|
}
|
|
38205
|
+
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
38206
|
+
let cur = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
38207
|
+
return cur.isSSR;
|
|
38208
|
+
}
|
|
38247
38209
|
|
|
38248
38210
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
38249
38211
|
|
|
@@ -39732,7 +39694,9 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
39732
39694
|
]);
|
|
39733
39695
|
const onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
39734
39696
|
const onFocus = (useCallback)((e)=>{
|
|
39735
|
-
|
|
39697
|
+
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
39698
|
+
// focus handler already moved focus somewhere else.
|
|
39699
|
+
if (e.target === e.currentTarget && document.activeElement === e.target) {
|
|
39736
39700
|
if (onFocusProp) onFocusProp(e);
|
|
39737
39701
|
if (onFocusChange) onFocusChange(true);
|
|
39738
39702
|
onSyntheticFocus(e);
|
|
@@ -39767,6 +39731,7 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
39767
39731
|
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
|
|
39768
39732
|
|
|
39769
39733
|
|
|
39734
|
+
|
|
39770
39735
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
39771
39736
|
let $507fabe10e71c6fb$var$changeHandlers = new Set();
|
|
39772
39737
|
let $507fabe10e71c6fb$var$hasSetupGlobalListeners = false;
|
|
@@ -39883,7 +39848,7 @@ function $507fabe10e71c6fb$export$98e20ec92f614cfe() {
|
|
|
39883
39848
|
$507fabe10e71c6fb$var$changeHandlers.delete(handler);
|
|
39884
39849
|
};
|
|
39885
39850
|
}, []);
|
|
39886
|
-
return modality;
|
|
39851
|
+
return ($704cf1d3b684cc5c$export$535bd6ca7f90a273)() ? null : modality;
|
|
39887
39852
|
}
|
|
39888
39853
|
/**
|
|
39889
39854
|
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
|
|
@@ -39944,7 +39909,9 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
39944
39909
|
]);
|
|
39945
39910
|
let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
39946
39911
|
let onFocus = (useCallback)((e)=>{
|
|
39947
|
-
|
|
39912
|
+
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
39913
|
+
// focus handler already moved focus somewhere else.
|
|
39914
|
+
if (!state.current.isFocusWithin && document.activeElement === e.target) {
|
|
39948
39915
|
if (onFocusWithin) onFocusWithin(e);
|
|
39949
39916
|
if (onFocusWithinChange) onFocusWithinChange(true);
|
|
39950
39917
|
state.current.isFocusWithin = true;
|
|
@@ -41131,55 +41098,6 @@ function $701a24aa0da5b062$export$ea18c227d4417cc3(props, ref) {
|
|
|
41131
41098
|
};
|
|
41132
41099
|
}
|
|
41133
41100
|
|
|
41134
|
-
/*
|
|
41135
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
41136
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
41137
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
41138
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
41139
|
-
*
|
|
41140
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
41141
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
41142
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
41143
|
-
* governing permissions and limitations under the License.
|
|
41144
|
-
*/ /*
|
|
41145
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
41146
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
41147
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
41148
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
41149
|
-
*
|
|
41150
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
41151
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
41152
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
41153
|
-
* governing permissions and limitations under the License.
|
|
41154
|
-
*/ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is
|
|
41155
|
-
// guarded by a check that it only runs on the client side.
|
|
41156
|
-
// eslint-disable-next-line rulesdir/useLayoutEffectRule
|
|
41157
|
-
|
|
41158
|
-
// Default context value to use in case there is no SSRProvider. This is fine for
|
|
41159
|
-
// client-only apps. In order to support multiple copies of React Aria potentially
|
|
41160
|
-
// being on the page at once, the prefix is set to a random number. SSRProvider
|
|
41161
|
-
// will reset this to zero for consistency between server and client, so in the
|
|
41162
|
-
// SSR case multiple copies of React Aria is not supported.
|
|
41163
|
-
const $704cf1d3b684cc5c$var$defaultContext = {
|
|
41164
|
-
prefix: String(Math.round(Math.random() * 10000000000)),
|
|
41165
|
-
current: 0
|
|
41166
|
-
};
|
|
41167
|
-
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (React__default).createContext($704cf1d3b684cc5c$var$defaultContext);
|
|
41168
|
-
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
41169
|
-
let cur = (useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
41170
|
-
let isInSSRContext = cur !== $704cf1d3b684cc5c$var$defaultContext;
|
|
41171
|
-
let [isSSR, setIsSSR] = (useState)(isInSSRContext);
|
|
41172
|
-
// If on the client, and the component was initially server rendered,
|
|
41173
|
-
// then schedule a layout effect to update the component after hydration.
|
|
41174
|
-
if (typeof window !== "undefined" && isInSSRContext) // This if statement technically breaks the rules of hooks, but is safe
|
|
41175
|
-
// because the condition never changes after mounting.
|
|
41176
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
41177
|
-
(useLayoutEffect)(()=>{
|
|
41178
|
-
setIsSSR(false);
|
|
41179
|
-
}, []);
|
|
41180
|
-
return isSSR;
|
|
41181
|
-
}
|
|
41182
|
-
|
|
41183
41101
|
/*
|
|
41184
41102
|
* Copyright 2022 Adobe. All rights reserved.
|
|
41185
41103
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -41759,10 +41677,12 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
41759
41677
|
// Restore the scroll position to what it was before.
|
|
41760
41678
|
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
41761
41679
|
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
41680
|
+
}
|
|
41681
|
+
if (!isVirtualized && manager.focusedKey != null) {
|
|
41762
41682
|
// Refocus and scroll the focused item into view if it exists within the scrollable region.
|
|
41763
41683
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
41764
41684
|
if (element) {
|
|
41765
|
-
// This prevents a flash of focus on the first/last element in the collection
|
|
41685
|
+
// This prevents a flash of focus on the first/last element in the collection, or the collection itself.
|
|
41766
41686
|
($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
41767
41687
|
($2f04cbc44ee30ce0$export$53a0910f038337bd)(scrollRef.current, element);
|
|
41768
41688
|
}
|
|
@@ -41873,9 +41793,9 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
41873
41793
|
// Focus the associated DOM node when this item becomes the focusedKey
|
|
41874
41794
|
(useEffect)(()=>{
|
|
41875
41795
|
let isFocused = key === manager.focusedKey;
|
|
41876
|
-
if (isFocused && manager.isFocused && !shouldUseVirtualFocus
|
|
41796
|
+
if (isFocused && manager.isFocused && !shouldUseVirtualFocus) {
|
|
41877
41797
|
if (focus) focus();
|
|
41878
|
-
else ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
41798
|
+
else if (document.activeElement !== ref.current) ($6a99195332edec8b$export$80f3e147d781571c)(ref.current);
|
|
41879
41799
|
}
|
|
41880
41800
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41881
41801
|
}, [
|
|
@@ -41999,6 +41919,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
41999
41919
|
}),
|
|
42000
41920
|
isPressed: isPressed,
|
|
42001
41921
|
isSelected: manager.isSelected(key),
|
|
41922
|
+
isFocused: manager.isFocused && manager.focusedKey === key,
|
|
42002
41923
|
isDisabled: isDisabled,
|
|
42003
41924
|
allowsSelection: allowsSelection,
|
|
42004
41925
|
hasAction: hasAction
|
|
@@ -42043,6 +41964,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
42043
41964
|
if (item.type === "item" && !this.disabledKeys.has(key)) return key;
|
|
42044
41965
|
key = this.collection.getKeyAfter(key);
|
|
42045
41966
|
}
|
|
41967
|
+
return null;
|
|
42046
41968
|
}
|
|
42047
41969
|
getKeyAbove(key) {
|
|
42048
41970
|
key = this.collection.getKeyBefore(key);
|
|
@@ -42051,6 +41973,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
42051
41973
|
if (item.type === "item" && !this.disabledKeys.has(key)) return key;
|
|
42052
41974
|
key = this.collection.getKeyBefore(key);
|
|
42053
41975
|
}
|
|
41976
|
+
return null;
|
|
42054
41977
|
}
|
|
42055
41978
|
getFirstKey() {
|
|
42056
41979
|
let key = this.collection.getFirstKey();
|
|
@@ -42059,6 +41982,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
42059
41982
|
if (item.type === "item" && !this.disabledKeys.has(key)) return key;
|
|
42060
41983
|
key = this.collection.getKeyAfter(key);
|
|
42061
41984
|
}
|
|
41985
|
+
return null;
|
|
42062
41986
|
}
|
|
42063
41987
|
getLastKey() {
|
|
42064
41988
|
let key = this.collection.getLastKey();
|
|
@@ -42067,6 +41991,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
42067
41991
|
if (item.type === "item" && !this.disabledKeys.has(key)) return key;
|
|
42068
41992
|
key = this.collection.getKeyBefore(key);
|
|
42069
41993
|
}
|
|
41994
|
+
return null;
|
|
42070
41995
|
}
|
|
42071
41996
|
getItem(key) {
|
|
42072
41997
|
return this.ref.current.querySelector(`[data-key="${key}"]`);
|
|
@@ -42078,7 +42003,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
42078
42003
|
let pageY = Math.max(0, item.offsetTop + item.offsetHeight - menu.offsetHeight);
|
|
42079
42004
|
while(item && item.offsetTop > pageY){
|
|
42080
42005
|
key = this.getKeyAbove(key);
|
|
42081
|
-
item = this.getItem(key);
|
|
42006
|
+
item = key == null ? null : this.getItem(key);
|
|
42082
42007
|
}
|
|
42083
42008
|
return key;
|
|
42084
42009
|
}
|
|
@@ -42089,7 +42014,7 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
42089
42014
|
let pageY = Math.min(menu.scrollHeight, item.offsetTop - item.offsetHeight + menu.offsetHeight);
|
|
42090
42015
|
while(item && item.offsetTop < pageY){
|
|
42091
42016
|
key = this.getKeyBelow(key);
|
|
42092
|
-
item = this.getItem(key);
|
|
42017
|
+
item = key == null ? null : this.getItem(key);
|
|
42093
42018
|
}
|
|
42094
42019
|
return key;
|
|
42095
42020
|
}
|
|
@@ -42268,12 +42193,12 @@ const $5c3e21d68f1c4674$var$styles = {
|
|
|
42268
42193
|
border: 0,
|
|
42269
42194
|
clip: "rect(0 0 0 0)",
|
|
42270
42195
|
clipPath: "inset(50%)",
|
|
42271
|
-
height:
|
|
42272
|
-
margin: "
|
|
42196
|
+
height: "1px",
|
|
42197
|
+
margin: "-1px",
|
|
42273
42198
|
overflow: "hidden",
|
|
42274
42199
|
padding: 0,
|
|
42275
42200
|
position: "absolute",
|
|
42276
|
-
width:
|
|
42201
|
+
width: "1px",
|
|
42277
42202
|
whiteSpace: "nowrap"
|
|
42278
42203
|
};
|
|
42279
42204
|
function $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {
|
|
@@ -42458,6 +42383,18 @@ function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
42458
42383
|
}
|
|
42459
42384
|
};
|
|
42460
42385
|
}
|
|
42386
|
+
// HTML input types that do not cause the software keyboard to appear.
|
|
42387
|
+
new Set([
|
|
42388
|
+
"checkbox",
|
|
42389
|
+
"radio",
|
|
42390
|
+
"range",
|
|
42391
|
+
"color",
|
|
42392
|
+
"file",
|
|
42393
|
+
"image",
|
|
42394
|
+
"button",
|
|
42395
|
+
"submit",
|
|
42396
|
+
"reset"
|
|
42397
|
+
]);
|
|
42461
42398
|
|
|
42462
42399
|
|
|
42463
42400
|
/*
|
|
@@ -42731,6 +42668,21 @@ function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
|
42731
42668
|
}));
|
|
42732
42669
|
}
|
|
42733
42670
|
|
|
42671
|
+
|
|
42672
|
+
/*
|
|
42673
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
42674
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
42675
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
42676
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
42677
|
+
*
|
|
42678
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
42679
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
42680
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
42681
|
+
* governing permissions and limitations under the License.
|
|
42682
|
+
*/ // Keeps a ref count of all hidden elements. Added to when hiding an element, and
|
|
42683
|
+
// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.
|
|
42684
|
+
new WeakMap();
|
|
42685
|
+
|
|
42734
42686
|
/*
|
|
42735
42687
|
* Copyright 2020 Adobe. All rights reserved.
|
|
42736
42688
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -43040,6 +42992,7 @@ function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context, inva
|
|
|
43040
42992
|
let builder = (useMemo)(()=>new ($eb2240fc39a57fa5$export$bf788dd355e3a401)(), []);
|
|
43041
42993
|
let prev = (useRef)(null);
|
|
43042
42994
|
return (useMemo)(()=>{
|
|
42995
|
+
if (props.collection) return props.collection;
|
|
43043
42996
|
let nodes = builder.build(props, context);
|
|
43044
42997
|
prev.current = factory(nodes, prev.current);
|
|
43045
42998
|
return prev.current;
|
|
@@ -43049,6 +43002,7 @@ function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context, inva
|
|
|
43049
43002
|
builder,
|
|
43050
43003
|
props.children,
|
|
43051
43004
|
props.items,
|
|
43005
|
+
props.collection,
|
|
43052
43006
|
context,
|
|
43053
43007
|
...invalidators
|
|
43054
43008
|
]);
|
|
@@ -43065,13 +43019,69 @@ function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context, inva
|
|
|
43065
43019
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
43066
43020
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
43067
43021
|
* governing permissions and limitations under the License.
|
|
43068
|
-
*/
|
|
43022
|
+
*/ /*
|
|
43023
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
43024
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
43025
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
43026
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
43027
|
+
*
|
|
43028
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
43029
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
43030
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
43031
|
+
* governing permissions and limitations under the License.
|
|
43032
|
+
*/ function $c5a24bc478652b5f$export$1005530eda016c13(node, collection) {
|
|
43033
|
+
// New API: call collection.getChildren with the node key.
|
|
43034
|
+
if (typeof collection.getChildren === "function") return collection.getChildren(node.key);
|
|
43035
|
+
// Old API: access childNodes directly.
|
|
43036
|
+
return node.childNodes;
|
|
43037
|
+
}
|
|
43038
|
+
function $c5a24bc478652b5f$export$fbdeaa6a76694f71(iterable) {
|
|
43039
|
+
return $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, 0);
|
|
43040
|
+
}
|
|
43041
|
+
function $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, index) {
|
|
43042
|
+
if (index < 0) return undefined;
|
|
43043
|
+
let i = 0;
|
|
43044
|
+
for (let item of iterable){
|
|
43045
|
+
if (i === index) return item;
|
|
43046
|
+
i++;
|
|
43047
|
+
}
|
|
43048
|
+
}
|
|
43049
|
+
function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
|
|
43050
|
+
// If the two nodes have the same parent, compare their indices.
|
|
43051
|
+
if (a.parentKey === b.parentKey) return a.index - b.index;
|
|
43052
|
+
// Otherwise, collect all of the ancestors from each node, and find the first one that doesn't match starting from the root.
|
|
43053
|
+
let aAncestors = $c5a24bc478652b5f$var$getAncestors(collection, a);
|
|
43054
|
+
let bAncestors = $c5a24bc478652b5f$var$getAncestors(collection, b);
|
|
43055
|
+
let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a, i)=>a !== bAncestors[i]);
|
|
43056
|
+
if (firstNonMatchingAncestor !== -1) {
|
|
43057
|
+
// Compare the indices of two children within the common ancestor.
|
|
43058
|
+
a = aAncestors[firstNonMatchingAncestor];
|
|
43059
|
+
b = bAncestors[firstNonMatchingAncestor];
|
|
43060
|
+
return a.index - b.index;
|
|
43061
|
+
}
|
|
43062
|
+
// 🤷
|
|
43063
|
+
return -1;
|
|
43064
|
+
}
|
|
43065
|
+
function $c5a24bc478652b5f$var$getAncestors(collection, node) {
|
|
43066
|
+
let parents = [];
|
|
43067
|
+
while((node === null || node === void 0 ? void 0 : node.parentKey) != null){
|
|
43068
|
+
node = collection.getItem(node.parentKey);
|
|
43069
|
+
parents.unshift(node);
|
|
43070
|
+
}
|
|
43071
|
+
return parents;
|
|
43072
|
+
}
|
|
43073
|
+
|
|
43074
|
+
|
|
43075
|
+
const $453cc9f0df89c0a5$var$cache = new WeakMap();
|
|
43069
43076
|
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
43070
43077
|
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
43071
43078
|
if (count != null) return count;
|
|
43072
43079
|
count = 0;
|
|
43073
|
-
|
|
43074
|
-
|
|
43080
|
+
let countItems = (items)=>{
|
|
43081
|
+
for (let item of items)if (item.type === "section") countItems(($c5a24bc478652b5f$export$1005530eda016c13)(item, collection));
|
|
43082
|
+
else count++;
|
|
43083
|
+
};
|
|
43084
|
+
countItems(collection);
|
|
43075
43085
|
$453cc9f0df89c0a5$var$cache.set(collection, count);
|
|
43076
43086
|
return count;
|
|
43077
43087
|
}
|
|
@@ -43413,12 +43423,27 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
43413
43423
|
};
|
|
43414
43424
|
}
|
|
43415
43425
|
|
|
43426
|
+
|
|
43416
43427
|
/*
|
|
43417
43428
|
* Copyright 2020 Adobe. All rights reserved.
|
|
43418
43429
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
43419
43430
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
43420
43431
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
43421
|
-
*
|
|
43432
|
+
*
|
|
43433
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
43434
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
43435
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
43436
|
+
* governing permissions and limitations under the License.
|
|
43437
|
+
*/
|
|
43438
|
+
|
|
43439
|
+
new WeakMap();
|
|
43440
|
+
|
|
43441
|
+
/*
|
|
43442
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
43443
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
43444
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
43445
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
43446
|
+
*
|
|
43422
43447
|
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
43423
43448
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
43424
43449
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
@@ -43854,6 +43879,7 @@ function $7af3f5b51489e0b5$var$convertSelection(selection, defaultValue) {
|
|
|
43854
43879
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
43855
43880
|
* governing permissions and limitations under the License.
|
|
43856
43881
|
*/
|
|
43882
|
+
|
|
43857
43883
|
class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
43858
43884
|
/**
|
|
43859
43885
|
* The type of selection that is allowed in the collection.
|
|
@@ -43936,7 +43962,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
43936
43962
|
let first = null;
|
|
43937
43963
|
for (let key of this.state.selectedKeys){
|
|
43938
43964
|
let item = this.collection.getItem(key);
|
|
43939
|
-
if (!first ||
|
|
43965
|
+
if (!first || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, first) < 0) first = item;
|
|
43940
43966
|
}
|
|
43941
43967
|
return first === null || first === void 0 ? void 0 : first.key;
|
|
43942
43968
|
}
|
|
@@ -43944,7 +43970,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
43944
43970
|
let last = null;
|
|
43945
43971
|
for (let key of this.state.selectedKeys){
|
|
43946
43972
|
let item = this.collection.getItem(key);
|
|
43947
|
-
if (!last ||
|
|
43973
|
+
if (!last || item && ($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, item, last) > 0) last = item;
|
|
43948
43974
|
}
|
|
43949
43975
|
return last === null || last === void 0 ? void 0 : last.key;
|
|
43950
43976
|
}
|
|
@@ -43981,7 +44007,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
43981
44007
|
let fromItem = this.collection.getItem(from);
|
|
43982
44008
|
let toItem = this.collection.getItem(to);
|
|
43983
44009
|
if (fromItem && toItem) {
|
|
43984
|
-
if (
|
|
44010
|
+
if (($c5a24bc478652b5f$export$8c434b3a7a4dad6)(this.collection, fromItem, toItem) <= 0) return this.getKeyRangeInternal(from, to);
|
|
43985
44011
|
return this.getKeyRangeInternal(to, from);
|
|
43986
44012
|
}
|
|
43987
44013
|
return [];
|
|
@@ -44061,9 +44087,7 @@ class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
|
|
|
44061
44087
|
let item = this.collection.getItem(key);
|
|
44062
44088
|
if (item.type === "item") keys.push(key);
|
|
44063
44089
|
// Add child keys. If cell selection is allowed, then include item children too.
|
|
44064
|
-
if (item.hasChildNodes && (this.allowsCellSelection || item.type !== "item")) addKeys(
|
|
44065
|
-
...item.childNodes
|
|
44066
|
-
][0].key);
|
|
44090
|
+
if (item.hasChildNodes && (this.allowsCellSelection || item.type !== "item")) addKeys(($c5a24bc478652b5f$export$fbdeaa6a76694f71)(($c5a24bc478652b5f$export$1005530eda016c13)(item, this.collection)).key);
|
|
44067
44091
|
}
|
|
44068
44092
|
key = this.collection.getKeyAfter(key);
|
|
44069
44093
|
}
|
|
@@ -44195,6 +44219,10 @@ class $a02d57049d202695$export$d085fb9e920b5ca7 {
|
|
|
44195
44219
|
];
|
|
44196
44220
|
return this.getItem(keys[idx]);
|
|
44197
44221
|
}
|
|
44222
|
+
getChildren(key) {
|
|
44223
|
+
let node = this.keyMap.get(key);
|
|
44224
|
+
return (node === null || node === void 0 ? void 0 : node.childNodes) || [];
|
|
44225
|
+
}
|
|
44198
44226
|
constructor(nodes){
|
|
44199
44227
|
(_defineProperty)(this, "keyMap", new Map());
|
|
44200
44228
|
this.iterable = nodes;
|
|
@@ -44515,20 +44543,19 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
|
|
|
44515
44543
|
let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : state.disabledKeys.has(key);
|
|
44516
44544
|
var _props_isSelected;
|
|
44517
44545
|
let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : state.selectionManager.isSelected(key);
|
|
44518
|
-
let isFocused = state.selectionManager.focusedKey === key;
|
|
44519
44546
|
var _props_shouldSelectOnPressUp;
|
|
44520
|
-
let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== void 0 ? _props_shouldSelectOnPressUp : data.shouldSelectOnPressUp;
|
|
44547
|
+
let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== void 0 ? _props_shouldSelectOnPressUp : data === null || data === void 0 ? void 0 : data.shouldSelectOnPressUp;
|
|
44521
44548
|
var _props_shouldFocusOnHover;
|
|
44522
|
-
let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== void 0 ? _props_shouldFocusOnHover : data.shouldFocusOnHover;
|
|
44549
|
+
let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== void 0 ? _props_shouldFocusOnHover : data === null || data === void 0 ? void 0 : data.shouldFocusOnHover;
|
|
44523
44550
|
var _props_shouldUseVirtualFocus;
|
|
44524
|
-
let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== void 0 ? _props_shouldUseVirtualFocus : data.shouldUseVirtualFocus;
|
|
44551
|
+
let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== void 0 ? _props_shouldUseVirtualFocus : data === null || data === void 0 ? void 0 : data.shouldUseVirtualFocus;
|
|
44525
44552
|
var _props_isVirtualized;
|
|
44526
|
-
let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== void 0 ? _props_isVirtualized : data.isVirtualized;
|
|
44553
|
+
let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== void 0 ? _props_isVirtualized : data === null || data === void 0 ? void 0 : data.isVirtualized;
|
|
44527
44554
|
let labelId = ($bdb11010cef70236$export$b4cc09c592e8fdb8)();
|
|
44528
44555
|
let descriptionId = ($bdb11010cef70236$export$b4cc09c592e8fdb8)();
|
|
44529
44556
|
let optionProps = {
|
|
44530
44557
|
role: "option",
|
|
44531
|
-
"aria-disabled": isDisabled,
|
|
44558
|
+
"aria-disabled": isDisabled || undefined,
|
|
44532
44559
|
"aria-selected": state.selectionManager.selectionMode !== "none" ? isSelected : undefined
|
|
44533
44560
|
};
|
|
44534
44561
|
// Safari with VoiceOver on macOS misreads options with aria-labelledby or aria-label as simply "text".
|
|
@@ -44540,10 +44567,12 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
|
|
|
44540
44567
|
optionProps["aria-describedby"] = descriptionId;
|
|
44541
44568
|
}
|
|
44542
44569
|
if (isVirtualized) {
|
|
44543
|
-
|
|
44570
|
+
var _state_collection_getItem;
|
|
44571
|
+
let index = Number((_state_collection_getItem = state.collection.getItem(key)) === null || _state_collection_getItem === void 0 ? void 0 : _state_collection_getItem.index);
|
|
44572
|
+
optionProps["aria-posinset"] = Number.isNaN(index) ? undefined : index + 1;
|
|
44544
44573
|
optionProps["aria-setsize"] = ($453cc9f0df89c0a5$export$77d5aafae4e095b2)(state.collection);
|
|
44545
44574
|
}
|
|
44546
|
-
let { itemProps: itemProps , isPressed: isPressed , hasAction: hasAction , allowsSelection: allowsSelection } = ($880e95eb8b93ba9a$export$ecf600387e221c37)({
|
|
44575
|
+
let { itemProps: itemProps , isPressed: isPressed , isFocused: isFocused , hasAction: hasAction , allowsSelection: allowsSelection } = ($880e95eb8b93ba9a$export$ecf600387e221c37)({
|
|
44547
44576
|
selectionManager: state.selectionManager,
|
|
44548
44577
|
key: key,
|
|
44549
44578
|
ref: ref,
|
|
@@ -44552,7 +44581,10 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
|
|
|
44552
44581
|
isVirtualized: isVirtualized,
|
|
44553
44582
|
shouldUseVirtualFocus: shouldUseVirtualFocus,
|
|
44554
44583
|
isDisabled: isDisabled,
|
|
44555
|
-
onAction: data
|
|
44584
|
+
onAction: (data === null || data === void 0 ? void 0 : data.onAction) ? ()=>{
|
|
44585
|
+
var _data_onAction;
|
|
44586
|
+
return data === null || data === void 0 ? void 0 : (_data_onAction = data.onAction) === null || _data_onAction === void 0 ? void 0 : _data_onAction.call(data, key);
|
|
44587
|
+
} : undefined
|
|
44556
44588
|
});
|
|
44557
44589
|
let { hoverProps: hoverProps } = ($6179b936705e76d3$export$ae780daf29e6d456)({
|
|
44558
44590
|
isDisabled: isDisabled || !shouldFocusOnHover,
|
|
@@ -44576,6 +44608,7 @@ function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
|
|
|
44576
44608
|
id: descriptionId
|
|
44577
44609
|
},
|
|
44578
44610
|
isFocused: isFocused,
|
|
44611
|
+
isFocusVisible: isFocused && ($507fabe10e71c6fb$export$b9b3dfddab17db27)(),
|
|
44579
44612
|
isSelected: isSelected,
|
|
44580
44613
|
isDisabled: isDisabled,
|
|
44581
44614
|
isPressed: isPressed,
|