@bcgov/design-system-react-components 0.6.1-pr652 → 0.7.0-pr653
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 +4 -0
- package/dist/cjs/index.cjs +1278 -728
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1279 -729
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -353,7 +353,7 @@ function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
|
|
356
|
-
|
|
356
|
+
/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
|
|
357
357
|
|
|
358
358
|
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
|
|
359
359
|
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
@@ -377,11 +377,23 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
|
|
|
377
377
|
return activeElement;
|
|
378
378
|
};
|
|
379
379
|
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
380
|
-
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target.shadowRoot) {
|
|
381
|
-
|
|
380
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target instanceof Element && event.target.shadowRoot) {
|
|
381
|
+
var _event_composedPath_, _event_nativeEvent_composedPath_;
|
|
382
|
+
if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
|
|
383
|
+
else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
|
|
382
384
|
}
|
|
383
385
|
return event.target;
|
|
384
386
|
}
|
|
387
|
+
function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
|
|
388
|
+
if (!node) return false;
|
|
389
|
+
// Get the active element within the node's parent shadow root (or the document). Can return null.
|
|
390
|
+
let root = node.getRootNode();
|
|
391
|
+
let ownerWindow = ($431fbd86ca7dc216$export$f21a1ffae260145a)(node);
|
|
392
|
+
if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
|
|
393
|
+
let activeElement = root.activeElement;
|
|
394
|
+
// Check if the active element is within this node. These nodes are within the same shadow root.
|
|
395
|
+
return activeElement != null && node.contains(activeElement);
|
|
396
|
+
}
|
|
385
397
|
|
|
386
398
|
// https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/ShadowTreeWalker.ts
|
|
387
399
|
|
|
@@ -571,6 +583,38 @@ function $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root, whatToShow, filter
|
|
|
571
583
|
return doc.createTreeWalker(root, whatToShow, filter);
|
|
572
584
|
}
|
|
573
585
|
|
|
586
|
+
/*
|
|
587
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
588
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
589
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
590
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
591
|
+
*
|
|
592
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
593
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
594
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
595
|
+
* governing permissions and limitations under the License.
|
|
596
|
+
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
597
|
+
if (refs.length === 1 && refs[0]) return refs[0];
|
|
598
|
+
return (value)=>{
|
|
599
|
+
let hasCleanup = false;
|
|
600
|
+
const cleanups = refs.map((ref)=>{
|
|
601
|
+
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
602
|
+
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
603
|
+
return cleanup;
|
|
604
|
+
});
|
|
605
|
+
if (hasCleanup) return ()=>{
|
|
606
|
+
cleanups.forEach((cleanup, i)=>{
|
|
607
|
+
if (typeof cleanup === 'function') cleanup();
|
|
608
|
+
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
609
|
+
});
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
614
|
+
if (typeof ref === 'function') return ref(value);
|
|
615
|
+
else if (ref != null) ref.current = value;
|
|
616
|
+
}
|
|
617
|
+
|
|
574
618
|
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)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
575
619
|
|
|
576
620
|
/*
|
|
@@ -586,6 +630,7 @@ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else i
|
|
|
586
630
|
*/
|
|
587
631
|
|
|
588
632
|
|
|
633
|
+
|
|
589
634
|
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
590
635
|
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
591
636
|
// with an empty object and adding properties as we go.
|
|
@@ -602,44 +647,13 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
602
647
|
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
603
648
|
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (clsx)(a, b);
|
|
604
649
|
else if (key === 'id' && a && b) result.id = ($bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
650
|
+
else if (key === 'ref' && a && b) result.ref = ($5dc95899b306f630$export$c9058316764c140e)(a, b);
|
|
605
651
|
else result[key] = b !== undefined ? b : a;
|
|
606
652
|
}
|
|
607
653
|
}
|
|
608
654
|
return result;
|
|
609
655
|
}
|
|
610
656
|
|
|
611
|
-
/*
|
|
612
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
613
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
614
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
615
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
616
|
-
*
|
|
617
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
618
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
619
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
620
|
-
* governing permissions and limitations under the License.
|
|
621
|
-
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
622
|
-
if (refs.length === 1 && refs[0]) return refs[0];
|
|
623
|
-
return (value)=>{
|
|
624
|
-
let hasCleanup = false;
|
|
625
|
-
const cleanups = refs.map((ref)=>{
|
|
626
|
-
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
627
|
-
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
628
|
-
return cleanup;
|
|
629
|
-
});
|
|
630
|
-
if (hasCleanup) return ()=>{
|
|
631
|
-
cleanups.forEach((cleanup, i)=>{
|
|
632
|
-
if (typeof cleanup === 'function') cleanup();
|
|
633
|
-
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
634
|
-
});
|
|
635
|
-
};
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
639
|
-
if (typeof ref === 'function') return ref(value);
|
|
640
|
-
else if (ref != null) ref.current = value;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
657
|
/*
|
|
644
658
|
* Copyright 2020 Adobe. All rights reserved.
|
|
645
659
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -974,6 +988,7 @@ function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOption
|
|
|
974
988
|
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
975
989
|
// than one or the other. So we need to track what's actually transitioning so that
|
|
976
990
|
// we can ignore these duplicate events.
|
|
991
|
+
|
|
977
992
|
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
978
993
|
// A list of callbacks to call once there are no transitioning elements.
|
|
979
994
|
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
@@ -983,31 +998,33 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
|
983
998
|
return 'propertyName' in event;
|
|
984
999
|
}
|
|
985
1000
|
let onTransitionStart = (e)=>{
|
|
986
|
-
|
|
1001
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
1002
|
+
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
987
1003
|
// Add the transitioning property to the list for this element.
|
|
988
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
1004
|
+
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
|
|
989
1005
|
if (!transitions) {
|
|
990
1006
|
transitions = new Set();
|
|
991
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(
|
|
1007
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(eventTarget, transitions);
|
|
992
1008
|
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
993
1009
|
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
994
1010
|
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
995
|
-
|
|
1011
|
+
eventTarget.addEventListener('transitioncancel', onTransitionEnd, {
|
|
996
1012
|
once: true
|
|
997
1013
|
});
|
|
998
1014
|
}
|
|
999
1015
|
transitions.add(e.propertyName);
|
|
1000
1016
|
};
|
|
1001
1017
|
let onTransitionEnd = (e)=>{
|
|
1002
|
-
|
|
1018
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
1019
|
+
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
1003
1020
|
// Remove property from list of transitioning properties.
|
|
1004
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
1021
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
|
|
1005
1022
|
if (!properties) return;
|
|
1006
1023
|
properties.delete(e.propertyName);
|
|
1007
1024
|
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
1008
1025
|
if (properties.size === 0) {
|
|
1009
|
-
|
|
1010
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(
|
|
1026
|
+
eventTarget.removeEventListener('transitioncancel', onTransitionEnd);
|
|
1027
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
|
|
1011
1028
|
}
|
|
1012
1029
|
// If no transitioning elements, call all of the queued callbacks.
|
|
1013
1030
|
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
@@ -1335,7 +1352,10 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
1335
1352
|
*/ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1336
1353
|
if (!node) return false;
|
|
1337
1354
|
let style = window.getComputedStyle(node);
|
|
1355
|
+
let root = document.scrollingElement || document.documentElement;
|
|
1338
1356
|
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
1357
|
+
// Root element has `visible` overflow by default, but is scrollable nonetheless.
|
|
1358
|
+
if (node === root && style.overflow !== 'hidden') isScrollable = true;
|
|
1339
1359
|
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
1340
1360
|
return isScrollable;
|
|
1341
1361
|
}
|
|
@@ -1370,12 +1390,13 @@ function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
|
1370
1390
|
* governing permissions and limitations under the License.
|
|
1371
1391
|
*/
|
|
1372
1392
|
function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1393
|
+
let parentElements = [];
|
|
1394
|
+
let root = document.scrollingElement || document.documentElement;
|
|
1395
|
+
do {
|
|
1396
|
+
if (($cc38e7bd3fc7b213$export$2bb74740c4e19def)(node, checkForOverflow)) parentElements.push(node);
|
|
1376
1397
|
node = node.parentElement;
|
|
1377
|
-
}
|
|
1378
|
-
return
|
|
1398
|
+
}while (node && node !== root);
|
|
1399
|
+
return parentElements;
|
|
1379
1400
|
}
|
|
1380
1401
|
|
|
1381
1402
|
/*
|
|
@@ -1422,6 +1443,8 @@ function $21f1aa98acb08317$export$c57958e35f31ed73(target) {
|
|
|
1422
1443
|
*/
|
|
1423
1444
|
|
|
1424
1445
|
|
|
1446
|
+
|
|
1447
|
+
|
|
1425
1448
|
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
1426
1449
|
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
1427
1450
|
let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
|
|
@@ -1430,39 +1453,39 @@ function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
|
1430
1453
|
height: 0
|
|
1431
1454
|
} : $5df64b3807dc15ee$var$getViewportSize());
|
|
1432
1455
|
($dbSRa$react.useEffect)(()=>{
|
|
1433
|
-
|
|
1434
|
-
let onResize = ()=>{
|
|
1435
|
-
// Ignore updates when zoomed.
|
|
1436
|
-
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
1456
|
+
let updateSize = (newSize)=>{
|
|
1437
1457
|
setSize((size)=>{
|
|
1438
|
-
let newSize = $5df64b3807dc15ee$var$getViewportSize();
|
|
1439
1458
|
if (newSize.width === size.width && newSize.height === size.height) return size;
|
|
1440
1459
|
return newSize;
|
|
1441
1460
|
});
|
|
1442
1461
|
};
|
|
1462
|
+
// Use visualViewport api to track available height even on iOS virtual keyboard opening
|
|
1463
|
+
let onResize = ()=>{
|
|
1464
|
+
// Ignore updates when zoomed.
|
|
1465
|
+
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
1466
|
+
updateSize($5df64b3807dc15ee$var$getViewportSize());
|
|
1467
|
+
};
|
|
1443
1468
|
// When closing the keyboard, iOS does not fire the visual viewport resize event until the animation is complete.
|
|
1444
1469
|
// We can anticipate this and resize early by handling the blur event and using the layout size.
|
|
1445
1470
|
let frame;
|
|
1446
1471
|
let onBlur = (e)=>{
|
|
1447
1472
|
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
1448
|
-
if (($21f1aa98acb08317$export$c57958e35f31ed73)(e
|
|
1473
|
+
if (($21f1aa98acb08317$export$c57958e35f31ed73)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) // Wait one frame to see if a new element gets focused.
|
|
1449
1474
|
frame = requestAnimationFrame(()=>{
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
};
|
|
1455
|
-
if (newSize.width === size.width && newSize.height === size.height) return size;
|
|
1456
|
-
return newSize;
|
|
1475
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
1476
|
+
if (!activeElement || !($21f1aa98acb08317$export$c57958e35f31ed73)(activeElement)) updateSize({
|
|
1477
|
+
width: document.documentElement.clientWidth,
|
|
1478
|
+
height: document.documentElement.clientHeight
|
|
1457
1479
|
});
|
|
1458
1480
|
});
|
|
1459
1481
|
};
|
|
1460
|
-
|
|
1482
|
+
updateSize($5df64b3807dc15ee$var$getViewportSize());
|
|
1483
|
+
if (($c87311424ea30a05$export$fedb369cb70207f1)()) window.addEventListener('blur', onBlur, true);
|
|
1461
1484
|
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener('resize', onResize);
|
|
1462
1485
|
else $5df64b3807dc15ee$var$visualViewport.addEventListener('resize', onResize);
|
|
1463
1486
|
return ()=>{
|
|
1464
1487
|
cancelAnimationFrame(frame);
|
|
1465
|
-
window.removeEventListener('blur', onBlur, true);
|
|
1488
|
+
if (($c87311424ea30a05$export$fedb369cb70207f1)()) window.removeEventListener('blur', onBlur, true);
|
|
1466
1489
|
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener('resize', onResize);
|
|
1467
1490
|
else $5df64b3807dc15ee$var$visualViewport.removeEventListener('resize', onResize);
|
|
1468
1491
|
};
|
|
@@ -1472,8 +1495,8 @@ function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
|
1472
1495
|
function $5df64b3807dc15ee$var$getViewportSize() {
|
|
1473
1496
|
return {
|
|
1474
1497
|
// Multiply by the visualViewport scale to get the "natural" size, unaffected by pinch zooming.
|
|
1475
|
-
width: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.width * $5df64b3807dc15ee$var$visualViewport.scale :
|
|
1476
|
-
height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale :
|
|
1498
|
+
width: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.width * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientWidth,
|
|
1499
|
+
height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientHeight
|
|
1477
1500
|
};
|
|
1478
1501
|
}
|
|
1479
1502
|
|
|
@@ -1566,59 +1589,84 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
1566
1589
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1567
1590
|
* governing permissions and limitations under the License.
|
|
1568
1591
|
*/
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1573
|
-
let height = element.offsetHeight;
|
|
1574
|
-
let x = scrollView.scrollLeft;
|
|
1592
|
+
|
|
1593
|
+
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element, opts = {}) {
|
|
1594
|
+
let { block: block = 'nearest', inline: inline = 'nearest' } = opts;
|
|
1595
|
+
if (scrollView === element) return;
|
|
1575
1596
|
let y = scrollView.scrollTop;
|
|
1576
|
-
|
|
1577
|
-
let
|
|
1578
|
-
let
|
|
1579
|
-
let
|
|
1580
|
-
|
|
1581
|
-
let
|
|
1582
|
-
let
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
let
|
|
1586
|
-
let
|
|
1587
|
-
let
|
|
1588
|
-
let
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
let
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1597
|
+
let x = scrollView.scrollLeft;
|
|
1598
|
+
let target = element.getBoundingClientRect();
|
|
1599
|
+
let view = scrollView.getBoundingClientRect();
|
|
1600
|
+
let itemStyle = window.getComputedStyle(element);
|
|
1601
|
+
let viewStyle = window.getComputedStyle(scrollView);
|
|
1602
|
+
let root = document.scrollingElement || document.documentElement;
|
|
1603
|
+
let viewTop = scrollView === root ? 0 : view.top;
|
|
1604
|
+
let viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;
|
|
1605
|
+
let viewLeft = scrollView === root ? 0 : view.left;
|
|
1606
|
+
let viewRight = scrollView === root ? scrollView.clientWidth : view.right;
|
|
1607
|
+
let scrollMarginTop = parseInt(itemStyle.scrollMarginTop, 10) || 0;
|
|
1608
|
+
let scrollMarginBottom = parseInt(itemStyle.scrollMarginBottom, 10) || 0;
|
|
1609
|
+
let scrollMarginLeft = parseInt(itemStyle.scrollMarginLeft, 10) || 0;
|
|
1610
|
+
let scrollMarginRight = parseInt(itemStyle.scrollMarginRight, 10) || 0;
|
|
1611
|
+
let scrollPaddingTop = parseInt(viewStyle.scrollPaddingTop, 10) || 0;
|
|
1612
|
+
let scrollPaddingBottom = parseInt(viewStyle.scrollPaddingBottom, 10) || 0;
|
|
1613
|
+
let scrollPaddingLeft = parseInt(viewStyle.scrollPaddingLeft, 10) || 0;
|
|
1614
|
+
let scrollPaddingRight = parseInt(viewStyle.scrollPaddingRight, 10) || 0;
|
|
1615
|
+
let borderTopWidth = parseInt(viewStyle.borderTopWidth, 10) || 0;
|
|
1616
|
+
let borderBottomWidth = parseInt(viewStyle.borderBottomWidth, 10) || 0;
|
|
1617
|
+
let borderLeftWidth = parseInt(viewStyle.borderLeftWidth, 10) || 0;
|
|
1618
|
+
let borderRightWidth = parseInt(viewStyle.borderRightWidth, 10) || 0;
|
|
1619
|
+
let scrollAreaTop = target.top - scrollMarginTop;
|
|
1620
|
+
let scrollAreaBottom = target.bottom + scrollMarginBottom;
|
|
1621
|
+
let scrollAreaLeft = target.left - scrollMarginLeft;
|
|
1622
|
+
let scrollAreaRight = target.right + scrollMarginRight;
|
|
1623
|
+
let scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;
|
|
1624
|
+
let scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;
|
|
1625
|
+
let scrollBarWidth = scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;
|
|
1626
|
+
let scrollBarHeight = scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;
|
|
1627
|
+
let scrollPortTop = viewTop + borderTopWidth + scrollPaddingTop;
|
|
1628
|
+
let scrollPortBottom = viewBottom - borderBottomWidth - scrollPaddingBottom - scrollBarHeight;
|
|
1629
|
+
let scrollPortLeft = viewLeft + borderLeftWidth + scrollPaddingLeft;
|
|
1630
|
+
let scrollPortRight = viewRight - borderRightWidth - scrollPaddingRight;
|
|
1631
|
+
// IOS always positions the scrollbar on the right ¯\_(ツ)_/¯
|
|
1632
|
+
if (viewStyle.direction === 'rtl' && !($c87311424ea30a05$export$fedb369cb70207f1)()) scrollPortLeft += scrollBarWidth;
|
|
1633
|
+
else scrollPortRight -= scrollBarWidth;
|
|
1634
|
+
let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
|
|
1635
|
+
let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
|
|
1636
|
+
if (shouldScrollBlock && block === 'start') y += scrollAreaTop - scrollPortTop;
|
|
1637
|
+
else if (shouldScrollBlock && block === 'center') y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;
|
|
1638
|
+
else if (shouldScrollBlock && block === 'end') y += scrollAreaBottom - scrollPortBottom;
|
|
1639
|
+
else if (shouldScrollBlock && block === 'nearest') {
|
|
1640
|
+
let start = scrollAreaTop - scrollPortTop;
|
|
1641
|
+
let end = scrollAreaBottom - scrollPortBottom;
|
|
1642
|
+
y += Math.abs(start) <= Math.abs(end) ? start : end;
|
|
1643
|
+
}
|
|
1644
|
+
if (shouldScrollInline && inline === 'start') x += scrollAreaLeft - scrollPortLeft;
|
|
1645
|
+
else if (shouldScrollInline && inline === 'center') x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;
|
|
1646
|
+
else if (shouldScrollInline && inline === 'end') x += scrollAreaRight - scrollPortRight;
|
|
1647
|
+
else if (shouldScrollInline && inline === 'nearest') {
|
|
1648
|
+
let start = scrollAreaLeft - scrollPortLeft;
|
|
1649
|
+
let end = scrollAreaRight - scrollPortRight;
|
|
1650
|
+
x += Math.abs(start) <= Math.abs(end) ? start : end;
|
|
1651
|
+
}
|
|
1652
|
+
if (process.env.NODE_ENV === 'test') {
|
|
1653
|
+
scrollView.scrollLeft = x;
|
|
1654
|
+
scrollView.scrollTop = y;
|
|
1655
|
+
return;
|
|
1613
1656
|
}
|
|
1614
|
-
|
|
1657
|
+
scrollView.scrollTo({
|
|
1658
|
+
left: x,
|
|
1659
|
+
top: y
|
|
1660
|
+
});
|
|
1615
1661
|
}
|
|
1616
|
-
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
1617
|
-
|
|
1662
|
+
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts = {}) {
|
|
1663
|
+
let { containingElement: containingElement } = opts;
|
|
1664
|
+
if (targetElement && targetElement.isConnected) {
|
|
1618
1665
|
let root = document.scrollingElement || document.documentElement;
|
|
1619
1666
|
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
|
|
1620
|
-
// If scrolling is not currently prevented then we aren
|
|
1621
|
-
|
|
1667
|
+
// If scrolling is not currently prevented then we aren't in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view
|
|
1668
|
+
// Also ignore in chrome because of this bug: https://issues.chromium.org/issues/40074749
|
|
1669
|
+
if (!isScrollPrevented && !($c87311424ea30a05$export$6446a186d09e379e)()) {
|
|
1622
1670
|
var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
|
|
1623
1671
|
// won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically
|
|
1624
1672
|
_targetElement_scrollIntoView;
|
|
@@ -1629,8 +1677,8 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
|
1629
1677
|
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1630
1678
|
// Account for sub pixel differences from rounding
|
|
1631
1679
|
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1632
|
-
var
|
|
1633
|
-
|
|
1680
|
+
var _containingElement_scrollIntoView, _targetElement_scrollIntoView1;
|
|
1681
|
+
containingElement === null || containingElement === void 0 ? void 0 : (_containingElement_scrollIntoView = containingElement.scrollIntoView) === null || _containingElement_scrollIntoView === void 0 ? void 0 : _containingElement_scrollIntoView.call(containingElement, {
|
|
1634
1682
|
block: 'center',
|
|
1635
1683
|
inline: 'center'
|
|
1636
1684
|
});
|
|
@@ -1639,10 +1687,19 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
|
1639
1687
|
});
|
|
1640
1688
|
}
|
|
1641
1689
|
} else {
|
|
1642
|
-
let
|
|
1690
|
+
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
1643
1691
|
// If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.
|
|
1644
|
-
|
|
1692
|
+
let scrollParents = ($a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(targetElement, true);
|
|
1645
1693
|
for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
|
|
1694
|
+
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1695
|
+
// Account for sub pixel differences from rounding
|
|
1696
|
+
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1697
|
+
scrollParents = containingElement ? ($a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(containingElement, true) : [];
|
|
1698
|
+
for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, containingElement, {
|
|
1699
|
+
block: 'center',
|
|
1700
|
+
inline: 'center'
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1646
1703
|
}
|
|
1647
1704
|
}
|
|
1648
1705
|
}
|
|
@@ -2082,7 +2139,7 @@ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: c
|
|
|
2082
2139
|
return children;
|
|
2083
2140
|
}
|
|
2084
2141
|
function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
2085
|
-
let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values } = props;
|
|
2142
|
+
let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values, render: render } = props;
|
|
2086
2143
|
return ($dbSRa$react.useMemo)(()=>{
|
|
2087
2144
|
let computedClassName;
|
|
2088
2145
|
let computedStyle;
|
|
@@ -2110,7 +2167,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
2110
2167
|
...computedStyle
|
|
2111
2168
|
} : undefined,
|
|
2112
2169
|
children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
|
|
2113
|
-
'data-rac': ''
|
|
2170
|
+
'data-rac': '',
|
|
2171
|
+
render: render ? (props)=>render(props, values) : undefined
|
|
2114
2172
|
};
|
|
2115
2173
|
}, [
|
|
2116
2174
|
className,
|
|
@@ -2119,7 +2177,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
2119
2177
|
defaultClassName,
|
|
2120
2178
|
defaultChildren,
|
|
2121
2179
|
defaultStyle,
|
|
2122
|
-
values
|
|
2180
|
+
values,
|
|
2181
|
+
render
|
|
2123
2182
|
]);
|
|
2124
2183
|
}
|
|
2125
2184
|
function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
@@ -2201,6 +2260,41 @@ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
|
2201
2260
|
for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
2202
2261
|
return filteredProps;
|
|
2203
2262
|
}
|
|
2263
|
+
function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
|
|
2264
|
+
let { render: render, ...otherProps } = props;
|
|
2265
|
+
let elementRef = ($dbSRa$react.useRef)(null);
|
|
2266
|
+
let ref = ($dbSRa$react.useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(forwardedRef, elementRef), [
|
|
2267
|
+
forwardedRef,
|
|
2268
|
+
elementRef
|
|
2269
|
+
]);
|
|
2270
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
2271
|
+
if (process.env.NODE_ENV !== 'production' && render) {
|
|
2272
|
+
if (!elementRef.current) console.warn('Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?');
|
|
2273
|
+
else if (elementRef.current.localName !== ElementType) console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${ElementType}>, got <${elementRef.current.localName}>. This may break the component behavior and accessibility.`);
|
|
2274
|
+
}
|
|
2275
|
+
}, [
|
|
2276
|
+
ElementType,
|
|
2277
|
+
render
|
|
2278
|
+
]);
|
|
2279
|
+
let domProps = {
|
|
2280
|
+
...otherProps,
|
|
2281
|
+
ref: ref
|
|
2282
|
+
};
|
|
2283
|
+
if (render) return render(domProps, undefined);
|
|
2284
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, domProps);
|
|
2285
|
+
}
|
|
2286
|
+
const $64fa3d84918910a7$var$domComponentCache = {};
|
|
2287
|
+
const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, {
|
|
2288
|
+
get (target, elementType) {
|
|
2289
|
+
if (typeof elementType !== 'string') return undefined;
|
|
2290
|
+
let res = $64fa3d84918910a7$var$domComponentCache[elementType];
|
|
2291
|
+
if (!res) {
|
|
2292
|
+
res = /*#__PURE__*/ ($dbSRa$react.forwardRef)($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
|
|
2293
|
+
$64fa3d84918910a7$var$domComponentCache[elementType] = res;
|
|
2294
|
+
}
|
|
2295
|
+
return res;
|
|
2296
|
+
}
|
|
2297
|
+
});
|
|
2204
2298
|
|
|
2205
2299
|
/*
|
|
2206
2300
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -2631,11 +2725,35 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
|
|
|
2631
2725
|
// Otherwise this returns the height/width of a arbitrary boundary element, and its top/left with respect to the viewport (NOTE THIS MEANS IT DOESNT INCLUDE SCROLL)
|
|
2632
2726
|
let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement, visualViewport);
|
|
2633
2727
|
let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container, visualViewport);
|
|
2634
|
-
//
|
|
2635
|
-
// body
|
|
2636
|
-
//
|
|
2637
|
-
|
|
2638
|
-
|
|
2728
|
+
// There are several difference cases of how to calculate the containerOffsetWithBoundary:
|
|
2729
|
+
// - boundaryElement is body or HTML and the container is an arbitrary element in the boundary (aka submenu with parent menu as container in v3)
|
|
2730
|
+
// - boundaryElement and container are both body or HTML element (aka standard popover case)
|
|
2731
|
+
// - boundaryElement is customized by the user. Container can also be arbitrary (either body/HTML or some other element)
|
|
2732
|
+
// containerOffsetWithBoundary should always return a value that is the boundary's coordinate offset with respect to the container coord system (container is 0, 0)
|
|
2733
|
+
let containerOffsetWithBoundary;
|
|
2734
|
+
if ((boundaryElement.tagName === 'BODY' || boundaryElement.tagName === 'HTML') && !isViewportContainer) {
|
|
2735
|
+
// Use getRect instead of getOffset because boundaryDimensions for BODY/HTML is in viewport coordinate space,
|
|
2736
|
+
// not document coordinate space
|
|
2737
|
+
let containerRect = $edcf132a9284368a$export$4b834cebd9e5cebe(container, false);
|
|
2738
|
+
// the offset should be negative because if container is at viewport position x,y, then viewport top (aka 0)
|
|
2739
|
+
// is at position -x,y in container-relative coordinates
|
|
2740
|
+
containerOffsetWithBoundary = {
|
|
2741
|
+
top: -(containerRect.top - boundaryDimensions.top),
|
|
2742
|
+
left: -(containerRect.left - boundaryDimensions.left),
|
|
2743
|
+
width: 0,
|
|
2744
|
+
height: 0
|
|
2745
|
+
};
|
|
2746
|
+
} else if ((boundaryElement.tagName === 'BODY' || boundaryElement.tagName === 'HTML') && isViewportContainer) // both are the same viewport container, no offset needed
|
|
2747
|
+
containerOffsetWithBoundary = {
|
|
2748
|
+
top: 0,
|
|
2749
|
+
left: 0,
|
|
2750
|
+
width: 0,
|
|
2751
|
+
height: 0
|
|
2752
|
+
};
|
|
2753
|
+
else // This returns the boundary's coordinate with respect to the container. This case captures cases such as when you provide a custom boundary
|
|
2754
|
+
// like in ScrollingBoundaryContainerExample in Popover.stories.
|
|
2755
|
+
containerOffsetWithBoundary = $edcf132a9284368a$var$getPosition(boundaryElement, container, false);
|
|
2756
|
+
let isContainerDescendentOfBoundary = ($d4ee10de306f2510$export$4282f70798064fe0)(boundaryElement, container);
|
|
2639
2757
|
return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport);
|
|
2640
2758
|
}
|
|
2641
2759
|
function $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale) {
|
|
@@ -2719,6 +2837,7 @@ function $edcf132a9284368a$var$isContainingBlock(node) {
|
|
|
2719
2837
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
2720
2838
|
* governing permissions and limitations under the License.
|
|
2721
2839
|
*/
|
|
2840
|
+
|
|
2722
2841
|
const $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();
|
|
2723
2842
|
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
2724
2843
|
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
|
|
@@ -2726,13 +2845,13 @@ function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
|
2726
2845
|
if (!isOpen || onClose === null) return;
|
|
2727
2846
|
let onScroll = (e)=>{
|
|
2728
2847
|
// Ignore if scrolling an scrollable region outside the trigger's tree.
|
|
2729
|
-
let target = e
|
|
2848
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2730
2849
|
// window is not a Node and doesn't have contain, but window contains everything
|
|
2731
|
-
if (!triggerRef.current || target instanceof Node && !target
|
|
2850
|
+
if (!triggerRef.current || target instanceof Node && !($d4ee10de306f2510$export$4282f70798064fe0)(target, triggerRef.current)) return;
|
|
2732
2851
|
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
|
|
2733
2852
|
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
|
|
2734
2853
|
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
|
|
2735
|
-
if (
|
|
2854
|
+
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return;
|
|
2736
2855
|
let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
|
|
2737
2856
|
if (onCloseHandler) onCloseHandler();
|
|
2738
2857
|
};
|
|
@@ -3217,6 +3336,12 @@ class $3b62074eb05584b2$export$80ee6245ec4f29ec {
|
|
|
3217
3336
|
getDaysInYear(date) {
|
|
3218
3337
|
return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
|
|
3219
3338
|
}
|
|
3339
|
+
getMaximumMonthsInYear() {
|
|
3340
|
+
return 12;
|
|
3341
|
+
}
|
|
3342
|
+
getMaximumDaysInMonth() {
|
|
3343
|
+
return 31;
|
|
3344
|
+
}
|
|
3220
3345
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3221
3346
|
getYearsInEra(date) {
|
|
3222
3347
|
return 9999;
|
|
@@ -3419,10 +3544,14 @@ function $14e0f24ef4ac5c92$var$timeToMs(a) {
|
|
|
3419
3544
|
return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
|
|
3420
3545
|
}
|
|
3421
3546
|
let $14e0f24ef4ac5c92$var$localTimeZone = null;
|
|
3547
|
+
let $14e0f24ef4ac5c92$var$localTimeZoneOverride = false;
|
|
3422
3548
|
function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
|
|
3423
3549
|
if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3424
3550
|
return $14e0f24ef4ac5c92$var$localTimeZone;
|
|
3425
3551
|
}
|
|
3552
|
+
function $14e0f24ef4ac5c92$export$6ab69b273755230b() {
|
|
3553
|
+
return $14e0f24ef4ac5c92$var$localTimeZoneOverride;
|
|
3554
|
+
}
|
|
3426
3555
|
function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date) {
|
|
3427
3556
|
// Use `subtract` instead of `set` so we don't get constrained in an era.
|
|
3428
3557
|
return date.subtract({
|
|
@@ -3439,14 +3568,6 @@ function $14e0f24ef4ac5c92$export$f91e89d3d0406102(date) {
|
|
|
3439
3568
|
months: date.month - 1
|
|
3440
3569
|
}));
|
|
3441
3570
|
}
|
|
3442
|
-
function $14e0f24ef4ac5c92$export$5412ac11713b72ad(date) {
|
|
3443
|
-
if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);
|
|
3444
|
-
return 1;
|
|
3445
|
-
}
|
|
3446
|
-
function $14e0f24ef4ac5c92$export$b2f4953d301981d5(date) {
|
|
3447
|
-
if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);
|
|
3448
|
-
return 1;
|
|
3449
|
-
}
|
|
3450
3571
|
function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek) {
|
|
3451
3572
|
let dayOfWeek = $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale, firstDayOfWeek);
|
|
3452
3573
|
return date.subtract({
|
|
@@ -3579,7 +3700,9 @@ function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
|
|
|
3579
3700
|
// Fast path for UTC.
|
|
3580
3701
|
if (timeZone === 'UTC') return 0;
|
|
3581
3702
|
// Fast path: for local timezone after 1970, use native Date.
|
|
3582
|
-
|
|
3703
|
+
// Skip this fast path if the local timezone was explicitly overridden via setLocalTimeZone,
|
|
3704
|
+
// since native Date always uses the browser's timezone, not the overridden one.
|
|
3705
|
+
if (ms > 0 && timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && !($14e0f24ef4ac5c92$export$6ab69b273755230b)()) return new Date(ms).getTimezoneOffset() * -6e4;
|
|
3583
3706
|
let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
|
|
3584
3707
|
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
|
|
3585
3708
|
return utc - Math.floor(ms / 1000) * 1000;
|
|
@@ -3633,7 +3756,9 @@ function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguatio
|
|
|
3633
3756
|
// Fast path: if the time zone is UTC, use native Date.
|
|
3634
3757
|
if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
3635
3758
|
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
|
|
3636
|
-
if
|
|
3759
|
+
// Skip this fast path if the local timezone was explicitly overridden via setLocalTimeZone,
|
|
3760
|
+
// since native Date always uses the browser's timezone, not the overridden one.
|
|
3761
|
+
if (timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible' && !($14e0f24ef4ac5c92$export$6ab69b273755230b)()) {
|
|
3637
3762
|
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
3638
3763
|
// Don't use Date constructor here because two-digit years are interpreted in the 20th century.
|
|
3639
3764
|
let date = new Date();
|
|
@@ -3724,6 +3849,9 @@ function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
|
|
|
3724
3849
|
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
|
|
3725
3850
|
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
|
|
3726
3851
|
}
|
|
3852
|
+
function $11d87f3f76e88657$export$d9b67bc93c097491(date) {
|
|
3853
|
+
return $11d87f3f76e88657$export$538b00033cc11c75(date, ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
|
|
3854
|
+
}
|
|
3727
3855
|
|
|
3728
3856
|
/*
|
|
3729
3857
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -4708,6 +4836,12 @@ class $f3ed2e4472ae7e25$export$37fccdbfd14c5939 {
|
|
|
4708
4836
|
let isLeapYear = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(25 * date.year + 11, 33) < 8;
|
|
4709
4837
|
return isLeapYear ? 30 : 29;
|
|
4710
4838
|
}
|
|
4839
|
+
getMaximumMonthsInYear() {
|
|
4840
|
+
return 12;
|
|
4841
|
+
}
|
|
4842
|
+
getMaximumDaysInMonth() {
|
|
4843
|
+
return 31;
|
|
4844
|
+
}
|
|
4711
4845
|
getEras() {
|
|
4712
4846
|
return [
|
|
4713
4847
|
'AP'
|
|
@@ -4866,6 +5000,12 @@ class $f2f3e0e3a817edbd$export$2066795aadd37bfc {
|
|
|
4866
5000
|
getDaysInYear(date) {
|
|
4867
5001
|
return $f2f3e0e3a817edbd$var$isLeapYear(date.year) ? 355 : 354;
|
|
4868
5002
|
}
|
|
5003
|
+
getMaximumMonthsInYear() {
|
|
5004
|
+
return 12;
|
|
5005
|
+
}
|
|
5006
|
+
getMaximumDaysInMonth() {
|
|
5007
|
+
return 30;
|
|
5008
|
+
}
|
|
4869
5009
|
getYearsInEra() {
|
|
4870
5010
|
// 9999 gregorian
|
|
4871
5011
|
return 9665;
|
|
@@ -5085,6 +5225,12 @@ class $7c5f6fbf42389787$export$ca405048b8fb5af {
|
|
|
5085
5225
|
getDaysInYear(date) {
|
|
5086
5226
|
return $7c5f6fbf42389787$var$getDaysInYear(date.year);
|
|
5087
5227
|
}
|
|
5228
|
+
getMaximumMonthsInYear() {
|
|
5229
|
+
return 13;
|
|
5230
|
+
}
|
|
5231
|
+
getMaximumDaysInMonth() {
|
|
5232
|
+
return 30;
|
|
5233
|
+
}
|
|
5088
5234
|
getYearsInEra() {
|
|
5089
5235
|
// 6239 gregorian
|
|
5090
5236
|
return 9999;
|
|
@@ -5180,6 +5326,12 @@ class $b956b2d7a6cf451f$export$26ba6eab5e20cd7d {
|
|
|
5180
5326
|
getDaysInYear(date) {
|
|
5181
5327
|
return 365 + $b956b2d7a6cf451f$var$getLeapDay(date.year);
|
|
5182
5328
|
}
|
|
5329
|
+
getMaximumMonthsInYear() {
|
|
5330
|
+
return 13;
|
|
5331
|
+
}
|
|
5332
|
+
getMaximumDaysInMonth() {
|
|
5333
|
+
return 30;
|
|
5334
|
+
}
|
|
5183
5335
|
getYearsInEra(date) {
|
|
5184
5336
|
// 9999-12-31 gregorian is 9992-20-02 ethiopic.
|
|
5185
5337
|
// Round down to 9991 for the last full year.
|
|
@@ -6059,9 +6211,9 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6059
6211
|
// so it can be restored after repositioning. This way if the overlay height
|
|
6060
6212
|
// changes, the focused element appears to stay in the same position.
|
|
6061
6213
|
let anchor = null;
|
|
6062
|
-
if (scrollRef.current && scrollRef.current
|
|
6063
|
-
var
|
|
6064
|
-
let anchorRect = (
|
|
6214
|
+
if (scrollRef.current && ($d4ee10de306f2510$export$b4f377a2b6254582)(scrollRef.current)) {
|
|
6215
|
+
var _getActiveElement;
|
|
6216
|
+
let anchorRect = (_getActiveElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)()) === null || _getActiveElement === void 0 ? void 0 : _getActiveElement.getBoundingClientRect();
|
|
6065
6217
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6066
6218
|
var _anchorRect_top;
|
|
6067
6219
|
// Anchor from the top if the offset is in the top half of the scrollable element,
|
|
@@ -6110,8 +6262,9 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6110
6262
|
Object.keys(position.position).forEach((key)=>overlay.style[key] = position.position[key] + 'px');
|
|
6111
6263
|
overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' : '';
|
|
6112
6264
|
// Restore scroll position relative to anchor element.
|
|
6113
|
-
|
|
6114
|
-
|
|
6265
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
6266
|
+
if (anchor && activeElement && scrollRef.current) {
|
|
6267
|
+
let anchorRect = activeElement.getBoundingClientRect();
|
|
6115
6268
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6116
6269
|
let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
|
|
6117
6270
|
scrollRef.current.scrollTop += newOffset - anchor.offset;
|
|
@@ -6265,9 +6418,10 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
6265
6418
|
// Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
|
|
6266
6419
|
// MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
|
|
6267
6420
|
// For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
|
|
6268
|
-
|
|
6421
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
6422
|
+
if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
|
|
6269
6423
|
stateRef.current.isFocused = true;
|
|
6270
|
-
let target =
|
|
6424
|
+
let target = eventTarget;
|
|
6271
6425
|
let onBlurHandler = (e)=>{
|
|
6272
6426
|
stateRef.current.isFocused = false;
|
|
6273
6427
|
if (target.disabled) {
|
|
@@ -6288,7 +6442,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
6288
6442
|
if (stateRef.current.isFocused && target.disabled) {
|
|
6289
6443
|
var _stateRef_current_observer;
|
|
6290
6444
|
(_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
|
|
6291
|
-
let relatedTargetEl = target ===
|
|
6445
|
+
let relatedTargetEl = target === ($d4ee10de306f2510$export$cd4e5573fbe2b576)() ? null : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
6292
6446
|
target.dispatchEvent(new FocusEvent('blur', {
|
|
6293
6447
|
relatedTarget: relatedTargetEl
|
|
6294
6448
|
}));
|
|
@@ -6319,10 +6473,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
6319
6473
|
$8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
|
|
6320
6474
|
let isRefocusing = false;
|
|
6321
6475
|
let onBlur = (e)=>{
|
|
6322
|
-
if (e
|
|
6476
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === activeElement || isRefocusing) e.stopImmediatePropagation();
|
|
6323
6477
|
};
|
|
6324
6478
|
let onFocusOut = (e)=>{
|
|
6325
|
-
if (e
|
|
6479
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === activeElement || isRefocusing) {
|
|
6326
6480
|
e.stopImmediatePropagation();
|
|
6327
6481
|
// If there was no focusable ancestor, we don't expect a focus event.
|
|
6328
6482
|
// Re-focus the original active element here.
|
|
@@ -6334,10 +6488,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
6334
6488
|
}
|
|
6335
6489
|
};
|
|
6336
6490
|
let onFocus = (e)=>{
|
|
6337
|
-
if (e
|
|
6491
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === target || isRefocusing) e.stopImmediatePropagation();
|
|
6338
6492
|
};
|
|
6339
6493
|
let onFocusIn = (e)=>{
|
|
6340
|
-
if (e
|
|
6494
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === target || isRefocusing) {
|
|
6341
6495
|
e.stopImmediatePropagation();
|
|
6342
6496
|
if (!isRefocusing) {
|
|
6343
6497
|
isRefocusing = true;
|
|
@@ -6508,7 +6662,9 @@ function $f6c31cce2adf654f$var$usePressResponderContext(props) {
|
|
|
6508
6662
|
// Consume context from <PressResponder> and merge with props.
|
|
6509
6663
|
let context = ($dbSRa$react.useContext)(($ae1eeba8b9eafd08$export$5165eccb35aaadb5));
|
|
6510
6664
|
if (context) {
|
|
6511
|
-
|
|
6665
|
+
// Prevent mergeProps from merging ref.
|
|
6666
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6667
|
+
let { register: register, ref: ref, ...contextProps } = context;
|
|
6512
6668
|
props = ($3ef42575df84b30b$export$9d1611c77c2fe928)(contextProps, props);
|
|
6513
6669
|
register();
|
|
6514
6670
|
}
|
|
@@ -6556,6 +6712,7 @@ class $f6c31cce2adf654f$var$PressEvent {
|
|
|
6556
6712
|
this.altKey = originalEvent.altKey;
|
|
6557
6713
|
this.x = x;
|
|
6558
6714
|
this.y = y;
|
|
6715
|
+
this.key = originalEvent.key;
|
|
6559
6716
|
}
|
|
6560
6717
|
}
|
|
6561
6718
|
const $f6c31cce2adf654f$var$LINK_CLICKED = Symbol('linkClicked');
|
|
@@ -6699,7 +6856,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6699
6856
|
var _state_metaKeyEvents1;
|
|
6700
6857
|
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();
|
|
6701
6858
|
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
6702
|
-
let wasPressed = ($d4ee10de306f2510$export$4282f70798064fe0)(state.target,
|
|
6859
|
+
let wasPressed = ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, target);
|
|
6703
6860
|
triggerPressEndEvent($f6c31cce2adf654f$var$createEvent(state.target, e), 'keyboard', wasPressed);
|
|
6704
6861
|
if (wasPressed) triggerSyntheticClickEvent(e, state.target);
|
|
6705
6862
|
removeAllGlobalListeners();
|
|
@@ -6773,7 +6930,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6773
6930
|
}, 80);
|
|
6774
6931
|
// Use a capturing listener to track if a click occurred.
|
|
6775
6932
|
// If stopPropagation is called it may never reach our handler.
|
|
6776
|
-
addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
|
|
6933
|
+
if (e.currentTarget) addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
|
|
6777
6934
|
state.disposables.push(()=>clearTimeout(timeout));
|
|
6778
6935
|
} else cancelEvent(e);
|
|
6779
6936
|
// Ignore subsequent onPointerLeave event before onClick on touch devices.
|
|
@@ -6797,7 +6954,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6797
6954
|
state.ignoreEmulatedMouseEvents = false;
|
|
6798
6955
|
return;
|
|
6799
6956
|
}
|
|
6800
|
-
if (state.target && state.target
|
|
6957
|
+
if (state.target && ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e.target) && state.pointerType != null) ;
|
|
6801
6958
|
else cancelEvent(e);
|
|
6802
6959
|
state.isOverTarget = false;
|
|
6803
6960
|
};
|
|
@@ -6829,9 +6986,9 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6829
6986
|
let state = ref.current;
|
|
6830
6987
|
let pressProps = {
|
|
6831
6988
|
onKeyDown (e) {
|
|
6832
|
-
if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
6989
|
+
if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
6833
6990
|
var _state_metaKeyEvents;
|
|
6834
|
-
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
6991
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();
|
|
6835
6992
|
// If the event is repeating, it may have started on a different element
|
|
6836
6993
|
// after which focus moved to the current element. Ignore these events and
|
|
6837
6994
|
// only handle the first key down event.
|
|
@@ -6855,7 +7012,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6855
7012
|
} else if (e.key === 'Meta') state.metaKeyEvents = new Map();
|
|
6856
7013
|
},
|
|
6857
7014
|
onClick (e) {
|
|
6858
|
-
if (e && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7015
|
+
if (e && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6859
7016
|
if (e && e.button === 0 && !state.isTriggeringEvent && !($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening) {
|
|
6860
7017
|
let shouldStopPropagation = true;
|
|
6861
7018
|
if (isDisabled) e.preventDefault();
|
|
@@ -6884,7 +7041,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6884
7041
|
if (typeof PointerEvent !== 'undefined') {
|
|
6885
7042
|
pressProps.onPointerDown = (e)=>{
|
|
6886
7043
|
// Only handle left clicks, and ignore events that bubbled through portals.
|
|
6887
|
-
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7044
|
+
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6888
7045
|
// iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.
|
|
6889
7046
|
// Ignore and let the onClick handler take care of it instead.
|
|
6890
7047
|
// https://bugs.webkit.org/show_bug.cgi?id=222627
|
|
@@ -6905,13 +7062,17 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6905
7062
|
shouldStopPropagation = triggerPressStart(e, state.pointerType);
|
|
6906
7063
|
// Release pointer capture so that touch interactions can leave the original target.
|
|
6907
7064
|
// This enables onPointerLeave and onPointerEnter to fire.
|
|
6908
|
-
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
6909
|
-
if ('releasePointerCapture' in target)
|
|
7065
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7066
|
+
if ('releasePointerCapture' in target) {
|
|
7067
|
+
if ('hasPointerCapture' in target) {
|
|
7068
|
+
if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);
|
|
7069
|
+
} else target.releasePointerCapture(e.pointerId);
|
|
7070
|
+
}
|
|
6910
7071
|
}
|
|
6911
7072
|
if (shouldStopPropagation) e.stopPropagation();
|
|
6912
7073
|
};
|
|
6913
7074
|
pressProps.onMouseDown = (e)=>{
|
|
6914
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7075
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6915
7076
|
if (e.button === 0) {
|
|
6916
7077
|
if (preventFocusOnPress) {
|
|
6917
7078
|
let dispose = ($8a9cb279dc87e130$export$cabe61c495ee3649)(e.target);
|
|
@@ -6922,7 +7083,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6922
7083
|
};
|
|
6923
7084
|
pressProps.onPointerUp = (e)=>{
|
|
6924
7085
|
// iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.
|
|
6925
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7086
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || state.pointerType === 'virtual') return;
|
|
6926
7087
|
// Only handle left clicks. If isPressed is true, delay until onClick.
|
|
6927
7088
|
if (e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || e.pointerType);
|
|
6928
7089
|
};
|
|
@@ -6940,7 +7101,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6940
7101
|
}
|
|
6941
7102
|
};
|
|
6942
7103
|
pressProps.onDragStart = (e)=>{
|
|
6943
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7104
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6944
7105
|
// Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.
|
|
6945
7106
|
cancel(e);
|
|
6946
7107
|
};
|
|
@@ -6949,7 +7110,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6949
7110
|
// All browsers now support pointer events, but JSDOM still does not.
|
|
6950
7111
|
pressProps.onMouseDown = (e)=>{
|
|
6951
7112
|
// Only handle left clicks
|
|
6952
|
-
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7113
|
+
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6953
7114
|
if (state.ignoreEmulatedMouseEvents) {
|
|
6954
7115
|
e.stopPropagation();
|
|
6955
7116
|
return;
|
|
@@ -6968,7 +7129,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6968
7129
|
}
|
|
6969
7130
|
};
|
|
6970
7131
|
pressProps.onMouseEnter = (e)=>{
|
|
6971
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7132
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6972
7133
|
let shouldStopPropagation = true;
|
|
6973
7134
|
if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
|
|
6974
7135
|
state.isOverTarget = true;
|
|
@@ -6977,7 +7138,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6977
7138
|
if (shouldStopPropagation) e.stopPropagation();
|
|
6978
7139
|
};
|
|
6979
7140
|
pressProps.onMouseLeave = (e)=>{
|
|
6980
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7141
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6981
7142
|
let shouldStopPropagation = true;
|
|
6982
7143
|
if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
|
|
6983
7144
|
state.isOverTarget = false;
|
|
@@ -6987,11 +7148,11 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6987
7148
|
if (shouldStopPropagation) e.stopPropagation();
|
|
6988
7149
|
};
|
|
6989
7150
|
pressProps.onMouseUp = (e)=>{
|
|
6990
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7151
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6991
7152
|
if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || 'mouse');
|
|
6992
7153
|
};
|
|
6993
7154
|
pressProps.onTouchStart = (e)=>{
|
|
6994
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7155
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6995
7156
|
let touch = $f6c31cce2adf654f$var$getTouchFromEvent(e.nativeEvent);
|
|
6996
7157
|
if (!touch) return;
|
|
6997
7158
|
state.activePointerId = touch.identifier;
|
|
@@ -7006,7 +7167,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
7006
7167
|
if (shouldStopPropagation) e.stopPropagation();
|
|
7007
7168
|
};
|
|
7008
7169
|
pressProps.onTouchMove = (e)=>{
|
|
7009
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7170
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7010
7171
|
if (!state.isPressed) {
|
|
7011
7172
|
e.stopPropagation();
|
|
7012
7173
|
return;
|
|
@@ -7026,7 +7187,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
7026
7187
|
if (shouldStopPropagation) e.stopPropagation();
|
|
7027
7188
|
};
|
|
7028
7189
|
pressProps.onTouchEnd = (e)=>{
|
|
7029
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7190
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7030
7191
|
if (!state.isPressed) {
|
|
7031
7192
|
e.stopPropagation();
|
|
7032
7193
|
return;
|
|
@@ -7048,12 +7209,12 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
7048
7209
|
removeAllGlobalListeners();
|
|
7049
7210
|
};
|
|
7050
7211
|
pressProps.onTouchCancel = (e)=>{
|
|
7051
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7212
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7052
7213
|
e.stopPropagation();
|
|
7053
7214
|
if (state.isPressed) cancel($f6c31cce2adf654f$var$createTouchEvent(state.target, e));
|
|
7054
7215
|
};
|
|
7055
7216
|
pressProps.onDragStart = (e)=>{
|
|
7056
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7217
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7057
7218
|
cancel(e);
|
|
7058
7219
|
};
|
|
7059
7220
|
}
|
|
@@ -7163,7 +7324,8 @@ function $f6c31cce2adf654f$var$createEvent(target, e) {
|
|
|
7163
7324
|
metaKey: e.metaKey,
|
|
7164
7325
|
altKey: e.altKey,
|
|
7165
7326
|
clientX: clientX,
|
|
7166
|
-
clientY: clientY
|
|
7327
|
+
clientY: clientY,
|
|
7328
|
+
key: e.key
|
|
7167
7329
|
};
|
|
7168
7330
|
}
|
|
7169
7331
|
function $f6c31cce2adf654f$var$getPointClientRect(point) {
|
|
@@ -7237,7 +7399,7 @@ function $f6c31cce2adf654f$var$isValidInputKey(target, key) {
|
|
|
7237
7399
|
|
|
7238
7400
|
|
|
7239
7401
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
7240
|
-
|
|
7402
|
+
const $507fabe10e71c6fb$export$901e90a13c50a14e = new Set();
|
|
7241
7403
|
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
7242
7404
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
7243
7405
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
@@ -7247,7 +7409,7 @@ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
|
|
|
7247
7409
|
Escape: true
|
|
7248
7410
|
};
|
|
7249
7411
|
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
7250
|
-
for (let handler of $507fabe10e71c6fb$
|
|
7412
|
+
for (let handler of $507fabe10e71c6fb$export$901e90a13c50a14e)handler(modality, e);
|
|
7251
7413
|
}
|
|
7252
7414
|
/**
|
|
7253
7415
|
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
|
|
@@ -7280,7 +7442,7 @@ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
|
|
|
7280
7442
|
// Firefox fires two extra focus events when the user first clicks into an iframe:
|
|
7281
7443
|
// first on the window, then on the document. We ignore these events so they don't
|
|
7282
7444
|
// cause keyboard focus rings to appear.
|
|
7283
|
-
if (e
|
|
7445
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === window || ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
|
|
7284
7446
|
// If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
|
|
7285
7447
|
// This occurs, for example, when navigating a form with the next/previous buttons on iOS.
|
|
7286
7448
|
if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
|
|
@@ -7392,9 +7554,9 @@ function $507fabe10e71c6fb$export$98e20ec92f614cfe() {
|
|
|
7392
7554
|
let handler = ()=>{
|
|
7393
7555
|
setModality($507fabe10e71c6fb$var$currentModality);
|
|
7394
7556
|
};
|
|
7395
|
-
$507fabe10e71c6fb$
|
|
7557
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
|
|
7396
7558
|
return ()=>{
|
|
7397
|
-
$507fabe10e71c6fb$
|
|
7559
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
|
|
7398
7560
|
};
|
|
7399
7561
|
}, []);
|
|
7400
7562
|
return ($b5e257d569688ac6$export$535bd6ca7f90a273)() ? null : modality;
|
|
@@ -7414,27 +7576,30 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
7414
7576
|
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
|
|
7415
7577
|
* focus visible style can be properly set.
|
|
7416
7578
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
7417
|
-
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e
|
|
7418
|
-
|
|
7419
|
-
const
|
|
7420
|
-
const
|
|
7421
|
-
const
|
|
7579
|
+
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) : undefined);
|
|
7580
|
+
let eventTarget = e ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) : undefined;
|
|
7581
|
+
const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLInputElement : HTMLInputElement;
|
|
7582
|
+
const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
7583
|
+
const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLElement : HTMLElement;
|
|
7584
|
+
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).KeyboardEvent : KeyboardEvent;
|
|
7422
7585
|
// For keyboard events that occur on a non-input element that will move focus into input element (aka ArrowLeft going from Datepicker button to the main input group)
|
|
7423
7586
|
// we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
|
|
7424
|
-
|
|
7587
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(document1);
|
|
7588
|
+
isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;
|
|
7425
7589
|
return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
7426
7590
|
}
|
|
7427
7591
|
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
7428
7592
|
$507fabe10e71c6fb$var$setupGlobalFocusEvents();
|
|
7429
7593
|
($dbSRa$react.useEffect)(()=>{
|
|
7594
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;
|
|
7430
7595
|
let handler = (modality, e)=>{
|
|
7431
7596
|
// We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
|
|
7432
7597
|
if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
|
|
7433
7598
|
fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
|
|
7434
7599
|
};
|
|
7435
|
-
$507fabe10e71c6fb$
|
|
7600
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
|
|
7436
7601
|
return ()=>{
|
|
7437
|
-
$507fabe10e71c6fb$
|
|
7602
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
|
|
7438
7603
|
};
|
|
7439
7604
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7440
7605
|
}, deps);
|
|
@@ -7453,6 +7618,7 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
7453
7618
|
*/
|
|
7454
7619
|
|
|
7455
7620
|
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
7621
|
+
if (!element.isConnected) return;
|
|
7456
7622
|
// If the user is interacting with a virtual cursor, e.g. screen reader, then
|
|
7457
7623
|
// wait until after any animated transitions that are currently occurring on
|
|
7458
7624
|
// the page before shifting focus. This avoids issues with VoiceOver on iOS
|
|
@@ -7489,7 +7655,7 @@ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
|
7489
7655
|
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
7490
7656
|
let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
|
|
7491
7657
|
const onBlur = ($dbSRa$react.useCallback)((e)=>{
|
|
7492
|
-
if (e
|
|
7658
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === e.currentTarget) {
|
|
7493
7659
|
if (onBlurProp) onBlurProp(e);
|
|
7494
7660
|
if (onFocusChange) onFocusChange(false);
|
|
7495
7661
|
return true;
|
|
@@ -7502,9 +7668,10 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
7502
7668
|
const onFocus = ($dbSRa$react.useCallback)((e)=>{
|
|
7503
7669
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
7504
7670
|
// focus handler already moved focus somewhere else.
|
|
7505
|
-
|
|
7671
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7672
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
7506
7673
|
const activeElement = ownerDocument ? ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
7507
|
-
if (
|
|
7674
|
+
if (eventTarget === e.currentTarget && eventTarget === activeElement) {
|
|
7508
7675
|
if (onFocusProp) onFocusProp(e);
|
|
7509
7676
|
if (onFocusChange) onFocusChange(true);
|
|
7510
7677
|
onSyntheticFocus(e);
|
|
@@ -7654,16 +7821,15 @@ function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
|
|
|
7654
7821
|
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ ($dbSRa$react).forwardRef(({ children: children, ...props }, ref)=>{
|
|
7655
7822
|
let isRegistered = ($dbSRa$react.useRef)(false);
|
|
7656
7823
|
let prevContext = ($dbSRa$react.useContext)(($ae1eeba8b9eafd08$export$5165eccb35aaadb5));
|
|
7657
|
-
ref = ($df56164dff5785e2$export$4338b53315abf666)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
7658
7824
|
let context = ($3ef42575df84b30b$export$9d1611c77c2fe928)(prevContext || {}, {
|
|
7659
7825
|
...props,
|
|
7660
|
-
ref: ref,
|
|
7661
7826
|
register () {
|
|
7662
7827
|
isRegistered.current = true;
|
|
7663
7828
|
if (prevContext) prevContext.register();
|
|
7664
7829
|
}
|
|
7665
7830
|
});
|
|
7666
|
-
($
|
|
7831
|
+
context.ref = ($df56164dff5785e2$export$4338b53315abf666)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
7832
|
+
($e7801be82b4b2a53$export$4debdb1a3f0fa79e)(prevContext, context.ref);
|
|
7667
7833
|
($dbSRa$react.useEffect)(()=>{
|
|
7668
7834
|
if (!isRegistered.current) {
|
|
7669
7835
|
if (process.env.NODE_ENV !== 'production') console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
|
|
@@ -7708,11 +7874,11 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
7708
7874
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
7709
7875
|
let onBlur = ($dbSRa$react.useCallback)((e)=>{
|
|
7710
7876
|
// Ignore events bubbling through portals.
|
|
7711
|
-
if (!e.currentTarget
|
|
7877
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7712
7878
|
// We don't want to trigger onBlurWithin and then immediately onFocusWithin again
|
|
7713
7879
|
// when moving focus inside the element. Only trigger if the currentTarget doesn't
|
|
7714
7880
|
// include the relatedTarget (where focus is moving).
|
|
7715
|
-
if (state.current.isFocusWithin && !e.currentTarget
|
|
7881
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) {
|
|
7716
7882
|
state.current.isFocusWithin = false;
|
|
7717
7883
|
removeAllGlobalListeners();
|
|
7718
7884
|
if (onBlurWithin) onBlurWithin(e);
|
|
@@ -7727,12 +7893,13 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
7727
7893
|
let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
7728
7894
|
let onFocus = ($dbSRa$react.useCallback)((e)=>{
|
|
7729
7895
|
// Ignore events bubbling through portals.
|
|
7730
|
-
if (!e.currentTarget
|
|
7896
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7731
7897
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
7732
7898
|
// focus handler already moved focus somewhere else.
|
|
7733
|
-
|
|
7899
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7900
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
7734
7901
|
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
7735
|
-
if (!state.current.isFocusWithin && activeElement ===
|
|
7902
|
+
if (!state.current.isFocusWithin && activeElement === eventTarget) {
|
|
7736
7903
|
if (onFocusWithin) onFocusWithin(e);
|
|
7737
7904
|
if (onFocusWithinChange) onFocusWithinChange(true);
|
|
7738
7905
|
state.current.isFocusWithin = true;
|
|
@@ -7742,9 +7909,10 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
7742
7909
|
// can manually fire onBlur.
|
|
7743
7910
|
let currentTarget = e.currentTarget;
|
|
7744
7911
|
addGlobalListener(ownerDocument, 'focus', (e)=>{
|
|
7745
|
-
|
|
7912
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7913
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, eventTarget)) {
|
|
7746
7914
|
let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
|
|
7747
|
-
relatedTarget:
|
|
7915
|
+
relatedTarget: eventTarget
|
|
7748
7916
|
});
|
|
7749
7917
|
($8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
|
|
7750
7918
|
let event = ($8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);
|
|
@@ -7838,7 +8006,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7838
8006
|
let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = ($dbSRa$react.useMemo)(()=>{
|
|
7839
8007
|
let triggerHoverStart = (event, pointerType)=>{
|
|
7840
8008
|
state.pointerType = pointerType;
|
|
7841
|
-
if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget
|
|
8009
|
+
if (isDisabled || pointerType === 'touch' || state.isHovered || !($d4ee10de306f2510$export$4282f70798064fe0)(event.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(event))) return;
|
|
7842
8010
|
state.isHovered = true;
|
|
7843
8011
|
let target = event.currentTarget;
|
|
7844
8012
|
state.target = target;
|
|
@@ -7846,8 +8014,8 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7846
8014
|
// even though the originally hovered target may have shrunk in size so it is no longer hovered.
|
|
7847
8015
|
// However, a pointerover event will be fired on the new target the mouse is over.
|
|
7848
8016
|
// In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.
|
|
7849
|
-
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(event
|
|
7850
|
-
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e
|
|
8017
|
+
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(event)), 'pointerover', (e)=>{
|
|
8018
|
+
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, e.pointerType);
|
|
7851
8019
|
}, {
|
|
7852
8020
|
capture: true
|
|
7853
8021
|
});
|
|
@@ -7881,7 +8049,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7881
8049
|
triggerHoverStart(e, e.pointerType);
|
|
7882
8050
|
};
|
|
7883
8051
|
hoverProps.onPointerLeave = (e)=>{
|
|
7884
|
-
if (!isDisabled && e.currentTarget
|
|
8052
|
+
if (!isDisabled && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, e.pointerType);
|
|
7885
8053
|
};
|
|
7886
8054
|
} else if (process.env.NODE_ENV === 'test') {
|
|
7887
8055
|
hoverProps.onTouchStart = ()=>{
|
|
@@ -7892,7 +8060,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7892
8060
|
state.ignoreEmulatedMouseEvents = false;
|
|
7893
8061
|
};
|
|
7894
8062
|
hoverProps.onMouseLeave = (e)=>{
|
|
7895
|
-
if (!isDisabled && e.currentTarget
|
|
8063
|
+
if (!isDisabled && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, 'mouse');
|
|
7896
8064
|
};
|
|
7897
8065
|
}
|
|
7898
8066
|
return {
|
|
@@ -8004,12 +8172,13 @@ function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
|
|
|
8004
8172
|
}
|
|
8005
8173
|
function $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {
|
|
8006
8174
|
if (event.button > 0) return false;
|
|
8007
|
-
|
|
8175
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(event);
|
|
8176
|
+
if (target) {
|
|
8008
8177
|
// if the event target is no longer in the document, ignore
|
|
8009
|
-
const ownerDocument =
|
|
8010
|
-
if (!ownerDocument || !ownerDocument.documentElement
|
|
8178
|
+
const ownerDocument = target.ownerDocument;
|
|
8179
|
+
if (!ownerDocument || !($d4ee10de306f2510$export$4282f70798064fe0)(ownerDocument.documentElement, target)) return false;
|
|
8011
8180
|
// If the target is within a top layer element (e.g. toasts), ignore.
|
|
8012
|
-
if (
|
|
8181
|
+
if (target.closest('[data-react-aria-top-layer]')) return false;
|
|
8013
8182
|
}
|
|
8014
8183
|
if (!ref.current) return false;
|
|
8015
8184
|
// When the event source is inside a Shadow DOM, event.target is just the shadow root.
|
|
@@ -8326,22 +8495,23 @@ function $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {
|
|
|
8326
8495
|
}
|
|
8327
8496
|
return true;
|
|
8328
8497
|
}
|
|
8498
|
+
function $9bf71ea28793e738$var$getRadiosInGroup(element) {
|
|
8499
|
+
if (!element.form) // Radio buttons outside a form - query the document
|
|
8500
|
+
return Array.from(($431fbd86ca7dc216$export$b204af158042fbac)(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)).filter((radio)=>!radio.form);
|
|
8501
|
+
// namedItem returns RadioNodeList (iterable) for 2+ elements, but a single Element for exactly 1.
|
|
8502
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection/namedItem
|
|
8503
|
+
const radioList = element.form.elements.namedItem(element.name);
|
|
8504
|
+
let ownerWindow = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
8505
|
+
if (radioList instanceof ownerWindow.RadioNodeList) return Array.from(radioList).filter((el)=>el instanceof ownerWindow.HTMLInputElement);
|
|
8506
|
+
if (radioList instanceof ownerWindow.HTMLInputElement) return [
|
|
8507
|
+
radioList
|
|
8508
|
+
];
|
|
8509
|
+
return [];
|
|
8510
|
+
}
|
|
8329
8511
|
function $9bf71ea28793e738$var$isTabbableRadio(element) {
|
|
8330
8512
|
if (element.checked) return true;
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
...($431fbd86ca7dc216$export$b204af158042fbac)(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)
|
|
8334
|
-
].filter((radio)=>!radio.form);
|
|
8335
|
-
else {
|
|
8336
|
-
var _element_form_elements, _element_form;
|
|
8337
|
-
let radioList = (_element_form = element.form) === null || _element_form === void 0 ? void 0 : (_element_form_elements = _element_form.elements) === null || _element_form_elements === void 0 ? void 0 : _element_form_elements.namedItem(element.name);
|
|
8338
|
-
radios = [
|
|
8339
|
-
...radioList !== null && radioList !== void 0 ? radioList : []
|
|
8340
|
-
];
|
|
8341
|
-
}
|
|
8342
|
-
if (!radios) return false;
|
|
8343
|
-
let anyChecked = radios.some((radio)=>radio.checked);
|
|
8344
|
-
return !anyChecked;
|
|
8513
|
+
const radios = $9bf71ea28793e738$var$getRadiosInGroup(element);
|
|
8514
|
+
return radios.length > 0 && !radios.some((radio)=>radio.checked);
|
|
8345
8515
|
}
|
|
8346
8516
|
function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
|
|
8347
8517
|
let focusedNode = ($dbSRa$react.useRef)(undefined);
|
|
@@ -8441,7 +8611,7 @@ function $9bf71ea28793e738$var$isElementInAnyScope(element) {
|
|
|
8441
8611
|
function $9bf71ea28793e738$var$isElementInScope(element, scope) {
|
|
8442
8612
|
if (!element) return false;
|
|
8443
8613
|
if (!scope) return false;
|
|
8444
|
-
return scope.some((node)=>node
|
|
8614
|
+
return scope.some((node)=>($d4ee10de306f2510$export$4282f70798064fe0)(node, element));
|
|
8445
8615
|
}
|
|
8446
8616
|
function $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {
|
|
8447
8617
|
// If the element is within a top layer element (e.g. toasts), always allow moving focus there.
|
|
@@ -8688,9 +8858,8 @@ function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
|
|
|
8688
8858
|
// Create a TreeWalker, ensuring the root is an Element or Document
|
|
8689
8859
|
let walker = ($dfc540311bf7f109$export$4d0f8be8b12a7ef6)(doc, root || doc, NodeFilter.SHOW_ELEMENT, {
|
|
8690
8860
|
acceptNode (node) {
|
|
8691
|
-
var _opts_from;
|
|
8692
8861
|
// Skip nodes inside the starting node.
|
|
8693
|
-
if (opts === null || opts === void 0 ? void 0 :
|
|
8862
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(opts === null || opts === void 0 ? void 0 : opts.from, node)) return NodeFilter.FILTER_REJECT;
|
|
8694
8863
|
if ((opts === null || opts === void 0 ? void 0 : opts.tabbable) && node.tagName === 'INPUT' && node.getAttribute('type') === 'radio') {
|
|
8695
8864
|
// If the radio is in a form, we can get all the other radios by name
|
|
8696
8865
|
if (!$9bf71ea28793e738$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;
|
|
@@ -8715,7 +8884,7 @@ function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {
|
|
|
8715
8884
|
tabbable: tabbable,
|
|
8716
8885
|
accept: accept
|
|
8717
8886
|
});
|
|
8718
|
-
if (root
|
|
8887
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(root, node)) walker.currentNode = node;
|
|
8719
8888
|
let nextNode = walker.nextNode();
|
|
8720
8889
|
if (!nextNode && wrap) {
|
|
8721
8890
|
walker.currentNode = root;
|
|
@@ -8733,7 +8902,7 @@ function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {
|
|
|
8733
8902
|
tabbable: tabbable,
|
|
8734
8903
|
accept: accept
|
|
8735
8904
|
});
|
|
8736
|
-
if (root
|
|
8905
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(root, node)) walker.currentNode = node;
|
|
8737
8906
|
else {
|
|
8738
8907
|
let next = $9bf71ea28793e738$var$last(walker);
|
|
8739
8908
|
if (next) $9bf71ea28793e738$var$focusElement(next, true);
|
|
@@ -8870,6 +9039,7 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
8870
9039
|
let updateState = ($dbSRa$react.useCallback)(()=>setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
|
|
8871
9040
|
let onFocusChange = ($dbSRa$react.useCallback)((isFocused)=>{
|
|
8872
9041
|
state.current.isFocused = isFocused;
|
|
9042
|
+
state.current.isFocusVisible = ($507fabe10e71c6fb$export$b9b3dfddab17db27)();
|
|
8873
9043
|
setFocused(isFocused);
|
|
8874
9044
|
updateState();
|
|
8875
9045
|
}, [
|
|
@@ -8878,7 +9048,11 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
8878
9048
|
($507fabe10e71c6fb$export$ec71b4b83ac08ec3)((isFocusVisible)=>{
|
|
8879
9049
|
state.current.isFocusVisible = isFocusVisible;
|
|
8880
9050
|
updateState();
|
|
8881
|
-
}, [
|
|
9051
|
+
}, [
|
|
9052
|
+
isTextInput,
|
|
9053
|
+
isFocused
|
|
9054
|
+
], {
|
|
9055
|
+
enabled: isFocused,
|
|
8882
9056
|
isTextInput: isTextInput
|
|
8883
9057
|
});
|
|
8884
9058
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
@@ -8991,9 +9165,11 @@ function $55f9b1ae81f22853$export$759df0d867455a91(document) {
|
|
|
8991
9165
|
*/
|
|
8992
9166
|
|
|
8993
9167
|
|
|
9168
|
+
|
|
8994
9169
|
const $a11501f3d1d39e6c$var$visibleOverlays = [];
|
|
8995
9170
|
function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
8996
9171
|
let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;
|
|
9172
|
+
let lastVisibleOverlay = ($dbSRa$react.useRef)(undefined);
|
|
8997
9173
|
// Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
|
|
8998
9174
|
($dbSRa$react.useEffect)(()=>{
|
|
8999
9175
|
if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {
|
|
@@ -9012,21 +9188,24 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
9012
9188
|
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
|
|
9013
9189
|
};
|
|
9014
9190
|
let onInteractOutsideStart = (e)=>{
|
|
9015
|
-
|
|
9016
|
-
|
|
9191
|
+
const topMostOverlay = $a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1];
|
|
9192
|
+
lastVisibleOverlay.current = topMostOverlay;
|
|
9193
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
9194
|
+
if (topMostOverlay === ref) {
|
|
9017
9195
|
e.stopPropagation();
|
|
9018
9196
|
e.preventDefault();
|
|
9019
9197
|
}
|
|
9020
9198
|
}
|
|
9021
9199
|
};
|
|
9022
9200
|
let onInteractOutside = (e)=>{
|
|
9023
|
-
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e
|
|
9201
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
9024
9202
|
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
|
|
9025
9203
|
e.stopPropagation();
|
|
9026
9204
|
e.preventDefault();
|
|
9027
9205
|
}
|
|
9028
|
-
onHide();
|
|
9206
|
+
if (lastVisibleOverlay.current === ref) onHide();
|
|
9029
9207
|
}
|
|
9208
|
+
lastVisibleOverlay.current = undefined;
|
|
9030
9209
|
};
|
|
9031
9210
|
// Handle the escape key
|
|
9032
9211
|
let onKeyDown = (e)=>{
|
|
@@ -9060,7 +9239,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
9060
9239
|
});
|
|
9061
9240
|
let onPointerDownUnderlay = (e)=>{
|
|
9062
9241
|
// fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846
|
|
9063
|
-
if (e
|
|
9242
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === e.currentTarget) e.preventDefault();
|
|
9064
9243
|
};
|
|
9065
9244
|
return {
|
|
9066
9245
|
overlayProps: {
|
|
@@ -9174,20 +9353,25 @@ function $49c51c25361d4cd2$var$preventScrollStandard() {
|
|
|
9174
9353
|
// by preventing default in a `touchmove` event. This is best effort: we can't prevent default when pinch
|
|
9175
9354
|
// zooming or when an element contains text selection, which may allow scrolling in some cases.
|
|
9176
9355
|
// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.
|
|
9177
|
-
// 4. When focus moves to an input, create an off screen input and focus that temporarily. This prevents
|
|
9356
|
+
// 4. When focus moves to an input, create an off screen input and focus that temporarily. This prevents
|
|
9178
9357
|
// Safari from scrolling the page. After a small delay, focus the real input and scroll it into view
|
|
9179
9358
|
// ourselves, without scrolling the whole page.
|
|
9180
9359
|
function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
9360
|
+
// Set overflow hidden so scrollIntoViewport() (useSelectableCollection) sees isScrollPrevented and
|
|
9361
|
+
// scrolls only scroll parents instead of calling native scrollIntoView() which moves the window.
|
|
9362
|
+
let restoreOverflow = $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden');
|
|
9181
9363
|
let scrollable;
|
|
9182
9364
|
let allowTouchMove = false;
|
|
9183
9365
|
let onTouchStart = (e)=>{
|
|
9184
9366
|
// Store the nearest scrollable parent element from the element that the user touched.
|
|
9185
|
-
let target = e
|
|
9367
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
9186
9368
|
scrollable = ($cc38e7bd3fc7b213$export$2bb74740c4e19def)(target) ? target : ($62d8ded9296f3872$export$cfa2225e87938781)(target, true);
|
|
9187
9369
|
allowTouchMove = false;
|
|
9188
9370
|
// If the target is selected, don't preventDefault in touchmove to allow user to adjust selection.
|
|
9189
9371
|
let selection = target.ownerDocument.defaultView.getSelection();
|
|
9190
9372
|
if (selection && !selection.isCollapsed && selection.containsNode(target, true)) allowTouchMove = true;
|
|
9373
|
+
// If this is a range input, allow touch move to allow user to adjust the slider value
|
|
9374
|
+
if (e.composedPath().some((el)=>el instanceof HTMLInputElement && el.type === 'range')) allowTouchMove = true;
|
|
9191
9375
|
// If this is a focused input element with a selected range, allow user to drag the selection handles.
|
|
9192
9376
|
if ('selectionStart' in target && 'selectionEnd' in target && target.selectionStart < target.selectionEnd && target.ownerDocument.activeElement === target) allowTouchMove = true;
|
|
9193
9377
|
};
|
|
@@ -9220,7 +9404,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
9220
9404
|
if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
|
|
9221
9405
|
};
|
|
9222
9406
|
let onBlur = (e)=>{
|
|
9223
|
-
let target = e
|
|
9407
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
9224
9408
|
let relatedTarget = e.relatedTarget;
|
|
9225
9409
|
if (relatedTarget && ($21f1aa98acb08317$export$c57958e35f31ed73)(relatedTarget)) {
|
|
9226
9410
|
// Focus without scrolling the whole page, and then scroll into view manually.
|
|
@@ -9245,7 +9429,8 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
9245
9429
|
let focus = HTMLElement.prototype.focus;
|
|
9246
9430
|
HTMLElement.prototype.focus = function(opts) {
|
|
9247
9431
|
// Track whether the keyboard was already visible before.
|
|
9248
|
-
let
|
|
9432
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
9433
|
+
let wasKeyboardVisible = activeElement != null && ($21f1aa98acb08317$export$c57958e35f31ed73)(activeElement);
|
|
9249
9434
|
// Focus the element without scrolling the page.
|
|
9250
9435
|
focus.call(this, {
|
|
9251
9436
|
...opts,
|
|
@@ -9261,6 +9446,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
9261
9446
|
capture: true
|
|
9262
9447
|
}), $49c51c25361d4cd2$var$addEvent(document, 'blur', onBlur, true));
|
|
9263
9448
|
return ()=>{
|
|
9449
|
+
restoreOverflow();
|
|
9264
9450
|
removeEvents();
|
|
9265
9451
|
style.remove();
|
|
9266
9452
|
HTMLElement.prototype.focus = focus;
|
|
@@ -9756,6 +9942,7 @@ function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
|
9756
9942
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
9757
9943
|
* governing permissions and limitations under the License.
|
|
9758
9944
|
*/
|
|
9945
|
+
|
|
9759
9946
|
const $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;
|
|
9760
9947
|
// Keeps a ref count of all hidden elements. Added to when hiding an element, and
|
|
9761
9948
|
// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.
|
|
@@ -9784,6 +9971,17 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9784
9971
|
element.inert = false;
|
|
9785
9972
|
}
|
|
9786
9973
|
};
|
|
9974
|
+
let shadowRootsToWatch = new Set();
|
|
9975
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) // find all shadow roots that are ancestors of the targets
|
|
9976
|
+
// traverse upwards until the root is reached
|
|
9977
|
+
for (let target of targets){
|
|
9978
|
+
let node = target;
|
|
9979
|
+
while(node && node !== root){
|
|
9980
|
+
let root = node.getRootNode();
|
|
9981
|
+
if ('shadowRoot' in root) shadowRootsToWatch.add(root.shadowRoot);
|
|
9982
|
+
node = root.parentNode;
|
|
9983
|
+
}
|
|
9984
|
+
}
|
|
9787
9985
|
let walk = (root)=>{
|
|
9788
9986
|
// Keep live announcer and top layer elements (e.g. toasts) visible.
|
|
9789
9987
|
for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);
|
|
@@ -9795,11 +9993,11 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9795
9993
|
if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
|
|
9796
9994
|
// Skip this node but continue to children if one of the targets is inside the node.
|
|
9797
9995
|
for (let target of visibleNodes){
|
|
9798
|
-
if (node
|
|
9996
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(node, target)) return NodeFilter.FILTER_SKIP;
|
|
9799
9997
|
}
|
|
9800
9998
|
return NodeFilter.FILTER_ACCEPT;
|
|
9801
9999
|
};
|
|
9802
|
-
let walker =
|
|
10000
|
+
let walker = ($dfc540311bf7f109$export$4d0f8be8b12a7ef6)(($431fbd86ca7dc216$export$b204af158042fbac)(root), root, NodeFilter.SHOW_ELEMENT, {
|
|
9803
10001
|
acceptNode: acceptNode
|
|
9804
10002
|
});
|
|
9805
10003
|
// TreeWalker does not include the root.
|
|
@@ -9832,19 +10030,56 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9832
10030
|
if (change.type !== 'childList') continue;
|
|
9833
10031
|
// If the parent element of the added nodes is not within one of the targets,
|
|
9834
10032
|
// and not already inside a hidden node, hide all of the new children.
|
|
9835
|
-
if (![
|
|
10033
|
+
if (change.target.isConnected && ![
|
|
9836
10034
|
...visibleNodes,
|
|
9837
10035
|
...hiddenNodes
|
|
9838
|
-
].some((node)=>node
|
|
10036
|
+
].some((node)=>($d4ee10de306f2510$export$4282f70798064fe0)(node, change.target))) for (let node of change.addedNodes){
|
|
9839
10037
|
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);
|
|
9840
10038
|
else if (node instanceof Element) walk(node);
|
|
9841
10039
|
}
|
|
10040
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) {
|
|
10041
|
+
// if any of the observed shadow roots were removed, stop observing them
|
|
10042
|
+
for (let shadowRoot of shadowRootsToWatch)if (!shadowRoot.isConnected) {
|
|
10043
|
+
observer.disconnect();
|
|
10044
|
+
break;
|
|
10045
|
+
}
|
|
10046
|
+
}
|
|
9842
10047
|
}
|
|
9843
10048
|
});
|
|
9844
10049
|
observer.observe(root, {
|
|
9845
10050
|
childList: true,
|
|
9846
10051
|
subtree: true
|
|
9847
10052
|
});
|
|
10053
|
+
let shadowObservers = new Set();
|
|
10054
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) for (let shadowRoot of shadowRootsToWatch){
|
|
10055
|
+
// Disconnect single target instead of all https://github.com/whatwg/dom/issues/126
|
|
10056
|
+
let shadowObserver = new MutationObserver((changes)=>{
|
|
10057
|
+
for (let change of changes){
|
|
10058
|
+
if (change.type !== 'childList') continue;
|
|
10059
|
+
// If the parent element of the added nodes is not within one of the targets,
|
|
10060
|
+
// and not already inside a hidden node, hide all of the new children.
|
|
10061
|
+
if (change.target.isConnected && ![
|
|
10062
|
+
...visibleNodes,
|
|
10063
|
+
...hiddenNodes
|
|
10064
|
+
].some((node)=>($d4ee10de306f2510$export$4282f70798064fe0)(node, change.target))) for (let node of change.addedNodes){
|
|
10065
|
+
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);
|
|
10066
|
+
else if (node instanceof Element) walk(node);
|
|
10067
|
+
}
|
|
10068
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) {
|
|
10069
|
+
// if any of the observed shadow roots were removed, stop observing them
|
|
10070
|
+
for (let shadowRoot of shadowRootsToWatch)if (!shadowRoot.isConnected) {
|
|
10071
|
+
observer.disconnect();
|
|
10072
|
+
break;
|
|
10073
|
+
}
|
|
10074
|
+
}
|
|
10075
|
+
}
|
|
10076
|
+
});
|
|
10077
|
+
shadowObserver.observe(shadowRoot, {
|
|
10078
|
+
childList: true,
|
|
10079
|
+
subtree: true
|
|
10080
|
+
});
|
|
10081
|
+
shadowObservers.add(shadowObserver);
|
|
10082
|
+
}
|
|
9848
10083
|
let observerWrapper = {
|
|
9849
10084
|
visibleNodes: visibleNodes,
|
|
9850
10085
|
hiddenNodes: hiddenNodes,
|
|
@@ -9861,6 +10096,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9861
10096
|
$5e3802645cc19319$var$observerStack.push(observerWrapper);
|
|
9862
10097
|
return ()=>{
|
|
9863
10098
|
observer.disconnect();
|
|
10099
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) for (let shadowObserver of shadowObservers)shadowObserver.disconnect();
|
|
9864
10100
|
for (let node of hiddenNodes){
|
|
9865
10101
|
let count = $5e3802645cc19319$var$refCountMap.get(node);
|
|
9866
10102
|
if (count == null) continue;
|
|
@@ -10188,6 +10424,7 @@ function $feb5ffebff200149$export$6aeb1680a0ae8741(collection) {
|
|
|
10188
10424
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10189
10425
|
* governing permissions and limitations under the License.
|
|
10190
10426
|
*/
|
|
10427
|
+
|
|
10191
10428
|
/**
|
|
10192
10429
|
* Controls how long to wait before clearing the typeahead buffer.
|
|
10193
10430
|
*/ const $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1000; // 1 second
|
|
@@ -10199,7 +10436,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
10199
10436
|
}).current;
|
|
10200
10437
|
let onKeyDown = (e)=>{
|
|
10201
10438
|
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
10202
|
-
if (!character || e.ctrlKey || e.metaKey || !e.currentTarget
|
|
10439
|
+
if (!character || e.ctrlKey || e.metaKey || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || state.search.length === 0 && character === ' ') return;
|
|
10203
10440
|
// Do not propagate the Spacebar event if it's meant to be part of the search.
|
|
10204
10441
|
// When we time out, the search term becomes empty, hence the check on length.
|
|
10205
10442
|
// Trimming is to account for the case of pressing the Spacebar more than once,
|
|
@@ -10261,17 +10498,16 @@ function $fb3050f43d946246$var$getStringForKey(key) {
|
|
|
10261
10498
|
|
|
10262
10499
|
|
|
10263
10500
|
function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
10264
|
-
let { selectionManager: manager, keyboardDelegate: delegate, ref: ref, autoFocus: autoFocus = false, shouldFocusWrap: shouldFocusWrap = false, disallowEmptySelection: disallowEmptySelection = false, disallowSelectAll: disallowSelectAll = false, escapeKeyBehavior: escapeKeyBehavior = 'clearSelection', selectOnFocus: selectOnFocus = manager.selectionBehavior === 'replace', disallowTypeAhead: disallowTypeAhead = false, shouldUseVirtualFocus: shouldUseVirtualFocus, allowsTabNavigation: allowsTabNavigation = false,
|
|
10501
|
+
let { selectionManager: manager, keyboardDelegate: delegate, ref: ref, autoFocus: autoFocus = false, shouldFocusWrap: shouldFocusWrap = false, disallowEmptySelection: disallowEmptySelection = false, disallowSelectAll: disallowSelectAll = false, escapeKeyBehavior: escapeKeyBehavior = 'clearSelection', selectOnFocus: selectOnFocus = manager.selectionBehavior === 'replace', disallowTypeAhead: disallowTypeAhead = false, shouldUseVirtualFocus: shouldUseVirtualFocus, allowsTabNavigation: allowsTabNavigation = false, scrollRef: // If no scrollRef is provided, assume the collection ref is the scrollable region
|
|
10265
10502
|
scrollRef = ref, linkBehavior: linkBehavior = 'action' } = options;
|
|
10266
10503
|
let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
10267
10504
|
let router = ($ea8dcbcb9ea1b556$export$9a302a45f65d0572)();
|
|
10268
10505
|
let onKeyDown = (e)=>{
|
|
10269
|
-
var _ref_current;
|
|
10270
10506
|
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
|
|
10271
10507
|
if (e.altKey && e.key === 'Tab') e.preventDefault();
|
|
10272
10508
|
// Keyboard events bubble through portals. Don't handle keyboard events
|
|
10273
10509
|
// for elements outside the collection (e.g. menus).
|
|
10274
|
-
if (!
|
|
10510
|
+
if (!ref.current || !($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
10275
10511
|
const navigateToKey = (key, childFocus)=>{
|
|
10276
10512
|
if (key != null) {
|
|
10277
10513
|
if (manager.isLink(key) && linkBehavior === 'selection' && selectOnFocus && !($feb5ffebff200149$export$d3e3bd3e26688c04)(e)) {
|
|
@@ -10412,7 +10648,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10412
10648
|
// If the active element is NOT tabbable but is contained by an element that IS tabbable (aka the cell), the browser will actually move focus to
|
|
10413
10649
|
// the containing element. We need to special case this so that tab will move focus out of the grid instead of looping between
|
|
10414
10650
|
// focusing the containing cell and back to the non-tabbable child element
|
|
10415
|
-
|
|
10651
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
10652
|
+
if (next && (!($d4ee10de306f2510$export$b4f377a2b6254582)(next) || activeElement && !($b4b717babfbb907b$export$bebd5a1431fec25d)(activeElement))) ($7215afc6de606d6b$export$de79e2c695e052f3)(next);
|
|
10416
10653
|
}
|
|
10417
10654
|
break;
|
|
10418
10655
|
}
|
|
@@ -10424,7 +10661,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10424
10661
|
top: 0,
|
|
10425
10662
|
left: 0
|
|
10426
10663
|
});
|
|
10427
|
-
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll',
|
|
10664
|
+
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll', ()=>{
|
|
10428
10665
|
var _scrollRef_current, _scrollRef_current1;
|
|
10429
10666
|
var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
|
|
10430
10667
|
scrollPos.current = {
|
|
@@ -10435,11 +10672,11 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10435
10672
|
let onFocus = (e)=>{
|
|
10436
10673
|
if (manager.isFocused) {
|
|
10437
10674
|
// If a focus event bubbled through a portal, reset focus state.
|
|
10438
|
-
if (!e.currentTarget
|
|
10675
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) manager.setFocused(false);
|
|
10439
10676
|
return;
|
|
10440
10677
|
}
|
|
10441
10678
|
// Focus events can bubble through portals. Ignore these events.
|
|
10442
|
-
if (!e.currentTarget
|
|
10679
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
10443
10680
|
manager.setFocused(true);
|
|
10444
10681
|
if (manager.focusedKey == null) {
|
|
10445
10682
|
var _delegate_getLastKey, _delegate_getFirstKey;
|
|
@@ -10456,7 +10693,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10456
10693
|
var _manager_lastSelectedKey, _manager_firstSelectedKey;
|
|
10457
10694
|
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate));
|
|
10458
10695
|
else navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
|
|
10459
|
-
} else if (
|
|
10696
|
+
} else if (scrollRef.current) {
|
|
10460
10697
|
// Restore the scroll position to what it was before.
|
|
10461
10698
|
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
10462
10699
|
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
@@ -10466,7 +10703,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10466
10703
|
let element = ($feb5ffebff200149$export$c3d8340acf92597f)(ref, manager.focusedKey);
|
|
10467
10704
|
if (element instanceof HTMLElement) {
|
|
10468
10705
|
// This prevents a flash of focus on the first/last element in the collection, or the collection itself.
|
|
10469
|
-
if (!
|
|
10706
|
+
if (!($d4ee10de306f2510$export$b4f377a2b6254582)(element) && !shouldUseVirtualFocus) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
10470
10707
|
let modality = ($507fabe10e71c6fb$export$630ff653c5ada6a9)();
|
|
10471
10708
|
if (modality === 'keyboard') ($2f04cbc44ee30ce0$export$c826860796309d1b)(element, {
|
|
10472
10709
|
containingElement: ref.current
|
|
@@ -10476,7 +10713,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10476
10713
|
};
|
|
10477
10714
|
let onBlur = (e)=>{
|
|
10478
10715
|
// Don't set blurred and then focused again if moving focus within the collection.
|
|
10479
|
-
if (!e.currentTarget
|
|
10716
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) manager.setFocused(false);
|
|
10480
10717
|
};
|
|
10481
10718
|
// Ref to track whether the first item in the collection should be automatically focused. Specifically used for autocomplete when user types
|
|
10482
10719
|
// to focus the first key AFTER the collection updates.
|
|
@@ -10607,7 +10844,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10607
10844
|
onBlur: onBlur,
|
|
10608
10845
|
onMouseDown (e) {
|
|
10609
10846
|
// Ignore events that bubbled through portals.
|
|
10610
|
-
if (scrollRef.current === e
|
|
10847
|
+
if (scrollRef.current === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) // Prevent focus going to the collection when clicking on the scrollbar.
|
|
10611
10848
|
e.preventDefault();
|
|
10612
10849
|
}
|
|
10613
10850
|
};
|
|
@@ -10679,7 +10916,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10679
10916
|
if (isFocused && manager.isFocused) {
|
|
10680
10917
|
if (!shouldUseVirtualFocus) {
|
|
10681
10918
|
if (focus) focus();
|
|
10682
|
-
else if (
|
|
10919
|
+
else if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() !== ref.current && ref.current) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
10683
10920
|
} else ($55f9b1ae81f22853$export$76e4e37e5339496d)(ref.current);
|
|
10684
10921
|
}
|
|
10685
10922
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -10699,13 +10936,20 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10699
10936
|
if (!shouldUseVirtualFocus && !isDisabled) itemProps = {
|
|
10700
10937
|
tabIndex: key === manager.focusedKey ? 0 : -1,
|
|
10701
10938
|
onFocus (e) {
|
|
10702
|
-
if (e
|
|
10939
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === ref.current) manager.setFocusedKey(key);
|
|
10703
10940
|
}
|
|
10704
10941
|
};
|
|
10705
10942
|
else if (isDisabled) itemProps.onMouseDown = (e)=>{
|
|
10706
10943
|
// Prevent focus going to the body when clicking on a disabled item.
|
|
10707
10944
|
e.preventDefault();
|
|
10708
10945
|
};
|
|
10946
|
+
($dbSRa$react.useEffect)(()=>{
|
|
10947
|
+
if (isDisabled && manager.focusedKey === key) manager.setFocusedKey(null);
|
|
10948
|
+
}, [
|
|
10949
|
+
manager,
|
|
10950
|
+
isDisabled,
|
|
10951
|
+
key
|
|
10952
|
+
]);
|
|
10709
10953
|
// With checkbox selection, onAction (i.e. navigation) becomes primary, and occurs on a single click of the row.
|
|
10710
10954
|
// Clicking the checkbox enters selection mode, after which clicking anywhere on any row toggles selection for that row.
|
|
10711
10955
|
// With highlight selection, onAction is secondary, and occurs on double click. Single click selects the row.
|
|
@@ -10747,13 +10991,13 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10747
10991
|
itemPressProps.onPressStart = (e)=>{
|
|
10748
10992
|
modality.current = e.pointerType;
|
|
10749
10993
|
longPressEnabledOnPressStart.current = longPressEnabled;
|
|
10750
|
-
if (e.pointerType === 'keyboard' && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey())) onSelect(e);
|
|
10994
|
+
if (e.pointerType === 'keyboard' && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey(e.key))) onSelect(e);
|
|
10751
10995
|
};
|
|
10752
10996
|
// If allowsDifferentPressOrigin and interacting with mouse, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
|
|
10753
10997
|
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)
|
|
10754
10998
|
if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e)=>{
|
|
10755
10999
|
if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== 'mouse') {
|
|
10756
|
-
if (e.pointerType === 'keyboard' && !$880e95eb8b93ba9a$var$isActionKey()) return;
|
|
11000
|
+
if (e.pointerType === 'keyboard' && !$880e95eb8b93ba9a$var$isActionKey(e.key)) return;
|
|
10757
11001
|
performAction(e);
|
|
10758
11002
|
} else if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
|
|
10759
11003
|
};
|
|
@@ -10773,13 +11017,13 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10773
11017
|
// Select on mouse down unless there is a primary action which will occur on mouse up.
|
|
10774
11018
|
// For keyboard, select on key down. If there is an action, the Space key selects on key down,
|
|
10775
11019
|
// and the Enter key performs onAction on key up.
|
|
10776
|
-
if (allowsSelection && (e.pointerType === 'mouse' && !hasPrimaryAction || e.pointerType === 'keyboard' && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey()))) onSelect(e);
|
|
11020
|
+
if (allowsSelection && (e.pointerType === 'mouse' && !hasPrimaryAction || e.pointerType === 'keyboard' && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey(e.key)))) onSelect(e);
|
|
10777
11021
|
};
|
|
10778
11022
|
itemPressProps.onPress = (e)=>{
|
|
10779
11023
|
// Selection occurs on touch up. Primary actions always occur on pointer up.
|
|
10780
11024
|
// Both primary and secondary actions occur on Enter key up. The only exception
|
|
10781
11025
|
// is secondary actions, which occur on double click with a mouse.
|
|
10782
|
-
if (e.pointerType === 'touch' || e.pointerType === 'pen' || e.pointerType === 'virtual' || e.pointerType === 'keyboard' && hasAction && $880e95eb8b93ba9a$var$isActionKey() || e.pointerType === 'mouse' && hadPrimaryActionOnPressStart.current) {
|
|
11026
|
+
if (e.pointerType === 'touch' || e.pointerType === 'pen' || e.pointerType === 'virtual' || e.pointerType === 'keyboard' && hasAction && $880e95eb8b93ba9a$var$isActionKey(e.key) || e.pointerType === 'mouse' && hadPrimaryActionOnPressStart.current) {
|
|
10783
11027
|
if (hasAction) performAction(e);
|
|
10784
11028
|
else if (allowsSelection) onSelect(e);
|
|
10785
11029
|
}
|
|
@@ -10864,13 +11108,11 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10864
11108
|
hasAction: hasAction
|
|
10865
11109
|
};
|
|
10866
11110
|
}
|
|
10867
|
-
function $880e95eb8b93ba9a$var$isActionKey() {
|
|
10868
|
-
|
|
10869
|
-
return (event === null || event === void 0 ? void 0 : event.key) === 'Enter';
|
|
11111
|
+
function $880e95eb8b93ba9a$var$isActionKey(key) {
|
|
11112
|
+
return key === 'Enter';
|
|
10870
11113
|
}
|
|
10871
|
-
function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
10872
|
-
|
|
10873
|
-
return (event === null || event === void 0 ? void 0 : event.key) === ' ' || (event === null || event === void 0 ? void 0 : event.code) === 'Space';
|
|
11114
|
+
function $880e95eb8b93ba9a$var$isSelectionKey(key) {
|
|
11115
|
+
return key === ' ';
|
|
10874
11116
|
}
|
|
10875
11117
|
|
|
10876
11118
|
/*
|
|
@@ -11684,11 +11926,15 @@ function $af383d3bef1cfdc9$export$c3f9f39876e4bc7(props) {
|
|
|
11684
11926
|
role: 'presentation'
|
|
11685
11927
|
},
|
|
11686
11928
|
headingProps: heading ? {
|
|
11687
|
-
//
|
|
11929
|
+
// Technically, listbox cannot contain headings according to ARIA.
|
|
11688
11930
|
// We hide the heading from assistive technology, using role="presentation",
|
|
11689
11931
|
// and only use it as a visual label for the nested group.
|
|
11690
11932
|
id: headingId,
|
|
11691
|
-
role: 'presentation'
|
|
11933
|
+
role: 'presentation',
|
|
11934
|
+
onMouseDown: (e)=>{
|
|
11935
|
+
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
11936
|
+
e.preventDefault();
|
|
11937
|
+
}
|
|
11692
11938
|
} : {},
|
|
11693
11939
|
groupProps: {
|
|
11694
11940
|
role: 'group',
|
|
@@ -12290,7 +12536,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
|
12290
12536
|
// This is best-effort. There may be false positives, e.g. setTimeout.
|
|
12291
12537
|
form.reset = ()=>{
|
|
12292
12538
|
// React uses MessageChannel for scheduling, so ignore 'message' events.
|
|
12293
|
-
isIgnoredReset.current = !window.event || window.event.type === 'message' && window.event
|
|
12539
|
+
isIgnoredReset.current = !window.event || window.event.type === 'message' && ($d4ee10de306f2510$export$e58f029f0fbfdb29)(window.event) instanceof MessagePort;
|
|
12294
12540
|
reset === null || reset === void 0 ? void 0 : reset.call(form);
|
|
12295
12541
|
isIgnoredReset.current = false;
|
|
12296
12542
|
};
|
|
@@ -12338,8 +12584,9 @@ function $e93e671b31057976$var$getNativeValidity(input) {
|
|
|
12338
12584
|
}
|
|
12339
12585
|
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
12340
12586
|
for(let i = 0; i < form.elements.length; i++){
|
|
12587
|
+
var _element_validity;
|
|
12341
12588
|
let element = form.elements[i];
|
|
12342
|
-
if (
|
|
12589
|
+
if (((_element_validity = element.validity) === null || _element_validity === void 0 ? void 0 : _element_validity.valid) === false) return element;
|
|
12343
12590
|
}
|
|
12344
12591
|
return null;
|
|
12345
12592
|
}
|
|
@@ -12400,7 +12647,7 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
|
12400
12647
|
'aria-haspopup': props['aria-haspopup'],
|
|
12401
12648
|
'aria-controls': props['aria-controls'],
|
|
12402
12649
|
value: value,
|
|
12403
|
-
onChange: (e)=>setValue(e.
|
|
12650
|
+
onChange: (e)=>setValue(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).value),
|
|
12404
12651
|
autoComplete: props.autoComplete,
|
|
12405
12652
|
autoCapitalize: props.autoCapitalize,
|
|
12406
12653
|
maxLength: props.maxLength,
|
|
@@ -12513,7 +12760,7 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
12513
12760
|
inputRef
|
|
12514
12761
|
]);
|
|
12515
12762
|
let onBeforeInput = !$d841c8010a73d545$var$supportsNativeBeforeInputEvent() ? (e)=>{
|
|
12516
|
-
let nextValue = e.
|
|
12763
|
+
let nextValue = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).value.slice(0, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).selectionStart) + e.data + ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).value.slice(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).selectionEnd);
|
|
12517
12764
|
if (!state.validate(nextValue)) e.preventDefault();
|
|
12518
12765
|
} : null;
|
|
12519
12766
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = ($2d73ec29415bd339$export$712718f7aec83d5)(props, inputRef);
|
|
@@ -12979,8 +13226,8 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
|
|
|
12979
13226
|
this.ownerDocument.markDirty(this);
|
|
12980
13227
|
}
|
|
12981
13228
|
get level() {
|
|
12982
|
-
var
|
|
12983
|
-
if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((
|
|
13229
|
+
var _this_parentNode_node;
|
|
13230
|
+
if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.type) === 'item' ? 1 : 0);
|
|
12984
13231
|
return 0;
|
|
12985
13232
|
}
|
|
12986
13233
|
/**
|
|
@@ -13108,11 +13355,9 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
|
|
|
13108
13355
|
}
|
|
13109
13356
|
}
|
|
13110
13357
|
/** Finalizes the collection update, updating all nodes and freezing the collection. */ getCollection() {
|
|
13111
|
-
// If in a subscription update, return
|
|
13112
|
-
//
|
|
13113
|
-
|
|
13114
|
-
// the new collection.
|
|
13115
|
-
if (this.inSubscription) return this.collection.clone();
|
|
13358
|
+
// If in a subscription update, return return the existing collection.
|
|
13359
|
+
// React will call getCollection again during render, at which point all the updates will be complete.
|
|
13360
|
+
if (this.inSubscription) return this.collection;
|
|
13116
13361
|
// Reset queuedRender to false when getCollection is called during render.
|
|
13117
13362
|
this.queuedRender = false;
|
|
13118
13363
|
this.updateCollection();
|
|
@@ -13151,6 +13396,10 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
|
|
|
13151
13396
|
// we reset queuedRender back to false.
|
|
13152
13397
|
this.queuedRender = true;
|
|
13153
13398
|
this.inSubscription = true;
|
|
13399
|
+
// Clone the collection to ensure that React queues a render. It will call getCollection again
|
|
13400
|
+
// during render, at which point all the updates will be complete and we can return
|
|
13401
|
+
// the new collection.
|
|
13402
|
+
if (!this.isSSR) this.collection = this.collection.clone();
|
|
13154
13403
|
for (let fn of this.subscriptions)fn();
|
|
13155
13404
|
this.inSubscription = false;
|
|
13156
13405
|
}
|
|
@@ -13241,15 +13490,35 @@ function $e948873055cbafe4$export$727c8fc270210f13(props) {
|
|
|
13241
13490
|
// It will throw an error during hydration when it expects the firstChild to contain content rendered
|
|
13242
13491
|
// on the server, when in reality, the browser will have placed this inside the `content` document fragment.
|
|
13243
13492
|
// This monkey patches the firstChild property for our special hidden template elements to work around this error.
|
|
13493
|
+
// does the same for appendChild/removeChild/insertBefore as per the issue below
|
|
13244
13494
|
// See https://github.com/facebook/react/issues/19932
|
|
13245
13495
|
if (typeof HTMLTemplateElement !== 'undefined') {
|
|
13246
|
-
const getFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild').get;
|
|
13247
13496
|
Object.defineProperty(HTMLTemplateElement.prototype, 'firstChild', {
|
|
13248
13497
|
configurable: true,
|
|
13249
13498
|
enumerable: true,
|
|
13250
13499
|
get: function() {
|
|
13251
|
-
|
|
13252
|
-
|
|
13500
|
+
return this.content.firstChild;
|
|
13501
|
+
}
|
|
13502
|
+
});
|
|
13503
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'appendChild', {
|
|
13504
|
+
configurable: true,
|
|
13505
|
+
enumerable: true,
|
|
13506
|
+
value: function(node) {
|
|
13507
|
+
return this.content.appendChild(node);
|
|
13508
|
+
}
|
|
13509
|
+
});
|
|
13510
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'removeChild', {
|
|
13511
|
+
configurable: true,
|
|
13512
|
+
enumerable: true,
|
|
13513
|
+
value: function(node) {
|
|
13514
|
+
return this.content.removeChild(node);
|
|
13515
|
+
}
|
|
13516
|
+
});
|
|
13517
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'insertBefore', {
|
|
13518
|
+
configurable: true,
|
|
13519
|
+
enumerable: true,
|
|
13520
|
+
value: function(node, child) {
|
|
13521
|
+
return this.content.insertBefore(node, child);
|
|
13253
13522
|
}
|
|
13254
13523
|
});
|
|
13255
13524
|
}
|
|
@@ -13264,9 +13533,7 @@ function $f39a9eba43920ace$export$8dc98ba7eadeaa56(props) {
|
|
|
13264
13533
|
// In SSR, portals are not supported by React. Instead, always render into a <template>
|
|
13265
13534
|
// element, which the browser will never display to the user. In addition, the
|
|
13266
13535
|
// content is not part of the accessible DOM tree, so it won't affect ids or other accessibility attributes.
|
|
13267
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement("template",
|
|
13268
|
-
"data-react-aria-hidden": true
|
|
13269
|
-
}, children);
|
|
13536
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("template", null, children);
|
|
13270
13537
|
}
|
|
13271
13538
|
function $f39a9eba43920ace$export$86427a43e3e48ebb(fn) {
|
|
13272
13539
|
let Wrapper = (props, ref)=>{
|
|
@@ -13724,6 +13991,9 @@ function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDro
|
|
|
13724
13991
|
renderDropIndicator
|
|
13725
13992
|
],
|
|
13726
13993
|
children (node) {
|
|
13994
|
+
// Return a empty fragment since we don't want to render the content twice
|
|
13995
|
+
// If we don't skip the content node here, we end up rendering them twice in a Tree since we also render the content node in TreeItem
|
|
13996
|
+
if (node.type === 'content') return /*#__PURE__*/ ($dbSRa$react).createElement(($dbSRa$react).Fragment, null);
|
|
13727
13997
|
let rendered = node.render(node);
|
|
13728
13998
|
if (!renderDropIndicator || node.type !== 'item') return rendered;
|
|
13729
13999
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($dbSRa$react).Fragment, null, renderDropIndicator({
|
|
@@ -13946,7 +14216,7 @@ function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
|
13946
14216
|
let focusManager = ($9bf71ea28793e738$export$c5251b9e124bf29)(ref);
|
|
13947
14217
|
const onKeyDown = (e)=>{
|
|
13948
14218
|
// don't handle portalled events
|
|
13949
|
-
if (!e.currentTarget
|
|
14219
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
13950
14220
|
if (orientation === 'horizontal' && e.key === 'ArrowRight' || orientation === 'vertical' && e.key === 'ArrowDown') {
|
|
13951
14221
|
if (shouldReverse) focusManager.focusPrevious();
|
|
13952
14222
|
else focusManager.focusNext();
|
|
@@ -13959,7 +14229,7 @@ function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
|
13959
14229
|
// to the first or last focusable child, and let the
|
|
13960
14230
|
// browser handle the Tab key as usual from there.
|
|
13961
14231
|
e.stopPropagation();
|
|
13962
|
-
lastFocused.current =
|
|
14232
|
+
lastFocused.current = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
13963
14233
|
if (e.shiftKey) focusManager.focusFirst();
|
|
13964
14234
|
else focusManager.focusLast();
|
|
13965
14235
|
return;
|
|
@@ -13972,14 +14242,13 @@ function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
|
13972
14242
|
// Record the last focused child when focus moves out of the toolbar.
|
|
13973
14243
|
const lastFocused = ($dbSRa$react.useRef)(null);
|
|
13974
14244
|
const onBlur = (e)=>{
|
|
13975
|
-
if (!e.currentTarget
|
|
14245
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget) && !lastFocused.current) lastFocused.current = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
13976
14246
|
};
|
|
13977
14247
|
// Restore focus to the last focused child when focus returns into the toolbar.
|
|
13978
14248
|
// If the element was removed, do nothing, either the first item in the first group,
|
|
13979
14249
|
// or the last item in the last group will be focused, depending on direction.
|
|
13980
14250
|
const onFocus = (e)=>{
|
|
13981
|
-
|
|
13982
|
-
if (lastFocused.current && !e.currentTarget.contains(e.relatedTarget) && ((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(e.target))) {
|
|
14251
|
+
if (lastFocused.current && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget) && ($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
13983
14252
|
var _lastFocused_current;
|
|
13984
14253
|
(_lastFocused_current = lastFocused.current) === null || _lastFocused_current === void 0 ? void 0 : _lastFocused_current.focus();
|
|
13985
14254
|
lastFocused.current = null;
|
|
@@ -15131,6 +15400,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15131
15400
|
onPressStart (e) {
|
|
15132
15401
|
if (state.isReadOnly) {
|
|
15133
15402
|
state.setFocusedDate(date);
|
|
15403
|
+
state.setFocused(true);
|
|
15134
15404
|
return;
|
|
15135
15405
|
}
|
|
15136
15406
|
if ('highlightedRange' in state && !state.anchorDate && (e.pointerType === 'mouse' || e.pointerType === 'touch')) {
|
|
@@ -15142,12 +15412,14 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15142
15412
|
if (($14e0f24ef4ac5c92$export$ea39ec197993aef0)(date, state.highlightedRange.start)) {
|
|
15143
15413
|
state.setAnchorDate(state.highlightedRange.end);
|
|
15144
15414
|
state.setFocusedDate(date);
|
|
15415
|
+
state.setFocused(true);
|
|
15145
15416
|
state.setDragging(true);
|
|
15146
15417
|
isRangeBoundaryPressed.current = true;
|
|
15147
15418
|
return;
|
|
15148
15419
|
} else if (($14e0f24ef4ac5c92$export$ea39ec197993aef0)(date, state.highlightedRange.end)) {
|
|
15149
15420
|
state.setAnchorDate(state.highlightedRange.start);
|
|
15150
15421
|
state.setFocusedDate(date);
|
|
15422
|
+
state.setFocused(true);
|
|
15151
15423
|
state.setDragging(true);
|
|
15152
15424
|
isRangeBoundaryPressed.current = true;
|
|
15153
15425
|
return;
|
|
@@ -15158,6 +15430,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15158
15430
|
touchDragTimerRef.current = undefined;
|
|
15159
15431
|
state.selectDate(date);
|
|
15160
15432
|
state.setFocusedDate(date);
|
|
15433
|
+
state.setFocused(true);
|
|
15161
15434
|
isAnchorPressed.current = true;
|
|
15162
15435
|
};
|
|
15163
15436
|
// Start selection on mouse/touch down so users can drag to select a range.
|
|
@@ -15177,6 +15450,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15177
15450
|
if (!('anchorDate' in state) && !state.isReadOnly) {
|
|
15178
15451
|
state.selectDate(date);
|
|
15179
15452
|
state.setFocusedDate(date);
|
|
15453
|
+
state.setFocused(true);
|
|
15180
15454
|
}
|
|
15181
15455
|
},
|
|
15182
15456
|
onPressUp (e) {
|
|
@@ -15187,6 +15461,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15187
15461
|
if ('anchorDate' in state && touchDragTimerRef.current) {
|
|
15188
15462
|
state.selectDate(date);
|
|
15189
15463
|
state.setFocusedDate(date);
|
|
15464
|
+
state.setFocused(true);
|
|
15190
15465
|
}
|
|
15191
15466
|
if ('anchorDate' in state) {
|
|
15192
15467
|
if (isRangeBoundaryPressed.current) // When clicking on the start or end date of an already selected range,
|
|
@@ -15197,6 +15472,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15197
15472
|
// When releasing a drag or pressing the end date of a range, select it.
|
|
15198
15473
|
state.selectDate(date);
|
|
15199
15474
|
state.setFocusedDate(date);
|
|
15475
|
+
state.setFocused(true);
|
|
15200
15476
|
} else if (e.pointerType === 'keyboard' && !state.anchorDate) {
|
|
15201
15477
|
// For range selection, auto-advance the focused date by one if using keyboard.
|
|
15202
15478
|
// This gives an indication that you're selecting a range rather than a single date.
|
|
@@ -15209,11 +15485,15 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15209
15485
|
if (state.isInvalid(nextDay)) nextDay = date.subtract({
|
|
15210
15486
|
days: 1
|
|
15211
15487
|
});
|
|
15212
|
-
if (!state.isInvalid(nextDay))
|
|
15488
|
+
if (!state.isInvalid(nextDay)) {
|
|
15489
|
+
state.setFocusedDate(nextDay);
|
|
15490
|
+
state.setFocused(true);
|
|
15491
|
+
}
|
|
15213
15492
|
} else if (e.pointerType === 'virtual') {
|
|
15214
15493
|
// For screen readers, just select the date on click.
|
|
15215
15494
|
state.selectDate(date);
|
|
15216
15495
|
state.setFocusedDate(date);
|
|
15496
|
+
state.setFocused(true);
|
|
15217
15497
|
}
|
|
15218
15498
|
}
|
|
15219
15499
|
}
|
|
@@ -15231,7 +15511,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15231
15511
|
// Also only scroll into view if the cell actually got focused.
|
|
15232
15512
|
// There are some cases where the cell might be disabled or inside,
|
|
15233
15513
|
// an inert container and we don't want to scroll then.
|
|
15234
|
-
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() !== 'pointer' &&
|
|
15514
|
+
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() !== 'pointer' && ($d4ee10de306f2510$export$cd4e5573fbe2b576)() === ref.current) ($2f04cbc44ee30ce0$export$c826860796309d1b)(ref.current, {
|
|
15235
15515
|
containingElement: ($62d8ded9296f3872$export$cfa2225e87938781)(ref.current)
|
|
15236
15516
|
});
|
|
15237
15517
|
}
|
|
@@ -15257,7 +15537,10 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15257
15537
|
},
|
|
15258
15538
|
buttonProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(pressProps, {
|
|
15259
15539
|
onFocus () {
|
|
15260
|
-
if (!isDisabled)
|
|
15540
|
+
if (!isDisabled) {
|
|
15541
|
+
state.setFocusedDate(date);
|
|
15542
|
+
state.setFocused(true);
|
|
15543
|
+
}
|
|
15261
15544
|
},
|
|
15262
15545
|
tabIndex: tabIndex,
|
|
15263
15546
|
role: 'button',
|
|
@@ -15276,7 +15559,12 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15276
15559
|
// This is necessary on touch devices to allow dragging
|
|
15277
15560
|
// outside the original pressed element.
|
|
15278
15561
|
// (JSDOM does not support this)
|
|
15279
|
-
|
|
15562
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
15563
|
+
if (target instanceof HTMLElement && 'releasePointerCapture' in target) {
|
|
15564
|
+
if ('hasPointerCapture' in target) {
|
|
15565
|
+
if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);
|
|
15566
|
+
} else target.releasePointerCapture(e.pointerId);
|
|
15567
|
+
}
|
|
15280
15568
|
},
|
|
15281
15569
|
onContextMenu (e) {
|
|
15282
15570
|
// Prevent context menu on long press.
|
|
@@ -15312,7 +15600,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
15312
15600
|
// since we spread props on label, onChange will end up there as well as in here.
|
|
15313
15601
|
// so we have to stop propagation at the lowest level that we care about
|
|
15314
15602
|
e.stopPropagation();
|
|
15315
|
-
state.setSelected(e.
|
|
15603
|
+
state.setSelected(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).checked);
|
|
15316
15604
|
};
|
|
15317
15605
|
let hasChildren = children != null;
|
|
15318
15606
|
let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
|
|
@@ -15734,22 +16022,25 @@ function $de67e98908f0c6ee$export$7f629e9dc1ecf37c(props) {
|
|
|
15734
16022
|
numberParser,
|
|
15735
16023
|
inputValue
|
|
15736
16024
|
]);
|
|
15737
|
-
let commit = ()=>{
|
|
16025
|
+
let commit = (overrideValue)=>{
|
|
16026
|
+
let newInputValue = overrideValue === undefined ? inputValue : overrideValue;
|
|
16027
|
+
let newParsedValue = parsedValue;
|
|
16028
|
+
if (overrideValue !== undefined) newParsedValue = numberParser.parse(newInputValue);
|
|
15738
16029
|
// Set to empty state if input value is empty
|
|
15739
|
-
if (!
|
|
16030
|
+
if (!newInputValue.length) {
|
|
15740
16031
|
setNumberValue(NaN);
|
|
15741
16032
|
setInputValue(value === undefined ? '' : format(numberValue));
|
|
15742
16033
|
return;
|
|
15743
16034
|
}
|
|
15744
16035
|
// if it failed to parse, then reset input to formatted version of current number
|
|
15745
|
-
if (isNaN(
|
|
16036
|
+
if (isNaN(newParsedValue)) {
|
|
15746
16037
|
setInputValue(format(numberValue));
|
|
15747
16038
|
return;
|
|
15748
16039
|
}
|
|
15749
16040
|
// Clamp to min and max, round to the nearest step, and round to specified number of digits
|
|
15750
16041
|
let clampedValue;
|
|
15751
|
-
if (step === undefined || isNaN(step)) clampedValue = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(
|
|
15752
|
-
else clampedValue = ($9446cca9a3875146$export$cb6e0bb50bc19463)(
|
|
16042
|
+
if (step === undefined || isNaN(step)) clampedValue = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(newParsedValue, minValue, maxValue);
|
|
16043
|
+
else clampedValue = ($9446cca9a3875146$export$cb6e0bb50bc19463)(newParsedValue, minValue, maxValue, step);
|
|
15753
16044
|
clampedValue = numberParser.parse(format(clampedValue));
|
|
15754
16045
|
setNumberValue(clampedValue);
|
|
15755
16046
|
// in a controlled state, the numberValue won't change, so we won't go back to our old input without help
|
|
@@ -16115,6 +16406,7 @@ function $parcel$interopDefault$9(a) {
|
|
|
16115
16406
|
|
|
16116
16407
|
|
|
16117
16408
|
|
|
16409
|
+
const $d2e8511e6f209edf$var$noop = ()=>{};
|
|
16118
16410
|
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
16119
16411
|
const _async = ($dbSRa$react.useRef)(undefined);
|
|
16120
16412
|
let { value: value, textValue: textValue, minValue: minValue, maxValue: maxValue, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, onIncrement: onIncrement, onIncrementPage: onIncrementPage, onDecrement: onDecrement, onDecrementPage: onDecrementPage, onDecrementToMin: onDecrementToMin, onIncrementToMax: onIncrementToMax } = props;
|
|
@@ -16201,23 +16493,31 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16201
16493
|
}, [
|
|
16202
16494
|
clearAsync
|
|
16203
16495
|
]);
|
|
16204
|
-
const
|
|
16496
|
+
const onIncrementEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onIncrement !== null && onIncrement !== void 0 ? onIncrement : $d2e8511e6f209edf$var$noop);
|
|
16497
|
+
const onDecrementEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onDecrement !== null && onDecrement !== void 0 ? onDecrement : $d2e8511e6f209edf$var$noop);
|
|
16498
|
+
const stepUpEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
16499
|
+
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) {
|
|
16500
|
+
onIncrementEvent();
|
|
16501
|
+
onIncrementPressStartEvent(60);
|
|
16502
|
+
}
|
|
16503
|
+
});
|
|
16504
|
+
const onIncrementPressStartEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
16205
16505
|
clearAsyncEvent();
|
|
16206
16506
|
isSpinning.current = true;
|
|
16207
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
16208
16507
|
// Start spinning after initial delay
|
|
16209
|
-
_async.current = window.setTimeout(
|
|
16210
|
-
|
|
16211
|
-
|
|
16508
|
+
_async.current = window.setTimeout(stepUpEvent, initialStepDelay);
|
|
16509
|
+
});
|
|
16510
|
+
const stepDownEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
16511
|
+
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) {
|
|
16512
|
+
onDecrementEvent();
|
|
16513
|
+
onDecrementPressStartEvent(60);
|
|
16514
|
+
}
|
|
16212
16515
|
});
|
|
16213
|
-
const
|
|
16516
|
+
const onDecrementPressStartEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
16214
16517
|
clearAsyncEvent();
|
|
16215
16518
|
isSpinning.current = true;
|
|
16216
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
16217
16519
|
// Start spinning after initial delay
|
|
16218
|
-
_async.current = window.setTimeout(
|
|
16219
|
-
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
16220
|
-
}, initialStepDelay);
|
|
16520
|
+
_async.current = window.setTimeout(stepDownEvent, initialStepDelay);
|
|
16221
16521
|
});
|
|
16222
16522
|
let cancelContextMenu = (e)=>{
|
|
16223
16523
|
e.preventDefault();
|
|
@@ -16230,15 +16530,15 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16230
16530
|
let isUp = ($dbSRa$react.useRef)(false);
|
|
16231
16531
|
let [isIncrementPressed, setIsIncrementPressed] = ($dbSRa$react.useState)(null);
|
|
16232
16532
|
($dbSRa$react.useEffect)(()=>{
|
|
16233
|
-
if (isIncrementPressed === 'touch')
|
|
16234
|
-
else if (isIncrementPressed)
|
|
16533
|
+
if (isIncrementPressed === 'touch') onIncrementPressStartEvent(600);
|
|
16534
|
+
else if (isIncrementPressed) onIncrementPressStartEvent(400);
|
|
16235
16535
|
}, [
|
|
16236
16536
|
isIncrementPressed
|
|
16237
16537
|
]);
|
|
16238
16538
|
let [isDecrementPressed, setIsDecrementPressed] = ($dbSRa$react.useState)(null);
|
|
16239
16539
|
($dbSRa$react.useEffect)(()=>{
|
|
16240
|
-
if (isDecrementPressed === 'touch')
|
|
16241
|
-
else if (isDecrementPressed)
|
|
16540
|
+
if (isDecrementPressed === 'touch') onDecrementPressStartEvent(600);
|
|
16541
|
+
else if (isDecrementPressed) onDecrementPressStartEvent(400);
|
|
16242
16542
|
}, [
|
|
16243
16543
|
isDecrementPressed
|
|
16244
16544
|
]);
|
|
@@ -16258,32 +16558,32 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16258
16558
|
},
|
|
16259
16559
|
incrementButtonProps: {
|
|
16260
16560
|
onPressStart: (e)=>{
|
|
16261
|
-
|
|
16262
|
-
|
|
16263
|
-
|
|
16561
|
+
clearAsync();
|
|
16562
|
+
if (e.pointerType !== 'touch') {
|
|
16563
|
+
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
16564
|
+
setIsIncrementPressed('mouse');
|
|
16565
|
+
} else {
|
|
16264
16566
|
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
16265
16567
|
capture: true
|
|
16266
16568
|
});
|
|
16267
16569
|
isUp.current = false;
|
|
16268
16570
|
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
16269
16571
|
// the control isn't spinning.
|
|
16270
|
-
|
|
16271
|
-
setIsIncrementPressed('touch');
|
|
16272
|
-
}, 600);
|
|
16572
|
+
setIsIncrementPressed('touch');
|
|
16273
16573
|
}
|
|
16274
16574
|
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
16275
16575
|
},
|
|
16276
16576
|
onPressUp: (e)=>{
|
|
16277
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
16278
16577
|
clearAsync();
|
|
16578
|
+
if (e.pointerType === 'touch') isUp.current = true;
|
|
16279
16579
|
removeAllGlobalListeners();
|
|
16280
16580
|
setIsIncrementPressed(null);
|
|
16281
16581
|
},
|
|
16282
16582
|
onPressEnd: (e)=>{
|
|
16583
|
+
clearAsync();
|
|
16283
16584
|
if (e.pointerType === 'touch') {
|
|
16284
16585
|
if (!isSpinning.current && isUp.current) onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
16285
16586
|
}
|
|
16286
|
-
clearAsync();
|
|
16287
16587
|
isUp.current = false;
|
|
16288
16588
|
setIsIncrementPressed(null);
|
|
16289
16589
|
},
|
|
@@ -16292,31 +16592,31 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16292
16592
|
},
|
|
16293
16593
|
decrementButtonProps: {
|
|
16294
16594
|
onPressStart: (e)=>{
|
|
16295
|
-
|
|
16296
|
-
|
|
16297
|
-
|
|
16595
|
+
clearAsync();
|
|
16596
|
+
if (e.pointerType !== 'touch') {
|
|
16597
|
+
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
16598
|
+
setIsDecrementPressed('mouse');
|
|
16599
|
+
} else {
|
|
16298
16600
|
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
16299
16601
|
capture: true
|
|
16300
16602
|
});
|
|
16301
16603
|
isUp.current = false;
|
|
16302
16604
|
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
16303
16605
|
// the control isn't spinning.
|
|
16304
|
-
|
|
16305
|
-
setIsDecrementPressed('touch');
|
|
16306
|
-
}, 600);
|
|
16606
|
+
setIsDecrementPressed('touch');
|
|
16307
16607
|
}
|
|
16308
16608
|
},
|
|
16309
16609
|
onPressUp: (e)=>{
|
|
16310
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
16311
16610
|
clearAsync();
|
|
16611
|
+
if (e.pointerType === 'touch') isUp.current = true;
|
|
16312
16612
|
removeAllGlobalListeners();
|
|
16313
16613
|
setIsDecrementPressed(null);
|
|
16314
16614
|
},
|
|
16315
16615
|
onPressEnd: (e)=>{
|
|
16616
|
+
clearAsync();
|
|
16316
16617
|
if (e.pointerType === 'touch') {
|
|
16317
16618
|
if (!isSpinning.current && isUp.current) onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
16318
16619
|
}
|
|
16319
|
-
clearAsync();
|
|
16320
16620
|
isUp.current = false;
|
|
16321
16621
|
setIsDecrementPressed(null);
|
|
16322
16622
|
},
|
|
@@ -16657,15 +16957,30 @@ function $parcel$interopDefault$8(a) {
|
|
|
16657
16957
|
|
|
16658
16958
|
|
|
16659
16959
|
|
|
16960
|
+
|
|
16961
|
+
|
|
16660
16962
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
16661
16963
|
let { id: id, decrementAriaLabel: decrementAriaLabel, incrementAriaLabel: incrementAriaLabel, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, minValue: minValue, maxValue: maxValue, autoFocus: autoFocus, label: label, formatOptions: formatOptions, onBlur: onBlur = ()=>{}, onFocus: onFocus, onFocusChange: onFocusChange, onKeyDown: onKeyDown, onKeyUp: onKeyUp, description: description, errorMessage: errorMessage, isWheelDisabled: isWheelDisabled, ...otherProps } = props;
|
|
16662
16964
|
let { increment: increment, incrementToMax: incrementToMax, decrement: decrement, decrementToMin: decrementToMin, numberValue: numberValue, inputValue: inputValue, commit: commit, commitValidation: commitValidation } = state;
|
|
16663
16965
|
const stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault$8($280a227d7cb94b92$exports))), '@react-aria/numberfield');
|
|
16966
|
+
let commitAndAnnounce = ($dbSRa$react.useCallback)(()=>{
|
|
16967
|
+
var _inputRef_current, _inputRef_current1, _inputRef_current2;
|
|
16968
|
+
var _inputRef_current_value;
|
|
16969
|
+
let oldValue = (_inputRef_current_value = (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.value) !== null && _inputRef_current_value !== void 0 ? _inputRef_current_value : '';
|
|
16970
|
+
// Set input value to normalized valid value
|
|
16971
|
+
($4AOtR$reactdom.flushSync)(()=>{
|
|
16972
|
+
commit();
|
|
16973
|
+
});
|
|
16974
|
+
var _inputRef_current_value1;
|
|
16975
|
+
if (((_inputRef_current1 = inputRef.current) === null || _inputRef_current1 === void 0 ? void 0 : _inputRef_current1.value) !== oldValue) ($319e236875307eab$export$a9b970dcc4ae71a9)((_inputRef_current_value1 = (_inputRef_current2 = inputRef.current) === null || _inputRef_current2 === void 0 ? void 0 : _inputRef_current2.value) !== null && _inputRef_current_value1 !== void 0 ? _inputRef_current_value1 : '', 'assertive');
|
|
16976
|
+
}, [
|
|
16977
|
+
commit,
|
|
16978
|
+
inputRef
|
|
16979
|
+
]);
|
|
16664
16980
|
let inputId = ($bdb11010cef70236$export$f680877a34711e37)(id);
|
|
16665
16981
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
16666
16982
|
onBlur () {
|
|
16667
|
-
|
|
16668
|
-
commit();
|
|
16983
|
+
commitAndAnnounce();
|
|
16669
16984
|
}
|
|
16670
16985
|
});
|
|
16671
16986
|
let numberFormatter = ($a916eb452884faea$export$b7a616150fdb9f44)(formatOptions);
|
|
@@ -16741,6 +17056,24 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
16741
17056
|
let onChange = (value)=>{
|
|
16742
17057
|
if (state.validate(value)) state.setInputValue(value);
|
|
16743
17058
|
};
|
|
17059
|
+
let onPaste = (e)=>{
|
|
17060
|
+
var _props_onPaste;
|
|
17061
|
+
(_props_onPaste = props.onPaste) === null || _props_onPaste === void 0 ? void 0 : _props_onPaste.call(props, e);
|
|
17062
|
+
let inputElement = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
17063
|
+
var _inputElement_selectionEnd, _inputElement_selectionStart;
|
|
17064
|
+
// we can only handle the case where the paste takes over the entire input, otherwise things get very complicated
|
|
17065
|
+
// trying to calculate the new string based on what the paste is replacing and where in the source string it is
|
|
17066
|
+
if (inputElement && ((_inputElement_selectionEnd = inputElement.selectionEnd) !== null && _inputElement_selectionEnd !== void 0 ? _inputElement_selectionEnd : -1) - ((_inputElement_selectionStart = inputElement.selectionStart) !== null && _inputElement_selectionStart !== void 0 ? _inputElement_selectionStart : 0) === inputElement.value.length) {
|
|
17067
|
+
var _e_clipboardData_getData, _e_clipboardData_getData1, _e_clipboardData;
|
|
17068
|
+
e.preventDefault();
|
|
17069
|
+
var _e_clipboardData_getData_trim;
|
|
17070
|
+
// commit so that the user gets to see what it formats to immediately
|
|
17071
|
+
// paste happens before inputRef's value is updated, so have to prevent the default and do it ourselves
|
|
17072
|
+
// spin button will then handle announcing the new value, this should work with controlled state as well
|
|
17073
|
+
// because the announcement is done as a result of the new rendered input value if there is one
|
|
17074
|
+
commit((_e_clipboardData_getData_trim = (_e_clipboardData = e.clipboardData) === null || _e_clipboardData === void 0 ? void 0 : (_e_clipboardData_getData1 = _e_clipboardData.getData) === null || _e_clipboardData_getData1 === void 0 ? void 0 : (_e_clipboardData_getData = _e_clipboardData_getData1.call(_e_clipboardData, 'text/plain')) === null || _e_clipboardData_getData === void 0 ? void 0 : _e_clipboardData_getData.trim()) !== null && _e_clipboardData_getData_trim !== void 0 ? _e_clipboardData_getData_trim : '');
|
|
17075
|
+
}
|
|
17076
|
+
};
|
|
16744
17077
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
16745
17078
|
let onKeyDownEnter = ($dbSRa$react.useCallback)((e)=>{
|
|
16746
17079
|
if (e.nativeEvent.isComposing) return;
|
|
@@ -16783,6 +17116,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
16783
17116
|
onKeyDown
|
|
16784
17117
|
]),
|
|
16785
17118
|
onKeyUp: onKeyUp,
|
|
17119
|
+
onPaste: onPaste,
|
|
16786
17120
|
description: description,
|
|
16787
17121
|
errorMessage: errorMessage
|
|
16788
17122
|
}, state, inputRef);
|
|
@@ -16804,7 +17138,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
16804
17138
|
var _inputRef_current;
|
|
16805
17139
|
// If focus is already on the input, keep it there so we don't hide the
|
|
16806
17140
|
// software keyboard when tapping the increment/decrement buttons.
|
|
16807
|
-
if (
|
|
17141
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() === inputRef.current) return;
|
|
16808
17142
|
// Otherwise, when using a mouse, move focus to the input.
|
|
16809
17143
|
// On touch, or with a screen reader, focus the button so that the software
|
|
16810
17144
|
// keyboard does not appear and the screen reader cursor is not moved off the button.
|
|
@@ -17630,7 +17964,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17630
17964
|
]);
|
|
17631
17965
|
// Open the popover on alt + arrow down
|
|
17632
17966
|
let onKeyDown = (e)=>{
|
|
17633
|
-
if (!e.currentTarget
|
|
17967
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
17634
17968
|
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
17635
17969
|
e.preventDefault();
|
|
17636
17970
|
e.stopPropagation();
|
|
@@ -17643,7 +17977,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17643
17977
|
e.stopPropagation();
|
|
17644
17978
|
if (direction === 'rtl') {
|
|
17645
17979
|
if (ref.current) {
|
|
17646
|
-
let target = e
|
|
17980
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
17647
17981
|
let prev = $3dfb0f96be0d6a08$var$findNextSegment(ref.current, target.getBoundingClientRect().left, -1);
|
|
17648
17982
|
if (prev) prev.focus();
|
|
17649
17983
|
}
|
|
@@ -17654,7 +17988,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17654
17988
|
e.stopPropagation();
|
|
17655
17989
|
if (direction === 'rtl') {
|
|
17656
17990
|
if (ref.current) {
|
|
17657
|
-
let target = e
|
|
17991
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
17658
17992
|
let next = $3dfb0f96be0d6a08$var$findNextSegment(ref.current, target.getBoundingClientRect().left, 1);
|
|
17659
17993
|
if (next) next.focus();
|
|
17660
17994
|
}
|
|
@@ -17664,10 +17998,9 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17664
17998
|
};
|
|
17665
17999
|
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
17666
18000
|
let focusLast = ()=>{
|
|
17667
|
-
var _window_event;
|
|
17668
18001
|
if (!ref.current) return;
|
|
17669
18002
|
// Try to find the segment prior to the element that was clicked on.
|
|
17670
|
-
let target =
|
|
18003
|
+
let target = window.event ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(window.event) : null;
|
|
17671
18004
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
|
|
17672
18005
|
tabbable: true
|
|
17673
18006
|
});
|
|
@@ -17943,7 +18276,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
17943
18276
|
onBlurWithin: (e)=>{
|
|
17944
18277
|
// Ignore when focus moves into the popover.
|
|
17945
18278
|
let dialog = document.getElementById(dialogId);
|
|
17946
|
-
if (!(dialog
|
|
18279
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(dialog, e.relatedTarget)) {
|
|
17947
18280
|
var _props_onBlur, _props_onFocusChange;
|
|
17948
18281
|
isFocused.current = false;
|
|
17949
18282
|
(_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);
|
|
@@ -18126,11 +18459,12 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18126
18459
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
18127
18460
|
textValue = monthTextValue !== textValue ? `${textValue} \u{2013} ${monthTextValue}` : monthTextValue;
|
|
18128
18461
|
} else if (segment.type === 'hour' && !segment.isPlaceholder) textValue = hourDateFormatter.format(state.dateValue);
|
|
18462
|
+
var _segment_value;
|
|
18129
18463
|
let { spinButtonProps: spinButtonProps } = ($d2e8511e6f209edf$export$e908e06f4b8e3402)({
|
|
18130
18464
|
// The ARIA spec says aria-valuenow is optional if there's no value, but aXe seems to require it.
|
|
18131
18465
|
// This doesn't seem to have any negative effects with real AT since we also use aria-valuetext.
|
|
18132
18466
|
// https://github.com/dequelabs/axe-core/issues/3505
|
|
18133
|
-
value: segment.value,
|
|
18467
|
+
value: (_segment_value = segment.value) !== null && _segment_value !== void 0 ? _segment_value : undefined,
|
|
18134
18468
|
textValue: textValue,
|
|
18135
18469
|
minValue: segment.minValue,
|
|
18136
18470
|
maxValue: segment.maxValue,
|
|
@@ -18155,11 +18489,11 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18155
18489
|
},
|
|
18156
18490
|
onIncrementToMax: ()=>{
|
|
18157
18491
|
enteredKeys.current = '';
|
|
18158
|
-
|
|
18492
|
+
state.incrementToMax(segment.type);
|
|
18159
18493
|
},
|
|
18160
18494
|
onDecrementToMin: ()=>{
|
|
18161
18495
|
enteredKeys.current = '';
|
|
18162
|
-
|
|
18496
|
+
state.decrementToMin(segment.type);
|
|
18163
18497
|
}
|
|
18164
18498
|
});
|
|
18165
18499
|
let parser = ($dbSRa$react.useMemo)(()=>new ($6c7bd7858deea686$export$cd11ab140839f11d)(locale, {
|
|
@@ -18176,7 +18510,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18176
18510
|
if (newValue.length === 0 || parsed === 0) state.clearSegment(segment.type);
|
|
18177
18511
|
else state.setSegment(segment.type, parsed);
|
|
18178
18512
|
enteredKeys.current = newValue;
|
|
18179
|
-
} else if (segment.type === 'dayPeriod') state.clearSegment(segment.type);
|
|
18513
|
+
} else if (segment.type === 'dayPeriod' || segment.type === 'era') state.clearSegment(segment.type);
|
|
18180
18514
|
};
|
|
18181
18515
|
let onKeyDown = (e)=>{
|
|
18182
18516
|
// Firefox does not fire selectstart for Ctrl/Cmd + A
|
|
@@ -18255,7 +18589,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18255
18589
|
switch(segment.type){
|
|
18256
18590
|
case 'dayPeriod':
|
|
18257
18591
|
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
18258
|
-
else if (startsWith(pm, key)) state.setSegment('dayPeriod',
|
|
18592
|
+
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 1);
|
|
18259
18593
|
else break;
|
|
18260
18594
|
focusManager.focusNext();
|
|
18261
18595
|
break;
|
|
@@ -18278,25 +18612,12 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18278
18612
|
if (!parser.isValidPartialNumber(newValue)) return;
|
|
18279
18613
|
let numberValue = parser.parse(newValue);
|
|
18280
18614
|
let segmentValue = numberValue;
|
|
18281
|
-
|
|
18282
|
-
if (segment.type === 'hour' && state.dateFormatter.resolvedOptions().hour12) {
|
|
18283
|
-
switch(state.dateFormatter.resolvedOptions().hourCycle){
|
|
18284
|
-
case 'h11':
|
|
18285
|
-
if (numberValue > 11) segmentValue = parser.parse(key);
|
|
18286
|
-
break;
|
|
18287
|
-
case 'h12':
|
|
18288
|
-
allowsZero = false;
|
|
18289
|
-
if (numberValue > 12) segmentValue = parser.parse(key);
|
|
18290
|
-
break;
|
|
18291
|
-
}
|
|
18292
|
-
if (segment.value !== undefined && segment.value >= 12 && numberValue > 1) numberValue += 12;
|
|
18293
|
-
} else if (segment.maxValue !== undefined && numberValue > segment.maxValue) segmentValue = parser.parse(key);
|
|
18615
|
+
if (segment.maxValue !== undefined && numberValue > segment.maxValue) segmentValue = parser.parse(key);
|
|
18294
18616
|
if (isNaN(numberValue)) return;
|
|
18295
|
-
|
|
18296
|
-
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
18617
|
+
state.setSegment(segment.type, segmentValue);
|
|
18297
18618
|
if (segment.maxValue !== undefined && (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length)) {
|
|
18298
18619
|
enteredKeys.current = '';
|
|
18299
|
-
|
|
18620
|
+
focusManager.focusNext();
|
|
18300
18621
|
} else enteredKeys.current = newValue;
|
|
18301
18622
|
break;
|
|
18302
18623
|
}
|
|
@@ -18313,12 +18634,11 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18313
18634
|
};
|
|
18314
18635
|
let documentRef = ($dbSRa$react.useRef)(typeof document !== 'undefined' ? document : null);
|
|
18315
18636
|
($e9faafb641e167db$export$90fc3a17d93f704c)(documentRef, 'selectionchange', ()=>{
|
|
18316
|
-
var _ref_current;
|
|
18317
18637
|
// Enforce that the selection is collapsed when inside a date segment.
|
|
18318
18638
|
// Otherwise, when tapping on a segment in Android Chrome and then entering text,
|
|
18319
18639
|
// composition events will be fired that break the DOM structure and crash the page.
|
|
18320
18640
|
let selection = window.getSelection();
|
|
18321
|
-
if ((selection === null || selection === void 0 ? void 0 : selection.anchorNode) && ((
|
|
18641
|
+
if ((selection === null || selection === void 0 ? void 0 : selection.anchorNode) && ($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, selection === null || selection === void 0 ? void 0 : selection.anchorNode)) selection.collapse(ref.current);
|
|
18322
18642
|
});
|
|
18323
18643
|
let compositionRef = ($dbSRa$react.useRef)('');
|
|
18324
18644
|
($e9faafb641e167db$export$90fc3a17d93f704c)(ref, 'beforeinput', (e)=>{
|
|
@@ -18358,7 +18678,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18358
18678
|
let element = ref.current;
|
|
18359
18679
|
return ()=>{
|
|
18360
18680
|
// If the focused segment is removed, focus the previous one, or the next one if there was no previous one.
|
|
18361
|
-
if (
|
|
18681
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() === element) {
|
|
18362
18682
|
let prev = focusManager.focusPrevious();
|
|
18363
18683
|
if (!prev) focusManager.focusNext();
|
|
18364
18684
|
}
|
|
@@ -18469,14 +18789,14 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
18469
18789
|
let isRefocusing = ($dbSRa$react.useRef)(false);
|
|
18470
18790
|
// Focus the dialog itself on mount, unless a child element is already focused.
|
|
18471
18791
|
($dbSRa$react.useEffect)(()=>{
|
|
18472
|
-
if (ref.current && !ref.current
|
|
18792
|
+
if (ref.current && !($d4ee10de306f2510$export$b4f377a2b6254582)(ref.current)) {
|
|
18473
18793
|
($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
18474
18794
|
// Safari on iOS does not move the VoiceOver cursor to the dialog
|
|
18475
18795
|
// or announce that it has opened until it has rendered. A workaround
|
|
18476
18796
|
// is to wait for half a second, then blur and re-focus the dialog.
|
|
18477
18797
|
let timeout = setTimeout(()=>{
|
|
18478
18798
|
// Check that the dialog is still focused, or focused was lost to the body.
|
|
18479
|
-
if (
|
|
18799
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() === ref.current || ($d4ee10de306f2510$export$cd4e5573fbe2b576)() === document.body) {
|
|
18480
18800
|
isRefocusing.current = true;
|
|
18481
18801
|
if (ref.current) {
|
|
18482
18802
|
ref.current.blur();
|
|
@@ -19452,10 +19772,9 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19452
19772
|
// focus to go to the item when the DOM node is reused for a different item in a virtualizer.
|
|
19453
19773
|
let keyWhenFocused = ($dbSRa$react.useRef)(null);
|
|
19454
19774
|
let focus = ()=>{
|
|
19455
|
-
var _ref_current;
|
|
19456
19775
|
// Don't shift focus to the row if the active element is a element within the row already
|
|
19457
19776
|
// (e.g. clicking on a row button)
|
|
19458
|
-
if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((
|
|
19777
|
+
if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !($d4ee10de306f2510$export$b4f377a2b6254582)(ref.current))) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
19459
19778
|
};
|
|
19460
19779
|
let treeGridRowProps = {};
|
|
19461
19780
|
let hasChildRows = props.hasChildItems;
|
|
@@ -19471,15 +19790,16 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19471
19790
|
if (onAction == null && !hasLink && state.selectionManager.selectionMode === 'none' && hasChildRows) onAction = ()=>state.toggleKey(node.key);
|
|
19472
19791
|
let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : undefined;
|
|
19473
19792
|
let setSize = 1;
|
|
19474
|
-
|
|
19793
|
+
let index = node.index;
|
|
19794
|
+
if (node.level >= 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
|
|
19475
19795
|
let parent = state.collection.getItem(node.parentKey);
|
|
19476
19796
|
if (parent) {
|
|
19477
|
-
var _state_collection_getChildren1, _state_collection1;
|
|
19478
19797
|
// siblings must exist because our original node exists
|
|
19479
|
-
let siblings = (
|
|
19798
|
+
let siblings = $4e8b0456ef72939f$var$getDirectChildren(parent, state.collection);
|
|
19480
19799
|
setSize = [
|
|
19481
19800
|
...siblings
|
|
19482
19801
|
].filter((row)=>row.type === 'item').length;
|
|
19802
|
+
if (index > 0 && siblings[0].type !== 'item') index -= 1; // subtract one for the parent item's content node
|
|
19483
19803
|
}
|
|
19484
19804
|
} else setSize = [
|
|
19485
19805
|
...state.collection
|
|
@@ -19487,7 +19807,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19487
19807
|
treeGridRowProps = {
|
|
19488
19808
|
'aria-expanded': isExpanded,
|
|
19489
19809
|
'aria-level': node.level + 1,
|
|
19490
|
-
'aria-posinset':
|
|
19810
|
+
'aria-posinset': index + 1,
|
|
19491
19811
|
'aria-setsize': setSize
|
|
19492
19812
|
};
|
|
19493
19813
|
}
|
|
@@ -19502,10 +19822,11 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19502
19822
|
linkBehavior: linkBehavior
|
|
19503
19823
|
});
|
|
19504
19824
|
let onKeyDownCapture = (e)=>{
|
|
19505
|
-
|
|
19825
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
19826
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || !ref.current || !activeElement) return;
|
|
19506
19827
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current);
|
|
19507
|
-
walker.currentNode =
|
|
19508
|
-
if ('expandedKeys' in state &&
|
|
19828
|
+
walker.currentNode = activeElement;
|
|
19829
|
+
if ('expandedKeys' in state && activeElement === ref.current) {
|
|
19509
19830
|
if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS['expand'][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && !state.expandedKeys.has(node.key)) {
|
|
19510
19831
|
state.toggleKey(node.key);
|
|
19511
19832
|
e.stopPropagation();
|
|
@@ -19586,7 +19907,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19586
19907
|
// Prevent this event from reaching row children, e.g. menu buttons. We want arrow keys to navigate
|
|
19587
19908
|
// to the row above/below instead. We need to re-dispatch the event from a higher parent so it still
|
|
19588
19909
|
// bubbles and gets handled by useSelectableCollection.
|
|
19589
|
-
if (!e.altKey && ref.current
|
|
19910
|
+
if (!e.altKey && ($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
19590
19911
|
var _ref_current_parentElement;
|
|
19591
19912
|
e.stopPropagation();
|
|
19592
19913
|
e.preventDefault();
|
|
@@ -19597,7 +19918,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19597
19918
|
};
|
|
19598
19919
|
let onFocus = (e)=>{
|
|
19599
19920
|
keyWhenFocused.current = node.key;
|
|
19600
|
-
if (e
|
|
19921
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) !== ref.current) {
|
|
19601
19922
|
// useSelectableItem only handles setting the focused key when
|
|
19602
19923
|
// the focused element is the row itself. We also want to
|
|
19603
19924
|
// set the focused key when a child element receives focus.
|
|
@@ -19609,7 +19930,8 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19609
19930
|
}
|
|
19610
19931
|
};
|
|
19611
19932
|
let onKeyDown = (e)=>{
|
|
19612
|
-
|
|
19933
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
19934
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || !ref.current || !activeElement) return;
|
|
19613
19935
|
switch(e.key){
|
|
19614
19936
|
case 'Tab':
|
|
19615
19937
|
if (keyboardNavigationBehavior === 'tab') {
|
|
@@ -19618,7 +19940,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19618
19940
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
|
|
19619
19941
|
tabbable: true
|
|
19620
19942
|
});
|
|
19621
|
-
walker.currentNode =
|
|
19943
|
+
walker.currentNode = activeElement;
|
|
19622
19944
|
let next = e.shiftKey ? walker.previousNode() : walker.nextNode();
|
|
19623
19945
|
if (next) e.stopPropagation();
|
|
19624
19946
|
}
|
|
@@ -19685,6 +20007,20 @@ function $4e8b0456ef72939f$var$last(walker) {
|
|
|
19685
20007
|
}while (last);
|
|
19686
20008
|
return next;
|
|
19687
20009
|
}
|
|
20010
|
+
function $4e8b0456ef72939f$var$getDirectChildren(parent, collection) {
|
|
20011
|
+
var _collection_getChildren;
|
|
20012
|
+
// We can't assume that we can use firstChildKey because if a person builds a tree using hooks, they would not have access to that property (using type Node vs CollectionNode)
|
|
20013
|
+
// Instead, get all children and start at the first node (rather than just using firstChildKey) and only look at its siblings
|
|
20014
|
+
let children = (_collection_getChildren = collection.getChildren) === null || _collection_getChildren === void 0 ? void 0 : _collection_getChildren.call(collection, parent.key);
|
|
20015
|
+
let childArray = children ? Array.from(children) : [];
|
|
20016
|
+
let node = childArray.length > 0 ? childArray[0] : null;
|
|
20017
|
+
let siblings = [];
|
|
20018
|
+
while(node){
|
|
20019
|
+
siblings.push(node);
|
|
20020
|
+
node = node.nextKey != null ? collection.getItem(node.nextKey) : null;
|
|
20021
|
+
}
|
|
20022
|
+
return siblings;
|
|
20023
|
+
}
|
|
19688
20024
|
|
|
19689
20025
|
/*
|
|
19690
20026
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -19907,7 +20243,7 @@ function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
|
|
|
19907
20243
|
}
|
|
19908
20244
|
e.preventDefault();
|
|
19909
20245
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(e.currentTarget, {
|
|
19910
|
-
from: e
|
|
20246
|
+
from: ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e),
|
|
19911
20247
|
accept: (node)=>node instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(node).HTMLInputElement && node.type === 'radio'
|
|
19912
20248
|
});
|
|
19913
20249
|
let nextElem;
|
|
@@ -20096,7 +20432,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
20096
20432
|
disallowEmptySelection: true,
|
|
20097
20433
|
linkBehavior: 'selection',
|
|
20098
20434
|
onBlur: (e)=>{
|
|
20099
|
-
if (e.currentTarget
|
|
20435
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) return;
|
|
20100
20436
|
if (props.onBlur) props.onBlur(e);
|
|
20101
20437
|
if (props.onFocusChange) props.onFocusChange(false);
|
|
20102
20438
|
state.setFocused(false);
|
|
@@ -20159,7 +20495,8 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
20159
20495
|
}, state, props.selectRef);
|
|
20160
20496
|
let setValue = state.setValue;
|
|
20161
20497
|
let onChange = ($dbSRa$react.useCallback)((e)=>{
|
|
20162
|
-
|
|
20498
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
20499
|
+
if (eventTarget.multiple) setValue(Array.from(eventTarget.selectedOptions, (option)=>option.value));
|
|
20163
20500
|
else setValue(e.currentTarget.value);
|
|
20164
20501
|
}, [
|
|
20165
20502
|
setValue
|
|
@@ -20207,6 +20544,9 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
20207
20544
|
...props,
|
|
20208
20545
|
selectRef: state.collection.size <= 300 ? selectRef : inputRef
|
|
20209
20546
|
}, state, triggerRef);
|
|
20547
|
+
let values = Array.isArray(state.value) ? state.value : [
|
|
20548
|
+
state.value
|
|
20549
|
+
];
|
|
20210
20550
|
// If used in a <form>, use a hidden input so the value can be submitted to a server.
|
|
20211
20551
|
// If the collection isn't too big, use a hidden <select> element for this so that browser
|
|
20212
20552
|
// autofill will work. Otherwise, use an <input type="hidden">.
|
|
@@ -20224,14 +20564,14 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
20224
20564
|
key: item.key,
|
|
20225
20565
|
value: item.key
|
|
20226
20566
|
}, item.textValue);
|
|
20227
|
-
})))
|
|
20567
|
+
}), state.collection.size === 0 && name && values.map((value, i)=>/*#__PURE__*/ ($dbSRa$react).createElement("option", {
|
|
20568
|
+
key: i,
|
|
20569
|
+
value: value !== null && value !== void 0 ? value : ''
|
|
20570
|
+
})))));
|
|
20228
20571
|
else if (name) {
|
|
20229
20572
|
let data = ($58aed456727eb0f3$export$703601b7e90536f8).get(state) || {};
|
|
20230
20573
|
let { validationBehavior: validationBehavior } = data;
|
|
20231
20574
|
// Always render at least one hidden input to ensure required form submission.
|
|
20232
|
-
let values = Array.isArray(state.value) ? state.value : [
|
|
20233
|
-
state.value
|
|
20234
|
-
];
|
|
20235
20575
|
if (values.length === 0) values = [
|
|
20236
20576
|
null
|
|
20237
20577
|
];
|
|
@@ -20727,6 +21067,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
20727
21067
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(item.props);
|
|
20728
21068
|
let linkProps = ($ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6)(item.props);
|
|
20729
21069
|
let { focusableProps: focusableProps } = ($f645667febf57a63$export$4c014de7c8940b4c)({
|
|
21070
|
+
...item.props,
|
|
20730
21071
|
isDisabled: isDisabled
|
|
20731
21072
|
}, ref);
|
|
20732
21073
|
return {
|
|
@@ -20904,11 +21245,12 @@ function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
|
|
|
20904
21245
|
const $4f118338184dc1d9$export$e2509388b49734e7 = /*#__PURE__*/ ($dbSRa$react.createContext)(null);
|
|
20905
21246
|
const $4f118338184dc1d9$export$a6c7ac8248d6e38a = /*#__PURE__*/ ($dbSRa$react.forwardRef)(function Link(props, ref) {
|
|
20906
21247
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $4f118338184dc1d9$export$e2509388b49734e7);
|
|
20907
|
-
let
|
|
21248
|
+
let elementType = props.href && !props.isDisabled ? 'a' : 'span';
|
|
20908
21249
|
let { linkProps: linkProps, isPressed: isPressed } = ($298d61e98472621b$export$dcf14c9974fe2767)({
|
|
20909
21250
|
...props,
|
|
20910
|
-
elementType:
|
|
21251
|
+
elementType: elementType
|
|
20911
21252
|
}, ref);
|
|
21253
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
20912
21254
|
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(props);
|
|
20913
21255
|
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)();
|
|
20914
21256
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
@@ -20956,7 +21298,8 @@ const $4f118338184dc1d9$export$a6c7ac8248d6e38a = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
20956
21298
|
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /*#__PURE__*/ ($dbSRa$react.createContext)({});
|
|
20957
21299
|
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($f39a9eba43920ace$export$86427a43e3e48ebb)(function Label(props, ref) {
|
|
20958
21300
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
20959
|
-
let { elementType:
|
|
21301
|
+
let { elementType: elementType = 'label', ...labelProps } = props;
|
|
21302
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
20960
21303
|
// @ts-ignore
|
|
20961
21304
|
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
20962
21305
|
className: "react-aria-Label",
|
|
@@ -21005,7 +21348,7 @@ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
21005
21348
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
21006
21349
|
global: true
|
|
21007
21350
|
});
|
|
21008
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
21351
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
21009
21352
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, progressBarProps),
|
|
21010
21353
|
ref: ref,
|
|
21011
21354
|
slot: props.slot || undefined
|
|
@@ -21087,7 +21430,7 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
21087
21430
|
global: true
|
|
21088
21431
|
});
|
|
21089
21432
|
delete DOMProps.onClick;
|
|
21090
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
21433
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).button, {
|
|
21091
21434
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
|
|
21092
21435
|
// When the button is in a pending state, we want to stop implicit form submission (ie. when the user presses enter on a text input).
|
|
21093
21436
|
// We do this by changing the button's type to button.
|
|
@@ -21109,10 +21452,11 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
21109
21452
|
}
|
|
21110
21453
|
}, renderProps.children));
|
|
21111
21454
|
});
|
|
21455
|
+
// Events to preserve when isPending is true (for tooltips and other overlays)
|
|
21456
|
+
const $d2b4bc8c273e7be6$var$PRESERVED_EVENT_PATTERN = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
|
|
21112
21457
|
function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
|
|
21113
|
-
// Don't allow interaction while isPending is true
|
|
21114
21458
|
if (isPending) {
|
|
21115
|
-
for(const key in props)if (key.startsWith('on') &&
|
|
21459
|
+
for(const key in props)if (key.startsWith('on') && !$d2b4bc8c273e7be6$var$PRESERVED_EVENT_PATTERN.test(key)) props[key] = undefined;
|
|
21116
21460
|
props.href = undefined;
|
|
21117
21461
|
props.target = undefined;
|
|
21118
21462
|
}
|
|
@@ -21134,7 +21478,8 @@ function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
|
|
|
21134
21478
|
const $514c0188e459b4c0$export$9afb8bc826b033ea = /*#__PURE__*/ ($dbSRa$react.createContext)({});
|
|
21135
21479
|
const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /*#__PURE__*/ ($dbSRa$react.forwardRef)(function Text(props, ref) {
|
|
21136
21480
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $514c0188e459b4c0$export$9afb8bc826b033ea);
|
|
21137
|
-
let { elementType:
|
|
21481
|
+
let { elementType: elementType = 'span', ...domProps } = props;
|
|
21482
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
21138
21483
|
// @ts-ignore
|
|
21139
21484
|
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
21140
21485
|
className: "react-aria-Text",
|
|
@@ -21365,7 +21710,6 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
|
21365
21710
|
isValueInvalid: isValueInvalid,
|
|
21366
21711
|
setFocusedDate (date) {
|
|
21367
21712
|
focusCell(date);
|
|
21368
|
-
setFocused(true);
|
|
21369
21713
|
},
|
|
21370
21714
|
focusNextDay () {
|
|
21371
21715
|
focusCell(focusedDate.add({
|
|
@@ -23064,6 +23408,11 @@ const $3e3ed55ab2966714$var$placeholders = new ($5b160d28a433310d$export$c17fa47
|
|
|
23064
23408
|
month: 'bb',
|
|
23065
23409
|
day: 'hh'
|
|
23066
23410
|
},
|
|
23411
|
+
is: {
|
|
23412
|
+
year: "\xe1\xe1\xe1\xe1",
|
|
23413
|
+
month: 'mm',
|
|
23414
|
+
day: 'dd'
|
|
23415
|
+
},
|
|
23067
23416
|
it: {
|
|
23068
23417
|
year: 'aaaa',
|
|
23069
23418
|
month: 'mm',
|
|
@@ -23253,6 +23602,331 @@ function $3e3ed55ab2966714$export$d3f5c5e0a5023fa0(field, value, locale) {
|
|
|
23253
23602
|
return "\u2013\u2013";
|
|
23254
23603
|
}
|
|
23255
23604
|
|
|
23605
|
+
/*
|
|
23606
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
23607
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23608
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
23609
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23610
|
+
*
|
|
23611
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23612
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
23613
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
23614
|
+
* governing permissions and limitations under the License.
|
|
23615
|
+
*/
|
|
23616
|
+
class $f863c03ccd9aead0$export$ae165b50d181e1ef {
|
|
23617
|
+
copy() {
|
|
23618
|
+
let res = new $f863c03ccd9aead0$export$ae165b50d181e1ef(this.calendar, this.hourCycle);
|
|
23619
|
+
res.era = this.era;
|
|
23620
|
+
res.year = this.year;
|
|
23621
|
+
res.month = this.month;
|
|
23622
|
+
res.day = this.day;
|
|
23623
|
+
res.hour = this.hour;
|
|
23624
|
+
res.dayPeriod = this.dayPeriod;
|
|
23625
|
+
res.minute = this.minute;
|
|
23626
|
+
res.second = this.second;
|
|
23627
|
+
res.millisecond = this.millisecond;
|
|
23628
|
+
res.offset = this.offset;
|
|
23629
|
+
return res;
|
|
23630
|
+
}
|
|
23631
|
+
/** Checks whether all the specified segments have a value. */ isComplete(segments) {
|
|
23632
|
+
return segments.every((segment)=>this[segment] != null);
|
|
23633
|
+
}
|
|
23634
|
+
/** Checks whether the given date value matches this value for the specified segments. */ validate(dt, segments) {
|
|
23635
|
+
return segments.every((segment)=>{
|
|
23636
|
+
if ((segment === 'hour' || segment === 'dayPeriod') && 'hour' in dt) {
|
|
23637
|
+
let [dayPeriod, hour] = $f863c03ccd9aead0$var$toHourCycle(dt.hour, this.hourCycle);
|
|
23638
|
+
return this.dayPeriod === dayPeriod && this.hour === hour;
|
|
23639
|
+
}
|
|
23640
|
+
return this[segment] === dt[segment];
|
|
23641
|
+
});
|
|
23642
|
+
}
|
|
23643
|
+
/** Checks if the date is empty (i.e. all specified segments are null). */ isCleared(segments) {
|
|
23644
|
+
return segments.every((segment)=>this[segment] === null);
|
|
23645
|
+
}
|
|
23646
|
+
/** Sets the given field. */ set(field, value, placeholder) {
|
|
23647
|
+
let result = this.copy();
|
|
23648
|
+
result[field] = value;
|
|
23649
|
+
if (field === 'hour' && result.dayPeriod == null && 'hour' in placeholder) result.dayPeriod = $f863c03ccd9aead0$var$toHourCycle(placeholder.hour, this.hourCycle)[0];
|
|
23650
|
+
if (field === 'year' && result.era == null) result.era = placeholder.era;
|
|
23651
|
+
// clear offset when a date/time field changes since it may no longer be valid
|
|
23652
|
+
if (field !== 'second' && field !== 'literal' && field !== 'timeZoneName') result.offset = null;
|
|
23653
|
+
return result;
|
|
23654
|
+
}
|
|
23655
|
+
/** Sets the given field to null. */ clear(field) {
|
|
23656
|
+
let result = this.copy();
|
|
23657
|
+
// @ts-ignore
|
|
23658
|
+
result[field] = null;
|
|
23659
|
+
if (field === 'year') result.era = null;
|
|
23660
|
+
// clear offset when a field is cleared since it may no longer be valid
|
|
23661
|
+
result.offset = null;
|
|
23662
|
+
return result;
|
|
23663
|
+
}
|
|
23664
|
+
/** Increments or decrements the given field. If it is null, then it is set to the placeholder value. */ cycle(field, amount, placeholder, displaySegments) {
|
|
23665
|
+
let res = this.copy();
|
|
23666
|
+
// If field is null, default to placeholder.
|
|
23667
|
+
if (res[field] == null && field !== 'dayPeriod' && field !== 'era') {
|
|
23668
|
+
if (field === 'hour' && 'hour' in placeholder) {
|
|
23669
|
+
let [dayPeriod, hour] = $f863c03ccd9aead0$var$toHourCycle(placeholder.hour, this.hourCycle);
|
|
23670
|
+
res.dayPeriod = dayPeriod;
|
|
23671
|
+
res.hour = hour;
|
|
23672
|
+
} else res[field] = placeholder[field];
|
|
23673
|
+
if (field === 'year' && res.era == null) res.era = placeholder.era;
|
|
23674
|
+
return res;
|
|
23675
|
+
}
|
|
23676
|
+
switch(field){
|
|
23677
|
+
case 'era':
|
|
23678
|
+
{
|
|
23679
|
+
let eras = this.calendar.getEras();
|
|
23680
|
+
let index = eras.indexOf(res.era);
|
|
23681
|
+
index = $f863c03ccd9aead0$var$cycleValue(index, amount, 0, eras.length - 1);
|
|
23682
|
+
res.era = eras[index];
|
|
23683
|
+
break;
|
|
23684
|
+
}
|
|
23685
|
+
case 'year':
|
|
23686
|
+
{
|
|
23687
|
+
var _this_era, _this_year, _this_month, _this_day;
|
|
23688
|
+
// Use CalendarDate to cycle so that we update the era when going between 1 AD and 1 BC.
|
|
23689
|
+
let date = new ($35ea8db9cb2ccb90$export$99faa760c7908e4f)(this.calendar, (_this_era = this.era) !== null && _this_era !== void 0 ? _this_era : placeholder.era, (_this_year = this.year) !== null && _this_year !== void 0 ? _this_year : placeholder.year, (_this_month = this.month) !== null && _this_month !== void 0 ? _this_month : 1, (_this_day = this.day) !== null && _this_day !== void 0 ? _this_day : 1);
|
|
23690
|
+
date = date.cycle(field, amount, {
|
|
23691
|
+
round: field === 'year'
|
|
23692
|
+
});
|
|
23693
|
+
res.era = date.era;
|
|
23694
|
+
res.year = date.year;
|
|
23695
|
+
break;
|
|
23696
|
+
}
|
|
23697
|
+
case 'month':
|
|
23698
|
+
var _res_month;
|
|
23699
|
+
res.month = $f863c03ccd9aead0$var$cycleValue((_res_month = res.month) !== null && _res_month !== void 0 ? _res_month : 1, amount, 1, this.calendar.getMaximumMonthsInYear());
|
|
23700
|
+
break;
|
|
23701
|
+
case 'day':
|
|
23702
|
+
var _res_day;
|
|
23703
|
+
// Allow incrementing up to the maximum number of days in any month.
|
|
23704
|
+
res.day = $f863c03ccd9aead0$var$cycleValue((_res_day = res.day) !== null && _res_day !== void 0 ? _res_day : 1, amount, 1, this.calendar.getMaximumDaysInMonth());
|
|
23705
|
+
break;
|
|
23706
|
+
case 'hour':
|
|
23707
|
+
{
|
|
23708
|
+
// if date is fully defined or it is just a time field, and we have a time zone, use toValue to get a ZonedDateTime to cycle
|
|
23709
|
+
// so DST fallback is properly handled
|
|
23710
|
+
let hasDateSegements = displaySegments.some((s)=>[
|
|
23711
|
+
'year',
|
|
23712
|
+
'month',
|
|
23713
|
+
'day'
|
|
23714
|
+
].includes(s));
|
|
23715
|
+
if ('timeZone' in placeholder && (!hasDateSegements || res.year != null && res.month != null && res.day != null)) {
|
|
23716
|
+
let date = this.toValue(placeholder);
|
|
23717
|
+
date = date.cycle('hour', amount, {
|
|
23718
|
+
hourCycle: this.hourCycle === 'h12' ? 12 : 24,
|
|
23719
|
+
round: false
|
|
23720
|
+
});
|
|
23721
|
+
let [dayPeriod, adjustedHour] = $f863c03ccd9aead0$var$toHourCycle(date.hour, this.hourCycle);
|
|
23722
|
+
res.hour = adjustedHour;
|
|
23723
|
+
res.dayPeriod = dayPeriod;
|
|
23724
|
+
res.offset = date.offset;
|
|
23725
|
+
} else {
|
|
23726
|
+
var _res_hour;
|
|
23727
|
+
let hours = (_res_hour = res.hour) !== null && _res_hour !== void 0 ? _res_hour : 0;
|
|
23728
|
+
let limits = this.getSegmentLimits('hour');
|
|
23729
|
+
res.hour = $f863c03ccd9aead0$var$cycleValue(hours, amount, limits.minValue, limits.maxValue);
|
|
23730
|
+
if (res.dayPeriod == null && 'hour' in placeholder) res.dayPeriod = $f863c03ccd9aead0$var$toHourCycle(placeholder.hour, this.hourCycle)[0];
|
|
23731
|
+
}
|
|
23732
|
+
break;
|
|
23733
|
+
}
|
|
23734
|
+
case 'dayPeriod':
|
|
23735
|
+
var _res_dayPeriod;
|
|
23736
|
+
res.dayPeriod = $f863c03ccd9aead0$var$cycleValue((_res_dayPeriod = res.dayPeriod) !== null && _res_dayPeriod !== void 0 ? _res_dayPeriod : 0, amount, 0, 1);
|
|
23737
|
+
break;
|
|
23738
|
+
case 'minute':
|
|
23739
|
+
var _res_minute;
|
|
23740
|
+
res.minute = $f863c03ccd9aead0$var$cycleValue((_res_minute = res.minute) !== null && _res_minute !== void 0 ? _res_minute : 0, amount, 0, 59, true);
|
|
23741
|
+
break;
|
|
23742
|
+
case 'second':
|
|
23743
|
+
var _res_second;
|
|
23744
|
+
res.second = $f863c03ccd9aead0$var$cycleValue((_res_second = res.second) !== null && _res_second !== void 0 ? _res_second : 0, amount, 0, 59, true);
|
|
23745
|
+
break;
|
|
23746
|
+
}
|
|
23747
|
+
return res;
|
|
23748
|
+
}
|
|
23749
|
+
/** Converts the incomplete date to a full date value, using the provided value for any unset fields. */ toValue(value) {
|
|
23750
|
+
var _this_era, _this_year, _this_month, _this_day;
|
|
23751
|
+
if ('hour' in value) {
|
|
23752
|
+
let hour = this.hour;
|
|
23753
|
+
var _this_dayPeriod;
|
|
23754
|
+
if (hour != null) hour = $f863c03ccd9aead0$var$fromHourCycle(hour, (_this_dayPeriod = this.dayPeriod) !== null && _this_dayPeriod !== void 0 ? _this_dayPeriod : 0, this.hourCycle);
|
|
23755
|
+
else if (this.hourCycle === 'h12' || this.hourCycle === 'h11') hour = this.dayPeriod === 1 ? 12 : 0;
|
|
23756
|
+
var _this_era1, _this_year1, _this_month1, _this_day1, _this_minute, _this_second, _this_millisecond;
|
|
23757
|
+
let res = value.set({
|
|
23758
|
+
era: (_this_era1 = this.era) !== null && _this_era1 !== void 0 ? _this_era1 : value.era,
|
|
23759
|
+
year: (_this_year1 = this.year) !== null && _this_year1 !== void 0 ? _this_year1 : value.year,
|
|
23760
|
+
month: (_this_month1 = this.month) !== null && _this_month1 !== void 0 ? _this_month1 : value.month,
|
|
23761
|
+
day: (_this_day1 = this.day) !== null && _this_day1 !== void 0 ? _this_day1 : value.day,
|
|
23762
|
+
hour: hour !== null && hour !== void 0 ? hour : value.hour,
|
|
23763
|
+
minute: (_this_minute = this.minute) !== null && _this_minute !== void 0 ? _this_minute : value.minute,
|
|
23764
|
+
second: (_this_second = this.second) !== null && _this_second !== void 0 ? _this_second : value.second,
|
|
23765
|
+
millisecond: (_this_millisecond = this.millisecond) !== null && _this_millisecond !== void 0 ? _this_millisecond : value.millisecond
|
|
23766
|
+
});
|
|
23767
|
+
if ('offset' in res && this.offset != null && res.offset !== this.offset) res = res.add({
|
|
23768
|
+
milliseconds: res.offset - this.offset
|
|
23769
|
+
});
|
|
23770
|
+
return res;
|
|
23771
|
+
} else return value.set({
|
|
23772
|
+
era: (_this_era = this.era) !== null && _this_era !== void 0 ? _this_era : value.era,
|
|
23773
|
+
year: (_this_year = this.year) !== null && _this_year !== void 0 ? _this_year : value.year,
|
|
23774
|
+
month: (_this_month = this.month) !== null && _this_month !== void 0 ? _this_month : value.month,
|
|
23775
|
+
day: (_this_day = this.day) !== null && _this_day !== void 0 ? _this_day : value.day
|
|
23776
|
+
});
|
|
23777
|
+
}
|
|
23778
|
+
getSegmentLimits(type) {
|
|
23779
|
+
switch(type){
|
|
23780
|
+
case 'era':
|
|
23781
|
+
{
|
|
23782
|
+
let eras = this.calendar.getEras();
|
|
23783
|
+
return {
|
|
23784
|
+
value: this.era != null ? eras.indexOf(this.era) : eras.length - 1,
|
|
23785
|
+
minValue: 0,
|
|
23786
|
+
maxValue: eras.length - 1
|
|
23787
|
+
};
|
|
23788
|
+
}
|
|
23789
|
+
case 'year':
|
|
23790
|
+
return {
|
|
23791
|
+
value: this.year,
|
|
23792
|
+
minValue: 1,
|
|
23793
|
+
maxValue: 9999
|
|
23794
|
+
};
|
|
23795
|
+
case 'month':
|
|
23796
|
+
return {
|
|
23797
|
+
value: this.month,
|
|
23798
|
+
minValue: 1,
|
|
23799
|
+
maxValue: this.calendar.getMaximumMonthsInYear()
|
|
23800
|
+
};
|
|
23801
|
+
case 'day':
|
|
23802
|
+
return {
|
|
23803
|
+
value: this.day,
|
|
23804
|
+
minValue: 1,
|
|
23805
|
+
maxValue: this.calendar.getMaximumDaysInMonth()
|
|
23806
|
+
};
|
|
23807
|
+
case 'dayPeriod':
|
|
23808
|
+
return {
|
|
23809
|
+
value: this.dayPeriod,
|
|
23810
|
+
minValue: 0,
|
|
23811
|
+
maxValue: 1
|
|
23812
|
+
};
|
|
23813
|
+
case 'hour':
|
|
23814
|
+
{
|
|
23815
|
+
let minValue = 0;
|
|
23816
|
+
let maxValue = 23;
|
|
23817
|
+
if (this.hourCycle === 'h12') {
|
|
23818
|
+
minValue = 1;
|
|
23819
|
+
maxValue = 12;
|
|
23820
|
+
} else if (this.hourCycle === 'h11') {
|
|
23821
|
+
minValue = 0;
|
|
23822
|
+
maxValue = 11;
|
|
23823
|
+
}
|
|
23824
|
+
return {
|
|
23825
|
+
value: this.hour,
|
|
23826
|
+
minValue: minValue,
|
|
23827
|
+
maxValue: maxValue
|
|
23828
|
+
};
|
|
23829
|
+
}
|
|
23830
|
+
case 'minute':
|
|
23831
|
+
return {
|
|
23832
|
+
value: this.minute,
|
|
23833
|
+
minValue: 0,
|
|
23834
|
+
maxValue: 59
|
|
23835
|
+
};
|
|
23836
|
+
case 'second':
|
|
23837
|
+
return {
|
|
23838
|
+
value: this.second,
|
|
23839
|
+
minValue: 0,
|
|
23840
|
+
maxValue: 59
|
|
23841
|
+
};
|
|
23842
|
+
}
|
|
23843
|
+
}
|
|
23844
|
+
constructor(calendar, hourCycle, dateValue){
|
|
23845
|
+
var _dateValue_era;
|
|
23846
|
+
this.era = (_dateValue_era = dateValue === null || dateValue === void 0 ? void 0 : dateValue.era) !== null && _dateValue_era !== void 0 ? _dateValue_era : null;
|
|
23847
|
+
this.calendar = calendar;
|
|
23848
|
+
var _dateValue_year;
|
|
23849
|
+
this.year = (_dateValue_year = dateValue === null || dateValue === void 0 ? void 0 : dateValue.year) !== null && _dateValue_year !== void 0 ? _dateValue_year : null;
|
|
23850
|
+
var _dateValue_month;
|
|
23851
|
+
this.month = (_dateValue_month = dateValue === null || dateValue === void 0 ? void 0 : dateValue.month) !== null && _dateValue_month !== void 0 ? _dateValue_month : null;
|
|
23852
|
+
var _dateValue_day;
|
|
23853
|
+
this.day = (_dateValue_day = dateValue === null || dateValue === void 0 ? void 0 : dateValue.day) !== null && _dateValue_day !== void 0 ? _dateValue_day : null;
|
|
23854
|
+
var _dateValue_hour;
|
|
23855
|
+
this.hour = (_dateValue_hour = dateValue === null || dateValue === void 0 ? void 0 : dateValue.hour) !== null && _dateValue_hour !== void 0 ? _dateValue_hour : null;
|
|
23856
|
+
this.hourCycle = hourCycle;
|
|
23857
|
+
this.dayPeriod = null;
|
|
23858
|
+
var _dateValue_minute;
|
|
23859
|
+
this.minute = (_dateValue_minute = dateValue === null || dateValue === void 0 ? void 0 : dateValue.minute) !== null && _dateValue_minute !== void 0 ? _dateValue_minute : null;
|
|
23860
|
+
var _dateValue_second;
|
|
23861
|
+
this.second = (_dateValue_second = dateValue === null || dateValue === void 0 ? void 0 : dateValue.second) !== null && _dateValue_second !== void 0 ? _dateValue_second : null;
|
|
23862
|
+
var _dateValue_millisecond;
|
|
23863
|
+
this.millisecond = (_dateValue_millisecond = dateValue === null || dateValue === void 0 ? void 0 : dateValue.millisecond) !== null && _dateValue_millisecond !== void 0 ? _dateValue_millisecond : null;
|
|
23864
|
+
this.offset = 'offset' in (dateValue !== null && dateValue !== void 0 ? dateValue : {}) ? dateValue.offset : null;
|
|
23865
|
+
// Convert the hour from 24 hour time to the given hour cycle.
|
|
23866
|
+
if (this.hour != null) {
|
|
23867
|
+
let [dayPeriod, hour] = $f863c03ccd9aead0$var$toHourCycle(this.hour, hourCycle);
|
|
23868
|
+
this.dayPeriod = dayPeriod;
|
|
23869
|
+
this.hour = hour;
|
|
23870
|
+
}
|
|
23871
|
+
}
|
|
23872
|
+
}
|
|
23873
|
+
function $f863c03ccd9aead0$var$cycleValue(value, amount, min, max, round = false) {
|
|
23874
|
+
if (round) {
|
|
23875
|
+
value += Math.sign(amount);
|
|
23876
|
+
if (value < min) value = max;
|
|
23877
|
+
let div = Math.abs(amount);
|
|
23878
|
+
if (amount > 0) value = Math.ceil(value / div) * div;
|
|
23879
|
+
else value = Math.floor(value / div) * div;
|
|
23880
|
+
if (value > max) value = min;
|
|
23881
|
+
} else {
|
|
23882
|
+
value += amount;
|
|
23883
|
+
if (value < min) value = max - (min - value - 1);
|
|
23884
|
+
else if (value > max) value = min + (value - max - 1);
|
|
23885
|
+
}
|
|
23886
|
+
return value;
|
|
23887
|
+
}
|
|
23888
|
+
function $f863c03ccd9aead0$var$toHourCycle(hour, hourCycle) {
|
|
23889
|
+
let dayPeriod = hour >= 12 ? 1 : 0;
|
|
23890
|
+
switch(hourCycle){
|
|
23891
|
+
case 'h11':
|
|
23892
|
+
// Hours are numbered from 0 to 11. Used in Japan.
|
|
23893
|
+
if (hour >= 12) hour -= 12;
|
|
23894
|
+
break;
|
|
23895
|
+
case 'h12':
|
|
23896
|
+
// Hours are numbered from 12 (representing 0) to 11.
|
|
23897
|
+
if (hour === 0) hour = 12;
|
|
23898
|
+
else if (hour > 12) hour -= 12;
|
|
23899
|
+
break;
|
|
23900
|
+
case 'h23':
|
|
23901
|
+
// 24 hour time, numbered 0 to 23.
|
|
23902
|
+
dayPeriod = null;
|
|
23903
|
+
break;
|
|
23904
|
+
case 'h24':
|
|
23905
|
+
// 24 hour time numbered 24 to 23. Unused but supported by Intl.DateTimeFormat.
|
|
23906
|
+
hour += 1;
|
|
23907
|
+
dayPeriod = null;
|
|
23908
|
+
}
|
|
23909
|
+
return [
|
|
23910
|
+
dayPeriod,
|
|
23911
|
+
hour
|
|
23912
|
+
];
|
|
23913
|
+
}
|
|
23914
|
+
function $f863c03ccd9aead0$var$fromHourCycle(hour, dayPeriod, hourCycle) {
|
|
23915
|
+
switch(hourCycle){
|
|
23916
|
+
case 'h11':
|
|
23917
|
+
if (dayPeriod === 1) hour += 12;
|
|
23918
|
+
break;
|
|
23919
|
+
case 'h12':
|
|
23920
|
+
if (hour === 12) hour = 0;
|
|
23921
|
+
if (dayPeriod === 1) hour += 12;
|
|
23922
|
+
break;
|
|
23923
|
+
case 'h24':
|
|
23924
|
+
hour -= 1;
|
|
23925
|
+
break;
|
|
23926
|
+
}
|
|
23927
|
+
return hour;
|
|
23928
|
+
}
|
|
23929
|
+
|
|
23256
23930
|
/*
|
|
23257
23931
|
* Copyright 2020 Adobe. All rights reserved.
|
|
23258
23932
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -23269,6 +23943,8 @@ function $3e3ed55ab2966714$export$d3f5c5e0a5023fa0(field, value, locale) {
|
|
|
23269
23943
|
|
|
23270
23944
|
|
|
23271
23945
|
|
|
23946
|
+
|
|
23947
|
+
|
|
23272
23948
|
const $3c0fc76039f1c516$var$EDITABLE_SEGMENTS = {
|
|
23273
23949
|
year: true,
|
|
23274
23950
|
month: true,
|
|
@@ -23302,12 +23978,23 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23302
23978
|
let timeZone = defaultTimeZone || 'UTC';
|
|
23303
23979
|
// props.granularity must actually exist in the value if one is provided.
|
|
23304
23980
|
if (v && !(granularity in v)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23981
|
+
// Resolve default hour cycle and calendar system.
|
|
23982
|
+
let [calendar, hourCycle] = ($dbSRa$react.useMemo)(()=>{
|
|
23983
|
+
let formatter = new ($fb18d541ea1ad717$export$ad991b66133851cf)(locale, {
|
|
23984
|
+
dateStyle: 'short',
|
|
23985
|
+
timeStyle: 'short',
|
|
23986
|
+
hour12: props.hourCycle != null ? props.hourCycle === 12 : undefined
|
|
23987
|
+
});
|
|
23988
|
+
let opts = formatter.resolvedOptions();
|
|
23989
|
+
let calendar = createCalendar(opts.calendar);
|
|
23990
|
+
return [
|
|
23991
|
+
calendar,
|
|
23992
|
+
opts.hourCycle
|
|
23993
|
+
];
|
|
23994
|
+
}, [
|
|
23995
|
+
locale,
|
|
23996
|
+
props.hourCycle,
|
|
23997
|
+
createCalendar
|
|
23311
23998
|
]);
|
|
23312
23999
|
var _props_defaultValue;
|
|
23313
24000
|
let [value, setDate] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
|
|
@@ -23319,13 +24006,8 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23319
24006
|
value,
|
|
23320
24007
|
calendar
|
|
23321
24008
|
]);
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
// is controlled, so use the placeholder as the value until all segments are entered so it doesn't
|
|
23325
|
-
// change from uncontrolled to controlled and emit a warning.
|
|
23326
|
-
let [placeholderDate, setPlaceholderDate] = ($dbSRa$react.useState)(()=>($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
|
23327
|
-
let val = calendarValue || placeholderDate;
|
|
23328
|
-
let showEra = calendar.identifier === 'gregory' && val.era === 'BC';
|
|
24009
|
+
let [displayValue, setDisplayValue] = ($dbSRa$react.useState)(()=>new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
24010
|
+
let showEra = calendar.identifier === 'gregory' && displayValue.era === 'BC';
|
|
23329
24011
|
let formatOpts = ($dbSRa$react.useMemo)(()=>{
|
|
23330
24012
|
var _props_maxGranularity;
|
|
23331
24013
|
return {
|
|
@@ -23356,76 +24038,85 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23356
24038
|
let resolvedOptions = ($dbSRa$react.useMemo)(()=>dateFormatter.resolvedOptions(), [
|
|
23357
24039
|
dateFormatter
|
|
23358
24040
|
]);
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
|
|
24041
|
+
let placeholder = ($dbSRa$react.useMemo)(()=>($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone), [
|
|
24042
|
+
props.placeholderValue,
|
|
24043
|
+
granularity,
|
|
24044
|
+
calendar,
|
|
24045
|
+
defaultTimeZone
|
|
23363
24046
|
]);
|
|
23364
|
-
let
|
|
23365
|
-
|
|
23366
|
-
|
|
23367
|
-
|
|
23368
|
-
|
|
23369
|
-
|
|
23370
|
-
|
|
23371
|
-
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
24047
|
+
let displaySegments = ($dbSRa$react.useMemo)(()=>{
|
|
24048
|
+
let is12HourClock = hourCycle === 'h11' || hourCycle === 'h12';
|
|
24049
|
+
let segments = [
|
|
24050
|
+
'era',
|
|
24051
|
+
'year',
|
|
24052
|
+
'month',
|
|
24053
|
+
'day',
|
|
24054
|
+
'hour',
|
|
24055
|
+
...is12HourClock ? [
|
|
24056
|
+
'dayPeriod'
|
|
24057
|
+
] : [],
|
|
24058
|
+
'minute',
|
|
24059
|
+
'second'
|
|
24060
|
+
];
|
|
24061
|
+
let minIndex = segments.indexOf(props.maxGranularity || 'era');
|
|
24062
|
+
let maxIndex = segments.indexOf(granularity === 'hour' && is12HourClock ? 'dayPeriod' : granularity);
|
|
24063
|
+
return segments.slice(minIndex, maxIndex + 1);
|
|
23375
24064
|
}, [
|
|
23376
|
-
|
|
24065
|
+
props.maxGranularity,
|
|
23377
24066
|
granularity,
|
|
23378
|
-
|
|
23379
|
-
defaultTimeZone,
|
|
23380
|
-
props.placeholderValue
|
|
24067
|
+
hourCycle
|
|
23381
24068
|
]);
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
validSegments = {};
|
|
23392
|
-
setValidSegments(validSegments);
|
|
23393
|
-
setPlaceholderDate(($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
|
24069
|
+
let [lastValue, setLastValue] = ($dbSRa$react.useState)(calendarValue);
|
|
24070
|
+
let [lastCalendar, setLastCalendar] = ($dbSRa$react.useState)(calendar);
|
|
24071
|
+
let [lastHourCycle, setLastHourCycle] = ($dbSRa$react.useState)(hourCycle);
|
|
24072
|
+
if (calendarValue !== lastValue || hourCycle !== lastHourCycle || !($14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(calendar, lastCalendar)) {
|
|
24073
|
+
displayValue = new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue);
|
|
24074
|
+
setLastValue(calendarValue);
|
|
24075
|
+
setLastCalendar(calendar);
|
|
24076
|
+
setLastHourCycle(hourCycle);
|
|
24077
|
+
setDisplayValue(displayValue);
|
|
23394
24078
|
}
|
|
23395
|
-
// If all segments are valid, use the date from state, otherwise use the placeholder date.
|
|
23396
|
-
let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;
|
|
23397
24079
|
let setValue = (newValue)=>{
|
|
23398
24080
|
if (props.isDisabled || props.isReadOnly) return;
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
// if all the segments are completed or a timefield with everything but am/pm set the time, also ignore when am/pm cleared
|
|
23402
|
-
if (newValue == null) {
|
|
24081
|
+
if (newValue == null || newValue instanceof ($f863c03ccd9aead0$export$ae165b50d181e1ef) && newValue.isCleared(displaySegments)) {
|
|
24082
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
23403
24083
|
setDate(null);
|
|
23404
|
-
|
|
23405
|
-
setValidSegments({});
|
|
23406
|
-
} else if (validKeys.length === 0 && clearedSegment.current == null || validKeys.length >= allKeys.length || validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod && clearedSegment.current !== 'dayPeriod') {
|
|
23407
|
-
// If the field was empty (no valid segments) or all segments are completed, commit the new value.
|
|
23408
|
-
// When committing from an empty state, mark every segment as valid so value is committed.
|
|
23409
|
-
if (validKeys.length === 0) {
|
|
23410
|
-
validSegments = {
|
|
23411
|
-
...allSegments
|
|
23412
|
-
};
|
|
23413
|
-
setValidSegments(validSegments);
|
|
23414
|
-
}
|
|
24084
|
+
} else if (!(newValue instanceof ($f863c03ccd9aead0$export$ae165b50d181e1ef))) {
|
|
23415
24085
|
// The display calendar should not have any effect on the emitted value.
|
|
23416
24086
|
// Emit dates in the same calendar as the original value, if any, otherwise gregorian.
|
|
23417
24087
|
newValue = ($11d87f3f76e88657$export$b4a036af3fc0b032)(newValue, (v === null || v === void 0 ? void 0 : v.calendar) || new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
24088
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
23418
24089
|
setDate(newValue);
|
|
23419
|
-
} else
|
|
23420
|
-
|
|
24090
|
+
} else {
|
|
24091
|
+
// If the new value is complete and valid, trigger onChange eagerly.
|
|
24092
|
+
// If it represents an incomplete or invalid value (e.g. February 30th),
|
|
24093
|
+
// wait until the field is blurred to trigger onChange.
|
|
24094
|
+
if (newValue.isComplete(displaySegments)) {
|
|
24095
|
+
let dateValue = newValue.toValue(calendarValue !== null && calendarValue !== void 0 ? calendarValue : placeholder);
|
|
24096
|
+
if (newValue.validate(dateValue, displaySegments)) {
|
|
24097
|
+
let newDateValue = ($11d87f3f76e88657$export$b4a036af3fc0b032)(dateValue, (v === null || v === void 0 ? void 0 : v.calendar) || new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
24098
|
+
if (!value || newDateValue.compare(value) !== 0) {
|
|
24099
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue)); // reset in case prop isn't updated
|
|
24100
|
+
setDate(newDateValue);
|
|
24101
|
+
return;
|
|
24102
|
+
}
|
|
24103
|
+
}
|
|
24104
|
+
}
|
|
24105
|
+
// Incomplete/invalid value. Set temporary display override.
|
|
24106
|
+
setDisplayValue(newValue);
|
|
24107
|
+
}
|
|
23421
24108
|
};
|
|
23422
|
-
let dateValue = ($dbSRa$react.useMemo)(()=>
|
|
24109
|
+
let dateValue = ($dbSRa$react.useMemo)(()=>{
|
|
24110
|
+
let v = displayValue.toValue(calendarValue !== null && calendarValue !== void 0 ? calendarValue : placeholder);
|
|
24111
|
+
return v.toDate(timeZone);
|
|
24112
|
+
}, [
|
|
23423
24113
|
displayValue,
|
|
23424
|
-
timeZone
|
|
24114
|
+
timeZone,
|
|
24115
|
+
calendarValue,
|
|
24116
|
+
placeholder
|
|
23425
24117
|
]);
|
|
23426
|
-
let segments = ($dbSRa$react.useMemo)(()=>$3c0fc76039f1c516$var$processSegments(dateValue,
|
|
24118
|
+
let segments = ($dbSRa$react.useMemo)(()=>$3c0fc76039f1c516$var$processSegments(dateValue, displayValue, dateFormatter, resolvedOptions, calendar, locale, granularity), [
|
|
23427
24119
|
dateValue,
|
|
23428
|
-
validSegments,
|
|
23429
24120
|
dateFormatter,
|
|
23430
24121
|
resolvedOptions,
|
|
23431
24122
|
displayValue,
|
|
@@ -23433,33 +24124,8 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23433
24124
|
locale,
|
|
23434
24125
|
granularity
|
|
23435
24126
|
]);
|
|
23436
|
-
// When the era field appears, mark it valid if the year field is already valid.
|
|
23437
|
-
// If the era field disappears, remove it from the valid segments.
|
|
23438
|
-
if (allSegments.era && validSegments.year && !validSegments.era) {
|
|
23439
|
-
validSegments.era = true;
|
|
23440
|
-
setValidSegments({
|
|
23441
|
-
...validSegments
|
|
23442
|
-
});
|
|
23443
|
-
} else if (!allSegments.era && validSegments.era) {
|
|
23444
|
-
delete validSegments.era;
|
|
23445
|
-
setValidSegments({
|
|
23446
|
-
...validSegments
|
|
23447
|
-
});
|
|
23448
|
-
}
|
|
23449
|
-
let markValid = (part)=>{
|
|
23450
|
-
validSegments[part] = true;
|
|
23451
|
-
if (part === 'year' && allSegments.era) validSegments.era = true;
|
|
23452
|
-
setValidSegments({
|
|
23453
|
-
...validSegments
|
|
23454
|
-
});
|
|
23455
|
-
};
|
|
23456
24127
|
let adjustSegment = (type, amount)=>{
|
|
23457
|
-
|
|
23458
|
-
markValid(type);
|
|
23459
|
-
let validKeys = Object.keys(validSegments);
|
|
23460
|
-
let allKeys = Object.keys(allSegments);
|
|
23461
|
-
if (validKeys.length >= allKeys.length || validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) setValue(displayValue);
|
|
23462
|
-
} else setValue($3c0fc76039f1c516$var$addSegment(displayValue, type, amount, resolvedOptions));
|
|
24128
|
+
setValue(displayValue.cycle(type, amount, placeholder, displaySegments));
|
|
23463
24129
|
};
|
|
23464
24130
|
let builtinValidation = ($dbSRa$react.useMemo)(()=>($35a22f14a1f04b11$export$f18627323ab57ac0)(value, minValue, maxValue, isDateUnavailable, formatOpts), [
|
|
23465
24131
|
value,
|
|
@@ -23504,48 +24170,30 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23504
24170
|
decrementPage (part) {
|
|
23505
24171
|
adjustSegment(part, -($3c0fc76039f1c516$var$PAGE_STEP[part] || 1));
|
|
23506
24172
|
},
|
|
24173
|
+
incrementToMax (part) {
|
|
24174
|
+
let maxValue = part === 'hour' && hourCycle === 'h12' ? 11 : displayValue.getSegmentLimits(part).maxValue;
|
|
24175
|
+
setValue(displayValue.set(part, maxValue, placeholder));
|
|
24176
|
+
},
|
|
24177
|
+
decrementToMin (part) {
|
|
24178
|
+
let minValue = part === 'hour' && hourCycle === 'h12' ? 12 : displayValue.getSegmentLimits(part).minValue;
|
|
24179
|
+
setValue(displayValue.set(part, minValue, placeholder));
|
|
24180
|
+
},
|
|
23507
24181
|
setSegment (part, v) {
|
|
23508
|
-
|
|
23509
|
-
setValue($3c0fc76039f1c516$var$setSegment(displayValue, part, v, resolvedOptions));
|
|
24182
|
+
setValue(displayValue.set(part, v, placeholder));
|
|
23510
24183
|
},
|
|
23511
24184
|
confirmPlaceholder () {
|
|
23512
24185
|
if (props.isDisabled || props.isReadOnly) return;
|
|
23513
|
-
//
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
|
|
23518
|
-
|
|
23519
|
-
};
|
|
23520
|
-
setValidSegments(validSegments);
|
|
23521
|
-
setValue(displayValue.copy());
|
|
24186
|
+
// If the display value is complete but invalid, we need to constrain it and emit onChange on blur.
|
|
24187
|
+
if (displayValue.isComplete(displaySegments)) {
|
|
24188
|
+
let dateValue = displayValue.toValue(calendarValue !== null && calendarValue !== void 0 ? calendarValue : placeholder);
|
|
24189
|
+
let newDateValue = ($11d87f3f76e88657$export$b4a036af3fc0b032)(dateValue, (v === null || v === void 0 ? void 0 : v.calendar) || new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
24190
|
+
if (!value || newDateValue.compare(value) !== 0) setDate(newDateValue);
|
|
24191
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
23522
24192
|
}
|
|
23523
24193
|
},
|
|
23524
24194
|
clearSegment (part) {
|
|
23525
|
-
delete validSegments[part];
|
|
23526
|
-
clearedSegment.current = part;
|
|
23527
|
-
setValidSegments({
|
|
23528
|
-
...validSegments
|
|
23529
|
-
});
|
|
23530
|
-
let placeholder = ($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone);
|
|
23531
24195
|
let value = displayValue;
|
|
23532
|
-
|
|
23533
|
-
if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {
|
|
23534
|
-
let isPM = displayValue.hour >= 12;
|
|
23535
|
-
let shouldBePM = placeholder.hour >= 12;
|
|
23536
|
-
if (isPM && !shouldBePM) value = displayValue.set({
|
|
23537
|
-
hour: displayValue.hour - 12
|
|
23538
|
-
});
|
|
23539
|
-
else if (!isPM && shouldBePM) value = displayValue.set({
|
|
23540
|
-
hour: displayValue.hour + 12
|
|
23541
|
-
});
|
|
23542
|
-
} else if (part === 'hour' && 'hour' in displayValue && displayValue.hour >= 12 && validSegments.dayPeriod) value = displayValue.set({
|
|
23543
|
-
hour: placeholder['hour'] + 12
|
|
23544
|
-
});
|
|
23545
|
-
else if (part in displayValue) value = displayValue.set({
|
|
23546
|
-
[part]: placeholder[part]
|
|
23547
|
-
});
|
|
23548
|
-
setDate(null);
|
|
24196
|
+
if (part !== 'timeZoneName' && part !== 'literal') value = displayValue.clear(part);
|
|
23549
24197
|
setValue(value);
|
|
23550
24198
|
},
|
|
23551
24199
|
formatValue (fieldOptions) {
|
|
@@ -23564,24 +24212,40 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23564
24212
|
}
|
|
23565
24213
|
};
|
|
23566
24214
|
}
|
|
23567
|
-
function $3c0fc76039f1c516$var$processSegments(dateValue,
|
|
24215
|
+
function $3c0fc76039f1c516$var$processSegments(dateValue, displayValue, dateFormatter, resolvedOptions, calendar, locale, granularity) {
|
|
23568
24216
|
let timeValue = [
|
|
23569
24217
|
'hour',
|
|
23570
24218
|
'minute',
|
|
23571
24219
|
'second'
|
|
23572
24220
|
];
|
|
23573
24221
|
let segments = dateFormatter.formatToParts(dateValue);
|
|
24222
|
+
// In order to allow formatting temporarily invalid dates during editing (e.g. February 30th),
|
|
24223
|
+
// use a NumberFormatter to manually format segments directly from raw numbers.
|
|
24224
|
+
// When the user blurs the date field, the invalid segments will be constrained.
|
|
24225
|
+
let numberFormatter = new ($488c6ddbf4ef74c2$export$cc77c4ff7e8673c5)(locale, {
|
|
24226
|
+
useGrouping: false
|
|
24227
|
+
});
|
|
24228
|
+
let twoDigitFormatter = new ($488c6ddbf4ef74c2$export$cc77c4ff7e8673c5)(locale, {
|
|
24229
|
+
useGrouping: false,
|
|
24230
|
+
minimumIntegerDigits: 2
|
|
24231
|
+
});
|
|
24232
|
+
for (let segment of segments)if (segment.type === 'year' || segment.type === 'month' || segment.type === 'day' || segment.type === 'hour') {
|
|
24233
|
+
var _displayValue_segment_type;
|
|
24234
|
+
let value = (_displayValue_segment_type = displayValue[segment.type]) !== null && _displayValue_segment_type !== void 0 ? _displayValue_segment_type : 0;
|
|
24235
|
+
if (resolvedOptions[segment.type] === '2-digit') segment.value = twoDigitFormatter.format(value);
|
|
24236
|
+
else segment.value = numberFormatter.format(value);
|
|
24237
|
+
}
|
|
23574
24238
|
let processedSegments = [];
|
|
23575
24239
|
for (let segment of segments){
|
|
23576
24240
|
let type = $3c0fc76039f1c516$var$TYPE_MAPPING[segment.type] || segment.type;
|
|
23577
24241
|
let isEditable = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type];
|
|
23578
24242
|
if (type === 'era' && calendar.getEras().length === 1) isEditable = false;
|
|
23579
|
-
let isPlaceholder = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type] &&
|
|
24243
|
+
let isPlaceholder = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type] && displayValue[segment.type] == null;
|
|
23580
24244
|
let placeholder = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type] ? ($3e3ed55ab2966714$export$d3f5c5e0a5023fa0)(type, segment.value, locale) : null;
|
|
23581
24245
|
let dateSegment = {
|
|
23582
24246
|
type: type,
|
|
23583
24247
|
text: isPlaceholder ? placeholder : segment.value,
|
|
23584
|
-
|
|
24248
|
+
...displayValue.getSegmentLimits(type),
|
|
23585
24249
|
isPlaceholder: isPlaceholder,
|
|
23586
24250
|
placeholder: placeholder,
|
|
23587
24251
|
isEditable: isEditable
|
|
@@ -23594,7 +24258,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23594
24258
|
processedSegments.push({
|
|
23595
24259
|
type: 'literal',
|
|
23596
24260
|
text: '\u2066',
|
|
23597
|
-
...$3c0fc76039f1c516$var$getSegmentLimits(displayValue, 'literal', resolvedOptions),
|
|
23598
24261
|
isPlaceholder: false,
|
|
23599
24262
|
placeholder: '',
|
|
23600
24263
|
isEditable: false
|
|
@@ -23604,7 +24267,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23604
24267
|
if (type === granularity) processedSegments.push({
|
|
23605
24268
|
type: 'literal',
|
|
23606
24269
|
text: '\u2069',
|
|
23607
|
-
...$3c0fc76039f1c516$var$getSegmentLimits(displayValue, 'literal', resolvedOptions),
|
|
23608
24270
|
isPlaceholder: false,
|
|
23609
24271
|
placeholder: '',
|
|
23610
24272
|
isEditable: false
|
|
@@ -23615,7 +24277,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23615
24277
|
processedSegments.push({
|
|
23616
24278
|
type: 'literal',
|
|
23617
24279
|
text: '\u2069',
|
|
23618
|
-
...$3c0fc76039f1c516$var$getSegmentLimits(displayValue, 'literal', resolvedOptions),
|
|
23619
24280
|
isPlaceholder: false,
|
|
23620
24281
|
placeholder: '',
|
|
23621
24282
|
isEditable: false
|
|
@@ -23625,139 +24286,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23625
24286
|
}
|
|
23626
24287
|
return processedSegments;
|
|
23627
24288
|
}
|
|
23628
|
-
function $3c0fc76039f1c516$var$getSegmentLimits(date, type, options) {
|
|
23629
|
-
switch(type){
|
|
23630
|
-
case 'era':
|
|
23631
|
-
{
|
|
23632
|
-
let eras = date.calendar.getEras();
|
|
23633
|
-
return {
|
|
23634
|
-
value: eras.indexOf(date.era),
|
|
23635
|
-
minValue: 0,
|
|
23636
|
-
maxValue: eras.length - 1
|
|
23637
|
-
};
|
|
23638
|
-
}
|
|
23639
|
-
case 'year':
|
|
23640
|
-
return {
|
|
23641
|
-
value: date.year,
|
|
23642
|
-
minValue: 1,
|
|
23643
|
-
maxValue: date.calendar.getYearsInEra(date)
|
|
23644
|
-
};
|
|
23645
|
-
case 'month':
|
|
23646
|
-
return {
|
|
23647
|
-
value: date.month,
|
|
23648
|
-
minValue: ($14e0f24ef4ac5c92$export$5412ac11713b72ad)(date),
|
|
23649
|
-
maxValue: date.calendar.getMonthsInYear(date)
|
|
23650
|
-
};
|
|
23651
|
-
case 'day':
|
|
23652
|
-
return {
|
|
23653
|
-
value: date.day,
|
|
23654
|
-
minValue: ($14e0f24ef4ac5c92$export$b2f4953d301981d5)(date),
|
|
23655
|
-
maxValue: date.calendar.getDaysInMonth(date)
|
|
23656
|
-
};
|
|
23657
|
-
}
|
|
23658
|
-
if ('hour' in date) switch(type){
|
|
23659
|
-
case 'dayPeriod':
|
|
23660
|
-
return {
|
|
23661
|
-
value: date.hour >= 12 ? 12 : 0,
|
|
23662
|
-
minValue: 0,
|
|
23663
|
-
maxValue: 12
|
|
23664
|
-
};
|
|
23665
|
-
case 'hour':
|
|
23666
|
-
if (options.hour12) {
|
|
23667
|
-
let isPM = date.hour >= 12;
|
|
23668
|
-
return {
|
|
23669
|
-
value: date.hour,
|
|
23670
|
-
minValue: isPM ? 12 : 0,
|
|
23671
|
-
maxValue: isPM ? 23 : 11
|
|
23672
|
-
};
|
|
23673
|
-
}
|
|
23674
|
-
return {
|
|
23675
|
-
value: date.hour,
|
|
23676
|
-
minValue: 0,
|
|
23677
|
-
maxValue: 23
|
|
23678
|
-
};
|
|
23679
|
-
case 'minute':
|
|
23680
|
-
return {
|
|
23681
|
-
value: date.minute,
|
|
23682
|
-
minValue: 0,
|
|
23683
|
-
maxValue: 59
|
|
23684
|
-
};
|
|
23685
|
-
case 'second':
|
|
23686
|
-
return {
|
|
23687
|
-
value: date.second,
|
|
23688
|
-
minValue: 0,
|
|
23689
|
-
maxValue: 59
|
|
23690
|
-
};
|
|
23691
|
-
}
|
|
23692
|
-
return {};
|
|
23693
|
-
}
|
|
23694
|
-
function $3c0fc76039f1c516$var$addSegment(value, part, amount, options) {
|
|
23695
|
-
switch(part){
|
|
23696
|
-
case 'era':
|
|
23697
|
-
case 'year':
|
|
23698
|
-
case 'month':
|
|
23699
|
-
case 'day':
|
|
23700
|
-
return value.cycle(part, amount, {
|
|
23701
|
-
round: part === 'year'
|
|
23702
|
-
});
|
|
23703
|
-
}
|
|
23704
|
-
if ('hour' in value) switch(part){
|
|
23705
|
-
case 'dayPeriod':
|
|
23706
|
-
{
|
|
23707
|
-
let hours = value.hour;
|
|
23708
|
-
let isPM = hours >= 12;
|
|
23709
|
-
return value.set({
|
|
23710
|
-
hour: isPM ? hours - 12 : hours + 12
|
|
23711
|
-
});
|
|
23712
|
-
}
|
|
23713
|
-
case 'hour':
|
|
23714
|
-
case 'minute':
|
|
23715
|
-
case 'second':
|
|
23716
|
-
return value.cycle(part, amount, {
|
|
23717
|
-
round: part !== 'hour',
|
|
23718
|
-
hourCycle: options.hour12 ? 12 : 24
|
|
23719
|
-
});
|
|
23720
|
-
}
|
|
23721
|
-
throw new Error('Unknown segment: ' + part);
|
|
23722
|
-
}
|
|
23723
|
-
function $3c0fc76039f1c516$var$setSegment(value, part, segmentValue, options) {
|
|
23724
|
-
switch(part){
|
|
23725
|
-
case 'day':
|
|
23726
|
-
case 'month':
|
|
23727
|
-
case 'year':
|
|
23728
|
-
case 'era':
|
|
23729
|
-
return value.set({
|
|
23730
|
-
[part]: segmentValue
|
|
23731
|
-
});
|
|
23732
|
-
}
|
|
23733
|
-
if ('hour' in value && typeof segmentValue === 'number') switch(part){
|
|
23734
|
-
case 'dayPeriod':
|
|
23735
|
-
{
|
|
23736
|
-
let hours = value.hour;
|
|
23737
|
-
let wasPM = hours >= 12;
|
|
23738
|
-
let isPM = segmentValue >= 12;
|
|
23739
|
-
if (isPM === wasPM) return value;
|
|
23740
|
-
return value.set({
|
|
23741
|
-
hour: wasPM ? hours - 12 : hours + 12
|
|
23742
|
-
});
|
|
23743
|
-
}
|
|
23744
|
-
case 'hour':
|
|
23745
|
-
// In 12 hour time, ensure that AM/PM does not change
|
|
23746
|
-
if (options.hour12) {
|
|
23747
|
-
let hours = value.hour;
|
|
23748
|
-
let wasPM = hours >= 12;
|
|
23749
|
-
if (!wasPM && segmentValue === 12) segmentValue = 0;
|
|
23750
|
-
if (wasPM && segmentValue < 12) segmentValue += 12;
|
|
23751
|
-
}
|
|
23752
|
-
// fallthrough
|
|
23753
|
-
case 'minute':
|
|
23754
|
-
case 'second':
|
|
23755
|
-
return value.set({
|
|
23756
|
-
[part]: segmentValue
|
|
23757
|
-
});
|
|
23758
|
-
}
|
|
23759
|
-
throw new Error('Unknown segment: ' + part);
|
|
23760
|
-
}
|
|
23761
24289
|
|
|
23762
24290
|
/*
|
|
23763
24291
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -24233,12 +24761,14 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
24233
24761
|
let warmupTooltip = ()=>{
|
|
24234
24762
|
closeOpenTooltips();
|
|
24235
24763
|
ensureTooltipEntry();
|
|
24236
|
-
if (!isOpen && !$8796f90736e175cb$var$
|
|
24237
|
-
$8796f90736e175cb$var$globalWarmUpTimeout
|
|
24238
|
-
$8796f90736e175cb$var$
|
|
24239
|
-
|
|
24240
|
-
|
|
24241
|
-
|
|
24764
|
+
if (!isOpen && !$8796f90736e175cb$var$globalWarmedUp) {
|
|
24765
|
+
if ($8796f90736e175cb$var$globalWarmUpTimeout) clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
|
|
24766
|
+
$8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(()=>{
|
|
24767
|
+
$8796f90736e175cb$var$globalWarmUpTimeout = null;
|
|
24768
|
+
$8796f90736e175cb$var$globalWarmedUp = true;
|
|
24769
|
+
showTooltip();
|
|
24770
|
+
}, delay);
|
|
24771
|
+
} else if (!isOpen) showTooltip();
|
|
24242
24772
|
};
|
|
24243
24773
|
($dbSRa$react.useEffect)(()=>{
|
|
24244
24774
|
closeCallback.current = close;
|
|
@@ -24308,7 +24838,7 @@ const $dfd62f934fc76fed$export$e1aef45b828286de = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
24308
24838
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24309
24839
|
global: true
|
|
24310
24840
|
});
|
|
24311
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24841
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24312
24842
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, calendarProps),
|
|
24313
24843
|
ref: ref,
|
|
24314
24844
|
slot: props.slot || undefined,
|
|
@@ -24385,7 +24915,8 @@ const $dfd62f934fc76fed$export$5bd780d491cfc46c = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
24385
24915
|
startDate: startDate,
|
|
24386
24916
|
weeksInMonth: weeksInMonth
|
|
24387
24917
|
}
|
|
24388
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24918
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).table, {
|
|
24919
|
+
render: props.render,
|
|
24389
24920
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, gridProps),
|
|
24390
24921
|
ref: ref,
|
|
24391
24922
|
style: props.style,
|
|
@@ -24399,7 +24930,8 @@ function $dfd62f934fc76fed$var$CalendarGridHeader(props, ref) {
|
|
|
24399
24930
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24400
24931
|
global: true
|
|
24401
24932
|
});
|
|
24402
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24933
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).thead, {
|
|
24934
|
+
render: props.render,
|
|
24403
24935
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, headerProps),
|
|
24404
24936
|
ref: ref,
|
|
24405
24937
|
style: style,
|
|
@@ -24416,7 +24948,8 @@ function $dfd62f934fc76fed$var$CalendarHeaderCell(props, ref) {
|
|
|
24416
24948
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24417
24949
|
global: true
|
|
24418
24950
|
});
|
|
24419
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24951
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).th, {
|
|
24952
|
+
render: props.render,
|
|
24420
24953
|
...DOMProps,
|
|
24421
24954
|
ref: ref,
|
|
24422
24955
|
style: style,
|
|
@@ -24435,7 +24968,8 @@ function $dfd62f934fc76fed$var$CalendarGridBody(props, ref) {
|
|
|
24435
24968
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24436
24969
|
global: true
|
|
24437
24970
|
});
|
|
24438
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24971
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).tbody, {
|
|
24972
|
+
render: props.render,
|
|
24439
24973
|
...DOMProps,
|
|
24440
24974
|
ref: ref,
|
|
24441
24975
|
style: style,
|
|
@@ -24516,7 +25050,7 @@ const $dfd62f934fc76fed$export$5d847498420df57b = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
24516
25050
|
return /*#__PURE__*/ ($dbSRa$react).createElement("td", {
|
|
24517
25051
|
...cellProps,
|
|
24518
25052
|
ref: ref
|
|
24519
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25053
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24520
25054
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, buttonProps, focusProps, hoverProps, dataAttrs, renderProps),
|
|
24521
25055
|
ref: buttonRef
|
|
24522
25056
|
}));
|
|
@@ -24582,7 +25116,7 @@ const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ ($dbSRa$react.cr
|
|
|
24582
25116
|
const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ ($dbSRa$react.forwardRef)(function Form(props, ref) {
|
|
24583
25117
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
|
|
24584
25118
|
let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
|
|
24585
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25119
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).form, {
|
|
24586
25120
|
noValidate: validationBehavior !== 'native',
|
|
24587
25121
|
...domProps,
|
|
24588
25122
|
ref: ref,
|
|
@@ -24648,7 +25182,7 @@ const $bc237834342dbd75$export$4aa08d5625cb8ead = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
24648
25182
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24649
25183
|
global: true
|
|
24650
25184
|
});
|
|
24651
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25185
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24652
25186
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, groupProps),
|
|
24653
25187
|
ref: ref,
|
|
24654
25188
|
slot: props.slot || undefined,
|
|
@@ -24737,7 +25271,7 @@ const $bc237834342dbd75$export$48513f6b9f8ce62d = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
24737
25271
|
});
|
|
24738
25272
|
delete DOMProps.id;
|
|
24739
25273
|
delete DOMProps.onClick;
|
|
24740
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25274
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).label, {
|
|
24741
25275
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, labelProps, hoverProps, renderProps),
|
|
24742
25276
|
ref: ref,
|
|
24743
25277
|
slot: props.slot || undefined,
|
|
@@ -24799,7 +25333,7 @@ const $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
24799
25333
|
defaultClassName: 'react-aria-Group'
|
|
24800
25334
|
});
|
|
24801
25335
|
var _props_role, _props_slot;
|
|
24802
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25336
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24803
25337
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(otherProps, focusProps, hoverProps),
|
|
24804
25338
|
...renderProps,
|
|
24805
25339
|
ref: ref,
|
|
@@ -24856,7 +25390,7 @@ const $3985021b0ad6602f$export$f5b8910cec6cf069 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
24856
25390
|
},
|
|
24857
25391
|
defaultClassName: 'react-aria-Input'
|
|
24858
25392
|
});
|
|
24859
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25393
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).input, {
|
|
24860
25394
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)($3985021b0ad6602f$var$filterHoverProps(props), focusProps, hoverProps),
|
|
24861
25395
|
...renderProps,
|
|
24862
25396
|
ref: ref,
|
|
@@ -25313,7 +25847,7 @@ function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
|
|
|
25313
25847
|
const $72a5793c14baf454$export$e0e4026c12a8bdbb = /*#__PURE__*/ ($dbSRa$react.createContext)({});
|
|
25314
25848
|
const $72a5793c14baf454$export$8b251419efc915eb = /*#__PURE__*/ ($e1995378a142960e$export$18af5c7a9e9b3664)(($23b9f4fcf0fe224b$export$5ae2504e948afce5), function Header(props, ref) {
|
|
25315
25849
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
|
|
25316
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25850
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).header, {
|
|
25317
25851
|
className: "react-aria-Header",
|
|
25318
25852
|
...props,
|
|
25319
25853
|
ref: ref
|
|
@@ -25393,6 +25927,7 @@ const $431f98aba6844401$export$1ff3c3f08ae963c0 = /*#__PURE__*/ ($e1995378a14296
|
|
|
25393
25927
|
let { elementType: elementType, orientation: orientation, style: style, className: className, slot: slot, ...otherProps } = props;
|
|
25394
25928
|
let Element = elementType || 'hr';
|
|
25395
25929
|
if (Element === 'hr' && orientation === 'vertical') Element = 'div';
|
|
25930
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[Element];
|
|
25396
25931
|
let { separatorProps: separatorProps } = ($f4b273590fab9f93$export$52210f68a14655d0)({
|
|
25397
25932
|
...otherProps,
|
|
25398
25933
|
elementType: elementType,
|
|
@@ -25401,7 +25936,8 @@ const $431f98aba6844401$export$1ff3c3f08ae963c0 = /*#__PURE__*/ ($e1995378a14296
|
|
|
25401
25936
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25402
25937
|
global: true
|
|
25403
25938
|
});
|
|
25404
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25939
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
25940
|
+
render: props.render,
|
|
25405
25941
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, separatorProps),
|
|
25406
25942
|
style: style,
|
|
25407
25943
|
className: className !== null && className !== void 0 ? className : 'react-aria-Separator',
|
|
@@ -25574,8 +26110,8 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props: props, l
|
|
|
25574
26110
|
state: state
|
|
25575
26111
|
};
|
|
25576
26112
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
25577
|
-
|
|
25578
|
-
|
|
26113
|
+
...props,
|
|
26114
|
+
children: undefined,
|
|
25579
26115
|
defaultClassName: 'react-aria-ListBox',
|
|
25580
26116
|
values: renderValues
|
|
25581
26117
|
});
|
|
@@ -25590,7 +26126,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props: props, l
|
|
|
25590
26126
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25591
26127
|
global: true
|
|
25592
26128
|
});
|
|
25593
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(($9bf71ea28793e738$export$20e40289641fbbb6), null, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26129
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($9bf71ea28793e738$export$20e40289641fbbb6), null, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25594
26130
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, listBoxProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps),
|
|
25595
26131
|
ref: listBoxRef,
|
|
25596
26132
|
slot: props.slot || undefined,
|
|
@@ -25657,16 +26193,17 @@ function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, classNam
|
|
|
25657
26193
|
'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== void 0 ? _props_arialabel : undefined
|
|
25658
26194
|
});
|
|
25659
26195
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
26196
|
+
...props,
|
|
26197
|
+
id: undefined,
|
|
26198
|
+
children: undefined,
|
|
25660
26199
|
defaultClassName: className,
|
|
25661
|
-
|
|
25662
|
-
style: props.style,
|
|
25663
|
-
values: {}
|
|
26200
|
+
values: undefined
|
|
25664
26201
|
});
|
|
25665
26202
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25666
26203
|
global: true
|
|
25667
26204
|
});
|
|
25668
26205
|
delete DOMProps.id;
|
|
25669
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26206
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).section, {
|
|
25670
26207
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, groupProps),
|
|
25671
26208
|
ref: ref
|
|
25672
26209
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($72a5793c14baf454$export$e0e4026c12a8bdbb).Provider, {
|
|
@@ -25695,6 +26232,7 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
|
|
|
25695
26232
|
onHoverChange: item.props.onHoverChange,
|
|
25696
26233
|
onHoverEnd: item.props.onHoverEnd
|
|
25697
26234
|
});
|
|
26235
|
+
let { keyboardProps: keyboardProps } = ($46d819fcbaf35654$export$8f71654801c2f7cd)(props);
|
|
25698
26236
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);
|
|
25699
26237
|
let draggableItem = null;
|
|
25700
26238
|
if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
|
|
@@ -25730,15 +26268,15 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
|
|
|
25730
26268
|
}, [
|
|
25731
26269
|
item.textValue
|
|
25732
26270
|
]);
|
|
25733
|
-
let ElementType = props.href ?
|
|
26271
|
+
let ElementType = props.href ? ($64fa3d84918910a7$export$df3a06d6289f983e).a : ($64fa3d84918910a7$export$df3a06d6289f983e).div;
|
|
25734
26272
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25735
26273
|
global: true
|
|
25736
26274
|
});
|
|
25737
26275
|
delete DOMProps.id;
|
|
25738
26276
|
delete DOMProps.onClick;
|
|
25739
|
-
if (
|
|
26277
|
+
if (props.href && optionProps.tabIndex == null) optionProps.tabIndex = -1;
|
|
25740
26278
|
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
25741
|
-
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, optionProps, hoverProps, focusProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
|
|
26279
|
+
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, optionProps, hoverProps, keyboardProps, focusProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
|
|
25742
26280
|
ref: ref,
|
|
25743
26281
|
"data-allows-dragging": !!dragState || undefined,
|
|
25744
26282
|
"data-selected": states.isSelected || undefined,
|
|
@@ -25792,10 +26330,9 @@ function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
|
|
|
25792
26330
|
isDropTarget: isDropTarget
|
|
25793
26331
|
}
|
|
25794
26332
|
});
|
|
25795
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26333
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25796
26334
|
...dropIndicatorProps,
|
|
25797
26335
|
...renderProps,
|
|
25798
|
-
// eslint-disable-next-line
|
|
25799
26336
|
role: "option",
|
|
25800
26337
|
ref: ref,
|
|
25801
26338
|
"data-drop-target": isDropTarget || undefined
|
|
@@ -25822,7 +26359,7 @@ const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /*#__PURE__*/ ($dbS
|
|
|
25822
26359
|
id: undefined,
|
|
25823
26360
|
children: item.rendered,
|
|
25824
26361
|
defaultClassName: 'react-aria-ListBoxLoadingIndicator',
|
|
25825
|
-
values:
|
|
26362
|
+
values: undefined
|
|
25826
26363
|
});
|
|
25827
26364
|
let optionProps = {
|
|
25828
26365
|
// For Android talkback
|
|
@@ -25843,13 +26380,12 @@ const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /*#__PURE__*/ ($dbS
|
|
|
25843
26380
|
height: 1,
|
|
25844
26381
|
width: 1
|
|
25845
26382
|
}
|
|
25846
|
-
})), isLoading && renderProps.children && /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26383
|
+
})), isLoading && renderProps.children && /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25847
26384
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25848
26385
|
global: true
|
|
25849
26386
|
}), optionProps),
|
|
25850
26387
|
...renderProps,
|
|
25851
26388
|
// aria-selected isn't needed here since this option is not selectable.
|
|
25852
|
-
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
25853
26389
|
role: "option",
|
|
25854
26390
|
ref: ref
|
|
25855
26391
|
}, renderProps.children));
|
|
@@ -25890,7 +26426,7 @@ const $44f671af83e7d9e0$export$746d02f47f4d381 = /*#__PURE__*/ ($dbSRa$react.for
|
|
|
25890
26426
|
// spread merged with the other style object
|
|
25891
26427
|
if (renderProps.style) Object.keys(renderProps.style).forEach((key)=>renderProps.style[key] === undefined && delete renderProps.style[key]);
|
|
25892
26428
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
25893
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26429
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25894
26430
|
...DOMProps,
|
|
25895
26431
|
...renderProps,
|
|
25896
26432
|
style: {
|
|
@@ -25995,7 +26531,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
25995
26531
|
// Focus the popover itself on mount, unless a child element is already focused.
|
|
25996
26532
|
// Skip this for submenus since hovering a submenutrigger should keep focus on the trigger
|
|
25997
26533
|
($dbSRa$react.useEffect)(()=>{
|
|
25998
|
-
if (isDialog && props.trigger !== 'SubmenuTrigger' && ref.current && !ref.current
|
|
26534
|
+
if (isDialog && (props.trigger !== 'SubmenuTrigger' || ($507fabe10e71c6fb$export$630ff653c5ada6a9)() !== 'pointer') && ref.current && !($d4ee10de306f2510$export$b4f377a2b6254582)(ref.current)) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
25999
26535
|
}, [
|
|
26000
26536
|
isDialog,
|
|
26001
26537
|
ref,
|
|
@@ -26016,7 +26552,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
26016
26552
|
'--trigger-anchor-point': triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : undefined,
|
|
26017
26553
|
...renderProps.style
|
|
26018
26554
|
};
|
|
26019
|
-
let overlay = /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26555
|
+
let overlay = /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26020
26556
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
26021
26557
|
global: true
|
|
26022
26558
|
}), popoverProps),
|
|
@@ -26196,8 +26732,9 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26196
26732
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
26197
26733
|
global: true
|
|
26198
26734
|
});
|
|
26199
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26735
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).section, {
|
|
26200
26736
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, dialogProps),
|
|
26737
|
+
render: props.render,
|
|
26201
26738
|
ref: ref,
|
|
26202
26739
|
slot: props.slot || undefined
|
|
26203
26740
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
@@ -26242,6 +26779,7 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26242
26779
|
*/
|
|
26243
26780
|
|
|
26244
26781
|
|
|
26782
|
+
|
|
26245
26783
|
const $c699643d2073b351$var$dateSegments = [
|
|
26246
26784
|
'day',
|
|
26247
26785
|
'month',
|
|
@@ -26265,7 +26803,11 @@ function $c699643d2073b351$export$f6a685cd1acbd1fa(props, state) {
|
|
|
26265
26803
|
let inputStep = 60;
|
|
26266
26804
|
if (state.granularity === 'second') inputStep = 1;
|
|
26267
26805
|
else if (state.granularity === 'hour') inputStep = 3600;
|
|
26268
|
-
let dateValue =
|
|
26806
|
+
let dateValue = '';
|
|
26807
|
+
if (state.value) {
|
|
26808
|
+
if (state.granularity === 'day') dateValue = ($11d87f3f76e88657$export$93522d1a439f3617)(state.value).toString();
|
|
26809
|
+
else dateValue = ($11d87f3f76e88657$export$b21e0b124e224484)('timeZone' in state.value ? ($11d87f3f76e88657$export$d9b67bc93c097491)(state.value) : state.value).toString();
|
|
26810
|
+
}
|
|
26269
26811
|
let inputType = state.granularity === 'day' ? 'date' : 'datetime-local';
|
|
26270
26812
|
let timeSegments = [
|
|
26271
26813
|
'hour',
|
|
@@ -26298,7 +26840,7 @@ function $c699643d2073b351$export$f6a685cd1acbd1fa(props, state) {
|
|
|
26298
26840
|
step: inputStep,
|
|
26299
26841
|
value: dateValue,
|
|
26300
26842
|
onChange: (e)=>{
|
|
26301
|
-
let targetString = e.
|
|
26843
|
+
let targetString = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).value.toString();
|
|
26302
26844
|
if (targetString) try {
|
|
26303
26845
|
let targetValue = (0, $fae977aafc393c5c$export$588937bcd60ade55)(targetString);
|
|
26304
26846
|
if (state.granularity === 'day') targetValue = (0, $fae977aafc393c5c$export$6b862160d295c8e)(targetString);
|
|
@@ -26386,7 +26928,8 @@ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26386
26928
|
state: state,
|
|
26387
26929
|
isInvalid: state.isInvalid,
|
|
26388
26930
|
isDisabled: state.isDisabled,
|
|
26389
|
-
isReadOnly: state.isReadOnly
|
|
26931
|
+
isReadOnly: state.isReadOnly,
|
|
26932
|
+
isRequired: props.isRequired || false
|
|
26390
26933
|
},
|
|
26391
26934
|
defaultClassName: 'react-aria-TimeField'
|
|
26392
26935
|
});
|
|
@@ -26438,14 +26981,15 @@ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26438
26981
|
validation
|
|
26439
26982
|
]
|
|
26440
26983
|
]
|
|
26441
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26984
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26442
26985
|
...DOMProps,
|
|
26443
26986
|
...renderProps,
|
|
26444
26987
|
ref: ref,
|
|
26445
26988
|
slot: props.slot || undefined,
|
|
26446
26989
|
"data-invalid": state.isInvalid || undefined,
|
|
26447
26990
|
"data-disabled": state.isDisabled || undefined,
|
|
26448
|
-
"data-readonly": state.isReadOnly || undefined
|
|
26991
|
+
"data-readonly": state.isReadOnly || undefined,
|
|
26992
|
+
"data-required": props.isRequired || undefined
|
|
26449
26993
|
}));
|
|
26450
26994
|
});
|
|
26451
26995
|
const $40825cdb76e74f70$export$7edc06cf1783b30f = /*#__PURE__*/ ($dbSRa$react.forwardRef)(function DateInput(props, ref) {
|
|
@@ -26545,7 +27089,7 @@ const $40825cdb76e74f70$export$336ab7fa954c4b5f = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26545
27089
|
defaultChildren: segment.text,
|
|
26546
27090
|
defaultClassName: 'react-aria-DateSegment'
|
|
26547
27091
|
});
|
|
26548
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27092
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).span, {
|
|
26549
27093
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(otherProps, {
|
|
26550
27094
|
global: true
|
|
26551
27095
|
}), segmentProps, focusProps, hoverProps),
|
|
@@ -26635,7 +27179,8 @@ const $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26635
27179
|
isDisabled: props.isDisabled || false,
|
|
26636
27180
|
isInvalid: state.isInvalid,
|
|
26637
27181
|
isOpen: state.isOpen,
|
|
26638
|
-
isReadOnly: props.isReadOnly || false
|
|
27182
|
+
isReadOnly: props.isReadOnly || false,
|
|
27183
|
+
isRequired: props.isRequired || false
|
|
26639
27184
|
},
|
|
26640
27185
|
defaultClassName: 'react-aria-DatePicker'
|
|
26641
27186
|
});
|
|
@@ -26714,7 +27259,7 @@ const $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26714
27259
|
validation
|
|
26715
27260
|
]
|
|
26716
27261
|
]
|
|
26717
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27262
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26718
27263
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, focusProps),
|
|
26719
27264
|
ref: ref,
|
|
26720
27265
|
slot: props.slot || undefined,
|
|
@@ -26723,6 +27268,7 @@ const $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26723
27268
|
"data-focus-visible": isFocusVisible || undefined,
|
|
26724
27269
|
"data-disabled": props.isDisabled || undefined,
|
|
26725
27270
|
"data-readonly": props.isReadOnly || undefined,
|
|
27271
|
+
"data-required": props.isRequired || undefined,
|
|
26726
27272
|
"data-open": state.isOpen || undefined
|
|
26727
27273
|
}), /*#__PURE__*/ ($dbSRa$react).createElement(($c699643d2073b351$export$eefa3e19139f00f3), {
|
|
26728
27274
|
autoComplete: props.autoComplete,
|
|
@@ -26762,7 +27308,7 @@ const $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26762
27308
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
26763
27309
|
global: true
|
|
26764
27310
|
});
|
|
26765
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27311
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26766
27312
|
...domProps,
|
|
26767
27313
|
...renderProps,
|
|
26768
27314
|
ref: ref,
|
|
@@ -26839,7 +27385,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26839
27385
|
state
|
|
26840
27386
|
]
|
|
26841
27387
|
]
|
|
26842
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27388
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26843
27389
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, renderProps, focusWithinProps),
|
|
26844
27390
|
ref: ref,
|
|
26845
27391
|
"data-expanded": state.isExpanded || undefined,
|
|
@@ -26864,7 +27410,7 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26864
27410
|
global: true,
|
|
26865
27411
|
labelable: true
|
|
26866
27412
|
});
|
|
26867
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27413
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26868
27414
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, panelProps, focusWithinProps),
|
|
26869
27415
|
ref: ($5dc95899b306f630$export$c9058316764c140e)(ref, panelRef),
|
|
26870
27416
|
role: role,
|
|
@@ -26895,7 +27441,7 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
26895
27441
|
const $5cb03073d3f54797$export$a8a3e93435678ff9 = /*#__PURE__*/ ($dbSRa$react.forwardRef)(function Heading(props, ref) {
|
|
26896
27442
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, ($4e85f108e88277b8$export$d688439359537581));
|
|
26897
27443
|
let { children: children, level: level = 3, className: className, ...domProps } = props;
|
|
26898
|
-
let Element = `h${level}
|
|
27444
|
+
let Element = ($64fa3d84918910a7$export$df3a06d6289f983e)[`h${level}`];
|
|
26899
27445
|
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, {
|
|
26900
27446
|
...domProps,
|
|
26901
27447
|
ref: ref,
|
|
@@ -27015,7 +27561,7 @@ function $f3f84453ead64de5$var$ModalOverlayInner({ UNSTABLE_portalContainer: UNS
|
|
|
27015
27561
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($337b884510726a0d$export$c6fdb837b070b4ff), {
|
|
27016
27562
|
isExiting: props.isExiting,
|
|
27017
27563
|
portalContainer: UNSTABLE_portalContainer
|
|
27018
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27564
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27019
27565
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27020
27566
|
global: true
|
|
27021
27567
|
}), underlayProps),
|
|
@@ -27060,7 +27606,7 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
27060
27606
|
state: state
|
|
27061
27607
|
}
|
|
27062
27608
|
});
|
|
27063
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27609
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27064
27610
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27065
27611
|
global: true
|
|
27066
27612
|
}), modalProps),
|
|
@@ -27176,7 +27722,7 @@ const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
27176
27722
|
validation
|
|
27177
27723
|
]
|
|
27178
27724
|
]
|
|
27179
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27725
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27180
27726
|
...DOMProps,
|
|
27181
27727
|
...renderProps,
|
|
27182
27728
|
ref: ref,
|
|
@@ -27247,7 +27793,7 @@ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
27247
27793
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27248
27794
|
global: true
|
|
27249
27795
|
});
|
|
27250
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27796
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27251
27797
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, radioGroupProps),
|
|
27252
27798
|
ref: ref,
|
|
27253
27799
|
slot: props.slot || undefined,
|
|
@@ -27325,7 +27871,7 @@ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
27325
27871
|
});
|
|
27326
27872
|
delete DOMProps.id;
|
|
27327
27873
|
delete DOMProps.onClick;
|
|
27328
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27874
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).label, {
|
|
27329
27875
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, labelProps, hoverProps, renderProps),
|
|
27330
27876
|
ref: ref,
|
|
27331
27877
|
"data-selected": isSelected || undefined,
|
|
@@ -27542,7 +28088,7 @@ function $82d7e5349645de74$var$SelectInner({ props: props, selectRef: ref, colle
|
|
|
27542
28088
|
validation
|
|
27543
28089
|
]
|
|
27544
28090
|
]
|
|
27545
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28091
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27546
28092
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, focusProps),
|
|
27547
28093
|
ref: ref,
|
|
27548
28094
|
slot: props.slot || undefined,
|
|
@@ -27634,7 +28180,7 @@ const $82d7e5349645de74$export$e288731fd71264f0 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
27634
28180
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27635
28181
|
global: true
|
|
27636
28182
|
});
|
|
27637
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28183
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).span, {
|
|
27638
28184
|
ref: ref,
|
|
27639
28185
|
...DOMProps,
|
|
27640
28186
|
...renderProps,
|
|
@@ -27695,7 +28241,7 @@ const $8e59e948500a8fe1$export$b5d5cf8927ab7262 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
27695
28241
|
});
|
|
27696
28242
|
delete DOMProps.id;
|
|
27697
28243
|
delete DOMProps.onClick;
|
|
27698
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28244
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).label, {
|
|
27699
28245
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, labelProps, hoverProps, renderProps),
|
|
27700
28246
|
ref: ref,
|
|
27701
28247
|
slot: props.slot || undefined,
|
|
@@ -27780,7 +28326,8 @@ function $eaf9e70818b436db$var$TagGroupInner({ props: props, forwardedRef: ref,
|
|
|
27780
28326
|
label: label
|
|
27781
28327
|
}, filteredState, tagListRef);
|
|
27782
28328
|
var _props_className;
|
|
27783
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28329
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28330
|
+
render: props.render,
|
|
27784
28331
|
...domProps,
|
|
27785
28332
|
id: id,
|
|
27786
28333
|
ref: ref,
|
|
@@ -27839,8 +28386,8 @@ function $eaf9e70818b436db$var$TagListInner({ props: props, forwardedRef: forwar
|
|
|
27839
28386
|
state: state
|
|
27840
28387
|
};
|
|
27841
28388
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
27842
|
-
|
|
27843
|
-
|
|
28389
|
+
...props,
|
|
28390
|
+
children: undefined,
|
|
27844
28391
|
defaultClassName: 'react-aria-TagList',
|
|
27845
28392
|
values: renderValues
|
|
27846
28393
|
});
|
|
@@ -27848,7 +28395,7 @@ function $eaf9e70818b436db$var$TagListInner({ props: props, forwardedRef: forwar
|
|
|
27848
28395
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27849
28396
|
global: true
|
|
27850
28397
|
});
|
|
27851
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28398
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27852
28399
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, gridProps, focusProps),
|
|
27853
28400
|
ref: ref,
|
|
27854
28401
|
"data-empty": state.collection.size === 0 || undefined,
|
|
@@ -27897,7 +28444,7 @@ const $eaf9e70818b436db$export$3288d34c523a1192 = /*#__PURE__*/ ($e1995378a14296
|
|
|
27897
28444
|
});
|
|
27898
28445
|
delete DOMProps.id;
|
|
27899
28446
|
delete DOMProps.onClick;
|
|
27900
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28447
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27901
28448
|
ref: ref,
|
|
27902
28449
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, rowProps, focusProps, hoverProps),
|
|
27903
28450
|
"data-selected": states.isSelected || undefined,
|
|
@@ -27962,7 +28509,7 @@ const $216918bed6669f72$export$f5c9f3c2c4054eec = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
27962
28509
|
},
|
|
27963
28510
|
defaultClassName: 'react-aria-TextArea'
|
|
27964
28511
|
});
|
|
27965
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28512
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).textarea, {
|
|
27966
28513
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)($216918bed6669f72$var$filterHoverProps(props), focusProps, hoverProps),
|
|
27967
28514
|
...renderProps,
|
|
27968
28515
|
ref: ref,
|
|
@@ -28035,7 +28582,7 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
28035
28582
|
global: true
|
|
28036
28583
|
});
|
|
28037
28584
|
delete DOMProps.id;
|
|
28038
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28585
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28039
28586
|
...DOMProps,
|
|
28040
28587
|
...renderProps,
|
|
28041
28588
|
ref: ref,
|
|
@@ -28126,7 +28673,7 @@ const $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
28126
28673
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
28127
28674
|
global: true
|
|
28128
28675
|
});
|
|
28129
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28676
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28130
28677
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, groupProps),
|
|
28131
28678
|
ref: ref,
|
|
28132
28679
|
slot: props.slot || undefined,
|
|
@@ -28172,7 +28719,10 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
28172
28719
|
id: props.id != null ? String(props.id) : undefined
|
|
28173
28720
|
}, state, ref);
|
|
28174
28721
|
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)(props);
|
|
28175
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(
|
|
28722
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
|
|
28723
|
+
...props,
|
|
28724
|
+
isDisabled: isDisabled
|
|
28725
|
+
});
|
|
28176
28726
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
28177
28727
|
...props,
|
|
28178
28728
|
id: undefined,
|
|
@@ -28192,7 +28742,7 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ ($dbSRa$react.fo
|
|
|
28192
28742
|
});
|
|
28193
28743
|
delete DOMProps.id;
|
|
28194
28744
|
delete DOMProps.onClick;
|
|
28195
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28745
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).button, {
|
|
28196
28746
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
|
|
28197
28747
|
ref: ref,
|
|
28198
28748
|
slot: props.slot || undefined,
|
|
@@ -28298,7 +28848,7 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
28298
28848
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
28299
28849
|
global: true
|
|
28300
28850
|
});
|
|
28301
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28851
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28302
28852
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, tooltipProps),
|
|
28303
28853
|
ref: props.tooltipRef,
|
|
28304
28854
|
style: {
|