@react-aria/utils 3.32.0 → 3.33.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.
Files changed (60) hide show
  1. package/dist/DOMFunctions.main.js +16 -3
  2. package/dist/DOMFunctions.main.js.map +1 -1
  3. package/dist/DOMFunctions.mjs +17 -5
  4. package/dist/DOMFunctions.module.js +17 -5
  5. package/dist/DOMFunctions.module.js.map +1 -1
  6. package/dist/domHelpers.main.js.map +1 -1
  7. package/dist/domHelpers.module.js.map +1 -1
  8. package/dist/getScrollParents.main.js +6 -5
  9. package/dist/getScrollParents.main.js.map +1 -1
  10. package/dist/getScrollParents.mjs +6 -5
  11. package/dist/getScrollParents.module.js +6 -5
  12. package/dist/getScrollParents.module.js.map +1 -1
  13. package/dist/import.mjs +2 -2
  14. package/dist/isScrollable.main.js +3 -0
  15. package/dist/isScrollable.main.js.map +1 -1
  16. package/dist/isScrollable.mjs +3 -0
  17. package/dist/isScrollable.module.js +3 -0
  18. package/dist/isScrollable.module.js.map +1 -1
  19. package/dist/main.js +1 -0
  20. package/dist/main.js.map +1 -1
  21. package/dist/mergeProps.main.js +3 -0
  22. package/dist/mergeProps.main.js.map +1 -1
  23. package/dist/mergeProps.mjs +3 -0
  24. package/dist/mergeProps.module.js +3 -0
  25. package/dist/mergeProps.module.js.map +1 -1
  26. package/dist/module.js +2 -2
  27. package/dist/module.js.map +1 -1
  28. package/dist/runAfterTransition.main.js +13 -8
  29. package/dist/runAfterTransition.main.js.map +1 -1
  30. package/dist/runAfterTransition.mjs +13 -8
  31. package/dist/runAfterTransition.module.js +13 -8
  32. package/dist/runAfterTransition.module.js.map +1 -1
  33. package/dist/scrollIntoView.main.js +87 -52
  34. package/dist/scrollIntoView.main.js.map +1 -1
  35. package/dist/scrollIntoView.mjs +87 -52
  36. package/dist/scrollIntoView.module.js +87 -52
  37. package/dist/scrollIntoView.module.js.map +1 -1
  38. package/dist/types.d.ts +23 -10
  39. package/dist/types.d.ts.map +1 -1
  40. package/dist/useDrag1D.main.js +4 -2
  41. package/dist/useDrag1D.main.js.map +1 -1
  42. package/dist/useDrag1D.mjs +4 -2
  43. package/dist/useDrag1D.module.js +4 -2
  44. package/dist/useDrag1D.module.js.map +1 -1
  45. package/dist/useViewportSize.main.js +21 -17
  46. package/dist/useViewportSize.main.js.map +1 -1
  47. package/dist/useViewportSize.mjs +21 -17
  48. package/dist/useViewportSize.module.js +21 -17
  49. package/dist/useViewportSize.module.js.map +1 -1
  50. package/package.json +3 -3
  51. package/src/domHelpers.ts +2 -2
  52. package/src/getScrollParents.ts +6 -5
  53. package/src/index.ts +1 -1
  54. package/src/isScrollable.ts +6 -0
  55. package/src/mergeProps.ts +4 -1
  56. package/src/runAfterTransition.ts +11 -8
  57. package/src/scrollIntoView.ts +110 -70
  58. package/src/shadowdom/DOMFunctions.ts +38 -8
  59. package/src/useDrag1D.ts +3 -2
  60. package/src/useViewportSize.ts +26 -20
