@bcgov/design-system-react-components 0.8.1-pr942 → 0.8.1-pr943
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +559 -272
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +559 -272
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -732,7 +732,7 @@ function $23f2114a1b82827e$export$4282f70798064fe0(node, otherNode) {
|
|
|
732
732
|
if (!($6a20a7989e6c817a$export$98658e8c59125e6a)()) return otherNode && node ? node.contains(otherNode) : false;
|
|
733
733
|
if (!node || !otherNode) return false;
|
|
734
734
|
let currentNode = otherNode;
|
|
735
|
-
while(currentNode
|
|
735
|
+
while(currentNode != null){
|
|
736
736
|
if (currentNode === node) return true;
|
|
737
737
|
if (typeof currentNode.assignedElements !== 'function' && currentNode.assignedSlot?.parentNode) // Element is slotted
|
|
738
738
|
currentNode = currentNode.assignedSlot.parentNode;
|
|
@@ -835,57 +835,9 @@ function $b72f3f7b3b5f42c6$export$759df0d867455a91(document) {
|
|
|
835
835
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
836
836
|
* governing permissions and limitations under the License.
|
|
837
837
|
*/ function $1969ac565cfec8d0$export$de79e2c695e052f3(element) {
|
|
838
|
-
|
|
838
|
+
element.focus({
|
|
839
839
|
preventScroll: true
|
|
840
840
|
});
|
|
841
|
-
else {
|
|
842
|
-
let scrollableElements = $1969ac565cfec8d0$var$getScrollableElements(element);
|
|
843
|
-
element.focus();
|
|
844
|
-
$1969ac565cfec8d0$var$restoreScrollPosition(scrollableElements);
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
let $1969ac565cfec8d0$var$supportsPreventScrollCached = null;
|
|
848
|
-
function $1969ac565cfec8d0$var$supportsPreventScroll() {
|
|
849
|
-
if ($1969ac565cfec8d0$var$supportsPreventScrollCached == null) {
|
|
850
|
-
$1969ac565cfec8d0$var$supportsPreventScrollCached = false;
|
|
851
|
-
try {
|
|
852
|
-
let focusElem = document.createElement('div');
|
|
853
|
-
focusElem.focus({
|
|
854
|
-
get preventScroll () {
|
|
855
|
-
$1969ac565cfec8d0$var$supportsPreventScrollCached = true;
|
|
856
|
-
return true;
|
|
857
|
-
}
|
|
858
|
-
});
|
|
859
|
-
} catch {
|
|
860
|
-
// Ignore
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
return $1969ac565cfec8d0$var$supportsPreventScrollCached;
|
|
864
|
-
}
|
|
865
|
-
function $1969ac565cfec8d0$var$getScrollableElements(element) {
|
|
866
|
-
let parent = element.parentNode;
|
|
867
|
-
let scrollableElements = [];
|
|
868
|
-
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
869
|
-
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
870
|
-
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
871
|
-
element: parent,
|
|
872
|
-
scrollTop: parent.scrollTop,
|
|
873
|
-
scrollLeft: parent.scrollLeft
|
|
874
|
-
});
|
|
875
|
-
parent = parent.parentNode;
|
|
876
|
-
}
|
|
877
|
-
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
|
|
878
|
-
element: rootScrollingElement,
|
|
879
|
-
scrollTop: rootScrollingElement.scrollTop,
|
|
880
|
-
scrollLeft: rootScrollingElement.scrollLeft
|
|
881
|
-
});
|
|
882
|
-
return scrollableElements;
|
|
883
|
-
}
|
|
884
|
-
function $1969ac565cfec8d0$var$restoreScrollPosition(scrollableElements) {
|
|
885
|
-
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
|
|
886
|
-
element.scrollTop = scrollTop;
|
|
887
|
-
element.scrollLeft = scrollLeft;
|
|
888
|
-
}
|
|
889
841
|
}
|
|
890
842
|
|
|
891
843
|
/*
|
|
@@ -1082,10 +1034,10 @@ function $a92dc41f639950be$export$cabe61c495ee3649(target) {
|
|
|
1082
1034
|
let root = targetRoot != null && ($d447af545b77c9f1$export$af51f0f06c0f328a)(targetRoot) ? targetRoot : ($d447af545b77c9f1$export$f21a1ffae260145a)(target);
|
|
1083
1035
|
// Focus is "moving to target" when it moves to the button or to a descendant of the button
|
|
1084
1036
|
// (e.g. SVG icon)
|
|
1085
|
-
let isFocusMovingToTarget = (focusTarget)=>focusTarget === target || focusTarget
|
|
1037
|
+
let isFocusMovingToTarget = (focusTarget)=>focusTarget === target || ($d447af545b77c9f1$export$8ee0fc9ee280b4ee)(focusTarget) && ($23f2114a1b82827e$export$4282f70798064fe0)(target, focusTarget);
|
|
1086
1038
|
// Blur/focusout events have their target as the element losing focus. Stop propagation when
|
|
1087
1039
|
// that is the previously focused element (activeElement) or a descendant (e.g. in shadow DOM).
|
|
1088
|
-
let isBlurFromActiveElement = (eventTarget)=>eventTarget === activeElement || activeElement != null && eventTarget
|
|
1040
|
+
let isBlurFromActiveElement = (eventTarget)=>eventTarget === activeElement || activeElement != null && ($d447af545b77c9f1$export$8ee0fc9ee280b4ee)(eventTarget) && ($23f2114a1b82827e$export$4282f70798064fe0)(activeElement, eventTarget);
|
|
1089
1041
|
$a92dc41f639950be$export$fda7da73ab5d4c48 = true;
|
|
1090
1042
|
let isRefocusing = false;
|
|
1091
1043
|
let onBlur = (e)=>{
|
|
@@ -1252,14 +1204,6 @@ function $caaf0dd3060ed57c$export$efa8c9099e530235(link, modifiers) {
|
|
|
1252
1204
|
}
|
|
1253
1205
|
function $caaf0dd3060ed57c$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
|
|
1254
1206
|
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
|
|
1255
|
-
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
|
|
1256
|
-
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
1257
|
-
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
1258
|
-
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
1259
|
-
if (!($2add3ce32c6007eb$export$78551043582a6a98)() && ($2add3ce32c6007eb$export$b7d78993b74f766d)() && window.event?.type?.startsWith('key') && target.target === '_blank') {
|
|
1260
|
-
if (($2add3ce32c6007eb$export$9ac100e40613ea10)()) metaKey = true;
|
|
1261
|
-
else ctrlKey = true;
|
|
1262
|
-
}
|
|
1263
1207
|
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
1264
1208
|
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
1265
1209
|
let event = ($2add3ce32c6007eb$export$78551043582a6a98)() && ($2add3ce32c6007eb$export$9ac100e40613ea10)() && !($2add3ce32c6007eb$export$7bef049ce92e4224)() && process.env.NODE_ENV !== 'test' ? new KeyboardEvent('keydown', {
|
|
@@ -1439,6 +1383,15 @@ function $8f5a2122b0992be3$var$handleWindowBlur() {
|
|
|
1439
1383
|
$8f5a2122b0992be3$var$hasEventBeforeFocus = false;
|
|
1440
1384
|
$8f5a2122b0992be3$var$hasBlurredWindowRecently = true;
|
|
1441
1385
|
}
|
|
1386
|
+
function $8f5a2122b0992be3$var$handleInvalidEvent(e) {
|
|
1387
|
+
let startingActiveElement = ($23f2114a1b82827e$export$cd4e5573fbe2b576)(($d447af545b77c9f1$export$b204af158042fbac)(($23f2114a1b82827e$export$e58f029f0fbfdb29)(e)));
|
|
1388
|
+
queueMicrotask(()=>{
|
|
1389
|
+
// If focus was moved to a different element after the form became invalid,
|
|
1390
|
+
// then it was likely a forms library that moved focus to the first invalid field.
|
|
1391
|
+
// In this case, we want to set the modality to keyboard.
|
|
1392
|
+
if (($23f2114a1b82827e$export$cd4e5573fbe2b576)(($d447af545b77c9f1$export$b204af158042fbac)(($23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) !== startingActiveElement) $8f5a2122b0992be3$export$8397ddfc504fdb9a('keyboard');
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1442
1395
|
/**
|
|
1443
1396
|
* Setup global event listeners to control when keyboard focus style should be visible.
|
|
1444
1397
|
*/ function $8f5a2122b0992be3$var$setupGlobalFocusEvents(element) {
|
|
@@ -1466,6 +1419,7 @@ function $8f5a2122b0992be3$var$handleWindowBlur() {
|
|
|
1466
1419
|
documentObject.addEventListener('keydown', $8f5a2122b0992be3$var$handleKeyboardEvent, true);
|
|
1467
1420
|
documentObject.addEventListener('keyup', $8f5a2122b0992be3$var$handleKeyboardEvent, true);
|
|
1468
1421
|
documentObject.addEventListener('click', $8f5a2122b0992be3$var$handleClickEvent, true);
|
|
1422
|
+
documentObject.addEventListener('invalid', $8f5a2122b0992be3$var$handleInvalidEvent, true);
|
|
1469
1423
|
// Register focus events on the window so they are sure to happen
|
|
1470
1424
|
// before React's event listeners (registered on the document).
|
|
1471
1425
|
windowObject.addEventListener('focus', $8f5a2122b0992be3$var$handleFocusEvent, true);
|
|
@@ -1502,6 +1456,7 @@ const $8f5a2122b0992be3$var$tearDownWindowFocusTracking = (element, loadListener
|
|
|
1502
1456
|
documentObject.removeEventListener('keydown', $8f5a2122b0992be3$var$handleKeyboardEvent, true);
|
|
1503
1457
|
documentObject.removeEventListener('keyup', $8f5a2122b0992be3$var$handleKeyboardEvent, true);
|
|
1504
1458
|
documentObject.removeEventListener('click', $8f5a2122b0992be3$var$handleClickEvent, true);
|
|
1459
|
+
documentObject.removeEventListener('invalid', $8f5a2122b0992be3$var$handleInvalidEvent, true);
|
|
1505
1460
|
windowObject.removeEventListener('focus', $8f5a2122b0992be3$var$handleFocusEvent, true);
|
|
1506
1461
|
windowObject.removeEventListener('blur', $8f5a2122b0992be3$var$handleWindowBlur, false);
|
|
1507
1462
|
if (typeof PointerEvent !== 'undefined') {
|
|
@@ -1600,7 +1555,7 @@ function $8f5a2122b0992be3$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
1600
1555
|
}
|
|
1601
1556
|
|
|
1602
1557
|
/*
|
|
1603
|
-
* Copyright
|
|
1558
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
1604
1559
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1605
1560
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1606
1561
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -1610,10 +1565,50 @@ function $8f5a2122b0992be3$export$ec71b4b83ac08ec3(fn, deps, opts) {
|
|
|
1610
1565
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1611
1566
|
* governing permissions and limitations under the License.
|
|
1612
1567
|
*/
|
|
1613
|
-
function $
|
|
1614
|
-
|
|
1615
|
-
|
|
1568
|
+
function $7096878c21af5e66$export$a929f3f93e2cc67e(key, doc) {
|
|
1569
|
+
let ownerWindow = ($d447af545b77c9f1$export$f21a1ffae260145a)(doc);
|
|
1570
|
+
let ownerDocument = ($d447af545b77c9f1$export$b204af158042fbac)(doc);
|
|
1571
|
+
if (ownerDocument == null || ownerWindow == null) return;
|
|
1572
|
+
let content = undefined;
|
|
1573
|
+
let selector = `meta[name="${CSS.escape(key)}"], meta[property="${CSS.escape(key)}"]`;
|
|
1574
|
+
let meta = ownerDocument.querySelector(selector);
|
|
1575
|
+
if (meta && meta instanceof ownerWindow.HTMLMetaElement) {
|
|
1576
|
+
if (key === 'csp-nonce' && meta.nonce) content ??= meta.nonce || undefined;
|
|
1577
|
+
if (meta.content) content ??= meta.content || undefined;
|
|
1578
|
+
}
|
|
1579
|
+
if (key === 'csp-nonce') content ??= ownerWindow.__webpack_nonce__ || globalThis.__webpack_nonce__ || undefined;
|
|
1580
|
+
return content;
|
|
1616
1581
|
}
|
|
1582
|
+
|
|
1583
|
+
/*
|
|
1584
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
1585
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1586
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1587
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1588
|
+
*
|
|
1589
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1590
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1591
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1592
|
+
* governing permissions and limitations under the License.
|
|
1593
|
+
*/
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
const $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT = 100;
|
|
1599
|
+
const $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT = 600;
|
|
1600
|
+
// Tracks layout state of the on-screen keyboard.
|
|
1601
|
+
const $bb39c0fc1c19b34c$var$state = {
|
|
1602
|
+
isOpen: false,
|
|
1603
|
+
screenWidth: 0,
|
|
1604
|
+
screenHeight: 0,
|
|
1605
|
+
screenAngle: 0,
|
|
1606
|
+
screenTimeout: 0,
|
|
1607
|
+
startTimeStamp: 0,
|
|
1608
|
+
endTimeStamp: 0,
|
|
1609
|
+
resizeTimeStamp: 0,
|
|
1610
|
+
resizeTimeout: 0
|
|
1611
|
+
};
|
|
1617
1612
|
// HTML input types that do not cause the software keyboard to appear.
|
|
1618
1613
|
const $bb39c0fc1c19b34c$var$nonTextInputTypes = new Set([
|
|
1619
1614
|
'checkbox',
|
|
@@ -1626,8 +1621,181 @@ const $bb39c0fc1c19b34c$var$nonTextInputTypes = new Set([
|
|
|
1626
1621
|
'submit',
|
|
1627
1622
|
'reset'
|
|
1628
1623
|
]);
|
|
1624
|
+
if (process.env.NODE_ENV === 'test' && typeof window !== 'undefined' && !Reflect.has(window, 'visualViewport')) {
|
|
1625
|
+
const visualViewport = Object.assign(new EventTarget(), {
|
|
1626
|
+
offsetTop: 0,
|
|
1627
|
+
offsetLeft: 0,
|
|
1628
|
+
pageTop: 0,
|
|
1629
|
+
pageLeft: 0,
|
|
1630
|
+
scale: 1
|
|
1631
|
+
});
|
|
1632
|
+
Reflect.defineProperty(visualViewport, 'width', {
|
|
1633
|
+
get: ()=>window.innerWidth,
|
|
1634
|
+
configurable: true
|
|
1635
|
+
});
|
|
1636
|
+
Reflect.defineProperty(visualViewport, 'height', {
|
|
1637
|
+
get: ()=>window.innerHeight,
|
|
1638
|
+
configurable: true
|
|
1639
|
+
});
|
|
1640
|
+
Reflect.defineProperty(window, 'visualViewport', {
|
|
1641
|
+
value: visualViewport,
|
|
1642
|
+
configurable: true,
|
|
1643
|
+
writable: true
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
if (process.env.NODE_ENV === 'test' && typeof window !== 'undefined' && !Reflect.has(window.screen, 'orientation')) {
|
|
1647
|
+
const orientation = Object.assign(new EventTarget(), {
|
|
1648
|
+
type: 'landscape-primary'
|
|
1649
|
+
});
|
|
1650
|
+
Reflect.defineProperty(window.screen, 'orientation', {
|
|
1651
|
+
value: orientation,
|
|
1652
|
+
configurable: true,
|
|
1653
|
+
writable: true
|
|
1654
|
+
});
|
|
1655
|
+
Reflect.defineProperty(window.screen.orientation, 'angle', {
|
|
1656
|
+
get: ()=>window.orientation ?? 0,
|
|
1657
|
+
configurable: true
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
function $bb39c0fc1c19b34c$var$getTouchScreen() {
|
|
1661
|
+
// Normalize the screen by any scaling to get the layout coordinate space.
|
|
1662
|
+
let screenWidth = Number(window.visualViewport?.width ?? window.innerWidth);
|
|
1663
|
+
let screenHeight = Number(window.visualViewport?.height ?? window.innerHeight);
|
|
1664
|
+
let visualScale = Number(window.visualViewport?.scale ?? 1);
|
|
1665
|
+
return {
|
|
1666
|
+
width: screenWidth * visualScale,
|
|
1667
|
+
height: screenHeight * visualScale,
|
|
1668
|
+
angle: window.screen.orientation?.angle ?? 0
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
function $bb39c0fc1c19b34c$var$onResizeStart(e) {
|
|
1672
|
+
// So we don't constantly call clearTimeout and setTimeout, keep track of the
|
|
1673
|
+
// current timeout time and only reschedule the timer when it is getting close.
|
|
1674
|
+
if ($bb39c0fc1c19b34c$var$state.resizeTimeStamp <= e.timeStamp + 50) {
|
|
1675
|
+
$bb39c0fc1c19b34c$var$state.resizeTimeStamp = e.timeStamp + 150;
|
|
1676
|
+
window.clearTimeout($bb39c0fc1c19b34c$var$state.resizeTimeout);
|
|
1677
|
+
$bb39c0fc1c19b34c$var$state.resizeTimeout = window.setTimeout($bb39c0fc1c19b34c$var$onResizeEnd, 150);
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
function $bb39c0fc1c19b34c$var$onResizeEnd() {
|
|
1681
|
+
let viewportMeta = ($7096878c21af5e66$export$a929f3f93e2cc67e)('viewport');
|
|
1682
|
+
// Overlaying keyboards do not impact geometry, so there is nothing to measure.
|
|
1683
|
+
// https://caniuse.com/mdn-html_elements_meta_name_viewport_interactive-widget
|
|
1684
|
+
if (($2add3ce32c6007eb$export$a11b0059900ceec8)() && viewportMeta?.includes('overlays-content')) return;
|
|
1685
|
+
let time = performance.now();
|
|
1686
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
1687
|
+
let elapsed = time - $bb39c0fc1c19b34c$var$state.startTimeStamp;
|
|
1688
|
+
let delta = $bb39c0fc1c19b34c$var$state.screenHeight - screen.height;
|
|
1689
|
+
let rotation = $bb39c0fc1c19b34c$var$state.screenAngle - screen.angle;
|
|
1690
|
+
// Update the screen once an open keyboard that rotated along closes. The state swap was
|
|
1691
|
+
// deferred, so the old width predicts the height it should close towards.
|
|
1692
|
+
if (Math.abs(rotation) % 180 && $bb39c0fc1c19b34c$var$state.screenWidth - screen.height < $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT) {
|
|
1693
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
1694
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
1695
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
1696
|
+
delta = 0;
|
|
1697
|
+
}
|
|
1698
|
+
// Update the screen if a resize happens outside the capture timeframe. We debounce
|
|
1699
|
+
// because WebKit may fire its single opening resize before the focus event.
|
|
1700
|
+
if (elapsed > $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT) {
|
|
1701
|
+
window.clearTimeout($bb39c0fc1c19b34c$var$state.screenTimeout);
|
|
1702
|
+
$bb39c0fc1c19b34c$var$state.screenTimeout = window.setTimeout(()=>{
|
|
1703
|
+
let activeElement = document.hasFocus() ? ($23f2114a1b82827e$export$cd4e5573fbe2b576)() : null;
|
|
1704
|
+
let willKeyboardOpen = $bb39c0fc1c19b34c$export$c57958e35f31ed73(activeElement);
|
|
1705
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
1706
|
+
if (Math.abs($bb39c0fc1c19b34c$var$state.screenAngle - screen.angle) % 180) return;
|
|
1707
|
+
if ($bb39c0fc1c19b34c$var$state.isOpen && willKeyboardOpen) return;
|
|
1708
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
1709
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
1710
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
1711
|
+
$bb39c0fc1c19b34c$var$state.isOpen = false;
|
|
1712
|
+
}, $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT);
|
|
1713
|
+
}
|
|
1714
|
+
// Otherwise, record an opening if the height changed by more than our threshold.
|
|
1715
|
+
// This may fail if the layout viewport changes for other reasons during this timeframe.
|
|
1716
|
+
if (elapsed <= $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT && delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT) $bb39c0fc1c19b34c$var$state.endTimeStamp = time;
|
|
1717
|
+
// Store the new open state since the viewport is stable when this is reached.
|
|
1718
|
+
$bb39c0fc1c19b34c$var$state.isOpen = delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT;
|
|
1719
|
+
}
|
|
1720
|
+
function $bb39c0fc1c19b34c$var$onOrientationChange() {
|
|
1721
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
1722
|
+
let rotation = $bb39c0fc1c19b34c$var$state.screenAngle - screen.angle;
|
|
1723
|
+
// Rotation may cause the resize buffer to be filled, but we need to make sure a screen
|
|
1724
|
+
// estimate is already available in case focus lands before it expires. This could fail
|
|
1725
|
+
// if a top bar exceeds the keyboard threshold, in which case we may need to revisit.
|
|
1726
|
+
if (Math.abs(rotation) % 180 && !$bb39c0fc1c19b34c$var$state.isOpen) {
|
|
1727
|
+
let width = $bb39c0fc1c19b34c$var$state.screenWidth;
|
|
1728
|
+
let height = $bb39c0fc1c19b34c$var$state.screenHeight;
|
|
1729
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = height;
|
|
1730
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = width;
|
|
1731
|
+
}
|
|
1732
|
+
if (!$bb39c0fc1c19b34c$var$state.isOpen) $bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
1733
|
+
}
|
|
1734
|
+
function $bb39c0fc1c19b34c$var$onFocus(e) {
|
|
1735
|
+
let target = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
1736
|
+
let willKeyboardOpen = $bb39c0fc1c19b34c$export$c57958e35f31ed73(target);
|
|
1737
|
+
let time = performance.now();
|
|
1738
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
1739
|
+
let delta = $bb39c0fc1c19b34c$var$state.screenHeight - screen.height;
|
|
1740
|
+
// Update the screen and start the timer if we are about to open.
|
|
1741
|
+
if (delta < $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT && willKeyboardOpen) {
|
|
1742
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
1743
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
1744
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
1745
|
+
$bb39c0fc1c19b34c$var$state.startTimeStamp = time;
|
|
1746
|
+
}
|
|
1747
|
+
// This focus will open a keyboard so reset the buffer.
|
|
1748
|
+
if (willKeyboardOpen) window.clearTimeout($bb39c0fc1c19b34c$var$state.screenTimeout);
|
|
1749
|
+
// Stop the timer if the keyboard is already open.
|
|
1750
|
+
if (delta >= $bb39c0fc1c19b34c$var$KEYBOARD_HEIGHT && willKeyboardOpen) $bb39c0fc1c19b34c$var$state.endTimeStamp = time;
|
|
1751
|
+
}
|
|
1752
|
+
function $bb39c0fc1c19b34c$var$setupGlobalEvents() {
|
|
1753
|
+
let screen = $bb39c0fc1c19b34c$var$getTouchScreen();
|
|
1754
|
+
// WebKit only fires a single event per resize.
|
|
1755
|
+
($d447af545b77c9f1$export$f531f92e2a15358f)(window.visualViewport, 'resize', ($2add3ce32c6007eb$export$78551043582a6a98)() ? $bb39c0fc1c19b34c$var$onResizeEnd : $bb39c0fc1c19b34c$var$onResizeStart);
|
|
1756
|
+
// oxlint-disable-next-line - looks like the lint for this is a little too aggressive
|
|
1757
|
+
($d447af545b77c9f1$export$f531f92e2a15358f)(window.screen.orientation, 'change', $bb39c0fc1c19b34c$var$onOrientationChange);
|
|
1758
|
+
($d447af545b77c9f1$export$f531f92e2a15358f)(window, 'focus', $bb39c0fc1c19b34c$var$onFocus, {
|
|
1759
|
+
capture: true,
|
|
1760
|
+
passive: true
|
|
1761
|
+
});
|
|
1762
|
+
// Store the initial screen dimensions.
|
|
1763
|
+
$bb39c0fc1c19b34c$var$state.screenWidth = screen.width;
|
|
1764
|
+
$bb39c0fc1c19b34c$var$state.screenHeight = screen.height;
|
|
1765
|
+
$bb39c0fc1c19b34c$var$state.screenAngle = screen.angle;
|
|
1766
|
+
}
|
|
1767
|
+
if (typeof document !== 'undefined') {
|
|
1768
|
+
if (document.readyState !== 'loading') $bb39c0fc1c19b34c$var$setupGlobalEvents();
|
|
1769
|
+
else ($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'DOMContentLoaded', $bb39c0fc1c19b34c$var$setupGlobalEvents);
|
|
1770
|
+
}
|
|
1771
|
+
function $bb39c0fc1c19b34c$export$a986ed8aea890397() {
|
|
1772
|
+
let viewportMeta = ($7096878c21af5e66$export$a929f3f93e2cc67e)('viewport');
|
|
1773
|
+
// Overlaying keyboards do not impact geometry, so there is nothing to await.
|
|
1774
|
+
// https://caniuse.com/mdn-html_elements_meta_name_viewport_interactive-widget
|
|
1775
|
+
if (($2add3ce32c6007eb$export$a11b0059900ceec8)() && viewportMeta?.includes('overlays-content')) return false;
|
|
1776
|
+
// WebKit may resize before focus, but an open keyboard always means we have support.
|
|
1777
|
+
if ($bb39c0fc1c19b34c$var$state.isOpen) return true;
|
|
1778
|
+
// As long as no input has ever been focused, we return default support.
|
|
1779
|
+
if (!$bb39c0fc1c19b34c$var$state.startTimeStamp) return window.navigator.maxTouchPoints > 0;
|
|
1780
|
+
// If keyboard geometry changed within the timeout period, we have support.
|
|
1781
|
+
if ($bb39c0fc1c19b34c$var$state.endTimeStamp >= $bb39c0fc1c19b34c$var$state.startTimeStamp) return true;
|
|
1782
|
+
// If a geometry change is mid-flight we return the most recent support.
|
|
1783
|
+
// Supported platforms may have a hardware keyboard, which this won't catch, but thats
|
|
1784
|
+
// about as far as we can reasonably go to exclude non-touch devices.
|
|
1785
|
+
return performance.now() - $bb39c0fc1c19b34c$var$state.startTimeStamp <= $bb39c0fc1c19b34c$var$KEYBOARD_TIMEOUT ? $bb39c0fc1c19b34c$var$state.endTimeStamp > 0 || window.navigator.maxTouchPoints > 0 : false;
|
|
1786
|
+
}
|
|
1629
1787
|
function $bb39c0fc1c19b34c$export$c57958e35f31ed73(target) {
|
|
1630
|
-
|
|
1788
|
+
if (!(target instanceof Element) || !($3b8b240c1bf84ab9$export$4c063cf1350e6fed)(target)) return false;
|
|
1789
|
+
let isTextArea = target instanceof HTMLTextAreaElement;
|
|
1790
|
+
let isEditable = target instanceof HTMLElement && target.isContentEditable;
|
|
1791
|
+
let isTextInput = target instanceof HTMLInputElement && !$bb39c0fc1c19b34c$var$nonTextInputTypes.has(target.type);
|
|
1792
|
+
return isTextArea || isEditable || isTextInput;
|
|
1793
|
+
}
|
|
1794
|
+
function $bb39c0fc1c19b34c$export$16792effe837dba3(event) {
|
|
1795
|
+
return ($2add3ce32c6007eb$export$9ac100e40613ea10)() ? event.metaKey : event.ctrlKey;
|
|
1796
|
+
}
|
|
1797
|
+
function $bb39c0fc1c19b34c$export$b1f1c83775b8b5f7() {
|
|
1798
|
+
return $bb39c0fc1c19b34c$var$state.isOpen;
|
|
1631
1799
|
}
|
|
1632
1800
|
|
|
1633
1801
|
/*
|
|
@@ -2076,7 +2244,7 @@ function $cf2482eff2eeeec2$export$f12b703ca79dfbb1(strings, packageName) {
|
|
|
2076
2244
|
* governing permissions and limitations under the License.
|
|
2077
2245
|
*/
|
|
2078
2246
|
// Use the earliest effect possible to reset the ref below.
|
|
2079
|
-
const $3e6197669829fe11$var$useEarlyEffect = typeof document !== 'undefined' ? ($8WNJc$react)['useInsertionEffect'] ?? ($8WNJc$react).useLayoutEffect : ()=>{};
|
|
2247
|
+
const $3e6197669829fe11$var$useEarlyEffect = typeof document !== 'undefined' || parseInt(($8WNJc$react).version, 10) >= 19 ? ($8WNJc$react)['useInsertionEffect'] ?? ($8WNJc$react).useLayoutEffect : ()=>{};
|
|
2080
2248
|
function $3e6197669829fe11$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
|
2081
2249
|
// Store the value in both state and a ref. The state value will only be used when uncontrolled.
|
|
2082
2250
|
// The ref is used to track the most current value, which is passed to the function setState callback.
|
|
@@ -2643,7 +2811,7 @@ class $96ead35620b8fd36$export$b34a105447964f9f extends $96ead35620b8fd36$export
|
|
|
2643
2811
|
constructor(collection){
|
|
2644
2812
|
// @ts-ignore
|
|
2645
2813
|
super(null), this.nodeType = 11 // DOCUMENT_FRAGMENT_NODE
|
|
2646
|
-
, this.ownerDocument = this, this.dirtyNodes = new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = new WeakMap(), this.nextCollection = null, this.subscriptions = new Set(), this.queuedRender = false, this.inSubscription = false;
|
|
2814
|
+
, this.ownerDocument = this, this.dirtyNodes = new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = new WeakMap(), this.keyOwners = new Map(), this.nextCollection = null, this.subscriptions = new Set(), this.queuedRender = false, this.inSubscription = false;
|
|
2647
2815
|
this.collection = collection;
|
|
2648
2816
|
this.nextCollection = collection;
|
|
2649
2817
|
}
|
|
@@ -2662,6 +2830,16 @@ class $96ead35620b8fd36$export$b34a105447964f9f extends $96ead35620b8fd36$export
|
|
|
2662
2830
|
}
|
|
2663
2831
|
addNode(element) {
|
|
2664
2832
|
if (element.isHidden || element.node == null) return;
|
|
2833
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2834
|
+
// Two elements with the same key would corrupt the linked list of sibling keys, which
|
|
2835
|
+
// silently drops items or makes key traversal loop forever. Removed and hidden elements
|
|
2836
|
+
// release their key in removeNode before any node is added, so a different owner here
|
|
2837
|
+
// is a live duplicate.
|
|
2838
|
+
let key = element.node.key;
|
|
2839
|
+
let owner = this.keyOwners.get(key);
|
|
2840
|
+
if (owner && owner !== element) throw new Error(`Duplicate key "${String(key)}" found in collection. Every item in a collection must have a unique key.`);
|
|
2841
|
+
this.keyOwners.set(key, element);
|
|
2842
|
+
}
|
|
2665
2843
|
let collection = this.getMutableCollection();
|
|
2666
2844
|
if (!collection.getItem(element.node.key)) for (let child of element)this.addNode(child);
|
|
2667
2845
|
collection.addNode(element.node);
|
|
@@ -2671,6 +2849,7 @@ class $96ead35620b8fd36$export$b34a105447964f9f extends $96ead35620b8fd36$export
|
|
|
2671
2849
|
if (node.node) {
|
|
2672
2850
|
let collection = this.getMutableCollection();
|
|
2673
2851
|
collection.removeNode(node.node.key);
|
|
2852
|
+
if (process.env.NODE_ENV !== 'production' && this.keyOwners.get(node.node.key) === node) this.keyOwners.delete(node.node.key);
|
|
2674
2853
|
}
|
|
2675
2854
|
}
|
|
2676
2855
|
/** Finalizes the collection update, updating all nodes and freezing the collection. */ getCollection() {
|
|
@@ -2734,6 +2913,7 @@ class $96ead35620b8fd36$export$b34a105447964f9f extends $96ead35620b8fd36$export
|
|
|
2734
2913
|
this.firstChild = null;
|
|
2735
2914
|
this.lastChild = null;
|
|
2736
2915
|
this.nodeId = 0;
|
|
2916
|
+
this.keyOwners.clear();
|
|
2737
2917
|
}
|
|
2738
2918
|
}
|
|
2739
2919
|
}
|
|
@@ -2820,62 +3000,57 @@ function $a80bd3e9349588e7$var$isWeakKey(value) {
|
|
|
2820
3000
|
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
2821
3001
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
2822
3002
|
* governing permissions and limitations under the License.
|
|
2823
|
-
*/
|
|
3003
|
+
*/
|
|
3004
|
+
|
|
3005
|
+
// We store a global list of elements that are currently transitioning,
|
|
2824
3006
|
// mapped to a set of CSS properties that are transitioning for that element.
|
|
2825
3007
|
// This is necessary rather than a simple count of transitions because of browser
|
|
2826
3008
|
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
2827
3009
|
// than one or the other. So we need to track what's actually transitioning so that
|
|
2828
3010
|
// we can ignore these duplicate events.
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
3011
|
+
const $081cb5757e08788e$var$transitionsByElement = new Map();
|
|
3012
|
+
const $081cb5757e08788e$var$transitionCallbacks = new Set();
|
|
3013
|
+
function $081cb5757e08788e$var$isTransitionEvent(event) {
|
|
3014
|
+
return 'propertyName' in event;
|
|
3015
|
+
}
|
|
3016
|
+
function $081cb5757e08788e$var$onTransitionStart(e) {
|
|
3017
|
+
let eventTarget = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
3018
|
+
if (!$081cb5757e08788e$var$isTransitionEvent(e) || !eventTarget) return;
|
|
3019
|
+
// Add the transitioning property to the list for this element.
|
|
3020
|
+
let transitions = $081cb5757e08788e$var$transitionsByElement.get(eventTarget);
|
|
3021
|
+
if (!transitions) {
|
|
3022
|
+
transitions = new Set();
|
|
3023
|
+
$081cb5757e08788e$var$transitionsByElement.set(eventTarget, transitions);
|
|
3024
|
+
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
3025
|
+
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
3026
|
+
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
3027
|
+
eventTarget.addEventListener('transitioncancel', $081cb5757e08788e$var$onTransitionEnd, {
|
|
3028
|
+
once: true
|
|
3029
|
+
});
|
|
2837
3030
|
}
|
|
2838
|
-
|
|
2839
|
-
let eventTarget = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
2840
|
-
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
2841
|
-
// Add the transitioning property to the list for this element.
|
|
2842
|
-
let transitions = $081cb5757e08788e$var$transitionsByElement.get(eventTarget);
|
|
2843
|
-
if (!transitions) {
|
|
2844
|
-
transitions = new Set();
|
|
2845
|
-
$081cb5757e08788e$var$transitionsByElement.set(eventTarget, transitions);
|
|
2846
|
-
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
2847
|
-
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
2848
|
-
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
2849
|
-
eventTarget.addEventListener('transitioncancel', onTransitionEnd, {
|
|
2850
|
-
once: true
|
|
2851
|
-
});
|
|
2852
|
-
}
|
|
2853
|
-
transitions.add(e.propertyName);
|
|
2854
|
-
};
|
|
2855
|
-
let onTransitionEnd = (e)=>{
|
|
2856
|
-
let eventTarget = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
2857
|
-
if (!isTransitionEvent(e) || !eventTarget) return;
|
|
2858
|
-
// Remove property from list of transitioning properties.
|
|
2859
|
-
let properties = $081cb5757e08788e$var$transitionsByElement.get(eventTarget);
|
|
2860
|
-
if (!properties) return;
|
|
2861
|
-
properties.delete(e.propertyName);
|
|
2862
|
-
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
2863
|
-
if (properties.size === 0) {
|
|
2864
|
-
eventTarget.removeEventListener('transitioncancel', onTransitionEnd);
|
|
2865
|
-
$081cb5757e08788e$var$transitionsByElement.delete(eventTarget);
|
|
2866
|
-
}
|
|
2867
|
-
// If no transitioning elements, call all of the queued callbacks.
|
|
2868
|
-
if ($081cb5757e08788e$var$transitionsByElement.size === 0) {
|
|
2869
|
-
for (let cb of $081cb5757e08788e$var$transitionCallbacks)cb();
|
|
2870
|
-
$081cb5757e08788e$var$transitionCallbacks.clear();
|
|
2871
|
-
}
|
|
2872
|
-
};
|
|
2873
|
-
document.body.addEventListener('transitionrun', onTransitionStart);
|
|
2874
|
-
document.body.addEventListener('transitionend', onTransitionEnd);
|
|
3031
|
+
transitions.add(e.propertyName);
|
|
2875
3032
|
}
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
3033
|
+
function $081cb5757e08788e$var$onTransitionEnd(e) {
|
|
3034
|
+
let eventTarget = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
3035
|
+
if (!$081cb5757e08788e$var$isTransitionEvent(e) || !eventTarget) return;
|
|
3036
|
+
// Remove property from list of transitioning properties.
|
|
3037
|
+
let properties = $081cb5757e08788e$var$transitionsByElement.get(eventTarget);
|
|
3038
|
+
if (!properties) return;
|
|
3039
|
+
properties.delete(e.propertyName);
|
|
3040
|
+
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
3041
|
+
if (properties.size === 0) {
|
|
3042
|
+
eventTarget.removeEventListener('transitioncancel', $081cb5757e08788e$var$onTransitionEnd);
|
|
3043
|
+
$081cb5757e08788e$var$transitionsByElement.delete(eventTarget);
|
|
3044
|
+
}
|
|
3045
|
+
// If no transitioning elements, call all of the queued callbacks.
|
|
3046
|
+
if ($081cb5757e08788e$var$transitionsByElement.size === 0) for (let callback of $081cb5757e08788e$var$transitionCallbacks){
|
|
3047
|
+
callback(true);
|
|
3048
|
+
$081cb5757e08788e$var$transitionCallbacks.delete(callback);
|
|
3049
|
+
}
|
|
3050
|
+
}
|
|
3051
|
+
function $081cb5757e08788e$var$setupGlobalEvents() {
|
|
3052
|
+
($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'transitionrun', $081cb5757e08788e$var$onTransitionStart);
|
|
3053
|
+
($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'transitionend', $081cb5757e08788e$var$onTransitionEnd);
|
|
2879
3054
|
}
|
|
2880
3055
|
/**
|
|
2881
3056
|
* Cleans up any elements that are no longer in the document.
|
|
@@ -2886,15 +3061,23 @@ if (typeof document !== 'undefined') {
|
|
|
2886
3061
|
// the explicit instanceof check, since it may be different in different contexts.
|
|
2887
3062
|
if ('isConnected' in eventTarget && !eventTarget.isConnected) $081cb5757e08788e$var$transitionsByElement.delete(eventTarget);
|
|
2888
3063
|
}
|
|
3064
|
+
if (typeof document !== 'undefined') {
|
|
3065
|
+
if (document.readyState !== 'loading') $081cb5757e08788e$var$setupGlobalEvents();
|
|
3066
|
+
else ($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'DOMContentLoaded', $081cb5757e08788e$var$setupGlobalEvents);
|
|
3067
|
+
}
|
|
2889
3068
|
function $081cb5757e08788e$export$24490316f764c430(fn) {
|
|
2890
3069
|
// Wait one frame to see if an animation starts, e.g. a transition on mount.
|
|
2891
|
-
requestAnimationFrame(()=>{
|
|
3070
|
+
let frame = window.requestAnimationFrame(()=>{
|
|
2892
3071
|
$081cb5757e08788e$var$cleanupDetachedElements();
|
|
2893
3072
|
// If no transitions are running, call the function immediately.
|
|
2894
3073
|
// Otherwise, add it to a list of callbacks to run at the end of the animation.
|
|
2895
|
-
if ($081cb5757e08788e$var$transitionsByElement.size === 0) fn();
|
|
2896
|
-
|
|
3074
|
+
if ($081cb5757e08788e$var$transitionsByElement.size === 0) return fn(false);
|
|
3075
|
+
$081cb5757e08788e$var$transitionCallbacks.add(fn);
|
|
2897
3076
|
});
|
|
3077
|
+
return ()=>{
|
|
3078
|
+
window.cancelAnimationFrame(frame);
|
|
3079
|
+
$081cb5757e08788e$var$transitionCallbacks.delete(fn);
|
|
3080
|
+
};
|
|
2898
3081
|
}
|
|
2899
3082
|
|
|
2900
3083
|
/*
|
|
@@ -3906,7 +4089,8 @@ const $8e9d2fae0ecb9001$var$globalAttrs = new Set([
|
|
|
3906
4089
|
'lang',
|
|
3907
4090
|
'hidden',
|
|
3908
4091
|
'inert',
|
|
3909
|
-
'translate'
|
|
4092
|
+
'translate',
|
|
4093
|
+
'suppressHydrationWarning'
|
|
3910
4094
|
]);
|
|
3911
4095
|
const $8e9d2fae0ecb9001$var$globalEvents = new Set([
|
|
3912
4096
|
'onClick',
|
|
@@ -4020,32 +4204,6 @@ function $cbf007e418543821$export$b0d6fa1ab32e3295(target) {
|
|
|
4020
4204
|
}
|
|
4021
4205
|
}
|
|
4022
4206
|
|
|
4023
|
-
/*
|
|
4024
|
-
* Copyright 2026 Adobe. All rights reserved.
|
|
4025
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4026
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
4027
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4028
|
-
*
|
|
4029
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
4030
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
4031
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
4032
|
-
* governing permissions and limitations under the License.
|
|
4033
|
-
*/
|
|
4034
|
-
function $7096878c21af5e66$export$a929f3f93e2cc67e(key, doc) {
|
|
4035
|
-
let ownerWindow = ($d447af545b77c9f1$export$f21a1ffae260145a)(doc);
|
|
4036
|
-
let ownerDocument = ($d447af545b77c9f1$export$b204af158042fbac)(doc);
|
|
4037
|
-
if (ownerDocument == null || ownerWindow == null) return;
|
|
4038
|
-
let content = undefined;
|
|
4039
|
-
let selector = `meta[name="${CSS.escape(key)}"], meta[property="${CSS.escape(key)}"]`;
|
|
4040
|
-
let meta = ownerDocument.querySelector(selector);
|
|
4041
|
-
if (meta && meta instanceof ownerWindow.HTMLMetaElement) {
|
|
4042
|
-
if (key === 'csp-nonce' && meta.nonce) content ??= meta.nonce || undefined;
|
|
4043
|
-
if (meta.content) content ??= meta.content || undefined;
|
|
4044
|
-
}
|
|
4045
|
-
if (key === 'csp-nonce') content ??= ownerWindow.__webpack_nonce__ || globalThis.__webpack_nonce__ || undefined;
|
|
4046
|
-
return content;
|
|
4047
|
-
}
|
|
4048
|
-
|
|
4049
4207
|
/*
|
|
4050
4208
|
* Copyright 2026 Adobe. All rights reserved.
|
|
4051
4209
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -5332,27 +5490,6 @@ try {
|
|
|
5332
5490
|
}).resolvedOptions().signDisplay === 'exceptZero';
|
|
5333
5491
|
// eslint-disable-next-line no-empty
|
|
5334
5492
|
} catch {}
|
|
5335
|
-
let $1dfb119a85e764e5$var$supportsUnit = false;
|
|
5336
|
-
try {
|
|
5337
|
-
$1dfb119a85e764e5$var$supportsUnit = new Intl.NumberFormat('de-DE', {
|
|
5338
|
-
style: 'unit',
|
|
5339
|
-
unit: 'degree'
|
|
5340
|
-
}).resolvedOptions().style === 'unit';
|
|
5341
|
-
// eslint-disable-next-line no-empty
|
|
5342
|
-
} catch {}
|
|
5343
|
-
// Polyfill for units since Safari doesn't support them yet. See https://bugs.webkit.org/show_bug.cgi?id=215438.
|
|
5344
|
-
// Currently only polyfilling the unit degree in narrow format for ColorSlider in our supported locales.
|
|
5345
|
-
// Values were determined by switching to each locale manually in Chrome.
|
|
5346
|
-
const $1dfb119a85e764e5$var$UNITS = {
|
|
5347
|
-
degree: {
|
|
5348
|
-
narrow: {
|
|
5349
|
-
default: "\xb0",
|
|
5350
|
-
'ja-JP': " \u5EA6",
|
|
5351
|
-
'zh-TW': "\u5EA6",
|
|
5352
|
-
'sl-SI': " \xb0"
|
|
5353
|
-
}
|
|
5354
|
-
}
|
|
5355
|
-
};
|
|
5356
5493
|
class $1dfb119a85e764e5$export$cc77c4ff7e8673c5 {
|
|
5357
5494
|
constructor(locale, options = {}){
|
|
5358
5495
|
this.numberFormatter = $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options);
|
|
@@ -5365,12 +5502,6 @@ class $1dfb119a85e764e5$export$cc77c4ff7e8673c5 {
|
|
|
5365
5502
|
let res = '';
|
|
5366
5503
|
if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) res = $1dfb119a85e764e5$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
|
|
5367
5504
|
else res = this.numberFormatter.format(value);
|
|
5368
|
-
if (this.options.style === 'unit' && !$1dfb119a85e764e5$var$supportsUnit) {
|
|
5369
|
-
let { unit: unit, unitDisplay: unitDisplay = 'short', locale: locale } = this.resolvedOptions();
|
|
5370
|
-
if (!unit) return res;
|
|
5371
|
-
let values = $1dfb119a85e764e5$var$UNITS[unit]?.[unitDisplay];
|
|
5372
|
-
res += values[locale] || values.default;
|
|
5373
|
-
}
|
|
5374
5505
|
return res;
|
|
5375
5506
|
}
|
|
5376
5507
|
/** Formats a number to an array of parts such as separators, digits, punctuation, and more. */ formatToParts(value) {
|
|
@@ -5410,12 +5541,6 @@ class $1dfb119a85e764e5$export$cc77c4ff7e8673c5 {
|
|
|
5410
5541
|
...options,
|
|
5411
5542
|
signDisplay: this.options.signDisplay
|
|
5412
5543
|
};
|
|
5413
|
-
if (!$1dfb119a85e764e5$var$supportsUnit && this.options.style === 'unit') options = {
|
|
5414
|
-
...options,
|
|
5415
|
-
style: 'unit',
|
|
5416
|
-
unit: this.options.unit,
|
|
5417
|
-
unitDisplay: this.options.unitDisplay
|
|
5418
|
-
};
|
|
5419
5544
|
return options;
|
|
5420
5545
|
}
|
|
5421
5546
|
}
|
|
@@ -5425,15 +5550,6 @@ function $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options = {}) {
|
|
|
5425
5550
|
if (!locale.includes('-u-')) locale += '-u-';
|
|
5426
5551
|
locale += `-nu-${numberingSystem}`;
|
|
5427
5552
|
}
|
|
5428
|
-
if (options.style === 'unit' && !$1dfb119a85e764e5$var$supportsUnit) {
|
|
5429
|
-
let { unit: unit, unitDisplay: unitDisplay = 'short' } = options;
|
|
5430
|
-
if (!unit) throw new Error('unit option must be provided with style: "unit"');
|
|
5431
|
-
if (!$1dfb119a85e764e5$var$UNITS[unit]?.[unitDisplay]) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
|
|
5432
|
-
options = {
|
|
5433
|
-
...options,
|
|
5434
|
-
style: 'decimal'
|
|
5435
|
-
};
|
|
5436
|
-
}
|
|
5437
5553
|
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : '');
|
|
5438
5554
|
if ($1dfb119a85e764e5$var$formatterCache.has(cacheKey)) return $1dfb119a85e764e5$var$formatterCache.get(cacheKey);
|
|
5439
5555
|
let numberFormatter = new Intl.NumberFormat(locale, options);
|
|
@@ -9800,11 +9916,14 @@ function $76d97191f0f90600$export$94ed1c92c7beeb22(node, checkForOverflow) {
|
|
|
9800
9916
|
*/
|
|
9801
9917
|
|
|
9802
9918
|
function $51a3e22a5186a962$export$53a0910f038337bd(scrollView, element, opts = {}) {
|
|
9803
|
-
let { block: block = 'nearest', inline: inline = 'nearest' } = opts;
|
|
9804
9919
|
if (scrollView === element) return;
|
|
9920
|
+
let target = element.getBoundingClientRect();
|
|
9921
|
+
$51a3e22a5186a962$export$f064fd83a2c6e9ca(scrollView, element, target, opts);
|
|
9922
|
+
}
|
|
9923
|
+
function $51a3e22a5186a962$export$f064fd83a2c6e9ca(scrollView, element, target, opts = {}) {
|
|
9924
|
+
let { block: block = 'nearest', inline: inline = 'nearest' } = opts;
|
|
9805
9925
|
let y = scrollView.scrollTop;
|
|
9806
9926
|
let x = scrollView.scrollLeft;
|
|
9807
|
-
let target = element.getBoundingClientRect();
|
|
9808
9927
|
let view = scrollView.getBoundingClientRect();
|
|
9809
9928
|
let itemStyle = window.getComputedStyle(element);
|
|
9810
9929
|
let viewStyle = window.getComputedStyle(scrollView);
|
|
@@ -19475,6 +19594,97 @@ function $77844860df94ba23$export$ea8f71083e90600f(props, ref) {
|
|
|
19475
19594
|
*/
|
|
19476
19595
|
|
|
19477
19596
|
|
|
19597
|
+
const $e0a0e4399f316b76$var$WEBKIT_OPEN_DELAY = 200;
|
|
19598
|
+
const $e0a0e4399f316b76$var$TRANSITION_FRAMETIME = 50;
|
|
19599
|
+
const $e0a0e4399f316b76$var$TRANSITION_TIMEOUT = 600;
|
|
19600
|
+
const $e0a0e4399f316b76$var$listenersByWindow = new WeakMap();
|
|
19601
|
+
const $e0a0e4399f316b76$var$transitionCallbacks = new Set();
|
|
19602
|
+
const $e0a0e4399f316b76$var$resizeCallbacks = new Set();
|
|
19603
|
+
function $e0a0e4399f316b76$var$onTransitionFrame(wasOpenKeyboard, signal) {
|
|
19604
|
+
let isOpenKeyboard = ($bb39c0fc1c19b34c$export$b1f1c83775b8b5f7)();
|
|
19605
|
+
// Flush resize callbacks when the keyboard has affected layout or we ran out of time.
|
|
19606
|
+
if (wasOpenKeyboard !== isOpenKeyboard || signal.aborted) for (let callback of $e0a0e4399f316b76$var$resizeCallbacks){
|
|
19607
|
+
callback(isOpenKeyboard);
|
|
19608
|
+
$e0a0e4399f316b76$var$resizeCallbacks.delete(callback);
|
|
19609
|
+
}
|
|
19610
|
+
// WebKit only fires a single resize event at the start of an opening transition.
|
|
19611
|
+
// The animation takes ~200ms, so restart the listener and flush when it runs out of time.
|
|
19612
|
+
if (!wasOpenKeyboard && isOpenKeyboard && ($2add3ce32c6007eb$export$78551043582a6a98)() && !signal.aborted) {
|
|
19613
|
+
window.clearInterval($e0a0e4399f316b76$var$listenersByWindow.get(window));
|
|
19614
|
+
$e0a0e4399f316b76$var$listenersByWindow.set(window, $e0a0e4399f316b76$var$setupGlobalListeners($e0a0e4399f316b76$var$WEBKIT_OPEN_DELAY));
|
|
19615
|
+
return;
|
|
19616
|
+
}
|
|
19617
|
+
// Flush transition callbacks when the animation has completed or we ran out of time.
|
|
19618
|
+
if (wasOpenKeyboard !== isOpenKeyboard || signal.aborted) for (let callback of $e0a0e4399f316b76$var$transitionCallbacks){
|
|
19619
|
+
callback(isOpenKeyboard);
|
|
19620
|
+
$e0a0e4399f316b76$var$transitionCallbacks.delete(callback);
|
|
19621
|
+
}
|
|
19622
|
+
// Cancel the observer when no pending updates remain or we ran out of time.
|
|
19623
|
+
if ($e0a0e4399f316b76$var$resizeCallbacks.size + $e0a0e4399f316b76$var$transitionCallbacks.size <= 0 || signal.aborted) {
|
|
19624
|
+
window.clearInterval($e0a0e4399f316b76$var$listenersByWindow.get(window));
|
|
19625
|
+
$e0a0e4399f316b76$var$listenersByWindow.delete(window);
|
|
19626
|
+
}
|
|
19627
|
+
}
|
|
19628
|
+
function $e0a0e4399f316b76$var$setupGlobalListeners(timeout = $e0a0e4399f316b76$var$TRANSITION_TIMEOUT) {
|
|
19629
|
+
return window.setInterval($e0a0e4399f316b76$var$onTransitionFrame, $e0a0e4399f316b76$var$TRANSITION_FRAMETIME, ($bb39c0fc1c19b34c$export$b1f1c83775b8b5f7)(), AbortSignal.timeout(timeout));
|
|
19630
|
+
}
|
|
19631
|
+
function $e0a0e4399f316b76$export$b80f73f72d03c10f(fn) {
|
|
19632
|
+
// Flush synchronously when keyboard is unsupported. This is default for non-touch devices
|
|
19633
|
+
// or devices which did not open their OSK within our opening timeout.
|
|
19634
|
+
if (!($bb39c0fc1c19b34c$export$a986ed8aea890397)()) return fn(false), ()=>{};
|
|
19635
|
+
// Wait two frames to see if focus lands on an input.
|
|
19636
|
+
let frame = window.requestAnimationFrame(()=>{
|
|
19637
|
+
frame = window.requestAnimationFrame(()=>{
|
|
19638
|
+
let activeElement = document.hasFocus() ? ($23f2114a1b82827e$export$cd4e5573fbe2b576)() : null;
|
|
19639
|
+
let willKeyboardOpen = ($bb39c0fc1c19b34c$export$c57958e35f31ed73)(activeElement);
|
|
19640
|
+
// If keyboard won't change, call the function immediately.
|
|
19641
|
+
if (($bb39c0fc1c19b34c$export$b1f1c83775b8b5f7)() === willKeyboardOpen) return fn(willKeyboardOpen);
|
|
19642
|
+
// On close, fire immediately since consumers may assert the ICB.
|
|
19643
|
+
if (($bb39c0fc1c19b34c$export$b1f1c83775b8b5f7)() && !willKeyboardOpen) return fn(willKeyboardOpen);
|
|
19644
|
+
$e0a0e4399f316b76$var$resizeCallbacks.add(fn);
|
|
19645
|
+
if (!$e0a0e4399f316b76$var$listenersByWindow.has(window)) $e0a0e4399f316b76$var$listenersByWindow.set(window, $e0a0e4399f316b76$var$setupGlobalListeners());
|
|
19646
|
+
});
|
|
19647
|
+
});
|
|
19648
|
+
return ()=>{
|
|
19649
|
+
window.cancelAnimationFrame(frame);
|
|
19650
|
+
$e0a0e4399f316b76$var$resizeCallbacks.delete(fn);
|
|
19651
|
+
};
|
|
19652
|
+
}
|
|
19653
|
+
function $e0a0e4399f316b76$export$c82b8fe1ad51fcd9(fn) {
|
|
19654
|
+
// Flush synchronously when keyboard is unsupported. This is default for non-touch devices
|
|
19655
|
+
// or devices which did not open their OSK within our opening timeout.
|
|
19656
|
+
if (!($bb39c0fc1c19b34c$export$a986ed8aea890397)()) return fn(false), ()=>{};
|
|
19657
|
+
// Wait two frames to see if focus lands on an input.
|
|
19658
|
+
let frame = window.requestAnimationFrame(()=>{
|
|
19659
|
+
frame = window.requestAnimationFrame(()=>{
|
|
19660
|
+
let activeElement = document.hasFocus() ? ($23f2114a1b82827e$export$cd4e5573fbe2b576)() : null;
|
|
19661
|
+
let willKeyboardOpen = ($bb39c0fc1c19b34c$export$c57958e35f31ed73)(activeElement);
|
|
19662
|
+
// If keyboard won't transition, fire immediately.
|
|
19663
|
+
if (($bb39c0fc1c19b34c$export$b1f1c83775b8b5f7)() === willKeyboardOpen) return fn(willKeyboardOpen);
|
|
19664
|
+
$e0a0e4399f316b76$var$transitionCallbacks.add(fn);
|
|
19665
|
+
if (!$e0a0e4399f316b76$var$listenersByWindow.has(window)) $e0a0e4399f316b76$var$listenersByWindow.set(window, $e0a0e4399f316b76$var$setupGlobalListeners());
|
|
19666
|
+
});
|
|
19667
|
+
});
|
|
19668
|
+
return ()=>{
|
|
19669
|
+
window.cancelAnimationFrame(frame);
|
|
19670
|
+
$e0a0e4399f316b76$var$transitionCallbacks.delete(fn);
|
|
19671
|
+
};
|
|
19672
|
+
}
|
|
19673
|
+
|
|
19674
|
+
/*
|
|
19675
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
19676
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19677
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
19678
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19679
|
+
*
|
|
19680
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
19681
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
19682
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
19683
|
+
* governing permissions and limitations under the License.
|
|
19684
|
+
*/
|
|
19685
|
+
|
|
19686
|
+
|
|
19687
|
+
|
|
19478
19688
|
|
|
19479
19689
|
|
|
19480
19690
|
|
|
@@ -19486,28 +19696,29 @@ const $0644e3663365bfe5$var$visualViewport = typeof document !== 'undefined' &&
|
|
|
19486
19696
|
let $0644e3663365bfe5$var$preventScrollCount = 0;
|
|
19487
19697
|
let $0644e3663365bfe5$var$restore;
|
|
19488
19698
|
function $0644e3663365bfe5$export$ee0f7cc6afcd1c18(options = {}) {
|
|
19489
|
-
let { isDisabled: isDisabled } = options;
|
|
19699
|
+
let { isDisabled: isDisabled, UNSTABLE_overrideFocus: UNSTABLE_overrideFocus } = options;
|
|
19490
19700
|
($c4867b2f328c2698$export$e5c5a5f917a5871c)(()=>{
|
|
19491
19701
|
if (isDisabled) return;
|
|
19492
19702
|
$0644e3663365bfe5$var$preventScrollCount++;
|
|
19493
19703
|
if ($0644e3663365bfe5$var$preventScrollCount === 1) {
|
|
19494
19704
|
if (($2add3ce32c6007eb$export$fedb369cb70207f1)() && ($2add3ce32c6007eb$export$78551043582a6a98)()) $0644e3663365bfe5$var$restore = $0644e3663365bfe5$var$preventScrollMobileWebKit();
|
|
19495
|
-
else $0644e3663365bfe5$var$restore = $0644e3663365bfe5$var$preventScrollStandard();
|
|
19705
|
+
else $0644e3663365bfe5$var$restore = $0644e3663365bfe5$var$preventScrollStandard(UNSTABLE_overrideFocus);
|
|
19496
19706
|
}
|
|
19497
19707
|
return ()=>{
|
|
19498
19708
|
$0644e3663365bfe5$var$preventScrollCount--;
|
|
19499
19709
|
if ($0644e3663365bfe5$var$preventScrollCount === 0) $0644e3663365bfe5$var$restore();
|
|
19500
19710
|
};
|
|
19501
19711
|
}, [
|
|
19502
|
-
isDisabled
|
|
19712
|
+
isDisabled,
|
|
19713
|
+
UNSTABLE_overrideFocus
|
|
19503
19714
|
]);
|
|
19504
19715
|
}
|
|
19505
19716
|
// For most browsers, all we need to do is set `overflow: hidden` on the root element, and
|
|
19506
19717
|
// add some padding to prevent the page from shifting when the scrollbar is hidden.
|
|
19507
|
-
function $0644e3663365bfe5$var$preventScrollStandard() {
|
|
19718
|
+
function $0644e3663365bfe5$var$preventScrollStandard(UNSTABLE_overrideFocus) {
|
|
19508
19719
|
let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
19509
19720
|
return ($a4e76a5424781910$export$e08e3b67e392101e)(scrollbarWidth > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
|
|
19510
|
-
('scrollbarGutter' in document.documentElement.style ? ($d447af545b77c9f1$export$37a5fde709c1db82)(document.documentElement, 'scrollbar-gutter', 'stable') : ($d447af545b77c9f1$export$37a5fde709c1db82)(document.documentElement, 'padding-right', `${scrollbarWidth}px`)), ($d447af545b77c9f1$export$37a5fde709c1db82)(document.documentElement, 'overflow', 'hidden'));
|
|
19721
|
+
('scrollbarGutter' in document.documentElement.style ? ($d447af545b77c9f1$export$37a5fde709c1db82)(document.documentElement, 'scrollbar-gutter', 'stable') : ($d447af545b77c9f1$export$37a5fde709c1db82)(document.documentElement, 'padding-right', `${scrollbarWidth}px`)), ($d447af545b77c9f1$export$37a5fde709c1db82)(document.documentElement, 'overflow', 'hidden'), UNSTABLE_overrideFocus && $0644e3663365bfe5$var$overrideFocus(), UNSTABLE_overrideFocus && ($bb39c0fc1c19b34c$export$a986ed8aea890397)() && $0644e3663365bfe5$var$handleBlur());
|
|
19511
19722
|
}
|
|
19512
19723
|
// Mobile Safari is a whole different beast. Even with overflow: hidden,
|
|
19513
19724
|
// it still scrolls the page in many situations:
|
|
@@ -19538,7 +19749,7 @@ function $0644e3663365bfe5$var$preventScrollMobileWebKit() {
|
|
|
19538
19749
|
let onTouchStart = (e)=>{
|
|
19539
19750
|
// Store the nearest scrollable parent element from the element that the user touched.
|
|
19540
19751
|
let target = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
19541
|
-
scrollable = ($901761b40e390936$export$2bb74740c4e19def)(target) ? target : ($3578607fe3d4b096$export$cfa2225e87938781)(target, true);
|
|
19752
|
+
scrollable = ($901761b40e390936$export$2bb74740c4e19def)(target, true) ? target : ($3578607fe3d4b096$export$cfa2225e87938781)(target, true);
|
|
19542
19753
|
allowTouchMove = false;
|
|
19543
19754
|
// If the target is selected, don't preventDefault in touchmove to allow user to adjust selection.
|
|
19544
19755
|
let selection = target.ownerDocument.defaultView.getSelection();
|
|
@@ -19578,16 +19789,28 @@ function $0644e3663365bfe5$var$preventScrollMobileWebKit() {
|
|
|
19578
19789
|
// because it must be set before the touchstart event.
|
|
19579
19790
|
if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
|
|
19580
19791
|
};
|
|
19792
|
+
let restoreFocus = $0644e3663365bfe5$var$overrideFocus();
|
|
19793
|
+
let removeEvents = ($a4e76a5424781910$export$e08e3b67e392101e)(($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'touchstart', onTouchStart, {
|
|
19794
|
+
passive: false,
|
|
19795
|
+
capture: true
|
|
19796
|
+
}), ($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'touchmove', onTouchMove, {
|
|
19797
|
+
passive: false,
|
|
19798
|
+
capture: true
|
|
19799
|
+
}), $0644e3663365bfe5$var$handleBlur());
|
|
19800
|
+
return ()=>{
|
|
19801
|
+
restoreOverflow();
|
|
19802
|
+
removeEvents();
|
|
19803
|
+
style.remove();
|
|
19804
|
+
restoreFocus();
|
|
19805
|
+
};
|
|
19806
|
+
}
|
|
19807
|
+
function $0644e3663365bfe5$var$handleBlur() {
|
|
19581
19808
|
let onBlur = (e)=>{
|
|
19582
19809
|
let target = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
19583
19810
|
let relatedTarget = e.relatedTarget;
|
|
19584
|
-
if (relatedTarget && ($bb39c0fc1c19b34c$export$c57958e35f31ed73)(relatedTarget))
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
preventScroll: true
|
|
19588
|
-
});
|
|
19589
|
-
$0644e3663365bfe5$var$scrollIntoViewWhenReady(relatedTarget, ($bb39c0fc1c19b34c$export$c57958e35f31ed73)(target));
|
|
19590
|
-
} else if (!relatedTarget) {
|
|
19811
|
+
if (relatedTarget && ($bb39c0fc1c19b34c$export$c57958e35f31ed73)(relatedTarget)) // Re-focus programmatically to have the override below perform the scroll.
|
|
19812
|
+
relatedTarget.focus();
|
|
19813
|
+
else if (!relatedTarget) {
|
|
19591
19814
|
// When tapping the Done button on the keyboard, focus moves to the body.
|
|
19592
19815
|
// FocusScope will then restore focus back to the input. Later when tapping
|
|
19593
19816
|
// the same input again, it is already focused, so no blur event will fire,
|
|
@@ -19599,34 +19822,30 @@ function $0644e3663365bfe5$var$preventScrollMobileWebKit() {
|
|
|
19599
19822
|
});
|
|
19600
19823
|
}
|
|
19601
19824
|
};
|
|
19825
|
+
return ($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'blur', onBlur, true);
|
|
19826
|
+
}
|
|
19827
|
+
function $0644e3663365bfe5$var$overrideFocus() {
|
|
19602
19828
|
// Override programmatic focus to scroll into view without scrolling the whole page.
|
|
19603
19829
|
let focus = HTMLElement.prototype.focus;
|
|
19604
19830
|
Reflect.defineProperty(HTMLElement.prototype, 'focus', {
|
|
19605
19831
|
configurable: true,
|
|
19606
19832
|
writable: true,
|
|
19607
19833
|
value: function(opts) {
|
|
19608
|
-
// Track whether the keyboard was already visible before.
|
|
19609
|
-
let activeElement = ($23f2114a1b82827e$export$cd4e5573fbe2b576)();
|
|
19610
|
-
let wasKeyboardVisible = activeElement != null && ($bb39c0fc1c19b34c$export$c57958e35f31ed73)(activeElement);
|
|
19611
19834
|
// Focus the element without scrolling the page.
|
|
19612
19835
|
focus.call(this, {
|
|
19613
19836
|
...opts,
|
|
19614
19837
|
preventScroll: true
|
|
19615
19838
|
});
|
|
19616
|
-
if (!opts || !opts.preventScroll)
|
|
19839
|
+
if (!opts || !opts.preventScroll) {
|
|
19840
|
+
let scroll = ()=>{
|
|
19841
|
+
let activeElement = ($23f2114a1b82827e$export$cd4e5573fbe2b576)();
|
|
19842
|
+
if (activeElement === this) $0644e3663365bfe5$var$scrollIntoView(this);
|
|
19843
|
+
};
|
|
19844
|
+
($e0a0e4399f316b76$export$b80f73f72d03c10f)((isOpen)=>isOpen ? scroll() : ($e0a0e4399f316b76$export$c82b8fe1ad51fcd9)(()=>scroll()));
|
|
19845
|
+
}
|
|
19617
19846
|
}
|
|
19618
19847
|
});
|
|
19619
|
-
let removeEvents = ($a4e76a5424781910$export$e08e3b67e392101e)(($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'touchstart', onTouchStart, {
|
|
19620
|
-
passive: false,
|
|
19621
|
-
capture: true
|
|
19622
|
-
}), ($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'touchmove', onTouchMove, {
|
|
19623
|
-
passive: false,
|
|
19624
|
-
capture: true
|
|
19625
|
-
}), ($d447af545b77c9f1$export$f531f92e2a15358f)(document, 'blur', onBlur, true));
|
|
19626
19848
|
return ()=>{
|
|
19627
|
-
restoreOverflow();
|
|
19628
|
-
removeEvents();
|
|
19629
|
-
style.remove();
|
|
19630
19849
|
Reflect.defineProperty(HTMLElement.prototype, 'focus', {
|
|
19631
19850
|
configurable: true,
|
|
19632
19851
|
writable: true,
|
|
@@ -19634,19 +19853,10 @@ function $0644e3663365bfe5$var$preventScrollMobileWebKit() {
|
|
|
19634
19853
|
});
|
|
19635
19854
|
};
|
|
19636
19855
|
}
|
|
19637
|
-
function $0644e3663365bfe5$var$scrollIntoViewWhenReady(target, wasKeyboardVisible) {
|
|
19638
|
-
if (wasKeyboardVisible || !$0644e3663365bfe5$var$visualViewport) // If the keyboard was already visible, scroll the target into view immediately.
|
|
19639
|
-
$0644e3663365bfe5$var$scrollIntoView(target);
|
|
19640
|
-
else // Otherwise, wait for the visual viewport to resize before scrolling so we can
|
|
19641
|
-
// measure the correct position to scroll to.
|
|
19642
|
-
$0644e3663365bfe5$var$visualViewport.addEventListener('resize', ()=>$0644e3663365bfe5$var$scrollIntoView(target), {
|
|
19643
|
-
once: true
|
|
19644
|
-
});
|
|
19645
|
-
}
|
|
19646
19856
|
function $0644e3663365bfe5$var$scrollIntoView(target) {
|
|
19647
19857
|
let root = document.scrollingElement || document.documentElement;
|
|
19648
19858
|
let nextTarget = target;
|
|
19649
|
-
while(nextTarget && nextTarget !== root){
|
|
19859
|
+
while(nextTarget && nextTarget !== root && nextTarget.isConnected){
|
|
19650
19860
|
// Find the parent scrollable element and adjust the scroll position if the target is not already in view.
|
|
19651
19861
|
let scrollable = ($3578607fe3d4b096$export$cfa2225e87938781)(nextTarget);
|
|
19652
19862
|
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {
|
|
@@ -20183,9 +20393,21 @@ function $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props) {
|
|
|
20183
20393
|
*/
|
|
20184
20394
|
|
|
20185
20395
|
|
|
20186
|
-
|
|
20396
|
+
|
|
20397
|
+
|
|
20398
|
+
|
|
20399
|
+
function $fcc7165e876206c6$export$6d3443f2c48bfc20(ref, isReady = true, onEnter) {
|
|
20187
20400
|
let [isEntering, setEntering] = ($8WNJc$react.useState)(true);
|
|
20188
20401
|
let isAnimationReady = isEntering && isReady;
|
|
20402
|
+
// Hide the element while it prepares for entry, using only non-layout-thrashing attributes.
|
|
20403
|
+
// This prevents accidental flashes of content in scenarios where no hidden styling is applied
|
|
20404
|
+
// while the enter animation is not yet ready (e.g. popovers prior to placement calculation).
|
|
20405
|
+
($c4867b2f328c2698$export$e5c5a5f917a5871c)(()=>{
|
|
20406
|
+
if (!isReady && ref.current) return ($a4e76a5424781910$export$e08e3b67e392101e)(($d447af545b77c9f1$export$37a5fde709c1db82)(ref.current, 'opacity', '0'), ($d447af545b77c9f1$export$37a5fde709c1db82)(ref.current, 'clip', 'rect(0 0 0 0)'), ($d447af545b77c9f1$export$37a5fde709c1db82)(ref.current, 'clip-path', 'inset(50%)'), ($d447af545b77c9f1$export$37a5fde709c1db82)(ref.current, 'mask-image', 'linear-gradient(#0000, #0000)'));
|
|
20407
|
+
}, [
|
|
20408
|
+
ref,
|
|
20409
|
+
isReady
|
|
20410
|
+
]);
|
|
20189
20411
|
// There are two cases for entry animations:
|
|
20190
20412
|
// 1. CSS @keyframes. The `animation` property is set during the isEntering state, and it is removed after the animation finishes.
|
|
20191
20413
|
// 2. CSS transitions. The initial styles are applied during the isEntering state, and removed immediately, causing the transition to occur.
|
|
@@ -20200,10 +20422,10 @@ function $fcc7165e876206c6$export$6d3443f2c48bfc20(ref, isReady = true) {
|
|
|
20200
20422
|
ref,
|
|
20201
20423
|
isAnimationReady
|
|
20202
20424
|
]);
|
|
20203
|
-
$fcc7165e876206c6$var$useAnimation(ref, isAnimationReady, ($8WNJc$react.useCallback)(()=>setEntering(false), []));
|
|
20425
|
+
$fcc7165e876206c6$var$useAnimation(ref, isAnimationReady, onEnter, ($8WNJc$react.useCallback)(()=>setEntering(false), []));
|
|
20204
20426
|
return isAnimationReady;
|
|
20205
20427
|
}
|
|
20206
|
-
function $fcc7165e876206c6$export$45fda7c47f93fd48(ref, isOpen) {
|
|
20428
|
+
function $fcc7165e876206c6$export$45fda7c47f93fd48(ref, isOpen, onExit) {
|
|
20207
20429
|
let [exitState, setExitState] = ($8WNJc$react.useState)(isOpen ? 'open' : 'closed');
|
|
20208
20430
|
switch(exitState){
|
|
20209
20431
|
case 'open':
|
|
@@ -20218,35 +20440,39 @@ function $fcc7165e876206c6$export$45fda7c47f93fd48(ref, isOpen) {
|
|
|
20218
20440
|
break;
|
|
20219
20441
|
}
|
|
20220
20442
|
let isExiting = exitState === 'exiting';
|
|
20221
|
-
$fcc7165e876206c6$var$useAnimation(ref, isExiting, ($8WNJc$react.useCallback)(()=>{
|
|
20443
|
+
$fcc7165e876206c6$var$useAnimation(ref, isExiting, onExit, ($8WNJc$react.useCallback)(()=>{
|
|
20222
20444
|
// Set the state to closed, which will cause the element to be unmounted.
|
|
20223
20445
|
setExitState((state)=>state === 'exiting' ? 'closed' : state);
|
|
20224
20446
|
}, []));
|
|
20225
20447
|
return isExiting;
|
|
20226
20448
|
}
|
|
20227
|
-
function $fcc7165e876206c6$var$useAnimation(ref, isActive, onEnd) {
|
|
20449
|
+
function $fcc7165e876206c6$var$useAnimation(ref, isActive, onStart, onEnd) {
|
|
20450
|
+
let isActiveRef = ($8WNJc$react.useRef)(null);
|
|
20451
|
+
let start = ($fe16bffc7a557bf0$export$7f54fc3180508a52)(onStart);
|
|
20228
20452
|
($c4867b2f328c2698$export$e5c5a5f917a5871c)(()=>{
|
|
20229
|
-
if (isActive && ref.current) {
|
|
20453
|
+
if (isActive && ref.current && isActiveRef.current !== isActive) {
|
|
20454
|
+
isActiveRef.current = isActive;
|
|
20230
20455
|
if (!('getAnimations' in ref.current)) {
|
|
20231
20456
|
// JSDOM
|
|
20232
20457
|
onEnd();
|
|
20233
20458
|
return;
|
|
20234
20459
|
}
|
|
20235
|
-
let
|
|
20236
|
-
|
|
20460
|
+
let startPromise = start?.(ref.current);
|
|
20461
|
+
let animations = ref.current.getAnimations().filter((a)=>(typeof DocumentTimeline === 'undefined' || a.timeline instanceof DocumentTimeline) && a.playState === 'running');
|
|
20462
|
+
if (animations.length === 0 && !startPromise) {
|
|
20237
20463
|
onEnd();
|
|
20238
20464
|
return;
|
|
20239
20465
|
}
|
|
20240
|
-
|
|
20241
|
-
|
|
20242
|
-
|
|
20466
|
+
Promise.all([
|
|
20467
|
+
startPromise,
|
|
20468
|
+
...animations.map((a)=>a.finished)
|
|
20469
|
+
]).then(()=>{
|
|
20470
|
+
($3wX5A$reactdom.flushSync)(()=>{
|
|
20243
20471
|
onEnd();
|
|
20244
20472
|
});
|
|
20245
|
-
});
|
|
20246
|
-
return ()=>{
|
|
20247
|
-
canceled = true;
|
|
20248
|
-
};
|
|
20473
|
+
}).catch(()=>{});
|
|
20249
20474
|
}
|
|
20475
|
+
isActiveRef.current = isActive;
|
|
20250
20476
|
}, [
|
|
20251
20477
|
ref,
|
|
20252
20478
|
isActive,
|
|
@@ -20281,6 +20507,7 @@ function $fcc7165e876206c6$var$useAnimation(ref, isActive, onEnd) {
|
|
|
20281
20507
|
|
|
20282
20508
|
|
|
20283
20509
|
|
|
20510
|
+
|
|
20284
20511
|
const $542a13ca2fa5b484$export$9b9a0cd73afb7ca4 = /*#__PURE__*/ ($8WNJc$react.createContext)(null);
|
|
20285
20512
|
// Stores a ref for the portal container for a group of popovers (e.g. submenus).
|
|
20286
20513
|
const $542a13ca2fa5b484$var$PopoverGroupContext = /*#__PURE__*/ ($8WNJc$react.createContext)(null);
|
|
@@ -20324,6 +20551,7 @@ function $542a13ca2fa5b484$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
20324
20551
|
let containerRef = ($8WNJc$react.useRef)(null);
|
|
20325
20552
|
let groupCtx = ($8WNJc$react.useContext)($542a13ca2fa5b484$var$PopoverGroupContext);
|
|
20326
20553
|
let isSubPopover = groupCtx && props.trigger === 'SubmenuTrigger';
|
|
20554
|
+
let [isOpen, setIsOpen] = ($8WNJc$react.useState)(false);
|
|
20327
20555
|
let { popoverProps: popoverProps, underlayProps: underlayProps, arrowProps: arrowProps, placement: placement, triggerAnchorPoint: triggerAnchorPoint } = ($f8a024fbad3a5a2e$export$542a6fd13ac93354)({
|
|
20328
20556
|
...props,
|
|
20329
20557
|
offset: props.offset ?? 8,
|
|
@@ -20335,7 +20563,7 @@ function $542a13ca2fa5b484$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
20335
20563
|
let ref = props.popoverRef;
|
|
20336
20564
|
// Skip the automatic entry animation when opening instantly (e.g. swapping between previews
|
|
20337
20565
|
// during warmup). An explicitly provided isEntering prop still takes precedence.
|
|
20338
|
-
let enterAnimation = ($fcc7165e876206c6$export$6d3443f2c48bfc20)(ref, !!placement);
|
|
20566
|
+
let enterAnimation = ($fcc7165e876206c6$export$6d3443f2c48bfc20)(ref, !!placement && isOpen);
|
|
20339
20567
|
// oxlint-disable-next-line react/react-compiler
|
|
20340
20568
|
let isEntering = props.isEntering || !props.shouldSkipAnimation && enterAnimation || false;
|
|
20341
20569
|
// oxlint-disable-next-line react/react-compiler
|
|
@@ -20378,7 +20606,10 @@ function $542a13ca2fa5b484$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
20378
20606
|
// oxlint-enable react/react-compiler
|
|
20379
20607
|
let children = ($8WNJc$react.useMemo)(()=>{
|
|
20380
20608
|
let children = renderProps.children;
|
|
20381
|
-
|
|
20609
|
+
for (let Context of [
|
|
20610
|
+
$542a13ca2fa5b484$export$9b9a0cd73afb7ca4,
|
|
20611
|
+
...clearContexts ?? []
|
|
20612
|
+
])children = /*#__PURE__*/ ($8WNJc$react).createElement(Context.Provider, {
|
|
20382
20613
|
value: null
|
|
20383
20614
|
}, children);
|
|
20384
20615
|
return children;
|
|
@@ -20408,6 +20639,8 @@ function $542a13ca2fa5b484$var$PopoverInner({ state: state, isExiting: isExiting
|
|
|
20408
20639
|
...renderProps.style,
|
|
20409
20640
|
'--trigger-width': renderProps.style?.['--trigger-width'] || triggerWidth
|
|
20410
20641
|
};
|
|
20642
|
+
// Since our trigger may open the OSK, we defer the reveal, as a courtesy, to avoid layout shift.
|
|
20643
|
+
($c4867b2f328c2698$export$e5c5a5f917a5871c)(()=>($e0a0e4399f316b76$export$b80f73f72d03c10f)(()=>setIsOpen(true)), []);
|
|
20411
20644
|
// oxlint-disable react/react-compiler
|
|
20412
20645
|
let overlay = /*#__PURE__*/ ($8WNJc$react).createElement(($7230ffa83bc0c2cf$export$df3a06d6289f983e).div, {
|
|
20413
20646
|
...($bbaa08b3cd72f041$export$9d1611c77c2fe928)(($8e9d2fae0ecb9001$export$457c3d6518dd4c6f)(props, {
|
|
@@ -22386,15 +22619,15 @@ const $49319ee1285aa241$export$2ce376c2cc3355c8 = /*#__PURE__*/ ($42ceafc619f9c3
|
|
|
22386
22619
|
|
|
22387
22620
|
|
|
22388
22621
|
function $13150e6629d46e45$export$d55e7ee900f34e93(props, ref) {
|
|
22389
|
-
let { role: role = 'dialog' } = props;
|
|
22622
|
+
let { role: role = 'dialog', isEntering: isEntering } = props;
|
|
22390
22623
|
let titleId = ($390e54f620492c70$export$b4cc09c592e8fdb8)();
|
|
22391
22624
|
titleId = props['aria-label'] ? undefined : titleId;
|
|
22392
22625
|
let contentId = ($390e54f620492c70$export$b4cc09c592e8fdb8)();
|
|
22393
22626
|
contentId = role === 'alertdialog' && !props['aria-describedby'] ? contentId : undefined;
|
|
22394
22627
|
let isRefocusing = ($8WNJc$react.useRef)(false);
|
|
22395
|
-
// Focus the dialog itself on mount, unless a child element is already focused.
|
|
22628
|
+
// Focus the dialog itself on mount (or once it has entered), unless a child element is already focused.
|
|
22396
22629
|
($8WNJc$react.useEffect)(()=>{
|
|
22397
|
-
if (ref.current && !($23f2114a1b82827e$export$b4f377a2b6254582)(ref.current)) {
|
|
22630
|
+
if (!isEntering && ref.current && !($23f2114a1b82827e$export$b4f377a2b6254582)(ref.current)) {
|
|
22398
22631
|
($f192c2f16961cbe0$export$80f3e147d781571c)(ref.current);
|
|
22399
22632
|
// Safari on iOS does not move the VoiceOver cursor to the dialog
|
|
22400
22633
|
// or announce that it has opened until it has rendered. A workaround
|
|
@@ -22415,7 +22648,8 @@ function $13150e6629d46e45$export$d55e7ee900f34e93(props, ref) {
|
|
|
22415
22648
|
};
|
|
22416
22649
|
}
|
|
22417
22650
|
}, [
|
|
22418
|
-
ref
|
|
22651
|
+
ref,
|
|
22652
|
+
isEntering
|
|
22419
22653
|
]);
|
|
22420
22654
|
($d7a937236970dc7f$export$14c98a7594375490)();
|
|
22421
22655
|
// Warn in dev mode if the dialog has no accessible title.
|
|
@@ -24033,7 +24267,9 @@ function $d51706f903be7eab$export$1315d136e6f7581(segment, state, ref) {
|
|
|
24033
24267
|
era: era
|
|
24034
24268
|
}).toDate('UTC');
|
|
24035
24269
|
let parts = eraFormatter.formatToParts(eraDate);
|
|
24036
|
-
|
|
24270
|
+
// Some eras have no localized name in CLDR (e.g. the Coptic 'BCE' era), in which case
|
|
24271
|
+
// Intl omits the era part entirely. Fall back to the era identifier so it stays typeable.
|
|
24272
|
+
let formatted = parts.find((p)=>p.type === 'era')?.value ?? era;
|
|
24037
24273
|
return {
|
|
24038
24274
|
era: era,
|
|
24039
24275
|
formatted: formatted
|
|
@@ -28247,17 +28483,24 @@ function $5698867baeb53f4e$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
|
28247
28483
|
onClose: state.close
|
|
28248
28484
|
}, ref);
|
|
28249
28485
|
($0644e3663365bfe5$export$ee0f7cc6afcd1c18)({
|
|
28250
|
-
isDisabled: !state.isOpen
|
|
28486
|
+
isDisabled: !state.isOpen,
|
|
28487
|
+
UNSTABLE_overrideFocus: props.UNSTABLE_overrideFocus
|
|
28251
28488
|
});
|
|
28252
28489
|
($d7a937236970dc7f$export$14c98a7594375490)();
|
|
28490
|
+
let { isEntering: isEntering } = props;
|
|
28253
28491
|
($8WNJc$react.useEffect)(()=>{
|
|
28254
|
-
if (state.isOpen && ref.current)
|
|
28255
|
-
|
|
28256
|
-
|
|
28257
|
-
|
|
28258
|
-
|
|
28492
|
+
if (state.isOpen && ref.current) {
|
|
28493
|
+
if (isEntering) // Prevent a parent modal from hiding this one while it is entering.
|
|
28494
|
+
return ($58196c8d6a1f38fc$export$1020fa7f77e17884)(ref.current);
|
|
28495
|
+
return ($58196c8d6a1f38fc$export$1c3ebcada18427bf)([
|
|
28496
|
+
ref.current
|
|
28497
|
+
], {
|
|
28498
|
+
shouldUseInert: true
|
|
28499
|
+
});
|
|
28500
|
+
}
|
|
28259
28501
|
}, [
|
|
28260
28502
|
state.isOpen,
|
|
28503
|
+
isEntering,
|
|
28261
28504
|
ref
|
|
28262
28505
|
]);
|
|
28263
28506
|
return {
|
|
@@ -28281,9 +28524,11 @@ function $5698867baeb53f4e$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
|
28281
28524
|
|
|
28282
28525
|
|
|
28283
28526
|
|
|
28527
|
+
|
|
28284
28528
|
let $6066a2c586ade9e1$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
|
|
28285
28529
|
function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
28286
28530
|
let isSSR = ($c7eafbbe1ea5834e$export$535bd6ca7f90a273)();
|
|
28531
|
+
let unmountRef = ($8WNJc$react.useRef)(null);
|
|
28287
28532
|
let [size, setSize] = ($8WNJc$react.useState)(()=>isSSR ? {
|
|
28288
28533
|
width: 0,
|
|
28289
28534
|
height: 0
|
|
@@ -28303,13 +28548,12 @@ function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
|
28303
28548
|
};
|
|
28304
28549
|
// When closing the keyboard, WebKit on iOS does not fire the visual viewport resize event until the animation is complete.
|
|
28305
28550
|
// We can anticipate this and resize early by handling the blur event and using the layout size.
|
|
28306
|
-
let frame;
|
|
28307
28551
|
let onBlur = (e)=>{
|
|
28308
28552
|
if ($6066a2c586ade9e1$var$visualViewport && $6066a2c586ade9e1$var$visualViewport.scale > 1) return;
|
|
28309
|
-
if (($bb39c0fc1c19b34c$export$c57958e35f31ed73)(($23f2114a1b82827e$export$e58f029f0fbfdb29)(e)))
|
|
28310
|
-
|
|
28311
|
-
|
|
28312
|
-
|
|
28553
|
+
if (!($bb39c0fc1c19b34c$export$c57958e35f31ed73)(($23f2114a1b82827e$export$e58f029f0fbfdb29)(e))) return;
|
|
28554
|
+
unmountRef.current = ($e0a0e4399f316b76$export$b80f73f72d03c10f)((isOpen)=>{
|
|
28555
|
+
if (isOpen) return;
|
|
28556
|
+
updateSize({
|
|
28313
28557
|
width: document.documentElement.clientWidth,
|
|
28314
28558
|
height: document.documentElement.clientHeight
|
|
28315
28559
|
});
|
|
@@ -28320,7 +28564,7 @@ function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
|
28320
28564
|
if (!$6066a2c586ade9e1$var$visualViewport) window.addEventListener('resize', onResize);
|
|
28321
28565
|
else $6066a2c586ade9e1$var$visualViewport.addEventListener('resize', onResize);
|
|
28322
28566
|
return ()=>{
|
|
28323
|
-
|
|
28567
|
+
unmountRef.current?.();
|
|
28324
28568
|
if (($2add3ce32c6007eb$export$fedb369cb70207f1)() && ($2add3ce32c6007eb$export$78551043582a6a98)()) window.removeEventListener('blur', onBlur, true);
|
|
28325
28569
|
if (!$6066a2c586ade9e1$var$visualViewport) window.removeEventListener('resize', onResize);
|
|
28326
28570
|
else $6066a2c586ade9e1$var$visualViewport.removeEventListener('resize', onResize);
|
|
@@ -28364,10 +28608,12 @@ function $6066a2c586ade9e1$export$d699905dd57c73ca() {
|
|
|
28364
28608
|
|
|
28365
28609
|
|
|
28366
28610
|
|
|
28611
|
+
|
|
28612
|
+
|
|
28367
28613
|
const $8b8d26808cb8cb53$export$ab57792b9b6974a6 = /*#__PURE__*/ ($8WNJc$react.createContext)(null);
|
|
28368
|
-
const $8b8d26808cb8cb53$
|
|
28614
|
+
const $8b8d26808cb8cb53$export$6bc057cefccad9c8 = /*#__PURE__*/ ($8WNJc$react.createContext)(null);
|
|
28369
28615
|
const $8b8d26808cb8cb53$export$2b77a92f1a5ad772 = /*#__PURE__*/ ($8WNJc$react.forwardRef)(function Modal(props, ref) {
|
|
28370
|
-
let ctx = ($8WNJc$react.useContext)($8b8d26808cb8cb53$
|
|
28616
|
+
let ctx = ($8WNJc$react.useContext)($8b8d26808cb8cb53$export$6bc057cefccad9c8);
|
|
28371
28617
|
if (ctx) {
|
|
28372
28618
|
if (process.env.NODE_ENV !== 'production' && (props.onOpenChange || props.defaultOpen !== undefined || props.isOpen !== undefined)) {
|
|
28373
28619
|
// create a list of props that are passed in but not allowed when using an external ModalOverlay
|
|
@@ -28416,8 +28662,9 @@ function $8b8d26808cb8cb53$var$ModalOverlayWithForwardRef(props, ref) {
|
|
|
28416
28662
|
}
|
|
28417
28663
|
let objectRef = ($03e8ab2d84d7657a$export$4338b53315abf666)(ref);
|
|
28418
28664
|
let modalRef = ($8WNJc$react.useRef)(null);
|
|
28419
|
-
let isOverlayExiting = ($fcc7165e876206c6$export$45fda7c47f93fd48)(objectRef, state.isOpen);
|
|
28420
|
-
let
|
|
28665
|
+
let isOverlayExiting = ($fcc7165e876206c6$export$45fda7c47f93fd48)(objectRef, state.isOpen, props.onExit);
|
|
28666
|
+
let onExitRef = ($8WNJc$react.useRef)(null);
|
|
28667
|
+
let isModalExiting = ($fcc7165e876206c6$export$45fda7c47f93fd48)(modalRef, state.isOpen, (element)=>onExitRef.current?.(element));
|
|
28421
28668
|
let isExiting = isOverlayExiting || isModalExiting || props.isExiting || false;
|
|
28422
28669
|
let isSSR = ($c7eafbbe1ea5834e$export$535bd6ca7f90a273)();
|
|
28423
28670
|
if (!state.isOpen && !isExiting || isSSR) return null;
|
|
@@ -28426,15 +28673,26 @@ function $8b8d26808cb8cb53$var$ModalOverlayWithForwardRef(props, ref) {
|
|
|
28426
28673
|
state: state,
|
|
28427
28674
|
isExiting: isExiting,
|
|
28428
28675
|
overlayRef: objectRef,
|
|
28429
|
-
modalRef: modalRef
|
|
28676
|
+
modalRef: modalRef,
|
|
28677
|
+
onExitRef: onExitRef
|
|
28430
28678
|
});
|
|
28431
28679
|
}
|
|
28432
28680
|
const $8b8d26808cb8cb53$export$8948f78d83984c69 = /*#__PURE__*/ ($8WNJc$react.forwardRef)($8b8d26808cb8cb53$var$ModalOverlayWithForwardRef);
|
|
28433
|
-
function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer: UNSTABLE_portalContainer, ...props }) {
|
|
28681
|
+
function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer: UNSTABLE_portalContainer, UNSTABLE_deferUntilEntered: UNSTABLE_deferUntilEntered, ...props }) {
|
|
28434
28682
|
let modalRef = props.modalRef;
|
|
28435
28683
|
let { state: state } = props;
|
|
28436
|
-
let
|
|
28437
|
-
let entering = ($fcc7165e876206c6$export$6d3443f2c48bfc20)(props.overlayRef) || props.isEntering || false;
|
|
28684
|
+
let [isOpen, setIsOpen] = ($8WNJc$react.useState)(false);
|
|
28685
|
+
let entering = ($fcc7165e876206c6$export$6d3443f2c48bfc20)(props.overlayRef, isOpen, props.onEnter) || props.isEntering || false;
|
|
28686
|
+
let isDeferred = !!UNSTABLE_deferUntilEntered && (!isOpen || entering);
|
|
28687
|
+
let { modalProps: modalProps, underlayProps: underlayProps } = ($5698867baeb53f4e$export$dbc0f175b25fb0fb)({
|
|
28688
|
+
...props,
|
|
28689
|
+
isEntering: isDeferred
|
|
28690
|
+
}, state, modalRef);
|
|
28691
|
+
// Pass the entering state to the dialog so it waits to move focus until the modal has entered.
|
|
28692
|
+
let dialogContext = ($8WNJc$react.useContext)(($f2ff30fde7b014be$export$8b93a07348a7730c));
|
|
28693
|
+
let mergedDialogContext = UNSTABLE_deferUntilEntered ? $8b8d26808cb8cb53$var$mergeDialogContext(dialogContext, {
|
|
28694
|
+
isEntering: isDeferred
|
|
28695
|
+
}) : dialogContext;
|
|
28438
28696
|
let renderProps = ($7230ffa83bc0c2cf$export$4d86445c2cf5e3)({
|
|
28439
28697
|
...props,
|
|
28440
28698
|
defaultClassName: 'react-aria-ModalOverlay',
|
|
@@ -28462,6 +28720,8 @@ function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer: UNS
|
|
|
28462
28720
|
'--page-width': pageWidth !== undefined ? pageWidth + 'px' : undefined,
|
|
28463
28721
|
'--page-height': pageHeight !== undefined ? pageHeight + 'px' : undefined
|
|
28464
28722
|
};
|
|
28723
|
+
// Since an auto-focused input may open the OSK, we defer the reveal, as a courtesy, to avoid layout shift.
|
|
28724
|
+
($c4867b2f328c2698$export$e5c5a5f917a5871c)(()=>($e0a0e4399f316b76$export$b80f73f72d03c10f)(()=>setIsOpen(true)), []);
|
|
28465
28725
|
// oxlint-disable react/react-compiler
|
|
28466
28726
|
return /*#__PURE__*/ ($8WNJc$react).createElement(($d7a937236970dc7f$export$c6fdb837b070b4ff), {
|
|
28467
28727
|
isExiting: props.isExiting,
|
|
@@ -28478,31 +28738,54 @@ function $8b8d26808cb8cb53$var$ModalOverlayInner({ UNSTABLE_portalContainer: UNS
|
|
|
28478
28738
|
}, /*#__PURE__*/ ($8WNJc$react).createElement(($7230ffa83bc0c2cf$export$2881499e37b75b9a), {
|
|
28479
28739
|
values: [
|
|
28480
28740
|
[
|
|
28481
|
-
$8b8d26808cb8cb53$
|
|
28741
|
+
$8b8d26808cb8cb53$export$6bc057cefccad9c8,
|
|
28482
28742
|
{
|
|
28483
28743
|
modalProps: modalProps,
|
|
28484
28744
|
modalRef: modalRef,
|
|
28485
28745
|
isExiting: props.isExiting,
|
|
28746
|
+
onExitRef: props.onExitRef,
|
|
28747
|
+
isOpen: isOpen,
|
|
28486
28748
|
isDismissable: props.isDismissable
|
|
28487
28749
|
}
|
|
28488
28750
|
],
|
|
28489
28751
|
[
|
|
28490
28752
|
($f2ff30fde7b014be$export$d2f961adcb0afbe),
|
|
28491
28753
|
state
|
|
28754
|
+
],
|
|
28755
|
+
[
|
|
28756
|
+
($f2ff30fde7b014be$export$8b93a07348a7730c),
|
|
28757
|
+
mergedDialogContext
|
|
28492
28758
|
]
|
|
28493
28759
|
]
|
|
28494
28760
|
}, renderProps.children)));
|
|
28495
28761
|
// oxlint-enable react/react-compiler
|
|
28496
28762
|
}
|
|
28763
|
+
function $8b8d26808cb8cb53$var$mergeDialogContext(context, props) {
|
|
28764
|
+
if (context && 'slots' in context && context.slots) {
|
|
28765
|
+
let slots = {};
|
|
28766
|
+
for(let key in context.slots)slots[key] = {
|
|
28767
|
+
...context.slots[key],
|
|
28768
|
+
...props
|
|
28769
|
+
};
|
|
28770
|
+
return {
|
|
28771
|
+
...context,
|
|
28772
|
+
slots: slots
|
|
28773
|
+
};
|
|
28774
|
+
}
|
|
28775
|
+
return {
|
|
28776
|
+
...context,
|
|
28777
|
+
...props
|
|
28778
|
+
};
|
|
28779
|
+
}
|
|
28497
28780
|
function $8b8d26808cb8cb53$var$ModalContent(props) {
|
|
28498
|
-
let { modalProps: modalProps, modalRef: modalRef, isExiting: isExiting, isDismissable: isDismissable } = ($8WNJc$react.useContext)($8b8d26808cb8cb53$
|
|
28781
|
+
let { modalProps: modalProps, modalRef: modalRef, isExiting: isExiting, onExitRef: onExitRef, isDismissable: isDismissable, isOpen: isOpen } = ($8WNJc$react.useContext)($8b8d26808cb8cb53$export$6bc057cefccad9c8);
|
|
28499
28782
|
let state = ($8WNJc$react.useContext)(($f2ff30fde7b014be$export$d2f961adcb0afbe));
|
|
28500
28783
|
let mergedRefs = ($8WNJc$react.useMemo)(()=>($4064df0d6f9620e1$export$c9058316764c140e)(props.modalRef, modalRef), [
|
|
28501
28784
|
props.modalRef,
|
|
28502
28785
|
modalRef
|
|
28503
28786
|
]);
|
|
28504
28787
|
let ref = ($03e8ab2d84d7657a$export$4338b53315abf666)(mergedRefs);
|
|
28505
|
-
let entering = ($fcc7165e876206c6$export$6d3443f2c48bfc20)(ref);
|
|
28788
|
+
let entering = ($fcc7165e876206c6$export$6d3443f2c48bfc20)(ref, isOpen, props.onEnter);
|
|
28506
28789
|
let renderProps = ($7230ffa83bc0c2cf$export$4d86445c2cf5e3)({
|
|
28507
28790
|
...props,
|
|
28508
28791
|
defaultClassName: 'react-aria-Modal',
|
|
@@ -28512,6 +28795,9 @@ function $8b8d26808cb8cb53$var$ModalContent(props) {
|
|
|
28512
28795
|
state: state
|
|
28513
28796
|
}
|
|
28514
28797
|
});
|
|
28798
|
+
($c4867b2f328c2698$export$e5c5a5f917a5871c)(()=>{
|
|
28799
|
+
if (onExitRef) onExitRef.current = props.onExit;
|
|
28800
|
+
});
|
|
28515
28801
|
return /*#__PURE__*/ ($8WNJc$react).createElement(($7230ffa83bc0c2cf$export$df3a06d6289f983e).div, {
|
|
28516
28802
|
...($bbaa08b3cd72f041$export$9d1611c77c2fe928)(($8e9d2fae0ecb9001$export$457c3d6518dd4c6f)(props, {
|
|
28517
28803
|
global: true
|
|
@@ -29343,6 +29629,7 @@ function $b046d185a4525d56$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
29343
29629
|
focus: ()=>triggerRef.current?.focus()
|
|
29344
29630
|
}, state, props.selectRef);
|
|
29345
29631
|
let setValue = state.setValue;
|
|
29632
|
+
// Used for both onChange and onInput, so accept the common supertype of both event types.
|
|
29346
29633
|
let onChange = ($8WNJc$react.useCallback)((e)=>{
|
|
29347
29634
|
let eventTarget = ($23f2114a1b82827e$export$e58f029f0fbfdb29)(e);
|
|
29348
29635
|
if (eventTarget.multiple) setValue(Array.from(eventTarget.selectedOptions, (option)=>option.value));
|