@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/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
|
-
import $dbSRa$react, { createContext, useState, useRef, useCallback, useContext, useEffect, useMemo, version, useReducer,
|
|
2
|
+
import $dbSRa$react, { createContext, useState, useRef, useCallback, useContext, useEffect, useMemo, version, useReducer, forwardRef, cloneElement, isValidElement, Fragment, createElement } from 'react';
|
|
3
3
|
import $4AOtR$reactdom, { flushSync, createPortal } from 'react-dom';
|
|
4
4
|
|
|
5
5
|
function styleInject(css, ref) {
|
|
@@ -351,7 +351,7 @@ function $f4e2df6bd15f8569$export$98658e8c59125e6a() {
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
|
|
354
|
-
|
|
354
|
+
/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
|
|
355
355
|
|
|
356
356
|
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
|
|
357
357
|
if (!($f4e2df6bd15f8569$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
@@ -375,11 +375,23 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
|
|
|
375
375
|
return activeElement;
|
|
376
376
|
};
|
|
377
377
|
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
|
|
378
|
-
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target.shadowRoot) {
|
|
379
|
-
|
|
378
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)() && event.target instanceof Element && event.target.shadowRoot) {
|
|
379
|
+
var _event_composedPath_, _event_nativeEvent_composedPath_;
|
|
380
|
+
if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
|
|
381
|
+
else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
|
|
380
382
|
}
|
|
381
383
|
return event.target;
|
|
382
384
|
}
|
|
385
|
+
function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
|
|
386
|
+
if (!node) return false;
|
|
387
|
+
// Get the active element within the node's parent shadow root (or the document). Can return null.
|
|
388
|
+
let root = node.getRootNode();
|
|
389
|
+
let ownerWindow = ($431fbd86ca7dc216$export$f21a1ffae260145a)(node);
|
|
390
|
+
if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
|
|
391
|
+
let activeElement = root.activeElement;
|
|
392
|
+
// Check if the active element is within this node. These nodes are within the same shadow root.
|
|
393
|
+
return activeElement != null && node.contains(activeElement);
|
|
394
|
+
}
|
|
383
395
|
|
|
384
396
|
// https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/ShadowTreeWalker.ts
|
|
385
397
|
|
|
@@ -569,6 +581,38 @@ function $dfc540311bf7f109$export$4d0f8be8b12a7ef6(doc, root, whatToShow, filter
|
|
|
569
581
|
return doc.createTreeWalker(root, whatToShow, filter);
|
|
570
582
|
}
|
|
571
583
|
|
|
584
|
+
/*
|
|
585
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
586
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
587
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
588
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
589
|
+
*
|
|
590
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
591
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
592
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
593
|
+
* governing permissions and limitations under the License.
|
|
594
|
+
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
595
|
+
if (refs.length === 1 && refs[0]) return refs[0];
|
|
596
|
+
return (value)=>{
|
|
597
|
+
let hasCleanup = false;
|
|
598
|
+
const cleanups = refs.map((ref)=>{
|
|
599
|
+
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
600
|
+
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
601
|
+
return cleanup;
|
|
602
|
+
});
|
|
603
|
+
if (hasCleanup) return ()=>{
|
|
604
|
+
cleanups.forEach((cleanup, i)=>{
|
|
605
|
+
if (typeof cleanup === 'function') cleanup();
|
|
606
|
+
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
612
|
+
if (typeof ref === 'function') return ref(value);
|
|
613
|
+
else if (ref != null) ref.current = value;
|
|
614
|
+
}
|
|
615
|
+
|
|
572
616
|
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}
|
|
573
617
|
|
|
574
618
|
/*
|
|
@@ -584,6 +628,7 @@ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else i
|
|
|
584
628
|
*/
|
|
585
629
|
|
|
586
630
|
|
|
631
|
+
|
|
587
632
|
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
588
633
|
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
589
634
|
// with an empty object and adding properties as we go.
|
|
@@ -600,44 +645,13 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
600
645
|
key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = ($ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
601
646
|
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (clsx)(a, b);
|
|
602
647
|
else if (key === 'id' && a && b) result.id = ($bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
648
|
+
else if (key === 'ref' && a && b) result.ref = ($5dc95899b306f630$export$c9058316764c140e)(a, b);
|
|
603
649
|
else result[key] = b !== undefined ? b : a;
|
|
604
650
|
}
|
|
605
651
|
}
|
|
606
652
|
return result;
|
|
607
653
|
}
|
|
608
654
|
|
|
609
|
-
/*
|
|
610
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
611
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
612
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
613
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
614
|
-
*
|
|
615
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
616
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
617
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
618
|
-
* governing permissions and limitations under the License.
|
|
619
|
-
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
620
|
-
if (refs.length === 1 && refs[0]) return refs[0];
|
|
621
|
-
return (value)=>{
|
|
622
|
-
let hasCleanup = false;
|
|
623
|
-
const cleanups = refs.map((ref)=>{
|
|
624
|
-
const cleanup = $5dc95899b306f630$var$setRef(ref, value);
|
|
625
|
-
hasCleanup || (hasCleanup = typeof cleanup == 'function');
|
|
626
|
-
return cleanup;
|
|
627
|
-
});
|
|
628
|
-
if (hasCleanup) return ()=>{
|
|
629
|
-
cleanups.forEach((cleanup, i)=>{
|
|
630
|
-
if (typeof cleanup === 'function') cleanup();
|
|
631
|
-
else $5dc95899b306f630$var$setRef(refs[i], null);
|
|
632
|
-
});
|
|
633
|
-
};
|
|
634
|
-
};
|
|
635
|
-
}
|
|
636
|
-
function $5dc95899b306f630$var$setRef(ref, value) {
|
|
637
|
-
if (typeof ref === 'function') return ref(value);
|
|
638
|
-
else if (ref != null) ref.current = value;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
655
|
/*
|
|
642
656
|
* Copyright 2020 Adobe. All rights reserved.
|
|
643
657
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -972,6 +986,7 @@ function $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f(e, router, href, routerOption
|
|
|
972
986
|
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
973
987
|
// than one or the other. So we need to track what's actually transitioning so that
|
|
974
988
|
// we can ignore these duplicate events.
|
|
989
|
+
|
|
975
990
|
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
976
991
|
// A list of callbacks to call once there are no transitioning elements.
|
|
977
992
|
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
@@ -981,31 +996,33 @@ function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
|
981
996
|
return 'propertyName' in event;
|
|
982
997
|
}
|
|
983
998
|
let onTransitionStart = (e)=>{
|
|
984
|
-
|
|
999
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
1000
|
+
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
985
1001
|
// Add the transitioning property to the list for this element.
|
|
986
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
1002
|
+
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
|
|
987
1003
|
if (!transitions) {
|
|
988
1004
|
transitions = new Set();
|
|
989
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(
|
|
1005
|
+
$bbed8b41f857bcc0$var$transitionsByElement.set(eventTarget, transitions);
|
|
990
1006
|
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
991
1007
|
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
992
1008
|
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
993
|
-
|
|
1009
|
+
eventTarget.addEventListener('transitioncancel', onTransitionEnd, {
|
|
994
1010
|
once: true
|
|
995
1011
|
});
|
|
996
1012
|
}
|
|
997
1013
|
transitions.add(e.propertyName);
|
|
998
1014
|
};
|
|
999
1015
|
let onTransitionEnd = (e)=>{
|
|
1000
|
-
|
|
1016
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
1017
|
+
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
1001
1018
|
// Remove property from list of transitioning properties.
|
|
1002
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(
|
|
1019
|
+
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(eventTarget);
|
|
1003
1020
|
if (!properties) return;
|
|
1004
1021
|
properties.delete(e.propertyName);
|
|
1005
1022
|
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
1006
1023
|
if (properties.size === 0) {
|
|
1007
|
-
|
|
1008
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(
|
|
1024
|
+
eventTarget.removeEventListener('transitioncancel', onTransitionEnd);
|
|
1025
|
+
$bbed8b41f857bcc0$var$transitionsByElement.delete(eventTarget);
|
|
1009
1026
|
}
|
|
1010
1027
|
// If no transitioning elements, call all of the queued callbacks.
|
|
1011
1028
|
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
@@ -1333,7 +1350,10 @@ function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
1333
1350
|
*/ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
1334
1351
|
if (!node) return false;
|
|
1335
1352
|
let style = window.getComputedStyle(node);
|
|
1353
|
+
let root = document.scrollingElement || document.documentElement;
|
|
1336
1354
|
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
1355
|
+
// Root element has `visible` overflow by default, but is scrollable nonetheless.
|
|
1356
|
+
if (node === root && style.overflow !== 'hidden') isScrollable = true;
|
|
1337
1357
|
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
1338
1358
|
return isScrollable;
|
|
1339
1359
|
}
|
|
@@ -1368,12 +1388,13 @@ function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
|
1368
1388
|
* governing permissions and limitations under the License.
|
|
1369
1389
|
*/
|
|
1370
1390
|
function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1391
|
+
let parentElements = [];
|
|
1392
|
+
let root = document.scrollingElement || document.documentElement;
|
|
1393
|
+
do {
|
|
1394
|
+
if (($cc38e7bd3fc7b213$export$2bb74740c4e19def)(node, checkForOverflow)) parentElements.push(node);
|
|
1374
1395
|
node = node.parentElement;
|
|
1375
|
-
}
|
|
1376
|
-
return
|
|
1396
|
+
}while (node && node !== root);
|
|
1397
|
+
return parentElements;
|
|
1377
1398
|
}
|
|
1378
1399
|
|
|
1379
1400
|
/*
|
|
@@ -1420,6 +1441,8 @@ function $21f1aa98acb08317$export$c57958e35f31ed73(target) {
|
|
|
1420
1441
|
*/
|
|
1421
1442
|
|
|
1422
1443
|
|
|
1444
|
+
|
|
1445
|
+
|
|
1423
1446
|
let $5df64b3807dc15ee$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
1424
1447
|
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
1425
1448
|
let isSSR = ($b5e257d569688ac6$export$535bd6ca7f90a273)();
|
|
@@ -1428,39 +1451,39 @@ function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
|
1428
1451
|
height: 0
|
|
1429
1452
|
} : $5df64b3807dc15ee$var$getViewportSize());
|
|
1430
1453
|
(useEffect)(()=>{
|
|
1431
|
-
|
|
1432
|
-
let onResize = ()=>{
|
|
1433
|
-
// Ignore updates when zoomed.
|
|
1434
|
-
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
1454
|
+
let updateSize = (newSize)=>{
|
|
1435
1455
|
setSize((size)=>{
|
|
1436
|
-
let newSize = $5df64b3807dc15ee$var$getViewportSize();
|
|
1437
1456
|
if (newSize.width === size.width && newSize.height === size.height) return size;
|
|
1438
1457
|
return newSize;
|
|
1439
1458
|
});
|
|
1440
1459
|
};
|
|
1460
|
+
// Use visualViewport api to track available height even on iOS virtual keyboard opening
|
|
1461
|
+
let onResize = ()=>{
|
|
1462
|
+
// Ignore updates when zoomed.
|
|
1463
|
+
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
1464
|
+
updateSize($5df64b3807dc15ee$var$getViewportSize());
|
|
1465
|
+
};
|
|
1441
1466
|
// When closing the keyboard, iOS does not fire the visual viewport resize event until the animation is complete.
|
|
1442
1467
|
// We can anticipate this and resize early by handling the blur event and using the layout size.
|
|
1443
1468
|
let frame;
|
|
1444
1469
|
let onBlur = (e)=>{
|
|
1445
1470
|
if ($5df64b3807dc15ee$var$visualViewport && $5df64b3807dc15ee$var$visualViewport.scale > 1) return;
|
|
1446
|
-
if (($21f1aa98acb08317$export$c57958e35f31ed73)(e
|
|
1471
|
+
if (($21f1aa98acb08317$export$c57958e35f31ed73)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) // Wait one frame to see if a new element gets focused.
|
|
1447
1472
|
frame = requestAnimationFrame(()=>{
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
};
|
|
1453
|
-
if (newSize.width === size.width && newSize.height === size.height) return size;
|
|
1454
|
-
return newSize;
|
|
1473
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
1474
|
+
if (!activeElement || !($21f1aa98acb08317$export$c57958e35f31ed73)(activeElement)) updateSize({
|
|
1475
|
+
width: document.documentElement.clientWidth,
|
|
1476
|
+
height: document.documentElement.clientHeight
|
|
1455
1477
|
});
|
|
1456
1478
|
});
|
|
1457
1479
|
};
|
|
1458
|
-
|
|
1480
|
+
updateSize($5df64b3807dc15ee$var$getViewportSize());
|
|
1481
|
+
if (($c87311424ea30a05$export$fedb369cb70207f1)()) window.addEventListener('blur', onBlur, true);
|
|
1459
1482
|
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener('resize', onResize);
|
|
1460
1483
|
else $5df64b3807dc15ee$var$visualViewport.addEventListener('resize', onResize);
|
|
1461
1484
|
return ()=>{
|
|
1462
1485
|
cancelAnimationFrame(frame);
|
|
1463
|
-
window.removeEventListener('blur', onBlur, true);
|
|
1486
|
+
if (($c87311424ea30a05$export$fedb369cb70207f1)()) window.removeEventListener('blur', onBlur, true);
|
|
1464
1487
|
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener('resize', onResize);
|
|
1465
1488
|
else $5df64b3807dc15ee$var$visualViewport.removeEventListener('resize', onResize);
|
|
1466
1489
|
};
|
|
@@ -1470,8 +1493,8 @@ function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
|
1470
1493
|
function $5df64b3807dc15ee$var$getViewportSize() {
|
|
1471
1494
|
return {
|
|
1472
1495
|
// Multiply by the visualViewport scale to get the "natural" size, unaffected by pinch zooming.
|
|
1473
|
-
width: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.width * $5df64b3807dc15ee$var$visualViewport.scale :
|
|
1474
|
-
height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale :
|
|
1496
|
+
width: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.width * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientWidth,
|
|
1497
|
+
height: $5df64b3807dc15ee$var$visualViewport ? $5df64b3807dc15ee$var$visualViewport.height * $5df64b3807dc15ee$var$visualViewport.scale : document.documentElement.clientHeight
|
|
1475
1498
|
};
|
|
1476
1499
|
}
|
|
1477
1500
|
|
|
@@ -1564,59 +1587,84 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
1564
1587
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1565
1588
|
* governing permissions and limitations under the License.
|
|
1566
1589
|
*/
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
let
|
|
1570
|
-
|
|
1571
|
-
let height = element.offsetHeight;
|
|
1572
|
-
let x = scrollView.scrollLeft;
|
|
1590
|
+
|
|
1591
|
+
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element, opts = {}) {
|
|
1592
|
+
let { block: block = 'nearest', inline: inline = 'nearest' } = opts;
|
|
1593
|
+
if (scrollView === element) return;
|
|
1573
1594
|
let y = scrollView.scrollTop;
|
|
1574
|
-
|
|
1575
|
-
let
|
|
1576
|
-
let
|
|
1577
|
-
let
|
|
1578
|
-
|
|
1579
|
-
let
|
|
1580
|
-
let
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
let
|
|
1584
|
-
let
|
|
1585
|
-
let
|
|
1586
|
-
let
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
let
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1595
|
+
let x = scrollView.scrollLeft;
|
|
1596
|
+
let target = element.getBoundingClientRect();
|
|
1597
|
+
let view = scrollView.getBoundingClientRect();
|
|
1598
|
+
let itemStyle = window.getComputedStyle(element);
|
|
1599
|
+
let viewStyle = window.getComputedStyle(scrollView);
|
|
1600
|
+
let root = document.scrollingElement || document.documentElement;
|
|
1601
|
+
let viewTop = scrollView === root ? 0 : view.top;
|
|
1602
|
+
let viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;
|
|
1603
|
+
let viewLeft = scrollView === root ? 0 : view.left;
|
|
1604
|
+
let viewRight = scrollView === root ? scrollView.clientWidth : view.right;
|
|
1605
|
+
let scrollMarginTop = parseInt(itemStyle.scrollMarginTop, 10) || 0;
|
|
1606
|
+
let scrollMarginBottom = parseInt(itemStyle.scrollMarginBottom, 10) || 0;
|
|
1607
|
+
let scrollMarginLeft = parseInt(itemStyle.scrollMarginLeft, 10) || 0;
|
|
1608
|
+
let scrollMarginRight = parseInt(itemStyle.scrollMarginRight, 10) || 0;
|
|
1609
|
+
let scrollPaddingTop = parseInt(viewStyle.scrollPaddingTop, 10) || 0;
|
|
1610
|
+
let scrollPaddingBottom = parseInt(viewStyle.scrollPaddingBottom, 10) || 0;
|
|
1611
|
+
let scrollPaddingLeft = parseInt(viewStyle.scrollPaddingLeft, 10) || 0;
|
|
1612
|
+
let scrollPaddingRight = parseInt(viewStyle.scrollPaddingRight, 10) || 0;
|
|
1613
|
+
let borderTopWidth = parseInt(viewStyle.borderTopWidth, 10) || 0;
|
|
1614
|
+
let borderBottomWidth = parseInt(viewStyle.borderBottomWidth, 10) || 0;
|
|
1615
|
+
let borderLeftWidth = parseInt(viewStyle.borderLeftWidth, 10) || 0;
|
|
1616
|
+
let borderRightWidth = parseInt(viewStyle.borderRightWidth, 10) || 0;
|
|
1617
|
+
let scrollAreaTop = target.top - scrollMarginTop;
|
|
1618
|
+
let scrollAreaBottom = target.bottom + scrollMarginBottom;
|
|
1619
|
+
let scrollAreaLeft = target.left - scrollMarginLeft;
|
|
1620
|
+
let scrollAreaRight = target.right + scrollMarginRight;
|
|
1621
|
+
let scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;
|
|
1622
|
+
let scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;
|
|
1623
|
+
let scrollBarWidth = scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;
|
|
1624
|
+
let scrollBarHeight = scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;
|
|
1625
|
+
let scrollPortTop = viewTop + borderTopWidth + scrollPaddingTop;
|
|
1626
|
+
let scrollPortBottom = viewBottom - borderBottomWidth - scrollPaddingBottom - scrollBarHeight;
|
|
1627
|
+
let scrollPortLeft = viewLeft + borderLeftWidth + scrollPaddingLeft;
|
|
1628
|
+
let scrollPortRight = viewRight - borderRightWidth - scrollPaddingRight;
|
|
1629
|
+
// IOS always positions the scrollbar on the right ¯\_(ツ)_/¯
|
|
1630
|
+
if (viewStyle.direction === 'rtl' && !($c87311424ea30a05$export$fedb369cb70207f1)()) scrollPortLeft += scrollBarWidth;
|
|
1631
|
+
else scrollPortRight -= scrollBarWidth;
|
|
1632
|
+
let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
|
|
1633
|
+
let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
|
|
1634
|
+
if (shouldScrollBlock && block === 'start') y += scrollAreaTop - scrollPortTop;
|
|
1635
|
+
else if (shouldScrollBlock && block === 'center') y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;
|
|
1636
|
+
else if (shouldScrollBlock && block === 'end') y += scrollAreaBottom - scrollPortBottom;
|
|
1637
|
+
else if (shouldScrollBlock && block === 'nearest') {
|
|
1638
|
+
let start = scrollAreaTop - scrollPortTop;
|
|
1639
|
+
let end = scrollAreaBottom - scrollPortBottom;
|
|
1640
|
+
y += Math.abs(start) <= Math.abs(end) ? start : end;
|
|
1641
|
+
}
|
|
1642
|
+
if (shouldScrollInline && inline === 'start') x += scrollAreaLeft - scrollPortLeft;
|
|
1643
|
+
else if (shouldScrollInline && inline === 'center') x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;
|
|
1644
|
+
else if (shouldScrollInline && inline === 'end') x += scrollAreaRight - scrollPortRight;
|
|
1645
|
+
else if (shouldScrollInline && inline === 'nearest') {
|
|
1646
|
+
let start = scrollAreaLeft - scrollPortLeft;
|
|
1647
|
+
let end = scrollAreaRight - scrollPortRight;
|
|
1648
|
+
x += Math.abs(start) <= Math.abs(end) ? start : end;
|
|
1649
|
+
}
|
|
1650
|
+
if (process.env.NODE_ENV === 'test') {
|
|
1651
|
+
scrollView.scrollLeft = x;
|
|
1652
|
+
scrollView.scrollTop = y;
|
|
1653
|
+
return;
|
|
1611
1654
|
}
|
|
1612
|
-
|
|
1655
|
+
scrollView.scrollTo({
|
|
1656
|
+
left: x,
|
|
1657
|
+
top: y
|
|
1658
|
+
});
|
|
1613
1659
|
}
|
|
1614
|
-
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
1615
|
-
|
|
1660
|
+
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts = {}) {
|
|
1661
|
+
let { containingElement: containingElement } = opts;
|
|
1662
|
+
if (targetElement && targetElement.isConnected) {
|
|
1616
1663
|
let root = document.scrollingElement || document.documentElement;
|
|
1617
1664
|
let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';
|
|
1618
|
-
// If scrolling is not currently prevented then we aren
|
|
1619
|
-
|
|
1665
|
+
// 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
|
|
1666
|
+
// Also ignore in chrome because of this bug: https://issues.chromium.org/issues/40074749
|
|
1667
|
+
if (!isScrollPrevented && !($c87311424ea30a05$export$6446a186d09e379e)()) {
|
|
1620
1668
|
var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
|
|
1621
1669
|
// 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
|
|
1622
1670
|
_targetElement_scrollIntoView;
|
|
@@ -1627,8 +1675,8 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
|
1627
1675
|
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1628
1676
|
// Account for sub pixel differences from rounding
|
|
1629
1677
|
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1630
|
-
var
|
|
1631
|
-
|
|
1678
|
+
var _containingElement_scrollIntoView, _targetElement_scrollIntoView1;
|
|
1679
|
+
containingElement === null || containingElement === void 0 ? void 0 : (_containingElement_scrollIntoView = containingElement.scrollIntoView) === null || _containingElement_scrollIntoView === void 0 ? void 0 : _containingElement_scrollIntoView.call(containingElement, {
|
|
1632
1680
|
block: 'center',
|
|
1633
1681
|
inline: 'center'
|
|
1634
1682
|
});
|
|
@@ -1637,10 +1685,19 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
|
1637
1685
|
});
|
|
1638
1686
|
}
|
|
1639
1687
|
} else {
|
|
1640
|
-
let
|
|
1688
|
+
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
1641
1689
|
// 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.
|
|
1642
|
-
|
|
1690
|
+
let scrollParents = ($a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(targetElement, true);
|
|
1643
1691
|
for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
|
|
1692
|
+
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1693
|
+
// Account for sub pixel differences from rounding
|
|
1694
|
+
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1695
|
+
scrollParents = containingElement ? ($a40c673dc9f6d9c7$export$94ed1c92c7beeb22)(containingElement, true) : [];
|
|
1696
|
+
for (let scrollParent of scrollParents)$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, containingElement, {
|
|
1697
|
+
block: 'center',
|
|
1698
|
+
inline: 'center'
|
|
1699
|
+
});
|
|
1700
|
+
}
|
|
1644
1701
|
}
|
|
1645
1702
|
}
|
|
1646
1703
|
}
|
|
@@ -2080,7 +2137,7 @@ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values, children: c
|
|
|
2080
2137
|
return children;
|
|
2081
2138
|
}
|
|
2082
2139
|
function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
2083
|
-
let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values } = props;
|
|
2140
|
+
let { className: className, style: style, children: children, defaultClassName: defaultClassName, defaultChildren: defaultChildren, defaultStyle: defaultStyle, values: values, render: render } = props;
|
|
2084
2141
|
return (useMemo)(()=>{
|
|
2085
2142
|
let computedClassName;
|
|
2086
2143
|
let computedStyle;
|
|
@@ -2108,7 +2165,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
2108
2165
|
...computedStyle
|
|
2109
2166
|
} : undefined,
|
|
2110
2167
|
children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
|
|
2111
|
-
'data-rac': ''
|
|
2168
|
+
'data-rac': '',
|
|
2169
|
+
render: render ? (props)=>render(props, values) : undefined
|
|
2112
2170
|
};
|
|
2113
2171
|
}, [
|
|
2114
2172
|
className,
|
|
@@ -2117,7 +2175,8 @@ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
|
2117
2175
|
defaultClassName,
|
|
2118
2176
|
defaultChildren,
|
|
2119
2177
|
defaultStyle,
|
|
2120
|
-
values
|
|
2178
|
+
values,
|
|
2179
|
+
render
|
|
2121
2180
|
]);
|
|
2122
2181
|
}
|
|
2123
2182
|
function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
|
|
@@ -2199,6 +2258,41 @@ function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
|
2199
2258
|
for(const prop in props)if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
2200
2259
|
return filteredProps;
|
|
2201
2260
|
}
|
|
2261
|
+
function $64fa3d84918910a7$var$DOMElement(ElementType, props, forwardedRef) {
|
|
2262
|
+
let { render: render, ...otherProps } = props;
|
|
2263
|
+
let elementRef = (useRef)(null);
|
|
2264
|
+
let ref = (useMemo)(()=>($5dc95899b306f630$export$c9058316764c140e)(forwardedRef, elementRef), [
|
|
2265
|
+
forwardedRef,
|
|
2266
|
+
elementRef
|
|
2267
|
+
]);
|
|
2268
|
+
($f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
2269
|
+
if (process.env.NODE_ENV !== 'production' && render) {
|
|
2270
|
+
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`?');
|
|
2271
|
+
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.`);
|
|
2272
|
+
}
|
|
2273
|
+
}, [
|
|
2274
|
+
ElementType,
|
|
2275
|
+
render
|
|
2276
|
+
]);
|
|
2277
|
+
let domProps = {
|
|
2278
|
+
...otherProps,
|
|
2279
|
+
ref: ref
|
|
2280
|
+
};
|
|
2281
|
+
if (render) return render(domProps, undefined);
|
|
2282
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, domProps);
|
|
2283
|
+
}
|
|
2284
|
+
const $64fa3d84918910a7$var$domComponentCache = {};
|
|
2285
|
+
const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, {
|
|
2286
|
+
get (target, elementType) {
|
|
2287
|
+
if (typeof elementType !== 'string') return undefined;
|
|
2288
|
+
let res = $64fa3d84918910a7$var$domComponentCache[elementType];
|
|
2289
|
+
if (!res) {
|
|
2290
|
+
res = /*#__PURE__*/ (forwardRef)($64fa3d84918910a7$var$DOMElement.bind(null, elementType));
|
|
2291
|
+
$64fa3d84918910a7$var$domComponentCache[elementType] = res;
|
|
2292
|
+
}
|
|
2293
|
+
return res;
|
|
2294
|
+
}
|
|
2295
|
+
});
|
|
2202
2296
|
|
|
2203
2297
|
/*
|
|
2204
2298
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -2629,11 +2723,35 @@ function $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {
|
|
|
2629
2723
|
// 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)
|
|
2630
2724
|
let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement, visualViewport);
|
|
2631
2725
|
let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container, visualViewport);
|
|
2632
|
-
//
|
|
2633
|
-
// body
|
|
2634
|
-
//
|
|
2635
|
-
|
|
2636
|
-
|
|
2726
|
+
// There are several difference cases of how to calculate the containerOffsetWithBoundary:
|
|
2727
|
+
// - boundaryElement is body or HTML and the container is an arbitrary element in the boundary (aka submenu with parent menu as container in v3)
|
|
2728
|
+
// - boundaryElement and container are both body or HTML element (aka standard popover case)
|
|
2729
|
+
// - boundaryElement is customized by the user. Container can also be arbitrary (either body/HTML or some other element)
|
|
2730
|
+
// containerOffsetWithBoundary should always return a value that is the boundary's coordinate offset with respect to the container coord system (container is 0, 0)
|
|
2731
|
+
let containerOffsetWithBoundary;
|
|
2732
|
+
if ((boundaryElement.tagName === 'BODY' || boundaryElement.tagName === 'HTML') && !isViewportContainer) {
|
|
2733
|
+
// Use getRect instead of getOffset because boundaryDimensions for BODY/HTML is in viewport coordinate space,
|
|
2734
|
+
// not document coordinate space
|
|
2735
|
+
let containerRect = $edcf132a9284368a$export$4b834cebd9e5cebe(container, false);
|
|
2736
|
+
// the offset should be negative because if container is at viewport position x,y, then viewport top (aka 0)
|
|
2737
|
+
// is at position -x,y in container-relative coordinates
|
|
2738
|
+
containerOffsetWithBoundary = {
|
|
2739
|
+
top: -(containerRect.top - boundaryDimensions.top),
|
|
2740
|
+
left: -(containerRect.left - boundaryDimensions.left),
|
|
2741
|
+
width: 0,
|
|
2742
|
+
height: 0
|
|
2743
|
+
};
|
|
2744
|
+
} else if ((boundaryElement.tagName === 'BODY' || boundaryElement.tagName === 'HTML') && isViewportContainer) // both are the same viewport container, no offset needed
|
|
2745
|
+
containerOffsetWithBoundary = {
|
|
2746
|
+
top: 0,
|
|
2747
|
+
left: 0,
|
|
2748
|
+
width: 0,
|
|
2749
|
+
height: 0
|
|
2750
|
+
};
|
|
2751
|
+
else // This returns the boundary's coordinate with respect to the container. This case captures cases such as when you provide a custom boundary
|
|
2752
|
+
// like in ScrollingBoundaryContainerExample in Popover.stories.
|
|
2753
|
+
containerOffsetWithBoundary = $edcf132a9284368a$var$getPosition(boundaryElement, container, false);
|
|
2754
|
+
let isContainerDescendentOfBoundary = ($d4ee10de306f2510$export$4282f70798064fe0)(boundaryElement, container);
|
|
2637
2755
|
return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport);
|
|
2638
2756
|
}
|
|
2639
2757
|
function $edcf132a9284368a$export$4b834cebd9e5cebe(node, ignoreScale) {
|
|
@@ -2717,6 +2835,7 @@ function $edcf132a9284368a$var$isContainingBlock(node) {
|
|
|
2717
2835
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
2718
2836
|
* governing permissions and limitations under the License.
|
|
2719
2837
|
*/
|
|
2838
|
+
|
|
2720
2839
|
const $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();
|
|
2721
2840
|
function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
2722
2841
|
let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;
|
|
@@ -2724,13 +2843,13 @@ function $dd149f63282afbbf$export$18fc8428861184da(opts) {
|
|
|
2724
2843
|
if (!isOpen || onClose === null) return;
|
|
2725
2844
|
let onScroll = (e)=>{
|
|
2726
2845
|
// Ignore if scrolling an scrollable region outside the trigger's tree.
|
|
2727
|
-
let target = e
|
|
2846
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2728
2847
|
// window is not a Node and doesn't have contain, but window contains everything
|
|
2729
|
-
if (!triggerRef.current || target instanceof Node && !target
|
|
2848
|
+
if (!triggerRef.current || target instanceof Node && !($d4ee10de306f2510$export$4282f70798064fe0)(target, triggerRef.current)) return;
|
|
2730
2849
|
// Ignore scroll events on any input or textarea as the cursor position can cause it to scroll
|
|
2731
2850
|
// such as in a combobox. Clicking the dropdown button places focus on the input, and if the
|
|
2732
2851
|
// text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.
|
|
2733
|
-
if (
|
|
2852
|
+
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return;
|
|
2734
2853
|
let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);
|
|
2735
2854
|
if (onCloseHandler) onCloseHandler();
|
|
2736
2855
|
};
|
|
@@ -3215,6 +3334,12 @@ class $3b62074eb05584b2$export$80ee6245ec4f29ec {
|
|
|
3215
3334
|
getDaysInYear(date) {
|
|
3216
3335
|
return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;
|
|
3217
3336
|
}
|
|
3337
|
+
getMaximumMonthsInYear() {
|
|
3338
|
+
return 12;
|
|
3339
|
+
}
|
|
3340
|
+
getMaximumDaysInMonth() {
|
|
3341
|
+
return 31;
|
|
3342
|
+
}
|
|
3218
3343
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3219
3344
|
getYearsInEra(date) {
|
|
3220
3345
|
return 9999;
|
|
@@ -3417,10 +3542,14 @@ function $14e0f24ef4ac5c92$var$timeToMs(a) {
|
|
|
3417
3542
|
return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
|
|
3418
3543
|
}
|
|
3419
3544
|
let $14e0f24ef4ac5c92$var$localTimeZone = null;
|
|
3545
|
+
let $14e0f24ef4ac5c92$var$localTimeZoneOverride = false;
|
|
3420
3546
|
function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
|
|
3421
3547
|
if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3422
3548
|
return $14e0f24ef4ac5c92$var$localTimeZone;
|
|
3423
3549
|
}
|
|
3550
|
+
function $14e0f24ef4ac5c92$export$6ab69b273755230b() {
|
|
3551
|
+
return $14e0f24ef4ac5c92$var$localTimeZoneOverride;
|
|
3552
|
+
}
|
|
3424
3553
|
function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date) {
|
|
3425
3554
|
// Use `subtract` instead of `set` so we don't get constrained in an era.
|
|
3426
3555
|
return date.subtract({
|
|
@@ -3437,14 +3566,6 @@ function $14e0f24ef4ac5c92$export$f91e89d3d0406102(date) {
|
|
|
3437
3566
|
months: date.month - 1
|
|
3438
3567
|
}));
|
|
3439
3568
|
}
|
|
3440
|
-
function $14e0f24ef4ac5c92$export$5412ac11713b72ad(date) {
|
|
3441
|
-
if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);
|
|
3442
|
-
return 1;
|
|
3443
|
-
}
|
|
3444
|
-
function $14e0f24ef4ac5c92$export$b2f4953d301981d5(date) {
|
|
3445
|
-
if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);
|
|
3446
|
-
return 1;
|
|
3447
|
-
}
|
|
3448
3569
|
function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek) {
|
|
3449
3570
|
let dayOfWeek = $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale, firstDayOfWeek);
|
|
3450
3571
|
return date.subtract({
|
|
@@ -3577,7 +3698,9 @@ function $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {
|
|
|
3577
3698
|
// Fast path for UTC.
|
|
3578
3699
|
if (timeZone === 'UTC') return 0;
|
|
3579
3700
|
// Fast path: for local timezone after 1970, use native Date.
|
|
3580
|
-
|
|
3701
|
+
// Skip this fast path if the local timezone was explicitly overridden via setLocalTimeZone,
|
|
3702
|
+
// since native Date always uses the browser's timezone, not the overridden one.
|
|
3703
|
+
if (ms > 0 && timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && !($14e0f24ef4ac5c92$export$6ab69b273755230b)()) return new Date(ms).getTimezoneOffset() * -6e4;
|
|
3581
3704
|
let { year: year, month: month, day: day, hour: hour, minute: minute, second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);
|
|
3582
3705
|
let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);
|
|
3583
3706
|
return utc - Math.floor(ms / 1000) * 1000;
|
|
@@ -3631,7 +3754,9 @@ function $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguatio
|
|
|
3631
3754
|
// Fast path: if the time zone is UTC, use native Date.
|
|
3632
3755
|
if (timeZone === 'UTC') return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);
|
|
3633
3756
|
// Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.
|
|
3634
|
-
if
|
|
3757
|
+
// Skip this fast path if the local timezone was explicitly overridden via setLocalTimeZone,
|
|
3758
|
+
// since native Date always uses the browser's timezone, not the overridden one.
|
|
3759
|
+
if (timeZone === ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === 'compatible' && !($14e0f24ef4ac5c92$export$6ab69b273755230b)()) {
|
|
3635
3760
|
dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
3636
3761
|
// Don't use Date constructor here because two-digit years are interpreted in the 20th century.
|
|
3637
3762
|
let date = new Date();
|
|
@@ -3722,6 +3847,9 @@ function $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {
|
|
|
3722
3847
|
let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;
|
|
3723
3848
|
return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);
|
|
3724
3849
|
}
|
|
3850
|
+
function $11d87f3f76e88657$export$d9b67bc93c097491(date) {
|
|
3851
|
+
return $11d87f3f76e88657$export$538b00033cc11c75(date, ($14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
|
|
3852
|
+
}
|
|
3725
3853
|
|
|
3726
3854
|
/*
|
|
3727
3855
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -4706,6 +4834,12 @@ class $f3ed2e4472ae7e25$export$37fccdbfd14c5939 {
|
|
|
4706
4834
|
let isLeapYear = ($2b4dce13dd5a17fa$export$842a2cf37af977e1)(25 * date.year + 11, 33) < 8;
|
|
4707
4835
|
return isLeapYear ? 30 : 29;
|
|
4708
4836
|
}
|
|
4837
|
+
getMaximumMonthsInYear() {
|
|
4838
|
+
return 12;
|
|
4839
|
+
}
|
|
4840
|
+
getMaximumDaysInMonth() {
|
|
4841
|
+
return 31;
|
|
4842
|
+
}
|
|
4709
4843
|
getEras() {
|
|
4710
4844
|
return [
|
|
4711
4845
|
'AP'
|
|
@@ -4864,6 +4998,12 @@ class $f2f3e0e3a817edbd$export$2066795aadd37bfc {
|
|
|
4864
4998
|
getDaysInYear(date) {
|
|
4865
4999
|
return $f2f3e0e3a817edbd$var$isLeapYear(date.year) ? 355 : 354;
|
|
4866
5000
|
}
|
|
5001
|
+
getMaximumMonthsInYear() {
|
|
5002
|
+
return 12;
|
|
5003
|
+
}
|
|
5004
|
+
getMaximumDaysInMonth() {
|
|
5005
|
+
return 30;
|
|
5006
|
+
}
|
|
4867
5007
|
getYearsInEra() {
|
|
4868
5008
|
// 9999 gregorian
|
|
4869
5009
|
return 9665;
|
|
@@ -5083,6 +5223,12 @@ class $7c5f6fbf42389787$export$ca405048b8fb5af {
|
|
|
5083
5223
|
getDaysInYear(date) {
|
|
5084
5224
|
return $7c5f6fbf42389787$var$getDaysInYear(date.year);
|
|
5085
5225
|
}
|
|
5226
|
+
getMaximumMonthsInYear() {
|
|
5227
|
+
return 13;
|
|
5228
|
+
}
|
|
5229
|
+
getMaximumDaysInMonth() {
|
|
5230
|
+
return 30;
|
|
5231
|
+
}
|
|
5086
5232
|
getYearsInEra() {
|
|
5087
5233
|
// 6239 gregorian
|
|
5088
5234
|
return 9999;
|
|
@@ -5178,6 +5324,12 @@ class $b956b2d7a6cf451f$export$26ba6eab5e20cd7d {
|
|
|
5178
5324
|
getDaysInYear(date) {
|
|
5179
5325
|
return 365 + $b956b2d7a6cf451f$var$getLeapDay(date.year);
|
|
5180
5326
|
}
|
|
5327
|
+
getMaximumMonthsInYear() {
|
|
5328
|
+
return 13;
|
|
5329
|
+
}
|
|
5330
|
+
getMaximumDaysInMonth() {
|
|
5331
|
+
return 30;
|
|
5332
|
+
}
|
|
5181
5333
|
getYearsInEra(date) {
|
|
5182
5334
|
// 9999-12-31 gregorian is 9992-20-02 ethiopic.
|
|
5183
5335
|
// Round down to 9991 for the last full year.
|
|
@@ -6057,9 +6209,9 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6057
6209
|
// so it can be restored after repositioning. This way if the overlay height
|
|
6058
6210
|
// changes, the focused element appears to stay in the same position.
|
|
6059
6211
|
let anchor = null;
|
|
6060
|
-
if (scrollRef.current && scrollRef.current
|
|
6061
|
-
var
|
|
6062
|
-
let anchorRect = (
|
|
6212
|
+
if (scrollRef.current && ($d4ee10de306f2510$export$b4f377a2b6254582)(scrollRef.current)) {
|
|
6213
|
+
var _getActiveElement;
|
|
6214
|
+
let anchorRect = (_getActiveElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)()) === null || _getActiveElement === void 0 ? void 0 : _getActiveElement.getBoundingClientRect();
|
|
6063
6215
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6064
6216
|
var _anchorRect_top;
|
|
6065
6217
|
// Anchor from the top if the offset is in the top half of the scrollable element,
|
|
@@ -6108,8 +6260,9 @@ function $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {
|
|
|
6108
6260
|
Object.keys(position.position).forEach((key)=>overlay.style[key] = position.position[key] + 'px');
|
|
6109
6261
|
overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' : '';
|
|
6110
6262
|
// Restore scroll position relative to anchor element.
|
|
6111
|
-
|
|
6112
|
-
|
|
6263
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
6264
|
+
if (anchor && activeElement && scrollRef.current) {
|
|
6265
|
+
let anchorRect = activeElement.getBoundingClientRect();
|
|
6113
6266
|
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
6114
6267
|
let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
|
|
6115
6268
|
scrollRef.current.scrollTop += newOffset - anchor.offset;
|
|
@@ -6263,9 +6416,10 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
6263
6416
|
// Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a
|
|
6264
6417
|
// MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.
|
|
6265
6418
|
// For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.
|
|
6266
|
-
|
|
6419
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
6420
|
+
if (eventTarget instanceof HTMLButtonElement || eventTarget instanceof HTMLInputElement || eventTarget instanceof HTMLTextAreaElement || eventTarget instanceof HTMLSelectElement) {
|
|
6267
6421
|
stateRef.current.isFocused = true;
|
|
6268
|
-
let target =
|
|
6422
|
+
let target = eventTarget;
|
|
6269
6423
|
let onBlurHandler = (e)=>{
|
|
6270
6424
|
stateRef.current.isFocused = false;
|
|
6271
6425
|
if (target.disabled) {
|
|
@@ -6286,7 +6440,7 @@ function $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {
|
|
|
6286
6440
|
if (stateRef.current.isFocused && target.disabled) {
|
|
6287
6441
|
var _stateRef_current_observer;
|
|
6288
6442
|
(_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();
|
|
6289
|
-
let relatedTargetEl = target ===
|
|
6443
|
+
let relatedTargetEl = target === ($d4ee10de306f2510$export$cd4e5573fbe2b576)() ? null : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
6290
6444
|
target.dispatchEvent(new FocusEvent('blur', {
|
|
6291
6445
|
relatedTarget: relatedTargetEl
|
|
6292
6446
|
}));
|
|
@@ -6317,10 +6471,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
6317
6471
|
$8a9cb279dc87e130$export$fda7da73ab5d4c48 = true;
|
|
6318
6472
|
let isRefocusing = false;
|
|
6319
6473
|
let onBlur = (e)=>{
|
|
6320
|
-
if (e
|
|
6474
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === activeElement || isRefocusing) e.stopImmediatePropagation();
|
|
6321
6475
|
};
|
|
6322
6476
|
let onFocusOut = (e)=>{
|
|
6323
|
-
if (e
|
|
6477
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === activeElement || isRefocusing) {
|
|
6324
6478
|
e.stopImmediatePropagation();
|
|
6325
6479
|
// If there was no focusable ancestor, we don't expect a focus event.
|
|
6326
6480
|
// Re-focus the original active element here.
|
|
@@ -6332,10 +6486,10 @@ function $8a9cb279dc87e130$export$cabe61c495ee3649(target) {
|
|
|
6332
6486
|
}
|
|
6333
6487
|
};
|
|
6334
6488
|
let onFocus = (e)=>{
|
|
6335
|
-
if (e
|
|
6489
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === target || isRefocusing) e.stopImmediatePropagation();
|
|
6336
6490
|
};
|
|
6337
6491
|
let onFocusIn = (e)=>{
|
|
6338
|
-
if (e
|
|
6492
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === target || isRefocusing) {
|
|
6339
6493
|
e.stopImmediatePropagation();
|
|
6340
6494
|
if (!isRefocusing) {
|
|
6341
6495
|
isRefocusing = true;
|
|
@@ -6506,7 +6660,9 @@ function $f6c31cce2adf654f$var$usePressResponderContext(props) {
|
|
|
6506
6660
|
// Consume context from <PressResponder> and merge with props.
|
|
6507
6661
|
let context = (useContext)(($ae1eeba8b9eafd08$export$5165eccb35aaadb5));
|
|
6508
6662
|
if (context) {
|
|
6509
|
-
|
|
6663
|
+
// Prevent mergeProps from merging ref.
|
|
6664
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6665
|
+
let { register: register, ref: ref, ...contextProps } = context;
|
|
6510
6666
|
props = ($3ef42575df84b30b$export$9d1611c77c2fe928)(contextProps, props);
|
|
6511
6667
|
register();
|
|
6512
6668
|
}
|
|
@@ -6554,6 +6710,7 @@ class $f6c31cce2adf654f$var$PressEvent {
|
|
|
6554
6710
|
this.altKey = originalEvent.altKey;
|
|
6555
6711
|
this.x = x;
|
|
6556
6712
|
this.y = y;
|
|
6713
|
+
this.key = originalEvent.key;
|
|
6557
6714
|
}
|
|
6558
6715
|
}
|
|
6559
6716
|
const $f6c31cce2adf654f$var$LINK_CLICKED = Symbol('linkClicked');
|
|
@@ -6697,7 +6854,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6697
6854
|
var _state_metaKeyEvents1;
|
|
6698
6855
|
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();
|
|
6699
6856
|
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
6700
|
-
let wasPressed = ($d4ee10de306f2510$export$4282f70798064fe0)(state.target,
|
|
6857
|
+
let wasPressed = ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, target);
|
|
6701
6858
|
triggerPressEndEvent($f6c31cce2adf654f$var$createEvent(state.target, e), 'keyboard', wasPressed);
|
|
6702
6859
|
if (wasPressed) triggerSyntheticClickEvent(e, state.target);
|
|
6703
6860
|
removeAllGlobalListeners();
|
|
@@ -6771,7 +6928,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6771
6928
|
}, 80);
|
|
6772
6929
|
// Use a capturing listener to track if a click occurred.
|
|
6773
6930
|
// If stopPropagation is called it may never reach our handler.
|
|
6774
|
-
addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
|
|
6931
|
+
if (e.currentTarget) addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
|
|
6775
6932
|
state.disposables.push(()=>clearTimeout(timeout));
|
|
6776
6933
|
} else cancelEvent(e);
|
|
6777
6934
|
// Ignore subsequent onPointerLeave event before onClick on touch devices.
|
|
@@ -6795,7 +6952,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6795
6952
|
state.ignoreEmulatedMouseEvents = false;
|
|
6796
6953
|
return;
|
|
6797
6954
|
}
|
|
6798
|
-
if (state.target && state.target
|
|
6955
|
+
if (state.target && ($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e.target) && state.pointerType != null) ;
|
|
6799
6956
|
else cancelEvent(e);
|
|
6800
6957
|
state.isOverTarget = false;
|
|
6801
6958
|
};
|
|
@@ -6827,9 +6984,9 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6827
6984
|
let state = ref.current;
|
|
6828
6985
|
let pressProps = {
|
|
6829
6986
|
onKeyDown (e) {
|
|
6830
|
-
if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
6987
|
+
if ($f6c31cce2adf654f$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
6831
6988
|
var _state_metaKeyEvents;
|
|
6832
|
-
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
6989
|
+
if ($f6c31cce2adf654f$var$shouldPreventDefaultKeyboard(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e), e.key)) e.preventDefault();
|
|
6833
6990
|
// If the event is repeating, it may have started on a different element
|
|
6834
6991
|
// after which focus moved to the current element. Ignore these events and
|
|
6835
6992
|
// only handle the first key down event.
|
|
@@ -6853,7 +7010,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6853
7010
|
} else if (e.key === 'Meta') state.metaKeyEvents = new Map();
|
|
6854
7011
|
},
|
|
6855
7012
|
onClick (e) {
|
|
6856
|
-
if (e && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7013
|
+
if (e && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6857
7014
|
if (e && e.button === 0 && !state.isTriggeringEvent && !($ea8dcbcb9ea1b556$export$95185d699e05d4d7).isOpening) {
|
|
6858
7015
|
let shouldStopPropagation = true;
|
|
6859
7016
|
if (isDisabled) e.preventDefault();
|
|
@@ -6882,7 +7039,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6882
7039
|
if (typeof PointerEvent !== 'undefined') {
|
|
6883
7040
|
pressProps.onPointerDown = (e)=>{
|
|
6884
7041
|
// Only handle left clicks, and ignore events that bubbled through portals.
|
|
6885
|
-
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7042
|
+
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6886
7043
|
// iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.
|
|
6887
7044
|
// Ignore and let the onClick handler take care of it instead.
|
|
6888
7045
|
// https://bugs.webkit.org/show_bug.cgi?id=222627
|
|
@@ -6903,13 +7060,17 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6903
7060
|
shouldStopPropagation = triggerPressStart(e, state.pointerType);
|
|
6904
7061
|
// Release pointer capture so that touch interactions can leave the original target.
|
|
6905
7062
|
// This enables onPointerLeave and onPointerEnter to fire.
|
|
6906
|
-
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
6907
|
-
if ('releasePointerCapture' in target)
|
|
7063
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7064
|
+
if ('releasePointerCapture' in target) {
|
|
7065
|
+
if ('hasPointerCapture' in target) {
|
|
7066
|
+
if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);
|
|
7067
|
+
} else target.releasePointerCapture(e.pointerId);
|
|
7068
|
+
}
|
|
6908
7069
|
}
|
|
6909
7070
|
if (shouldStopPropagation) e.stopPropagation();
|
|
6910
7071
|
};
|
|
6911
7072
|
pressProps.onMouseDown = (e)=>{
|
|
6912
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7073
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6913
7074
|
if (e.button === 0) {
|
|
6914
7075
|
if (preventFocusOnPress) {
|
|
6915
7076
|
let dispose = ($8a9cb279dc87e130$export$cabe61c495ee3649)(e.target);
|
|
@@ -6920,7 +7081,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6920
7081
|
};
|
|
6921
7082
|
pressProps.onPointerUp = (e)=>{
|
|
6922
7083
|
// iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.
|
|
6923
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7084
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || state.pointerType === 'virtual') return;
|
|
6924
7085
|
// Only handle left clicks. If isPressed is true, delay until onClick.
|
|
6925
7086
|
if (e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || e.pointerType);
|
|
6926
7087
|
};
|
|
@@ -6938,7 +7099,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6938
7099
|
}
|
|
6939
7100
|
};
|
|
6940
7101
|
pressProps.onDragStart = (e)=>{
|
|
6941
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7102
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6942
7103
|
// Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.
|
|
6943
7104
|
cancel(e);
|
|
6944
7105
|
};
|
|
@@ -6947,7 +7108,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6947
7108
|
// All browsers now support pointer events, but JSDOM still does not.
|
|
6948
7109
|
pressProps.onMouseDown = (e)=>{
|
|
6949
7110
|
// Only handle left clicks
|
|
6950
|
-
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7111
|
+
if (e.button !== 0 || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6951
7112
|
if (state.ignoreEmulatedMouseEvents) {
|
|
6952
7113
|
e.stopPropagation();
|
|
6953
7114
|
return;
|
|
@@ -6966,7 +7127,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6966
7127
|
}
|
|
6967
7128
|
};
|
|
6968
7129
|
pressProps.onMouseEnter = (e)=>{
|
|
6969
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7130
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6970
7131
|
let shouldStopPropagation = true;
|
|
6971
7132
|
if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
|
|
6972
7133
|
state.isOverTarget = true;
|
|
@@ -6975,7 +7136,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6975
7136
|
if (shouldStopPropagation) e.stopPropagation();
|
|
6976
7137
|
};
|
|
6977
7138
|
pressProps.onMouseLeave = (e)=>{
|
|
6978
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7139
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6979
7140
|
let shouldStopPropagation = true;
|
|
6980
7141
|
if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
|
|
6981
7142
|
state.isOverTarget = false;
|
|
@@ -6985,11 +7146,11 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
6985
7146
|
if (shouldStopPropagation) e.stopPropagation();
|
|
6986
7147
|
};
|
|
6987
7148
|
pressProps.onMouseUp = (e)=>{
|
|
6988
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7149
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6989
7150
|
if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || 'mouse');
|
|
6990
7151
|
};
|
|
6991
7152
|
pressProps.onTouchStart = (e)=>{
|
|
6992
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7153
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
6993
7154
|
let touch = $f6c31cce2adf654f$var$getTouchFromEvent(e.nativeEvent);
|
|
6994
7155
|
if (!touch) return;
|
|
6995
7156
|
state.activePointerId = touch.identifier;
|
|
@@ -7004,7 +7165,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
7004
7165
|
if (shouldStopPropagation) e.stopPropagation();
|
|
7005
7166
|
};
|
|
7006
7167
|
pressProps.onTouchMove = (e)=>{
|
|
7007
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7168
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7008
7169
|
if (!state.isPressed) {
|
|
7009
7170
|
e.stopPropagation();
|
|
7010
7171
|
return;
|
|
@@ -7024,7 +7185,7 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
7024
7185
|
if (shouldStopPropagation) e.stopPropagation();
|
|
7025
7186
|
};
|
|
7026
7187
|
pressProps.onTouchEnd = (e)=>{
|
|
7027
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7188
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7028
7189
|
if (!state.isPressed) {
|
|
7029
7190
|
e.stopPropagation();
|
|
7030
7191
|
return;
|
|
@@ -7046,12 +7207,12 @@ function $f6c31cce2adf654f$export$45712eceda6fad21(props) {
|
|
|
7046
7207
|
removeAllGlobalListeners();
|
|
7047
7208
|
};
|
|
7048
7209
|
pressProps.onTouchCancel = (e)=>{
|
|
7049
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7210
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7050
7211
|
e.stopPropagation();
|
|
7051
7212
|
if (state.isPressed) cancel($f6c31cce2adf654f$var$createTouchEvent(state.target, e));
|
|
7052
7213
|
};
|
|
7053
7214
|
pressProps.onDragStart = (e)=>{
|
|
7054
|
-
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e
|
|
7215
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7055
7216
|
cancel(e);
|
|
7056
7217
|
};
|
|
7057
7218
|
}
|
|
@@ -7161,7 +7322,8 @@ function $f6c31cce2adf654f$var$createEvent(target, e) {
|
|
|
7161
7322
|
metaKey: e.metaKey,
|
|
7162
7323
|
altKey: e.altKey,
|
|
7163
7324
|
clientX: clientX,
|
|
7164
|
-
clientY: clientY
|
|
7325
|
+
clientY: clientY,
|
|
7326
|
+
key: e.key
|
|
7165
7327
|
};
|
|
7166
7328
|
}
|
|
7167
7329
|
function $f6c31cce2adf654f$var$getPointClientRect(point) {
|
|
@@ -7235,7 +7397,7 @@ function $f6c31cce2adf654f$var$isValidInputKey(target, key) {
|
|
|
7235
7397
|
|
|
7236
7398
|
|
|
7237
7399
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
7238
|
-
|
|
7400
|
+
const $507fabe10e71c6fb$export$901e90a13c50a14e = new Set();
|
|
7239
7401
|
let $507fabe10e71c6fb$export$d90243b58daecda7 = new Map(); // We use a map here to support setting event listeners across multiple document objects.
|
|
7240
7402
|
let $507fabe10e71c6fb$var$hasEventBeforeFocus = false;
|
|
7241
7403
|
let $507fabe10e71c6fb$var$hasBlurredWindowRecently = false;
|
|
@@ -7245,7 +7407,7 @@ const $507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS = {
|
|
|
7245
7407
|
Escape: true
|
|
7246
7408
|
};
|
|
7247
7409
|
function $507fabe10e71c6fb$var$triggerChangeHandlers(modality, e) {
|
|
7248
|
-
for (let handler of $507fabe10e71c6fb$
|
|
7410
|
+
for (let handler of $507fabe10e71c6fb$export$901e90a13c50a14e)handler(modality, e);
|
|
7249
7411
|
}
|
|
7250
7412
|
/**
|
|
7251
7413
|
* Helper function to determine if a KeyboardEvent is unmodified and could make keyboard focus styles visible.
|
|
@@ -7278,7 +7440,7 @@ function $507fabe10e71c6fb$var$handleFocusEvent(e) {
|
|
|
7278
7440
|
// Firefox fires two extra focus events when the user first clicks into an iframe:
|
|
7279
7441
|
// first on the window, then on the document. We ignore these events so they don't
|
|
7280
7442
|
// cause keyboard focus rings to appear.
|
|
7281
|
-
if (e
|
|
7443
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === window || ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === document || ($8a9cb279dc87e130$export$fda7da73ab5d4c48) || !e.isTrusted) return;
|
|
7282
7444
|
// If a focus event occurs without a preceding keyboard or pointer event, switch to virtual modality.
|
|
7283
7445
|
// This occurs, for example, when navigating a form with the next/previous buttons on iOS.
|
|
7284
7446
|
if (!$507fabe10e71c6fb$var$hasEventBeforeFocus && !$507fabe10e71c6fb$var$hasBlurredWindowRecently) {
|
|
@@ -7390,9 +7552,9 @@ function $507fabe10e71c6fb$export$98e20ec92f614cfe() {
|
|
|
7390
7552
|
let handler = ()=>{
|
|
7391
7553
|
setModality($507fabe10e71c6fb$var$currentModality);
|
|
7392
7554
|
};
|
|
7393
|
-
$507fabe10e71c6fb$
|
|
7555
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
|
|
7394
7556
|
return ()=>{
|
|
7395
|
-
$507fabe10e71c6fb$
|
|
7557
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
|
|
7396
7558
|
};
|
|
7397
7559
|
}, []);
|
|
7398
7560
|
return ($b5e257d569688ac6$export$535bd6ca7f90a273)() ? null : modality;
|
|
@@ -7412,27 +7574,30 @@ const $507fabe10e71c6fb$var$nonTextInputTypes = new Set([
|
|
|
7412
7574
|
* If this is attached to text input component, return if the event is a focus event (Tab/Escape keys pressed) so that
|
|
7413
7575
|
* focus visible style can be properly set.
|
|
7414
7576
|
*/ function $507fabe10e71c6fb$var$isKeyboardFocusEvent(isTextInput, modality, e) {
|
|
7415
|
-
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e
|
|
7416
|
-
|
|
7417
|
-
const
|
|
7418
|
-
const
|
|
7419
|
-
const
|
|
7577
|
+
let document1 = ($431fbd86ca7dc216$export$b204af158042fbac)(e ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) : undefined);
|
|
7578
|
+
let eventTarget = e ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) : undefined;
|
|
7579
|
+
const IHTMLInputElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLInputElement : HTMLInputElement;
|
|
7580
|
+
const IHTMLTextAreaElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLTextAreaElement : HTMLTextAreaElement;
|
|
7581
|
+
const IHTMLElement = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).HTMLElement : HTMLElement;
|
|
7582
|
+
const IKeyboardEvent = typeof window !== 'undefined' ? ($431fbd86ca7dc216$export$f21a1ffae260145a)(eventTarget).KeyboardEvent : KeyboardEvent;
|
|
7420
7583
|
// 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)
|
|
7421
7584
|
// we need to rely on the user passing isTextInput into here. This way we can skip toggling focus visiblity for said input element
|
|
7422
|
-
|
|
7585
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(document1);
|
|
7586
|
+
isTextInput = isTextInput || activeElement instanceof IHTMLInputElement && !$507fabe10e71c6fb$var$nonTextInputTypes.has(activeElement.type) || activeElement instanceof IHTMLTextAreaElement || activeElement instanceof IHTMLElement && activeElement.isContentEditable;
|
|
7423
7587
|
return !(isTextInput && modality === 'keyboard' && e instanceof IKeyboardEvent && !$507fabe10e71c6fb$var$FOCUS_VISIBLE_INPUT_KEYS[e.key]);
|
|
7424
7588
|
}
|
|
7425
7589
|
function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
7426
7590
|
$507fabe10e71c6fb$var$setupGlobalFocusEvents();
|
|
7427
7591
|
(useEffect)(()=>{
|
|
7592
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.enabled) === false) return;
|
|
7428
7593
|
let handler = (modality, e)=>{
|
|
7429
7594
|
// We want to early return for any keyboard events that occur inside text inputs EXCEPT for Tab and Escape
|
|
7430
7595
|
if (!$507fabe10e71c6fb$var$isKeyboardFocusEvent(!!(opts === null || opts === void 0 ? void 0 : opts.isTextInput), modality, e)) return;
|
|
7431
7596
|
fn($507fabe10e71c6fb$export$b9b3dfddab17db27());
|
|
7432
7597
|
};
|
|
7433
|
-
$507fabe10e71c6fb$
|
|
7598
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.add(handler);
|
|
7434
7599
|
return ()=>{
|
|
7435
|
-
$507fabe10e71c6fb$
|
|
7600
|
+
$507fabe10e71c6fb$export$901e90a13c50a14e.delete(handler);
|
|
7436
7601
|
};
|
|
7437
7602
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7438
7603
|
}, deps);
|
|
@@ -7451,6 +7616,7 @@ function $507fabe10e71c6fb$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
7451
7616
|
*/
|
|
7452
7617
|
|
|
7453
7618
|
function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
7619
|
+
if (!element.isConnected) return;
|
|
7454
7620
|
// If the user is interacting with a virtual cursor, e.g. screen reader, then
|
|
7455
7621
|
// wait until after any animated transitions that are currently occurring on
|
|
7456
7622
|
// the page before shifting focus. This avoids issues with VoiceOver on iOS
|
|
@@ -7487,7 +7653,7 @@ function $3ad3f6e1647bc98d$export$80f3e147d781571c(element) {
|
|
|
7487
7653
|
function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
7488
7654
|
let { isDisabled: isDisabled, onFocus: onFocusProp, onBlur: onBlurProp, onFocusChange: onFocusChange } = props;
|
|
7489
7655
|
const onBlur = (useCallback)((e)=>{
|
|
7490
|
-
if (e
|
|
7656
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === e.currentTarget) {
|
|
7491
7657
|
if (onBlurProp) onBlurProp(e);
|
|
7492
7658
|
if (onFocusChange) onFocusChange(false);
|
|
7493
7659
|
return true;
|
|
@@ -7500,9 +7666,10 @@ function $a1ea59d68270f0dd$export$f8168d8dd8fd66e6(props) {
|
|
|
7500
7666
|
const onFocus = (useCallback)((e)=>{
|
|
7501
7667
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
7502
7668
|
// focus handler already moved focus somewhere else.
|
|
7503
|
-
|
|
7669
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7670
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
7504
7671
|
const activeElement = ownerDocument ? ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument) : ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
7505
|
-
if (
|
|
7672
|
+
if (eventTarget === e.currentTarget && eventTarget === activeElement) {
|
|
7506
7673
|
if (onFocusProp) onFocusProp(e);
|
|
7507
7674
|
if (onFocusChange) onFocusChange(true);
|
|
7508
7675
|
onSyntheticFocus(e);
|
|
@@ -7652,16 +7819,15 @@ function $f645667febf57a63$export$4c014de7c8940b4c(props, domRef) {
|
|
|
7652
7819
|
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ ($dbSRa$react).forwardRef(({ children: children, ...props }, ref)=>{
|
|
7653
7820
|
let isRegistered = (useRef)(false);
|
|
7654
7821
|
let prevContext = (useContext)(($ae1eeba8b9eafd08$export$5165eccb35aaadb5));
|
|
7655
|
-
ref = ($df56164dff5785e2$export$4338b53315abf666)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
7656
7822
|
let context = ($3ef42575df84b30b$export$9d1611c77c2fe928)(prevContext || {}, {
|
|
7657
7823
|
...props,
|
|
7658
|
-
ref: ref,
|
|
7659
7824
|
register () {
|
|
7660
7825
|
isRegistered.current = true;
|
|
7661
7826
|
if (prevContext) prevContext.register();
|
|
7662
7827
|
}
|
|
7663
7828
|
});
|
|
7664
|
-
($
|
|
7829
|
+
context.ref = ($df56164dff5785e2$export$4338b53315abf666)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
|
|
7830
|
+
($e7801be82b4b2a53$export$4debdb1a3f0fa79e)(prevContext, context.ref);
|
|
7665
7831
|
(useEffect)(()=>{
|
|
7666
7832
|
if (!isRegistered.current) {
|
|
7667
7833
|
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.");
|
|
@@ -7706,11 +7872,11 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
7706
7872
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
7707
7873
|
let onBlur = (useCallback)((e)=>{
|
|
7708
7874
|
// Ignore events bubbling through portals.
|
|
7709
|
-
if (!e.currentTarget
|
|
7875
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7710
7876
|
// We don't want to trigger onBlurWithin and then immediately onFocusWithin again
|
|
7711
7877
|
// when moving focus inside the element. Only trigger if the currentTarget doesn't
|
|
7712
7878
|
// include the relatedTarget (where focus is moving).
|
|
7713
|
-
if (state.current.isFocusWithin && !e.currentTarget
|
|
7879
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) {
|
|
7714
7880
|
state.current.isFocusWithin = false;
|
|
7715
7881
|
removeAllGlobalListeners();
|
|
7716
7882
|
if (onBlurWithin) onBlurWithin(e);
|
|
@@ -7725,12 +7891,13 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
7725
7891
|
let onSyntheticFocus = ($8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);
|
|
7726
7892
|
let onFocus = (useCallback)((e)=>{
|
|
7727
7893
|
// Ignore events bubbling through portals.
|
|
7728
|
-
if (!e.currentTarget
|
|
7894
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
7729
7895
|
// Double check that document.activeElement actually matches e.target in case a previously chained
|
|
7730
7896
|
// focus handler already moved focus somewhere else.
|
|
7731
|
-
|
|
7897
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7898
|
+
const ownerDocument = ($431fbd86ca7dc216$export$b204af158042fbac)(eventTarget);
|
|
7732
7899
|
const activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)(ownerDocument);
|
|
7733
|
-
if (!state.current.isFocusWithin && activeElement ===
|
|
7900
|
+
if (!state.current.isFocusWithin && activeElement === eventTarget) {
|
|
7734
7901
|
if (onFocusWithin) onFocusWithin(e);
|
|
7735
7902
|
if (onFocusWithinChange) onFocusWithinChange(true);
|
|
7736
7903
|
state.current.isFocusWithin = true;
|
|
@@ -7740,9 +7907,10 @@ function $9ab94262bd0047c7$export$420e68273165f4ec(props) {
|
|
|
7740
7907
|
// can manually fire onBlur.
|
|
7741
7908
|
let currentTarget = e.currentTarget;
|
|
7742
7909
|
addGlobalListener(ownerDocument, 'focus', (e)=>{
|
|
7743
|
-
|
|
7910
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
7911
|
+
if (state.current.isFocusWithin && !($d4ee10de306f2510$export$4282f70798064fe0)(currentTarget, eventTarget)) {
|
|
7744
7912
|
let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
|
|
7745
|
-
relatedTarget:
|
|
7913
|
+
relatedTarget: eventTarget
|
|
7746
7914
|
});
|
|
7747
7915
|
($8a9cb279dc87e130$export$c2b7abe5d61ec696)(nativeEvent, currentTarget);
|
|
7748
7916
|
let event = ($8a9cb279dc87e130$export$525bc4921d56d4a)(nativeEvent);
|
|
@@ -7836,7 +8004,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7836
8004
|
let { hoverProps: hoverProps, triggerHoverEnd: triggerHoverEnd } = (useMemo)(()=>{
|
|
7837
8005
|
let triggerHoverStart = (event, pointerType)=>{
|
|
7838
8006
|
state.pointerType = pointerType;
|
|
7839
|
-
if (isDisabled || pointerType === 'touch' || state.isHovered || !event.currentTarget
|
|
8007
|
+
if (isDisabled || pointerType === 'touch' || state.isHovered || !($d4ee10de306f2510$export$4282f70798064fe0)(event.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(event))) return;
|
|
7840
8008
|
state.isHovered = true;
|
|
7841
8009
|
let target = event.currentTarget;
|
|
7842
8010
|
state.target = target;
|
|
@@ -7844,8 +8012,8 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7844
8012
|
// even though the originally hovered target may have shrunk in size so it is no longer hovered.
|
|
7845
8013
|
// However, a pointerover event will be fired on the new target the mouse is over.
|
|
7846
8014
|
// In Chrome this happens immediately. In Safari and Firefox, it happens upon moving the mouse one pixel.
|
|
7847
|
-
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(event
|
|
7848
|
-
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, e
|
|
8015
|
+
addGlobalListener(($431fbd86ca7dc216$export$b204af158042fbac)(($d4ee10de306f2510$export$e58f029f0fbfdb29)(event)), 'pointerover', (e)=>{
|
|
8016
|
+
if (state.isHovered && state.target && !($d4ee10de306f2510$export$4282f70798064fe0)(state.target, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, e.pointerType);
|
|
7849
8017
|
}, {
|
|
7850
8018
|
capture: true
|
|
7851
8019
|
});
|
|
@@ -7879,7 +8047,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7879
8047
|
triggerHoverStart(e, e.pointerType);
|
|
7880
8048
|
};
|
|
7881
8049
|
hoverProps.onPointerLeave = (e)=>{
|
|
7882
|
-
if (!isDisabled && e.currentTarget
|
|
8050
|
+
if (!isDisabled && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, e.pointerType);
|
|
7883
8051
|
};
|
|
7884
8052
|
} else if (process.env.NODE_ENV === 'test') {
|
|
7885
8053
|
hoverProps.onTouchStart = ()=>{
|
|
@@ -7890,7 +8058,7 @@ function $6179b936705e76d3$export$ae780daf29e6d456(props) {
|
|
|
7890
8058
|
state.ignoreEmulatedMouseEvents = false;
|
|
7891
8059
|
};
|
|
7892
8060
|
hoverProps.onMouseLeave = (e)=>{
|
|
7893
|
-
if (!isDisabled && e.currentTarget
|
|
8061
|
+
if (!isDisabled && ($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) triggerHoverEnd(e, 'mouse');
|
|
7894
8062
|
};
|
|
7895
8063
|
}
|
|
7896
8064
|
return {
|
|
@@ -8002,12 +8170,13 @@ function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
|
|
|
8002
8170
|
}
|
|
8003
8171
|
function $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {
|
|
8004
8172
|
if (event.button > 0) return false;
|
|
8005
|
-
|
|
8173
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(event);
|
|
8174
|
+
if (target) {
|
|
8006
8175
|
// if the event target is no longer in the document, ignore
|
|
8007
|
-
const ownerDocument =
|
|
8008
|
-
if (!ownerDocument || !ownerDocument.documentElement
|
|
8176
|
+
const ownerDocument = target.ownerDocument;
|
|
8177
|
+
if (!ownerDocument || !($d4ee10de306f2510$export$4282f70798064fe0)(ownerDocument.documentElement, target)) return false;
|
|
8009
8178
|
// If the target is within a top layer element (e.g. toasts), ignore.
|
|
8010
|
-
if (
|
|
8179
|
+
if (target.closest('[data-react-aria-top-layer]')) return false;
|
|
8011
8180
|
}
|
|
8012
8181
|
if (!ref.current) return false;
|
|
8013
8182
|
// When the event source is inside a Shadow DOM, event.target is just the shadow root.
|
|
@@ -8324,22 +8493,23 @@ function $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {
|
|
|
8324
8493
|
}
|
|
8325
8494
|
return true;
|
|
8326
8495
|
}
|
|
8496
|
+
function $9bf71ea28793e738$var$getRadiosInGroup(element) {
|
|
8497
|
+
if (!element.form) // Radio buttons outside a form - query the document
|
|
8498
|
+
return Array.from(($431fbd86ca7dc216$export$b204af158042fbac)(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)).filter((radio)=>!radio.form);
|
|
8499
|
+
// namedItem returns RadioNodeList (iterable) for 2+ elements, but a single Element for exactly 1.
|
|
8500
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormControlsCollection/namedItem
|
|
8501
|
+
const radioList = element.form.elements.namedItem(element.name);
|
|
8502
|
+
let ownerWindow = ($431fbd86ca7dc216$export$f21a1ffae260145a)(element);
|
|
8503
|
+
if (radioList instanceof ownerWindow.RadioNodeList) return Array.from(radioList).filter((el)=>el instanceof ownerWindow.HTMLInputElement);
|
|
8504
|
+
if (radioList instanceof ownerWindow.HTMLInputElement) return [
|
|
8505
|
+
radioList
|
|
8506
|
+
];
|
|
8507
|
+
return [];
|
|
8508
|
+
}
|
|
8327
8509
|
function $9bf71ea28793e738$var$isTabbableRadio(element) {
|
|
8328
8510
|
if (element.checked) return true;
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
...($431fbd86ca7dc216$export$b204af158042fbac)(element).querySelectorAll(`input[type="radio"][name="${CSS.escape(element.name)}"]`)
|
|
8332
|
-
].filter((radio)=>!radio.form);
|
|
8333
|
-
else {
|
|
8334
|
-
var _element_form_elements, _element_form;
|
|
8335
|
-
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);
|
|
8336
|
-
radios = [
|
|
8337
|
-
...radioList !== null && radioList !== void 0 ? radioList : []
|
|
8338
|
-
];
|
|
8339
|
-
}
|
|
8340
|
-
if (!radios) return false;
|
|
8341
|
-
let anyChecked = radios.some((radio)=>radio.checked);
|
|
8342
|
-
return !anyChecked;
|
|
8511
|
+
const radios = $9bf71ea28793e738$var$getRadiosInGroup(element);
|
|
8512
|
+
return radios.length > 0 && !radios.some((radio)=>radio.checked);
|
|
8343
8513
|
}
|
|
8344
8514
|
function $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {
|
|
8345
8515
|
let focusedNode = (useRef)(undefined);
|
|
@@ -8439,7 +8609,7 @@ function $9bf71ea28793e738$var$isElementInAnyScope(element) {
|
|
|
8439
8609
|
function $9bf71ea28793e738$var$isElementInScope(element, scope) {
|
|
8440
8610
|
if (!element) return false;
|
|
8441
8611
|
if (!scope) return false;
|
|
8442
|
-
return scope.some((node)=>node
|
|
8612
|
+
return scope.some((node)=>($d4ee10de306f2510$export$4282f70798064fe0)(node, element));
|
|
8443
8613
|
}
|
|
8444
8614
|
function $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {
|
|
8445
8615
|
// If the element is within a top layer element (e.g. toasts), always allow moving focus there.
|
|
@@ -8686,9 +8856,8 @@ function $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {
|
|
|
8686
8856
|
// Create a TreeWalker, ensuring the root is an Element or Document
|
|
8687
8857
|
let walker = ($dfc540311bf7f109$export$4d0f8be8b12a7ef6)(doc, root || doc, NodeFilter.SHOW_ELEMENT, {
|
|
8688
8858
|
acceptNode (node) {
|
|
8689
|
-
var _opts_from;
|
|
8690
8859
|
// Skip nodes inside the starting node.
|
|
8691
|
-
if (opts === null || opts === void 0 ? void 0 :
|
|
8860
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(opts === null || opts === void 0 ? void 0 : opts.from, node)) return NodeFilter.FILTER_REJECT;
|
|
8692
8861
|
if ((opts === null || opts === void 0 ? void 0 : opts.tabbable) && node.tagName === 'INPUT' && node.getAttribute('type') === 'radio') {
|
|
8693
8862
|
// If the radio is in a form, we can get all the other radios by name
|
|
8694
8863
|
if (!$9bf71ea28793e738$var$isTabbableRadio(node)) return NodeFilter.FILTER_REJECT;
|
|
@@ -8713,7 +8882,7 @@ function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {
|
|
|
8713
8882
|
tabbable: tabbable,
|
|
8714
8883
|
accept: accept
|
|
8715
8884
|
});
|
|
8716
|
-
if (root
|
|
8885
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(root, node)) walker.currentNode = node;
|
|
8717
8886
|
let nextNode = walker.nextNode();
|
|
8718
8887
|
if (!nextNode && wrap) {
|
|
8719
8888
|
walker.currentNode = root;
|
|
@@ -8731,7 +8900,7 @@ function $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {
|
|
|
8731
8900
|
tabbable: tabbable,
|
|
8732
8901
|
accept: accept
|
|
8733
8902
|
});
|
|
8734
|
-
if (root
|
|
8903
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(root, node)) walker.currentNode = node;
|
|
8735
8904
|
else {
|
|
8736
8905
|
let next = $9bf71ea28793e738$var$last(walker);
|
|
8737
8906
|
if (next) $9bf71ea28793e738$var$focusElement(next, true);
|
|
@@ -8868,6 +9037,7 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
8868
9037
|
let updateState = (useCallback)(()=>setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
|
|
8869
9038
|
let onFocusChange = (useCallback)((isFocused)=>{
|
|
8870
9039
|
state.current.isFocused = isFocused;
|
|
9040
|
+
state.current.isFocusVisible = ($507fabe10e71c6fb$export$b9b3dfddab17db27)();
|
|
8871
9041
|
setFocused(isFocused);
|
|
8872
9042
|
updateState();
|
|
8873
9043
|
}, [
|
|
@@ -8876,7 +9046,11 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
8876
9046
|
($507fabe10e71c6fb$export$ec71b4b83ac08ec3)((isFocusVisible)=>{
|
|
8877
9047
|
state.current.isFocusVisible = isFocusVisible;
|
|
8878
9048
|
updateState();
|
|
8879
|
-
}, [
|
|
9049
|
+
}, [
|
|
9050
|
+
isTextInput,
|
|
9051
|
+
isFocused
|
|
9052
|
+
], {
|
|
9053
|
+
enabled: isFocused,
|
|
8880
9054
|
isTextInput: isTextInput
|
|
8881
9055
|
});
|
|
8882
9056
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
@@ -8989,9 +9163,11 @@ function $55f9b1ae81f22853$export$759df0d867455a91(document) {
|
|
|
8989
9163
|
*/
|
|
8990
9164
|
|
|
8991
9165
|
|
|
9166
|
+
|
|
8992
9167
|
const $a11501f3d1d39e6c$var$visibleOverlays = [];
|
|
8993
9168
|
function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
8994
9169
|
let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;
|
|
9170
|
+
let lastVisibleOverlay = (useRef)(undefined);
|
|
8995
9171
|
// Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
|
|
8996
9172
|
(useEffect)(()=>{
|
|
8997
9173
|
if (isOpen && !$a11501f3d1d39e6c$var$visibleOverlays.includes(ref)) {
|
|
@@ -9010,21 +9186,24 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
9010
9186
|
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
|
|
9011
9187
|
};
|
|
9012
9188
|
let onInteractOutsideStart = (e)=>{
|
|
9013
|
-
|
|
9014
|
-
|
|
9189
|
+
const topMostOverlay = $a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1];
|
|
9190
|
+
lastVisibleOverlay.current = topMostOverlay;
|
|
9191
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
9192
|
+
if (topMostOverlay === ref) {
|
|
9015
9193
|
e.stopPropagation();
|
|
9016
9194
|
e.preventDefault();
|
|
9017
9195
|
}
|
|
9018
9196
|
}
|
|
9019
9197
|
};
|
|
9020
9198
|
let onInteractOutside = (e)=>{
|
|
9021
|
-
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e
|
|
9199
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
9022
9200
|
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {
|
|
9023
9201
|
e.stopPropagation();
|
|
9024
9202
|
e.preventDefault();
|
|
9025
9203
|
}
|
|
9026
|
-
onHide();
|
|
9204
|
+
if (lastVisibleOverlay.current === ref) onHide();
|
|
9027
9205
|
}
|
|
9206
|
+
lastVisibleOverlay.current = undefined;
|
|
9028
9207
|
};
|
|
9029
9208
|
// Handle the escape key
|
|
9030
9209
|
let onKeyDown = (e)=>{
|
|
@@ -9058,7 +9237,7 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
9058
9237
|
});
|
|
9059
9238
|
let onPointerDownUnderlay = (e)=>{
|
|
9060
9239
|
// fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846
|
|
9061
|
-
if (e
|
|
9240
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === e.currentTarget) e.preventDefault();
|
|
9062
9241
|
};
|
|
9063
9242
|
return {
|
|
9064
9243
|
overlayProps: {
|
|
@@ -9172,20 +9351,25 @@ function $49c51c25361d4cd2$var$preventScrollStandard() {
|
|
|
9172
9351
|
// by preventing default in a `touchmove` event. This is best effort: we can't prevent default when pinch
|
|
9173
9352
|
// zooming or when an element contains text selection, which may allow scrolling in some cases.
|
|
9174
9353
|
// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.
|
|
9175
|
-
// 4. When focus moves to an input, create an off screen input and focus that temporarily. This prevents
|
|
9354
|
+
// 4. When focus moves to an input, create an off screen input and focus that temporarily. This prevents
|
|
9176
9355
|
// Safari from scrolling the page. After a small delay, focus the real input and scroll it into view
|
|
9177
9356
|
// ourselves, without scrolling the whole page.
|
|
9178
9357
|
function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
9358
|
+
// Set overflow hidden so scrollIntoViewport() (useSelectableCollection) sees isScrollPrevented and
|
|
9359
|
+
// scrolls only scroll parents instead of calling native scrollIntoView() which moves the window.
|
|
9360
|
+
let restoreOverflow = $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden');
|
|
9179
9361
|
let scrollable;
|
|
9180
9362
|
let allowTouchMove = false;
|
|
9181
9363
|
let onTouchStart = (e)=>{
|
|
9182
9364
|
// Store the nearest scrollable parent element from the element that the user touched.
|
|
9183
|
-
let target = e
|
|
9365
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
9184
9366
|
scrollable = ($cc38e7bd3fc7b213$export$2bb74740c4e19def)(target) ? target : ($62d8ded9296f3872$export$cfa2225e87938781)(target, true);
|
|
9185
9367
|
allowTouchMove = false;
|
|
9186
9368
|
// If the target is selected, don't preventDefault in touchmove to allow user to adjust selection.
|
|
9187
9369
|
let selection = target.ownerDocument.defaultView.getSelection();
|
|
9188
9370
|
if (selection && !selection.isCollapsed && selection.containsNode(target, true)) allowTouchMove = true;
|
|
9371
|
+
// If this is a range input, allow touch move to allow user to adjust the slider value
|
|
9372
|
+
if (e.composedPath().some((el)=>el instanceof HTMLInputElement && el.type === 'range')) allowTouchMove = true;
|
|
9189
9373
|
// If this is a focused input element with a selected range, allow user to drag the selection handles.
|
|
9190
9374
|
if ('selectionStart' in target && 'selectionEnd' in target && target.selectionStart < target.selectionEnd && target.ownerDocument.activeElement === target) allowTouchMove = true;
|
|
9191
9375
|
};
|
|
@@ -9218,7 +9402,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
9218
9402
|
if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
|
|
9219
9403
|
};
|
|
9220
9404
|
let onBlur = (e)=>{
|
|
9221
|
-
let target = e
|
|
9405
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
9222
9406
|
let relatedTarget = e.relatedTarget;
|
|
9223
9407
|
if (relatedTarget && ($21f1aa98acb08317$export$c57958e35f31ed73)(relatedTarget)) {
|
|
9224
9408
|
// Focus without scrolling the whole page, and then scroll into view manually.
|
|
@@ -9243,7 +9427,8 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
9243
9427
|
let focus = HTMLElement.prototype.focus;
|
|
9244
9428
|
HTMLElement.prototype.focus = function(opts) {
|
|
9245
9429
|
// Track whether the keyboard was already visible before.
|
|
9246
|
-
let
|
|
9430
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
9431
|
+
let wasKeyboardVisible = activeElement != null && ($21f1aa98acb08317$export$c57958e35f31ed73)(activeElement);
|
|
9247
9432
|
// Focus the element without scrolling the page.
|
|
9248
9433
|
focus.call(this, {
|
|
9249
9434
|
...opts,
|
|
@@ -9259,6 +9444,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
9259
9444
|
capture: true
|
|
9260
9445
|
}), $49c51c25361d4cd2$var$addEvent(document, 'blur', onBlur, true));
|
|
9261
9446
|
return ()=>{
|
|
9447
|
+
restoreOverflow();
|
|
9262
9448
|
removeEvents();
|
|
9263
9449
|
style.remove();
|
|
9264
9450
|
HTMLElement.prototype.focus = focus;
|
|
@@ -9754,6 +9940,7 @@ function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
|
9754
9940
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
9755
9941
|
* governing permissions and limitations under the License.
|
|
9756
9942
|
*/
|
|
9943
|
+
|
|
9757
9944
|
const $5e3802645cc19319$var$supportsInert = typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;
|
|
9758
9945
|
// Keeps a ref count of all hidden elements. Added to when hiding an element, and
|
|
9759
9946
|
// subtracted from when showing it again. When it reaches zero, aria-hidden is removed.
|
|
@@ -9782,6 +9969,17 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9782
9969
|
element.inert = false;
|
|
9783
9970
|
}
|
|
9784
9971
|
};
|
|
9972
|
+
let shadowRootsToWatch = new Set();
|
|
9973
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) // find all shadow roots that are ancestors of the targets
|
|
9974
|
+
// traverse upwards until the root is reached
|
|
9975
|
+
for (let target of targets){
|
|
9976
|
+
let node = target;
|
|
9977
|
+
while(node && node !== root){
|
|
9978
|
+
let root = node.getRootNode();
|
|
9979
|
+
if ('shadowRoot' in root) shadowRootsToWatch.add(root.shadowRoot);
|
|
9980
|
+
node = root.parentNode;
|
|
9981
|
+
}
|
|
9982
|
+
}
|
|
9785
9983
|
let walk = (root)=>{
|
|
9786
9984
|
// Keep live announcer and top layer elements (e.g. toasts) visible.
|
|
9787
9985
|
for (let element of root.querySelectorAll('[data-live-announcer], [data-react-aria-top-layer]'))visibleNodes.add(element);
|
|
@@ -9793,11 +9991,11 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9793
9991
|
if (hiddenNodes.has(node) || visibleNodes.has(node) || node.parentElement && hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
|
|
9794
9992
|
// Skip this node but continue to children if one of the targets is inside the node.
|
|
9795
9993
|
for (let target of visibleNodes){
|
|
9796
|
-
if (node
|
|
9994
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(node, target)) return NodeFilter.FILTER_SKIP;
|
|
9797
9995
|
}
|
|
9798
9996
|
return NodeFilter.FILTER_ACCEPT;
|
|
9799
9997
|
};
|
|
9800
|
-
let walker =
|
|
9998
|
+
let walker = ($dfc540311bf7f109$export$4d0f8be8b12a7ef6)(($431fbd86ca7dc216$export$b204af158042fbac)(root), root, NodeFilter.SHOW_ELEMENT, {
|
|
9801
9999
|
acceptNode: acceptNode
|
|
9802
10000
|
});
|
|
9803
10001
|
// TreeWalker does not include the root.
|
|
@@ -9830,19 +10028,56 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9830
10028
|
if (change.type !== 'childList') continue;
|
|
9831
10029
|
// If the parent element of the added nodes is not within one of the targets,
|
|
9832
10030
|
// and not already inside a hidden node, hide all of the new children.
|
|
9833
|
-
if (![
|
|
10031
|
+
if (change.target.isConnected && ![
|
|
9834
10032
|
...visibleNodes,
|
|
9835
10033
|
...hiddenNodes
|
|
9836
|
-
].some((node)=>node
|
|
10034
|
+
].some((node)=>($d4ee10de306f2510$export$4282f70798064fe0)(node, change.target))) for (let node of change.addedNodes){
|
|
9837
10035
|
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);
|
|
9838
10036
|
else if (node instanceof Element) walk(node);
|
|
9839
10037
|
}
|
|
10038
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) {
|
|
10039
|
+
// if any of the observed shadow roots were removed, stop observing them
|
|
10040
|
+
for (let shadowRoot of shadowRootsToWatch)if (!shadowRoot.isConnected) {
|
|
10041
|
+
observer.disconnect();
|
|
10042
|
+
break;
|
|
10043
|
+
}
|
|
10044
|
+
}
|
|
9840
10045
|
}
|
|
9841
10046
|
});
|
|
9842
10047
|
observer.observe(root, {
|
|
9843
10048
|
childList: true,
|
|
9844
10049
|
subtree: true
|
|
9845
10050
|
});
|
|
10051
|
+
let shadowObservers = new Set();
|
|
10052
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) for (let shadowRoot of shadowRootsToWatch){
|
|
10053
|
+
// Disconnect single target instead of all https://github.com/whatwg/dom/issues/126
|
|
10054
|
+
let shadowObserver = new MutationObserver((changes)=>{
|
|
10055
|
+
for (let change of changes){
|
|
10056
|
+
if (change.type !== 'childList') continue;
|
|
10057
|
+
// If the parent element of the added nodes is not within one of the targets,
|
|
10058
|
+
// and not already inside a hidden node, hide all of the new children.
|
|
10059
|
+
if (change.target.isConnected && ![
|
|
10060
|
+
...visibleNodes,
|
|
10061
|
+
...hiddenNodes
|
|
10062
|
+
].some((node)=>($d4ee10de306f2510$export$4282f70798064fe0)(node, change.target))) for (let node of change.addedNodes){
|
|
10063
|
+
if ((node instanceof HTMLElement || node instanceof SVGElement) && (node.dataset.liveAnnouncer === 'true' || node.dataset.reactAriaTopLayer === 'true')) visibleNodes.add(node);
|
|
10064
|
+
else if (node instanceof Element) walk(node);
|
|
10065
|
+
}
|
|
10066
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) {
|
|
10067
|
+
// if any of the observed shadow roots were removed, stop observing them
|
|
10068
|
+
for (let shadowRoot of shadowRootsToWatch)if (!shadowRoot.isConnected) {
|
|
10069
|
+
observer.disconnect();
|
|
10070
|
+
break;
|
|
10071
|
+
}
|
|
10072
|
+
}
|
|
10073
|
+
}
|
|
10074
|
+
});
|
|
10075
|
+
shadowObserver.observe(shadowRoot, {
|
|
10076
|
+
childList: true,
|
|
10077
|
+
subtree: true
|
|
10078
|
+
});
|
|
10079
|
+
shadowObservers.add(shadowObserver);
|
|
10080
|
+
}
|
|
9846
10081
|
let observerWrapper = {
|
|
9847
10082
|
visibleNodes: visibleNodes,
|
|
9848
10083
|
hiddenNodes: hiddenNodes,
|
|
@@ -9859,6 +10094,7 @@ function $5e3802645cc19319$export$1c3ebcada18427bf(targets, options) {
|
|
|
9859
10094
|
$5e3802645cc19319$var$observerStack.push(observerWrapper);
|
|
9860
10095
|
return ()=>{
|
|
9861
10096
|
observer.disconnect();
|
|
10097
|
+
if (($f4e2df6bd15f8569$export$98658e8c59125e6a)()) for (let shadowObserver of shadowObservers)shadowObserver.disconnect();
|
|
9862
10098
|
for (let node of hiddenNodes){
|
|
9863
10099
|
let count = $5e3802645cc19319$var$refCountMap.get(node);
|
|
9864
10100
|
if (count == null) continue;
|
|
@@ -10186,6 +10422,7 @@ function $feb5ffebff200149$export$6aeb1680a0ae8741(collection) {
|
|
|
10186
10422
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10187
10423
|
* governing permissions and limitations under the License.
|
|
10188
10424
|
*/
|
|
10425
|
+
|
|
10189
10426
|
/**
|
|
10190
10427
|
* Controls how long to wait before clearing the typeahead buffer.
|
|
10191
10428
|
*/ const $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1000; // 1 second
|
|
@@ -10197,7 +10434,7 @@ function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
|
10197
10434
|
}).current;
|
|
10198
10435
|
let onKeyDown = (e)=>{
|
|
10199
10436
|
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
10200
|
-
if (!character || e.ctrlKey || e.metaKey || !e.currentTarget
|
|
10437
|
+
if (!character || e.ctrlKey || e.metaKey || !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || state.search.length === 0 && character === ' ') return;
|
|
10201
10438
|
// Do not propagate the Spacebar event if it's meant to be part of the search.
|
|
10202
10439
|
// When we time out, the search term becomes empty, hence the check on length.
|
|
10203
10440
|
// Trimming is to account for the case of pressing the Spacebar more than once,
|
|
@@ -10259,17 +10496,16 @@ function $fb3050f43d946246$var$getStringForKey(key) {
|
|
|
10259
10496
|
|
|
10260
10497
|
|
|
10261
10498
|
function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
10262
|
-
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,
|
|
10499
|
+
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
|
|
10263
10500
|
scrollRef = ref, linkBehavior: linkBehavior = 'action' } = options;
|
|
10264
10501
|
let { direction: direction } = ($18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
|
|
10265
10502
|
let router = ($ea8dcbcb9ea1b556$export$9a302a45f65d0572)();
|
|
10266
10503
|
let onKeyDown = (e)=>{
|
|
10267
|
-
var _ref_current;
|
|
10268
10504
|
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
|
|
10269
10505
|
if (e.altKey && e.key === 'Tab') e.preventDefault();
|
|
10270
10506
|
// Keyboard events bubble through portals. Don't handle keyboard events
|
|
10271
10507
|
// for elements outside the collection (e.g. menus).
|
|
10272
|
-
if (!
|
|
10508
|
+
if (!ref.current || !($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
10273
10509
|
const navigateToKey = (key, childFocus)=>{
|
|
10274
10510
|
if (key != null) {
|
|
10275
10511
|
if (manager.isLink(key) && linkBehavior === 'selection' && selectOnFocus && !($feb5ffebff200149$export$d3e3bd3e26688c04)(e)) {
|
|
@@ -10410,7 +10646,8 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10410
10646
|
// 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
|
|
10411
10647
|
// the containing element. We need to special case this so that tab will move focus out of the grid instead of looping between
|
|
10412
10648
|
// focusing the containing cell and back to the non-tabbable child element
|
|
10413
|
-
|
|
10649
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
10650
|
+
if (next && (!($d4ee10de306f2510$export$b4f377a2b6254582)(next) || activeElement && !($b4b717babfbb907b$export$bebd5a1431fec25d)(activeElement))) ($7215afc6de606d6b$export$de79e2c695e052f3)(next);
|
|
10414
10651
|
}
|
|
10415
10652
|
break;
|
|
10416
10653
|
}
|
|
@@ -10422,7 +10659,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10422
10659
|
top: 0,
|
|
10423
10660
|
left: 0
|
|
10424
10661
|
});
|
|
10425
|
-
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll',
|
|
10662
|
+
($e9faafb641e167db$export$90fc3a17d93f704c)(scrollRef, 'scroll', ()=>{
|
|
10426
10663
|
var _scrollRef_current, _scrollRef_current1;
|
|
10427
10664
|
var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
|
|
10428
10665
|
scrollPos.current = {
|
|
@@ -10433,11 +10670,11 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10433
10670
|
let onFocus = (e)=>{
|
|
10434
10671
|
if (manager.isFocused) {
|
|
10435
10672
|
// If a focus event bubbled through a portal, reset focus state.
|
|
10436
|
-
if (!e.currentTarget
|
|
10673
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) manager.setFocused(false);
|
|
10437
10674
|
return;
|
|
10438
10675
|
}
|
|
10439
10676
|
// Focus events can bubble through portals. Ignore these events.
|
|
10440
|
-
if (!e.currentTarget
|
|
10677
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
10441
10678
|
manager.setFocused(true);
|
|
10442
10679
|
if (manager.focusedKey == null) {
|
|
10443
10680
|
var _delegate_getLastKey, _delegate_getFirstKey;
|
|
@@ -10454,7 +10691,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10454
10691
|
var _manager_lastSelectedKey, _manager_firstSelectedKey;
|
|
10455
10692
|
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));
|
|
10456
10693
|
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));
|
|
10457
|
-
} else if (
|
|
10694
|
+
} else if (scrollRef.current) {
|
|
10458
10695
|
// Restore the scroll position to what it was before.
|
|
10459
10696
|
scrollRef.current.scrollTop = scrollPos.current.top;
|
|
10460
10697
|
scrollRef.current.scrollLeft = scrollPos.current.left;
|
|
@@ -10464,7 +10701,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10464
10701
|
let element = ($feb5ffebff200149$export$c3d8340acf92597f)(ref, manager.focusedKey);
|
|
10465
10702
|
if (element instanceof HTMLElement) {
|
|
10466
10703
|
// This prevents a flash of focus on the first/last element in the collection, or the collection itself.
|
|
10467
|
-
if (!
|
|
10704
|
+
if (!($d4ee10de306f2510$export$b4f377a2b6254582)(element) && !shouldUseVirtualFocus) ($7215afc6de606d6b$export$de79e2c695e052f3)(element);
|
|
10468
10705
|
let modality = ($507fabe10e71c6fb$export$630ff653c5ada6a9)();
|
|
10469
10706
|
if (modality === 'keyboard') ($2f04cbc44ee30ce0$export$c826860796309d1b)(element, {
|
|
10470
10707
|
containingElement: ref.current
|
|
@@ -10474,7 +10711,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10474
10711
|
};
|
|
10475
10712
|
let onBlur = (e)=>{
|
|
10476
10713
|
// Don't set blurred and then focused again if moving focus within the collection.
|
|
10477
|
-
if (!e.currentTarget
|
|
10714
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) manager.setFocused(false);
|
|
10478
10715
|
};
|
|
10479
10716
|
// Ref to track whether the first item in the collection should be automatically focused. Specifically used for autocomplete when user types
|
|
10480
10717
|
// to focus the first key AFTER the collection updates.
|
|
@@ -10605,7 +10842,7 @@ function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
|
10605
10842
|
onBlur: onBlur,
|
|
10606
10843
|
onMouseDown (e) {
|
|
10607
10844
|
// Ignore events that bubbled through portals.
|
|
10608
|
-
if (scrollRef.current === e
|
|
10845
|
+
if (scrollRef.current === ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) // Prevent focus going to the collection when clicking on the scrollbar.
|
|
10609
10846
|
e.preventDefault();
|
|
10610
10847
|
}
|
|
10611
10848
|
};
|
|
@@ -10677,7 +10914,7 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10677
10914
|
if (isFocused && manager.isFocused) {
|
|
10678
10915
|
if (!shouldUseVirtualFocus) {
|
|
10679
10916
|
if (focus) focus();
|
|
10680
|
-
else if (
|
|
10917
|
+
else if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() !== ref.current && ref.current) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
10681
10918
|
} else ($55f9b1ae81f22853$export$76e4e37e5339496d)(ref.current);
|
|
10682
10919
|
}
|
|
10683
10920
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -10697,13 +10934,20 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10697
10934
|
if (!shouldUseVirtualFocus && !isDisabled) itemProps = {
|
|
10698
10935
|
tabIndex: key === manager.focusedKey ? 0 : -1,
|
|
10699
10936
|
onFocus (e) {
|
|
10700
|
-
if (e
|
|
10937
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) === ref.current) manager.setFocusedKey(key);
|
|
10701
10938
|
}
|
|
10702
10939
|
};
|
|
10703
10940
|
else if (isDisabled) itemProps.onMouseDown = (e)=>{
|
|
10704
10941
|
// Prevent focus going to the body when clicking on a disabled item.
|
|
10705
10942
|
e.preventDefault();
|
|
10706
10943
|
};
|
|
10944
|
+
(useEffect)(()=>{
|
|
10945
|
+
if (isDisabled && manager.focusedKey === key) manager.setFocusedKey(null);
|
|
10946
|
+
}, [
|
|
10947
|
+
manager,
|
|
10948
|
+
isDisabled,
|
|
10949
|
+
key
|
|
10950
|
+
]);
|
|
10707
10951
|
// With checkbox selection, onAction (i.e. navigation) becomes primary, and occurs on a single click of the row.
|
|
10708
10952
|
// Clicking the checkbox enters selection mode, after which clicking anywhere on any row toggles selection for that row.
|
|
10709
10953
|
// With highlight selection, onAction is secondary, and occurs on double click. Single click selects the row.
|
|
@@ -10745,13 +10989,13 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10745
10989
|
itemPressProps.onPressStart = (e)=>{
|
|
10746
10990
|
modality.current = e.pointerType;
|
|
10747
10991
|
longPressEnabledOnPressStart.current = longPressEnabled;
|
|
10748
|
-
if (e.pointerType === 'keyboard' && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey())) onSelect(e);
|
|
10992
|
+
if (e.pointerType === 'keyboard' && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey(e.key))) onSelect(e);
|
|
10749
10993
|
};
|
|
10750
10994
|
// 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.)
|
|
10751
10995
|
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)
|
|
10752
10996
|
if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e)=>{
|
|
10753
10997
|
if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== 'mouse') {
|
|
10754
|
-
if (e.pointerType === 'keyboard' && !$880e95eb8b93ba9a$var$isActionKey()) return;
|
|
10998
|
+
if (e.pointerType === 'keyboard' && !$880e95eb8b93ba9a$var$isActionKey(e.key)) return;
|
|
10755
10999
|
performAction(e);
|
|
10756
11000
|
} else if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
|
|
10757
11001
|
};
|
|
@@ -10771,13 +11015,13 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10771
11015
|
// Select on mouse down unless there is a primary action which will occur on mouse up.
|
|
10772
11016
|
// For keyboard, select on key down. If there is an action, the Space key selects on key down,
|
|
10773
11017
|
// and the Enter key performs onAction on key up.
|
|
10774
|
-
if (allowsSelection && (e.pointerType === 'mouse' && !hasPrimaryAction || e.pointerType === 'keyboard' && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey()))) onSelect(e);
|
|
11018
|
+
if (allowsSelection && (e.pointerType === 'mouse' && !hasPrimaryAction || e.pointerType === 'keyboard' && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey(e.key)))) onSelect(e);
|
|
10775
11019
|
};
|
|
10776
11020
|
itemPressProps.onPress = (e)=>{
|
|
10777
11021
|
// Selection occurs on touch up. Primary actions always occur on pointer up.
|
|
10778
11022
|
// Both primary and secondary actions occur on Enter key up. The only exception
|
|
10779
11023
|
// is secondary actions, which occur on double click with a mouse.
|
|
10780
|
-
if (e.pointerType === 'touch' || e.pointerType === 'pen' || e.pointerType === 'virtual' || e.pointerType === 'keyboard' && hasAction && $880e95eb8b93ba9a$var$isActionKey() || e.pointerType === 'mouse' && hadPrimaryActionOnPressStart.current) {
|
|
11024
|
+
if (e.pointerType === 'touch' || e.pointerType === 'pen' || e.pointerType === 'virtual' || e.pointerType === 'keyboard' && hasAction && $880e95eb8b93ba9a$var$isActionKey(e.key) || e.pointerType === 'mouse' && hadPrimaryActionOnPressStart.current) {
|
|
10781
11025
|
if (hasAction) performAction(e);
|
|
10782
11026
|
else if (allowsSelection) onSelect(e);
|
|
10783
11027
|
}
|
|
@@ -10862,13 +11106,11 @@ function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
|
10862
11106
|
hasAction: hasAction
|
|
10863
11107
|
};
|
|
10864
11108
|
}
|
|
10865
|
-
function $880e95eb8b93ba9a$var$isActionKey() {
|
|
10866
|
-
|
|
10867
|
-
return (event === null || event === void 0 ? void 0 : event.key) === 'Enter';
|
|
11109
|
+
function $880e95eb8b93ba9a$var$isActionKey(key) {
|
|
11110
|
+
return key === 'Enter';
|
|
10868
11111
|
}
|
|
10869
|
-
function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
10870
|
-
|
|
10871
|
-
return (event === null || event === void 0 ? void 0 : event.key) === ' ' || (event === null || event === void 0 ? void 0 : event.code) === 'Space';
|
|
11112
|
+
function $880e95eb8b93ba9a$var$isSelectionKey(key) {
|
|
11113
|
+
return key === ' ';
|
|
10872
11114
|
}
|
|
10873
11115
|
|
|
10874
11116
|
/*
|
|
@@ -11682,11 +11924,15 @@ function $af383d3bef1cfdc9$export$c3f9f39876e4bc7(props) {
|
|
|
11682
11924
|
role: 'presentation'
|
|
11683
11925
|
},
|
|
11684
11926
|
headingProps: heading ? {
|
|
11685
|
-
//
|
|
11927
|
+
// Technically, listbox cannot contain headings according to ARIA.
|
|
11686
11928
|
// We hide the heading from assistive technology, using role="presentation",
|
|
11687
11929
|
// and only use it as a visual label for the nested group.
|
|
11688
11930
|
id: headingId,
|
|
11689
|
-
role: 'presentation'
|
|
11931
|
+
role: 'presentation',
|
|
11932
|
+
onMouseDown: (e)=>{
|
|
11933
|
+
// Prevent DOM focus from moving on mouse down when using virtual focus
|
|
11934
|
+
e.preventDefault();
|
|
11935
|
+
}
|
|
11690
11936
|
} : {},
|
|
11691
11937
|
groupProps: {
|
|
11692
11938
|
role: 'group',
|
|
@@ -12288,7 +12534,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
|
12288
12534
|
// This is best-effort. There may be false positives, e.g. setTimeout.
|
|
12289
12535
|
form.reset = ()=>{
|
|
12290
12536
|
// React uses MessageChannel for scheduling, so ignore 'message' events.
|
|
12291
|
-
isIgnoredReset.current = !window.event || window.event.type === 'message' && window.event
|
|
12537
|
+
isIgnoredReset.current = !window.event || window.event.type === 'message' && ($d4ee10de306f2510$export$e58f029f0fbfdb29)(window.event) instanceof MessagePort;
|
|
12292
12538
|
reset === null || reset === void 0 ? void 0 : reset.call(form);
|
|
12293
12539
|
isIgnoredReset.current = false;
|
|
12294
12540
|
};
|
|
@@ -12336,8 +12582,9 @@ function $e93e671b31057976$var$getNativeValidity(input) {
|
|
|
12336
12582
|
}
|
|
12337
12583
|
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
12338
12584
|
for(let i = 0; i < form.elements.length; i++){
|
|
12585
|
+
var _element_validity;
|
|
12339
12586
|
let element = form.elements[i];
|
|
12340
|
-
if (
|
|
12587
|
+
if (((_element_validity = element.validity) === null || _element_validity === void 0 ? void 0 : _element_validity.valid) === false) return element;
|
|
12341
12588
|
}
|
|
12342
12589
|
return null;
|
|
12343
12590
|
}
|
|
@@ -12398,7 +12645,7 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
|
12398
12645
|
'aria-haspopup': props['aria-haspopup'],
|
|
12399
12646
|
'aria-controls': props['aria-controls'],
|
|
12400
12647
|
value: value,
|
|
12401
|
-
onChange: (e)=>setValue(e.
|
|
12648
|
+
onChange: (e)=>setValue(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).value),
|
|
12402
12649
|
autoComplete: props.autoComplete,
|
|
12403
12650
|
autoCapitalize: props.autoCapitalize,
|
|
12404
12651
|
maxLength: props.maxLength,
|
|
@@ -12511,7 +12758,7 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
12511
12758
|
inputRef
|
|
12512
12759
|
]);
|
|
12513
12760
|
let onBeforeInput = !$d841c8010a73d545$var$supportsNativeBeforeInputEvent() ? (e)=>{
|
|
12514
|
-
let nextValue = e.
|
|
12761
|
+
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);
|
|
12515
12762
|
if (!state.validate(nextValue)) e.preventDefault();
|
|
12516
12763
|
} : null;
|
|
12517
12764
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = ($2d73ec29415bd339$export$712718f7aec83d5)(props, inputRef);
|
|
@@ -12977,8 +13224,8 @@ class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export
|
|
|
12977
13224
|
this.ownerDocument.markDirty(this);
|
|
12978
13225
|
}
|
|
12979
13226
|
get level() {
|
|
12980
|
-
var
|
|
12981
|
-
if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((
|
|
13227
|
+
var _this_parentNode_node;
|
|
13228
|
+
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);
|
|
12982
13229
|
return 0;
|
|
12983
13230
|
}
|
|
12984
13231
|
/**
|
|
@@ -13106,11 +13353,9 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
|
|
|
13106
13353
|
}
|
|
13107
13354
|
}
|
|
13108
13355
|
/** Finalizes the collection update, updating all nodes and freezing the collection. */ getCollection() {
|
|
13109
|
-
// If in a subscription update, return
|
|
13110
|
-
//
|
|
13111
|
-
|
|
13112
|
-
// the new collection.
|
|
13113
|
-
if (this.inSubscription) return this.collection.clone();
|
|
13356
|
+
// If in a subscription update, return return the existing collection.
|
|
13357
|
+
// React will call getCollection again during render, at which point all the updates will be complete.
|
|
13358
|
+
if (this.inSubscription) return this.collection;
|
|
13114
13359
|
// Reset queuedRender to false when getCollection is called during render.
|
|
13115
13360
|
this.queuedRender = false;
|
|
13116
13361
|
this.updateCollection();
|
|
@@ -13149,6 +13394,10 @@ class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export
|
|
|
13149
13394
|
// we reset queuedRender back to false.
|
|
13150
13395
|
this.queuedRender = true;
|
|
13151
13396
|
this.inSubscription = true;
|
|
13397
|
+
// Clone the collection to ensure that React queues a render. It will call getCollection again
|
|
13398
|
+
// during render, at which point all the updates will be complete and we can return
|
|
13399
|
+
// the new collection.
|
|
13400
|
+
if (!this.isSSR) this.collection = this.collection.clone();
|
|
13152
13401
|
for (let fn of this.subscriptions)fn();
|
|
13153
13402
|
this.inSubscription = false;
|
|
13154
13403
|
}
|
|
@@ -13239,15 +13488,35 @@ function $e948873055cbafe4$export$727c8fc270210f13(props) {
|
|
|
13239
13488
|
// It will throw an error during hydration when it expects the firstChild to contain content rendered
|
|
13240
13489
|
// on the server, when in reality, the browser will have placed this inside the `content` document fragment.
|
|
13241
13490
|
// This monkey patches the firstChild property for our special hidden template elements to work around this error.
|
|
13491
|
+
// does the same for appendChild/removeChild/insertBefore as per the issue below
|
|
13242
13492
|
// See https://github.com/facebook/react/issues/19932
|
|
13243
13493
|
if (typeof HTMLTemplateElement !== 'undefined') {
|
|
13244
|
-
const getFirstChild = Object.getOwnPropertyDescriptor(Node.prototype, 'firstChild').get;
|
|
13245
13494
|
Object.defineProperty(HTMLTemplateElement.prototype, 'firstChild', {
|
|
13246
13495
|
configurable: true,
|
|
13247
13496
|
enumerable: true,
|
|
13248
13497
|
get: function() {
|
|
13249
|
-
|
|
13250
|
-
|
|
13498
|
+
return this.content.firstChild;
|
|
13499
|
+
}
|
|
13500
|
+
});
|
|
13501
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'appendChild', {
|
|
13502
|
+
configurable: true,
|
|
13503
|
+
enumerable: true,
|
|
13504
|
+
value: function(node) {
|
|
13505
|
+
return this.content.appendChild(node);
|
|
13506
|
+
}
|
|
13507
|
+
});
|
|
13508
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'removeChild', {
|
|
13509
|
+
configurable: true,
|
|
13510
|
+
enumerable: true,
|
|
13511
|
+
value: function(node) {
|
|
13512
|
+
return this.content.removeChild(node);
|
|
13513
|
+
}
|
|
13514
|
+
});
|
|
13515
|
+
Object.defineProperty(HTMLTemplateElement.prototype, 'insertBefore', {
|
|
13516
|
+
configurable: true,
|
|
13517
|
+
enumerable: true,
|
|
13518
|
+
value: function(node, child) {
|
|
13519
|
+
return this.content.insertBefore(node, child);
|
|
13251
13520
|
}
|
|
13252
13521
|
});
|
|
13253
13522
|
}
|
|
@@ -13262,9 +13531,7 @@ function $f39a9eba43920ace$export$8dc98ba7eadeaa56(props) {
|
|
|
13262
13531
|
// In SSR, portals are not supported by React. Instead, always render into a <template>
|
|
13263
13532
|
// element, which the browser will never display to the user. In addition, the
|
|
13264
13533
|
// content is not part of the accessible DOM tree, so it won't affect ids or other accessibility attributes.
|
|
13265
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement("template",
|
|
13266
|
-
"data-react-aria-hidden": true
|
|
13267
|
-
}, children);
|
|
13534
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement("template", null, children);
|
|
13268
13535
|
}
|
|
13269
13536
|
function $f39a9eba43920ace$export$86427a43e3e48ebb(fn) {
|
|
13270
13537
|
let Wrapper = (props, ref)=>{
|
|
@@ -13722,6 +13989,9 @@ function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDro
|
|
|
13722
13989
|
renderDropIndicator
|
|
13723
13990
|
],
|
|
13724
13991
|
children (node) {
|
|
13992
|
+
// Return a empty fragment since we don't want to render the content twice
|
|
13993
|
+
// 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
|
|
13994
|
+
if (node.type === 'content') return /*#__PURE__*/ ($dbSRa$react).createElement(($dbSRa$react).Fragment, null);
|
|
13725
13995
|
let rendered = node.render(node);
|
|
13726
13996
|
if (!renderDropIndicator || node.type !== 'item') return rendered;
|
|
13727
13997
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($dbSRa$react).Fragment, null, renderDropIndicator({
|
|
@@ -13944,7 +14214,7 @@ function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
|
13944
14214
|
let focusManager = ($9bf71ea28793e738$export$c5251b9e124bf29)(ref);
|
|
13945
14215
|
const onKeyDown = (e)=>{
|
|
13946
14216
|
// don't handle portalled events
|
|
13947
|
-
if (!e.currentTarget
|
|
14217
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
13948
14218
|
if (orientation === 'horizontal' && e.key === 'ArrowRight' || orientation === 'vertical' && e.key === 'ArrowDown') {
|
|
13949
14219
|
if (shouldReverse) focusManager.focusPrevious();
|
|
13950
14220
|
else focusManager.focusNext();
|
|
@@ -13957,7 +14227,7 @@ function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
|
13957
14227
|
// to the first or last focusable child, and let the
|
|
13958
14228
|
// browser handle the Tab key as usual from there.
|
|
13959
14229
|
e.stopPropagation();
|
|
13960
|
-
lastFocused.current =
|
|
14230
|
+
lastFocused.current = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
13961
14231
|
if (e.shiftKey) focusManager.focusFirst();
|
|
13962
14232
|
else focusManager.focusLast();
|
|
13963
14233
|
return;
|
|
@@ -13970,14 +14240,13 @@ function $2680b1829e803644$export$fa142eb1681c520(props, ref) {
|
|
|
13970
14240
|
// Record the last focused child when focus moves out of the toolbar.
|
|
13971
14241
|
const lastFocused = (useRef)(null);
|
|
13972
14242
|
const onBlur = (e)=>{
|
|
13973
|
-
if (!e.currentTarget
|
|
14243
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget) && !lastFocused.current) lastFocused.current = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
13974
14244
|
};
|
|
13975
14245
|
// Restore focus to the last focused child when focus returns into the toolbar.
|
|
13976
14246
|
// If the element was removed, do nothing, either the first item in the first group,
|
|
13977
14247
|
// or the last item in the last group will be focused, depending on direction.
|
|
13978
14248
|
const onFocus = (e)=>{
|
|
13979
|
-
|
|
13980
|
-
if (lastFocused.current && !e.currentTarget.contains(e.relatedTarget) && ((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(e.target))) {
|
|
14249
|
+
if (lastFocused.current && !($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget) && ($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
13981
14250
|
var _lastFocused_current;
|
|
13982
14251
|
(_lastFocused_current = lastFocused.current) === null || _lastFocused_current === void 0 ? void 0 : _lastFocused_current.focus();
|
|
13983
14252
|
lastFocused.current = null;
|
|
@@ -15129,6 +15398,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15129
15398
|
onPressStart (e) {
|
|
15130
15399
|
if (state.isReadOnly) {
|
|
15131
15400
|
state.setFocusedDate(date);
|
|
15401
|
+
state.setFocused(true);
|
|
15132
15402
|
return;
|
|
15133
15403
|
}
|
|
15134
15404
|
if ('highlightedRange' in state && !state.anchorDate && (e.pointerType === 'mouse' || e.pointerType === 'touch')) {
|
|
@@ -15140,12 +15410,14 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15140
15410
|
if (($14e0f24ef4ac5c92$export$ea39ec197993aef0)(date, state.highlightedRange.start)) {
|
|
15141
15411
|
state.setAnchorDate(state.highlightedRange.end);
|
|
15142
15412
|
state.setFocusedDate(date);
|
|
15413
|
+
state.setFocused(true);
|
|
15143
15414
|
state.setDragging(true);
|
|
15144
15415
|
isRangeBoundaryPressed.current = true;
|
|
15145
15416
|
return;
|
|
15146
15417
|
} else if (($14e0f24ef4ac5c92$export$ea39ec197993aef0)(date, state.highlightedRange.end)) {
|
|
15147
15418
|
state.setAnchorDate(state.highlightedRange.start);
|
|
15148
15419
|
state.setFocusedDate(date);
|
|
15420
|
+
state.setFocused(true);
|
|
15149
15421
|
state.setDragging(true);
|
|
15150
15422
|
isRangeBoundaryPressed.current = true;
|
|
15151
15423
|
return;
|
|
@@ -15156,6 +15428,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15156
15428
|
touchDragTimerRef.current = undefined;
|
|
15157
15429
|
state.selectDate(date);
|
|
15158
15430
|
state.setFocusedDate(date);
|
|
15431
|
+
state.setFocused(true);
|
|
15159
15432
|
isAnchorPressed.current = true;
|
|
15160
15433
|
};
|
|
15161
15434
|
// Start selection on mouse/touch down so users can drag to select a range.
|
|
@@ -15175,6 +15448,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15175
15448
|
if (!('anchorDate' in state) && !state.isReadOnly) {
|
|
15176
15449
|
state.selectDate(date);
|
|
15177
15450
|
state.setFocusedDate(date);
|
|
15451
|
+
state.setFocused(true);
|
|
15178
15452
|
}
|
|
15179
15453
|
},
|
|
15180
15454
|
onPressUp (e) {
|
|
@@ -15185,6 +15459,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15185
15459
|
if ('anchorDate' in state && touchDragTimerRef.current) {
|
|
15186
15460
|
state.selectDate(date);
|
|
15187
15461
|
state.setFocusedDate(date);
|
|
15462
|
+
state.setFocused(true);
|
|
15188
15463
|
}
|
|
15189
15464
|
if ('anchorDate' in state) {
|
|
15190
15465
|
if (isRangeBoundaryPressed.current) // When clicking on the start or end date of an already selected range,
|
|
@@ -15195,6 +15470,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15195
15470
|
// When releasing a drag or pressing the end date of a range, select it.
|
|
15196
15471
|
state.selectDate(date);
|
|
15197
15472
|
state.setFocusedDate(date);
|
|
15473
|
+
state.setFocused(true);
|
|
15198
15474
|
} else if (e.pointerType === 'keyboard' && !state.anchorDate) {
|
|
15199
15475
|
// For range selection, auto-advance the focused date by one if using keyboard.
|
|
15200
15476
|
// This gives an indication that you're selecting a range rather than a single date.
|
|
@@ -15207,11 +15483,15 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15207
15483
|
if (state.isInvalid(nextDay)) nextDay = date.subtract({
|
|
15208
15484
|
days: 1
|
|
15209
15485
|
});
|
|
15210
|
-
if (!state.isInvalid(nextDay))
|
|
15486
|
+
if (!state.isInvalid(nextDay)) {
|
|
15487
|
+
state.setFocusedDate(nextDay);
|
|
15488
|
+
state.setFocused(true);
|
|
15489
|
+
}
|
|
15211
15490
|
} else if (e.pointerType === 'virtual') {
|
|
15212
15491
|
// For screen readers, just select the date on click.
|
|
15213
15492
|
state.selectDate(date);
|
|
15214
15493
|
state.setFocusedDate(date);
|
|
15494
|
+
state.setFocused(true);
|
|
15215
15495
|
}
|
|
15216
15496
|
}
|
|
15217
15497
|
}
|
|
@@ -15229,7 +15509,7 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15229
15509
|
// Also only scroll into view if the cell actually got focused.
|
|
15230
15510
|
// There are some cases where the cell might be disabled or inside,
|
|
15231
15511
|
// an inert container and we don't want to scroll then.
|
|
15232
|
-
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() !== 'pointer' &&
|
|
15512
|
+
if (($507fabe10e71c6fb$export$630ff653c5ada6a9)() !== 'pointer' && ($d4ee10de306f2510$export$cd4e5573fbe2b576)() === ref.current) ($2f04cbc44ee30ce0$export$c826860796309d1b)(ref.current, {
|
|
15233
15513
|
containingElement: ($62d8ded9296f3872$export$cfa2225e87938781)(ref.current)
|
|
15234
15514
|
});
|
|
15235
15515
|
}
|
|
@@ -15255,7 +15535,10 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15255
15535
|
},
|
|
15256
15536
|
buttonProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(pressProps, {
|
|
15257
15537
|
onFocus () {
|
|
15258
|
-
if (!isDisabled)
|
|
15538
|
+
if (!isDisabled) {
|
|
15539
|
+
state.setFocusedDate(date);
|
|
15540
|
+
state.setFocused(true);
|
|
15541
|
+
}
|
|
15259
15542
|
},
|
|
15260
15543
|
tabIndex: tabIndex,
|
|
15261
15544
|
role: 'button',
|
|
@@ -15274,7 +15557,12 @@ function $36a0ac60f04457c5$export$136073280381448e(props, state, ref) {
|
|
|
15274
15557
|
// This is necessary on touch devices to allow dragging
|
|
15275
15558
|
// outside the original pressed element.
|
|
15276
15559
|
// (JSDOM does not support this)
|
|
15277
|
-
|
|
15560
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
15561
|
+
if (target instanceof HTMLElement && 'releasePointerCapture' in target) {
|
|
15562
|
+
if ('hasPointerCapture' in target) {
|
|
15563
|
+
if (target.hasPointerCapture(e.pointerId)) target.releasePointerCapture(e.pointerId);
|
|
15564
|
+
} else target.releasePointerCapture(e.pointerId);
|
|
15565
|
+
}
|
|
15278
15566
|
},
|
|
15279
15567
|
onContextMenu (e) {
|
|
15280
15568
|
// Prevent context menu on long press.
|
|
@@ -15310,7 +15598,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
15310
15598
|
// since we spread props on label, onChange will end up there as well as in here.
|
|
15311
15599
|
// so we have to stop propagation at the lowest level that we care about
|
|
15312
15600
|
e.stopPropagation();
|
|
15313
|
-
state.setSelected(e.
|
|
15601
|
+
state.setSelected(($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).checked);
|
|
15314
15602
|
};
|
|
15315
15603
|
let hasChildren = children != null;
|
|
15316
15604
|
let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
|
|
@@ -15732,22 +16020,25 @@ function $de67e98908f0c6ee$export$7f629e9dc1ecf37c(props) {
|
|
|
15732
16020
|
numberParser,
|
|
15733
16021
|
inputValue
|
|
15734
16022
|
]);
|
|
15735
|
-
let commit = ()=>{
|
|
16023
|
+
let commit = (overrideValue)=>{
|
|
16024
|
+
let newInputValue = overrideValue === undefined ? inputValue : overrideValue;
|
|
16025
|
+
let newParsedValue = parsedValue;
|
|
16026
|
+
if (overrideValue !== undefined) newParsedValue = numberParser.parse(newInputValue);
|
|
15736
16027
|
// Set to empty state if input value is empty
|
|
15737
|
-
if (!
|
|
16028
|
+
if (!newInputValue.length) {
|
|
15738
16029
|
setNumberValue(NaN);
|
|
15739
16030
|
setInputValue(value === undefined ? '' : format(numberValue));
|
|
15740
16031
|
return;
|
|
15741
16032
|
}
|
|
15742
16033
|
// if it failed to parse, then reset input to formatted version of current number
|
|
15743
|
-
if (isNaN(
|
|
16034
|
+
if (isNaN(newParsedValue)) {
|
|
15744
16035
|
setInputValue(format(numberValue));
|
|
15745
16036
|
return;
|
|
15746
16037
|
}
|
|
15747
16038
|
// Clamp to min and max, round to the nearest step, and round to specified number of digits
|
|
15748
16039
|
let clampedValue;
|
|
15749
|
-
if (step === undefined || isNaN(step)) clampedValue = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(
|
|
15750
|
-
else clampedValue = ($9446cca9a3875146$export$cb6e0bb50bc19463)(
|
|
16040
|
+
if (step === undefined || isNaN(step)) clampedValue = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(newParsedValue, minValue, maxValue);
|
|
16041
|
+
else clampedValue = ($9446cca9a3875146$export$cb6e0bb50bc19463)(newParsedValue, minValue, maxValue, step);
|
|
15751
16042
|
clampedValue = numberParser.parse(format(clampedValue));
|
|
15752
16043
|
setNumberValue(clampedValue);
|
|
15753
16044
|
// in a controlled state, the numberValue won't change, so we won't go back to our old input without help
|
|
@@ -16113,6 +16404,7 @@ function $parcel$interopDefault$9(a) {
|
|
|
16113
16404
|
|
|
16114
16405
|
|
|
16115
16406
|
|
|
16407
|
+
const $d2e8511e6f209edf$var$noop = ()=>{};
|
|
16116
16408
|
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
16117
16409
|
const _async = (useRef)(undefined);
|
|
16118
16410
|
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;
|
|
@@ -16199,23 +16491,31 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16199
16491
|
}, [
|
|
16200
16492
|
clearAsync
|
|
16201
16493
|
]);
|
|
16202
|
-
const
|
|
16494
|
+
const onIncrementEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onIncrement !== null && onIncrement !== void 0 ? onIncrement : $d2e8511e6f209edf$var$noop);
|
|
16495
|
+
const onDecrementEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onDecrement !== null && onDecrement !== void 0 ? onDecrement : $d2e8511e6f209edf$var$noop);
|
|
16496
|
+
const stepUpEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
16497
|
+
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) {
|
|
16498
|
+
onIncrementEvent();
|
|
16499
|
+
onIncrementPressStartEvent(60);
|
|
16500
|
+
}
|
|
16501
|
+
});
|
|
16502
|
+
const onIncrementPressStartEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
16203
16503
|
clearAsyncEvent();
|
|
16204
16504
|
isSpinning.current = true;
|
|
16205
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
16206
16505
|
// Start spinning after initial delay
|
|
16207
|
-
_async.current = window.setTimeout(
|
|
16208
|
-
|
|
16209
|
-
|
|
16506
|
+
_async.current = window.setTimeout(stepUpEvent, initialStepDelay);
|
|
16507
|
+
});
|
|
16508
|
+
const stepDownEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
16509
|
+
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) {
|
|
16510
|
+
onDecrementEvent();
|
|
16511
|
+
onDecrementPressStartEvent(60);
|
|
16512
|
+
}
|
|
16210
16513
|
});
|
|
16211
|
-
const
|
|
16514
|
+
const onDecrementPressStartEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
16212
16515
|
clearAsyncEvent();
|
|
16213
16516
|
isSpinning.current = true;
|
|
16214
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
16215
16517
|
// Start spinning after initial delay
|
|
16216
|
-
_async.current = window.setTimeout(
|
|
16217
|
-
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
16218
|
-
}, initialStepDelay);
|
|
16518
|
+
_async.current = window.setTimeout(stepDownEvent, initialStepDelay);
|
|
16219
16519
|
});
|
|
16220
16520
|
let cancelContextMenu = (e)=>{
|
|
16221
16521
|
e.preventDefault();
|
|
@@ -16228,15 +16528,15 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16228
16528
|
let isUp = (useRef)(false);
|
|
16229
16529
|
let [isIncrementPressed, setIsIncrementPressed] = (useState)(null);
|
|
16230
16530
|
(useEffect)(()=>{
|
|
16231
|
-
if (isIncrementPressed === 'touch')
|
|
16232
|
-
else if (isIncrementPressed)
|
|
16531
|
+
if (isIncrementPressed === 'touch') onIncrementPressStartEvent(600);
|
|
16532
|
+
else if (isIncrementPressed) onIncrementPressStartEvent(400);
|
|
16233
16533
|
}, [
|
|
16234
16534
|
isIncrementPressed
|
|
16235
16535
|
]);
|
|
16236
16536
|
let [isDecrementPressed, setIsDecrementPressed] = (useState)(null);
|
|
16237
16537
|
(useEffect)(()=>{
|
|
16238
|
-
if (isDecrementPressed === 'touch')
|
|
16239
|
-
else if (isDecrementPressed)
|
|
16538
|
+
if (isDecrementPressed === 'touch') onDecrementPressStartEvent(600);
|
|
16539
|
+
else if (isDecrementPressed) onDecrementPressStartEvent(400);
|
|
16240
16540
|
}, [
|
|
16241
16541
|
isDecrementPressed
|
|
16242
16542
|
]);
|
|
@@ -16256,32 +16556,32 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16256
16556
|
},
|
|
16257
16557
|
incrementButtonProps: {
|
|
16258
16558
|
onPressStart: (e)=>{
|
|
16259
|
-
|
|
16260
|
-
|
|
16261
|
-
|
|
16559
|
+
clearAsync();
|
|
16560
|
+
if (e.pointerType !== 'touch') {
|
|
16561
|
+
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
16562
|
+
setIsIncrementPressed('mouse');
|
|
16563
|
+
} else {
|
|
16262
16564
|
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
16263
16565
|
capture: true
|
|
16264
16566
|
});
|
|
16265
16567
|
isUp.current = false;
|
|
16266
16568
|
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
16267
16569
|
// the control isn't spinning.
|
|
16268
|
-
|
|
16269
|
-
setIsIncrementPressed('touch');
|
|
16270
|
-
}, 600);
|
|
16570
|
+
setIsIncrementPressed('touch');
|
|
16271
16571
|
}
|
|
16272
16572
|
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
16273
16573
|
},
|
|
16274
16574
|
onPressUp: (e)=>{
|
|
16275
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
16276
16575
|
clearAsync();
|
|
16576
|
+
if (e.pointerType === 'touch') isUp.current = true;
|
|
16277
16577
|
removeAllGlobalListeners();
|
|
16278
16578
|
setIsIncrementPressed(null);
|
|
16279
16579
|
},
|
|
16280
16580
|
onPressEnd: (e)=>{
|
|
16581
|
+
clearAsync();
|
|
16281
16582
|
if (e.pointerType === 'touch') {
|
|
16282
16583
|
if (!isSpinning.current && isUp.current) onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
16283
16584
|
}
|
|
16284
|
-
clearAsync();
|
|
16285
16585
|
isUp.current = false;
|
|
16286
16586
|
setIsIncrementPressed(null);
|
|
16287
16587
|
},
|
|
@@ -16290,31 +16590,31 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
16290
16590
|
},
|
|
16291
16591
|
decrementButtonProps: {
|
|
16292
16592
|
onPressStart: (e)=>{
|
|
16293
|
-
|
|
16294
|
-
|
|
16295
|
-
|
|
16593
|
+
clearAsync();
|
|
16594
|
+
if (e.pointerType !== 'touch') {
|
|
16595
|
+
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
16596
|
+
setIsDecrementPressed('mouse');
|
|
16597
|
+
} else {
|
|
16296
16598
|
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
16297
16599
|
capture: true
|
|
16298
16600
|
});
|
|
16299
16601
|
isUp.current = false;
|
|
16300
16602
|
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
16301
16603
|
// the control isn't spinning.
|
|
16302
|
-
|
|
16303
|
-
setIsDecrementPressed('touch');
|
|
16304
|
-
}, 600);
|
|
16604
|
+
setIsDecrementPressed('touch');
|
|
16305
16605
|
}
|
|
16306
16606
|
},
|
|
16307
16607
|
onPressUp: (e)=>{
|
|
16308
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
16309
16608
|
clearAsync();
|
|
16609
|
+
if (e.pointerType === 'touch') isUp.current = true;
|
|
16310
16610
|
removeAllGlobalListeners();
|
|
16311
16611
|
setIsDecrementPressed(null);
|
|
16312
16612
|
},
|
|
16313
16613
|
onPressEnd: (e)=>{
|
|
16614
|
+
clearAsync();
|
|
16314
16615
|
if (e.pointerType === 'touch') {
|
|
16315
16616
|
if (!isSpinning.current && isUp.current) onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
16316
16617
|
}
|
|
16317
|
-
clearAsync();
|
|
16318
16618
|
isUp.current = false;
|
|
16319
16619
|
setIsDecrementPressed(null);
|
|
16320
16620
|
},
|
|
@@ -16655,15 +16955,30 @@ function $parcel$interopDefault$8(a) {
|
|
|
16655
16955
|
|
|
16656
16956
|
|
|
16657
16957
|
|
|
16958
|
+
|
|
16959
|
+
|
|
16658
16960
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
16659
16961
|
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;
|
|
16660
16962
|
let { increment: increment, incrementToMax: incrementToMax, decrement: decrement, decrementToMin: decrementToMin, numberValue: numberValue, inputValue: inputValue, commit: commit, commitValidation: commitValidation } = state;
|
|
16661
16963
|
const stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault$8($280a227d7cb94b92$exports))), '@react-aria/numberfield');
|
|
16964
|
+
let commitAndAnnounce = (useCallback)(()=>{
|
|
16965
|
+
var _inputRef_current, _inputRef_current1, _inputRef_current2;
|
|
16966
|
+
var _inputRef_current_value;
|
|
16967
|
+
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 : '';
|
|
16968
|
+
// Set input value to normalized valid value
|
|
16969
|
+
(flushSync)(()=>{
|
|
16970
|
+
commit();
|
|
16971
|
+
});
|
|
16972
|
+
var _inputRef_current_value1;
|
|
16973
|
+
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');
|
|
16974
|
+
}, [
|
|
16975
|
+
commit,
|
|
16976
|
+
inputRef
|
|
16977
|
+
]);
|
|
16662
16978
|
let inputId = ($bdb11010cef70236$export$f680877a34711e37)(id);
|
|
16663
16979
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
16664
16980
|
onBlur () {
|
|
16665
|
-
|
|
16666
|
-
commit();
|
|
16981
|
+
commitAndAnnounce();
|
|
16667
16982
|
}
|
|
16668
16983
|
});
|
|
16669
16984
|
let numberFormatter = ($a916eb452884faea$export$b7a616150fdb9f44)(formatOptions);
|
|
@@ -16739,6 +17054,24 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
16739
17054
|
let onChange = (value)=>{
|
|
16740
17055
|
if (state.validate(value)) state.setInputValue(value);
|
|
16741
17056
|
};
|
|
17057
|
+
let onPaste = (e)=>{
|
|
17058
|
+
var _props_onPaste;
|
|
17059
|
+
(_props_onPaste = props.onPaste) === null || _props_onPaste === void 0 ? void 0 : _props_onPaste.call(props, e);
|
|
17060
|
+
let inputElement = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
17061
|
+
var _inputElement_selectionEnd, _inputElement_selectionStart;
|
|
17062
|
+
// we can only handle the case where the paste takes over the entire input, otherwise things get very complicated
|
|
17063
|
+
// trying to calculate the new string based on what the paste is replacing and where in the source string it is
|
|
17064
|
+
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) {
|
|
17065
|
+
var _e_clipboardData_getData, _e_clipboardData_getData1, _e_clipboardData;
|
|
17066
|
+
e.preventDefault();
|
|
17067
|
+
var _e_clipboardData_getData_trim;
|
|
17068
|
+
// commit so that the user gets to see what it formats to immediately
|
|
17069
|
+
// paste happens before inputRef's value is updated, so have to prevent the default and do it ourselves
|
|
17070
|
+
// spin button will then handle announcing the new value, this should work with controlled state as well
|
|
17071
|
+
// because the announcement is done as a result of the new rendered input value if there is one
|
|
17072
|
+
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 : '');
|
|
17073
|
+
}
|
|
17074
|
+
};
|
|
16742
17075
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
16743
17076
|
let onKeyDownEnter = (useCallback)((e)=>{
|
|
16744
17077
|
if (e.nativeEvent.isComposing) return;
|
|
@@ -16781,6 +17114,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
16781
17114
|
onKeyDown
|
|
16782
17115
|
]),
|
|
16783
17116
|
onKeyUp: onKeyUp,
|
|
17117
|
+
onPaste: onPaste,
|
|
16784
17118
|
description: description,
|
|
16785
17119
|
errorMessage: errorMessage
|
|
16786
17120
|
}, state, inputRef);
|
|
@@ -16802,7 +17136,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
16802
17136
|
var _inputRef_current;
|
|
16803
17137
|
// If focus is already on the input, keep it there so we don't hide the
|
|
16804
17138
|
// software keyboard when tapping the increment/decrement buttons.
|
|
16805
|
-
if (
|
|
17139
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() === inputRef.current) return;
|
|
16806
17140
|
// Otherwise, when using a mouse, move focus to the input.
|
|
16807
17141
|
// On touch, or with a screen reader, focus the button so that the software
|
|
16808
17142
|
// keyboard does not appear and the screen reader cursor is not moved off the button.
|
|
@@ -17628,7 +17962,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17628
17962
|
]);
|
|
17629
17963
|
// Open the popover on alt + arrow down
|
|
17630
17964
|
let onKeyDown = (e)=>{
|
|
17631
|
-
if (!e.currentTarget
|
|
17965
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) return;
|
|
17632
17966
|
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
17633
17967
|
e.preventDefault();
|
|
17634
17968
|
e.stopPropagation();
|
|
@@ -17641,7 +17975,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17641
17975
|
e.stopPropagation();
|
|
17642
17976
|
if (direction === 'rtl') {
|
|
17643
17977
|
if (ref.current) {
|
|
17644
|
-
let target = e
|
|
17978
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
17645
17979
|
let prev = $3dfb0f96be0d6a08$var$findNextSegment(ref.current, target.getBoundingClientRect().left, -1);
|
|
17646
17980
|
if (prev) prev.focus();
|
|
17647
17981
|
}
|
|
@@ -17652,7 +17986,7 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17652
17986
|
e.stopPropagation();
|
|
17653
17987
|
if (direction === 'rtl') {
|
|
17654
17988
|
if (ref.current) {
|
|
17655
|
-
let target = e
|
|
17989
|
+
let target = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
17656
17990
|
let next = $3dfb0f96be0d6a08$var$findNextSegment(ref.current, target.getBoundingClientRect().left, 1);
|
|
17657
17991
|
if (next) next.focus();
|
|
17658
17992
|
}
|
|
@@ -17662,10 +17996,9 @@ function $3dfb0f96be0d6a08$export$4a931266a3838b86(state, ref, disableArrowNavig
|
|
|
17662
17996
|
};
|
|
17663
17997
|
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
17664
17998
|
let focusLast = ()=>{
|
|
17665
|
-
var _window_event;
|
|
17666
17999
|
if (!ref.current) return;
|
|
17667
18000
|
// Try to find the segment prior to the element that was clicked on.
|
|
17668
|
-
let target =
|
|
18001
|
+
let target = window.event ? ($d4ee10de306f2510$export$e58f029f0fbfdb29)(window.event) : null;
|
|
17669
18002
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
|
|
17670
18003
|
tabbable: true
|
|
17671
18004
|
});
|
|
@@ -17941,7 +18274,7 @@ function $6057a3d2a53a12fd$export$42df105a73306d51(props, state, ref) {
|
|
|
17941
18274
|
onBlurWithin: (e)=>{
|
|
17942
18275
|
// Ignore when focus moves into the popover.
|
|
17943
18276
|
let dialog = document.getElementById(dialogId);
|
|
17944
|
-
if (!(dialog
|
|
18277
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(dialog, e.relatedTarget)) {
|
|
17945
18278
|
var _props_onBlur, _props_onFocusChange;
|
|
17946
18279
|
isFocused.current = false;
|
|
17947
18280
|
(_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);
|
|
@@ -18124,11 +18457,12 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18124
18457
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
18125
18458
|
textValue = monthTextValue !== textValue ? `${textValue} \u{2013} ${monthTextValue}` : monthTextValue;
|
|
18126
18459
|
} else if (segment.type === 'hour' && !segment.isPlaceholder) textValue = hourDateFormatter.format(state.dateValue);
|
|
18460
|
+
var _segment_value;
|
|
18127
18461
|
let { spinButtonProps: spinButtonProps } = ($d2e8511e6f209edf$export$e908e06f4b8e3402)({
|
|
18128
18462
|
// The ARIA spec says aria-valuenow is optional if there's no value, but aXe seems to require it.
|
|
18129
18463
|
// This doesn't seem to have any negative effects with real AT since we also use aria-valuetext.
|
|
18130
18464
|
// https://github.com/dequelabs/axe-core/issues/3505
|
|
18131
|
-
value: segment.value,
|
|
18465
|
+
value: (_segment_value = segment.value) !== null && _segment_value !== void 0 ? _segment_value : undefined,
|
|
18132
18466
|
textValue: textValue,
|
|
18133
18467
|
minValue: segment.minValue,
|
|
18134
18468
|
maxValue: segment.maxValue,
|
|
@@ -18153,11 +18487,11 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18153
18487
|
},
|
|
18154
18488
|
onIncrementToMax: ()=>{
|
|
18155
18489
|
enteredKeys.current = '';
|
|
18156
|
-
|
|
18490
|
+
state.incrementToMax(segment.type);
|
|
18157
18491
|
},
|
|
18158
18492
|
onDecrementToMin: ()=>{
|
|
18159
18493
|
enteredKeys.current = '';
|
|
18160
|
-
|
|
18494
|
+
state.decrementToMin(segment.type);
|
|
18161
18495
|
}
|
|
18162
18496
|
});
|
|
18163
18497
|
let parser = (useMemo)(()=>new ($6c7bd7858deea686$export$cd11ab140839f11d)(locale, {
|
|
@@ -18174,7 +18508,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18174
18508
|
if (newValue.length === 0 || parsed === 0) state.clearSegment(segment.type);
|
|
18175
18509
|
else state.setSegment(segment.type, parsed);
|
|
18176
18510
|
enteredKeys.current = newValue;
|
|
18177
|
-
} else if (segment.type === 'dayPeriod') state.clearSegment(segment.type);
|
|
18511
|
+
} else if (segment.type === 'dayPeriod' || segment.type === 'era') state.clearSegment(segment.type);
|
|
18178
18512
|
};
|
|
18179
18513
|
let onKeyDown = (e)=>{
|
|
18180
18514
|
// Firefox does not fire selectstart for Ctrl/Cmd + A
|
|
@@ -18253,7 +18587,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18253
18587
|
switch(segment.type){
|
|
18254
18588
|
case 'dayPeriod':
|
|
18255
18589
|
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
18256
|
-
else if (startsWith(pm, key)) state.setSegment('dayPeriod',
|
|
18590
|
+
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 1);
|
|
18257
18591
|
else break;
|
|
18258
18592
|
focusManager.focusNext();
|
|
18259
18593
|
break;
|
|
@@ -18276,25 +18610,12 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18276
18610
|
if (!parser.isValidPartialNumber(newValue)) return;
|
|
18277
18611
|
let numberValue = parser.parse(newValue);
|
|
18278
18612
|
let segmentValue = numberValue;
|
|
18279
|
-
|
|
18280
|
-
if (segment.type === 'hour' && state.dateFormatter.resolvedOptions().hour12) {
|
|
18281
|
-
switch(state.dateFormatter.resolvedOptions().hourCycle){
|
|
18282
|
-
case 'h11':
|
|
18283
|
-
if (numberValue > 11) segmentValue = parser.parse(key);
|
|
18284
|
-
break;
|
|
18285
|
-
case 'h12':
|
|
18286
|
-
allowsZero = false;
|
|
18287
|
-
if (numberValue > 12) segmentValue = parser.parse(key);
|
|
18288
|
-
break;
|
|
18289
|
-
}
|
|
18290
|
-
if (segment.value !== undefined && segment.value >= 12 && numberValue > 1) numberValue += 12;
|
|
18291
|
-
} else if (segment.maxValue !== undefined && numberValue > segment.maxValue) segmentValue = parser.parse(key);
|
|
18613
|
+
if (segment.maxValue !== undefined && numberValue > segment.maxValue) segmentValue = parser.parse(key);
|
|
18292
18614
|
if (isNaN(numberValue)) return;
|
|
18293
|
-
|
|
18294
|
-
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
18615
|
+
state.setSegment(segment.type, segmentValue);
|
|
18295
18616
|
if (segment.maxValue !== undefined && (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length)) {
|
|
18296
18617
|
enteredKeys.current = '';
|
|
18297
|
-
|
|
18618
|
+
focusManager.focusNext();
|
|
18298
18619
|
} else enteredKeys.current = newValue;
|
|
18299
18620
|
break;
|
|
18300
18621
|
}
|
|
@@ -18311,12 +18632,11 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18311
18632
|
};
|
|
18312
18633
|
let documentRef = (useRef)(typeof document !== 'undefined' ? document : null);
|
|
18313
18634
|
($e9faafb641e167db$export$90fc3a17d93f704c)(documentRef, 'selectionchange', ()=>{
|
|
18314
|
-
var _ref_current;
|
|
18315
18635
|
// Enforce that the selection is collapsed when inside a date segment.
|
|
18316
18636
|
// Otherwise, when tapping on a segment in Android Chrome and then entering text,
|
|
18317
18637
|
// composition events will be fired that break the DOM structure and crash the page.
|
|
18318
18638
|
let selection = window.getSelection();
|
|
18319
|
-
if ((selection === null || selection === void 0 ? void 0 : selection.anchorNode) && ((
|
|
18639
|
+
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);
|
|
18320
18640
|
});
|
|
18321
18641
|
let compositionRef = (useRef)('');
|
|
18322
18642
|
($e9faafb641e167db$export$90fc3a17d93f704c)(ref, 'beforeinput', (e)=>{
|
|
@@ -18356,7 +18676,7 @@ function $32489daedd52963e$export$1315d136e6f7581(segment, state, ref) {
|
|
|
18356
18676
|
let element = ref.current;
|
|
18357
18677
|
return ()=>{
|
|
18358
18678
|
// If the focused segment is removed, focus the previous one, or the next one if there was no previous one.
|
|
18359
|
-
if (
|
|
18679
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() === element) {
|
|
18360
18680
|
let prev = focusManager.focusPrevious();
|
|
18361
18681
|
if (!prev) focusManager.focusNext();
|
|
18362
18682
|
}
|
|
@@ -18467,14 +18787,14 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
18467
18787
|
let isRefocusing = (useRef)(false);
|
|
18468
18788
|
// Focus the dialog itself on mount, unless a child element is already focused.
|
|
18469
18789
|
(useEffect)(()=>{
|
|
18470
|
-
if (ref.current && !ref.current
|
|
18790
|
+
if (ref.current && !($d4ee10de306f2510$export$b4f377a2b6254582)(ref.current)) {
|
|
18471
18791
|
($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
18472
18792
|
// Safari on iOS does not move the VoiceOver cursor to the dialog
|
|
18473
18793
|
// or announce that it has opened until it has rendered. A workaround
|
|
18474
18794
|
// is to wait for half a second, then blur and re-focus the dialog.
|
|
18475
18795
|
let timeout = setTimeout(()=>{
|
|
18476
18796
|
// Check that the dialog is still focused, or focused was lost to the body.
|
|
18477
|
-
if (
|
|
18797
|
+
if (($d4ee10de306f2510$export$cd4e5573fbe2b576)() === ref.current || ($d4ee10de306f2510$export$cd4e5573fbe2b576)() === document.body) {
|
|
18478
18798
|
isRefocusing.current = true;
|
|
18479
18799
|
if (ref.current) {
|
|
18480
18800
|
ref.current.blur();
|
|
@@ -19450,10 +19770,9 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19450
19770
|
// focus to go to the item when the DOM node is reused for a different item in a virtualizer.
|
|
19451
19771
|
let keyWhenFocused = (useRef)(null);
|
|
19452
19772
|
let focus = ()=>{
|
|
19453
|
-
var _ref_current;
|
|
19454
19773
|
// Don't shift focus to the row if the active element is a element within the row already
|
|
19455
19774
|
// (e.g. clicking on a row button)
|
|
19456
|
-
if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !((
|
|
19775
|
+
if (ref.current !== null && (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !($d4ee10de306f2510$export$b4f377a2b6254582)(ref.current))) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
19457
19776
|
};
|
|
19458
19777
|
let treeGridRowProps = {};
|
|
19459
19778
|
let hasChildRows = props.hasChildItems;
|
|
@@ -19469,15 +19788,16 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19469
19788
|
if (onAction == null && !hasLink && state.selectionManager.selectionMode === 'none' && hasChildRows) onAction = ()=>state.toggleKey(node.key);
|
|
19470
19789
|
let isExpanded = hasChildRows ? state.expandedKeys.has(node.key) : undefined;
|
|
19471
19790
|
let setSize = 1;
|
|
19472
|
-
|
|
19791
|
+
let index = node.index;
|
|
19792
|
+
if (node.level >= 0 && (node === null || node === void 0 ? void 0 : node.parentKey) != null) {
|
|
19473
19793
|
let parent = state.collection.getItem(node.parentKey);
|
|
19474
19794
|
if (parent) {
|
|
19475
|
-
var _state_collection_getChildren1, _state_collection1;
|
|
19476
19795
|
// siblings must exist because our original node exists
|
|
19477
|
-
let siblings = (
|
|
19796
|
+
let siblings = $4e8b0456ef72939f$var$getDirectChildren(parent, state.collection);
|
|
19478
19797
|
setSize = [
|
|
19479
19798
|
...siblings
|
|
19480
19799
|
].filter((row)=>row.type === 'item').length;
|
|
19800
|
+
if (index > 0 && siblings[0].type !== 'item') index -= 1; // subtract one for the parent item's content node
|
|
19481
19801
|
}
|
|
19482
19802
|
} else setSize = [
|
|
19483
19803
|
...state.collection
|
|
@@ -19485,7 +19805,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19485
19805
|
treeGridRowProps = {
|
|
19486
19806
|
'aria-expanded': isExpanded,
|
|
19487
19807
|
'aria-level': node.level + 1,
|
|
19488
|
-
'aria-posinset':
|
|
19808
|
+
'aria-posinset': index + 1,
|
|
19489
19809
|
'aria-setsize': setSize
|
|
19490
19810
|
};
|
|
19491
19811
|
}
|
|
@@ -19500,10 +19820,11 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19500
19820
|
linkBehavior: linkBehavior
|
|
19501
19821
|
});
|
|
19502
19822
|
let onKeyDownCapture = (e)=>{
|
|
19503
|
-
|
|
19823
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
19824
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || !ref.current || !activeElement) return;
|
|
19504
19825
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current);
|
|
19505
|
-
walker.currentNode =
|
|
19506
|
-
if ('expandedKeys' in state &&
|
|
19826
|
+
walker.currentNode = activeElement;
|
|
19827
|
+
if ('expandedKeys' in state && activeElement === ref.current) {
|
|
19507
19828
|
if (e.key === $4e8b0456ef72939f$var$EXPANSION_KEYS['expand'][direction] && state.selectionManager.focusedKey === node.key && hasChildRows && !state.expandedKeys.has(node.key)) {
|
|
19508
19829
|
state.toggleKey(node.key);
|
|
19509
19830
|
e.stopPropagation();
|
|
@@ -19584,7 +19905,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19584
19905
|
// Prevent this event from reaching row children, e.g. menu buttons. We want arrow keys to navigate
|
|
19585
19906
|
// to the row above/below instead. We need to re-dispatch the event from a higher parent so it still
|
|
19586
19907
|
// bubbles and gets handled by useSelectableCollection.
|
|
19587
|
-
if (!e.altKey && ref.current
|
|
19908
|
+
if (!e.altKey && ($d4ee10de306f2510$export$4282f70798064fe0)(ref.current, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e))) {
|
|
19588
19909
|
var _ref_current_parentElement;
|
|
19589
19910
|
e.stopPropagation();
|
|
19590
19911
|
e.preventDefault();
|
|
@@ -19595,7 +19916,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19595
19916
|
};
|
|
19596
19917
|
let onFocus = (e)=>{
|
|
19597
19918
|
keyWhenFocused.current = node.key;
|
|
19598
|
-
if (e
|
|
19919
|
+
if (($d4ee10de306f2510$export$e58f029f0fbfdb29)(e) !== ref.current) {
|
|
19599
19920
|
// useSelectableItem only handles setting the focused key when
|
|
19600
19921
|
// the focused element is the row itself. We also want to
|
|
19601
19922
|
// set the focused key when a child element receives focus.
|
|
@@ -19607,7 +19928,8 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19607
19928
|
}
|
|
19608
19929
|
};
|
|
19609
19930
|
let onKeyDown = (e)=>{
|
|
19610
|
-
|
|
19931
|
+
let activeElement = ($d4ee10de306f2510$export$cd4e5573fbe2b576)();
|
|
19932
|
+
if (!($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e)) || !ref.current || !activeElement) return;
|
|
19611
19933
|
switch(e.key){
|
|
19612
19934
|
case 'Tab':
|
|
19613
19935
|
if (keyboardNavigationBehavior === 'tab') {
|
|
@@ -19616,7 +19938,7 @@ function $4e8b0456ef72939f$export$9610e69494fadfd2(props, state, ref) {
|
|
|
19616
19938
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(ref.current, {
|
|
19617
19939
|
tabbable: true
|
|
19618
19940
|
});
|
|
19619
|
-
walker.currentNode =
|
|
19941
|
+
walker.currentNode = activeElement;
|
|
19620
19942
|
let next = e.shiftKey ? walker.previousNode() : walker.nextNode();
|
|
19621
19943
|
if (next) e.stopPropagation();
|
|
19622
19944
|
}
|
|
@@ -19683,6 +20005,20 @@ function $4e8b0456ef72939f$var$last(walker) {
|
|
|
19683
20005
|
}while (last);
|
|
19684
20006
|
return next;
|
|
19685
20007
|
}
|
|
20008
|
+
function $4e8b0456ef72939f$var$getDirectChildren(parent, collection) {
|
|
20009
|
+
var _collection_getChildren;
|
|
20010
|
+
// 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)
|
|
20011
|
+
// Instead, get all children and start at the first node (rather than just using firstChildKey) and only look at its siblings
|
|
20012
|
+
let children = (_collection_getChildren = collection.getChildren) === null || _collection_getChildren === void 0 ? void 0 : _collection_getChildren.call(collection, parent.key);
|
|
20013
|
+
let childArray = children ? Array.from(children) : [];
|
|
20014
|
+
let node = childArray.length > 0 ? childArray[0] : null;
|
|
20015
|
+
let siblings = [];
|
|
20016
|
+
while(node){
|
|
20017
|
+
siblings.push(node);
|
|
20018
|
+
node = node.nextKey != null ? collection.getItem(node.nextKey) : null;
|
|
20019
|
+
}
|
|
20020
|
+
return siblings;
|
|
20021
|
+
}
|
|
19686
20022
|
|
|
19687
20023
|
/*
|
|
19688
20024
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -19905,7 +20241,7 @@ function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
|
|
|
19905
20241
|
}
|
|
19906
20242
|
e.preventDefault();
|
|
19907
20243
|
let walker = ($9bf71ea28793e738$export$2d6ec8fc375ceafa)(e.currentTarget, {
|
|
19908
|
-
from: e
|
|
20244
|
+
from: ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e),
|
|
19909
20245
|
accept: (node)=>node instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(node).HTMLInputElement && node.type === 'radio'
|
|
19910
20246
|
});
|
|
19911
20247
|
let nextElem;
|
|
@@ -20094,7 +20430,7 @@ function $58aed456727eb0f3$export$e64b2f635402ca43(props, state, ref) {
|
|
|
20094
20430
|
disallowEmptySelection: true,
|
|
20095
20431
|
linkBehavior: 'selection',
|
|
20096
20432
|
onBlur: (e)=>{
|
|
20097
|
-
if (e.currentTarget
|
|
20433
|
+
if (($d4ee10de306f2510$export$4282f70798064fe0)(e.currentTarget, e.relatedTarget)) return;
|
|
20098
20434
|
if (props.onBlur) props.onBlur(e);
|
|
20099
20435
|
if (props.onFocusChange) props.onFocusChange(false);
|
|
20100
20436
|
state.setFocused(false);
|
|
@@ -20157,7 +20493,8 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
20157
20493
|
}, state, props.selectRef);
|
|
20158
20494
|
let setValue = state.setValue;
|
|
20159
20495
|
let onChange = (useCallback)((e)=>{
|
|
20160
|
-
|
|
20496
|
+
let eventTarget = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
20497
|
+
if (eventTarget.multiple) setValue(Array.from(eventTarget.selectedOptions, (option)=>option.value));
|
|
20161
20498
|
else setValue(e.currentTarget.value);
|
|
20162
20499
|
}, [
|
|
20163
20500
|
setValue
|
|
@@ -20205,6 +20542,9 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
20205
20542
|
...props,
|
|
20206
20543
|
selectRef: state.collection.size <= 300 ? selectRef : inputRef
|
|
20207
20544
|
}, state, triggerRef);
|
|
20545
|
+
let values = Array.isArray(state.value) ? state.value : [
|
|
20546
|
+
state.value
|
|
20547
|
+
];
|
|
20208
20548
|
// If used in a <form>, use a hidden input so the value can be submitted to a server.
|
|
20209
20549
|
// If the collection isn't too big, use a hidden <select> element for this so that browser
|
|
20210
20550
|
// autofill will work. Otherwise, use an <input type="hidden">.
|
|
@@ -20222,14 +20562,14 @@ function $bdd25dc72710631f$export$cbd84cdb2e668835(props) {
|
|
|
20222
20562
|
key: item.key,
|
|
20223
20563
|
value: item.key
|
|
20224
20564
|
}, item.textValue);
|
|
20225
|
-
})))
|
|
20565
|
+
}), state.collection.size === 0 && name && values.map((value, i)=>/*#__PURE__*/ ($dbSRa$react).createElement("option", {
|
|
20566
|
+
key: i,
|
|
20567
|
+
value: value !== null && value !== void 0 ? value : ''
|
|
20568
|
+
})))));
|
|
20226
20569
|
else if (name) {
|
|
20227
20570
|
let data = ($58aed456727eb0f3$export$703601b7e90536f8).get(state) || {};
|
|
20228
20571
|
let { validationBehavior: validationBehavior } = data;
|
|
20229
20572
|
// Always render at least one hidden input to ensure required form submission.
|
|
20230
|
-
let values = Array.isArray(state.value) ? state.value : [
|
|
20231
|
-
state.value
|
|
20232
|
-
];
|
|
20233
20573
|
if (values.length === 0) values = [
|
|
20234
20574
|
null
|
|
20235
20575
|
];
|
|
@@ -20725,6 +21065,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
20725
21065
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(item.props);
|
|
20726
21066
|
let linkProps = ($ea8dcbcb9ea1b556$export$bdc77b0c0a3a85d6)(item.props);
|
|
20727
21067
|
let { focusableProps: focusableProps } = ($f645667febf57a63$export$4c014de7c8940b4c)({
|
|
21068
|
+
...item.props,
|
|
20728
21069
|
isDisabled: isDisabled
|
|
20729
21070
|
}, ref);
|
|
20730
21071
|
return {
|
|
@@ -20902,11 +21243,12 @@ function $4e1b34546679e357$export$a6da6c504e4bba8b(props, state, ref) {
|
|
|
20902
21243
|
const $4f118338184dc1d9$export$e2509388b49734e7 = /*#__PURE__*/ (createContext)(null);
|
|
20903
21244
|
const $4f118338184dc1d9$export$a6c7ac8248d6e38a = /*#__PURE__*/ (forwardRef)(function Link(props, ref) {
|
|
20904
21245
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $4f118338184dc1d9$export$e2509388b49734e7);
|
|
20905
|
-
let
|
|
21246
|
+
let elementType = props.href && !props.isDisabled ? 'a' : 'span';
|
|
20906
21247
|
let { linkProps: linkProps, isPressed: isPressed } = ($298d61e98472621b$export$dcf14c9974fe2767)({
|
|
20907
21248
|
...props,
|
|
20908
|
-
elementType:
|
|
21249
|
+
elementType: elementType
|
|
20909
21250
|
}, ref);
|
|
21251
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
20910
21252
|
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(props);
|
|
20911
21253
|
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)();
|
|
20912
21254
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
@@ -20954,7 +21296,8 @@ const $4f118338184dc1d9$export$a6c7ac8248d6e38a = /*#__PURE__*/ (forwardRef)(fun
|
|
|
20954
21296
|
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /*#__PURE__*/ (createContext)({});
|
|
20955
21297
|
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /*#__PURE__*/ ($f39a9eba43920ace$export$86427a43e3e48ebb)(function Label(props, ref) {
|
|
20956
21298
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
20957
|
-
let { elementType:
|
|
21299
|
+
let { elementType: elementType = 'label', ...labelProps } = props;
|
|
21300
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
20958
21301
|
// @ts-ignore
|
|
20959
21302
|
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
20960
21303
|
className: "react-aria-Label",
|
|
@@ -21003,7 +21346,7 @@ const $0393f8ab869a0f1a$export$c17561cb55d4db30 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
21003
21346
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
21004
21347
|
global: true
|
|
21005
21348
|
});
|
|
21006
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
21349
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
21007
21350
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, progressBarProps),
|
|
21008
21351
|
ref: ref,
|
|
21009
21352
|
slot: props.slot || undefined
|
|
@@ -21085,7 +21428,7 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
21085
21428
|
global: true
|
|
21086
21429
|
});
|
|
21087
21430
|
delete DOMProps.onClick;
|
|
21088
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
21431
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).button, {
|
|
21089
21432
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
|
|
21090
21433
|
// 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).
|
|
21091
21434
|
// We do this by changing the button's type to button.
|
|
@@ -21107,10 +21450,11 @@ const $d2b4bc8c273e7be6$export$353f5b6fc5456de1 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
21107
21450
|
}
|
|
21108
21451
|
}, renderProps.children));
|
|
21109
21452
|
});
|
|
21453
|
+
// Events to preserve when isPending is true (for tooltips and other overlays)
|
|
21454
|
+
const $d2b4bc8c273e7be6$var$PRESERVED_EVENT_PATTERN = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
|
|
21110
21455
|
function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
|
|
21111
|
-
// Don't allow interaction while isPending is true
|
|
21112
21456
|
if (isPending) {
|
|
21113
|
-
for(const key in props)if (key.startsWith('on') &&
|
|
21457
|
+
for(const key in props)if (key.startsWith('on') && !$d2b4bc8c273e7be6$var$PRESERVED_EVENT_PATTERN.test(key)) props[key] = undefined;
|
|
21114
21458
|
props.href = undefined;
|
|
21115
21459
|
props.target = undefined;
|
|
21116
21460
|
}
|
|
@@ -21132,7 +21476,8 @@ function $d2b4bc8c273e7be6$var$useDisableInteractions(props, isPending) {
|
|
|
21132
21476
|
const $514c0188e459b4c0$export$9afb8bc826b033ea = /*#__PURE__*/ (createContext)({});
|
|
21133
21477
|
const $514c0188e459b4c0$export$5f1af8db9871e1d6 = /*#__PURE__*/ (forwardRef)(function Text(props, ref) {
|
|
21134
21478
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $514c0188e459b4c0$export$9afb8bc826b033ea);
|
|
21135
|
-
let { elementType:
|
|
21479
|
+
let { elementType: elementType = 'span', ...domProps } = props;
|
|
21480
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[elementType];
|
|
21136
21481
|
// @ts-ignore
|
|
21137
21482
|
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
21138
21483
|
className: "react-aria-Text",
|
|
@@ -21363,7 +21708,6 @@ function $131cf43a05231e1e$export$6d095e787d2b5e1f(props) {
|
|
|
21363
21708
|
isValueInvalid: isValueInvalid,
|
|
21364
21709
|
setFocusedDate (date) {
|
|
21365
21710
|
focusCell(date);
|
|
21366
|
-
setFocused(true);
|
|
21367
21711
|
},
|
|
21368
21712
|
focusNextDay () {
|
|
21369
21713
|
focusCell(focusedDate.add({
|
|
@@ -23062,6 +23406,11 @@ const $3e3ed55ab2966714$var$placeholders = new ($5b160d28a433310d$export$c17fa47
|
|
|
23062
23406
|
month: 'bb',
|
|
23063
23407
|
day: 'hh'
|
|
23064
23408
|
},
|
|
23409
|
+
is: {
|
|
23410
|
+
year: "\xe1\xe1\xe1\xe1",
|
|
23411
|
+
month: 'mm',
|
|
23412
|
+
day: 'dd'
|
|
23413
|
+
},
|
|
23065
23414
|
it: {
|
|
23066
23415
|
year: 'aaaa',
|
|
23067
23416
|
month: 'mm',
|
|
@@ -23251,6 +23600,331 @@ function $3e3ed55ab2966714$export$d3f5c5e0a5023fa0(field, value, locale) {
|
|
|
23251
23600
|
return "\u2013\u2013";
|
|
23252
23601
|
}
|
|
23253
23602
|
|
|
23603
|
+
/*
|
|
23604
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
23605
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23606
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
23607
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
23608
|
+
*
|
|
23609
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23610
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
23611
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
23612
|
+
* governing permissions and limitations under the License.
|
|
23613
|
+
*/
|
|
23614
|
+
class $f863c03ccd9aead0$export$ae165b50d181e1ef {
|
|
23615
|
+
copy() {
|
|
23616
|
+
let res = new $f863c03ccd9aead0$export$ae165b50d181e1ef(this.calendar, this.hourCycle);
|
|
23617
|
+
res.era = this.era;
|
|
23618
|
+
res.year = this.year;
|
|
23619
|
+
res.month = this.month;
|
|
23620
|
+
res.day = this.day;
|
|
23621
|
+
res.hour = this.hour;
|
|
23622
|
+
res.dayPeriod = this.dayPeriod;
|
|
23623
|
+
res.minute = this.minute;
|
|
23624
|
+
res.second = this.second;
|
|
23625
|
+
res.millisecond = this.millisecond;
|
|
23626
|
+
res.offset = this.offset;
|
|
23627
|
+
return res;
|
|
23628
|
+
}
|
|
23629
|
+
/** Checks whether all the specified segments have a value. */ isComplete(segments) {
|
|
23630
|
+
return segments.every((segment)=>this[segment] != null);
|
|
23631
|
+
}
|
|
23632
|
+
/** Checks whether the given date value matches this value for the specified segments. */ validate(dt, segments) {
|
|
23633
|
+
return segments.every((segment)=>{
|
|
23634
|
+
if ((segment === 'hour' || segment === 'dayPeriod') && 'hour' in dt) {
|
|
23635
|
+
let [dayPeriod, hour] = $f863c03ccd9aead0$var$toHourCycle(dt.hour, this.hourCycle);
|
|
23636
|
+
return this.dayPeriod === dayPeriod && this.hour === hour;
|
|
23637
|
+
}
|
|
23638
|
+
return this[segment] === dt[segment];
|
|
23639
|
+
});
|
|
23640
|
+
}
|
|
23641
|
+
/** Checks if the date is empty (i.e. all specified segments are null). */ isCleared(segments) {
|
|
23642
|
+
return segments.every((segment)=>this[segment] === null);
|
|
23643
|
+
}
|
|
23644
|
+
/** Sets the given field. */ set(field, value, placeholder) {
|
|
23645
|
+
let result = this.copy();
|
|
23646
|
+
result[field] = value;
|
|
23647
|
+
if (field === 'hour' && result.dayPeriod == null && 'hour' in placeholder) result.dayPeriod = $f863c03ccd9aead0$var$toHourCycle(placeholder.hour, this.hourCycle)[0];
|
|
23648
|
+
if (field === 'year' && result.era == null) result.era = placeholder.era;
|
|
23649
|
+
// clear offset when a date/time field changes since it may no longer be valid
|
|
23650
|
+
if (field !== 'second' && field !== 'literal' && field !== 'timeZoneName') result.offset = null;
|
|
23651
|
+
return result;
|
|
23652
|
+
}
|
|
23653
|
+
/** Sets the given field to null. */ clear(field) {
|
|
23654
|
+
let result = this.copy();
|
|
23655
|
+
// @ts-ignore
|
|
23656
|
+
result[field] = null;
|
|
23657
|
+
if (field === 'year') result.era = null;
|
|
23658
|
+
// clear offset when a field is cleared since it may no longer be valid
|
|
23659
|
+
result.offset = null;
|
|
23660
|
+
return result;
|
|
23661
|
+
}
|
|
23662
|
+
/** Increments or decrements the given field. If it is null, then it is set to the placeholder value. */ cycle(field, amount, placeholder, displaySegments) {
|
|
23663
|
+
let res = this.copy();
|
|
23664
|
+
// If field is null, default to placeholder.
|
|
23665
|
+
if (res[field] == null && field !== 'dayPeriod' && field !== 'era') {
|
|
23666
|
+
if (field === 'hour' && 'hour' in placeholder) {
|
|
23667
|
+
let [dayPeriod, hour] = $f863c03ccd9aead0$var$toHourCycle(placeholder.hour, this.hourCycle);
|
|
23668
|
+
res.dayPeriod = dayPeriod;
|
|
23669
|
+
res.hour = hour;
|
|
23670
|
+
} else res[field] = placeholder[field];
|
|
23671
|
+
if (field === 'year' && res.era == null) res.era = placeholder.era;
|
|
23672
|
+
return res;
|
|
23673
|
+
}
|
|
23674
|
+
switch(field){
|
|
23675
|
+
case 'era':
|
|
23676
|
+
{
|
|
23677
|
+
let eras = this.calendar.getEras();
|
|
23678
|
+
let index = eras.indexOf(res.era);
|
|
23679
|
+
index = $f863c03ccd9aead0$var$cycleValue(index, amount, 0, eras.length - 1);
|
|
23680
|
+
res.era = eras[index];
|
|
23681
|
+
break;
|
|
23682
|
+
}
|
|
23683
|
+
case 'year':
|
|
23684
|
+
{
|
|
23685
|
+
var _this_era, _this_year, _this_month, _this_day;
|
|
23686
|
+
// Use CalendarDate to cycle so that we update the era when going between 1 AD and 1 BC.
|
|
23687
|
+
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);
|
|
23688
|
+
date = date.cycle(field, amount, {
|
|
23689
|
+
round: field === 'year'
|
|
23690
|
+
});
|
|
23691
|
+
res.era = date.era;
|
|
23692
|
+
res.year = date.year;
|
|
23693
|
+
break;
|
|
23694
|
+
}
|
|
23695
|
+
case 'month':
|
|
23696
|
+
var _res_month;
|
|
23697
|
+
res.month = $f863c03ccd9aead0$var$cycleValue((_res_month = res.month) !== null && _res_month !== void 0 ? _res_month : 1, amount, 1, this.calendar.getMaximumMonthsInYear());
|
|
23698
|
+
break;
|
|
23699
|
+
case 'day':
|
|
23700
|
+
var _res_day;
|
|
23701
|
+
// Allow incrementing up to the maximum number of days in any month.
|
|
23702
|
+
res.day = $f863c03ccd9aead0$var$cycleValue((_res_day = res.day) !== null && _res_day !== void 0 ? _res_day : 1, amount, 1, this.calendar.getMaximumDaysInMonth());
|
|
23703
|
+
break;
|
|
23704
|
+
case 'hour':
|
|
23705
|
+
{
|
|
23706
|
+
// 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
|
|
23707
|
+
// so DST fallback is properly handled
|
|
23708
|
+
let hasDateSegements = displaySegments.some((s)=>[
|
|
23709
|
+
'year',
|
|
23710
|
+
'month',
|
|
23711
|
+
'day'
|
|
23712
|
+
].includes(s));
|
|
23713
|
+
if ('timeZone' in placeholder && (!hasDateSegements || res.year != null && res.month != null && res.day != null)) {
|
|
23714
|
+
let date = this.toValue(placeholder);
|
|
23715
|
+
date = date.cycle('hour', amount, {
|
|
23716
|
+
hourCycle: this.hourCycle === 'h12' ? 12 : 24,
|
|
23717
|
+
round: false
|
|
23718
|
+
});
|
|
23719
|
+
let [dayPeriod, adjustedHour] = $f863c03ccd9aead0$var$toHourCycle(date.hour, this.hourCycle);
|
|
23720
|
+
res.hour = adjustedHour;
|
|
23721
|
+
res.dayPeriod = dayPeriod;
|
|
23722
|
+
res.offset = date.offset;
|
|
23723
|
+
} else {
|
|
23724
|
+
var _res_hour;
|
|
23725
|
+
let hours = (_res_hour = res.hour) !== null && _res_hour !== void 0 ? _res_hour : 0;
|
|
23726
|
+
let limits = this.getSegmentLimits('hour');
|
|
23727
|
+
res.hour = $f863c03ccd9aead0$var$cycleValue(hours, amount, limits.minValue, limits.maxValue);
|
|
23728
|
+
if (res.dayPeriod == null && 'hour' in placeholder) res.dayPeriod = $f863c03ccd9aead0$var$toHourCycle(placeholder.hour, this.hourCycle)[0];
|
|
23729
|
+
}
|
|
23730
|
+
break;
|
|
23731
|
+
}
|
|
23732
|
+
case 'dayPeriod':
|
|
23733
|
+
var _res_dayPeriod;
|
|
23734
|
+
res.dayPeriod = $f863c03ccd9aead0$var$cycleValue((_res_dayPeriod = res.dayPeriod) !== null && _res_dayPeriod !== void 0 ? _res_dayPeriod : 0, amount, 0, 1);
|
|
23735
|
+
break;
|
|
23736
|
+
case 'minute':
|
|
23737
|
+
var _res_minute;
|
|
23738
|
+
res.minute = $f863c03ccd9aead0$var$cycleValue((_res_minute = res.minute) !== null && _res_minute !== void 0 ? _res_minute : 0, amount, 0, 59, true);
|
|
23739
|
+
break;
|
|
23740
|
+
case 'second':
|
|
23741
|
+
var _res_second;
|
|
23742
|
+
res.second = $f863c03ccd9aead0$var$cycleValue((_res_second = res.second) !== null && _res_second !== void 0 ? _res_second : 0, amount, 0, 59, true);
|
|
23743
|
+
break;
|
|
23744
|
+
}
|
|
23745
|
+
return res;
|
|
23746
|
+
}
|
|
23747
|
+
/** Converts the incomplete date to a full date value, using the provided value for any unset fields. */ toValue(value) {
|
|
23748
|
+
var _this_era, _this_year, _this_month, _this_day;
|
|
23749
|
+
if ('hour' in value) {
|
|
23750
|
+
let hour = this.hour;
|
|
23751
|
+
var _this_dayPeriod;
|
|
23752
|
+
if (hour != null) hour = $f863c03ccd9aead0$var$fromHourCycle(hour, (_this_dayPeriod = this.dayPeriod) !== null && _this_dayPeriod !== void 0 ? _this_dayPeriod : 0, this.hourCycle);
|
|
23753
|
+
else if (this.hourCycle === 'h12' || this.hourCycle === 'h11') hour = this.dayPeriod === 1 ? 12 : 0;
|
|
23754
|
+
var _this_era1, _this_year1, _this_month1, _this_day1, _this_minute, _this_second, _this_millisecond;
|
|
23755
|
+
let res = value.set({
|
|
23756
|
+
era: (_this_era1 = this.era) !== null && _this_era1 !== void 0 ? _this_era1 : value.era,
|
|
23757
|
+
year: (_this_year1 = this.year) !== null && _this_year1 !== void 0 ? _this_year1 : value.year,
|
|
23758
|
+
month: (_this_month1 = this.month) !== null && _this_month1 !== void 0 ? _this_month1 : value.month,
|
|
23759
|
+
day: (_this_day1 = this.day) !== null && _this_day1 !== void 0 ? _this_day1 : value.day,
|
|
23760
|
+
hour: hour !== null && hour !== void 0 ? hour : value.hour,
|
|
23761
|
+
minute: (_this_minute = this.minute) !== null && _this_minute !== void 0 ? _this_minute : value.minute,
|
|
23762
|
+
second: (_this_second = this.second) !== null && _this_second !== void 0 ? _this_second : value.second,
|
|
23763
|
+
millisecond: (_this_millisecond = this.millisecond) !== null && _this_millisecond !== void 0 ? _this_millisecond : value.millisecond
|
|
23764
|
+
});
|
|
23765
|
+
if ('offset' in res && this.offset != null && res.offset !== this.offset) res = res.add({
|
|
23766
|
+
milliseconds: res.offset - this.offset
|
|
23767
|
+
});
|
|
23768
|
+
return res;
|
|
23769
|
+
} else return value.set({
|
|
23770
|
+
era: (_this_era = this.era) !== null && _this_era !== void 0 ? _this_era : value.era,
|
|
23771
|
+
year: (_this_year = this.year) !== null && _this_year !== void 0 ? _this_year : value.year,
|
|
23772
|
+
month: (_this_month = this.month) !== null && _this_month !== void 0 ? _this_month : value.month,
|
|
23773
|
+
day: (_this_day = this.day) !== null && _this_day !== void 0 ? _this_day : value.day
|
|
23774
|
+
});
|
|
23775
|
+
}
|
|
23776
|
+
getSegmentLimits(type) {
|
|
23777
|
+
switch(type){
|
|
23778
|
+
case 'era':
|
|
23779
|
+
{
|
|
23780
|
+
let eras = this.calendar.getEras();
|
|
23781
|
+
return {
|
|
23782
|
+
value: this.era != null ? eras.indexOf(this.era) : eras.length - 1,
|
|
23783
|
+
minValue: 0,
|
|
23784
|
+
maxValue: eras.length - 1
|
|
23785
|
+
};
|
|
23786
|
+
}
|
|
23787
|
+
case 'year':
|
|
23788
|
+
return {
|
|
23789
|
+
value: this.year,
|
|
23790
|
+
minValue: 1,
|
|
23791
|
+
maxValue: 9999
|
|
23792
|
+
};
|
|
23793
|
+
case 'month':
|
|
23794
|
+
return {
|
|
23795
|
+
value: this.month,
|
|
23796
|
+
minValue: 1,
|
|
23797
|
+
maxValue: this.calendar.getMaximumMonthsInYear()
|
|
23798
|
+
};
|
|
23799
|
+
case 'day':
|
|
23800
|
+
return {
|
|
23801
|
+
value: this.day,
|
|
23802
|
+
minValue: 1,
|
|
23803
|
+
maxValue: this.calendar.getMaximumDaysInMonth()
|
|
23804
|
+
};
|
|
23805
|
+
case 'dayPeriod':
|
|
23806
|
+
return {
|
|
23807
|
+
value: this.dayPeriod,
|
|
23808
|
+
minValue: 0,
|
|
23809
|
+
maxValue: 1
|
|
23810
|
+
};
|
|
23811
|
+
case 'hour':
|
|
23812
|
+
{
|
|
23813
|
+
let minValue = 0;
|
|
23814
|
+
let maxValue = 23;
|
|
23815
|
+
if (this.hourCycle === 'h12') {
|
|
23816
|
+
minValue = 1;
|
|
23817
|
+
maxValue = 12;
|
|
23818
|
+
} else if (this.hourCycle === 'h11') {
|
|
23819
|
+
minValue = 0;
|
|
23820
|
+
maxValue = 11;
|
|
23821
|
+
}
|
|
23822
|
+
return {
|
|
23823
|
+
value: this.hour,
|
|
23824
|
+
minValue: minValue,
|
|
23825
|
+
maxValue: maxValue
|
|
23826
|
+
};
|
|
23827
|
+
}
|
|
23828
|
+
case 'minute':
|
|
23829
|
+
return {
|
|
23830
|
+
value: this.minute,
|
|
23831
|
+
minValue: 0,
|
|
23832
|
+
maxValue: 59
|
|
23833
|
+
};
|
|
23834
|
+
case 'second':
|
|
23835
|
+
return {
|
|
23836
|
+
value: this.second,
|
|
23837
|
+
minValue: 0,
|
|
23838
|
+
maxValue: 59
|
|
23839
|
+
};
|
|
23840
|
+
}
|
|
23841
|
+
}
|
|
23842
|
+
constructor(calendar, hourCycle, dateValue){
|
|
23843
|
+
var _dateValue_era;
|
|
23844
|
+
this.era = (_dateValue_era = dateValue === null || dateValue === void 0 ? void 0 : dateValue.era) !== null && _dateValue_era !== void 0 ? _dateValue_era : null;
|
|
23845
|
+
this.calendar = calendar;
|
|
23846
|
+
var _dateValue_year;
|
|
23847
|
+
this.year = (_dateValue_year = dateValue === null || dateValue === void 0 ? void 0 : dateValue.year) !== null && _dateValue_year !== void 0 ? _dateValue_year : null;
|
|
23848
|
+
var _dateValue_month;
|
|
23849
|
+
this.month = (_dateValue_month = dateValue === null || dateValue === void 0 ? void 0 : dateValue.month) !== null && _dateValue_month !== void 0 ? _dateValue_month : null;
|
|
23850
|
+
var _dateValue_day;
|
|
23851
|
+
this.day = (_dateValue_day = dateValue === null || dateValue === void 0 ? void 0 : dateValue.day) !== null && _dateValue_day !== void 0 ? _dateValue_day : null;
|
|
23852
|
+
var _dateValue_hour;
|
|
23853
|
+
this.hour = (_dateValue_hour = dateValue === null || dateValue === void 0 ? void 0 : dateValue.hour) !== null && _dateValue_hour !== void 0 ? _dateValue_hour : null;
|
|
23854
|
+
this.hourCycle = hourCycle;
|
|
23855
|
+
this.dayPeriod = null;
|
|
23856
|
+
var _dateValue_minute;
|
|
23857
|
+
this.minute = (_dateValue_minute = dateValue === null || dateValue === void 0 ? void 0 : dateValue.minute) !== null && _dateValue_minute !== void 0 ? _dateValue_minute : null;
|
|
23858
|
+
var _dateValue_second;
|
|
23859
|
+
this.second = (_dateValue_second = dateValue === null || dateValue === void 0 ? void 0 : dateValue.second) !== null && _dateValue_second !== void 0 ? _dateValue_second : null;
|
|
23860
|
+
var _dateValue_millisecond;
|
|
23861
|
+
this.millisecond = (_dateValue_millisecond = dateValue === null || dateValue === void 0 ? void 0 : dateValue.millisecond) !== null && _dateValue_millisecond !== void 0 ? _dateValue_millisecond : null;
|
|
23862
|
+
this.offset = 'offset' in (dateValue !== null && dateValue !== void 0 ? dateValue : {}) ? dateValue.offset : null;
|
|
23863
|
+
// Convert the hour from 24 hour time to the given hour cycle.
|
|
23864
|
+
if (this.hour != null) {
|
|
23865
|
+
let [dayPeriod, hour] = $f863c03ccd9aead0$var$toHourCycle(this.hour, hourCycle);
|
|
23866
|
+
this.dayPeriod = dayPeriod;
|
|
23867
|
+
this.hour = hour;
|
|
23868
|
+
}
|
|
23869
|
+
}
|
|
23870
|
+
}
|
|
23871
|
+
function $f863c03ccd9aead0$var$cycleValue(value, amount, min, max, round = false) {
|
|
23872
|
+
if (round) {
|
|
23873
|
+
value += Math.sign(amount);
|
|
23874
|
+
if (value < min) value = max;
|
|
23875
|
+
let div = Math.abs(amount);
|
|
23876
|
+
if (amount > 0) value = Math.ceil(value / div) * div;
|
|
23877
|
+
else value = Math.floor(value / div) * div;
|
|
23878
|
+
if (value > max) value = min;
|
|
23879
|
+
} else {
|
|
23880
|
+
value += amount;
|
|
23881
|
+
if (value < min) value = max - (min - value - 1);
|
|
23882
|
+
else if (value > max) value = min + (value - max - 1);
|
|
23883
|
+
}
|
|
23884
|
+
return value;
|
|
23885
|
+
}
|
|
23886
|
+
function $f863c03ccd9aead0$var$toHourCycle(hour, hourCycle) {
|
|
23887
|
+
let dayPeriod = hour >= 12 ? 1 : 0;
|
|
23888
|
+
switch(hourCycle){
|
|
23889
|
+
case 'h11':
|
|
23890
|
+
// Hours are numbered from 0 to 11. Used in Japan.
|
|
23891
|
+
if (hour >= 12) hour -= 12;
|
|
23892
|
+
break;
|
|
23893
|
+
case 'h12':
|
|
23894
|
+
// Hours are numbered from 12 (representing 0) to 11.
|
|
23895
|
+
if (hour === 0) hour = 12;
|
|
23896
|
+
else if (hour > 12) hour -= 12;
|
|
23897
|
+
break;
|
|
23898
|
+
case 'h23':
|
|
23899
|
+
// 24 hour time, numbered 0 to 23.
|
|
23900
|
+
dayPeriod = null;
|
|
23901
|
+
break;
|
|
23902
|
+
case 'h24':
|
|
23903
|
+
// 24 hour time numbered 24 to 23. Unused but supported by Intl.DateTimeFormat.
|
|
23904
|
+
hour += 1;
|
|
23905
|
+
dayPeriod = null;
|
|
23906
|
+
}
|
|
23907
|
+
return [
|
|
23908
|
+
dayPeriod,
|
|
23909
|
+
hour
|
|
23910
|
+
];
|
|
23911
|
+
}
|
|
23912
|
+
function $f863c03ccd9aead0$var$fromHourCycle(hour, dayPeriod, hourCycle) {
|
|
23913
|
+
switch(hourCycle){
|
|
23914
|
+
case 'h11':
|
|
23915
|
+
if (dayPeriod === 1) hour += 12;
|
|
23916
|
+
break;
|
|
23917
|
+
case 'h12':
|
|
23918
|
+
if (hour === 12) hour = 0;
|
|
23919
|
+
if (dayPeriod === 1) hour += 12;
|
|
23920
|
+
break;
|
|
23921
|
+
case 'h24':
|
|
23922
|
+
hour -= 1;
|
|
23923
|
+
break;
|
|
23924
|
+
}
|
|
23925
|
+
return hour;
|
|
23926
|
+
}
|
|
23927
|
+
|
|
23254
23928
|
/*
|
|
23255
23929
|
* Copyright 2020 Adobe. All rights reserved.
|
|
23256
23930
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -23267,6 +23941,8 @@ function $3e3ed55ab2966714$export$d3f5c5e0a5023fa0(field, value, locale) {
|
|
|
23267
23941
|
|
|
23268
23942
|
|
|
23269
23943
|
|
|
23944
|
+
|
|
23945
|
+
|
|
23270
23946
|
const $3c0fc76039f1c516$var$EDITABLE_SEGMENTS = {
|
|
23271
23947
|
year: true,
|
|
23272
23948
|
month: true,
|
|
@@ -23300,12 +23976,23 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23300
23976
|
let timeZone = defaultTimeZone || 'UTC';
|
|
23301
23977
|
// props.granularity must actually exist in the value if one is provided.
|
|
23302
23978
|
if (v && !(granularity in v)) throw new Error('Invalid granularity ' + granularity + ' for value ' + v.toString());
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23979
|
+
// Resolve default hour cycle and calendar system.
|
|
23980
|
+
let [calendar, hourCycle] = (useMemo)(()=>{
|
|
23981
|
+
let formatter = new ($fb18d541ea1ad717$export$ad991b66133851cf)(locale, {
|
|
23982
|
+
dateStyle: 'short',
|
|
23983
|
+
timeStyle: 'short',
|
|
23984
|
+
hour12: props.hourCycle != null ? props.hourCycle === 12 : undefined
|
|
23985
|
+
});
|
|
23986
|
+
let opts = formatter.resolvedOptions();
|
|
23987
|
+
let calendar = createCalendar(opts.calendar);
|
|
23988
|
+
return [
|
|
23989
|
+
calendar,
|
|
23990
|
+
opts.hourCycle
|
|
23991
|
+
];
|
|
23992
|
+
}, [
|
|
23993
|
+
locale,
|
|
23994
|
+
props.hourCycle,
|
|
23995
|
+
createCalendar
|
|
23309
23996
|
]);
|
|
23310
23997
|
var _props_defaultValue;
|
|
23311
23998
|
let [value, setDate] = ($458b0a5536c1a7cf$export$40bfa8c7b0832715)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);
|
|
@@ -23317,13 +24004,8 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23317
24004
|
value,
|
|
23318
24005
|
calendar
|
|
23319
24006
|
]);
|
|
23320
|
-
|
|
23321
|
-
|
|
23322
|
-
// is controlled, so use the placeholder as the value until all segments are entered so it doesn't
|
|
23323
|
-
// change from uncontrolled to controlled and emit a warning.
|
|
23324
|
-
let [placeholderDate, setPlaceholderDate] = (useState)(()=>($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
|
23325
|
-
let val = calendarValue || placeholderDate;
|
|
23326
|
-
let showEra = calendar.identifier === 'gregory' && val.era === 'BC';
|
|
24007
|
+
let [displayValue, setDisplayValue] = (useState)(()=>new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
24008
|
+
let showEra = calendar.identifier === 'gregory' && displayValue.era === 'BC';
|
|
23327
24009
|
let formatOpts = (useMemo)(()=>{
|
|
23328
24010
|
var _props_maxGranularity;
|
|
23329
24011
|
return {
|
|
@@ -23354,76 +24036,85 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23354
24036
|
let resolvedOptions = (useMemo)(()=>dateFormatter.resolvedOptions(), [
|
|
23355
24037
|
dateFormatter
|
|
23356
24038
|
]);
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
24039
|
+
let placeholder = (useMemo)(()=>($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone), [
|
|
24040
|
+
props.placeholderValue,
|
|
24041
|
+
granularity,
|
|
24042
|
+
calendar,
|
|
24043
|
+
defaultTimeZone
|
|
23361
24044
|
]);
|
|
23362
|
-
let
|
|
23363
|
-
|
|
23364
|
-
|
|
23365
|
-
|
|
23366
|
-
|
|
23367
|
-
|
|
23368
|
-
|
|
23369
|
-
|
|
23370
|
-
|
|
23371
|
-
|
|
23372
|
-
|
|
24045
|
+
let displaySegments = (useMemo)(()=>{
|
|
24046
|
+
let is12HourClock = hourCycle === 'h11' || hourCycle === 'h12';
|
|
24047
|
+
let segments = [
|
|
24048
|
+
'era',
|
|
24049
|
+
'year',
|
|
24050
|
+
'month',
|
|
24051
|
+
'day',
|
|
24052
|
+
'hour',
|
|
24053
|
+
...is12HourClock ? [
|
|
24054
|
+
'dayPeriod'
|
|
24055
|
+
] : [],
|
|
24056
|
+
'minute',
|
|
24057
|
+
'second'
|
|
24058
|
+
];
|
|
24059
|
+
let minIndex = segments.indexOf(props.maxGranularity || 'era');
|
|
24060
|
+
let maxIndex = segments.indexOf(granularity === 'hour' && is12HourClock ? 'dayPeriod' : granularity);
|
|
24061
|
+
return segments.slice(minIndex, maxIndex + 1);
|
|
23373
24062
|
}, [
|
|
23374
|
-
|
|
24063
|
+
props.maxGranularity,
|
|
23375
24064
|
granularity,
|
|
23376
|
-
|
|
23377
|
-
defaultTimeZone,
|
|
23378
|
-
props.placeholderValue
|
|
24065
|
+
hourCycle
|
|
23379
24066
|
]);
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23389
|
-
validSegments = {};
|
|
23390
|
-
setValidSegments(validSegments);
|
|
23391
|
-
setPlaceholderDate(($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
|
24067
|
+
let [lastValue, setLastValue] = (useState)(calendarValue);
|
|
24068
|
+
let [lastCalendar, setLastCalendar] = (useState)(calendar);
|
|
24069
|
+
let [lastHourCycle, setLastHourCycle] = (useState)(hourCycle);
|
|
24070
|
+
if (calendarValue !== lastValue || hourCycle !== lastHourCycle || !($14e0f24ef4ac5c92$export$dbc69fd56b53d5e)(calendar, lastCalendar)) {
|
|
24071
|
+
displayValue = new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue);
|
|
24072
|
+
setLastValue(calendarValue);
|
|
24073
|
+
setLastCalendar(calendar);
|
|
24074
|
+
setLastHourCycle(hourCycle);
|
|
24075
|
+
setDisplayValue(displayValue);
|
|
23392
24076
|
}
|
|
23393
|
-
// If all segments are valid, use the date from state, otherwise use the placeholder date.
|
|
23394
|
-
let displayValue = calendarValue && Object.keys(validSegments).length >= Object.keys(allSegments).length ? calendarValue : placeholderDate;
|
|
23395
24077
|
let setValue = (newValue)=>{
|
|
23396
24078
|
if (props.isDisabled || props.isReadOnly) return;
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
// if all the segments are completed or a timefield with everything but am/pm set the time, also ignore when am/pm cleared
|
|
23400
|
-
if (newValue == null) {
|
|
24079
|
+
if (newValue == null || newValue instanceof ($f863c03ccd9aead0$export$ae165b50d181e1ef) && newValue.isCleared(displaySegments)) {
|
|
24080
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
23401
24081
|
setDate(null);
|
|
23402
|
-
|
|
23403
|
-
setValidSegments({});
|
|
23404
|
-
} else if (validKeys.length === 0 && clearedSegment.current == null || validKeys.length >= allKeys.length || validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod && clearedSegment.current !== 'dayPeriod') {
|
|
23405
|
-
// If the field was empty (no valid segments) or all segments are completed, commit the new value.
|
|
23406
|
-
// When committing from an empty state, mark every segment as valid so value is committed.
|
|
23407
|
-
if (validKeys.length === 0) {
|
|
23408
|
-
validSegments = {
|
|
23409
|
-
...allSegments
|
|
23410
|
-
};
|
|
23411
|
-
setValidSegments(validSegments);
|
|
23412
|
-
}
|
|
24082
|
+
} else if (!(newValue instanceof ($f863c03ccd9aead0$export$ae165b50d181e1ef))) {
|
|
23413
24083
|
// The display calendar should not have any effect on the emitted value.
|
|
23414
24084
|
// Emit dates in the same calendar as the original value, if any, otherwise gregorian.
|
|
23415
24085
|
newValue = ($11d87f3f76e88657$export$b4a036af3fc0b032)(newValue, (v === null || v === void 0 ? void 0 : v.calendar) || new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
24086
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
23416
24087
|
setDate(newValue);
|
|
23417
|
-
} else
|
|
23418
|
-
|
|
24088
|
+
} else {
|
|
24089
|
+
// If the new value is complete and valid, trigger onChange eagerly.
|
|
24090
|
+
// If it represents an incomplete or invalid value (e.g. February 30th),
|
|
24091
|
+
// wait until the field is blurred to trigger onChange.
|
|
24092
|
+
if (newValue.isComplete(displaySegments)) {
|
|
24093
|
+
let dateValue = newValue.toValue(calendarValue !== null && calendarValue !== void 0 ? calendarValue : placeholder);
|
|
24094
|
+
if (newValue.validate(dateValue, displaySegments)) {
|
|
24095
|
+
let newDateValue = ($11d87f3f76e88657$export$b4a036af3fc0b032)(dateValue, (v === null || v === void 0 ? void 0 : v.calendar) || new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
24096
|
+
if (!value || newDateValue.compare(value) !== 0) {
|
|
24097
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue)); // reset in case prop isn't updated
|
|
24098
|
+
setDate(newDateValue);
|
|
24099
|
+
return;
|
|
24100
|
+
}
|
|
24101
|
+
}
|
|
24102
|
+
}
|
|
24103
|
+
// Incomplete/invalid value. Set temporary display override.
|
|
24104
|
+
setDisplayValue(newValue);
|
|
24105
|
+
}
|
|
23419
24106
|
};
|
|
23420
|
-
let dateValue = (useMemo)(()=>
|
|
24107
|
+
let dateValue = (useMemo)(()=>{
|
|
24108
|
+
let v = displayValue.toValue(calendarValue !== null && calendarValue !== void 0 ? calendarValue : placeholder);
|
|
24109
|
+
return v.toDate(timeZone);
|
|
24110
|
+
}, [
|
|
23421
24111
|
displayValue,
|
|
23422
|
-
timeZone
|
|
24112
|
+
timeZone,
|
|
24113
|
+
calendarValue,
|
|
24114
|
+
placeholder
|
|
23423
24115
|
]);
|
|
23424
|
-
let segments = (useMemo)(()=>$3c0fc76039f1c516$var$processSegments(dateValue,
|
|
24116
|
+
let segments = (useMemo)(()=>$3c0fc76039f1c516$var$processSegments(dateValue, displayValue, dateFormatter, resolvedOptions, calendar, locale, granularity), [
|
|
23425
24117
|
dateValue,
|
|
23426
|
-
validSegments,
|
|
23427
24118
|
dateFormatter,
|
|
23428
24119
|
resolvedOptions,
|
|
23429
24120
|
displayValue,
|
|
@@ -23431,33 +24122,8 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23431
24122
|
locale,
|
|
23432
24123
|
granularity
|
|
23433
24124
|
]);
|
|
23434
|
-
// When the era field appears, mark it valid if the year field is already valid.
|
|
23435
|
-
// If the era field disappears, remove it from the valid segments.
|
|
23436
|
-
if (allSegments.era && validSegments.year && !validSegments.era) {
|
|
23437
|
-
validSegments.era = true;
|
|
23438
|
-
setValidSegments({
|
|
23439
|
-
...validSegments
|
|
23440
|
-
});
|
|
23441
|
-
} else if (!allSegments.era && validSegments.era) {
|
|
23442
|
-
delete validSegments.era;
|
|
23443
|
-
setValidSegments({
|
|
23444
|
-
...validSegments
|
|
23445
|
-
});
|
|
23446
|
-
}
|
|
23447
|
-
let markValid = (part)=>{
|
|
23448
|
-
validSegments[part] = true;
|
|
23449
|
-
if (part === 'year' && allSegments.era) validSegments.era = true;
|
|
23450
|
-
setValidSegments({
|
|
23451
|
-
...validSegments
|
|
23452
|
-
});
|
|
23453
|
-
};
|
|
23454
24125
|
let adjustSegment = (type, amount)=>{
|
|
23455
|
-
|
|
23456
|
-
markValid(type);
|
|
23457
|
-
let validKeys = Object.keys(validSegments);
|
|
23458
|
-
let allKeys = Object.keys(allSegments);
|
|
23459
|
-
if (validKeys.length >= allKeys.length || validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) setValue(displayValue);
|
|
23460
|
-
} else setValue($3c0fc76039f1c516$var$addSegment(displayValue, type, amount, resolvedOptions));
|
|
24126
|
+
setValue(displayValue.cycle(type, amount, placeholder, displaySegments));
|
|
23461
24127
|
};
|
|
23462
24128
|
let builtinValidation = (useMemo)(()=>($35a22f14a1f04b11$export$f18627323ab57ac0)(value, minValue, maxValue, isDateUnavailable, formatOpts), [
|
|
23463
24129
|
value,
|
|
@@ -23502,48 +24168,30 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23502
24168
|
decrementPage (part) {
|
|
23503
24169
|
adjustSegment(part, -($3c0fc76039f1c516$var$PAGE_STEP[part] || 1));
|
|
23504
24170
|
},
|
|
24171
|
+
incrementToMax (part) {
|
|
24172
|
+
let maxValue = part === 'hour' && hourCycle === 'h12' ? 11 : displayValue.getSegmentLimits(part).maxValue;
|
|
24173
|
+
setValue(displayValue.set(part, maxValue, placeholder));
|
|
24174
|
+
},
|
|
24175
|
+
decrementToMin (part) {
|
|
24176
|
+
let minValue = part === 'hour' && hourCycle === 'h12' ? 12 : displayValue.getSegmentLimits(part).minValue;
|
|
24177
|
+
setValue(displayValue.set(part, minValue, placeholder));
|
|
24178
|
+
},
|
|
23505
24179
|
setSegment (part, v) {
|
|
23506
|
-
|
|
23507
|
-
setValue($3c0fc76039f1c516$var$setSegment(displayValue, part, v, resolvedOptions));
|
|
24180
|
+
setValue(displayValue.set(part, v, placeholder));
|
|
23508
24181
|
},
|
|
23509
24182
|
confirmPlaceholder () {
|
|
23510
24183
|
if (props.isDisabled || props.isReadOnly) return;
|
|
23511
|
-
//
|
|
23512
|
-
|
|
23513
|
-
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
};
|
|
23518
|
-
setValidSegments(validSegments);
|
|
23519
|
-
setValue(displayValue.copy());
|
|
24184
|
+
// If the display value is complete but invalid, we need to constrain it and emit onChange on blur.
|
|
24185
|
+
if (displayValue.isComplete(displaySegments)) {
|
|
24186
|
+
let dateValue = displayValue.toValue(calendarValue !== null && calendarValue !== void 0 ? calendarValue : placeholder);
|
|
24187
|
+
let newDateValue = ($11d87f3f76e88657$export$b4a036af3fc0b032)(dateValue, (v === null || v === void 0 ? void 0 : v.calendar) || new ($3b62074eb05584b2$export$80ee6245ec4f29ec)());
|
|
24188
|
+
if (!value || newDateValue.compare(value) !== 0) setDate(newDateValue);
|
|
24189
|
+
setDisplayValue(new ($f863c03ccd9aead0$export$ae165b50d181e1ef)(calendar, hourCycle, calendarValue));
|
|
23520
24190
|
}
|
|
23521
24191
|
},
|
|
23522
24192
|
clearSegment (part) {
|
|
23523
|
-
delete validSegments[part];
|
|
23524
|
-
clearedSegment.current = part;
|
|
23525
|
-
setValidSegments({
|
|
23526
|
-
...validSegments
|
|
23527
|
-
});
|
|
23528
|
-
let placeholder = ($35a22f14a1f04b11$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone);
|
|
23529
24193
|
let value = displayValue;
|
|
23530
|
-
|
|
23531
|
-
if (part === 'dayPeriod' && 'hour' in displayValue && 'hour' in placeholder) {
|
|
23532
|
-
let isPM = displayValue.hour >= 12;
|
|
23533
|
-
let shouldBePM = placeholder.hour >= 12;
|
|
23534
|
-
if (isPM && !shouldBePM) value = displayValue.set({
|
|
23535
|
-
hour: displayValue.hour - 12
|
|
23536
|
-
});
|
|
23537
|
-
else if (!isPM && shouldBePM) value = displayValue.set({
|
|
23538
|
-
hour: displayValue.hour + 12
|
|
23539
|
-
});
|
|
23540
|
-
} else if (part === 'hour' && 'hour' in displayValue && displayValue.hour >= 12 && validSegments.dayPeriod) value = displayValue.set({
|
|
23541
|
-
hour: placeholder['hour'] + 12
|
|
23542
|
-
});
|
|
23543
|
-
else if (part in displayValue) value = displayValue.set({
|
|
23544
|
-
[part]: placeholder[part]
|
|
23545
|
-
});
|
|
23546
|
-
setDate(null);
|
|
24194
|
+
if (part !== 'timeZoneName' && part !== 'literal') value = displayValue.clear(part);
|
|
23547
24195
|
setValue(value);
|
|
23548
24196
|
},
|
|
23549
24197
|
formatValue (fieldOptions) {
|
|
@@ -23562,24 +24210,40 @@ function $3c0fc76039f1c516$export$60e84778edff6d26(props) {
|
|
|
23562
24210
|
}
|
|
23563
24211
|
};
|
|
23564
24212
|
}
|
|
23565
|
-
function $3c0fc76039f1c516$var$processSegments(dateValue,
|
|
24213
|
+
function $3c0fc76039f1c516$var$processSegments(dateValue, displayValue, dateFormatter, resolvedOptions, calendar, locale, granularity) {
|
|
23566
24214
|
let timeValue = [
|
|
23567
24215
|
'hour',
|
|
23568
24216
|
'minute',
|
|
23569
24217
|
'second'
|
|
23570
24218
|
];
|
|
23571
24219
|
let segments = dateFormatter.formatToParts(dateValue);
|
|
24220
|
+
// In order to allow formatting temporarily invalid dates during editing (e.g. February 30th),
|
|
24221
|
+
// use a NumberFormatter to manually format segments directly from raw numbers.
|
|
24222
|
+
// When the user blurs the date field, the invalid segments will be constrained.
|
|
24223
|
+
let numberFormatter = new ($488c6ddbf4ef74c2$export$cc77c4ff7e8673c5)(locale, {
|
|
24224
|
+
useGrouping: false
|
|
24225
|
+
});
|
|
24226
|
+
let twoDigitFormatter = new ($488c6ddbf4ef74c2$export$cc77c4ff7e8673c5)(locale, {
|
|
24227
|
+
useGrouping: false,
|
|
24228
|
+
minimumIntegerDigits: 2
|
|
24229
|
+
});
|
|
24230
|
+
for (let segment of segments)if (segment.type === 'year' || segment.type === 'month' || segment.type === 'day' || segment.type === 'hour') {
|
|
24231
|
+
var _displayValue_segment_type;
|
|
24232
|
+
let value = (_displayValue_segment_type = displayValue[segment.type]) !== null && _displayValue_segment_type !== void 0 ? _displayValue_segment_type : 0;
|
|
24233
|
+
if (resolvedOptions[segment.type] === '2-digit') segment.value = twoDigitFormatter.format(value);
|
|
24234
|
+
else segment.value = numberFormatter.format(value);
|
|
24235
|
+
}
|
|
23572
24236
|
let processedSegments = [];
|
|
23573
24237
|
for (let segment of segments){
|
|
23574
24238
|
let type = $3c0fc76039f1c516$var$TYPE_MAPPING[segment.type] || segment.type;
|
|
23575
24239
|
let isEditable = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type];
|
|
23576
24240
|
if (type === 'era' && calendar.getEras().length === 1) isEditable = false;
|
|
23577
|
-
let isPlaceholder = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type] &&
|
|
24241
|
+
let isPlaceholder = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type] && displayValue[segment.type] == null;
|
|
23578
24242
|
let placeholder = $3c0fc76039f1c516$var$EDITABLE_SEGMENTS[type] ? ($3e3ed55ab2966714$export$d3f5c5e0a5023fa0)(type, segment.value, locale) : null;
|
|
23579
24243
|
let dateSegment = {
|
|
23580
24244
|
type: type,
|
|
23581
24245
|
text: isPlaceholder ? placeholder : segment.value,
|
|
23582
|
-
|
|
24246
|
+
...displayValue.getSegmentLimits(type),
|
|
23583
24247
|
isPlaceholder: isPlaceholder,
|
|
23584
24248
|
placeholder: placeholder,
|
|
23585
24249
|
isEditable: isEditable
|
|
@@ -23592,7 +24256,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23592
24256
|
processedSegments.push({
|
|
23593
24257
|
type: 'literal',
|
|
23594
24258
|
text: '\u2066',
|
|
23595
|
-
...$3c0fc76039f1c516$var$getSegmentLimits(displayValue, 'literal', resolvedOptions),
|
|
23596
24259
|
isPlaceholder: false,
|
|
23597
24260
|
placeholder: '',
|
|
23598
24261
|
isEditable: false
|
|
@@ -23602,7 +24265,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23602
24265
|
if (type === granularity) processedSegments.push({
|
|
23603
24266
|
type: 'literal',
|
|
23604
24267
|
text: '\u2069',
|
|
23605
|
-
...$3c0fc76039f1c516$var$getSegmentLimits(displayValue, 'literal', resolvedOptions),
|
|
23606
24268
|
isPlaceholder: false,
|
|
23607
24269
|
placeholder: '',
|
|
23608
24270
|
isEditable: false
|
|
@@ -23613,7 +24275,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23613
24275
|
processedSegments.push({
|
|
23614
24276
|
type: 'literal',
|
|
23615
24277
|
text: '\u2069',
|
|
23616
|
-
...$3c0fc76039f1c516$var$getSegmentLimits(displayValue, 'literal', resolvedOptions),
|
|
23617
24278
|
isPlaceholder: false,
|
|
23618
24279
|
placeholder: '',
|
|
23619
24280
|
isEditable: false
|
|
@@ -23623,139 +24284,6 @@ function $3c0fc76039f1c516$var$processSegments(dateValue, validSegments, dateFor
|
|
|
23623
24284
|
}
|
|
23624
24285
|
return processedSegments;
|
|
23625
24286
|
}
|
|
23626
|
-
function $3c0fc76039f1c516$var$getSegmentLimits(date, type, options) {
|
|
23627
|
-
switch(type){
|
|
23628
|
-
case 'era':
|
|
23629
|
-
{
|
|
23630
|
-
let eras = date.calendar.getEras();
|
|
23631
|
-
return {
|
|
23632
|
-
value: eras.indexOf(date.era),
|
|
23633
|
-
minValue: 0,
|
|
23634
|
-
maxValue: eras.length - 1
|
|
23635
|
-
};
|
|
23636
|
-
}
|
|
23637
|
-
case 'year':
|
|
23638
|
-
return {
|
|
23639
|
-
value: date.year,
|
|
23640
|
-
minValue: 1,
|
|
23641
|
-
maxValue: date.calendar.getYearsInEra(date)
|
|
23642
|
-
};
|
|
23643
|
-
case 'month':
|
|
23644
|
-
return {
|
|
23645
|
-
value: date.month,
|
|
23646
|
-
minValue: ($14e0f24ef4ac5c92$export$5412ac11713b72ad)(date),
|
|
23647
|
-
maxValue: date.calendar.getMonthsInYear(date)
|
|
23648
|
-
};
|
|
23649
|
-
case 'day':
|
|
23650
|
-
return {
|
|
23651
|
-
value: date.day,
|
|
23652
|
-
minValue: ($14e0f24ef4ac5c92$export$b2f4953d301981d5)(date),
|
|
23653
|
-
maxValue: date.calendar.getDaysInMonth(date)
|
|
23654
|
-
};
|
|
23655
|
-
}
|
|
23656
|
-
if ('hour' in date) switch(type){
|
|
23657
|
-
case 'dayPeriod':
|
|
23658
|
-
return {
|
|
23659
|
-
value: date.hour >= 12 ? 12 : 0,
|
|
23660
|
-
minValue: 0,
|
|
23661
|
-
maxValue: 12
|
|
23662
|
-
};
|
|
23663
|
-
case 'hour':
|
|
23664
|
-
if (options.hour12) {
|
|
23665
|
-
let isPM = date.hour >= 12;
|
|
23666
|
-
return {
|
|
23667
|
-
value: date.hour,
|
|
23668
|
-
minValue: isPM ? 12 : 0,
|
|
23669
|
-
maxValue: isPM ? 23 : 11
|
|
23670
|
-
};
|
|
23671
|
-
}
|
|
23672
|
-
return {
|
|
23673
|
-
value: date.hour,
|
|
23674
|
-
minValue: 0,
|
|
23675
|
-
maxValue: 23
|
|
23676
|
-
};
|
|
23677
|
-
case 'minute':
|
|
23678
|
-
return {
|
|
23679
|
-
value: date.minute,
|
|
23680
|
-
minValue: 0,
|
|
23681
|
-
maxValue: 59
|
|
23682
|
-
};
|
|
23683
|
-
case 'second':
|
|
23684
|
-
return {
|
|
23685
|
-
value: date.second,
|
|
23686
|
-
minValue: 0,
|
|
23687
|
-
maxValue: 59
|
|
23688
|
-
};
|
|
23689
|
-
}
|
|
23690
|
-
return {};
|
|
23691
|
-
}
|
|
23692
|
-
function $3c0fc76039f1c516$var$addSegment(value, part, amount, options) {
|
|
23693
|
-
switch(part){
|
|
23694
|
-
case 'era':
|
|
23695
|
-
case 'year':
|
|
23696
|
-
case 'month':
|
|
23697
|
-
case 'day':
|
|
23698
|
-
return value.cycle(part, amount, {
|
|
23699
|
-
round: part === 'year'
|
|
23700
|
-
});
|
|
23701
|
-
}
|
|
23702
|
-
if ('hour' in value) switch(part){
|
|
23703
|
-
case 'dayPeriod':
|
|
23704
|
-
{
|
|
23705
|
-
let hours = value.hour;
|
|
23706
|
-
let isPM = hours >= 12;
|
|
23707
|
-
return value.set({
|
|
23708
|
-
hour: isPM ? hours - 12 : hours + 12
|
|
23709
|
-
});
|
|
23710
|
-
}
|
|
23711
|
-
case 'hour':
|
|
23712
|
-
case 'minute':
|
|
23713
|
-
case 'second':
|
|
23714
|
-
return value.cycle(part, amount, {
|
|
23715
|
-
round: part !== 'hour',
|
|
23716
|
-
hourCycle: options.hour12 ? 12 : 24
|
|
23717
|
-
});
|
|
23718
|
-
}
|
|
23719
|
-
throw new Error('Unknown segment: ' + part);
|
|
23720
|
-
}
|
|
23721
|
-
function $3c0fc76039f1c516$var$setSegment(value, part, segmentValue, options) {
|
|
23722
|
-
switch(part){
|
|
23723
|
-
case 'day':
|
|
23724
|
-
case 'month':
|
|
23725
|
-
case 'year':
|
|
23726
|
-
case 'era':
|
|
23727
|
-
return value.set({
|
|
23728
|
-
[part]: segmentValue
|
|
23729
|
-
});
|
|
23730
|
-
}
|
|
23731
|
-
if ('hour' in value && typeof segmentValue === 'number') switch(part){
|
|
23732
|
-
case 'dayPeriod':
|
|
23733
|
-
{
|
|
23734
|
-
let hours = value.hour;
|
|
23735
|
-
let wasPM = hours >= 12;
|
|
23736
|
-
let isPM = segmentValue >= 12;
|
|
23737
|
-
if (isPM === wasPM) return value;
|
|
23738
|
-
return value.set({
|
|
23739
|
-
hour: wasPM ? hours - 12 : hours + 12
|
|
23740
|
-
});
|
|
23741
|
-
}
|
|
23742
|
-
case 'hour':
|
|
23743
|
-
// In 12 hour time, ensure that AM/PM does not change
|
|
23744
|
-
if (options.hour12) {
|
|
23745
|
-
let hours = value.hour;
|
|
23746
|
-
let wasPM = hours >= 12;
|
|
23747
|
-
if (!wasPM && segmentValue === 12) segmentValue = 0;
|
|
23748
|
-
if (wasPM && segmentValue < 12) segmentValue += 12;
|
|
23749
|
-
}
|
|
23750
|
-
// fallthrough
|
|
23751
|
-
case 'minute':
|
|
23752
|
-
case 'second':
|
|
23753
|
-
return value.set({
|
|
23754
|
-
[part]: segmentValue
|
|
23755
|
-
});
|
|
23756
|
-
}
|
|
23757
|
-
throw new Error('Unknown segment: ' + part);
|
|
23758
|
-
}
|
|
23759
24287
|
|
|
23760
24288
|
/*
|
|
23761
24289
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -24231,12 +24759,14 @@ function $8796f90736e175cb$export$4d40659c25ecb50b(props = {}) {
|
|
|
24231
24759
|
let warmupTooltip = ()=>{
|
|
24232
24760
|
closeOpenTooltips();
|
|
24233
24761
|
ensureTooltipEntry();
|
|
24234
|
-
if (!isOpen && !$8796f90736e175cb$var$
|
|
24235
|
-
$8796f90736e175cb$var$globalWarmUpTimeout
|
|
24236
|
-
$8796f90736e175cb$var$
|
|
24237
|
-
|
|
24238
|
-
|
|
24239
|
-
|
|
24762
|
+
if (!isOpen && !$8796f90736e175cb$var$globalWarmedUp) {
|
|
24763
|
+
if ($8796f90736e175cb$var$globalWarmUpTimeout) clearTimeout($8796f90736e175cb$var$globalWarmUpTimeout);
|
|
24764
|
+
$8796f90736e175cb$var$globalWarmUpTimeout = setTimeout(()=>{
|
|
24765
|
+
$8796f90736e175cb$var$globalWarmUpTimeout = null;
|
|
24766
|
+
$8796f90736e175cb$var$globalWarmedUp = true;
|
|
24767
|
+
showTooltip();
|
|
24768
|
+
}, delay);
|
|
24769
|
+
} else if (!isOpen) showTooltip();
|
|
24240
24770
|
};
|
|
24241
24771
|
(useEffect)(()=>{
|
|
24242
24772
|
closeCallback.current = close;
|
|
@@ -24306,7 +24836,7 @@ const $dfd62f934fc76fed$export$e1aef45b828286de = /*#__PURE__*/ (forwardRef)(fun
|
|
|
24306
24836
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24307
24837
|
global: true
|
|
24308
24838
|
});
|
|
24309
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24839
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24310
24840
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, calendarProps),
|
|
24311
24841
|
ref: ref,
|
|
24312
24842
|
slot: props.slot || undefined,
|
|
@@ -24383,7 +24913,8 @@ const $dfd62f934fc76fed$export$5bd780d491cfc46c = /*#__PURE__*/ (forwardRef)(fun
|
|
|
24383
24913
|
startDate: startDate,
|
|
24384
24914
|
weeksInMonth: weeksInMonth
|
|
24385
24915
|
}
|
|
24386
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24916
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).table, {
|
|
24917
|
+
render: props.render,
|
|
24387
24918
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, gridProps),
|
|
24388
24919
|
ref: ref,
|
|
24389
24920
|
style: props.style,
|
|
@@ -24397,7 +24928,8 @@ function $dfd62f934fc76fed$var$CalendarGridHeader(props, ref) {
|
|
|
24397
24928
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24398
24929
|
global: true
|
|
24399
24930
|
});
|
|
24400
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24931
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).thead, {
|
|
24932
|
+
render: props.render,
|
|
24401
24933
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, headerProps),
|
|
24402
24934
|
ref: ref,
|
|
24403
24935
|
style: style,
|
|
@@ -24414,7 +24946,8 @@ function $dfd62f934fc76fed$var$CalendarHeaderCell(props, ref) {
|
|
|
24414
24946
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24415
24947
|
global: true
|
|
24416
24948
|
});
|
|
24417
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24949
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).th, {
|
|
24950
|
+
render: props.render,
|
|
24418
24951
|
...DOMProps,
|
|
24419
24952
|
ref: ref,
|
|
24420
24953
|
style: style,
|
|
@@ -24433,7 +24966,8 @@ function $dfd62f934fc76fed$var$CalendarGridBody(props, ref) {
|
|
|
24433
24966
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24434
24967
|
global: true
|
|
24435
24968
|
});
|
|
24436
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
24969
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).tbody, {
|
|
24970
|
+
render: props.render,
|
|
24437
24971
|
...DOMProps,
|
|
24438
24972
|
ref: ref,
|
|
24439
24973
|
style: style,
|
|
@@ -24514,7 +25048,7 @@ const $dfd62f934fc76fed$export$5d847498420df57b = /*#__PURE__*/ (forwardRef)(fun
|
|
|
24514
25048
|
return /*#__PURE__*/ ($dbSRa$react).createElement("td", {
|
|
24515
25049
|
...cellProps,
|
|
24516
25050
|
ref: ref
|
|
24517
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25051
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24518
25052
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, buttonProps, focusProps, hoverProps, dataAttrs, renderProps),
|
|
24519
25053
|
ref: buttonRef
|
|
24520
25054
|
}));
|
|
@@ -24580,7 +25114,7 @@ const $d3e0e05bdfcf66bd$export$c24727297075ec6a = /*#__PURE__*/ (createContext)(
|
|
|
24580
25114
|
const $d3e0e05bdfcf66bd$export$a7fed597f4b8afd8 = /*#__PURE__*/ (forwardRef)(function Form(props, ref) {
|
|
24581
25115
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d3e0e05bdfcf66bd$export$c24727297075ec6a);
|
|
24582
25116
|
let { validationErrors: validationErrors, validationBehavior: validationBehavior = 'native', children: children, className: className, ...domProps } = props;
|
|
24583
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25117
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).form, {
|
|
24584
25118
|
noValidate: validationBehavior !== 'native',
|
|
24585
25119
|
...domProps,
|
|
24586
25120
|
ref: ref,
|
|
@@ -24646,7 +25180,7 @@ const $bc237834342dbd75$export$4aa08d5625cb8ead = /*#__PURE__*/ (forwardRef)(fun
|
|
|
24646
25180
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
24647
25181
|
global: true
|
|
24648
25182
|
});
|
|
24649
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25183
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24650
25184
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, groupProps),
|
|
24651
25185
|
ref: ref,
|
|
24652
25186
|
slot: props.slot || undefined,
|
|
@@ -24735,7 +25269,7 @@ const $bc237834342dbd75$export$48513f6b9f8ce62d = /*#__PURE__*/ (forwardRef)(fun
|
|
|
24735
25269
|
});
|
|
24736
25270
|
delete DOMProps.id;
|
|
24737
25271
|
delete DOMProps.onClick;
|
|
24738
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25272
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).label, {
|
|
24739
25273
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, labelProps, hoverProps, renderProps),
|
|
24740
25274
|
ref: ref,
|
|
24741
25275
|
slot: props.slot || undefined,
|
|
@@ -24797,7 +25331,7 @@ const $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
24797
25331
|
defaultClassName: 'react-aria-Group'
|
|
24798
25332
|
});
|
|
24799
25333
|
var _props_role, _props_slot;
|
|
24800
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25334
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
24801
25335
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(otherProps, focusProps, hoverProps),
|
|
24802
25336
|
...renderProps,
|
|
24803
25337
|
ref: ref,
|
|
@@ -24854,7 +25388,7 @@ const $3985021b0ad6602f$export$f5b8910cec6cf069 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
24854
25388
|
},
|
|
24855
25389
|
defaultClassName: 'react-aria-Input'
|
|
24856
25390
|
});
|
|
24857
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25391
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).input, {
|
|
24858
25392
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)($3985021b0ad6602f$var$filterHoverProps(props), focusProps, hoverProps),
|
|
24859
25393
|
...renderProps,
|
|
24860
25394
|
ref: ref,
|
|
@@ -25311,7 +25845,7 @@ function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropH
|
|
|
25311
25845
|
const $72a5793c14baf454$export$e0e4026c12a8bdbb = /*#__PURE__*/ (createContext)({});
|
|
25312
25846
|
const $72a5793c14baf454$export$8b251419efc915eb = /*#__PURE__*/ ($e1995378a142960e$export$18af5c7a9e9b3664)(($23b9f4fcf0fe224b$export$5ae2504e948afce5), function Header(props, ref) {
|
|
25313
25847
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
|
|
25314
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25848
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).header, {
|
|
25315
25849
|
className: "react-aria-Header",
|
|
25316
25850
|
...props,
|
|
25317
25851
|
ref: ref
|
|
@@ -25391,6 +25925,7 @@ const $431f98aba6844401$export$1ff3c3f08ae963c0 = /*#__PURE__*/ ($e1995378a14296
|
|
|
25391
25925
|
let { elementType: elementType, orientation: orientation, style: style, className: className, slot: slot, ...otherProps } = props;
|
|
25392
25926
|
let Element = elementType || 'hr';
|
|
25393
25927
|
if (Element === 'hr' && orientation === 'vertical') Element = 'div';
|
|
25928
|
+
let ElementType = ($64fa3d84918910a7$export$df3a06d6289f983e)[Element];
|
|
25394
25929
|
let { separatorProps: separatorProps } = ($f4b273590fab9f93$export$52210f68a14655d0)({
|
|
25395
25930
|
...otherProps,
|
|
25396
25931
|
elementType: elementType,
|
|
@@ -25399,7 +25934,8 @@ const $431f98aba6844401$export$1ff3c3f08ae963c0 = /*#__PURE__*/ ($e1995378a14296
|
|
|
25399
25934
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25400
25935
|
global: true
|
|
25401
25936
|
});
|
|
25402
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
25937
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
25938
|
+
render: props.render,
|
|
25403
25939
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, separatorProps),
|
|
25404
25940
|
style: style,
|
|
25405
25941
|
className: className !== null && className !== void 0 ? className : 'react-aria-Separator',
|
|
@@ -25572,8 +26108,8 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props: props, l
|
|
|
25572
26108
|
state: state
|
|
25573
26109
|
};
|
|
25574
26110
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
25575
|
-
|
|
25576
|
-
|
|
26111
|
+
...props,
|
|
26112
|
+
children: undefined,
|
|
25577
26113
|
defaultClassName: 'react-aria-ListBox',
|
|
25578
26114
|
values: renderValues
|
|
25579
26115
|
});
|
|
@@ -25588,7 +26124,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props: props, l
|
|
|
25588
26124
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25589
26125
|
global: true
|
|
25590
26126
|
});
|
|
25591
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(($9bf71ea28793e738$export$20e40289641fbbb6), null, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26127
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($9bf71ea28793e738$export$20e40289641fbbb6), null, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25592
26128
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, listBoxProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps),
|
|
25593
26129
|
ref: listBoxRef,
|
|
25594
26130
|
slot: props.slot || undefined,
|
|
@@ -25655,16 +26191,17 @@ function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, classNam
|
|
|
25655
26191
|
'aria-label': (_props_arialabel = props['aria-label']) !== null && _props_arialabel !== void 0 ? _props_arialabel : undefined
|
|
25656
26192
|
});
|
|
25657
26193
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
26194
|
+
...props,
|
|
26195
|
+
id: undefined,
|
|
26196
|
+
children: undefined,
|
|
25658
26197
|
defaultClassName: className,
|
|
25659
|
-
|
|
25660
|
-
style: props.style,
|
|
25661
|
-
values: {}
|
|
26198
|
+
values: undefined
|
|
25662
26199
|
});
|
|
25663
26200
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25664
26201
|
global: true
|
|
25665
26202
|
});
|
|
25666
26203
|
delete DOMProps.id;
|
|
25667
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26204
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).section, {
|
|
25668
26205
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, groupProps),
|
|
25669
26206
|
ref: ref
|
|
25670
26207
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($72a5793c14baf454$export$e0e4026c12a8bdbb).Provider, {
|
|
@@ -25693,6 +26230,7 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
|
|
|
25693
26230
|
onHoverChange: item.props.onHoverChange,
|
|
25694
26231
|
onHoverEnd: item.props.onHoverEnd
|
|
25695
26232
|
});
|
|
26233
|
+
let { keyboardProps: keyboardProps } = ($46d819fcbaf35654$export$8f71654801c2f7cd)(props);
|
|
25696
26234
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)(props);
|
|
25697
26235
|
let draggableItem = null;
|
|
25698
26236
|
if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
|
|
@@ -25728,15 +26266,15 @@ const $eed445e0843c11d0$export$a11e76429ed99b4 = /*#__PURE__*/ ($e1995378a142960
|
|
|
25728
26266
|
}, [
|
|
25729
26267
|
item.textValue
|
|
25730
26268
|
]);
|
|
25731
|
-
let ElementType = props.href ?
|
|
26269
|
+
let ElementType = props.href ? ($64fa3d84918910a7$export$df3a06d6289f983e).a : ($64fa3d84918910a7$export$df3a06d6289f983e).div;
|
|
25732
26270
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25733
26271
|
global: true
|
|
25734
26272
|
});
|
|
25735
26273
|
delete DOMProps.id;
|
|
25736
26274
|
delete DOMProps.onClick;
|
|
25737
|
-
if (
|
|
26275
|
+
if (props.href && optionProps.tabIndex == null) optionProps.tabIndex = -1;
|
|
25738
26276
|
return /*#__PURE__*/ ($dbSRa$react).createElement(ElementType, {
|
|
25739
|
-
...($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),
|
|
26277
|
+
...($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),
|
|
25740
26278
|
ref: ref,
|
|
25741
26279
|
"data-allows-dragging": !!dragState || undefined,
|
|
25742
26280
|
"data-selected": states.isSelected || undefined,
|
|
@@ -25790,10 +26328,9 @@ function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
|
|
|
25790
26328
|
isDropTarget: isDropTarget
|
|
25791
26329
|
}
|
|
25792
26330
|
});
|
|
25793
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26331
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25794
26332
|
...dropIndicatorProps,
|
|
25795
26333
|
...renderProps,
|
|
25796
|
-
// eslint-disable-next-line
|
|
25797
26334
|
role: "option",
|
|
25798
26335
|
ref: ref,
|
|
25799
26336
|
"data-drop-target": isDropTarget || undefined
|
|
@@ -25820,7 +26357,7 @@ const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /*#__PURE__*/ (forw
|
|
|
25820
26357
|
id: undefined,
|
|
25821
26358
|
children: item.rendered,
|
|
25822
26359
|
defaultClassName: 'react-aria-ListBoxLoadingIndicator',
|
|
25823
|
-
values:
|
|
26360
|
+
values: undefined
|
|
25824
26361
|
});
|
|
25825
26362
|
let optionProps = {
|
|
25826
26363
|
// For Android talkback
|
|
@@ -25841,13 +26378,12 @@ const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /*#__PURE__*/ (forw
|
|
|
25841
26378
|
height: 1,
|
|
25842
26379
|
width: 1
|
|
25843
26380
|
}
|
|
25844
|
-
})), isLoading && renderProps.children && /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26381
|
+
})), isLoading && renderProps.children && /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25845
26382
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
25846
26383
|
global: true
|
|
25847
26384
|
}), optionProps),
|
|
25848
26385
|
...renderProps,
|
|
25849
26386
|
// aria-selected isn't needed here since this option is not selectable.
|
|
25850
|
-
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
25851
26387
|
role: "option",
|
|
25852
26388
|
ref: ref
|
|
25853
26389
|
}, renderProps.children));
|
|
@@ -25888,7 +26424,7 @@ const $44f671af83e7d9e0$export$746d02f47f4d381 = /*#__PURE__*/ (forwardRef)(func
|
|
|
25888
26424
|
// spread merged with the other style object
|
|
25889
26425
|
if (renderProps.style) Object.keys(renderProps.style).forEach((key)=>renderProps.style[key] === undefined && delete renderProps.style[key]);
|
|
25890
26426
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
25891
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26427
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
25892
26428
|
...DOMProps,
|
|
25893
26429
|
...renderProps,
|
|
25894
26430
|
style: {
|
|
@@ -25993,7 +26529,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
25993
26529
|
// Focus the popover itself on mount, unless a child element is already focused.
|
|
25994
26530
|
// Skip this for submenus since hovering a submenutrigger should keep focus on the trigger
|
|
25995
26531
|
(useEffect)(()=>{
|
|
25996
|
-
if (isDialog && props.trigger !== 'SubmenuTrigger' && ref.current && !ref.current
|
|
26532
|
+
if (isDialog && (props.trigger !== 'SubmenuTrigger' || ($507fabe10e71c6fb$export$630ff653c5ada6a9)() !== 'pointer') && ref.current && !($d4ee10de306f2510$export$b4f377a2b6254582)(ref.current)) ($3ad3f6e1647bc98d$export$80f3e147d781571c)(ref.current);
|
|
25997
26533
|
}, [
|
|
25998
26534
|
isDialog,
|
|
25999
26535
|
ref,
|
|
@@ -26014,7 +26550,7 @@ function $07b14b47974efb58$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
26014
26550
|
'--trigger-anchor-point': triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : undefined,
|
|
26015
26551
|
...renderProps.style
|
|
26016
26552
|
};
|
|
26017
|
-
let overlay = /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26553
|
+
let overlay = /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26018
26554
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
26019
26555
|
global: true
|
|
26020
26556
|
}), popoverProps),
|
|
@@ -26194,8 +26730,9 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26194
26730
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
26195
26731
|
global: true
|
|
26196
26732
|
});
|
|
26197
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26733
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).section, {
|
|
26198
26734
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, dialogProps),
|
|
26735
|
+
render: props.render,
|
|
26199
26736
|
ref: ref,
|
|
26200
26737
|
slot: props.slot || undefined
|
|
26201
26738
|
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
@@ -26240,6 +26777,7 @@ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26240
26777
|
*/
|
|
26241
26778
|
|
|
26242
26779
|
|
|
26780
|
+
|
|
26243
26781
|
const $c699643d2073b351$var$dateSegments = [
|
|
26244
26782
|
'day',
|
|
26245
26783
|
'month',
|
|
@@ -26263,7 +26801,11 @@ function $c699643d2073b351$export$f6a685cd1acbd1fa(props, state) {
|
|
|
26263
26801
|
let inputStep = 60;
|
|
26264
26802
|
if (state.granularity === 'second') inputStep = 1;
|
|
26265
26803
|
else if (state.granularity === 'hour') inputStep = 3600;
|
|
26266
|
-
let dateValue =
|
|
26804
|
+
let dateValue = '';
|
|
26805
|
+
if (state.value) {
|
|
26806
|
+
if (state.granularity === 'day') dateValue = ($11d87f3f76e88657$export$93522d1a439f3617)(state.value).toString();
|
|
26807
|
+
else dateValue = ($11d87f3f76e88657$export$b21e0b124e224484)('timeZone' in state.value ? ($11d87f3f76e88657$export$d9b67bc93c097491)(state.value) : state.value).toString();
|
|
26808
|
+
}
|
|
26267
26809
|
let inputType = state.granularity === 'day' ? 'date' : 'datetime-local';
|
|
26268
26810
|
let timeSegments = [
|
|
26269
26811
|
'hour',
|
|
@@ -26296,7 +26838,7 @@ function $c699643d2073b351$export$f6a685cd1acbd1fa(props, state) {
|
|
|
26296
26838
|
step: inputStep,
|
|
26297
26839
|
value: dateValue,
|
|
26298
26840
|
onChange: (e)=>{
|
|
26299
|
-
let targetString = e.
|
|
26841
|
+
let targetString = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e).value.toString();
|
|
26300
26842
|
if (targetString) try {
|
|
26301
26843
|
let targetValue = (0, $fae977aafc393c5c$export$588937bcd60ade55)(targetString);
|
|
26302
26844
|
if (state.granularity === 'day') targetValue = (0, $fae977aafc393c5c$export$6b862160d295c8e)(targetString);
|
|
@@ -26384,7 +26926,8 @@ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26384
26926
|
state: state,
|
|
26385
26927
|
isInvalid: state.isInvalid,
|
|
26386
26928
|
isDisabled: state.isDisabled,
|
|
26387
|
-
isReadOnly: state.isReadOnly
|
|
26929
|
+
isReadOnly: state.isReadOnly,
|
|
26930
|
+
isRequired: props.isRequired || false
|
|
26388
26931
|
},
|
|
26389
26932
|
defaultClassName: 'react-aria-TimeField'
|
|
26390
26933
|
});
|
|
@@ -26436,14 +26979,15 @@ const $40825cdb76e74f70$export$5eaee2322dd727eb = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26436
26979
|
validation
|
|
26437
26980
|
]
|
|
26438
26981
|
]
|
|
26439
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
26982
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26440
26983
|
...DOMProps,
|
|
26441
26984
|
...renderProps,
|
|
26442
26985
|
ref: ref,
|
|
26443
26986
|
slot: props.slot || undefined,
|
|
26444
26987
|
"data-invalid": state.isInvalid || undefined,
|
|
26445
26988
|
"data-disabled": state.isDisabled || undefined,
|
|
26446
|
-
"data-readonly": state.isReadOnly || undefined
|
|
26989
|
+
"data-readonly": state.isReadOnly || undefined,
|
|
26990
|
+
"data-required": props.isRequired || undefined
|
|
26447
26991
|
}));
|
|
26448
26992
|
});
|
|
26449
26993
|
const $40825cdb76e74f70$export$7edc06cf1783b30f = /*#__PURE__*/ (forwardRef)(function DateInput(props, ref) {
|
|
@@ -26543,7 +27087,7 @@ const $40825cdb76e74f70$export$336ab7fa954c4b5f = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26543
27087
|
defaultChildren: segment.text,
|
|
26544
27088
|
defaultClassName: 'react-aria-DateSegment'
|
|
26545
27089
|
});
|
|
26546
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27090
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).span, {
|
|
26547
27091
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(otherProps, {
|
|
26548
27092
|
global: true
|
|
26549
27093
|
}), segmentProps, focusProps, hoverProps),
|
|
@@ -26633,7 +27177,8 @@ const $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26633
27177
|
isDisabled: props.isDisabled || false,
|
|
26634
27178
|
isInvalid: state.isInvalid,
|
|
26635
27179
|
isOpen: state.isOpen,
|
|
26636
|
-
isReadOnly: props.isReadOnly || false
|
|
27180
|
+
isReadOnly: props.isReadOnly || false,
|
|
27181
|
+
isRequired: props.isRequired || false
|
|
26637
27182
|
},
|
|
26638
27183
|
defaultClassName: 'react-aria-DatePicker'
|
|
26639
27184
|
});
|
|
@@ -26712,7 +27257,7 @@ const $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26712
27257
|
validation
|
|
26713
27258
|
]
|
|
26714
27259
|
]
|
|
26715
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27260
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26716
27261
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, focusProps),
|
|
26717
27262
|
ref: ref,
|
|
26718
27263
|
slot: props.slot || undefined,
|
|
@@ -26721,6 +27266,7 @@ const $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26721
27266
|
"data-focus-visible": isFocusVisible || undefined,
|
|
26722
27267
|
"data-disabled": props.isDisabled || undefined,
|
|
26723
27268
|
"data-readonly": props.isReadOnly || undefined,
|
|
27269
|
+
"data-required": props.isRequired || undefined,
|
|
26724
27270
|
"data-open": state.isOpen || undefined
|
|
26725
27271
|
}), /*#__PURE__*/ ($dbSRa$react).createElement(($c699643d2073b351$export$eefa3e19139f00f3), {
|
|
26726
27272
|
autoComplete: props.autoComplete,
|
|
@@ -26760,7 +27306,7 @@ const $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26760
27306
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
26761
27307
|
global: true
|
|
26762
27308
|
});
|
|
26763
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27309
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26764
27310
|
...domProps,
|
|
26765
27311
|
...renderProps,
|
|
26766
27312
|
ref: ref,
|
|
@@ -26837,7 +27383,7 @@ const $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26837
27383
|
state
|
|
26838
27384
|
]
|
|
26839
27385
|
]
|
|
26840
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27386
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26841
27387
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, renderProps, focusWithinProps),
|
|
26842
27388
|
ref: ref,
|
|
26843
27389
|
"data-expanded": state.isExpanded || undefined,
|
|
@@ -26862,7 +27408,7 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26862
27408
|
global: true,
|
|
26863
27409
|
labelable: true
|
|
26864
27410
|
});
|
|
26865
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27411
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
26866
27412
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, panelProps, focusWithinProps),
|
|
26867
27413
|
ref: ($5dc95899b306f630$export$c9058316764c140e)(ref, panelRef),
|
|
26868
27414
|
role: role,
|
|
@@ -26893,7 +27439,7 @@ const $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (forwardRef)(fun
|
|
|
26893
27439
|
const $5cb03073d3f54797$export$a8a3e93435678ff9 = /*#__PURE__*/ (forwardRef)(function Heading(props, ref) {
|
|
26894
27440
|
[props, ref] = ($64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, ($4e85f108e88277b8$export$d688439359537581));
|
|
26895
27441
|
let { children: children, level: level = 3, className: className, ...domProps } = props;
|
|
26896
|
-
let Element = `h${level}
|
|
27442
|
+
let Element = ($64fa3d84918910a7$export$df3a06d6289f983e)[`h${level}`];
|
|
26897
27443
|
return /*#__PURE__*/ ($dbSRa$react).createElement(Element, {
|
|
26898
27444
|
...domProps,
|
|
26899
27445
|
ref: ref,
|
|
@@ -27013,7 +27559,7 @@ function $f3f84453ead64de5$var$ModalOverlayInner({ UNSTABLE_portalContainer: UNS
|
|
|
27013
27559
|
return /*#__PURE__*/ ($dbSRa$react).createElement(($337b884510726a0d$export$c6fdb837b070b4ff), {
|
|
27014
27560
|
isExiting: props.isExiting,
|
|
27015
27561
|
portalContainer: UNSTABLE_portalContainer
|
|
27016
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27562
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27017
27563
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27018
27564
|
global: true
|
|
27019
27565
|
}), underlayProps),
|
|
@@ -27058,7 +27604,7 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
27058
27604
|
state: state
|
|
27059
27605
|
}
|
|
27060
27606
|
});
|
|
27061
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27607
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27062
27608
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27063
27609
|
global: true
|
|
27064
27610
|
}), modalProps),
|
|
@@ -27174,7 +27720,7 @@ const $b91743d66a0ed188$export$63c5fa0b2fdccd2e = /*#__PURE__*/ (forwardRef)(fun
|
|
|
27174
27720
|
validation
|
|
27175
27721
|
]
|
|
27176
27722
|
]
|
|
27177
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27723
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27178
27724
|
...DOMProps,
|
|
27179
27725
|
...renderProps,
|
|
27180
27726
|
ref: ref,
|
|
@@ -27245,7 +27791,7 @@ const $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
27245
27791
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27246
27792
|
global: true
|
|
27247
27793
|
});
|
|
27248
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27794
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27249
27795
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, radioGroupProps),
|
|
27250
27796
|
ref: ref,
|
|
27251
27797
|
slot: props.slot || undefined,
|
|
@@ -27323,7 +27869,7 @@ const $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
27323
27869
|
});
|
|
27324
27870
|
delete DOMProps.id;
|
|
27325
27871
|
delete DOMProps.onClick;
|
|
27326
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
27872
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).label, {
|
|
27327
27873
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, labelProps, hoverProps, renderProps),
|
|
27328
27874
|
ref: ref,
|
|
27329
27875
|
"data-selected": isSelected || undefined,
|
|
@@ -27540,7 +28086,7 @@ function $82d7e5349645de74$var$SelectInner({ props: props, selectRef: ref, colle
|
|
|
27540
28086
|
validation
|
|
27541
28087
|
]
|
|
27542
28088
|
]
|
|
27543
|
-
}, /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28089
|
+
}, /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27544
28090
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, focusProps),
|
|
27545
28091
|
ref: ref,
|
|
27546
28092
|
slot: props.slot || undefined,
|
|
@@ -27632,7 +28178,7 @@ const $82d7e5349645de74$export$e288731fd71264f0 = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
27632
28178
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27633
28179
|
global: true
|
|
27634
28180
|
});
|
|
27635
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28181
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).span, {
|
|
27636
28182
|
ref: ref,
|
|
27637
28183
|
...DOMProps,
|
|
27638
28184
|
...renderProps,
|
|
@@ -27693,7 +28239,7 @@ const $8e59e948500a8fe1$export$b5d5cf8927ab7262 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
27693
28239
|
});
|
|
27694
28240
|
delete DOMProps.id;
|
|
27695
28241
|
delete DOMProps.onClick;
|
|
27696
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28242
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).label, {
|
|
27697
28243
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, labelProps, hoverProps, renderProps),
|
|
27698
28244
|
ref: ref,
|
|
27699
28245
|
slot: props.slot || undefined,
|
|
@@ -27778,7 +28324,8 @@ function $eaf9e70818b436db$var$TagGroupInner({ props: props, forwardedRef: ref,
|
|
|
27778
28324
|
label: label
|
|
27779
28325
|
}, filteredState, tagListRef);
|
|
27780
28326
|
var _props_className;
|
|
27781
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28327
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28328
|
+
render: props.render,
|
|
27782
28329
|
...domProps,
|
|
27783
28330
|
id: id,
|
|
27784
28331
|
ref: ref,
|
|
@@ -27837,8 +28384,8 @@ function $eaf9e70818b436db$var$TagListInner({ props: props, forwardedRef: forwar
|
|
|
27837
28384
|
state: state
|
|
27838
28385
|
};
|
|
27839
28386
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
27840
|
-
|
|
27841
|
-
|
|
28387
|
+
...props,
|
|
28388
|
+
children: undefined,
|
|
27842
28389
|
defaultClassName: 'react-aria-TagList',
|
|
27843
28390
|
values: renderValues
|
|
27844
28391
|
});
|
|
@@ -27846,7 +28393,7 @@ function $eaf9e70818b436db$var$TagListInner({ props: props, forwardedRef: forwar
|
|
|
27846
28393
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
27847
28394
|
global: true
|
|
27848
28395
|
});
|
|
27849
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28396
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27850
28397
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, gridProps, focusProps),
|
|
27851
28398
|
ref: ref,
|
|
27852
28399
|
"data-empty": state.collection.size === 0 || undefined,
|
|
@@ -27895,7 +28442,7 @@ const $eaf9e70818b436db$export$3288d34c523a1192 = /*#__PURE__*/ ($e1995378a14296
|
|
|
27895
28442
|
});
|
|
27896
28443
|
delete DOMProps.id;
|
|
27897
28444
|
delete DOMProps.onClick;
|
|
27898
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28445
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
27899
28446
|
ref: ref,
|
|
27900
28447
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, rowProps, focusProps, hoverProps),
|
|
27901
28448
|
"data-selected": states.isSelected || undefined,
|
|
@@ -27960,7 +28507,7 @@ const $216918bed6669f72$export$f5c9f3c2c4054eec = /*#__PURE__*/ (forwardRef)(fun
|
|
|
27960
28507
|
},
|
|
27961
28508
|
defaultClassName: 'react-aria-TextArea'
|
|
27962
28509
|
});
|
|
27963
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28510
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).textarea, {
|
|
27964
28511
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)($216918bed6669f72$var$filterHoverProps(props), focusProps, hoverProps),
|
|
27965
28512
|
...renderProps,
|
|
27966
28513
|
ref: ref,
|
|
@@ -28033,7 +28580,7 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /*#__PURE__*/ ($f39a9eba43920a
|
|
|
28033
28580
|
global: true
|
|
28034
28581
|
});
|
|
28035
28582
|
delete DOMProps.id;
|
|
28036
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28583
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28037
28584
|
...DOMProps,
|
|
28038
28585
|
...renderProps,
|
|
28039
28586
|
ref: ref,
|
|
@@ -28124,7 +28671,7 @@ const $84b7d8702d4ff4a8$export$40258cc1d95ff477 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
28124
28671
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
28125
28672
|
global: true
|
|
28126
28673
|
});
|
|
28127
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28674
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28128
28675
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, groupProps),
|
|
28129
28676
|
ref: ref,
|
|
28130
28677
|
slot: props.slot || undefined,
|
|
@@ -28170,7 +28717,10 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
28170
28717
|
id: props.id != null ? String(props.id) : undefined
|
|
28171
28718
|
}, state, ref);
|
|
28172
28719
|
let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = ($f7dceffc5ad7768b$export$4e328f61c538687f)(props);
|
|
28173
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)(
|
|
28720
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = ($6179b936705e76d3$export$ae780daf29e6d456)({
|
|
28721
|
+
...props,
|
|
28722
|
+
isDisabled: isDisabled
|
|
28723
|
+
});
|
|
28174
28724
|
let renderProps = ($64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
28175
28725
|
...props,
|
|
28176
28726
|
id: undefined,
|
|
@@ -28190,7 +28740,7 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /*#__PURE__*/ (forwardRef)(fun
|
|
|
28190
28740
|
});
|
|
28191
28741
|
delete DOMProps.id;
|
|
28192
28742
|
delete DOMProps.onClick;
|
|
28193
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28743
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).button, {
|
|
28194
28744
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
|
|
28195
28745
|
ref: ref,
|
|
28196
28746
|
slot: props.slot || undefined,
|
|
@@ -28296,7 +28846,7 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
28296
28846
|
let DOMProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props, {
|
|
28297
28847
|
global: true
|
|
28298
28848
|
});
|
|
28299
|
-
return /*#__PURE__*/ ($dbSRa$react).createElement(
|
|
28849
|
+
return /*#__PURE__*/ ($dbSRa$react).createElement(($64fa3d84918910a7$export$df3a06d6289f983e).div, {
|
|
28300
28850
|
...($3ef42575df84b30b$export$9d1611c77c2fe928)(DOMProps, renderProps, tooltipProps),
|
|
28301
28851
|
ref: props.tooltipRef,
|
|
28302
28852
|
style: {
|