@@ -9,8 +9,9 @@ function $parcel$export(e, n, v, s) {
9
9
  $parcel$export(module.exports, "nodeContains", () => $d723bea02f3e2567$export$4282f70798064fe0);
10
10
  $parcel$export(module.exports, "getActiveElement", () => $d723bea02f3e2567$export$cd4e5573fbe2b576);
11
11
  $parcel$export(module.exports, "getEventTarget", () => $d723bea02f3e2567$export$e58f029f0fbfdb29);
12
+ $parcel$export(module.exports, "isFocusWithin", () => $d723bea02f3e2567$export$b4f377a2b6254582);
12
13
  // Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
13
-
14
+ /* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
14
15
 
15
16
  function $d723bea02f3e2567$export$4282f70798064fe0(node, otherNode) {
16
17
  if (!(0, $loak6$reactstatelyflags.shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;
@@ -34,11 +35,23 @@ const $d723bea02f3e2567$export$cd4e5573fbe2b576 = (doc = document)=>{
34
35
  return activeElement;
35
36
  };
36
37
  function $d723bea02f3e2567$export$e58f029f0fbfdb29(event) {
37
- if ((0, $loak6$reactstatelyflags.shadowDOM)() && event.target.shadowRoot) {
38
- if (event.composedPath) return event.composedPath()[0];
38
+ if ((0, $loak6$reactstatelyflags.shadowDOM)() && event.target instanceof Element && event.target.shadowRoot) {
39
+ var _event_composedPath_, _event_nativeEvent_composedPath_;
40
+ if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
41
+ else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
39
42
  }
40
43
  return event.target;
41
44
  }
45
+ function $d723bea02f3e2567$export$b4f377a2b6254582(node) {
46
+ if (!node) return false;
47
+ // Get the active element within the node's parent shadow root (or the document). Can return null.
48
+ let root = node.getRootNode();
49
+ let ownerWindow = (0, $aaa611146751592e$exports.getOwnerWindow)(node);
50
+ if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
51
+ let activeElement = root.activeElement;
52
+ // Check if the active element is within this node. These nodes are within the same shadow root.
53
+ return activeElement != null && node.contains(activeElement);
54
+ }
42
55
 
43
56
 
44
57
  //# sourceMappingURL=DOMFunctions.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;AAAA,kIAAkI;;;AAQ3H,SAAS,0CACd,IAA6B,EAC7B,SAAkC;IAElC,IAAI,CAAC,CAAA,GAAA,kCAAQ,KACX,OAAO,aAAa,OAAO,KAAK,QAAQ,CAAC,aAAa;IAGxD,IAAI,CAAC,QAAQ,CAAC,WACZ,OAAO;IAGT,IAAI,cAAqD;IAEzD,MAAO,gBAAgB,KAAM;QAC3B,IAAI,gBAAgB,MAClB,OAAO;QAGT,IAAI,AAAC,YAAgC,OAAO,KAAK,UAC/C,AAAC,YAAgC,YAAY,EAC7C,qBAAqB;QACrB,cAAc,AAAC,YAAgC,YAAY,CAAE,UAAU;aAClE,IAAI,CAAA,GAAA,sCAAW,EAAE,cACtB,4BAA4B;QAC5B,cAAc,YAAY,IAAI;aAE9B,cAAc,YAAY,UAAU;IAExC;IAEA,OAAO;AACT;AAKO,MAAM,4CAAmB,CAAC,MAAgB,QAAQ;QAOvD;IANA,IAAI,CAAC,CAAA,GAAA,kCAAQ,KACX,OAAO,IAAI,aAAa;IAE1B,IAAI,gBAAgC,IAAI,aAAa;IAErD,MAAO,iBAAiB,gBAAgB,mBACxC,4BAAA,cAAc,UAAU,cAAxB,gDAAA,0BAA0B,aAAa,EACrC,gBAAgB,cAAc,UAAU,CAAC,aAAa;IAGxD,OAAO;AACT;AAKO,SAAS,0CAAgC,KAAQ;IACtD,IAAI,CAAA,GAAA,kCAAQ,OAAO,AAAC,MAAM,MAAM,CAAiB,UAAU,EAAE;QAC3D,IAAI,MAAM,YAAY,EACpB,OAAO,MAAM,YAAY,EAAE,CAAC,EAAE;IAElC;IACA,OAAO,MAAM,MAAM;AACrB","sources":["packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts"],"sourcesContent":["// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n node: Node | null | undefined,\n otherNode: Node | null | undefined\n): boolean {\n if (!shadowDOM()) {\n return otherNode && node ? node.contains(otherNode) : false;\n }\n\n if (!node || !otherNode) {\n return false;\n }\n\n let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n while (currentNode !== null) {\n if (currentNode === node) {\n return true;\n }\n\n if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n (currentNode as HTMLSlotElement).assignedSlot) {\n // Element is slotted\n currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n } else if (isShadowRoot(currentNode)) {\n // Element is in shadow root\n currentNode = currentNode.host;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n if (!shadowDOM()) {\n return doc.activeElement;\n }\n let activeElement: Element | null = doc.activeElement;\n\n while (activeElement && 'shadowRoot' in activeElement &&\n activeElement.shadowRoot?.activeElement) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n\n return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n if (event.composedPath) {\n return event.composedPath()[0] as Element;\n }\n }\n return event.target as Element;\n}\n"],"names":[],"version":3,"file":"DOMFunctions.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA,kIAAkI;AAClI,gFAAgF;;AASzE,SAAS,0CACd,IAAuC,EACvC,SAA4C;IAE5C,IAAI,CAAC,CAAA,GAAA,kCAAQ,KACX,OAAO,aAAa,OAAO,KAAK,QAAQ,CAAC,aAAa;IAGxD,IAAI,CAAC,QAAQ,CAAC,WACZ,OAAO;IAGT,IAAI,cAAqD;IAEzD,MAAO,gBAAgB,KAAM;QAC3B,IAAI,gBAAgB,MAClB,OAAO;QAGT,IAAI,AAAC,YAAgC,OAAO,KAAK,UAC/C,AAAC,YAAgC,YAAY,EAC7C,qBAAqB;QACrB,cAAc,AAAC,YAAgC,YAAY,CAAE,UAAU;aAClE,IAAI,CAAA,GAAA,sCAAW,EAAE,cACtB,4BAA4B;QAC5B,cAAc,YAAY,IAAI;aAE9B,cAAc,YAAY,UAAU;IAExC;IAEA,OAAO;AACT;AAKO,MAAM,4CAAmB,CAAC,MAAgB,QAAQ;QAOvD;IANA,IAAI,CAAC,CAAA,GAAA,kCAAQ,KACX,OAAO,IAAI,aAAa;IAE1B,IAAI,gBAAgC,IAAI,aAAa;IAErD,MAAO,iBAAiB,gBAAgB,mBACxC,4BAAA,cAAc,UAAU,cAAxB,gDAAA,0BAA0B,aAAa,EACrC,gBAAgB,cAAc,UAAU,CAAC,aAAa;IAGxD,OAAO;AACT;AAUO,SAAS,0CAAiD,KAAQ;IACvE,IAAI,CAAA,GAAA,kCAAQ,OAAQ,MAAM,MAAM,YAAY,WAAY,MAAM,MAAM,CAAC,UAAU,EAAE;YAErE,sBAEA;QAHV,IAAI,kBAAkB,OACpB,OAAQ,CAAA,uBAAA,MAAM,YAAY,EAAE,CAAC,EAAE,cAAvB,kCAAA,uBAA2B;aAC9B,IAAI,kBAAkB,MAAM,WAAW,EAC5C,OAAQ,CAAA,mCAAA,MAAM,WAAW,CAAC,YAAY,EAAE,CAAC,EAAE,cAAnC,8CAAA,mCAAuC;IAEnD;IACA,OAAO,MAAM,MAAM;AACrB;AAOO,SAAS,0CAAc,IAAgC;IAC5D,IAAI,CAAC,MACH,OAAO;IAET,kGAAkG;IAClG,IAAI,OAAO,KAAK,WAAW;IAC3B,IAAI,cAAc,CAAA,GAAA,wCAAa,EAAE;IACjC,IAAI,CAAE,CAAA,gBAAgB,YAAY,QAAQ,IAAI,gBAAgB,YAAY,UAAU,AAAD,GACjF,OAAO;IAET,IAAI,gBAAgB,KAAK,aAAa;IAEtC,gGAAgG;IAChG,OAAO,iBAAiB,QAAQ,KAAK,QAAQ,CAAC;AAChD","sources":["packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts"],"sourcesContent":["// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */\n\nimport {getOwnerWindow, isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\nimport type {SyntheticEvent} from 'react';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n node: Node | Element | null | undefined,\n otherNode: Node | Element | null | undefined\n): boolean {\n if (!shadowDOM()) {\n return otherNode && node ? node.contains(otherNode) : false;\n }\n\n if (!node || !otherNode) {\n return false;\n }\n\n let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n while (currentNode !== null) {\n if (currentNode === node) {\n return true;\n }\n\n if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n (currentNode as HTMLSlotElement).assignedSlot) {\n // Element is slotted\n currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n } else if (isShadowRoot(currentNode)) {\n // Element is in shadow root\n currentNode = currentNode.host;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n if (!shadowDOM()) {\n return doc.activeElement;\n }\n let activeElement: Element | null = doc.activeElement;\n\n while (activeElement && 'shadowRoot' in activeElement &&\n activeElement.shadowRoot?.activeElement) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n\n return activeElement;\n};\n\n// Type helper to extract the target element type from an event\ntype EventTargetType<T> = T extends SyntheticEvent<infer E, any> ? E : EventTarget;\n\n// Possibly we can improve the types for this using https://github.com/adobe/react-spectrum/pull/8991/changes#diff-2d491c0c91701d28d08e1cf9fcadbdb21a030b67ab681460c9934140f29127b8R68 but it was more changes than I\n// wanted to make to fix the function.\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event | SyntheticEvent>(event: T): EventTargetType<T> {\n if (shadowDOM() && (event.target instanceof Element) && event.target.shadowRoot) {\n if ('composedPath' in event) {\n return (event.composedPath()[0] ?? null) as EventTargetType<T>;\n } else if ('composedPath' in event.nativeEvent) {\n return (event.nativeEvent.composedPath()[0] ?? null) as EventTargetType<T>;\n }\n }\n return event.target as EventTargetType<T>;\n}\n\n/**\n * ShadowDOM safe fast version of node.contains(document.activeElement).\n * @param node\n * @returns\n */\nexport function isFocusWithin(node: Element | null | undefined): boolean {\n if (!node) {\n return false;\n }\n // Get the active element within the node's parent shadow root (or the document). Can return null.\n let root = node.getRootNode();\n let ownerWindow = getOwnerWindow(node);\n if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) {\n return false;\n }\n let activeElement = root.activeElement;\n\n // Check if the active element is within this node. These nodes are within the same shadow root.\n return activeElement != null && node.contains(activeElement);\n}\n"],"names":[],"version":3,"file":"DOMFunctions.main.js.map"}
@@ -1,8 +1,8 @@
1
- import {isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.mjs";
1
+ import {getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a, isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.mjs";
2
2
  import {shadowDOM as $lcSu5$shadowDOM} from "@react-stately/flags";
3
3
 
4
4
  // Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
5
-
5
+ /* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
6
6
 
7
7
  function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
8
8
  if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;
@@ -26,12 +26,24 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
26
26
  return activeElement;
27
27
  };
28
28
  function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
29
- if ((0, $lcSu5$shadowDOM)() && event.target.shadowRoot) {
30
- if (event.composedPath) return event.composedPath()[0];
29
+ if ((0, $lcSu5$shadowDOM)() && event.target instanceof Element && event.target.shadowRoot) {
30
+ var _event_composedPath_, _event_nativeEvent_composedPath_;
31
+ if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
32
+ else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
31
33
  }
32
34
  return event.target;
33
35
  }
36
+ function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
37
+ if (!node) return false;
38
+ // Get the active element within the node's parent shadow root (or the document). Can return null.
39
+ let root = node.getRootNode();
40
+ let ownerWindow = (0, $431fbd86ca7dc216$export$f21a1ffae260145a)(node);
41
+ if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
42
+ let activeElement = root.activeElement;
43
+ // Check if the active element is within this node. These nodes are within the same shadow root.
44
+ return activeElement != null && node.contains(activeElement);
45
+ }
34
46
 
35
47
 
36
- export {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget};
48
+ export {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$b4f377a2b6254582 as isFocusWithin};
37
49
  //# sourceMappingURL=DOMFunctions.module.js.map
@@ -1,8 +1,8 @@
1
- import {isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.module.js";
1
+ import {getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a, isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.module.js";
2
2
  import {shadowDOM as $lcSu5$shadowDOM} from "@react-stately/flags";
3
3
 
4
4
  // Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
5
-
5
+ /* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */
6
6
 
7
7
  function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
8
8
  if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;
@@ -26,12 +26,24 @@ const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
26
26
  return activeElement;
27
27
  };
28
28
  function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
29
- if ((0, $lcSu5$shadowDOM)() && event.target.shadowRoot) {
30
- if (event.composedPath) return event.composedPath()[0];
29
+ if ((0, $lcSu5$shadowDOM)() && event.target instanceof Element && event.target.shadowRoot) {
30
+ var _event_composedPath_, _event_nativeEvent_composedPath_;
31
+ if ('composedPath' in event) return (_event_composedPath_ = event.composedPath()[0]) !== null && _event_composedPath_ !== void 0 ? _event_composedPath_ : null;
32
+ else if ('composedPath' in event.nativeEvent) return (_event_nativeEvent_composedPath_ = event.nativeEvent.composedPath()[0]) !== null && _event_nativeEvent_composedPath_ !== void 0 ? _event_nativeEvent_composedPath_ : null;
31
33
  }
32
34
  return event.target;
33
35
  }
36
+ function $d4ee10de306f2510$export$b4f377a2b6254582(node) {
37
+ if (!node) return false;
38
+ // Get the active element within the node's parent shadow root (or the document). Can return null.
39
+ let root = node.getRootNode();
40
+ let ownerWindow = (0, $431fbd86ca7dc216$export$f21a1ffae260145a)(node);
41
+ if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) return false;
42
+ let activeElement = root.activeElement;
43
+ // Check if the active element is within this node. These nodes are within the same shadow root.
44
+ return activeElement != null && node.contains(activeElement);
45
+ }
34
46
 
35
47
 
36
- export {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget};
48
+ export {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$b4f377a2b6254582 as isFocusWithin};
37
49
  //# sourceMappingURL=DOMFunctions.module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;AAAA,kIAAkI;;;AAQ3H,SAAS,0CACd,IAA6B,EAC7B,SAAkC;IAElC,IAAI,CAAC,CAAA,GAAA,gBAAQ,KACX,OAAO,aAAa,OAAO,KAAK,QAAQ,CAAC,aAAa;IAGxD,IAAI,CAAC,QAAQ,CAAC,WACZ,OAAO;IAGT,IAAI,cAAqD;IAEzD,MAAO,gBAAgB,KAAM;QAC3B,IAAI,gBAAgB,MAClB,OAAO;QAGT,IAAI,AAAC,YAAgC,OAAO,KAAK,UAC/C,AAAC,YAAgC,YAAY,EAC7C,qBAAqB;QACrB,cAAc,AAAC,YAAgC,YAAY,CAAE,UAAU;aAClE,IAAI,CAAA,GAAA,yCAAW,EAAE,cACtB,4BAA4B;QAC5B,cAAc,YAAY,IAAI;aAE9B,cAAc,YAAY,UAAU;IAExC;IAEA,OAAO;AACT;AAKO,MAAM,4CAAmB,CAAC,MAAgB,QAAQ;QAOvD;IANA,IAAI,CAAC,CAAA,GAAA,gBAAQ,KACX,OAAO,IAAI,aAAa;IAE1B,IAAI,gBAAgC,IAAI,aAAa;IAErD,MAAO,iBAAiB,gBAAgB,mBACxC,4BAAA,cAAc,UAAU,cAAxB,gDAAA,0BAA0B,aAAa,EACrC,gBAAgB,cAAc,UAAU,CAAC,aAAa;IAGxD,OAAO;AACT;AAKO,SAAS,0CAAgC,KAAQ;IACtD,IAAI,CAAA,GAAA,gBAAQ,OAAO,AAAC,MAAM,MAAM,CAAiB,UAAU,EAAE;QAC3D,IAAI,MAAM,YAAY,EACpB,OAAO,MAAM,YAAY,EAAE,CAAC,EAAE;IAElC;IACA,OAAO,MAAM,MAAM;AACrB","sources":["packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts"],"sourcesContent":["// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n\nimport {isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n node: Node | null | undefined,\n otherNode: Node | null | undefined\n): boolean {\n if (!shadowDOM()) {\n return otherNode && node ? node.contains(otherNode) : false;\n }\n\n if (!node || !otherNode) {\n return false;\n }\n\n let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n while (currentNode !== null) {\n if (currentNode === node) {\n return true;\n }\n\n if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n (currentNode as HTMLSlotElement).assignedSlot) {\n // Element is slotted\n currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n } else if (isShadowRoot(currentNode)) {\n // Element is in shadow root\n currentNode = currentNode.host;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n if (!shadowDOM()) {\n return doc.activeElement;\n }\n let activeElement: Element | null = doc.activeElement;\n\n while (activeElement && 'shadowRoot' in activeElement &&\n activeElement.shadowRoot?.activeElement) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n\n return activeElement;\n};\n\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event>(event: T): Element {\n if (shadowDOM() && (event.target as HTMLElement).shadowRoot) {\n if (event.composedPath) {\n return event.composedPath()[0] as Element;\n }\n }\n return event.target as Element;\n}\n"],"names":[],"version":3,"file":"DOMFunctions.module.js.map"}
1
+ {"mappings":";;;AAAA,kIAAkI;AAClI,gFAAgF;;AASzE,SAAS,0CACd,IAAuC,EACvC,SAA4C;IAE5C,IAAI,CAAC,CAAA,GAAA,gBAAQ,KACX,OAAO,aAAa,OAAO,KAAK,QAAQ,CAAC,aAAa;IAGxD,IAAI,CAAC,QAAQ,CAAC,WACZ,OAAO;IAGT,IAAI,cAAqD;IAEzD,MAAO,gBAAgB,KAAM;QAC3B,IAAI,gBAAgB,MAClB,OAAO;QAGT,IAAI,AAAC,YAAgC,OAAO,KAAK,UAC/C,AAAC,YAAgC,YAAY,EAC7C,qBAAqB;QACrB,cAAc,AAAC,YAAgC,YAAY,CAAE,UAAU;aAClE,IAAI,CAAA,GAAA,yCAAW,EAAE,cACtB,4BAA4B;QAC5B,cAAc,YAAY,IAAI;aAE9B,cAAc,YAAY,UAAU;IAExC;IAEA,OAAO;AACT;AAKO,MAAM,4CAAmB,CAAC,MAAgB,QAAQ;QAOvD;IANA,IAAI,CAAC,CAAA,GAAA,gBAAQ,KACX,OAAO,IAAI,aAAa;IAE1B,IAAI,gBAAgC,IAAI,aAAa;IAErD,MAAO,iBAAiB,gBAAgB,mBACxC,4BAAA,cAAc,UAAU,cAAxB,gDAAA,0BAA0B,aAAa,EACrC,gBAAgB,cAAc,UAAU,CAAC,aAAa;IAGxD,OAAO;AACT;AAUO,SAAS,0CAAiD,KAAQ;IACvE,IAAI,CAAA,GAAA,gBAAQ,OAAQ,MAAM,MAAM,YAAY,WAAY,MAAM,MAAM,CAAC,UAAU,EAAE;YAErE,sBAEA;QAHV,IAAI,kBAAkB,OACpB,OAAQ,CAAA,uBAAA,MAAM,YAAY,EAAE,CAAC,EAAE,cAAvB,kCAAA,uBAA2B;aAC9B,IAAI,kBAAkB,MAAM,WAAW,EAC5C,OAAQ,CAAA,mCAAA,MAAM,WAAW,CAAC,YAAY,EAAE,CAAC,EAAE,cAAnC,8CAAA,mCAAuC;IAEnD;IACA,OAAO,MAAM,MAAM;AACrB;AAOO,SAAS,0CAAc,IAAgC;IAC5D,IAAI,CAAC,MACH,OAAO;IAET,kGAAkG;IAClG,IAAI,OAAO,KAAK,WAAW;IAC3B,IAAI,cAAc,CAAA,GAAA,yCAAa,EAAE;IACjC,IAAI,CAAE,CAAA,gBAAgB,YAAY,QAAQ,IAAI,gBAAgB,YAAY,UAAU,AAAD,GACjF,OAAO;IAET,IAAI,gBAAgB,KAAK,aAAa;IAEtC,gGAAgG;IAChG,OAAO,iBAAiB,QAAQ,KAAK,QAAQ,CAAC;AAChD","sources":["packages/@react-aria/utils/src/shadowdom/DOMFunctions.ts"],"sourcesContent":["// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16\n/* eslint-disable rsp-rules/no-non-shadow-contains, rsp-rules/safe-event-target */\n\nimport {getOwnerWindow, isShadowRoot} from '../domHelpers';\nimport {shadowDOM} from '@react-stately/flags';\nimport type {SyntheticEvent} from 'react';\n\n/**\n * ShadowDOM safe version of Node.contains.\n */\nexport function nodeContains(\n node: Node | Element | null | undefined,\n otherNode: Node | Element | null | undefined\n): boolean {\n if (!shadowDOM()) {\n return otherNode && node ? node.contains(otherNode) : false;\n }\n\n if (!node || !otherNode) {\n return false;\n }\n\n let currentNode: HTMLElement | Node | null | undefined = otherNode;\n\n while (currentNode !== null) {\n if (currentNode === node) {\n return true;\n }\n\n if ((currentNode as HTMLSlotElement).tagName === 'SLOT' &&\n (currentNode as HTMLSlotElement).assignedSlot) {\n // Element is slotted\n currentNode = (currentNode as HTMLSlotElement).assignedSlot!.parentNode;\n } else if (isShadowRoot(currentNode)) {\n // Element is in shadow root\n currentNode = currentNode.host;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return false;\n}\n\n/**\n * ShadowDOM safe version of document.activeElement.\n */\nexport const getActiveElement = (doc: Document = document): Element | null => {\n if (!shadowDOM()) {\n return doc.activeElement;\n }\n let activeElement: Element | null = doc.activeElement;\n\n while (activeElement && 'shadowRoot' in activeElement &&\n activeElement.shadowRoot?.activeElement) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n\n return activeElement;\n};\n\n// Type helper to extract the target element type from an event\ntype EventTargetType<T> = T extends SyntheticEvent<infer E, any> ? E : EventTarget;\n\n// Possibly we can improve the types for this using https://github.com/adobe/react-spectrum/pull/8991/changes#diff-2d491c0c91701d28d08e1cf9fcadbdb21a030b67ab681460c9934140f29127b8R68 but it was more changes than I\n// wanted to make to fix the function.\n/**\n * ShadowDOM safe version of event.target.\n */\nexport function getEventTarget<T extends Event | SyntheticEvent>(event: T): EventTargetType<T> {\n if (shadowDOM() && (event.target instanceof Element) && event.target.shadowRoot) {\n if ('composedPath' in event) {\n return (event.composedPath()[0] ?? null) as EventTargetType<T>;\n } else if ('composedPath' in event.nativeEvent) {\n return (event.nativeEvent.composedPath()[0] ?? null) as EventTargetType<T>;\n }\n }\n return event.target as EventTargetType<T>;\n}\n\n/**\n * ShadowDOM safe fast version of node.contains(document.activeElement).\n * @param node\n * @returns\n */\nexport function isFocusWithin(node: Element | null | undefined): boolean {\n if (!node) {\n return false;\n }\n // Get the active element within the node's parent shadow root (or the document). Can return null.\n let root = node.getRootNode();\n let ownerWindow = getOwnerWindow(node);\n if (!(root instanceof ownerWindow.Document || root instanceof ownerWindow.ShadowRoot)) {\n return false;\n }\n let activeElement = root.activeElement;\n\n // Check if the active element is within this node. These nodes are within the same shadow root.\n return activeElement != null && node.contains(activeElement);\n}\n"],"names":[],"version":3,"file":"DOMFunctions.module.js.map"}
@@ -1 +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;AAEA;;CAEC,GACD,SAAS,6BAAO,KAAc;IAC5B,OAAO,UAAU,QACf,OAAO,UAAU,YACjB,cAAc,SACd,OAAO,AAAC,MAAe,QAAQ,KAAK;AACxC;AAKO,SAAS,0CAAa,IAAiB;IAC5C,OAAO,6BAAO,SACZ,KAAK,QAAQ,KAAK,KAAK,sBAAsB,IAC7C,UAAU;AACd","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\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n return value !== null &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n return isNode(node) &&\n node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n 'host' in node;\n}\n"],"names":[],"version":3,"file":"domHelpers.main.js.map"}
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;AAEA;;CAEC,GACD,SAAS,6BAAO,KAAc;IAC5B,OAAO,UAAU,QACf,OAAO,UAAU,YACjB,cAAc,SACd,OAAO,AAAC,MAAe,QAAQ,KAAK;AACxC;AAKO,SAAS,0CAAa,IAAiB;IAC5C,OAAO,6BAAO,SACZ,KAAK,QAAQ,KAAK,KAAK,sBAAsB,IAC7C,UAAU;AACd","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 globalThis) | Element | null | undefined\n): Window & typeof globalThis => {\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\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n return value !== null &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n return isNode(node) &&\n node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n 'host' in node;\n}\n"],"names":[],"version":3,"file":"domHelpers.main.js.map"}
@@ -1 +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;AAEA;;CAEC,GACD,SAAS,6BAAO,KAAc;IAC5B,OAAO,UAAU,QACf,OAAO,UAAU,YACjB,cAAc,SACd,OAAO,AAAC,MAAe,QAAQ,KAAK;AACxC;AAKO,SAAS,0CAAa,IAAiB;IAC5C,OAAO,6BAAO,SACZ,KAAK,QAAQ,KAAK,KAAK,sBAAsB,IAC7C,UAAU;AACd","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\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n return value !== null &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n return isNode(node) &&\n node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n 'host' in node;\n}\n"],"names":[],"version":3,"file":"domHelpers.module.js.map"}
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;AAEA;;CAEC,GACD,SAAS,6BAAO,KAAc;IAC5B,OAAO,UAAU,QACf,OAAO,UAAU,YACjB,cAAc,SACd,OAAO,AAAC,MAAe,QAAQ,KAAK;AACxC;AAKO,SAAS,0CAAa,IAAiB;IAC5C,OAAO,6BAAO,SACZ,KAAK,QAAQ,KAAK,KAAK,sBAAsB,IAC7C,UAAU;AACd","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 globalThis) | Element | null | undefined\n): Window & typeof globalThis => {\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\n/**\n * Type guard that checks if a value is a Node. Verifies the presence and type of the nodeType property.\n */\nfunction isNode(value: unknown): value is Node {\n return value !== null &&\n typeof value === 'object' &&\n 'nodeType' in value &&\n typeof (value as Node).nodeType === 'number';\n}\n/**\n * Type guard that checks if a node is a ShadowRoot. Uses nodeType and host property checks to\n * distinguish ShadowRoot from other DocumentFragments.\n */\nexport function isShadowRoot(node: Node | null): node is ShadowRoot {\n return isNode(node) &&\n node.nodeType === Node.DOCUMENT_FRAGMENT_NODE &&\n 'host' in node;\n}\n"],"names":[],"version":3,"file":"domHelpers.module.js.map"}
@@ -18,12 +18,13 @@ $parcel$export(module.exports, "getScrollParents", () => $49f0d9486c2408aa$expor
18
18
  * governing permissions and limitations under the License.
19
19
  */
20
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);
21
+ let parentElements = [];
22
+ let root = document.scrollingElement || document.documentElement;
23
+ do {
24
+ if ((0, $9a54e9cd5db23b5d$exports.isScrollable)(node, checkForOverflow)) parentElements.push(node);
24
25
  node = node.parentElement;
25
- }
26
- return scrollParents;
26
+ }while (node && node !== root);
27
+ return parentElements;
27
28
  }
