@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.
Files changed (171) hide show
  1. package/dist/chain.main.js +26 -0
  2. package/dist/chain.main.js.map +1 -0
  3. package/dist/chain.mjs +21 -0
  4. package/dist/chain.module.js +21 -0
  5. package/dist/chain.module.js.map +1 -0
  6. package/dist/domHelpers.main.js +19 -0
  7. package/dist/domHelpers.main.js.map +1 -0
  8. package/dist/domHelpers.mjs +13 -0
  9. package/dist/domHelpers.module.js +13 -0
  10. package/dist/domHelpers.module.js.map +1 -0
  11. package/dist/filterDOMProps.main.js +45 -0
  12. package/dist/filterDOMProps.main.js.map +1 -0
  13. package/dist/filterDOMProps.mjs +40 -0
  14. package/dist/filterDOMProps.module.js +40 -0
  15. package/dist/filterDOMProps.module.js.map +1 -0
  16. package/dist/focusWithoutScrolling.main.js +72 -0
  17. package/dist/focusWithoutScrolling.main.js.map +1 -0
  18. package/dist/focusWithoutScrolling.mjs +67 -0
  19. package/dist/focusWithoutScrolling.module.js +67 -0
  20. package/dist/focusWithoutScrolling.module.js.map +1 -0
  21. package/dist/getOffset.main.js +24 -0
  22. package/dist/getOffset.main.js.map +1 -0
  23. package/dist/getOffset.mjs +19 -0
  24. package/dist/getOffset.module.js +19 -0
  25. package/dist/getOffset.module.js.map +1 -0
  26. package/dist/getScrollParent.main.js +28 -0
  27. package/dist/getScrollParent.main.js.map +1 -0
  28. package/dist/getScrollParent.mjs +23 -0
  29. package/dist/getScrollParent.module.js +23 -0
  30. package/dist/getScrollParent.module.js.map +1 -0
  31. package/dist/getScrollParents.main.js +30 -0
  32. package/dist/getScrollParents.main.js.map +1 -0
  33. package/dist/getScrollParents.mjs +25 -0
  34. package/dist/getScrollParents.module.js +25 -0
  35. package/dist/getScrollParents.module.js.map +1 -0
  36. package/dist/import.mjs +32 -1232
  37. package/dist/isScrollable.main.js +25 -0
  38. package/dist/isScrollable.main.js.map +1 -0
  39. package/dist/isScrollable.mjs +20 -0
  40. package/dist/isScrollable.module.js +20 -0
  41. package/dist/isScrollable.module.js.map +1 -0
  42. package/dist/isVirtualEvent.main.js +41 -0
  43. package/dist/isVirtualEvent.main.js.map +1 -0
  44. package/dist/isVirtualEvent.mjs +35 -0
  45. package/dist/isVirtualEvent.module.js +35 -0
  46. package/dist/isVirtualEvent.module.js.map +1 -0
  47. package/dist/main.js +80 -1282
  48. package/dist/main.js.map +1 -1
  49. package/dist/mergeProps.main.js +51 -0
  50. package/dist/mergeProps.main.js.map +1 -0
  51. package/dist/mergeProps.mjs +42 -0
  52. package/dist/mergeProps.module.js +42 -0
  53. package/dist/mergeProps.module.js.map +1 -0
  54. package/dist/mergeRefs.main.js +28 -0
  55. package/dist/mergeRefs.main.js.map +1 -0
  56. package/dist/mergeRefs.mjs +23 -0
  57. package/dist/mergeRefs.module.js +23 -0
  58. package/dist/mergeRefs.module.js.map +1 -0
  59. package/dist/module.js +32 -1232
  60. package/dist/module.js.map +1 -1
  61. package/dist/openLink.main.js +143 -0
  62. package/dist/openLink.main.js.map +1 -0
  63. package/dist/openLink.mjs +129 -0
  64. package/dist/openLink.module.js +129 -0
  65. package/dist/openLink.module.js.map +1 -0
  66. package/dist/platform.main.js +64 -0
  67. package/dist/platform.main.js.map +1 -0
  68. package/dist/platform.mjs +51 -0
  69. package/dist/platform.module.js +51 -0
  70. package/dist/platform.module.js.map +1 -0
  71. package/dist/runAfterTransition.main.js +82 -0
  72. package/dist/runAfterTransition.main.js.map +1 -0
  73. package/dist/runAfterTransition.mjs +77 -0
  74. package/dist/runAfterTransition.module.js +77 -0
  75. package/dist/runAfterTransition.module.js.map +1 -0
  76. package/dist/scrollIntoView.main.js +96 -0
  77. package/dist/scrollIntoView.main.js.map +1 -0
  78. package/dist/scrollIntoView.mjs +90 -0
  79. package/dist/scrollIntoView.module.js +90 -0
  80. package/dist/scrollIntoView.module.js.map +1 -0
  81. package/dist/types.d.ts +17 -6
  82. package/dist/types.d.ts.map +1 -1
  83. package/dist/useDeepMemo.main.js +30 -0
  84. package/dist/useDeepMemo.main.js.map +1 -0
  85. package/dist/useDeepMemo.mjs +25 -0
  86. package/dist/useDeepMemo.module.js +25 -0
  87. package/dist/useDeepMemo.module.js.map +1 -0
  88. package/dist/useDescription.main.js +59 -0
  89. package/dist/useDescription.main.js.map +1 -0
  90. package/dist/useDescription.mjs +54 -0
  91. package/dist/useDescription.module.js +54 -0
  92. package/dist/useDescription.module.js.map +1 -0
  93. package/dist/useDrag1D.main.js +139 -0
  94. package/dist/useDrag1D.main.js.map +1 -0
  95. package/dist/useDrag1D.mjs +134 -0
  96. package/dist/useDrag1D.module.js +134 -0
  97. package/dist/useDrag1D.module.js.map +1 -0
  98. package/dist/useEffectEvent.main.js +37 -0
  99. package/dist/useEffectEvent.main.js.map +1 -0
  100. package/dist/useEffectEvent.mjs +32 -0
  101. package/dist/useEffectEvent.module.js +32 -0
  102. package/dist/useEffectEvent.module.js.map +1 -0
  103. package/dist/useEvent.main.js +42 -0
  104. package/dist/useEvent.main.js.map +1 -0
  105. package/dist/useEvent.mjs +37 -0
  106. package/dist/useEvent.module.js +37 -0
  107. package/dist/useEvent.module.js.map +1 -0
  108. package/dist/useFormReset.main.js +41 -0
  109. package/dist/useFormReset.main.js.map +1 -0
  110. package/dist/useFormReset.mjs +36 -0
  111. package/dist/useFormReset.module.js +36 -0
  112. package/dist/useFormReset.module.js.map +1 -0
  113. package/dist/useGlobalListeners.main.js +63 -0
  114. package/dist/useGlobalListeners.main.js.map +1 -0
  115. package/dist/useGlobalListeners.mjs +58 -0
  116. package/dist/useGlobalListeners.module.js +58 -0
  117. package/dist/useGlobalListeners.module.js.map +1 -0
  118. package/dist/useId.main.js +93 -0
  119. package/dist/useId.main.js.map +1 -0
  120. package/dist/useId.mjs +86 -0
  121. package/dist/useId.module.js +86 -0
  122. package/dist/useId.module.js.map +1 -0
  123. package/dist/useLabels.main.js +44 -0
  124. package/dist/useLabels.main.js.map +1 -0
  125. package/dist/useLabels.mjs +39 -0
  126. package/dist/useLabels.module.js +39 -0
  127. package/dist/useLabels.module.js.map +1 -0
  128. package/dist/useLayoutEffect.main.js +27 -0
  129. package/dist/useLayoutEffect.main.js.map +1 -0
  130. package/dist/useLayoutEffect.mjs +18 -0
  131. package/dist/useLayoutEffect.module.js +18 -0
  132. package/dist/useLayoutEffect.module.js.map +1 -0
  133. package/dist/useObjectRef.main.js +37 -0
  134. package/dist/useObjectRef.main.js.map +1 -0
  135. package/dist/useObjectRef.mjs +32 -0
  136. package/dist/useObjectRef.module.js +32 -0
  137. package/dist/useObjectRef.module.js.map +1 -0
  138. package/dist/useResizeObserver.main.js +40 -0
  139. package/dist/useResizeObserver.main.js.map +1 -0
  140. package/dist/useResizeObserver.mjs +35 -0
  141. package/dist/useResizeObserver.module.js +35 -0
  142. package/dist/useResizeObserver.module.js.map +1 -0
  143. package/dist/useSyncRef.main.js +32 -0
  144. package/dist/useSyncRef.main.js.map +1 -0
  145. package/dist/useSyncRef.mjs +27 -0
  146. package/dist/useSyncRef.module.js +27 -0
  147. package/dist/useSyncRef.module.js.map +1 -0
  148. package/dist/useUpdateEffect.main.js +38 -0
  149. package/dist/useUpdateEffect.main.js.map +1 -0
  150. package/dist/useUpdateEffect.mjs +33 -0
  151. package/dist/useUpdateEffect.module.js +33 -0
  152. package/dist/useUpdateEffect.module.js.map +1 -0
  153. package/dist/useValueEffect.main.js +58 -0
  154. package/dist/useValueEffect.main.js.map +1 -0
  155. package/dist/useValueEffect.mjs +53 -0
  156. package/dist/useValueEffect.module.js +53 -0
  157. package/dist/useValueEffect.module.js.map +1 -0
  158. package/dist/useViewportSize.main.js +56 -0
  159. package/dist/useViewportSize.main.js.map +1 -0
  160. package/dist/useViewportSize.mjs +51 -0
  161. package/dist/useViewportSize.module.js +51 -0
  162. package/dist/useViewportSize.module.js.map +1 -0
  163. package/package.json +5 -5
  164. package/src/filterDOMProps.ts +1 -0
  165. package/src/getScrollParent.ts +2 -10
  166. package/src/getScrollParents.ts +26 -0
  167. package/src/index.ts +4 -2
  168. package/src/isScrollable.ts +22 -0
  169. package/src/mergeRefs.ts +2 -2
  170. package/src/openLink.tsx +25 -9
  171. package/src/scrollIntoView.ts +3 -5
