@react-aria/utils 3.23.2 → 3.24.1
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/chain.main.js +26 -0
- package/dist/chain.main.js.map +1 -0
- package/dist/chain.mjs +21 -0
- package/dist/chain.module.js +21 -0
- package/dist/chain.module.js.map +1 -0
- package/dist/domHelpers.main.js +19 -0
- package/dist/domHelpers.main.js.map +1 -0
- package/dist/domHelpers.mjs +13 -0
- package/dist/domHelpers.module.js +13 -0
- package/dist/domHelpers.module.js.map +1 -0
- package/dist/filterDOMProps.main.js +45 -0
- package/dist/filterDOMProps.main.js.map +1 -0
- package/dist/filterDOMProps.mjs +40 -0
- package/dist/filterDOMProps.module.js +40 -0
- package/dist/filterDOMProps.module.js.map +1 -0
- package/dist/focusWithoutScrolling.main.js +72 -0
- package/dist/focusWithoutScrolling.main.js.map +1 -0
- package/dist/focusWithoutScrolling.mjs +67 -0
- package/dist/focusWithoutScrolling.module.js +67 -0
- package/dist/focusWithoutScrolling.module.js.map +1 -0
- package/dist/getOffset.main.js +24 -0
- package/dist/getOffset.main.js.map +1 -0
- package/dist/getOffset.mjs +19 -0
- package/dist/getOffset.module.js +19 -0
- package/dist/getOffset.module.js.map +1 -0
- package/dist/getScrollParent.main.js +28 -0
- package/dist/getScrollParent.main.js.map +1 -0
- package/dist/getScrollParent.mjs +23 -0
- package/dist/getScrollParent.module.js +23 -0
- package/dist/getScrollParent.module.js.map +1 -0
- package/dist/getScrollParents.main.js +30 -0
- package/dist/getScrollParents.main.js.map +1 -0
- package/dist/getScrollParents.mjs +25 -0
- package/dist/getScrollParents.module.js +25 -0
- package/dist/getScrollParents.module.js.map +1 -0
- package/dist/import.mjs +32 -1232
- package/dist/isScrollable.main.js +25 -0
- package/dist/isScrollable.main.js.map +1 -0
- package/dist/isScrollable.mjs +20 -0
- package/dist/isScrollable.module.js +20 -0
- package/dist/isScrollable.module.js.map +1 -0
- package/dist/isVirtualEvent.main.js +41 -0
- package/dist/isVirtualEvent.main.js.map +1 -0
- package/dist/isVirtualEvent.mjs +35 -0
- package/dist/isVirtualEvent.module.js +35 -0
- package/dist/isVirtualEvent.module.js.map +1 -0
- package/dist/main.js +80 -1282
- package/dist/main.js.map +1 -1
- package/dist/mergeProps.main.js +51 -0
- package/dist/mergeProps.main.js.map +1 -0
- package/dist/mergeProps.mjs +42 -0
- package/dist/mergeProps.module.js +42 -0
- package/dist/mergeProps.module.js.map +1 -0
- package/dist/mergeRefs.main.js +28 -0
- package/dist/mergeRefs.main.js.map +1 -0
- package/dist/mergeRefs.mjs +23 -0
- package/dist/mergeRefs.module.js +23 -0
- package/dist/mergeRefs.module.js.map +1 -0
- package/dist/module.js +32 -1232
- package/dist/module.js.map +1 -1
- package/dist/openLink.main.js +143 -0
- package/dist/openLink.main.js.map +1 -0
- package/dist/openLink.mjs +129 -0
- package/dist/openLink.module.js +129 -0
- package/dist/openLink.module.js.map +1 -0
- package/dist/platform.main.js +64 -0
- package/dist/platform.main.js.map +1 -0
- package/dist/platform.mjs +51 -0
- package/dist/platform.module.js +51 -0
- package/dist/platform.module.js.map +1 -0
- package/dist/runAfterTransition.main.js +82 -0
- package/dist/runAfterTransition.main.js.map +1 -0
- package/dist/runAfterTransition.mjs +77 -0
- package/dist/runAfterTransition.module.js +77 -0
- package/dist/runAfterTransition.module.js.map +1 -0
- package/dist/scrollIntoView.main.js +96 -0
- package/dist/scrollIntoView.main.js.map +1 -0
- package/dist/scrollIntoView.mjs +90 -0
- package/dist/scrollIntoView.module.js +90 -0
- package/dist/scrollIntoView.module.js.map +1 -0
- package/dist/types.d.ts +17 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/useDeepMemo.main.js +30 -0
- package/dist/useDeepMemo.main.js.map +1 -0
- package/dist/useDeepMemo.mjs +25 -0
- package/dist/useDeepMemo.module.js +25 -0
- package/dist/useDeepMemo.module.js.map +1 -0
- package/dist/useDescription.main.js +59 -0
- package/dist/useDescription.main.js.map +1 -0
- package/dist/useDescription.mjs +54 -0
- package/dist/useDescription.module.js +54 -0
- package/dist/useDescription.module.js.map +1 -0
- package/dist/useDrag1D.main.js +139 -0
- package/dist/useDrag1D.main.js.map +1 -0
- package/dist/useDrag1D.mjs +134 -0
- package/dist/useDrag1D.module.js +134 -0
- package/dist/useDrag1D.module.js.map +1 -0
- package/dist/useEffectEvent.main.js +37 -0
- package/dist/useEffectEvent.main.js.map +1 -0
- package/dist/useEffectEvent.mjs +32 -0
- package/dist/useEffectEvent.module.js +32 -0
- package/dist/useEffectEvent.module.js.map +1 -0
- package/dist/useEvent.main.js +42 -0
- package/dist/useEvent.main.js.map +1 -0
- package/dist/useEvent.mjs +37 -0
- package/dist/useEvent.module.js +37 -0
- package/dist/useEvent.module.js.map +1 -0
- package/dist/useFormReset.main.js +41 -0
- package/dist/useFormReset.main.js.map +1 -0
- package/dist/useFormReset.mjs +36 -0
- package/dist/useFormReset.module.js +36 -0
- package/dist/useFormReset.module.js.map +1 -0
- package/dist/useGlobalListeners.main.js +63 -0
- package/dist/useGlobalListeners.main.js.map +1 -0
- package/dist/useGlobalListeners.mjs +58 -0
- package/dist/useGlobalListeners.module.js +58 -0
- package/dist/useGlobalListeners.module.js.map +1 -0
- package/dist/useId.main.js +93 -0
- package/dist/useId.main.js.map +1 -0
- package/dist/useId.mjs +86 -0
- package/dist/useId.module.js +86 -0
- package/dist/useId.module.js.map +1 -0
- package/dist/useLabels.main.js +44 -0
- package/dist/useLabels.main.js.map +1 -0
- package/dist/useLabels.mjs +39 -0
- package/dist/useLabels.module.js +39 -0
- package/dist/useLabels.module.js.map +1 -0
- package/dist/useLayoutEffect.main.js +27 -0
- package/dist/useLayoutEffect.main.js.map +1 -0
- package/dist/useLayoutEffect.mjs +18 -0
- package/dist/useLayoutEffect.module.js +18 -0
- package/dist/useLayoutEffect.module.js.map +1 -0
- package/dist/useObjectRef.main.js +37 -0
- package/dist/useObjectRef.main.js.map +1 -0
- package/dist/useObjectRef.mjs +32 -0
- package/dist/useObjectRef.module.js +32 -0
- package/dist/useObjectRef.module.js.map +1 -0
- package/dist/useResizeObserver.main.js +40 -0
- package/dist/useResizeObserver.main.js.map +1 -0
- package/dist/useResizeObserver.mjs +35 -0
- package/dist/useResizeObserver.module.js +35 -0
- package/dist/useResizeObserver.module.js.map +1 -0
- package/dist/useSyncRef.main.js +32 -0
- package/dist/useSyncRef.main.js.map +1 -0
- package/dist/useSyncRef.mjs +27 -0
- package/dist/useSyncRef.module.js +27 -0
- package/dist/useSyncRef.module.js.map +1 -0
- package/dist/useUpdateEffect.main.js +38 -0
- package/dist/useUpdateEffect.main.js.map +1 -0
- package/dist/useUpdateEffect.mjs +33 -0
- package/dist/useUpdateEffect.module.js +33 -0
- package/dist/useUpdateEffect.module.js.map +1 -0
- package/dist/useValueEffect.main.js +58 -0
- package/dist/useValueEffect.main.js.map +1 -0
- package/dist/useValueEffect.mjs +53 -0
- package/dist/useValueEffect.module.js +53 -0
- package/dist/useValueEffect.module.js.map +1 -0
- package/dist/useViewportSize.main.js +56 -0
- package/dist/useViewportSize.main.js.map +1 -0
- package/dist/useViewportSize.mjs +51 -0
- package/dist/useViewportSize.module.js +51 -0
- package/dist/useViewportSize.module.js.map +1 -0
- package/package.json +5 -5
- package/src/filterDOMProps.ts +1 -0
- package/src/getScrollParent.ts +2 -10
- package/src/getScrollParents.ts +26 -0
- package/src/index.ts +4 -2
- package/src/isScrollable.ts +22 -0
- package/src/mergeRefs.ts +2 -2
- package/src/openLink.tsx +25 -9
- package/src/scrollIntoView.ts +3 -5
package/dist/import.mjs
CHANGED
|
@@ -1,865 +1,35 @@
|
|
|
1
|
+
import {mergeIds as $bdb11010cef70236$export$cd8c9cb68f842629, useId as $bdb11010cef70236$export$f680877a34711e37, useSlotId as $bdb11010cef70236$export$b4cc09c592e8fdb8} from "./useId.mjs";
|
|
2
|
+
import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.mjs";
|
|
3
|
+
import {getOwnerDocument as $431fbd86ca7dc216$export$b204af158042fbac, getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a} from "./domHelpers.mjs";
|
|
4
|
+
import {mergeProps as $3ef42575df84b30b$export$9d1611c77c2fe928} from "./mergeProps.mjs";
|
|
5
|
+
import {mergeRefs as $5dc95899b306f630$export$c9058316764c140e} from "./mergeRefs.mjs";
|
|
6
|
+
import {filterDOMProps as $65484d02dcb7eb3e$export$457c3d6518dd4c6f} from "./filterDOMProps.mjs";
|
|
7
|
+
import {focusWithoutScrolling as $7215afc6de606d6b$export$de79e2c695e052f3} from "./focusWithoutScrolling.mjs";
|
|
8
|
+
import {getOffset as $ab71dadb03a6fb2e$export$622cea445a1c5b7d} from "./getOffset.mjs";
|
|
9
|
+
import {getSyntheticLinkProps as $ea8dcbcb9ea1b556$export$51437d503373d223, openLink as $ea8dcbcb9ea1b556$export$95185d699e05d4d7, RouterProvider as $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb, shouldClientNavigate as $ea8dcbcb9ea1b556$export$efa8c9099e530235, useLinkProps as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18, useRouter as $ea8dcbcb9ea1b556$export$9a302a45f65d0572} from "./openLink.mjs";
|
|
10
|
+
import {runAfterTransition as $bbed8b41f857bcc0$export$24490316f764c430} from "./runAfterTransition.mjs";
|
|
11
|
+
import {useDrag1D as $9cc09df9fd7676be$export$7bbed75feba39706} from "./useDrag1D.mjs";
|
|
12
|
+
import {useGlobalListeners as $03deb23ff14920c4$export$4eaf04e54aa8eed6} from "./useGlobalListeners.mjs";
|
|
13
|
+
import {useLabels as $313b98861ee5dd6c$export$d6875122194c7b44} from "./useLabels.mjs";
|
|
14
|
+
import {useObjectRef as $df56164dff5785e2$export$4338b53315abf666} from "./useObjectRef.mjs";
|
|
15
|
+
import {useUpdateEffect as $4f58c5f72bcf79f7$export$496315a1608d9602} from "./useUpdateEffect.mjs";
|
|
16
|
+
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.mjs";
|
|
17
|
+
import {useResizeObserver as $9daab02d461809db$export$683480f191c0e3ea} from "./useResizeObserver.mjs";
|
|
18
|
+
import {useSyncRef as $e7801be82b4b2a53$export$4debdb1a3f0fa79e} from "./useSyncRef.mjs";
|
|
19
|
+
import {getScrollParent as $62d8ded9296f3872$export$cfa2225e87938781} from "./getScrollParent.mjs";
|
|
20
|
+
import {getScrollParents as $a40c673dc9f6d9c7$export$94ed1c92c7beeb22} from "./getScrollParents.mjs";
|
|
21
|
+
import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScrollable.mjs";
|
|
22
|
+
import {useViewportSize as $5df64b3807dc15ee$export$d699905dd57c73ca} from "./useViewportSize.mjs";
|
|
23
|
+
import {useDescription as $ef06256079686ba0$export$f8aeda7b10753fa1} from "./useDescription.mjs";
|
|
24
|
+
import {isAndroid as $c87311424ea30a05$export$a11b0059900ceec8, isAppleDevice as $c87311424ea30a05$export$e1865c3bedcd822b, isChrome as $c87311424ea30a05$export$6446a186d09e379e, isFirefox as $c87311424ea30a05$export$b7d78993b74f766d, isIOS as $c87311424ea30a05$export$fedb369cb70207f1, isIPad as $c87311424ea30a05$export$7bef049ce92e4224, isIPhone as $c87311424ea30a05$export$186c6964ca17d99, isMac as $c87311424ea30a05$export$9ac100e40613ea10, isWebKit as $c87311424ea30a05$export$78551043582a6a98} from "./platform.mjs";
|
|
25
|
+
import {useEvent as $e9faafb641e167db$export$90fc3a17d93f704c} from "./useEvent.mjs";
|
|
26
|
+
import {useValueEffect as $1dbecbe27a04f9af$export$14d238f342723f25} from "./useValueEffect.mjs";
|
|
27
|
+
import {scrollIntoView as $2f04cbc44ee30ce0$export$53a0910f038337bd, scrollIntoViewport as $2f04cbc44ee30ce0$export$c826860796309d1b} from "./scrollIntoView.mjs";
|
|
28
|
+
import {isVirtualClick as $6a7db85432448f7f$export$60278871457622de, isVirtualPointerEvent as $6a7db85432448f7f$export$29bf1b5f2c56cf63} from "./isVirtualEvent.mjs";
|
|
29
|
+
import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from "./useEffectEvent.mjs";
|
|
30
|
+
import {useDeepMemo as $5a387cc49350e6db$export$722debc0e56fea39} from "./useDeepMemo.mjs";
|
|
31
|
+
import {useFormReset as $99facab73266f662$export$5add1d006293d136} from "./useFormReset.mjs";
|
|
1
32
|
import {clamp as $4507461a1b870123$re_export$clamp, snapValueToStep as $4507461a1b870123$re_export$snapValueToStep} from "@react-stately/utils";
|
|
2
|
-
import $12uGp$react, {useState as $12uGp$useState, useRef as $12uGp$useRef, useCallback as $12uGp$useCallback, useEffect as $12uGp$useEffect, createContext as $12uGp$createContext, useMemo as $12uGp$useMemo, useContext as $12uGp$useContext} from "react";
|
|
3
|
-
import {useSSRSafeId as $12uGp$useSSRSafeId, useIsSSR as $12uGp$useIsSSR} from "@react-aria/ssr";
|
|
4
|
-
import $12uGp$clsx from "clsx";
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
8
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
10
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
*
|
|
12
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
13
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
14
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
15
|
-
* governing permissions and limitations under the License.
|
|
16
|
-
*/ /*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
/*
|
|
28
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
29
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
30
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
31
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
32
|
-
*
|
|
33
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
34
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
35
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
36
|
-
* governing permissions and limitations under the License.
|
|
37
|
-
*/
|
|
38
|
-
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? (0, $12uGp$react).useLayoutEffect : ()=>{};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/*
|
|
43
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
44
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
45
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
46
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
47
|
-
*
|
|
48
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
49
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
50
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
51
|
-
* governing permissions and limitations under the License.
|
|
52
|
-
*/
|
|
53
|
-
/*
|
|
54
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
55
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
56
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
57
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
58
|
-
*
|
|
59
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
60
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
61
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
62
|
-
* governing permissions and limitations under the License.
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
66
|
-
const ref = (0, $12uGp$useRef)(null);
|
|
67
|
-
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
68
|
-
ref.current = fn;
|
|
69
|
-
}, [
|
|
70
|
-
fn
|
|
71
|
-
]);
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
return (0, $12uGp$useCallback)((...args)=>{
|
|
74
|
-
const f = ref.current;
|
|
75
|
-
return f === null || f === void 0 ? void 0 : f(...args);
|
|
76
|
-
}, []);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
81
|
-
let [value, setValue] = (0, $12uGp$useState)(defaultValue);
|
|
82
|
-
let effect = (0, $12uGp$useRef)(null);
|
|
83
|
-
// Store the function in a ref so we can always access the current version
|
|
84
|
-
// which has the proper `value` in scope.
|
|
85
|
-
let nextRef = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
86
|
-
if (!effect.current) return;
|
|
87
|
-
// Run the generator to the next yield.
|
|
88
|
-
let newValue = effect.current.next();
|
|
89
|
-
// If the generator is done, reset the effect.
|
|
90
|
-
if (newValue.done) {
|
|
91
|
-
effect.current = null;
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
// If the value is the same as the current value,
|
|
95
|
-
// then continue to the next yield. Otherwise,
|
|
96
|
-
// set the value in state and wait for the next layout effect.
|
|
97
|
-
if (value === newValue.value) nextRef();
|
|
98
|
-
else setValue(newValue.value);
|
|
99
|
-
});
|
|
100
|
-
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
101
|
-
// If there is an effect currently running, continue to the next yield.
|
|
102
|
-
if (effect.current) nextRef();
|
|
103
|
-
});
|
|
104
|
-
let queue = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)((fn)=>{
|
|
105
|
-
effect.current = fn(value);
|
|
106
|
-
nextRef();
|
|
107
|
-
});
|
|
108
|
-
return [
|
|
109
|
-
value,
|
|
110
|
-
queue
|
|
111
|
-
];
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing
|
|
116
|
-
let $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
117
|
-
let $bdb11010cef70236$var$idsUpdaterMap = new Map();
|
|
118
|
-
function $bdb11010cef70236$export$f680877a34711e37(defaultId) {
|
|
119
|
-
let [value, setValue] = (0, $12uGp$useState)(defaultId);
|
|
120
|
-
let nextId = (0, $12uGp$useRef)(null);
|
|
121
|
-
let res = (0, $12uGp$useSSRSafeId)(value);
|
|
122
|
-
let updateValue = (0, $12uGp$useCallback)((val)=>{
|
|
123
|
-
nextId.current = val;
|
|
124
|
-
}, []);
|
|
125
|
-
if ($bdb11010cef70236$var$canUseDOM) $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
|
|
126
|
-
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
127
|
-
let r = res;
|
|
128
|
-
return ()=>{
|
|
129
|
-
$bdb11010cef70236$var$idsUpdaterMap.delete(r);
|
|
130
|
-
};
|
|
131
|
-
}, [
|
|
132
|
-
res
|
|
133
|
-
]);
|
|
134
|
-
// This cannot cause an infinite loop because the ref is updated first.
|
|
135
|
-
// eslint-disable-next-line
|
|
136
|
-
(0, $12uGp$useEffect)(()=>{
|
|
137
|
-
let newId = nextId.current;
|
|
138
|
-
if (newId) {
|
|
139
|
-
nextId.current = null;
|
|
140
|
-
setValue(newId);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
return res;
|
|
144
|
-
}
|
|
145
|
-
function $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {
|
|
146
|
-
if (idA === idB) return idA;
|
|
147
|
-
let setIdA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);
|
|
148
|
-
if (setIdA) {
|
|
149
|
-
setIdA(idB);
|
|
150
|
-
return idB;
|
|
151
|
-
}
|
|
152
|
-
let setIdB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);
|
|
153
|
-
if (setIdB) {
|
|
154
|
-
setIdB(idA);
|
|
155
|
-
return idA;
|
|
156
|
-
}
|
|
157
|
-
return idB;
|
|
158
|
-
}
|
|
159
|
-
function $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {
|
|
160
|
-
let id = $bdb11010cef70236$export$f680877a34711e37();
|
|
161
|
-
let [resolvedId, setResolvedId] = (0, $1dbecbe27a04f9af$export$14d238f342723f25)(id);
|
|
162
|
-
let updateId = (0, $12uGp$useCallback)(()=>{
|
|
163
|
-
setResolvedId(function*() {
|
|
164
|
-
yield id;
|
|
165
|
-
yield document.getElementById(id) ? id : undefined;
|
|
166
|
-
});
|
|
167
|
-
}, [
|
|
168
|
-
id,
|
|
169
|
-
setResolvedId
|
|
170
|
-
]);
|
|
171
|
-
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(updateId, [
|
|
172
|
-
id,
|
|
173
|
-
updateId,
|
|
174
|
-
...depArray
|
|
175
|
-
]);
|
|
176
|
-
return resolvedId;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
/*
|
|
181
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
182
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
183
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
184
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
-
*
|
|
186
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
187
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
188
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
189
|
-
* governing permissions and limitations under the License.
|
|
190
|
-
*/ /**
|
|
191
|
-
* Calls all functions in the order they were chained with the same arguments.
|
|
192
|
-
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
193
|
-
return (...args)=>{
|
|
194
|
-
for (let callback of callbacks)if (typeof callback === "function") callback(...args);
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
|
|
200
|
-
var _el_ownerDocument;
|
|
201
|
-
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
202
|
-
};
|
|
203
|
-
const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
|
|
204
|
-
if (el && "window" in el && el.window === el) return el;
|
|
205
|
-
const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);
|
|
206
|
-
return doc.defaultView || window;
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/*
|
|
211
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
212
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
213
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
214
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
215
|
-
*
|
|
216
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
217
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
218
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
219
|
-
* governing permissions and limitations under the License.
|
|
220
|
-
*/
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
224
|
-
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
225
|
-
// with an empty object and adding properties as we go.
|
|
226
|
-
let result = {
|
|
227
|
-
...args[0]
|
|
228
|
-
};
|
|
229
|
-
for(let i = 1; i < args.length; i++){
|
|
230
|
-
let props = args[i];
|
|
231
|
-
for(let key in props){
|
|
232
|
-
let a = result[key];
|
|
233
|
-
let b = props[key];
|
|
234
|
-
// Chain events
|
|
235
|
-
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
|
|
236
|
-
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
|
|
237
|
-
else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") result[key] = (0, $12uGp$clsx)(a, b);
|
|
238
|
-
else if (key === "id" && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
|
|
239
|
-
else result[key] = b !== undefined ? b : a;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return result;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
/*
|
|
247
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
248
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
249
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
250
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
251
|
-
*
|
|
252
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
253
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
254
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
255
|
-
* governing permissions and limitations under the License.
|
|
256
|
-
*/ function $5dc95899b306f630$export$c9058316764c140e(...refs) {
|
|
257
|
-
if (refs.length === 1) return refs[0];
|
|
258
|
-
return (value)=>{
|
|
259
|
-
for (let ref of refs){
|
|
260
|
-
if (typeof ref === "function") ref(value);
|
|
261
|
-
else if (ref != null) ref.current = value;
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/*
|
|
268
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
269
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
270
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
271
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
272
|
-
*
|
|
273
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
274
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
275
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
276
|
-
* governing permissions and limitations under the License.
|
|
277
|
-
*/ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([
|
|
278
|
-
"id"
|
|
279
|
-
]);
|
|
280
|
-
const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
|
|
281
|
-
"aria-label",
|
|
282
|
-
"aria-labelledby",
|
|
283
|
-
"aria-describedby",
|
|
284
|
-
"aria-details"
|
|
285
|
-
]);
|
|
286
|
-
// See LinkDOMProps in dom.d.ts.
|
|
287
|
-
const $65484d02dcb7eb3e$var$linkPropNames = new Set([
|
|
288
|
-
"href",
|
|
289
|
-
"target",
|
|
290
|
-
"rel",
|
|
291
|
-
"download",
|
|
292
|
-
"ping",
|
|
293
|
-
"referrerPolicy"
|
|
294
|
-
]);
|
|
295
|
-
const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
296
|
-
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
297
|
-
let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
|
|
298
|
-
let filteredProps = {};
|
|
299
|
-
for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
300
|
-
return filteredProps;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
/*
|
|
305
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
306
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
307
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
308
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
309
|
-
*
|
|
310
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
311
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
312
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
313
|
-
* governing permissions and limitations under the License.
|
|
314
|
-
*/ function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
|
|
315
|
-
if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({
|
|
316
|
-
preventScroll: true
|
|
317
|
-
});
|
|
318
|
-
else {
|
|
319
|
-
let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
|
|
320
|
-
element.focus();
|
|
321
|
-
$7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
let $7215afc6de606d6b$var$supportsPreventScrollCached = null;
|
|
325
|
-
function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
326
|
-
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
|
|
327
|
-
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
|
|
328
|
-
try {
|
|
329
|
-
let focusElem = document.createElement("div");
|
|
330
|
-
focusElem.focus({
|
|
331
|
-
get preventScroll () {
|
|
332
|
-
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
|
|
333
|
-
return true;
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
} catch (e) {
|
|
337
|
-
// Ignore
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
return $7215afc6de606d6b$var$supportsPreventScrollCached;
|
|
341
|
-
}
|
|
342
|
-
function $7215afc6de606d6b$var$getScrollableElements(element) {
|
|
343
|
-
let parent = element.parentNode;
|
|
344
|
-
let scrollableElements = [];
|
|
345
|
-
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
346
|
-
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
347
|
-
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
348
|
-
element: parent,
|
|
349
|
-
scrollTop: parent.scrollTop,
|
|
350
|
-
scrollLeft: parent.scrollLeft
|
|
351
|
-
});
|
|
352
|
-
parent = parent.parentNode;
|
|
353
|
-
}
|
|
354
|
-
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
|
|
355
|
-
element: rootScrollingElement,
|
|
356
|
-
scrollTop: rootScrollingElement.scrollTop,
|
|
357
|
-
scrollLeft: rootScrollingElement.scrollLeft
|
|
358
|
-
});
|
|
359
|
-
return scrollableElements;
|
|
360
|
-
}
|
|
361
|
-
function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
|
|
362
|
-
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
|
|
363
|
-
element.scrollTop = scrollTop;
|
|
364
|
-
element.scrollLeft = scrollLeft;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
/*
|
|
370
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
371
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
372
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
373
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
374
|
-
*
|
|
375
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
376
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
377
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
378
|
-
* governing permissions and limitations under the License.
|
|
379
|
-
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") {
|
|
380
|
-
let rect = element.getBoundingClientRect();
|
|
381
|
-
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom;
|
|
382
|
-
return orientation === "horizontal" ? rect.left : rect.top;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
/*
|
|
387
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
388
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
389
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
390
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
391
|
-
*
|
|
392
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
393
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
394
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
395
|
-
* governing permissions and limitations under the License.
|
|
396
|
-
*/ /*
|
|
397
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
398
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
399
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
400
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
401
|
-
*
|
|
402
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
403
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
404
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
405
|
-
* governing permissions and limitations under the License.
|
|
406
|
-
*/ function $c87311424ea30a05$var$testUserAgent(re) {
|
|
407
|
-
var _window_navigator_userAgentData;
|
|
408
|
-
if (typeof window === "undefined" || window.navigator == null) return false;
|
|
409
|
-
return ((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);
|
|
410
|
-
}
|
|
411
|
-
function $c87311424ea30a05$var$testPlatform(re) {
|
|
412
|
-
var _window_navigator_userAgentData;
|
|
413
|
-
return typeof window !== "undefined" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator["userAgentData"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;
|
|
414
|
-
}
|
|
415
|
-
function $c87311424ea30a05$export$9ac100e40613ea10() {
|
|
416
|
-
return $c87311424ea30a05$var$testPlatform(/^Mac/i);
|
|
417
|
-
}
|
|
418
|
-
function $c87311424ea30a05$export$186c6964ca17d99() {
|
|
419
|
-
return $c87311424ea30a05$var$testPlatform(/^iPhone/i);
|
|
420
|
-
}
|
|
421
|
-
function $c87311424ea30a05$export$7bef049ce92e4224() {
|
|
422
|
-
return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
423
|
-
$c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;
|
|
424
|
-
}
|
|
425
|
-
function $c87311424ea30a05$export$fedb369cb70207f1() {
|
|
426
|
-
return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();
|
|
427
|
-
}
|
|
428
|
-
function $c87311424ea30a05$export$e1865c3bedcd822b() {
|
|
429
|
-
return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
|
|
430
|
-
}
|
|
431
|
-
function $c87311424ea30a05$export$78551043582a6a98() {
|
|
432
|
-
return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
|
|
433
|
-
}
|
|
434
|
-
function $c87311424ea30a05$export$6446a186d09e379e() {
|
|
435
|
-
return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
|
|
436
|
-
}
|
|
437
|
-
function $c87311424ea30a05$export$a11b0059900ceec8() {
|
|
438
|
-
return $c87311424ea30a05$var$testUserAgent(/Android/i);
|
|
439
|
-
}
|
|
440
|
-
function $c87311424ea30a05$export$b7d78993b74f766d() {
|
|
441
|
-
return $c87311424ea30a05$var$testUserAgent(/Firefox/i);
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
const $ea8dcbcb9ea1b556$var$RouterContext = /*#__PURE__*/ (0, $12uGp$createContext)({
|
|
448
|
-
isNative: true,
|
|
449
|
-
open: $ea8dcbcb9ea1b556$var$openSyntheticLink
|
|
450
|
-
});
|
|
451
|
-
function $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb(props) {
|
|
452
|
-
let { children: children, navigate: navigate } = props;
|
|
453
|
-
let ctx = (0, $12uGp$useMemo)(()=>({
|
|
454
|
-
isNative: false,
|
|
455
|
-
open: (target, modifiers)=>{
|
|
456
|
-
$ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link)=>{
|
|
457
|
-
if ($ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers)) navigate(link.pathname + link.search + link.hash);
|
|
458
|
-
else $ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers);
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
}), [
|
|
462
|
-
navigate
|
|
463
|
-
]);
|
|
464
|
-
return /*#__PURE__*/ (0, $12uGp$react).createElement($ea8dcbcb9ea1b556$var$RouterContext.Provider, {
|
|
465
|
-
value: ctx
|
|
466
|
-
}, children);
|
|
467
|
-
}
|
|
468
|
-
function $ea8dcbcb9ea1b556$export$9a302a45f65d0572() {
|
|
469
|
-
return (0, $12uGp$useContext)($ea8dcbcb9ea1b556$var$RouterContext);
|
|
470
|
-
}
|
|
471
|
-
function $ea8dcbcb9ea1b556$export$efa8c9099e530235(link, modifiers) {
|
|
472
|
-
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
|
|
473
|
-
let target = link.getAttribute("target");
|
|
474
|
-
return (!target || target === "_self") && link.origin === location.origin && !link.hasAttribute("download") && !modifiers.metaKey && // open in new tab (mac)
|
|
475
|
-
!modifiers.ctrlKey && // open in new tab (windows)
|
|
476
|
-
!modifiers.altKey && // download
|
|
477
|
-
!modifiers.shiftKey;
|
|
478
|
-
}
|
|
479
|
-
function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening = true) {
|
|
480
|
-
var _window_event_type, _window_event;
|
|
481
|
-
let { metaKey: metaKey, ctrlKey: ctrlKey, altKey: altKey, shiftKey: shiftKey } = modifiers;
|
|
482
|
-
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
|
|
483
|
-
// will prevent links with target="_blank" from opening. However, it does allow the event if the
|
|
484
|
-
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
|
|
485
|
-
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
|
|
486
|
-
if ((0, $c87311424ea30a05$export$b7d78993b74f766d)() && ((_window_event = window.event) === null || _window_event === void 0 ? void 0 : (_window_event_type = _window_event.type) === null || _window_event_type === void 0 ? void 0 : _window_event_type.startsWith("key")) && target.target === "_blank") {
|
|
487
|
-
if ((0, $c87311424ea30a05$export$9ac100e40613ea10)()) metaKey = true;
|
|
488
|
-
else ctrlKey = true;
|
|
489
|
-
}
|
|
490
|
-
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
|
|
491
|
-
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
|
|
492
|
-
let event = (0, $c87311424ea30a05$export$78551043582a6a98)() && (0, $c87311424ea30a05$export$9ac100e40613ea10)() && !(0, $c87311424ea30a05$export$7bef049ce92e4224)() && true ? new KeyboardEvent("keydown", {
|
|
493
|
-
keyIdentifier: "Enter",
|
|
494
|
-
metaKey: metaKey,
|
|
495
|
-
ctrlKey: ctrlKey,
|
|
496
|
-
altKey: altKey,
|
|
497
|
-
shiftKey: shiftKey
|
|
498
|
-
}) : new MouseEvent("click", {
|
|
499
|
-
metaKey: metaKey,
|
|
500
|
-
ctrlKey: ctrlKey,
|
|
501
|
-
altKey: altKey,
|
|
502
|
-
shiftKey: shiftKey,
|
|
503
|
-
bubbles: true,
|
|
504
|
-
cancelable: true
|
|
505
|
-
});
|
|
506
|
-
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = setOpening;
|
|
507
|
-
(0, $7215afc6de606d6b$export$de79e2c695e052f3)(target);
|
|
508
|
-
target.dispatchEvent(event);
|
|
509
|
-
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
510
|
-
}
|
|
511
|
-
// https://github.com/parcel-bundler/parcel/issues/8724
|
|
512
|
-
$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening = false;
|
|
513
|
-
function $ea8dcbcb9ea1b556$var$getSyntheticLink(target, open) {
|
|
514
|
-
if (target instanceof HTMLAnchorElement) open(target);
|
|
515
|
-
else if (target.hasAttribute("data-href")) {
|
|
516
|
-
let link = document.createElement("a");
|
|
517
|
-
link.href = target.getAttribute("data-href");
|
|
518
|
-
if (target.hasAttribute("data-target")) link.target = target.getAttribute("data-target");
|
|
519
|
-
if (target.hasAttribute("data-rel")) link.rel = target.getAttribute("data-rel");
|
|
520
|
-
if (target.hasAttribute("data-download")) link.download = target.getAttribute("data-download");
|
|
521
|
-
if (target.hasAttribute("data-ping")) link.ping = target.getAttribute("data-ping");
|
|
522
|
-
if (target.hasAttribute("data-referrer-policy")) link.referrerPolicy = target.getAttribute("data-referrer-policy");
|
|
523
|
-
target.appendChild(link);
|
|
524
|
-
open(link);
|
|
525
|
-
target.removeChild(link);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
function $ea8dcbcb9ea1b556$var$openSyntheticLink(target, modifiers) {
|
|
529
|
-
$ea8dcbcb9ea1b556$var$getSyntheticLink(target, (link)=>$ea8dcbcb9ea1b556$export$95185d699e05d4d7(link, modifiers));
|
|
530
|
-
}
|
|
531
|
-
function $ea8dcbcb9ea1b556$export$51437d503373d223(props) {
|
|
532
|
-
return {
|
|
533
|
-
"data-href": props.href,
|
|
534
|
-
"data-target": props.target,
|
|
535
|
-
"data-rel": props.rel,
|
|
536
|
-
"data-download": props.download,
|
|
537
|
-
"data-ping": props.ping,
|
|
538
|
-
"data-referrer-policy": props.referrerPolicy
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
/*
|
|
544
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
545
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
546
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
547
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
548
|
-
*
|
|
549
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
550
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
551
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
552
|
-
* governing permissions and limitations under the License.
|
|
553
|
-
*/ // We store a global list of elements that are currently transitioning,
|
|
554
|
-
// mapped to a set of CSS properties that are transitioning for that element.
|
|
555
|
-
// This is necessary rather than a simple count of transitions because of browser
|
|
556
|
-
// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather
|
|
557
|
-
// than one or the other. So we need to track what's actually transitioning so that
|
|
558
|
-
// we can ignore these duplicate events.
|
|
559
|
-
let $bbed8b41f857bcc0$var$transitionsByElement = new Map();
|
|
560
|
-
// A list of callbacks to call once there are no transitioning elements.
|
|
561
|
-
let $bbed8b41f857bcc0$var$transitionCallbacks = new Set();
|
|
562
|
-
function $bbed8b41f857bcc0$var$setupGlobalEvents() {
|
|
563
|
-
if (typeof window === "undefined") return;
|
|
564
|
-
function isTransitionEvent(event) {
|
|
565
|
-
return "propertyName" in event;
|
|
566
|
-
}
|
|
567
|
-
let onTransitionStart = (e)=>{
|
|
568
|
-
if (!isTransitionEvent(e) || !e.target) return;
|
|
569
|
-
// Add the transitioning property to the list for this element.
|
|
570
|
-
let transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
571
|
-
if (!transitions) {
|
|
572
|
-
transitions = new Set();
|
|
573
|
-
$bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);
|
|
574
|
-
// The transitioncancel event must be registered on the element itself, rather than as a global
|
|
575
|
-
// event. This enables us to handle when the node is deleted from the document while it is transitioning.
|
|
576
|
-
// In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.
|
|
577
|
-
e.target.addEventListener("transitioncancel", onTransitionEnd, {
|
|
578
|
-
once: true
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
transitions.add(e.propertyName);
|
|
582
|
-
};
|
|
583
|
-
let onTransitionEnd = (e)=>{
|
|
584
|
-
if (!isTransitionEvent(e) || !e.target) return;
|
|
585
|
-
// Remove property from list of transitioning properties.
|
|
586
|
-
let properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);
|
|
587
|
-
if (!properties) return;
|
|
588
|
-
properties.delete(e.propertyName);
|
|
589
|
-
// If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.
|
|
590
|
-
if (properties.size === 0) {
|
|
591
|
-
e.target.removeEventListener("transitioncancel", onTransitionEnd);
|
|
592
|
-
$bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);
|
|
593
|
-
}
|
|
594
|
-
// If no transitioning elements, call all of the queued callbacks.
|
|
595
|
-
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {
|
|
596
|
-
for (let cb of $bbed8b41f857bcc0$var$transitionCallbacks)cb();
|
|
597
|
-
$bbed8b41f857bcc0$var$transitionCallbacks.clear();
|
|
598
|
-
}
|
|
599
|
-
};
|
|
600
|
-
document.body.addEventListener("transitionrun", onTransitionStart);
|
|
601
|
-
document.body.addEventListener("transitionend", onTransitionEnd);
|
|
602
|
-
}
|
|
603
|
-
if (typeof document !== "undefined") {
|
|
604
|
-
if (document.readyState !== "loading") $bbed8b41f857bcc0$var$setupGlobalEvents();
|
|
605
|
-
else document.addEventListener("DOMContentLoaded", $bbed8b41f857bcc0$var$setupGlobalEvents);
|
|
606
|
-
}
|
|
607
|
-
function $bbed8b41f857bcc0$export$24490316f764c430(fn) {
|
|
608
|
-
// Wait one frame to see if an animation starts, e.g. a transition on mount.
|
|
609
|
-
requestAnimationFrame(()=>{
|
|
610
|
-
// If no transitions are running, call the function immediately.
|
|
611
|
-
// Otherwise, add it to a list of callbacks to run at the end of the animation.
|
|
612
|
-
if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) fn();
|
|
613
|
-
else $bbed8b41f857bcc0$var$transitionCallbacks.add(fn);
|
|
614
|
-
});
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
/*
|
|
619
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
620
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
621
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
622
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
623
|
-
*
|
|
624
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
625
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
626
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
627
|
-
* governing permissions and limitations under the License.
|
|
628
|
-
*/ /* eslint-disable rulesdir/pure-render */
|
|
629
|
-
|
|
630
|
-
// Keep track of elements that we are currently handling dragging for via useDrag1D.
|
|
631
|
-
// If there's an ancestor and a descendant both using useDrag1D(), and the user starts
|
|
632
|
-
// dragging the descendant, we don't want useDrag1D events to fire for the ancestor.
|
|
633
|
-
const $9cc09df9fd7676be$var$draggingElements = [];
|
|
634
|
-
function $9cc09df9fd7676be$export$7bbed75feba39706(props) {
|
|
635
|
-
console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");
|
|
636
|
-
let { containerRef: containerRef, reverse: reverse, orientation: orientation, onHover: onHover, onDrag: onDrag, onPositionChange: onPositionChange, onIncrement: onIncrement, onDecrement: onDecrement, onIncrementToMax: onIncrementToMax, onDecrementToMin: onDecrementToMin, onCollapseToggle: onCollapseToggle } = props;
|
|
637
|
-
let getPosition = (e)=>orientation === "horizontal" ? e.clientX : e.clientY;
|
|
638
|
-
let getNextOffset = (e)=>{
|
|
639
|
-
let containerOffset = (0, $ab71dadb03a6fb2e$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation);
|
|
640
|
-
let mouseOffset = getPosition(e);
|
|
641
|
-
let nextOffset = reverse ? containerOffset - mouseOffset : mouseOffset - containerOffset;
|
|
642
|
-
return nextOffset;
|
|
643
|
-
};
|
|
644
|
-
let dragging = (0, $12uGp$useRef)(false);
|
|
645
|
-
let prevPosition = (0, $12uGp$useRef)(0);
|
|
646
|
-
// Keep track of the current handlers in a ref so that the events can access them.
|
|
647
|
-
let handlers = (0, $12uGp$useRef)({
|
|
648
|
-
onPositionChange: onPositionChange,
|
|
649
|
-
onDrag: onDrag
|
|
650
|
-
});
|
|
651
|
-
handlers.current.onDrag = onDrag;
|
|
652
|
-
handlers.current.onPositionChange = onPositionChange;
|
|
653
|
-
let onMouseDragged = (e)=>{
|
|
654
|
-
e.preventDefault();
|
|
655
|
-
let nextOffset = getNextOffset(e);
|
|
656
|
-
if (!dragging.current) {
|
|
657
|
-
dragging.current = true;
|
|
658
|
-
if (handlers.current.onDrag) handlers.current.onDrag(true);
|
|
659
|
-
if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);
|
|
660
|
-
}
|
|
661
|
-
if (prevPosition.current === nextOffset) return;
|
|
662
|
-
prevPosition.current = nextOffset;
|
|
663
|
-
if (onPositionChange) onPositionChange(nextOffset);
|
|
664
|
-
};
|
|
665
|
-
let onMouseUp = (e)=>{
|
|
666
|
-
const target = e.target;
|
|
667
|
-
dragging.current = false;
|
|
668
|
-
let nextOffset = getNextOffset(e);
|
|
669
|
-
if (handlers.current.onDrag) handlers.current.onDrag(false);
|
|
670
|
-
if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);
|
|
671
|
-
$9cc09df9fd7676be$var$draggingElements.splice($9cc09df9fd7676be$var$draggingElements.indexOf(target), 1);
|
|
672
|
-
window.removeEventListener("mouseup", onMouseUp, false);
|
|
673
|
-
window.removeEventListener("mousemove", onMouseDragged, false);
|
|
674
|
-
};
|
|
675
|
-
let onMouseDown = (e)=>{
|
|
676
|
-
const target = e.currentTarget;
|
|
677
|
-
// If we're already handling dragging on a descendant with useDrag1D, then
|
|
678
|
-
// we don't want to handle the drag motion on this target as well.
|
|
679
|
-
if ($9cc09df9fd7676be$var$draggingElements.some((elt)=>target.contains(elt))) return;
|
|
680
|
-
$9cc09df9fd7676be$var$draggingElements.push(target);
|
|
681
|
-
window.addEventListener("mousemove", onMouseDragged, false);
|
|
682
|
-
window.addEventListener("mouseup", onMouseUp, false);
|
|
683
|
-
};
|
|
684
|
-
let onMouseEnter = ()=>{
|
|
685
|
-
if (onHover) onHover(true);
|
|
686
|
-
};
|
|
687
|
-
let onMouseOut = ()=>{
|
|
688
|
-
if (onHover) onHover(false);
|
|
689
|
-
};
|
|
690
|
-
let onKeyDown = (e)=>{
|
|
691
|
-
switch(e.key){
|
|
692
|
-
case "Left":
|
|
693
|
-
case "ArrowLeft":
|
|
694
|
-
if (orientation === "horizontal") {
|
|
695
|
-
e.preventDefault();
|
|
696
|
-
if (onDecrement && !reverse) onDecrement();
|
|
697
|
-
else if (onIncrement && reverse) onIncrement();
|
|
698
|
-
}
|
|
699
|
-
break;
|
|
700
|
-
case "Up":
|
|
701
|
-
case "ArrowUp":
|
|
702
|
-
if (orientation === "vertical") {
|
|
703
|
-
e.preventDefault();
|
|
704
|
-
if (onDecrement && !reverse) onDecrement();
|
|
705
|
-
else if (onIncrement && reverse) onIncrement();
|
|
706
|
-
}
|
|
707
|
-
break;
|
|
708
|
-
case "Right":
|
|
709
|
-
case "ArrowRight":
|
|
710
|
-
if (orientation === "horizontal") {
|
|
711
|
-
e.preventDefault();
|
|
712
|
-
if (onIncrement && !reverse) onIncrement();
|
|
713
|
-
else if (onDecrement && reverse) onDecrement();
|
|
714
|
-
}
|
|
715
|
-
break;
|
|
716
|
-
case "Down":
|
|
717
|
-
case "ArrowDown":
|
|
718
|
-
if (orientation === "vertical") {
|
|
719
|
-
e.preventDefault();
|
|
720
|
-
if (onIncrement && !reverse) onIncrement();
|
|
721
|
-
else if (onDecrement && reverse) onDecrement();
|
|
722
|
-
}
|
|
723
|
-
break;
|
|
724
|
-
case "Home":
|
|
725
|
-
e.preventDefault();
|
|
726
|
-
if (onDecrementToMin) onDecrementToMin();
|
|
727
|
-
break;
|
|
728
|
-
case "End":
|
|
729
|
-
e.preventDefault();
|
|
730
|
-
if (onIncrementToMax) onIncrementToMax();
|
|
731
|
-
break;
|
|
732
|
-
case "Enter":
|
|
733
|
-
e.preventDefault();
|
|
734
|
-
if (onCollapseToggle) onCollapseToggle();
|
|
735
|
-
break;
|
|
736
|
-
}
|
|
737
|
-
};
|
|
738
|
-
return {
|
|
739
|
-
onMouseDown: onMouseDown,
|
|
740
|
-
onMouseEnter: onMouseEnter,
|
|
741
|
-
onMouseOut: onMouseOut,
|
|
742
|
-
onKeyDown: onKeyDown
|
|
743
|
-
};
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
/*
|
|
748
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
749
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
750
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
751
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
752
|
-
*
|
|
753
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
754
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
755
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
756
|
-
* governing permissions and limitations under the License.
|
|
757
|
-
*/
|
|
758
|
-
function $03deb23ff14920c4$export$4eaf04e54aa8eed6() {
|
|
759
|
-
let globalListeners = (0, $12uGp$useRef)(new Map());
|
|
760
|
-
let addGlobalListener = (0, $12uGp$useCallback)((eventTarget, type, listener, options)=>{
|
|
761
|
-
// Make sure we remove the listener after it is called with the `once` option.
|
|
762
|
-
let fn = (options === null || options === void 0 ? void 0 : options.once) ? (...args)=>{
|
|
763
|
-
globalListeners.current.delete(listener);
|
|
764
|
-
listener(...args);
|
|
765
|
-
} : listener;
|
|
766
|
-
globalListeners.current.set(listener, {
|
|
767
|
-
type: type,
|
|
768
|
-
eventTarget: eventTarget,
|
|
769
|
-
fn: fn,
|
|
770
|
-
options: options
|
|
771
|
-
});
|
|
772
|
-
eventTarget.addEventListener(type, listener, options);
|
|
773
|
-
}, []);
|
|
774
|
-
let removeGlobalListener = (0, $12uGp$useCallback)((eventTarget, type, listener, options)=>{
|
|
775
|
-
var _globalListeners_current_get;
|
|
776
|
-
let fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;
|
|
777
|
-
eventTarget.removeEventListener(type, fn, options);
|
|
778
|
-
globalListeners.current.delete(listener);
|
|
779
|
-
}, []);
|
|
780
|
-
let removeAllGlobalListeners = (0, $12uGp$useCallback)(()=>{
|
|
781
|
-
globalListeners.current.forEach((value, key)=>{
|
|
782
|
-
removeGlobalListener(value.eventTarget, value.type, key, value.options);
|
|
783
|
-
});
|
|
784
|
-
}, [
|
|
785
|
-
removeGlobalListener
|
|
786
|
-
]);
|
|
787
|
-
// eslint-disable-next-line arrow-body-style
|
|
788
|
-
(0, $12uGp$useEffect)(()=>{
|
|
789
|
-
return removeAllGlobalListeners;
|
|
790
|
-
}, [
|
|
791
|
-
removeAllGlobalListeners
|
|
792
|
-
]);
|
|
793
|
-
return {
|
|
794
|
-
addGlobalListener: addGlobalListener,
|
|
795
|
-
removeGlobalListener: removeGlobalListener,
|
|
796
|
-
removeAllGlobalListeners: removeAllGlobalListeners
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
/*
|
|
802
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
803
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
804
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
805
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
806
|
-
*
|
|
807
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
808
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
809
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
810
|
-
* governing permissions and limitations under the License.
|
|
811
|
-
*/
|
|
812
|
-
function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
|
|
813
|
-
let { id: id, "aria-label": label, "aria-labelledby": labelledBy } = props;
|
|
814
|
-
// If there is both an aria-label and aria-labelledby,
|
|
815
|
-
// combine them by pointing to the element itself.
|
|
816
|
-
id = (0, $bdb11010cef70236$export$f680877a34711e37)(id);
|
|
817
|
-
if (labelledBy && label) {
|
|
818
|
-
let ids = new Set([
|
|
819
|
-
id,
|
|
820
|
-
...labelledBy.trim().split(/\s+/)
|
|
821
|
-
]);
|
|
822
|
-
labelledBy = [
|
|
823
|
-
...ids
|
|
824
|
-
].join(" ");
|
|
825
|
-
} else if (labelledBy) labelledBy = labelledBy.trim().split(/\s+/).join(" ");
|
|
826
|
-
// If no labels are provided, use the default
|
|
827
|
-
if (!label && !labelledBy && defaultLabel) label = defaultLabel;
|
|
828
|
-
return {
|
|
829
|
-
id: id,
|
|
830
|
-
"aria-label": label,
|
|
831
|
-
"aria-labelledby": labelledBy
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
/*
|
|
837
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
838
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
839
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
840
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
841
|
-
*
|
|
842
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
843
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
844
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
845
|
-
* governing permissions and limitations under the License.
|
|
846
|
-
*/
|
|
847
|
-
function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
|
|
848
|
-
const objRef = (0, $12uGp$useRef)(null);
|
|
849
|
-
return (0, $12uGp$useMemo)(()=>({
|
|
850
|
-
get current () {
|
|
851
|
-
return objRef.current;
|
|
852
|
-
},
|
|
853
|
-
set current (value){
|
|
854
|
-
objRef.current = value;
|
|
855
|
-
if (typeof forwardedRef === "function") forwardedRef(value);
|
|
856
|
-
else if (forwardedRef) forwardedRef.current = value;
|
|
857
|
-
}
|
|
858
|
-
}), [
|
|
859
|
-
forwardedRef
|
|
860
|
-
]);
|
|
861
|
-
}
|
|
862
|
-
|
|
863
33
|
|
|
864
34
|
/*
|
|
865
35
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -872,408 +42,38 @@ function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
|
|
|
872
42
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
873
43
|
* governing permissions and limitations under the License.
|
|
874
44
|
*/
|
|
875
|
-
function $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {
|
|
876
|
-
const isInitialMount = (0, $12uGp$useRef)(true);
|
|
877
|
-
const lastDeps = (0, $12uGp$useRef)(null);
|
|
878
|
-
(0, $12uGp$useEffect)(()=>{
|
|
879
|
-
isInitialMount.current = true;
|
|
880
|
-
return ()=>{
|
|
881
|
-
isInitialMount.current = false;
|
|
882
|
-
};
|
|
883
|
-
}, []);
|
|
884
|
-
(0, $12uGp$useEffect)(()=>{
|
|
885
|
-
if (isInitialMount.current) isInitialMount.current = false;
|
|
886
|
-
else if (!lastDeps.current || dependencies.some((dep, i)=>!Object.is(dep, lastDeps[i]))) effect();
|
|
887
|
-
lastDeps.current = dependencies;
|
|
888
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
889
|
-
}, dependencies);
|
|
890
|
-
}
|
|
891
|
-
|
|
892
45
|
|
|
893
46
|
|
|
894
47
|
|
|
895
|
-
function $9daab02d461809db$var$hasResizeObserver() {
|
|
896
|
-
return typeof window.ResizeObserver !== "undefined";
|
|
897
|
-
}
|
|
898
|
-
function $9daab02d461809db$export$683480f191c0e3ea(options) {
|
|
899
|
-
const { ref: ref, onResize: onResize } = options;
|
|
900
|
-
(0, $12uGp$useEffect)(()=>{
|
|
901
|
-
let element = ref === null || ref === void 0 ? void 0 : ref.current;
|
|
902
|
-
if (!element) return;
|
|
903
|
-
if (!$9daab02d461809db$var$hasResizeObserver()) {
|
|
904
|
-
window.addEventListener("resize", onResize, false);
|
|
905
|
-
return ()=>{
|
|
906
|
-
window.removeEventListener("resize", onResize, false);
|
|
907
|
-
};
|
|
908
|
-
} else {
|
|
909
|
-
const resizeObserverInstance = new window.ResizeObserver((entries)=>{
|
|
910
|
-
if (!entries.length) return;
|
|
911
|
-
onResize();
|
|
912
|
-
});
|
|
913
|
-
resizeObserverInstance.observe(element);
|
|
914
|
-
return ()=>{
|
|
915
|
-
if (element) resizeObserverInstance.unobserve(element);
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
}, [
|
|
919
|
-
onResize,
|
|
920
|
-
ref
|
|
921
|
-
]);
|
|
922
|
-
}
|
|
923
48
|
|
|
924
49
|
|
|
925
|
-
/*
|
|
926
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
927
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
928
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
929
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
930
|
-
*
|
|
931
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
932
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
933
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
934
|
-
* governing permissions and limitations under the License.
|
|
935
|
-
*/
|
|
936
|
-
function $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {
|
|
937
|
-
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
938
|
-
if (context && context.ref && ref) {
|
|
939
|
-
context.ref.current = ref.current;
|
|
940
|
-
return ()=>{
|
|
941
|
-
if (context.ref) context.ref.current = null;
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
});
|
|
945
|
-
}
|
|
946
50
|
|
|
947
51
|
|
|
948
|
-
/*
|
|
949
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
950
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
951
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
952
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
953
|
-
*
|
|
954
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
955
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
956
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
957
|
-
* governing permissions and limitations under the License.
|
|
958
|
-
*/ function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
959
|
-
let scrollableNode = node;
|
|
960
|
-
if ($62d8ded9296f3872$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
961
|
-
while(scrollableNode && !$62d8ded9296f3872$export$2bb74740c4e19def(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;
|
|
962
|
-
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
963
|
-
}
|
|
964
|
-
function $62d8ded9296f3872$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
965
|
-
let style = window.getComputedStyle(node);
|
|
966
|
-
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
967
|
-
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
968
|
-
return isScrollable;
|
|
969
|
-
}
|
|
970
52
|
|
|
971
53
|
|
|
972
|
-
/*
|
|
973
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
974
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
975
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
976
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
977
|
-
*
|
|
978
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
979
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
980
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
981
|
-
* governing permissions and limitations under the License.
|
|
982
|
-
*/
|
|
983
54
|
|
|
984
|
-
// @ts-ignore
|
|
985
|
-
let $5df64b3807dc15ee$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
986
|
-
function $5df64b3807dc15ee$export$d699905dd57c73ca() {
|
|
987
|
-
let isSSR = (0, $12uGp$useIsSSR)();
|
|
988
|
-
let [size, setSize] = (0, $12uGp$useState)(()=>isSSR ? {
|
|
989
|
-
width: 0,
|
|
990
|
-
height: 0
|
|
991
|
-
} : $5df64b3807dc15ee$var$getViewportSize());
|
|
992
|
-
(0, $12uGp$useEffect)(()=>{
|
|
993
|
-
// Use visualViewport api to track available height even on iOS virtual keyboard opening
|
|
994
|
-
let onResize = ()=>{
|
|
995
|
-
setSize((size)=>{
|
|
996
|
-
let newSize = $5df64b3807dc15ee$var$getViewportSize();
|
|
997
|
-
if (newSize.width === size.width && newSize.height === size.height) return size;
|
|
998
|
-
return newSize;
|
|
999
|
-
});
|
|
1000
|
-
};
|
|
1001
|
-
if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener("resize", onResize);
|
|
1002
|
-
else $5df64b3807dc15ee$var$visualViewport.addEventListener("resize", onResize);
|
|
1003
|
-
return ()=>{
|
|
1004
|
-
if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener("resize", onResize);
|
|
1005
|
-
else $5df64b3807dc15ee$var$visualViewport.removeEventListener("resize", onResize);
|
|
1006
|
-
};
|
|
1007
|
-
}, []);
|
|
1008
|
-
return size;
|
|
1009
|
-
}
|
|
1010
|
-
function $5df64b3807dc15ee$var$getViewportSize() {
|
|
1011
|
-
return {
|
|
1012
|
-
width: $5df64b3807dc15ee$var$visualViewport && ($5df64b3807dc15ee$var$visualViewport === null || $5df64b3807dc15ee$var$visualViewport === void 0 ? void 0 : $5df64b3807dc15ee$var$visualViewport.width) || window.innerWidth,
|
|
1013
|
-
height: $5df64b3807dc15ee$var$visualViewport && ($5df64b3807dc15ee$var$visualViewport === null || $5df64b3807dc15ee$var$visualViewport === void 0 ? void 0 : $5df64b3807dc15ee$var$visualViewport.height) || window.innerHeight
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
55
|
|
|
1017
56
|
|
|
1018
|
-
/*
|
|
1019
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
1020
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1021
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1022
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1023
|
-
*
|
|
1024
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1025
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1026
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1027
|
-
* governing permissions and limitations under the License.
|
|
1028
|
-
*/
|
|
1029
57
|
|
|
1030
|
-
let $ef06256079686ba0$var$descriptionId = 0;
|
|
1031
|
-
const $ef06256079686ba0$var$descriptionNodes = new Map();
|
|
1032
|
-
function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
|
|
1033
|
-
let [id, setId] = (0, $12uGp$useState)();
|
|
1034
|
-
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
|
|
1035
|
-
if (!description) return;
|
|
1036
|
-
let desc = $ef06256079686ba0$var$descriptionNodes.get(description);
|
|
1037
|
-
if (!desc) {
|
|
1038
|
-
let id = `react-aria-description-${$ef06256079686ba0$var$descriptionId++}`;
|
|
1039
|
-
setId(id);
|
|
1040
|
-
let node = document.createElement("div");
|
|
1041
|
-
node.id = id;
|
|
1042
|
-
node.style.display = "none";
|
|
1043
|
-
node.textContent = description;
|
|
1044
|
-
document.body.appendChild(node);
|
|
1045
|
-
desc = {
|
|
1046
|
-
refCount: 0,
|
|
1047
|
-
element: node
|
|
1048
|
-
};
|
|
1049
|
-
$ef06256079686ba0$var$descriptionNodes.set(description, desc);
|
|
1050
|
-
} else setId(desc.element.id);
|
|
1051
|
-
desc.refCount++;
|
|
1052
|
-
return ()=>{
|
|
1053
|
-
if (desc && --desc.refCount === 0) {
|
|
1054
|
-
desc.element.remove();
|
|
1055
|
-
$ef06256079686ba0$var$descriptionNodes.delete(description);
|
|
1056
|
-
}
|
|
1057
|
-
};
|
|
1058
|
-
}, [
|
|
1059
|
-
description
|
|
1060
|
-
]);
|
|
1061
|
-
return {
|
|
1062
|
-
"aria-describedby": description ? id : undefined
|
|
1063
|
-
};
|
|
1064
|
-
}
|
|
1065
58
|
|
|
1066
59
|
|
|
1067
60
|
|
|
1068
|
-
/*
|
|
1069
|
-
* Copyright 2021 Adobe. All rights reserved.
|
|
1070
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1071
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1072
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1073
|
-
*
|
|
1074
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1075
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1076
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1077
|
-
* governing permissions and limitations under the License.
|
|
1078
|
-
*/
|
|
1079
61
|
|
|
1080
|
-
function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
|
|
1081
|
-
let handleEvent = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(handler);
|
|
1082
|
-
let isDisabled = handler == null;
|
|
1083
|
-
(0, $12uGp$useEffect)(()=>{
|
|
1084
|
-
if (isDisabled || !ref.current) return;
|
|
1085
|
-
let element = ref.current;
|
|
1086
|
-
element.addEventListener(event, handleEvent, options);
|
|
1087
|
-
return ()=>{
|
|
1088
|
-
element.removeEventListener(event, handleEvent, options);
|
|
1089
|
-
};
|
|
1090
|
-
}, [
|
|
1091
|
-
ref,
|
|
1092
|
-
event,
|
|
1093
|
-
options,
|
|
1094
|
-
isDisabled,
|
|
1095
|
-
handleEvent
|
|
1096
|
-
]);
|
|
1097
|
-
}
|
|
1098
62
|
|
|
1099
63
|
|
|
1100
64
|
|
|
1101
|
-
/*
|
|
1102
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
1103
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1104
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1105
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1106
|
-
*
|
|
1107
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1108
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1109
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1110
|
-
* governing permissions and limitations under the License.
|
|
1111
|
-
*/
|
|
1112
|
-
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
|
|
1113
|
-
let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "left");
|
|
1114
|
-
let offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "top");
|
|
1115
|
-
let width = element.offsetWidth;
|
|
1116
|
-
let height = element.offsetHeight;
|
|
1117
|
-
let x = scrollView.scrollLeft;
|
|
1118
|
-
let y = scrollView.scrollTop;
|
|
1119
|
-
// Account for top/left border offsetting the scroll top/Left
|
|
1120
|
-
let { borderTopWidth: borderTopWidth, borderLeftWidth: borderLeftWidth } = getComputedStyle(scrollView);
|
|
1121
|
-
let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);
|
|
1122
|
-
let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);
|
|
1123
|
-
// Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width
|
|
1124
|
-
let maxX = borderAdjustedX + scrollView.clientWidth;
|
|
1125
|
-
let maxY = borderAdjustedY + scrollView.clientHeight;
|
|
1126
|
-
if (offsetX <= x) x = offsetX - parseInt(borderLeftWidth, 10);
|
|
1127
|
-
else if (offsetX + width > maxX) x += offsetX + width - maxX;
|
|
1128
|
-
if (offsetY <= borderAdjustedY) y = offsetY - parseInt(borderTopWidth, 10);
|
|
1129
|
-
else if (offsetY + height > maxY) y += offsetY + height - maxY;
|
|
1130
|
-
scrollView.scrollLeft = x;
|
|
1131
|
-
scrollView.scrollTop = y;
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
* Computes the offset left or top from child to ancestor by accumulating
|
|
1135
|
-
* offsetLeft or offsetTop through intervening offsetParents.
|
|
1136
|
-
*/ function $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) {
|
|
1137
|
-
const prop = axis === "left" ? "offsetLeft" : "offsetTop";
|
|
1138
|
-
let sum = 0;
|
|
1139
|
-
while(child.offsetParent){
|
|
1140
|
-
sum += child[prop];
|
|
1141
|
-
if (child.offsetParent === ancestor) break;
|
|
1142
|
-
else if (child.offsetParent.contains(ancestor)) {
|
|
1143
|
-
// If the ancestor is not `position:relative`, then we stop at
|
|
1144
|
-
// _its_ offset parent, and we subtract off _its_ offset, so that
|
|
1145
|
-
// we end up with the proper offset from child to ancestor.
|
|
1146
|
-
sum -= ancestor[prop];
|
|
1147
|
-
break;
|
|
1148
|
-
}
|
|
1149
|
-
child = child.offsetParent;
|
|
1150
|
-
}
|
|
1151
|
-
return sum;
|
|
1152
|
-
}
|
|
1153
|
-
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
1154
|
-
if (document.contains(targetElement)) {
|
|
1155
|
-
let root = document.scrollingElement || document.documentElement;
|
|
1156
|
-
let isScrollPrevented = window.getComputedStyle(root).overflow === "hidden";
|
|
1157
|
-
// 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
|
|
1158
|
-
if (!isScrollPrevented) {
|
|
1159
|
-
var // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()
|
|
1160
|
-
// 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
|
|
1161
|
-
_targetElement_scrollIntoView;
|
|
1162
|
-
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
1163
|
-
targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
|
|
1164
|
-
block: "nearest"
|
|
1165
|
-
});
|
|
1166
|
-
let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
|
|
1167
|
-
// Account for sub pixel differences from rounding
|
|
1168
|
-
if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
|
|
1169
|
-
var _opts_containingElement_scrollIntoView, _opts_containingElement, _targetElement_scrollIntoView1;
|
|
1170
|
-
opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {
|
|
1171
|
-
block: "center",
|
|
1172
|
-
inline: "center"
|
|
1173
|
-
});
|
|
1174
|
-
(_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {
|
|
1175
|
-
block: "nearest"
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
} else {
|
|
1179
|
-
let scrollParent = (0, $62d8ded9296f3872$export$cfa2225e87938781)(targetElement);
|
|
1180
|
-
// 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.
|
|
1181
|
-
while(targetElement && scrollParent && targetElement !== root && scrollParent !== root){
|
|
1182
|
-
$2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
|
|
1183
|
-
targetElement = scrollParent;
|
|
1184
|
-
scrollParent = (0, $62d8ded9296f3872$export$cfa2225e87938781)(targetElement);
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
65
|
|
|
1190
66
|
|
|
1191
67
|
|
|
1192
|
-
/*
|
|
1193
|
-
* Copyright 2022 Adobe. All rights reserved.
|
|
1194
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1195
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1196
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1197
|
-
*
|
|
1198
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1199
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1200
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1201
|
-
* governing permissions and limitations under the License.
|
|
1202
|
-
*/
|
|
1203
|
-
function $6a7db85432448f7f$export$60278871457622de(event) {
|
|
1204
|
-
// JAWS/NVDA with Firefox.
|
|
1205
|
-
if (event.mozInputSource === 0 && event.isTrusted) return true;
|
|
1206
|
-
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
|
|
1207
|
-
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
|
|
1208
|
-
// to detect TalkBack virtual clicks.
|
|
1209
|
-
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === "click" && event.buttons === 1;
|
|
1210
|
-
return event.detail === 0 && !event.pointerType;
|
|
1211
|
-
}
|
|
1212
|
-
function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
|
|
1213
|
-
// If the pointer size is zero, then we assume it's from a screen reader.
|
|
1214
|
-
// Android TalkBack double tap will sometimes return a event with width and height of 1
|
|
1215
|
-
// and pointerType === 'mouse' so we need to check for a specific combination of event attributes.
|
|
1216
|
-
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
|
|
1217
|
-
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
|
|
1218
|
-
// Talkback double tap from Windows Firefox touch screen press
|
|
1219
|
-
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
|
|
1220
|
-
}
|
|
1221
68
|
|
|
1222
69
|
|
|
1223
70
|
|
|
1224
|
-
/*
|
|
1225
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
1226
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1227
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1228
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1229
|
-
*
|
|
1230
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1231
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1232
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1233
|
-
* governing permissions and limitations under the License.
|
|
1234
|
-
*/ /* eslint-disable rulesdir/pure-render */
|
|
1235
|
-
function $5a387cc49350e6db$export$722debc0e56fea39(value, isEqual) {
|
|
1236
|
-
// Using a ref during render is ok here because it's only an optimization – both values are equivalent.
|
|
1237
|
-
// If a render is thrown away, it'll still work the same no matter if the next render is the same or not.
|
|
1238
|
-
let lastValue = (0, $12uGp$useRef)(null);
|
|
1239
|
-
if (value && lastValue.current && isEqual(value, lastValue.current)) value = lastValue.current;
|
|
1240
|
-
lastValue.current = value;
|
|
1241
|
-
return value;
|
|
1242
|
-
}
|
|
1243
71
|
|
|
1244
72
|
|
|
1245
|
-
/*
|
|
1246
|
-
* Copyright 2023 Adobe. All rights reserved.
|
|
1247
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1248
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1249
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1250
|
-
*
|
|
1251
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1252
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1253
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1254
|
-
* governing permissions and limitations under the License.
|
|
1255
|
-
*/
|
|
1256
73
|
|
|
1257
|
-
function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
1258
|
-
let resetValue = (0, $12uGp$useRef)(initialValue);
|
|
1259
|
-
let handleReset = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
1260
|
-
if (onReset) onReset(resetValue.current);
|
|
1261
|
-
});
|
|
1262
|
-
(0, $12uGp$useEffect)(()=>{
|
|
1263
|
-
var _ref_current;
|
|
1264
|
-
let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;
|
|
1265
|
-
form === null || form === void 0 ? void 0 : form.addEventListener("reset", handleReset);
|
|
1266
|
-
return ()=>{
|
|
1267
|
-
form === null || form === void 0 ? void 0 : form.removeEventListener("reset", handleReset);
|
|
1268
|
-
};
|
|
1269
|
-
}, [
|
|
1270
|
-
ref,
|
|
1271
|
-
handleReset
|
|
1272
|
-
]);
|
|
1273
|
-
}
|
|
1274
74
|
|
|
1275
75
|
|
|
1276
76
|
|
|
1277
77
|
|
|
1278
|
-
export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps, $5dc95899b306f630$export$c9058316764c140e as mergeRefs, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps, $7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling, $ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as openLink, $ea8dcbcb9ea1b556$export$51437d503373d223 as getSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition, $9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners, $313b98861ee5dd6c$export$d6875122194c7b44 as useLabels, $df56164dff5785e2$export$4338b53315abf666 as useObjectRef, $4f58c5f72bcf79f7$export$496315a1608d9602 as useUpdateEffect, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect, $9daab02d461809db$export$683480f191c0e3ea as useResizeObserver, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef, $62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent, $
|
|
78
|
+
export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps, $5dc95899b306f630$export$c9058316764c140e as mergeRefs, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps, $7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling, $ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset, $ea8dcbcb9ea1b556$export$95185d699e05d4d7 as openLink, $ea8dcbcb9ea1b556$export$51437d503373d223 as getSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps, $bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition, $9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners, $313b98861ee5dd6c$export$d6875122194c7b44 as useLabels, $df56164dff5785e2$export$4338b53315abf666 as useObjectRef, $4f58c5f72bcf79f7$export$496315a1608d9602 as useUpdateEffect, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect, $9daab02d461809db$export$683480f191c0e3ea as useResizeObserver, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef, $62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent, $a40c673dc9f6d9c7$export$94ed1c92c7beeb22 as getScrollParents, $cc38e7bd3fc7b213$export$2bb74740c4e19def as isScrollable, $5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize, $ef06256079686ba0$export$f8aeda7b10753fa1 as useDescription, $c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $c87311424ea30a05$export$b7d78993b74f766d as isFirefox, $e9faafb641e167db$export$90fc3a17d93f704c as useEvent, $1dbecbe27a04f9af$export$14d238f342723f25 as useValueEffect, $2f04cbc44ee30ce0$export$53a0910f038337bd as scrollIntoView, $2f04cbc44ee30ce0$export$c826860796309d1b as scrollIntoViewport, $4507461a1b870123$re_export$clamp as clamp, $4507461a1b870123$re_export$snapValueToStep as snapValueToStep, $6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent, $8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent, $5a387cc49350e6db$export$722debc0e56fea39 as useDeepMemo, $99facab73266f662$export$5add1d006293d136 as useFormReset};
|
|
1279
79
|
//# sourceMappingURL=module.js.map
|