28
29
 
29
30
 
@@ -1 +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"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAIM,SAAS,0CAAiB,IAAa,EAAE,gBAA0B;IACxE,IAAI,iBAA4B,EAAE;IAClC,IAAI,OAAO,SAAS,gBAAgB,IAAI,SAAS,eAAe;IAEhE,GAAG;QACD,IAAI,CAAA,GAAA,sCAAW,EAAE,MAAM,mBACrB,eAAe,IAAI,CAAC;QAEtB,OAAO,KAAK,aAAa;IAC3B,QAAS,QAAQ,SAAS,MAAM;IAEhC,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 let parentElements: Element[] = [];\n let root = document.scrollingElement || document.documentElement;\n\n do {\n if (isScrollable(node, checkForOverflow)) {\n parentElements.push(node);\n }\n node = node.parentElement as Element;\n } while (node && node !== root);\n\n return parentElements;\n}\n"],"names":[],"version":3,"file":"getScrollParents.main.js.map"}
@@ -12,12 +12,13 @@ import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScr
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
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);
15
+ let parentElements = [];
16
+ let root = document.scrollingElement || document.documentElement;
17
+ do {
18
+ if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(node, checkForOverflow)) parentElements.push(node);
18
19
  node = node.parentElement;
19
- }
20
- return scrollParents;
20
+ }while (node && node !== root);
21
+ return parentElements;
21
22
  }