@@ -0,0 +1,23 @@
1
+ import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScrollable.mjs";
2
+
3
+ /*
4
+ * Copyright 2020 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
15
+ let scrollableNode = node;
16
+ if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
17
+ while(scrollableNode && !(0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;
18
+ return scrollableNode || document.scrollingElement || document.documentElement;
19
+ }
20
+
21
+
22
+ export {$62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent};
23
+ //# sourceMappingURL=getScrollParent.mjs.map
@@ -0,0 +1,23 @@
1
+ import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScrollable.module.js";
2
+
3
+ /*
4
+ * Copyright 2020 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
15
+ let scrollableNode = node;
16
+ if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
17
+ while(scrollableNode && !(0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;
18
+ return scrollableNode || document.scrollingElement || document.documentElement;
19
+ }
20
+
21
+
22
+ export {$62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent};
23
+ //# sourceMappingURL=getScrollParent.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAIM,SAAS,0CAAgB,IAAa,EAAE,gBAA0B;IACvE,IAAI,iBAAiC;IACrC,IAAI,CAAA,GAAA,yCAAW,EAAE,gBAAgB,mBAC/B,iBAAiB,eAAe,aAAa;IAG/C,MAAO,kBAAkB,CAAC,CAAA,GAAA,yCAAW,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.module.js.map"}
@@ -0,0 +1,30 @@
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, "getScrollParents", () => $49f0d9486c2408aa$export$94ed1c92c7beeb22);
9
+ /*
10
+ * Copyright 2024 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 $49f0d9486c2408aa$export$94ed1c92c7beeb22(node, checkForOverflow) {
21
+ const scrollParents = [];
22
+ while(node && node !== document.documentElement){
23
+ if ((0, $9a54e9cd5db23b5d$exports.isScrollable)(node, checkForOverflow)) scrollParents.push(node);
24
+ node = node.parentElement;
25
+ }
26
+ return scrollParents;
27
+ }
28
+
29
+
30
+ //# sourceMappingURL=getScrollParents.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAIM,SAAS,0CAAiB,IAAa,EAAE,gBAA0B;IACxE,MAAM,gBAA2B,EAAE;IAEnC,MAAO,QAAQ,SAAS,SAAS,eAAe,CAAE;QAChD,IAAI,CAAA,GAAA,sCAAW,EAAE,MAAM,mBACrB,cAAc,IAAI,CAAC;QAErB,OAAO,KAAK,aAAa;IAC3B;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/getScrollParents.ts"],"sourcesContent":["/*\n * Copyright 2024 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 getScrollParents(node: Element, checkForOverflow?: boolean): Element[] {\n const scrollParents: Element[] = [];\n\n while (node && node !== document.documentElement) {\n if (isScrollable(node, checkForOverflow)) {\n scrollParents.push(node);\n }\n node = node.parentElement as Element;\n }\n\n return scrollParents;\n}\n"],"names":[],"version":3,"file":"getScrollParents.main.js.map"}
@@ -0,0 +1,25 @@
1
+ import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScrollable.mjs";
2
+
3
+ /*
4
+ * Copyright 2024 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
15
+ const scrollParents = [];
16
+ while(node && node !== document.documentElement){
17
+ if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(node, checkForOverflow)) scrollParents.push(node);
18
+ node = node.parentElement;
19
+ }
20
+ return scrollParents;
21
+ }
22
+
23
+
24
+ export {$a40c673dc9f6d9c7$export$94ed1c92c7beeb22 as getScrollParents};
25
+ //# sourceMappingURL=getScrollParents.mjs.map
@@ -0,0 +1,25 @@
1
+ import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScrollable.module.js";
2
+
3
+ /*
4
+ * Copyright 2024 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
15
+ const scrollParents = [];
16
+ while(node && node !== document.documentElement){
17
+ if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(node, checkForOverflow)) scrollParents.push(node);
18
+ node = node.parentElement;
19
+ }
20
+ return scrollParents;
21
+ }
22
+
23
+
24
+ export {$a40c673dc9f6d9c7$export$94ed1c92c7beeb22 as getScrollParents};
25
+ //# sourceMappingURL=getScrollParents.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAIM,SAAS,0CAAiB,IAAa,EAAE,gBAA0B;IACxE,MAAM,gBAA2B,EAAE;IAEnC,MAAO,QAAQ,SAAS,SAAS,eAAe,CAAE;QAChD,IAAI,CAAA,GAAA,yCAAW,EAAE,MAAM,mBACrB,cAAc,IAAI,CAAC;QAErB,OAAO,KAAK,aAAa;IAC3B;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/getScrollParents.ts"],"sourcesContent":["/*\n * Copyright 2024 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 getScrollParents(node: Element, checkForOverflow?: boolean): Element[] {\n const scrollParents: Element[] = [];\n\n while (node && node !== document.documentElement) {\n if (isScrollable(node, checkForOverflow)) {\n scrollParents.push(node);\n }\n node = node.parentElement as Element;\n }\n\n return scrollParents;\n}\n"],"names":[],"version":3,"file":"getScrollParents.module.js.map"}