@react-aria/utils 3.23.1 → 3.24.0
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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "chain", () => $1e2191638e54f613$export$e08e3b67e392101e);
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/ /**
|
|
18
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
19
|
+
*/ function $1e2191638e54f613$export$e08e3b67e392101e(...callbacks) {
|
|
20
|
+
return (...args)=>{
|
|
21
|
+
for (let callback of callbacks)if (typeof callback === "function") callback(...args);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=chain.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAED;;CAEC,GACM,SAAS,0CAAM,GAAG,SAAgB;IACvC,OAAO,CAAC,GAAG;QACT,KAAK,IAAI,YAAY,UACnB,IAAI,OAAO,aAAa,YACtB,YAAY;IAGlB;AACF","sources":["packages/@react-aria/utils/src/chain.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n return (...args: any[]) => {\n for (let callback of callbacks) {\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n };\n}\n"],"names":[],"version":3,"file":"chain.main.js.map"}
|
package/dist/chain.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ /**
|
|
12
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
13
|
+
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
14
|
+
return (...args)=>{
|
|
15
|
+
for (let callback of callbacks)if (typeof callback === "function") callback(...args);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export {$ff5963eb1fccf552$export$e08e3b67e392101e as chain};
|
|
21
|
+
//# sourceMappingURL=chain.mjs.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ /**
|
|
12
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
13
|
+
*/ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {
|
|
14
|
+
return (...args)=>{
|
|
15
|
+
for (let callback of callbacks)if (typeof callback === "function") callback(...args);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export {$ff5963eb1fccf552$export$e08e3b67e392101e as chain};
|
|
21
|
+
//# sourceMappingURL=chain.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA;;;;;;;;;;CAUC,GAED;;CAEC,GACM,SAAS,0CAAM,GAAG,SAAgB;IACvC,OAAO,CAAC,GAAG;QACT,KAAK,IAAI,YAAY,UACnB,IAAI,OAAO,aAAa,YACtB,YAAY;IAGlB;AACF","sources":["packages/@react-aria/utils/src/chain.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n return (...args: any[]) => {\n for (let callback of callbacks) {\n if (typeof callback === 'function') {\n callback(...args);\n }\n }\n };\n}\n"],"names":[],"version":3,"file":"chain.module.js.map"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "getOwnerDocument", () => $aaa611146751592e$export$b204af158042fbac);
|
|
7
|
+
$parcel$export(module.exports, "getOwnerWindow", () => $aaa611146751592e$export$f21a1ffae260145a);
|
|
8
|
+
const $aaa611146751592e$export$b204af158042fbac = (el)=>{
|
|
9
|
+
var _el_ownerDocument;
|
|
10
|
+
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
11
|
+
};
|
|
12
|
+
const $aaa611146751592e$export$f21a1ffae260145a = (el)=>{
|
|
13
|
+
if (el && "window" in el && el.window === el) return el;
|
|
14
|
+
const doc = $aaa611146751592e$export$b204af158042fbac(el);
|
|
15
|
+
return doc.defaultView || window;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=domHelpers.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;AAAO,MAAM,4CAAmB,CAAC;QACxB;IAAP,OAAO,CAAA,oBAAA,eAAA,yBAAA,GAAI,aAAa,cAAjB,+BAAA,oBAAqB;AAC9B;AAEO,MAAM,4CAAiB,CAC5B;IAEA,IAAI,MAAM,YAAY,MAAM,GAAG,MAAM,KAAK,IACxC,OAAO;IAGT,MAAM,MAAM,0CAAiB;IAC7B,OAAO,IAAI,WAAW,IAAI;AAC5B","sources":["packages/@react-aria/utils/src/domHelpers.ts"],"sourcesContent":["export const getOwnerDocument = (el: Element | null | undefined): Document => {\n return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n if (el && 'window' in el && el.window === el) {\n return el;\n }\n\n const doc = getOwnerDocument(el as Element | null | undefined);\n return doc.defaultView || window;\n};\n"],"names":[],"version":3,"file":"domHelpers.main.js.map"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
|
|
2
|
+
var _el_ownerDocument;
|
|
3
|
+
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
4
|
+
};
|
|
5
|
+
const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
|
|
6
|
+
if (el && "window" in el && el.window === el) return el;
|
|
7
|
+
const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);
|
|
8
|
+
return doc.defaultView || window;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export {$431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow};
|
|
13
|
+
//# sourceMappingURL=domHelpers.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{
|
|
2
|
+
var _el_ownerDocument;
|
|
3
|
+
return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;
|
|
4
|
+
};
|
|
5
|
+
const $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{
|
|
6
|
+
if (el && "window" in el && el.window === el) return el;
|
|
7
|
+
const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);
|
|
8
|
+
return doc.defaultView || window;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export {$431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow};
|
|
13
|
+
//# sourceMappingURL=domHelpers.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAO,MAAM,4CAAmB,CAAC;QACxB;IAAP,OAAO,CAAA,oBAAA,eAAA,yBAAA,GAAI,aAAa,cAAjB,+BAAA,oBAAqB;AAC9B;AAEO,MAAM,4CAAiB,CAC5B;IAEA,IAAI,MAAM,YAAY,MAAM,GAAG,MAAM,KAAK,IACxC,OAAO;IAGT,MAAM,MAAM,0CAAiB;IAC7B,OAAO,IAAI,WAAW,IAAI;AAC5B","sources":["packages/@react-aria/utils/src/domHelpers.ts"],"sourcesContent":["export const getOwnerDocument = (el: Element | null | undefined): Document => {\n return el?.ownerDocument ?? document;\n};\n\nexport const getOwnerWindow = (\n el: (Window & typeof global) | Element | null | undefined\n): Window & typeof global => {\n if (el && 'window' in el && el.window === el) {\n return el;\n }\n\n const doc = getOwnerDocument(el as Element | null | undefined);\n return doc.defaultView || window;\n};\n"],"names":[],"version":3,"file":"domHelpers.module.js.map"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "filterDOMProps", () => $8d15d0e1797d4238$export$457c3d6518dd4c6f);
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/ const $8d15d0e1797d4238$var$DOMPropNames = new Set([
|
|
18
|
+
"id"
|
|
19
|
+
]);
|
|
20
|
+
const $8d15d0e1797d4238$var$labelablePropNames = new Set([
|
|
21
|
+
"aria-label",
|
|
22
|
+
"aria-labelledby",
|
|
23
|
+
"aria-describedby",
|
|
24
|
+
"aria-details"
|
|
25
|
+
]);
|
|
26
|
+
// See LinkDOMProps in dom.d.ts.
|
|
27
|
+
const $8d15d0e1797d4238$var$linkPropNames = new Set([
|
|
28
|
+
"href",
|
|
29
|
+
"hrefLang",
|
|
30
|
+
"target",
|
|
31
|
+
"rel",
|
|
32
|
+
"download",
|
|
33
|
+
"ping",
|
|
34
|
+
"referrerPolicy"
|
|
35
|
+
]);
|
|
36
|
+
const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/;
|
|
37
|
+
function $8d15d0e1797d4238$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
38
|
+
let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
|
|
39
|
+
let filteredProps = {};
|
|
40
|
+
for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($8d15d0e1797d4238$var$DOMPropNames.has(prop) || labelable && $8d15d0e1797d4238$var$labelablePropNames.has(prop) || isLink && $8d15d0e1797d4238$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $8d15d0e1797d4238$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
41
|
+
return filteredProps;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=filterDOMProps.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAID,MAAM,qCAAe,IAAI,IAAI;IAC3B;CACD;AAED,MAAM,2CAAqB,IAAI,IAAI;IACjC;IACA;IACA;IACA;CACD;AAED,gCAAgC;AAChC,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAeD,MAAM,+BAAS;AAOR,SAAS,0CAAe,KAAkD,EAAE,OAAgB,CAAC,CAAC;IACnG,IAAI,aAAC,SAAS,UAAE,MAAM,aAAE,SAAS,EAAC,GAAG;IACrC,IAAI,gBAAgB,CAAC;IAErB,IAAK,MAAM,QAAQ,MACjB,IACE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,SAC1C,CAAA,mCAAa,GAAG,CAAC,SAChB,aAAa,yCAAmB,GAAG,CAAC,SACpC,UAAU,oCAAc,GAAG,CAAC,UAC7B,sBAAA,gCAAA,UAAW,GAAG,CAAC,UACf,6BAAO,IAAI,CAAC,KAAI,GAGlB,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;IAIrC,OAAO;AACT","sources":["packages/@react-aria/utils/src/filterDOMProps.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, LinkDOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n 'id'\n]);\n\nconst labelablePropNames = new Set([\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-details'\n]);\n\n// See LinkDOMProps in dom.d.ts.\nconst linkPropNames = new Set([\n 'href',\n 'hrefLang',\n 'target',\n 'rel',\n 'download',\n 'ping',\n 'referrerPolicy'\n]);\n\ninterface Options {\n /**\n * If labelling associated aria properties should be included in the filter.\n */\n labelable?: boolean,\n /** Whether the element is a link and should include DOM props for <a> elements. */\n isLink?: boolean,\n /**\n * A Set of other property names that should be included in the filter.\n */\n propNames?: Set<string>\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n let {labelable, isLink, propNames} = opts;\n let filteredProps = {};\n\n for (const prop in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, prop) && (\n DOMPropNames.has(prop) ||\n (labelable && labelablePropNames.has(prop)) ||\n (isLink && linkPropNames.has(prop)) ||\n propNames?.has(prop) ||\n propRe.test(prop)\n )\n ) {\n filteredProps[prop] = props[prop];\n }\n }\n\n return filteredProps;\n}\n"],"names":[],"version":3,"file":"filterDOMProps.main.js.map"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([
|
|
12
|
+
"id"
|
|
13
|
+
]);
|
|
14
|
+
const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
|
|
15
|
+
"aria-label",
|
|
16
|
+
"aria-labelledby",
|
|
17
|
+
"aria-describedby",
|
|
18
|
+
"aria-details"
|
|
19
|
+
]);
|
|
20
|
+
// See LinkDOMProps in dom.d.ts.
|
|
21
|
+
const $65484d02dcb7eb3e$var$linkPropNames = new Set([
|
|
22
|
+
"href",
|
|
23
|
+
"hrefLang",
|
|
24
|
+
"target",
|
|
25
|
+
"rel",
|
|
26
|
+
"download",
|
|
27
|
+
"ping",
|
|
28
|
+
"referrerPolicy"
|
|
29
|
+
]);
|
|
30
|
+
const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
31
|
+
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
32
|
+
let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
|
|
33
|
+
let filteredProps = {};
|
|
34
|
+
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];
|
|
35
|
+
return filteredProps;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export {$65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps};
|
|
40
|
+
//# sourceMappingURL=filterDOMProps.mjs.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ const $65484d02dcb7eb3e$var$DOMPropNames = new Set([
|
|
12
|
+
"id"
|
|
13
|
+
]);
|
|
14
|
+
const $65484d02dcb7eb3e$var$labelablePropNames = new Set([
|
|
15
|
+
"aria-label",
|
|
16
|
+
"aria-labelledby",
|
|
17
|
+
"aria-describedby",
|
|
18
|
+
"aria-details"
|
|
19
|
+
]);
|
|
20
|
+
// See LinkDOMProps in dom.d.ts.
|
|
21
|
+
const $65484d02dcb7eb3e$var$linkPropNames = new Set([
|
|
22
|
+
"href",
|
|
23
|
+
"hrefLang",
|
|
24
|
+
"target",
|
|
25
|
+
"rel",
|
|
26
|
+
"download",
|
|
27
|
+
"ping",
|
|
28
|
+
"referrerPolicy"
|
|
29
|
+
]);
|
|
30
|
+
const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
31
|
+
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
32
|
+
let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
|
|
33
|
+
let filteredProps = {};
|
|
34
|
+
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];
|
|
35
|
+
return filteredProps;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export {$65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps};
|
|
40
|
+
//# sourceMappingURL=filterDOMProps.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA;;;;;;;;;;CAUC,GAID,MAAM,qCAAe,IAAI,IAAI;IAC3B;CACD;AAED,MAAM,2CAAqB,IAAI,IAAI;IACjC;IACA;IACA;IACA;CACD;AAED,gCAAgC;AAChC,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAeD,MAAM,+BAAS;AAOR,SAAS,0CAAe,KAAkD,EAAE,OAAgB,CAAC,CAAC;IACnG,IAAI,aAAC,SAAS,UAAE,MAAM,aAAE,SAAS,EAAC,GAAG;IACrC,IAAI,gBAAgB,CAAC;IAErB,IAAK,MAAM,QAAQ,MACjB,IACE,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,SAC1C,CAAA,mCAAa,GAAG,CAAC,SAChB,aAAa,yCAAmB,GAAG,CAAC,SACpC,UAAU,oCAAc,GAAG,CAAC,UAC7B,sBAAA,gCAAA,UAAW,GAAG,CAAC,UACf,6BAAO,IAAI,CAAC,KAAI,GAGlB,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK;IAIrC,OAAO;AACT","sources":["packages/@react-aria/utils/src/filterDOMProps.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, LinkDOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n 'id'\n]);\n\nconst labelablePropNames = new Set([\n 'aria-label',\n 'aria-labelledby',\n 'aria-describedby',\n 'aria-details'\n]);\n\n// See LinkDOMProps in dom.d.ts.\nconst linkPropNames = new Set([\n 'href',\n 'hrefLang',\n 'target',\n 'rel',\n 'download',\n 'ping',\n 'referrerPolicy'\n]);\n\ninterface Options {\n /**\n * If labelling associated aria properties should be included in the filter.\n */\n labelable?: boolean,\n /** Whether the element is a link and should include DOM props for <a> elements. */\n isLink?: boolean,\n /**\n * A Set of other property names that should be included in the filter.\n */\n propNames?: Set<string>\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n let {labelable, isLink, propNames} = opts;\n let filteredProps = {};\n\n for (const prop in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, prop) && (\n DOMPropNames.has(prop) ||\n (labelable && labelablePropNames.has(prop)) ||\n (isLink && linkPropNames.has(prop)) ||\n propNames?.has(prop) ||\n propRe.test(prop)\n )\n ) {\n filteredProps[prop] = props[prop];\n }\n }\n\n return filteredProps;\n}\n"],"names":[],"version":3,"file":"filterDOMProps.module.js.map"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "focusWithoutScrolling", () => $1117b6c0d4c4c164$export$de79e2c695e052f3);
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/ function $1117b6c0d4c4c164$export$de79e2c695e052f3(element) {
|
|
18
|
+
if ($1117b6c0d4c4c164$var$supportsPreventScroll()) element.focus({
|
|
19
|
+
preventScroll: true
|
|
20
|
+
});
|
|
21
|
+
else {
|
|
22
|
+
let scrollableElements = $1117b6c0d4c4c164$var$getScrollableElements(element);
|
|
23
|
+
element.focus();
|
|
24
|
+
$1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
let $1117b6c0d4c4c164$var$supportsPreventScrollCached = null;
|
|
28
|
+
function $1117b6c0d4c4c164$var$supportsPreventScroll() {
|
|
29
|
+
if ($1117b6c0d4c4c164$var$supportsPreventScrollCached == null) {
|
|
30
|
+
$1117b6c0d4c4c164$var$supportsPreventScrollCached = false;
|
|
31
|
+
try {
|
|
32
|
+
let focusElem = document.createElement("div");
|
|
33
|
+
focusElem.focus({
|
|
34
|
+
get preventScroll () {
|
|
35
|
+
$1117b6c0d4c4c164$var$supportsPreventScrollCached = true;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
} catch (e) {
|
|
40
|
+
// Ignore
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return $1117b6c0d4c4c164$var$supportsPreventScrollCached;
|
|
44
|
+
}
|
|
45
|
+
function $1117b6c0d4c4c164$var$getScrollableElements(element) {
|
|
46
|
+
let parent = element.parentNode;
|
|
47
|
+
let scrollableElements = [];
|
|
48
|
+
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
49
|
+
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
50
|
+
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
51
|
+
element: parent,
|
|
52
|
+
scrollTop: parent.scrollTop,
|
|
53
|
+
scrollLeft: parent.scrollLeft
|
|
54
|
+
});
|
|
55
|
+
parent = parent.parentNode;
|
|
56
|
+
}
|
|
57
|
+
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
|
|
58
|
+
element: rootScrollingElement,
|
|
59
|
+
scrollTop: rootScrollingElement.scrollTop,
|
|
60
|
+
scrollLeft: rootScrollingElement.scrollLeft
|
|
61
|
+
});
|
|
62
|
+
return scrollableElements;
|
|
63
|
+
}
|
|
64
|
+
function $1117b6c0d4c4c164$var$restoreScrollPosition(scrollableElements) {
|
|
65
|
+
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
|
|
66
|
+
element.scrollTop = scrollTop;
|
|
67
|
+
element.scrollLeft = scrollLeft;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=focusWithoutScrolling.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAoBM,SAAS,0CAAsB,OAAyB;IAC7D,IAAI,+CACF,QAAQ,KAAK,CAAC;QAAC,eAAe;IAAI;SAC7B;QACL,IAAI,qBAAqB,4CAAsB;QAC/C,QAAQ,KAAK;QACb,4CAAsB;IACxB;AACF;AAEA,IAAI,oDAA8C;AAClD,SAAS;IACP,IAAI,qDAA+B,MAAM;QACvC,oDAA8B;QAC9B,IAAI;YACF,IAAI,YAAY,SAAS,aAAa,CAAC;YACvC,UAAU,KAAK,CAAC;gBACd,IAAI,iBAAgB;oBAClB,oDAA8B;oBAC9B,OAAO;gBACT;YACF;QACF,EAAE,OAAO,GAAG;QACV,SAAS;QACX;IACF;IAEA,OAAO;AACT;AAEA,SAAS,4CAAsB,OAAyB;IACtD,IAAI,SAAS,QAAQ,UAAU;IAC/B,IAAI,qBAA0C,EAAE;IAChD,IAAI,uBAAuB,SAAS,gBAAgB,IAAI,SAAS,eAAe;IAEhF,MAAO,kBAAkB,eAAe,WAAW,qBAAsB;QACvE,IACE,OAAO,YAAY,GAAG,OAAO,YAAY,IACzC,OAAO,WAAW,GAAG,OAAO,WAAW,EAEvC,mBAAmB,IAAI,CAAC;YACtB,SAAS;YACT,WAAW,OAAO,SAAS;YAC3B,YAAY,OAAO,UAAU;QAC/B;QAEF,SAAS,OAAO,UAAU;IAC5B;IAEA,IAAI,gCAAgC,aAClC,mBAAmB,IAAI,CAAC;QACtB,SAAS;QACT,WAAW,qBAAqB,SAAS;QACzC,YAAY,qBAAqB,UAAU;IAC7C;IAGF,OAAO;AACT;AAEA,SAAS,4CAAsB,kBAAuC;IACpE,KAAK,IAAI,WAAC,OAAO,aAAE,SAAS,cAAE,UAAU,EAAC,IAAI,mBAAoB;QAC/D,QAAQ,SAAS,GAAG;QACpB,QAAQ,UAAU,GAAG;IACvB;AACF","sources":["packages/@react-aria/utils/src/focusWithoutScrolling.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n element: HTMLElement,\n scrollTop: number,\n scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement) {\n if (supportsPreventScroll()) {\n element.focus({preventScroll: true});\n } else {\n let scrollableElements = getScrollableElements(element);\n element.focus();\n restoreScrollPosition(scrollableElements);\n }\n}\n\nlet supportsPreventScrollCached: boolean | null = null;\nfunction supportsPreventScroll() {\n if (supportsPreventScrollCached == null) {\n supportsPreventScrollCached = false;\n try {\n let focusElem = document.createElement('div');\n focusElem.focus({\n get preventScroll() {\n supportsPreventScrollCached = true;\n return true;\n }\n });\n } catch (e) {\n // Ignore\n }\n }\n\n return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n let parent = element.parentNode;\n let scrollableElements: ScrollableElement[] = [];\n let rootScrollingElement = document.scrollingElement || document.documentElement;\n\n while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push({\n element: parent,\n scrollTop: parent.scrollTop,\n scrollLeft: parent.scrollLeft\n });\n }\n parent = parent.parentNode;\n }\n\n if (rootScrollingElement instanceof HTMLElement) {\n scrollableElements.push({\n element: rootScrollingElement,\n scrollTop: rootScrollingElement.scrollTop,\n scrollLeft: rootScrollingElement.scrollLeft\n });\n }\n\n return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n}\n"],"names":[],"version":3,"file":"focusWithoutScrolling.main.js.map"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
|
|
12
|
+
if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({
|
|
13
|
+
preventScroll: true
|
|
14
|
+
});
|
|
15
|
+
else {
|
|
16
|
+
let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
|
|
17
|
+
element.focus();
|
|
18
|
+
$7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
let $7215afc6de606d6b$var$supportsPreventScrollCached = null;
|
|
22
|
+
function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
23
|
+
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
|
|
24
|
+
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
|
|
25
|
+
try {
|
|
26
|
+
let focusElem = document.createElement("div");
|
|
27
|
+
focusElem.focus({
|
|
28
|
+
get preventScroll () {
|
|
29
|
+
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
} catch (e) {
|
|
34
|
+
// Ignore
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return $7215afc6de606d6b$var$supportsPreventScrollCached;
|
|
38
|
+
}
|
|
39
|
+
function $7215afc6de606d6b$var$getScrollableElements(element) {
|
|
40
|
+
let parent = element.parentNode;
|
|
41
|
+
let scrollableElements = [];
|
|
42
|
+
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
43
|
+
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
44
|
+
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
45
|
+
element: parent,
|
|
46
|
+
scrollTop: parent.scrollTop,
|
|
47
|
+
scrollLeft: parent.scrollLeft
|
|
48
|
+
});
|
|
49
|
+
parent = parent.parentNode;
|
|
50
|
+
}
|
|
51
|
+
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
|
|
52
|
+
element: rootScrollingElement,
|
|
53
|
+
scrollTop: rootScrollingElement.scrollTop,
|
|
54
|
+
scrollLeft: rootScrollingElement.scrollLeft
|
|
55
|
+
});
|
|
56
|
+
return scrollableElements;
|
|
57
|
+
}
|
|
58
|
+
function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
|
|
59
|
+
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
|
|
60
|
+
element.scrollTop = scrollTop;
|
|
61
|
+
element.scrollLeft = scrollLeft;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
export {$7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling};
|
|
67
|
+
//# sourceMappingURL=focusWithoutScrolling.mjs.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ function $7215afc6de606d6b$export$de79e2c695e052f3(element) {
|
|
12
|
+
if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({
|
|
13
|
+
preventScroll: true
|
|
14
|
+
});
|
|
15
|
+
else {
|
|
16
|
+
let scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);
|
|
17
|
+
element.focus();
|
|
18
|
+
$7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
let $7215afc6de606d6b$var$supportsPreventScrollCached = null;
|
|
22
|
+
function $7215afc6de606d6b$var$supportsPreventScroll() {
|
|
23
|
+
if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {
|
|
24
|
+
$7215afc6de606d6b$var$supportsPreventScrollCached = false;
|
|
25
|
+
try {
|
|
26
|
+
let focusElem = document.createElement("div");
|
|
27
|
+
focusElem.focus({
|
|
28
|
+
get preventScroll () {
|
|
29
|
+
$7215afc6de606d6b$var$supportsPreventScrollCached = true;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
} catch (e) {
|
|
34
|
+
// Ignore
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return $7215afc6de606d6b$var$supportsPreventScrollCached;
|
|
38
|
+
}
|
|
39
|
+
function $7215afc6de606d6b$var$getScrollableElements(element) {
|
|
40
|
+
let parent = element.parentNode;
|
|
41
|
+
let scrollableElements = [];
|
|
42
|
+
let rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
43
|
+
while(parent instanceof HTMLElement && parent !== rootScrollingElement){
|
|
44
|
+
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({
|
|
45
|
+
element: parent,
|
|
46
|
+
scrollTop: parent.scrollTop,
|
|
47
|
+
scrollLeft: parent.scrollLeft
|
|
48
|
+
});
|
|
49
|
+
parent = parent.parentNode;
|
|
50
|
+
}
|
|
51
|
+
if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({
|
|
52
|
+
element: rootScrollingElement,
|
|
53
|
+
scrollTop: rootScrollingElement.scrollTop,
|
|
54
|
+
scrollLeft: rootScrollingElement.scrollLeft
|
|
55
|
+
});
|
|
56
|
+
return scrollableElements;
|
|
57
|
+
}
|
|
58
|
+
function $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {
|
|
59
|
+
for (let { element: element, scrollTop: scrollTop, scrollLeft: scrollLeft } of scrollableElements){
|
|
60
|
+
element.scrollTop = scrollTop;
|
|
61
|
+
element.scrollLeft = scrollLeft;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
export {$7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling};
|
|
67
|
+
//# sourceMappingURL=focusWithoutScrolling.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA;;;;;;;;;;CAUC,GAoBM,SAAS,0CAAsB,OAAyB;IAC7D,IAAI,+CACF,QAAQ,KAAK,CAAC;QAAC,eAAe;IAAI;SAC7B;QACL,IAAI,qBAAqB,4CAAsB;QAC/C,QAAQ,KAAK;QACb,4CAAsB;IACxB;AACF;AAEA,IAAI,oDAA8C;AAClD,SAAS;IACP,IAAI,qDAA+B,MAAM;QACvC,oDAA8B;QAC9B,IAAI;YACF,IAAI,YAAY,SAAS,aAAa,CAAC;YACvC,UAAU,KAAK,CAAC;gBACd,IAAI,iBAAgB;oBAClB,oDAA8B;oBAC9B,OAAO;gBACT;YACF;QACF,EAAE,OAAO,GAAG;QACV,SAAS;QACX;IACF;IAEA,OAAO;AACT;AAEA,SAAS,4CAAsB,OAAyB;IACtD,IAAI,SAAS,QAAQ,UAAU;IAC/B,IAAI,qBAA0C,EAAE;IAChD,IAAI,uBAAuB,SAAS,gBAAgB,IAAI,SAAS,eAAe;IAEhF,MAAO,kBAAkB,eAAe,WAAW,qBAAsB;QACvE,IACE,OAAO,YAAY,GAAG,OAAO,YAAY,IACzC,OAAO,WAAW,GAAG,OAAO,WAAW,EAEvC,mBAAmB,IAAI,CAAC;YACtB,SAAS;YACT,WAAW,OAAO,SAAS;YAC3B,YAAY,OAAO,UAAU;QAC/B;QAEF,SAAS,OAAO,UAAU;IAC5B;IAEA,IAAI,gCAAgC,aAClC,mBAAmB,IAAI,CAAC;QACtB,SAAS;QACT,WAAW,qBAAqB,SAAS;QACzC,YAAY,qBAAqB,UAAU;IAC7C;IAGF,OAAO;AACT;AAEA,SAAS,4CAAsB,kBAAuC;IACpE,KAAK,IAAI,WAAC,OAAO,aAAE,SAAS,cAAE,UAAU,EAAC,IAAI,mBAAoB;QAC/D,QAAQ,SAAS,GAAG;QACpB,QAAQ,UAAU,GAAG;IACvB;AACF","sources":["packages/@react-aria/utils/src/focusWithoutScrolling.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n element: HTMLElement,\n scrollTop: number,\n scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement) {\n if (supportsPreventScroll()) {\n element.focus({preventScroll: true});\n } else {\n let scrollableElements = getScrollableElements(element);\n element.focus();\n restoreScrollPosition(scrollableElements);\n }\n}\n\nlet supportsPreventScrollCached: boolean | null = null;\nfunction supportsPreventScroll() {\n if (supportsPreventScrollCached == null) {\n supportsPreventScrollCached = false;\n try {\n let focusElem = document.createElement('div');\n focusElem.focus({\n get preventScroll() {\n supportsPreventScrollCached = true;\n return true;\n }\n });\n } catch (e) {\n // Ignore\n }\n }\n\n return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n let parent = element.parentNode;\n let scrollableElements: ScrollableElement[] = [];\n let rootScrollingElement = document.scrollingElement || document.documentElement;\n\n while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push({\n element: parent,\n scrollTop: parent.scrollTop,\n scrollLeft: parent.scrollLeft\n });\n }\n parent = parent.parentNode;\n }\n\n if (rootScrollingElement instanceof HTMLElement) {\n scrollableElements.push({\n element: rootScrollingElement,\n scrollTop: rootScrollingElement.scrollTop,\n scrollLeft: rootScrollingElement.scrollLeft\n });\n }\n\n return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n}\n"],"names":[],"version":3,"file":"focusWithoutScrolling.module.js.map"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "getOffset", () => $16ec41ef3e36c19c$export$622cea445a1c5b7d);
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
9
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
11
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
14
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
15
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
16
|
+
* governing permissions and limitations under the License.
|
|
17
|
+
*/ function $16ec41ef3e36c19c$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") {
|
|
18
|
+
let rect = element.getBoundingClientRect();
|
|
19
|
+
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom;
|
|
20
|
+
return orientation === "horizontal" ? rect.left : rect.top;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=getOffset.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAU,OAAO,EAAE,OAAO,EAAE,cAAc,YAAY;IACpE,IAAI,OAAO,QAAQ,qBAAqB;IACxC,IAAI,SACF,OAAO,gBAAgB,eAAe,KAAK,KAAK,GAAG,KAAK,MAAM;IAEhE,OAAO,gBAAgB,eAAe,KAAK,IAAI,GAAG,KAAK,GAAG;AAC5D","sources":["packages/@react-aria/utils/src/getOffset.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function getOffset(element, reverse, orientation = 'horizontal') {\n let rect = element.getBoundingClientRect();\n if (reverse) {\n return orientation === 'horizontal' ? rect.right : rect.bottom;\n }\n return orientation === 'horizontal' ? rect.left : rect.top;\n}\n"],"names":[],"version":3,"file":"getOffset.main.js.map"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") {
|
|
12
|
+
let rect = element.getBoundingClientRect();
|
|
13
|
+
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom;
|
|
14
|
+
return orientation === "horizontal" ? rect.left : rect.top;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export {$ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset};
|
|
19
|
+
//# sourceMappingURL=getOffset.mjs.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/ function $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse, orientation = "horizontal") {
|
|
12
|
+
let rect = element.getBoundingClientRect();
|
|
13
|
+
if (reverse) return orientation === "horizontal" ? rect.right : rect.bottom;
|
|
14
|
+
return orientation === "horizontal" ? rect.left : rect.top;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export {$ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset};
|
|
19
|
+
//# sourceMappingURL=getOffset.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAU,OAAO,EAAE,OAAO,EAAE,cAAc,YAAY;IACpE,IAAI,OAAO,QAAQ,qBAAqB;IACxC,IAAI,SACF,OAAO,gBAAgB,eAAe,KAAK,KAAK,GAAG,KAAK,MAAM;IAEhE,OAAO,gBAAgB,eAAe,KAAK,IAAI,GAAG,KAAK,GAAG;AAC5D","sources":["packages/@react-aria/utils/src/getOffset.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function getOffset(element, reverse, orientation = 'horizontal') {\n let rect = element.getBoundingClientRect();\n if (reverse) {\n return orientation === 'horizontal' ? rect.right : rect.bottom;\n }\n return orientation === 'horizontal' ? rect.left : rect.top;\n}\n"],"names":[],"version":3,"file":"getOffset.module.js.map"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var $9a54e9cd5db23b5d$exports = require("./isScrollable.main.js");
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
function $parcel$export(e, n, v, s) {
|
|
5
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$parcel$export(module.exports, "getScrollParent", () => $d796e7157ac96470$export$cfa2225e87938781);
|
|
9
|
+
/*
|
|
10
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
11
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
13
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
16
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
17
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
18
|
+
* governing permissions and limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
function $d796e7157ac96470$export$cfa2225e87938781(node, checkForOverflow) {
|
|
21
|
+
let scrollableNode = node;
|
|
22
|
+
if ((0, $9a54e9cd5db23b5d$exports.isScrollable)(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
23
|
+
while(scrollableNode && !(0, $9a54e9cd5db23b5d$exports.isScrollable)(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;
|
|
24
|
+
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=getScrollParent.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAIM,SAAS,0CAAgB,IAAa,EAAE,gBAA0B;IACvE,IAAI,iBAAiC;IACrC,IAAI,CAAA,GAAA,sCAAW,EAAE,gBAAgB,mBAC/B,iBAAiB,eAAe,aAAa;IAG/C,MAAO,kBAAkB,CAAC,CAAA,GAAA,sCAAW,EAAE,gBAAgB,kBACrD,iBAAiB,eAAe,aAAa;IAG/C,OAAO,kBAAkB,SAAS,gBAAgB,IAAI,SAAS,eAAe;AAChF","sources":["packages/@react-aria/utils/src/getScrollParent.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isScrollable} from './isScrollable';\n\nexport function getScrollParent(node: Element, checkForOverflow?: boolean): Element {\n let scrollableNode: Element | null = node;\n if (isScrollable(scrollableNode, checkForOverflow)) {\n scrollableNode = scrollableNode.parentElement;\n }\n\n while (scrollableNode && !isScrollable(scrollableNode, checkForOverflow)) {\n scrollableNode = scrollableNode.parentElement;\n }\n\n return scrollableNode || document.scrollingElement || document.documentElement;\n}\n\n"],"names":[],"version":3,"file":"getScrollParent.main.js.map"}
|