22
23
 
23
24
 
@@ -12,12 +12,13 @@ import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from "./isScr
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
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);
15
+ let parentElements = [];
16
+ let root = document.scrollingElement || document.documentElement;
17
+ do {
18
+ if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(node, checkForOverflow)) parentElements.push(node);
18
19
  node = node.parentElement;
19
- }
20
- return scrollParents;
20
+ }while (node && node !== root);
21
+ return parentElements;
21
22
  }
22
23
 
23
24
 
@@ -1 +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"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAIM,SAAS,0CAAiB,IAAa,EAAE,gBAA0B;IACxE,IAAI,iBAA4B,EAAE;IAClC,IAAI,OAAO,SAAS,gBAAgB,IAAI,SAAS,eAAe;IAEhE,GAAG;QACD,IAAI,CAAA,GAAA,yCAAW,EAAE,MAAM,mBACrB,eAAe,IAAI,CAAC;QAEtB,OAAO,KAAK,aAAa;IAC3B,QAAS,QAAQ,SAAS,MAAM;IAEhC,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 let parentElements: Element[] = [];\n let root = document.scrollingElement || document.documentElement;\n\n do {\n if (isScrollable(node, checkForOverflow)) {\n parentElements.push(node);\n }\n node = node.parentElement as Element;\n } while (node && node !== root);\n\n return parentElements;\n}\n"],"names":[],"version":3,"file":"getScrollParents.module.js.map"}
package/dist/import.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {mergeIds as $bdb11010cef70236$export$cd8c9cb68f842629, useId as $bdb11010cef70236$export$f680877a34711e37, useSlotId as $bdb11010cef70236$export$b4cc09c592e8fdb8} from "./useId.mjs";
2
2
  import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.mjs";
3
3
  import {createShadowTreeWalker as $dfc540311bf7f109$export$4d0f8be8b12a7ef6, ShadowTreeWalker as $dfc540311bf7f109$export$63eb3ababa9c55c4} from "./ShadowTreeWalker.mjs";
4
- import {getActiveElement as $d4ee10de306f2510$export$cd4e5573fbe2b576, getEventTarget as $d4ee10de306f2510$export$e58f029f0fbfdb29, nodeContains as $d4ee10de306f2510$export$4282f70798064fe0} from "./DOMFunctions.mjs";
4
+ import {getActiveElement as $d4ee10de306f2510$export$cd4e5573fbe2b576, getEventTarget as $d4ee10de306f2510$export$e58f029f0fbfdb29, isFocusWithin as $d4ee10de306f2510$export$b4f377a2b6254582, nodeContains as $d4ee10de306f2510$export$4282f70798064fe0} from "./DOMFunctions.mjs";
5
5
  import {getOwnerDocument as $431fbd86ca7dc216$export$b204af158042fbac, getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a, isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.mjs";
6
6
  import {mergeProps as $3ef42575df84b30b$export$9d1611c77c2fe928} from "./mergeProps.mjs";
7
7
  import {mergeRefs as $5dc95899b306f630$export$c9058316764c140e} from "./mergeRefs.mjs";
@@ -95,5 +95,5 @@ import {clamp as $4507461a1b870123$re_export$clamp, snapValueToStep as $4507461a
95
95
 
96
96
 
97
97
 
98
- export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $dfc540311bf7f109$export$4d0f8be8b12a7ef6 as createShadowTreeWalker, $dfc540311bf7f109$export$63eb3ababa9c55c4 as ShadowTreeWalker, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot, $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$bdc77b0c0a3a85d6 as useSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps, $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as handleLinkClick, $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, $ca9b37712f007381$export$72ef708ab07251f1 as useUpdateLayoutEffect, $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, $26f7f3da73fcd9d6$export$7717c92ee915373e as useLoadMore, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as useLoadMoreSentinel, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as UNSTABLE_useLoadMoreSentinel, $cdc5a6778b766db2$export$a9d04c5684123369 as inertValue, $5671b20cf9b562b2$export$447a38995de2c711 as CLEAR_FOCUS_EVENT, $5671b20cf9b562b2$export$831c820ad60f9d12 as FOCUS_EVENT, $21f1aa98acb08317$export$16792effe837dba3 as isCtrlKeyPressed, $21f1aa98acb08317$export$c57958e35f31ed73 as willOpenKeyboard, $d3f049242431219c$export$6d3443f2c48bfc20 as useEnterAnimation, $d3f049242431219c$export$45fda7c47f93fd48 as useExitAnimation, $b4b717babfbb907b$export$4c063cf1350e6fed as isFocusable, $b4b717babfbb907b$export$bebd5a1431fec25d as isTabbable};
98
+ export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $dfc540311bf7f109$export$4d0f8be8b12a7ef6 as createShadowTreeWalker, $dfc540311bf7f109$export$63eb3ababa9c55c4 as ShadowTreeWalker, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$b4f377a2b6254582 as isFocusWithin, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot, $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$bdc77b0c0a3a85d6 as useSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps, $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as handleLinkClick, $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, $ca9b37712f007381$export$72ef708ab07251f1 as useUpdateLayoutEffect, $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, $26f7f3da73fcd9d6$export$7717c92ee915373e as useLoadMore, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as useLoadMoreSentinel, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as UNSTABLE_useLoadMoreSentinel, $cdc5a6778b766db2$export$a9d04c5684123369 as inertValue, $5671b20cf9b562b2$export$447a38995de2c711 as CLEAR_FOCUS_EVENT, $5671b20cf9b562b2$export$831c820ad60f9d12 as FOCUS_EVENT, $21f1aa98acb08317$export$16792effe837dba3 as isCtrlKeyPressed, $21f1aa98acb08317$export$c57958e35f31ed73 as willOpenKeyboard, $d3f049242431219c$export$6d3443f2c48bfc20 as useEnterAnimation, $d3f049242431219c$export$45fda7c47f93fd48 as useExitAnimation, $b4b717babfbb907b$export$4c063cf1350e6fed as isFocusable, $b4b717babfbb907b$export$bebd5a1431fec25d as isTabbable};
99
99
  //# sourceMappingURL=module.js.map
@@ -17,7 +17,10 @@ $parcel$export(module.exports, "isScrollable", () => $9a54e9cd5db23b5d$export$2b
17
17
  */ function $9a54e9cd5db23b5d$export$2bb74740c4e19def(node, checkForOverflow) {
18
18
  if (!node) return false;
19
19
  let style = window.getComputedStyle(node);
20
+ let root = document.scrollingElement || document.documentElement;
20
21
  let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
22
+ // Root element has `visible` overflow by default, but is scrollable nonetheless.
23
+ if (node === root && style.overflow !== 'hidden') isScrollable = true;
21
24
  if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
22
25
  return isScrollable;
23
26
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAa,IAAoB,EAAE,gBAA0B;IAC3E,IAAI,CAAC,MACH,OAAO;IAET,IAAI,QAAQ,OAAO,gBAAgB,CAAC;IACpC,IAAI,eAAe,gBAAgB,IAAI,CAAC,MAAM,QAAQ,GAAG,MAAM,SAAS,GAAG,MAAM,SAAS;IAE1F,IAAI,gBAAgB,kBAClB,eAAe,KAAK,YAAY,KAAK,KAAK,YAAY,IAAI,KAAK,WAAW,KAAK,KAAK,WAAW;IAGjG,OAAO;AACT","sources":["packages/@react-aria/utils/src/isScrollable.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\nexport function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean {\n if (!node) {\n return false;\n }\n let style = window.getComputedStyle(node);\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n\n if (isScrollable && checkForOverflow) {\n isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n }\n\n return isScrollable;\n}\n"],"names":[],"version":3,"file":"isScrollable.main.js.map"}
1
+ {"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAa,IAAoB,EAAE,gBAA0B;IAC3E,IAAI,CAAC,MACH,OAAO;IAET,IAAI,QAAQ,OAAO,gBAAgB,CAAC;IACpC,IAAI,OAAO,SAAS,gBAAgB,IAAI,SAAS,eAAe;IAChE,IAAI,eAAe,gBAAgB,IAAI,CAAC,MAAM,QAAQ,GAAG,MAAM,SAAS,GAAG,MAAM,SAAS;IAE1F,iFAAiF;IACjF,IAAI,SAAS,QAAQ,MAAM,QAAQ,KAAK,UACtC,eAAe;IAGjB,IAAI,gBAAgB,kBAClB,eAAe,KAAK,YAAY,KAAK,KAAK,YAAY,IAAI,KAAK,WAAW,KAAK,KAAK,WAAW;IAGjG,OAAO;AACT","sources":["packages/@react-aria/utils/src/isScrollable.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\nexport function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean {\n if (!node) {\n return false;\n }\n let style = window.getComputedStyle(node);\n let root = document.scrollingElement || document.documentElement;\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n\n // Root element has `visible` overflow by default, but is scrollable nonetheless.\n if (node === root && style.overflow !== 'hidden') {\n isScrollable = true;\n }\n\n if (isScrollable && checkForOverflow) {\n isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n }\n\n return isScrollable;\n}\n"],"names":[],"version":3,"file":"isScrollable.main.js.map"}
@@ -11,7 +11,10 @@
11
11
  */ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
12
12
  if (!node) return false;
13
13
  let style = window.getComputedStyle(node);
14
+ let root = document.scrollingElement || document.documentElement;
14
15
  let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
16
+ // Root element has `visible` overflow by default, but is scrollable nonetheless.
17
+ if (node === root && style.overflow !== 'hidden') isScrollable = true;
15
18
  if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
16
19
  return isScrollable;
17
20
  }
@@ -11,7 +11,10 @@
11
11
  */ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
12
12
  if (!node) return false;
13
13
  let style = window.getComputedStyle(node);
14
+ let root = document.scrollingElement || document.documentElement;
14
15
  let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
16
+ // Root element has `visible` overflow by default, but is scrollable nonetheless.
17
+ if (node === root && style.overflow !== 'hidden') isScrollable = true;
15
18
  if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
16
19
  return isScrollable;
17
20
  }
@@ -1 +1 @@
1
- {"mappings":"AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAa,IAAoB,EAAE,gBAA0B;IAC3E,IAAI,CAAC,MACH,OAAO;IAET,IAAI,QAAQ,OAAO,gBAAgB,CAAC;IACpC,IAAI,eAAe,gBAAgB,IAAI,CAAC,MAAM,QAAQ,GAAG,MAAM,SAAS,GAAG,MAAM,SAAS;IAE1F,IAAI,gBAAgB,kBAClB,eAAe,KAAK,YAAY,KAAK,KAAK,YAAY,IAAI,KAAK,WAAW,KAAK,KAAK,WAAW;IAGjG,OAAO;AACT","sources":["packages/@react-aria/utils/src/isScrollable.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\nexport function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean {\n if (!node) {\n return false;\n }\n let style = window.getComputedStyle(node);\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n\n if (isScrollable && checkForOverflow) {\n isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n }\n\n return isScrollable;\n}\n"],"names":[],"version":3,"file":"isScrollable.module.js.map"}
1
+ {"mappings":"AAAA;;;;;;;;;;CAUC,GAEM,SAAS,0CAAa,IAAoB,EAAE,gBAA0B;IAC3E,IAAI,CAAC,MACH,OAAO;IAET,IAAI,QAAQ,OAAO,gBAAgB,CAAC;IACpC,IAAI,OAAO,SAAS,gBAAgB,IAAI,SAAS,eAAe;IAChE,IAAI,eAAe,gBAAgB,IAAI,CAAC,MAAM,QAAQ,GAAG,MAAM,SAAS,GAAG,MAAM,SAAS;IAE1F,iFAAiF;IACjF,IAAI,SAAS,QAAQ,MAAM,QAAQ,KAAK,UACtC,eAAe;IAGjB,IAAI,gBAAgB,kBAClB,eAAe,KAAK,YAAY,KAAK,KAAK,YAAY,IAAI,KAAK,WAAW,KAAK,KAAK,WAAW;IAGjG,OAAO;AACT","sources":["packages/@react-aria/utils/src/isScrollable.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\nexport function isScrollable(node: Element | null, checkForOverflow?: boolean): boolean {\n if (!node) {\n return false;\n }\n let style = window.getComputedStyle(node);\n let root = document.scrollingElement || document.documentElement;\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n\n // Root element has `visible` overflow by default, but is scrollable nonetheless.\n if (node === root && style.overflow !== 'hidden') {\n isScrollable = true;\n }\n\n if (isScrollable && checkForOverflow) {\n isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n }\n\n return isScrollable;\n}\n"],"names":[],"version":3,"file":"isScrollable.module.js.map"}
package/dist/main.js CHANGED
@@ -55,6 +55,7 @@ $parcel$export(module.exports, "ShadowTreeWalker", () => $8e13b2545651735a$expor
55
55
  $parcel$export(module.exports, "getActiveElement", () => $d723bea02f3e2567$exports.getActiveElement);
56
56
  $parcel$export(module.exports, "getEventTarget", () => $d723bea02f3e2567$exports.getEventTarget);
57
57
  $parcel$export(module.exports, "nodeContains", () => $d723bea02f3e2567$exports.nodeContains);
58
+ $parcel$export(module.exports, "isFocusWithin", () => $d723bea02f3e2567$exports.isFocusWithin);
58
59
  $parcel$export(module.exports, "getOwnerDocument", () => $aaa611146751592e$exports.getOwnerDocument);
59
60
  $parcel$export(module.exports, "getOwnerWindow", () => $aaa611146751592e$exports.getOwnerWindow);
60
61
  $parcel$export(module.exports, "isShadowRoot", () => $aaa611146751592e$exports.isShadowRoot);
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/utils/src/index.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 */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {createShadowTreeWalker, ShadowTreeWalker} from './shadowdom/ShadowTreeWalker';\nexport {getActiveElement, getEventTarget, nodeContains} from './shadowdom/DOMFunctions';\nexport {getOwnerDocument, getOwnerWindow, isShadowRoot} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps, handleLinkClick} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useUpdateLayoutEffect} from './useUpdateLayoutEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\nexport {useLoadMoreSentinel, useLoadMoreSentinel as UNSTABLE_useLoadMoreSentinel} from './useLoadMoreSentinel';\nexport {inertValue} from './inertValue';\nexport {CLEAR_FOCUS_EVENT, FOCUS_EVENT} from './constants';\nexport {isCtrlKeyPressed, willOpenKeyboard} from './keyboard';\nexport {useEnterAnimation, useExitAnimation} from './animation';\nexport {isFocusable, isTabbable} from './isFocusable';\n\nexport type {LoadMoreSentinelProps} from './useLoadMoreSentinel';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/utils/src/index.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 */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {createShadowTreeWalker, ShadowTreeWalker} from './shadowdom/ShadowTreeWalker';\nexport {getActiveElement, getEventTarget, nodeContains, isFocusWithin} from './shadowdom/DOMFunctions';\nexport {getOwnerDocument, getOwnerWindow, isShadowRoot} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps, handleLinkClick} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useUpdateLayoutEffect} from './useUpdateLayoutEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\nexport {useLoadMoreSentinel, useLoadMoreSentinel as UNSTABLE_useLoadMoreSentinel} from './useLoadMoreSentinel';\nexport {inertValue} from './inertValue';\nexport {CLEAR_FOCUS_EVENT, FOCUS_EVENT} from './constants';\nexport {isCtrlKeyPressed, willOpenKeyboard} from './keyboard';\nexport {useEnterAnimation, useExitAnimation} from './animation';\nexport {isFocusable, isTabbable} from './isFocusable';\n\nexport type {LoadMoreSentinelProps} from './useLoadMoreSentinel';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -1,5 +1,6 @@
1
1
  var $1e2191638e54f613$exports = require("./chain.main.js");
2
2
  var $8c61827343eed941$exports = require("./useId.main.js");
3
+ var $f05dc24eafaeb7e2$exports = require("./mergeRefs.main.js");
3
4
  var $eVrjB$clsx = require("clsx");
4
5
 
5
6
 
@@ -25,6 +26,7 @@ $parcel$export(module.exports, "mergeProps", () => $f847cd1382ea7cd4$export$9d16
25
26
  */
26
27
 
27
28
 
29
+
28
30
  function $f847cd1382ea7cd4$export$9d1611c77c2fe928(...args) {
29
31
  // Start with a base clone of the first argument. This is a lot faster than starting
30
32
  // with an empty object and adding properties as we go.
@@ -41,6 +43,7 @@ function $f847cd1382ea7cd4$export$9d1611c77c2fe928(...args) {
41
43
  key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $1e2191638e54f613$exports.chain)(a, b);
42
44
  else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, ($parcel$interopDefault($eVrjB$clsx)))(a, b);
43
45
  else if (key === 'id' && a && b) result.id = (0, $8c61827343eed941$exports.mergeIds)(a, b);
46
+ else if (key === 'ref' && a && b) result.ref = (0, $f05dc24eafaeb7e2$exports.mergeRefs)(a, b);
44
47
  else result[key] = b !== undefined ? b : a;
45
48
  }
46
49
  }
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAwBM,SAAS,0CAAiC,GAAG,IAAO;IACzD,oFAAoF;IACpF,uDAAuD;IACvD,IAAI,SAAgB;QAAC,GAAG,IAAI,CAAC,EAAE;IAAA;IAC/B,IAAK,IAAI,IAAI,GAAG,IAAI,KAAK,MAAM,EAAE,IAAK;QACpC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACnB,IAAK,IAAI,OAAO,MAAO;YACrB,IAAI,IAAI,MAAM,CAAC,IAAI;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI;YAElB,eAAe;YACf,IACE,OAAO,MAAM,cACb,OAAO,MAAM,cACb,qCAAqC;YACrC,GAAG,CAAC,EAAE,KAAK,OACX,GAAG,CAAC,EAAE,KAAK,OACX,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,MAC/B,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,IAE/B,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,+BAAI,EAAE,GAAG;iBAGlB,IACL,AAAC,CAAA,QAAQ,eAAe,QAAQ,kBAAiB,KACjD,OAAO,MAAM,YACb,OAAO,MAAM,UAEb,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,qCAAG,EAAE,GAAG;iBACjB,IAAI,QAAQ,QAAQ,KAAK,GAC9B,OAAO,EAAE,GAAG,CAAA,GAAA,kCAAO,EAAE,GAAG;iBAGxB,MAAM,CAAC,IAAI,GAAG,MAAM,YAAY,IAAI;QAExC;IACF;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/mergeProps.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 {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n"],"names":[],"version":3,"file":"mergeProps.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAyBM,SAAS,0CAAiC,GAAG,IAAO;IACzD,oFAAoF;IACpF,uDAAuD;IACvD,IAAI,SAAgB;QAAC,GAAG,IAAI,CAAC,EAAE;IAAA;IAC/B,IAAK,IAAI,IAAI,GAAG,IAAI,KAAK,MAAM,EAAE,IAAK;QACpC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACnB,IAAK,IAAI,OAAO,MAAO;YACrB,IAAI,IAAI,MAAM,CAAC,IAAI;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI;YAElB,eAAe;YACf,IACE,OAAO,MAAM,cACb,OAAO,MAAM,cACb,qCAAqC;YACrC,GAAG,CAAC,EAAE,KAAK,OACX,GAAG,CAAC,EAAE,KAAK,OACX,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,MAC/B,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,IAE/B,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,+BAAI,EAAE,GAAG;iBAGlB,IACL,AAAC,CAAA,QAAQ,eAAe,QAAQ,kBAAiB,KACjD,OAAO,MAAM,YACb,OAAO,MAAM,UAEb,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,qCAAG,EAAE,GAAG;iBACjB,IAAI,QAAQ,QAAQ,KAAK,GAC9B,OAAO,EAAE,GAAG,CAAA,GAAA,kCAAO,EAAE,GAAG;iBACnB,IAAI,QAAQ,SAAS,KAAK,GAC/B,OAAO,GAAG,GAAG,CAAA,GAAA,mCAAQ,EAAE,GAAG;iBAG1B,MAAM,CAAC,IAAI,GAAG,MAAM,YAAY,IAAI;QAExC;IACF;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/mergeProps.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 {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\nimport {mergeRefs} from './mergeRefs';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, ids are deduplicated, and refs are merged.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n } else if (key === 'ref' && a && b) {\n result.ref = mergeRefs(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n"],"names":[],"version":3,"file":"mergeProps.main.js.map"}
@@ -1,5 +1,6 @@
1
1
  import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.mjs";
2
2
  import {mergeIds as $bdb11010cef70236$export$cd8c9cb68f842629} from "./useId.mjs";
3
+ import {mergeRefs as $5dc95899b306f630$export$c9058316764c140e} from "./mergeRefs.mjs";
3
4
  import $7jXr9$clsx from "clsx";
4
5
 
5
6
  /*
@@ -15,6 +16,7 @@ import $7jXr9$clsx from "clsx";
15
16
  */
16
17
 
17
18
 
19
+
18
20
  function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
19
21
  // Start with a base clone of the first argument. This is a lot faster than starting
20
22
  // with an empty object and adding properties as we go.
@@ -31,6 +33,7 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
31
33
  key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
32
34
  else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, $7jXr9$clsx)(a, b);
33
35
  else if (key === 'id' && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
36
+ else if (key === 'ref' && a && b) result.ref = (0, $5dc95899b306f630$export$c9058316764c140e)(a, b);
34
37
  else result[key] = b !== undefined ? b : a;
35
38
  }
36
39
  }
@@ -1,5 +1,6 @@
1
1
  import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.module.js";
2
2
  import {mergeIds as $bdb11010cef70236$export$cd8c9cb68f842629} from "./useId.module.js";
3
+ import {mergeRefs as $5dc95899b306f630$export$c9058316764c140e} from "./mergeRefs.module.js";
3
4
  import $7jXr9$clsx from "clsx";
4
5
 
5
6
  /*
@@ -15,6 +16,7 @@ import $7jXr9$clsx from "clsx";
15
16
  */
16
17
 
17
18
 
19
+
18
20
  function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
19
21
  // Start with a base clone of the first argument. This is a lot faster than starting
20
22
  // with an empty object and adding properties as we go.
@@ -31,6 +33,7 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
31
33
  key[0] === 'o' && key[1] === 'n' && key.charCodeAt(2) >= /* 'A' */ 65 && key.charCodeAt(2) <= /* 'Z' */ 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);
32
34
  else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') result[key] = (0, $7jXr9$clsx)(a, b);
33
35
  else if (key === 'id' && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b);
36
+ else if (key === 'ref' && a && b) result.ref = (0, $5dc95899b306f630$export$c9058316764c140e)(a, b);
34
37
  else result[key] = b !== undefined ? b : a;
35
38
  }
36
39
  }
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAwBM,SAAS,0CAAiC,GAAG,IAAO;IACzD,oFAAoF;IACpF,uDAAuD;IACvD,IAAI,SAAgB;QAAC,GAAG,IAAI,CAAC,EAAE;IAAA;IAC/B,IAAK,IAAI,IAAI,GAAG,IAAI,KAAK,MAAM,EAAE,IAAK;QACpC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACnB,IAAK,IAAI,OAAO,MAAO;YACrB,IAAI,IAAI,MAAM,CAAC,IAAI;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI;YAElB,eAAe;YACf,IACE,OAAO,MAAM,cACb,OAAO,MAAM,cACb,qCAAqC;YACrC,GAAG,CAAC,EAAE,KAAK,OACX,GAAG,CAAC,EAAE,KAAK,OACX,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,MAC/B,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,IAE/B,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAI,EAAE,GAAG;iBAGlB,IACL,AAAC,CAAA,QAAQ,eAAe,QAAQ,kBAAiB,KACjD,OAAO,MAAM,YACb,OAAO,MAAM,UAEb,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,WAAG,EAAE,GAAG;iBACjB,IAAI,QAAQ,QAAQ,KAAK,GAC9B,OAAO,EAAE,GAAG,CAAA,GAAA,yCAAO,EAAE,GAAG;iBAGxB,MAAM,CAAC,IAAI,GAAG,MAAM,YAAY,IAAI;QAExC;IACF;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/mergeProps.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 {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n"],"names":[],"version":3,"file":"mergeProps.module.js.map"}
1
+ {"mappings":";;;;;AAAA;;;;;;;;;;CAUC;;;;AAyBM,SAAS,0CAAiC,GAAG,IAAO;IACzD,oFAAoF;IACpF,uDAAuD;IACvD,IAAI,SAAgB;QAAC,GAAG,IAAI,CAAC,EAAE;IAAA;IAC/B,IAAK,IAAI,IAAI,GAAG,IAAI,KAAK,MAAM,EAAE,IAAK;QACpC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACnB,IAAK,IAAI,OAAO,MAAO;YACrB,IAAI,IAAI,MAAM,CAAC,IAAI;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI;YAElB,eAAe;YACf,IACE,OAAO,MAAM,cACb,OAAO,MAAM,cACb,qCAAqC;YACrC,GAAG,CAAC,EAAE,KAAK,OACX,GAAG,CAAC,EAAE,KAAK,OACX,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,MAC/B,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,IAE/B,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAI,EAAE,GAAG;iBAGlB,IACL,AAAC,CAAA,QAAQ,eAAe,QAAQ,kBAAiB,KACjD,OAAO,MAAM,YACb,OAAO,MAAM,UAEb,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,WAAG,EAAE,GAAG;iBACjB,IAAI,QAAQ,QAAQ,KAAK,GAC9B,OAAO,EAAE,GAAG,CAAA,GAAA,yCAAO,EAAE,GAAG;iBACnB,IAAI,QAAQ,SAAS,KAAK,GAC/B,OAAO,GAAG,GAAG,CAAA,GAAA,yCAAQ,EAAE,GAAG;iBAG1B,MAAM,CAAC,IAAI,GAAG,MAAM,YAAY,IAAI;QAExC;IACF;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/mergeProps.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 {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\nimport {mergeRefs} from './mergeRefs';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, ids are deduplicated, and refs are merged.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n } else if (key === 'ref' && a && b) {\n result.ref = mergeRefs(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n"],"names":[],"version":3,"file":"mergeProps.module.js.map"}
package/dist/module.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {mergeIds as $bdb11010cef70236$export$cd8c9cb68f842629, useId as $bdb11010cef70236$export$f680877a34711e37, useSlotId as $bdb11010cef70236$export$b4cc09c592e8fdb8} from "./useId.module.js";
2
2
  import {chain as $ff5963eb1fccf552$export$e08e3b67e392101e} from "./chain.module.js";
3
3
  import {createShadowTreeWalker as $dfc540311bf7f109$export$4d0f8be8b12a7ef6, ShadowTreeWalker as $dfc540311bf7f109$export$63eb3ababa9c55c4} from "./ShadowTreeWalker.module.js";
4
- import {getActiveElement as $d4ee10de306f2510$export$cd4e5573fbe2b576, getEventTarget as $d4ee10de306f2510$export$e58f029f0fbfdb29, nodeContains as $d4ee10de306f2510$export$4282f70798064fe0} from "./DOMFunctions.module.js";
4
+ import {getActiveElement as $d4ee10de306f2510$export$cd4e5573fbe2b576, getEventTarget as $d4ee10de306f2510$export$e58f029f0fbfdb29, isFocusWithin as $d4ee10de306f2510$export$b4f377a2b6254582, nodeContains as $d4ee10de306f2510$export$4282f70798064fe0} from "./DOMFunctions.module.js";
5
5
  import {getOwnerDocument as $431fbd86ca7dc216$export$b204af158042fbac, getOwnerWindow as $431fbd86ca7dc216$export$f21a1ffae260145a, isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.module.js";
6
6
  import {mergeProps as $3ef42575df84b30b$export$9d1611c77c2fe928} from "./mergeProps.module.js";
7
7
  import {mergeRefs as $5dc95899b306f630$export$c9058316764c140e} from "./mergeRefs.module.js";
@@ -95,5 +95,5 @@ import {clamp as $4507461a1b870123$re_export$clamp, snapValueToStep as $4507461a
95
95
 
96
96
 
97
97
 
98
- export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $dfc540311bf7f109$export$4d0f8be8b12a7ef6 as createShadowTreeWalker, $dfc540311bf7f109$export$63eb3ababa9c55c4 as ShadowTreeWalker, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot, $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$bdc77b0c0a3a85d6 as useSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps, $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as handleLinkClick, $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, $ca9b37712f007381$export$72ef708ab07251f1 as useUpdateLayoutEffect, $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, $26f7f3da73fcd9d6$export$7717c92ee915373e as useLoadMore, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as useLoadMoreSentinel, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as UNSTABLE_useLoadMoreSentinel, $cdc5a6778b766db2$export$a9d04c5684123369 as inertValue, $5671b20cf9b562b2$export$447a38995de2c711 as CLEAR_FOCUS_EVENT, $5671b20cf9b562b2$export$831c820ad60f9d12 as FOCUS_EVENT, $21f1aa98acb08317$export$16792effe837dba3 as isCtrlKeyPressed, $21f1aa98acb08317$export$c57958e35f31ed73 as willOpenKeyboard, $d3f049242431219c$export$6d3443f2c48bfc20 as useEnterAnimation, $d3f049242431219c$export$45fda7c47f93fd48 as useExitAnimation, $b4b717babfbb907b$export$4c063cf1350e6fed as isFocusable, $b4b717babfbb907b$export$bebd5a1431fec25d as isTabbable};
98
+ export {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $dfc540311bf7f109$export$4d0f8be8b12a7ef6 as createShadowTreeWalker, $dfc540311bf7f109$export$63eb3ababa9c55c4 as ShadowTreeWalker, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget, $d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$b4f377a2b6254582 as isFocusWithin, $431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow, $431fbd86ca7dc216$export$af51f0f06c0f328a as isShadowRoot, $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$bdc77b0c0a3a85d6 as useSyntheticLinkProps, $ea8dcbcb9ea1b556$export$323e4fc2fa4753fb as RouterProvider, $ea8dcbcb9ea1b556$export$efa8c9099e530235 as shouldClientNavigate, $ea8dcbcb9ea1b556$export$9a302a45f65d0572 as useRouter, $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 as useLinkProps, $ea8dcbcb9ea1b556$export$13aea1a3cb5e3f1f as handleLinkClick, $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, $ca9b37712f007381$export$72ef708ab07251f1 as useUpdateLayoutEffect, $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, $26f7f3da73fcd9d6$export$7717c92ee915373e as useLoadMore, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as useLoadMoreSentinel, $a5fa973c1850dd36$export$ccaea96c28e8b9e7 as UNSTABLE_useLoadMoreSentinel, $cdc5a6778b766db2$export$a9d04c5684123369 as inertValue, $5671b20cf9b562b2$export$447a38995de2c711 as CLEAR_FOCUS_EVENT, $5671b20cf9b562b2$export$831c820ad60f9d12 as FOCUS_EVENT, $21f1aa98acb08317$export$16792effe837dba3 as isCtrlKeyPressed, $21f1aa98acb08317$export$c57958e35f31ed73 as willOpenKeyboard, $d3f049242431219c$export$6d3443f2c48bfc20 as useEnterAnimation, $d3f049242431219c$export$45fda7c47f93fd48 as useExitAnimation, $b4b717babfbb907b$export$4c063cf1350e6fed as isFocusable, $b4b717babfbb907b$export$bebd5a1431fec25d as isTabbable};
99
99
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/utils/src/index.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 */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {createShadowTreeWalker, ShadowTreeWalker} from './shadowdom/ShadowTreeWalker';\nexport {getActiveElement, getEventTarget, nodeContains} from './shadowdom/DOMFunctions';\nexport {getOwnerDocument, getOwnerWindow, isShadowRoot} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps, handleLinkClick} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useUpdateLayoutEffect} from './useUpdateLayoutEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\nexport {useLoadMoreSentinel, useLoadMoreSentinel as UNSTABLE_useLoadMoreSentinel} from './useLoadMoreSentinel';\nexport {inertValue} from './inertValue';\nexport {CLEAR_FOCUS_EVENT, FOCUS_EVENT} from './constants';\nexport {isCtrlKeyPressed, willOpenKeyboard} from './keyboard';\nexport {useEnterAnimation, useExitAnimation} from './animation';\nexport {isFocusable, isTabbable} from './isFocusable';\n\nexport type {LoadMoreSentinelProps} from './useLoadMoreSentinel';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/utils/src/index.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 */\nexport {useId, mergeIds, useSlotId} from './useId';\nexport {chain} from './chain';\nexport {createShadowTreeWalker, ShadowTreeWalker} from './shadowdom/ShadowTreeWalker';\nexport {getActiveElement, getEventTarget, nodeContains, isFocusWithin} from './shadowdom/DOMFunctions';\nexport {getOwnerDocument, getOwnerWindow, isShadowRoot} from './domHelpers';\nexport {mergeProps} from './mergeProps';\nexport {mergeRefs} from './mergeRefs';\nexport {filterDOMProps} from './filterDOMProps';\nexport {focusWithoutScrolling} from './focusWithoutScrolling';\nexport {getOffset} from './getOffset';\nexport {openLink, getSyntheticLinkProps, useSyntheticLinkProps, RouterProvider, shouldClientNavigate, useRouter, useLinkProps, handleLinkClick} from './openLink';\nexport {runAfterTransition} from './runAfterTransition';\nexport {useDrag1D} from './useDrag1D';\nexport {useGlobalListeners} from './useGlobalListeners';\nexport {useLabels} from './useLabels';\nexport {useObjectRef} from './useObjectRef';\nexport {useUpdateEffect} from './useUpdateEffect';\nexport {useUpdateLayoutEffect} from './useUpdateLayoutEffect';\nexport {useLayoutEffect} from './useLayoutEffect';\nexport {useResizeObserver} from './useResizeObserver';\nexport {useSyncRef} from './useSyncRef';\nexport {getScrollParent} from './getScrollParent';\nexport {getScrollParents} from './getScrollParents';\nexport {isScrollable} from './isScrollable';\nexport {useViewportSize} from './useViewportSize';\nexport {useDescription} from './useDescription';\nexport {isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox} from './platform';\nexport {useEvent} from './useEvent';\nexport {useValueEffect} from './useValueEffect';\nexport {scrollIntoView, scrollIntoViewport} from './scrollIntoView';\nexport {clamp, snapValueToStep} from '@react-stately/utils';\nexport {isVirtualClick, isVirtualPointerEvent} from './isVirtualEvent';\nexport {useEffectEvent} from './useEffectEvent';\nexport {useDeepMemo} from './useDeepMemo';\nexport {useFormReset} from './useFormReset';\nexport {useLoadMore} from './useLoadMore';\nexport {useLoadMoreSentinel, useLoadMoreSentinel as UNSTABLE_useLoadMoreSentinel} from './useLoadMoreSentinel';\nexport {inertValue} from './inertValue';\nexport {CLEAR_FOCUS_EVENT, FOCUS_EVENT} from './constants';\nexport {isCtrlKeyPressed, willOpenKeyboard} from './keyboard';\nexport {useEnterAnimation, useExitAnimation} from './animation';\nexport {isFocusable, isTabbable} from './isFocusable';\n\nexport type {LoadMoreSentinelProps} from './useLoadMoreSentinel';\n"],"names":[],"version":3,"file":"module.js.map"}