@fluentui/react-positioning 9.5.14 → 9.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/CHANGELOG.json +77 -1
  2. package/CHANGELOG.md +33 -2
  3. package/dist/index.d.ts +14 -2
  4. package/lib/constants.js +0 -1
  5. package/lib/constants.js.map +1 -1
  6. package/lib/createArrowStyles.js +47 -55
  7. package/lib/createArrowStyles.js.map +1 -1
  8. package/lib/createPositionManager.js +95 -108
  9. package/lib/createPositionManager.js.map +1 -1
  10. package/lib/createSlideStyles.js +59 -0
  11. package/lib/createSlideStyles.js.map +1 -0
  12. package/lib/createVirtualElementFromClick.js +18 -19
  13. package/lib/createVirtualElementFromClick.js.map +1 -1
  14. package/lib/index.js +1 -1
  15. package/lib/index.js.map +1 -1
  16. package/lib/middleware/coverTarget.js +26 -32
  17. package/lib/middleware/coverTarget.js.map +1 -1
  18. package/lib/middleware/flip.js +22 -32
  19. package/lib/middleware/flip.js.map +1 -1
  20. package/lib/middleware/index.js +0 -1
  21. package/lib/middleware/index.js.map +1 -1
  22. package/lib/middleware/intersecting.js +16 -17
  23. package/lib/middleware/intersecting.js.map +1 -1
  24. package/lib/middleware/maxSize.js +25 -34
  25. package/lib/middleware/maxSize.js.map +1 -1
  26. package/lib/middleware/offset.js +3 -5
  27. package/lib/middleware/offset.js.map +1 -1
  28. package/lib/middleware/shift.js +21 -30
  29. package/lib/middleware/shift.js.map +1 -1
  30. package/lib/types.js +0 -1
  31. package/lib/types.js.map +1 -1
  32. package/lib/usePositioning.js +188 -154
  33. package/lib/usePositioning.js.map +1 -1
  34. package/lib/usePositioningMouseTarget.js +24 -23
  35. package/lib/usePositioningMouseTarget.js.map +1 -1
  36. package/lib/utils/debounce.js +13 -14
  37. package/lib/utils/debounce.js.map +1 -1
  38. package/lib/utils/fromFloatingUIPlacement.js +23 -28
  39. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  40. package/lib/utils/getBoundary.js +14 -16
  41. package/lib/utils/getBoundary.js.map +1 -1
  42. package/lib/utils/getFloatingUIOffset.js +16 -27
  43. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  44. package/lib/utils/getReactFiberFromNode.js +36 -37
  45. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  46. package/lib/utils/getScrollParent.js +35 -42
  47. package/lib/utils/getScrollParent.js.map +1 -1
  48. package/lib/utils/hasAutoFocusFilter.js +9 -11
  49. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  50. package/lib/utils/index.js +0 -1
  51. package/lib/utils/index.js.map +1 -1
  52. package/lib/utils/mergeArrowOffset.js +24 -25
  53. package/lib/utils/mergeArrowOffset.js.map +1 -1
  54. package/lib/utils/parseFloatingUIPlacement.js +6 -7
  55. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  56. package/lib/utils/resolvePositioningShorthand.js +55 -56
  57. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  58. package/lib/utils/toFloatingUIPadding.js +16 -21
  59. package/lib/utils/toFloatingUIPadding.js.map +1 -1
  60. package/lib/utils/toFloatingUIPlacement.js +25 -27
  61. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  62. package/lib/utils/toggleScrollListener.js +12 -14
  63. package/lib/utils/toggleScrollListener.js.map +1 -1
  64. package/lib/utils/useCallbackRef.js +30 -32
  65. package/lib/utils/useCallbackRef.js.map +1 -1
  66. package/lib/utils/writeArrowUpdates.js +10 -17
  67. package/lib/utils/writeArrowUpdates.js.map +1 -1
  68. package/lib/utils/writeContainerupdates.js +39 -39
  69. package/lib/utils/writeContainerupdates.js.map +1 -1
  70. package/lib-commonjs/constants.js +1 -3
  71. package/lib-commonjs/constants.js.map +1 -1
  72. package/lib-commonjs/createArrowStyles.js +1 -3
  73. package/lib-commonjs/createArrowStyles.js.map +1 -1
  74. package/lib-commonjs/createPositionManager.js +4 -5
  75. package/lib-commonjs/createPositionManager.js.map +1 -1
  76. package/lib-commonjs/createSlideStyles.js +63 -0
  77. package/lib-commonjs/createSlideStyles.js.map +1 -0
  78. package/lib-commonjs/createVirtualElementFromClick.js +1 -3
  79. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  80. package/lib-commonjs/index.js +2 -3
  81. package/lib-commonjs/index.js.map +1 -1
  82. package/lib-commonjs/middleware/coverTarget.js +1 -3
  83. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  84. package/lib-commonjs/middleware/flip.js +1 -3
  85. package/lib-commonjs/middleware/flip.js.map +1 -1
  86. package/lib-commonjs/middleware/index.js +0 -3
  87. package/lib-commonjs/middleware/index.js.map +1 -1
  88. package/lib-commonjs/middleware/intersecting.js +1 -3
  89. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  90. package/lib-commonjs/middleware/maxSize.js +1 -3
  91. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  92. package/lib-commonjs/middleware/offset.js +1 -3
  93. package/lib-commonjs/middleware/offset.js.map +1 -1
  94. package/lib-commonjs/middleware/shift.js +1 -3
  95. package/lib-commonjs/middleware/shift.js.map +1 -1
  96. package/lib-commonjs/types.js +0 -3
  97. package/lib-commonjs/types.js.map +1 -1
  98. package/lib-commonjs/usePositioning.js +6 -6
  99. package/lib-commonjs/usePositioning.js.map +1 -1
  100. package/lib-commonjs/usePositioningMouseTarget.js +1 -3
  101. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  102. package/lib-commonjs/utils/debounce.js +1 -3
  103. package/lib-commonjs/utils/debounce.js.map +1 -1
  104. package/lib-commonjs/utils/fromFloatingUIPlacement.js +1 -3
  105. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  106. package/lib-commonjs/utils/getBoundary.js +1 -3
  107. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  108. package/lib-commonjs/utils/getFloatingUIOffset.js +1 -3
  109. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  110. package/lib-commonjs/utils/getReactFiberFromNode.js +1 -3
  111. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  112. package/lib-commonjs/utils/getScrollParent.js +1 -3
  113. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  114. package/lib-commonjs/utils/hasAutoFocusFilter.js +1 -3
  115. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  116. package/lib-commonjs/utils/index.js +0 -3
  117. package/lib-commonjs/utils/index.js.map +1 -1
  118. package/lib-commonjs/utils/mergeArrowOffset.js +1 -3
  119. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  120. package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -3
  121. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  122. package/lib-commonjs/utils/resolvePositioningShorthand.js +1 -3
  123. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  124. package/lib-commonjs/utils/toFloatingUIPadding.js +1 -3
  125. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  126. package/lib-commonjs/utils/toFloatingUIPlacement.js +1 -3
  127. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  128. package/lib-commonjs/utils/toggleScrollListener.js +1 -3
  129. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  130. package/lib-commonjs/utils/useCallbackRef.js +1 -3
  131. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  132. package/lib-commonjs/utils/writeArrowUpdates.js +1 -3
  133. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  134. package/lib-commonjs/utils/writeContainerupdates.js +12 -5
  135. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  136. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getBoundary.js"],"sourcesContent":["import { getScrollParent } from './getScrollParent';\n/**\n * Allows to mimic a behavior from V1 of Popper and accept `window` and `scrollParent` as strings.\n */\nexport function getBoundary(element, boundary) {\n if (boundary === 'window') {\n return element === null || element === void 0 ? void 0 : element.ownerDocument.documentElement;\n }\n if (boundary === 'clippingParents') {\n return 'clippingAncestors';\n }\n if (boundary === 'scrollParent') {\n let boundariesNode = getScrollParent(element);\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = element === null || element === void 0 ? void 0 : element.ownerDocument.documentElement;\n }\n return boundariesNode;\n }\n return boundary;\n}\n//# sourceMappingURL=getBoundary.js.map"],"names":["getBoundary","element","boundary","ownerDocument","documentElement","boundariesNode","getScrollParent","nodeName"],"mappings":";;;;+BAIgBA;;aAAAA;;iCAJgB;AAIzB,SAASA,YAAYC,OAAO,EAAEC,QAAQ,EAAE;IAC7C,IAAIA,aAAa,UAAU;QACzB,OAAOD,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQE,aAAa,CAACC,eAAe;IAChG,CAAC;IACD,IAAIF,aAAa,mBAAmB;QAClC,OAAO;IACT,CAAC;IACD,IAAIA,aAAa,gBAAgB;QAC/B,IAAIG,iBAAiBC,IAAAA,gCAAe,EAACL;QACrC,IAAII,eAAeE,QAAQ,KAAK,QAAQ;YACtCF,iBAAiBJ,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQE,aAAa,CAACC,eAAe;QAC1G,CAAC;QACD,OAAOC;IACT,CAAC;IACD,OAAOH;AACT,EACA,uCAAuC"}
1
+ {"version":3,"sources":["getBoundary.js"],"sourcesContent":["import { getScrollParent } from './getScrollParent';\n/**\n * Allows to mimic a behavior from V1 of Popper and accept `window` and `scrollParent` as strings.\n */ export function getBoundary(element, boundary) {\n if (boundary === 'window') {\n return element === null || element === void 0 ? void 0 : element.ownerDocument.documentElement;\n }\n if (boundary === 'clippingParents') {\n return 'clippingAncestors';\n }\n if (boundary === 'scrollParent') {\n let boundariesNode = getScrollParent(element);\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = element === null || element === void 0 ? void 0 : element.ownerDocument.documentElement;\n }\n return boundariesNode;\n }\n return boundary;\n}\n"],"names":["getBoundary","element","boundary","ownerDocument","documentElement","boundariesNode","getScrollParent","nodeName"],"mappings":";;;;+BAGoBA;;aAAAA;;iCAHY;AAGrB,SAASA,YAAYC,OAAO,EAAEC,QAAQ,EAAE;IAC/C,IAAIA,aAAa,UAAU;QACvB,OAAOD,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQE,aAAa,CAACC,eAAe;IAClG,CAAC;IACD,IAAIF,aAAa,mBAAmB;QAChC,OAAO;IACX,CAAC;IACD,IAAIA,aAAa,gBAAgB;QAC7B,IAAIG,iBAAiBC,IAAAA,gCAAe,EAACL;QACrC,IAAII,eAAeE,QAAQ,KAAK,QAAQ;YACpCF,iBAAiBJ,YAAY,IAAI,IAAIA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQE,aAAa,CAACC,eAAe;QAC5G,CAAC;QACD,OAAOC;IACX,CAAC;IACD,OAAOH;AACX"}
@@ -23,6 +23,4 @@ function getFloatingUIOffset(rawOffset) {
23
23
  alignment
24
24
  });
25
25
  };
26
- } //# sourceMappingURL=getFloatingUIOffset.js.map
27
-
28
- //# sourceMappingURL=getFloatingUIOffset.js.map
26
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getFloatingUIOffset.js"],"sourcesContent":["import { fromFloatingUIPlacement } from './fromFloatingUIPlacement';\n/**\n * Shim to transform offset values from this library to Floating UI\n * @param rawOffset Offset from this library\n * @returns An offset value compatible with Floating UI\n */\nexport function getFloatingUIOffset(rawOffset) {\n if (!rawOffset) {\n return rawOffset;\n }\n if (typeof rawOffset === 'number' || typeof rawOffset === 'object') {\n return rawOffset;\n }\n return ({\n rects: {\n floating,\n reference\n },\n placement\n }) => {\n const {\n position,\n alignment\n } = fromFloatingUIPlacement(placement);\n return rawOffset({\n positionedRect: floating,\n targetRect: reference,\n position,\n alignment\n });\n };\n}\n//# sourceMappingURL=getFloatingUIOffset.js.map"],"names":["getFloatingUIOffset","rawOffset","rects","floating","reference","placement","position","alignment","fromFloatingUIPlacement","positionedRect","targetRect"],"mappings":";;;;+BAMgBA;;aAAAA;;yCANwB;AAMjC,SAASA,oBAAoBC,SAAS,EAAE;IAC7C,IAAI,CAACA,WAAW;QACd,OAAOA;IACT,CAAC;IACD,IAAI,OAAOA,cAAc,YAAY,OAAOA,cAAc,UAAU;QAClE,OAAOA;IACT,CAAC;IACD,OAAO,CAAC,EACNC,OAAO,EACLC,SAAQ,EACRC,UAAS,EACV,CAAA,EACDC,UAAS,EACV,GAAK;QACJ,MAAM,EACJC,SAAQ,EACRC,UAAS,EACV,GAAGC,IAAAA,gDAAuB,EAACH;QAC5B,OAAOJ,UAAU;YACfQ,gBAAgBN;YAChBO,YAAYN;YACZE;YACAC;QACF;IACF;AACF,EACA,+CAA+C"}
1
+ {"version":3,"sources":["getFloatingUIOffset.js"],"sourcesContent":["import { fromFloatingUIPlacement } from './fromFloatingUIPlacement';\n/**\n * Shim to transform offset values from this library to Floating UI\n * @param rawOffset Offset from this library\n * @returns An offset value compatible with Floating UI\n */ export function getFloatingUIOffset(rawOffset) {\n if (!rawOffset) {\n return rawOffset;\n }\n if (typeof rawOffset === 'number' || typeof rawOffset === 'object') {\n return rawOffset;\n }\n return ({ rects: { floating , reference } , placement })=>{\n const { position , alignment } = fromFloatingUIPlacement(placement);\n return rawOffset({\n positionedRect: floating,\n targetRect: reference,\n position,\n alignment\n });\n };\n}\n"],"names":["getFloatingUIOffset","rawOffset","rects","floating","reference","placement","position","alignment","fromFloatingUIPlacement","positionedRect","targetRect"],"mappings":";;;;+BAKoBA;;aAAAA;;yCALoB;AAK7B,SAASA,oBAAoBC,SAAS,EAAE;IAC/C,IAAI,CAACA,WAAW;QACZ,OAAOA;IACX,CAAC;IACD,IAAI,OAAOA,cAAc,YAAY,OAAOA,cAAc,UAAU;QAChE,OAAOA;IACX,CAAC;IACD,OAAO,CAAC,EAAEC,OAAO,EAAEC,SAAQ,EAAGC,UAAS,EAAG,CAAA,EAAGC,UAAS,EAAG,GAAG;QACxD,MAAM,EAAEC,SAAQ,EAAGC,UAAS,EAAG,GAAGC,IAAAA,gDAAuB,EAACH;QAC1D,OAAOJ,UAAU;YACbQ,gBAAgBN;YAChBO,YAAYN;YACZE;YACAC;QACJ;IACJ;AACJ"}
@@ -48,6 +48,4 @@ function getReactFiberFromNode(elm) {
48
48
  }
49
49
  }
50
50
  throw new Error('getReactFiber(): Failed to find a React Fiber on a node');
51
- } //# sourceMappingURL=getReactFiberFromNode.js.map
52
-
53
- //# sourceMappingURL=getReactFiberFromNode.js.map
51
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getReactFiberFromNode.js"],"sourcesContent":["import * as React from 'react';\nvar WorkTag;\n(function (WorkTag) {\n WorkTag[WorkTag[\"FunctionComponent\"] = 0] = \"FunctionComponent\";\n WorkTag[WorkTag[\"ClassComponent\"] = 1] = \"ClassComponent\";\n WorkTag[WorkTag[\"IndeterminateComponent\"] = 2] = \"IndeterminateComponent\";\n WorkTag[WorkTag[\"HostRoot\"] = 3] = \"HostRoot\";\n WorkTag[WorkTag[\"HostPortal\"] = 4] = \"HostPortal\";\n WorkTag[WorkTag[\"HostComponent\"] = 5] = \"HostComponent\";\n WorkTag[WorkTag[\"HostText\"] = 6] = \"HostText\";\n WorkTag[WorkTag[\"Fragment\"] = 7] = \"Fragment\";\n WorkTag[WorkTag[\"Mode\"] = 8] = \"Mode\";\n WorkTag[WorkTag[\"ContextConsumer\"] = 9] = \"ContextConsumer\";\n WorkTag[WorkTag[\"ContextProvider\"] = 10] = \"ContextProvider\";\n WorkTag[WorkTag[\"ForwardRef\"] = 11] = \"ForwardRef\";\n WorkTag[WorkTag[\"Profiler\"] = 12] = \"Profiler\";\n WorkTag[WorkTag[\"SuspenseComponent\"] = 13] = \"SuspenseComponent\";\n WorkTag[WorkTag[\"MemoComponent\"] = 14] = \"MemoComponent\";\n WorkTag[WorkTag[\"SimpleMemoComponent\"] = 15] = \"SimpleMemoComponent\";\n WorkTag[WorkTag[\"LazyComponent\"] = 16] = \"LazyComponent\";\n WorkTag[WorkTag[\"IncompleteClassComponent\"] = 17] = \"IncompleteClassComponent\";\n WorkTag[WorkTag[\"DehydratedFragment\"] = 18] = \"DehydratedFragment\";\n WorkTag[WorkTag[\"SuspenseListComponent\"] = 19] = \"SuspenseListComponent\";\n WorkTag[WorkTag[\"FundamentalComponent\"] = 20] = \"FundamentalComponent\";\n WorkTag[WorkTag[\"ScopeComponent\"] = 21] = \"ScopeComponent\";\n})(WorkTag || (WorkTag = {}));\nexport function getReactFiberFromNode(elm) {\n if (!elm) {\n return null;\n }\n for (const k in elm) {\n // React 16 uses \"__reactInternalInstance$\" prefix\n // React 17 uses \"__reactFiber$\" prefix\n // https://github.com/facebook/react/pull/18377\n if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return elm[k];\n }\n }\n throw new Error('getReactFiber(): Failed to find a React Fiber on a node');\n}\n//# sourceMappingURL=getReactFiberFromNode.js.map"],"names":["getReactFiberFromNode","WorkTag","elm","k","indexOf","Error"],"mappings":";;;;+BA0BgBA;;aAAAA;;;6DA1BO;AACvB,IAAIC;AACH,CAAA,SAAUA,OAAO,EAAE;IAClBA,OAAO,CAACA,OAAO,CAAC,oBAAoB,GAAG,EAAE,GAAG;IAC5CA,OAAO,CAACA,OAAO,CAAC,iBAAiB,GAAG,EAAE,GAAG;IACzCA,OAAO,CAACA,OAAO,CAAC,yBAAyB,GAAG,EAAE,GAAG;IACjDA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,EAAE,GAAG;IACnCA,OAAO,CAACA,OAAO,CAAC,aAAa,GAAG,EAAE,GAAG;IACrCA,OAAO,CAACA,OAAO,CAAC,gBAAgB,GAAG,EAAE,GAAG;IACxCA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,EAAE,GAAG;IACnCA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,EAAE,GAAG;IACnCA,OAAO,CAACA,OAAO,CAAC,OAAO,GAAG,EAAE,GAAG;IAC/BA,OAAO,CAACA,OAAO,CAAC,kBAAkB,GAAG,EAAE,GAAG;IAC1CA,OAAO,CAACA,OAAO,CAAC,kBAAkB,GAAG,GAAG,GAAG;IAC3CA,OAAO,CAACA,OAAO,CAAC,aAAa,GAAG,GAAG,GAAG;IACtCA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,GAAG,GAAG;IACpCA,OAAO,CAACA,OAAO,CAAC,oBAAoB,GAAG,GAAG,GAAG;IAC7CA,OAAO,CAACA,OAAO,CAAC,gBAAgB,GAAG,GAAG,GAAG;IACzCA,OAAO,CAACA,OAAO,CAAC,sBAAsB,GAAG,GAAG,GAAG;IAC/CA,OAAO,CAACA,OAAO,CAAC,gBAAgB,GAAG,GAAG,GAAG;IACzCA,OAAO,CAACA,OAAO,CAAC,2BAA2B,GAAG,GAAG,GAAG;IACpDA,OAAO,CAACA,OAAO,CAAC,qBAAqB,GAAG,GAAG,GAAG;IAC9CA,OAAO,CAACA,OAAO,CAAC,wBAAwB,GAAG,GAAG,GAAG;IACjDA,OAAO,CAACA,OAAO,CAAC,uBAAuB,GAAG,GAAG,GAAG;IAChDA,OAAO,CAACA,OAAO,CAAC,iBAAiB,GAAG,GAAG,GAAG;AAC5C,CAAA,EAAGA,WAAYA,CAAAA,UAAU,CAAC,CAAA;AACnB,SAASD,sBAAsBE,GAAG,EAAE;IACzC,IAAI,CAACA,KAAK;QACR,OAAO,IAAI;IACb,CAAC;IACD,IAAK,MAAMC,KAAKD,IAAK;QACnB,kDAAkD;QAClD,uCAAuC;QACvC,+CAA+C;QAC/C,IAAIC,EAAEC,OAAO,CAAC,gCAAgC,KAAKD,EAAEC,OAAO,CAAC,qBAAqB,GAAG;YACnF,6DAA6D;YAC7D,aAAa;YACb,OAAOF,GAAG,CAACC,EAAE;QACf,CAAC;IACH;IACA,MAAM,IAAIE,MAAM,2DAA2D;AAC7E,EACA,iDAAiD"}
1
+ {"version":3,"sources":["getReactFiberFromNode.js"],"sourcesContent":["import * as React from 'react';\nvar WorkTag;\n(function(WorkTag) {\n WorkTag[WorkTag[\"FunctionComponent\"] = 0] = \"FunctionComponent\";\n WorkTag[WorkTag[\"ClassComponent\"] = 1] = \"ClassComponent\";\n WorkTag[WorkTag[\"IndeterminateComponent\"] = 2] = \"IndeterminateComponent\";\n WorkTag[WorkTag[\"HostRoot\"] = 3] = \"HostRoot\";\n WorkTag[WorkTag[\"HostPortal\"] = 4] = \"HostPortal\";\n WorkTag[WorkTag[\"HostComponent\"] = 5] = \"HostComponent\";\n WorkTag[WorkTag[\"HostText\"] = 6] = \"HostText\";\n WorkTag[WorkTag[\"Fragment\"] = 7] = \"Fragment\";\n WorkTag[WorkTag[\"Mode\"] = 8] = \"Mode\";\n WorkTag[WorkTag[\"ContextConsumer\"] = 9] = \"ContextConsumer\";\n WorkTag[WorkTag[\"ContextProvider\"] = 10] = \"ContextProvider\";\n WorkTag[WorkTag[\"ForwardRef\"] = 11] = \"ForwardRef\";\n WorkTag[WorkTag[\"Profiler\"] = 12] = \"Profiler\";\n WorkTag[WorkTag[\"SuspenseComponent\"] = 13] = \"SuspenseComponent\";\n WorkTag[WorkTag[\"MemoComponent\"] = 14] = \"MemoComponent\";\n WorkTag[WorkTag[\"SimpleMemoComponent\"] = 15] = \"SimpleMemoComponent\";\n WorkTag[WorkTag[\"LazyComponent\"] = 16] = \"LazyComponent\";\n WorkTag[WorkTag[\"IncompleteClassComponent\"] = 17] = \"IncompleteClassComponent\";\n WorkTag[WorkTag[\"DehydratedFragment\"] = 18] = \"DehydratedFragment\";\n WorkTag[WorkTag[\"SuspenseListComponent\"] = 19] = \"SuspenseListComponent\";\n WorkTag[WorkTag[\"FundamentalComponent\"] = 20] = \"FundamentalComponent\";\n WorkTag[WorkTag[\"ScopeComponent\"] = 21] = \"ScopeComponent\";\n})(WorkTag || (WorkTag = {}));\nexport function getReactFiberFromNode(elm) {\n if (!elm) {\n return null;\n }\n for(const k in elm){\n // React 16 uses \"__reactInternalInstance$\" prefix\n // React 17 uses \"__reactFiber$\" prefix\n // https://github.com/facebook/react/pull/18377\n if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return elm[k];\n }\n }\n throw new Error('getReactFiber(): Failed to find a React Fiber on a node');\n}\n"],"names":["getReactFiberFromNode","WorkTag","elm","k","indexOf","Error"],"mappings":";;;;+BA0BgBA;;aAAAA;;;6DA1BO;AACvB,IAAIC;AACH,CAAA,SAASA,OAAO,EAAE;IACfA,OAAO,CAACA,OAAO,CAAC,oBAAoB,GAAG,EAAE,GAAG;IAC5CA,OAAO,CAACA,OAAO,CAAC,iBAAiB,GAAG,EAAE,GAAG;IACzCA,OAAO,CAACA,OAAO,CAAC,yBAAyB,GAAG,EAAE,GAAG;IACjDA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,EAAE,GAAG;IACnCA,OAAO,CAACA,OAAO,CAAC,aAAa,GAAG,EAAE,GAAG;IACrCA,OAAO,CAACA,OAAO,CAAC,gBAAgB,GAAG,EAAE,GAAG;IACxCA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,EAAE,GAAG;IACnCA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,EAAE,GAAG;IACnCA,OAAO,CAACA,OAAO,CAAC,OAAO,GAAG,EAAE,GAAG;IAC/BA,OAAO,CAACA,OAAO,CAAC,kBAAkB,GAAG,EAAE,GAAG;IAC1CA,OAAO,CAACA,OAAO,CAAC,kBAAkB,GAAG,GAAG,GAAG;IAC3CA,OAAO,CAACA,OAAO,CAAC,aAAa,GAAG,GAAG,GAAG;IACtCA,OAAO,CAACA,OAAO,CAAC,WAAW,GAAG,GAAG,GAAG;IACpCA,OAAO,CAACA,OAAO,CAAC,oBAAoB,GAAG,GAAG,GAAG;IAC7CA,OAAO,CAACA,OAAO,CAAC,gBAAgB,GAAG,GAAG,GAAG;IACzCA,OAAO,CAACA,OAAO,CAAC,sBAAsB,GAAG,GAAG,GAAG;IAC/CA,OAAO,CAACA,OAAO,CAAC,gBAAgB,GAAG,GAAG,GAAG;IACzCA,OAAO,CAACA,OAAO,CAAC,2BAA2B,GAAG,GAAG,GAAG;IACpDA,OAAO,CAACA,OAAO,CAAC,qBAAqB,GAAG,GAAG,GAAG;IAC9CA,OAAO,CAACA,OAAO,CAAC,wBAAwB,GAAG,GAAG,GAAG;IACjDA,OAAO,CAACA,OAAO,CAAC,uBAAuB,GAAG,GAAG,GAAG;IAChDA,OAAO,CAACA,OAAO,CAAC,iBAAiB,GAAG,GAAG,GAAG;AAC9C,CAAA,EAAGA,WAAYA,CAAAA,UAAU,CAAC,CAAA;AACnB,SAASD,sBAAsBE,GAAG,EAAE;IACvC,IAAI,CAACA,KAAK;QACN,OAAO,IAAI;IACf,CAAC;IACD,IAAI,MAAMC,KAAKD,IAAI;QACf,kDAAkD;QAClD,uCAAuC;QACvC,+CAA+C;QAC/C,IAAIC,EAAEC,OAAO,CAAC,gCAAgC,KAAKD,EAAEC,OAAO,CAAC,qBAAqB,GAAG;YACjF,6DAA6D;YAC7D,aAAa;YACb,OAAOF,GAAG,CAACC,EAAE;QACjB,CAAC;IACL;IACA,MAAM,IAAIE,MAAM,2DAA2D;AAC/E"}
@@ -59,6 +59,4 @@ const hasScrollParent = (node)=>{
59
59
  var _scrollParentElement_ownerDocument;
60
60
  const scrollParentElement = getScrollParent(node);
61
61
  return scrollParentElement ? scrollParentElement !== ((_scrollParentElement_ownerDocument = scrollParentElement.ownerDocument) === null || _scrollParentElement_ownerDocument === void 0 ? void 0 : _scrollParentElement_ownerDocument.body) : false;
62
- }; //# sourceMappingURL=getScrollParent.js.map
63
-
64
- //# sourceMappingURL=getScrollParent.js.map
62
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/getScrollParent.js"],"sourcesContent":["/**\n * Returns the parent node or the host of the node argument.\n * @param node - DOM node.\n * @returns - parent DOM node.\n */export const getParentNode = node => {\n if (node.nodeName === 'HTML') {\n return node;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node.parentNode || node.host;\n};\n/**\n * Returns CSS styles of the given node.\n * @param node - DOM node.\n * @returns - CSS styles.\n */\nconst getStyleComputedProperty = node => {\n var _node_ownerDocument;\n if (node.nodeType !== 1) {\n return {};\n }\n const window = (_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.defaultView;\n return window.getComputedStyle(node, null);\n};\n/**\n * Returns the first scrollable parent of the given element.\n * @param node - DOM node.\n * @returns - the first scrollable parent.\n */\nexport const getScrollParent = node => {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n const parentNode = node && getParentNode(node);\n // eslint-disable-next-line\n if (!parentNode) return document.body;\n switch (parentNode.nodeName) {\n case 'HTML':\n case 'BODY':\n return parentNode.ownerDocument.body;\n case '#document':\n return parentNode.body;\n }\n // If any of the overflow props is defined for the node then we return it as the parent\n const {\n overflow,\n overflowX,\n overflowY\n } = getStyleComputedProperty(parentNode);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return parentNode;\n }\n return getScrollParent(parentNode);\n};\nexport const hasScrollParent = node => {\n var _scrollParentElement_ownerDocument;\n const scrollParentElement = getScrollParent(node);\n return scrollParentElement ? scrollParentElement !== ((_scrollParentElement_ownerDocument = scrollParentElement.ownerDocument) === null || _scrollParentElement_ownerDocument === void 0 ? void 0 : _scrollParentElement_ownerDocument.body) : false;\n};\n//# sourceMappingURL=getScrollParent.js.map"],"names":["getParentNode","getScrollParent","hasScrollParent","node","nodeName","parentNode","host","getStyleComputedProperty","_node_ownerDocument","nodeType","window","ownerDocument","defaultView","getComputedStyle","document","body","overflow","overflowX","overflowY","test","_scrollParentElement_ownerDocument","scrollParentElement"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;IAAeA,aAAa,MAAbA;IAyBHC,eAAe,MAAfA;IAuBAC,eAAe,MAAfA;;AAhDH,MAAMF,gBAAgBG,CAAAA,OAAQ;IACtC,IAAIA,KAAKC,QAAQ,KAAK,QAAQ;QAC5B,OAAOD;IACT,CAAC;IACD,8DAA8D;IAC9D,OAAOA,KAAKE,UAAU,IAAIF,KAAKG,IAAI;AACrC;AACA;;;;CAIC,GACD,MAAMC,2BAA2BJ,CAAAA,OAAQ;IACvC,IAAIK;IACJ,IAAIL,KAAKM,QAAQ,KAAK,GAAG;QACvB,OAAO,CAAC;IACV,CAAC;IACD,MAAMC,SAAS,AAACF,CAAAA,sBAAsBL,KAAKQ,aAAa,AAAD,MAAO,IAAI,IAAIH,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBI,WAAW;IAC/I,OAAOF,OAAOG,gBAAgB,CAACV,MAAM,IAAI;AAC3C;AAMO,MAAMF,kBAAkBE,CAAAA,OAAQ;IACrC,iFAAiF;IACjF,MAAME,aAAaF,QAAQH,cAAcG;IACzC,2BAA2B;IAC3B,IAAI,CAACE,YAAY,OAAOS,SAASC,IAAI;IACrC,OAAQV,WAAWD,QAAQ;QACzB,KAAK;QACL,KAAK;YACH,OAAOC,WAAWM,aAAa,CAACI,IAAI;QACtC,KAAK;YACH,OAAOV,WAAWU,IAAI;IAC1B;IACA,uFAAuF;IACvF,MAAM,EACJC,SAAQ,EACRC,UAAS,EACTC,UAAS,EACV,GAAGX,yBAAyBF;IAC7B,IAAI,wBAAwBc,IAAI,CAACH,WAAWE,YAAYD,YAAY;QAClE,OAAOZ;IACT,CAAC;IACD,OAAOJ,gBAAgBI;AACzB;AACO,MAAMH,kBAAkBC,CAAAA,OAAQ;IACrC,IAAIiB;IACJ,MAAMC,sBAAsBpB,gBAAgBE;IAC5C,OAAOkB,sBAAsBA,wBAAyB,CAAA,AAACD,CAAAA,qCAAqCC,oBAAoBV,aAAa,AAAD,MAAO,IAAI,IAAIS,uCAAuC,KAAK,IAAI,KAAK,IAAIA,mCAAmCL,IAAI,AAAD,IAAK,KAAK;AACtP,GACA,2CAA2C"}
1
+ {"version":3,"sources":["getScrollParent.js"],"sourcesContent":["/**\n * Returns the parent node or the host of the node argument.\n * @param node - DOM node.\n * @returns - parent DOM node.\n */ export const getParentNode = (node)=>{\n if (node.nodeName === 'HTML') {\n return node;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node.parentNode || node.host;\n};\n/**\n * Returns CSS styles of the given node.\n * @param node - DOM node.\n * @returns - CSS styles.\n */ const getStyleComputedProperty = (node)=>{\n var _node_ownerDocument;\n if (node.nodeType !== 1) {\n return {};\n }\n const window = (_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.defaultView;\n return window.getComputedStyle(node, null);\n};\n/**\n * Returns the first scrollable parent of the given element.\n * @param node - DOM node.\n * @returns - the first scrollable parent.\n */ export const getScrollParent = (node)=>{\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n const parentNode = node && getParentNode(node);\n // eslint-disable-next-line\n if (!parentNode) return document.body;\n switch(parentNode.nodeName){\n case 'HTML':\n case 'BODY':\n return parentNode.ownerDocument.body;\n case '#document':\n return parentNode.body;\n }\n // If any of the overflow props is defined for the node then we return it as the parent\n const { overflow , overflowX , overflowY } = getStyleComputedProperty(parentNode);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return parentNode;\n }\n return getScrollParent(parentNode);\n};\nexport const hasScrollParent = (node)=>{\n var _scrollParentElement_ownerDocument;\n const scrollParentElement = getScrollParent(node);\n return scrollParentElement ? scrollParentElement !== ((_scrollParentElement_ownerDocument = scrollParentElement.ownerDocument) === null || _scrollParentElement_ownerDocument === void 0 ? void 0 : _scrollParentElement_ownerDocument.body) : false;\n};\n"],"names":["getParentNode","getScrollParent","hasScrollParent","node","nodeName","parentNode","host","getStyleComputedProperty","_node_ownerDocument","nodeType","window","ownerDocument","defaultView","getComputedStyle","document","body","overflow","overflowX","overflowY","test","_scrollParentElement_ownerDocument","scrollParentElement"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;IAAgBA,aAAa,MAAbA;IAuBAC,eAAe,MAAfA;IAmBJC,eAAe,MAAfA;;AA1CF,MAAMF,gBAAgB,CAACG,OAAO;IACrC,IAAIA,KAAKC,QAAQ,KAAK,QAAQ;QAC1B,OAAOD;IACX,CAAC;IACD,8DAA8D;IAC9D,OAAOA,KAAKE,UAAU,IAAIF,KAAKG,IAAI;AACvC;AACA;;;;CAIC,GAAG,MAAMC,2BAA2B,CAACJ,OAAO;IACzC,IAAIK;IACJ,IAAIL,KAAKM,QAAQ,KAAK,GAAG;QACrB,OAAO,CAAC;IACZ,CAAC;IACD,MAAMC,SAAS,AAACF,CAAAA,sBAAsBL,KAAKQ,aAAa,AAAD,MAAO,IAAI,IAAIH,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBI,WAAW;IAC/I,OAAOF,OAAOG,gBAAgB,CAACV,MAAM,IAAI;AAC7C;AAKW,MAAMF,kBAAkB,CAACE,OAAO;IACvC,iFAAiF;IACjF,MAAME,aAAaF,QAAQH,cAAcG;IACzC,2BAA2B;IAC3B,IAAI,CAACE,YAAY,OAAOS,SAASC,IAAI;IACrC,OAAOV,WAAWD,QAAQ;QACtB,KAAK;QACL,KAAK;YACD,OAAOC,WAAWM,aAAa,CAACI,IAAI;QACxC,KAAK;YACD,OAAOV,WAAWU,IAAI;IAC9B;IACA,uFAAuF;IACvF,MAAM,EAAEC,SAAQ,EAAGC,UAAS,EAAGC,UAAS,EAAG,GAAGX,yBAAyBF;IACvE,IAAI,wBAAwBc,IAAI,CAACH,WAAWE,YAAYD,YAAY;QAChE,OAAOZ;IACX,CAAC;IACD,OAAOJ,gBAAgBI;AAC3B;AACO,MAAMH,kBAAkB,CAACC,OAAO;IACnC,IAAIiB;IACJ,MAAMC,sBAAsBpB,gBAAgBE;IAC5C,OAAOkB,sBAAsBA,wBAAyB,CAAA,AAACD,CAAAA,qCAAqCC,oBAAoBV,aAAa,AAAD,MAAO,IAAI,IAAIS,uCAAuC,KAAK,IAAI,KAAK,IAAIA,mCAAmCL,IAAI,AAAD,IAAK,KAAK;AACxP"}
@@ -26,6 +26,4 @@ const _getReactFiberFromNode = require("./getReactFiberFromNode");
26
26
  }
27
27
  function hasAutofocusFilter(node) {
28
28
  return hasAutofocusProp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
29
- } //# sourceMappingURL=hasAutoFocusFilter.js.map
30
-
31
- //# sourceMappingURL=hasAutoFocusFilter.js.map
29
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/hasAutoFocusFilter.js"],"sourcesContent":["//\n// Dev utils to detect if nodes have \"autoFocus\" props.\n//\nimport { getReactFiberFromNode } from './getReactFiberFromNode';\n/**\n * Detects if a passed HTML node has \"autoFocus\" prop on a React's fiber. Is needed as React handles autofocus behavior\n * in React DOM and will not pass \"autoFocus\" to an actual HTML.\n *\n * @param node\n */\nfunction hasAutofocusProp(node) {\n // https://github.com/facebook/react/blob/848bb2426e44606e0a55dfe44c7b3ece33772485/packages/react-dom/src/client/ReactDOMHostConfig.js#L157-L166\n const isAutoFocusableElement = node.nodeName === 'BUTTON' || node.nodeName === 'INPUT' || node.nodeName === 'SELECT' || node.nodeName === 'TEXTAREA';\n if (isAutoFocusableElement) {\n var _getReactFiberFromNode;\n return !!((_getReactFiberFromNode = getReactFiberFromNode(node)) === null || _getReactFiberFromNode === void 0 ? void 0 : _getReactFiberFromNode.pendingProps.autoFocus);\n }\n return false;\n}\nexport function hasAutofocusFilter(node) {\n return hasAutofocusProp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n}\n//# sourceMappingURL=hasAutoFocusFilter.js.map"],"names":["hasAutofocusFilter","hasAutofocusProp","node","isAutoFocusableElement","nodeName","_getReactFiberFromNode","getReactFiberFromNode","pendingProps","autoFocus","NodeFilter","FILTER_ACCEPT","FILTER_SKIP"],"mappings":"AAAA,EAAE;AACF,uDAAuD;AACvD,EAAE;;;;;+BAiBcA;;aAAAA;;uCAhBsB;AACtC;;;;;CAKC,GACD,SAASC,iBAAiBC,IAAI,EAAE;IAC9B,gJAAgJ;IAChJ,MAAMC,yBAAyBD,KAAKE,QAAQ,KAAK,YAAYF,KAAKE,QAAQ,KAAK,WAAWF,KAAKE,QAAQ,KAAK,YAAYF,KAAKE,QAAQ,KAAK;IAC1I,IAAID,wBAAwB;QAC1B,IAAIE;QACJ,OAAO,CAAC,CAAE,CAAA,AAACA,CAAAA,0BAAyBC,IAAAA,4CAAqB,EAACJ,KAAI,MAAO,IAAI,IAAIG,4BAA2B,KAAK,IAAI,KAAK,IAAIA,wBAAuBE,YAAY,CAACC,SAAS,AAAD;IACxK,CAAC;IACD,OAAO,KAAK;AACd;AACO,SAASR,mBAAmBE,IAAI,EAAE;IACvC,OAAOD,iBAAiBC,QAAQO,WAAWC,aAAa,GAAGD,WAAWE,WAAW;AACnF,EACA,8CAA8C"}
1
+ {"version":3,"sources":["hasAutoFocusFilter.js"],"sourcesContent":["//\n// Dev utils to detect if nodes have \"autoFocus\" props.\n//\nimport { getReactFiberFromNode } from './getReactFiberFromNode';\n/**\n * Detects if a passed HTML node has \"autoFocus\" prop on a React's fiber. Is needed as React handles autofocus behavior\n * in React DOM and will not pass \"autoFocus\" to an actual HTML.\n *\n * @param node\n */ function hasAutofocusProp(node) {\n // https://github.com/facebook/react/blob/848bb2426e44606e0a55dfe44c7b3ece33772485/packages/react-dom/src/client/ReactDOMHostConfig.js#L157-L166\n const isAutoFocusableElement = node.nodeName === 'BUTTON' || node.nodeName === 'INPUT' || node.nodeName === 'SELECT' || node.nodeName === 'TEXTAREA';\n if (isAutoFocusableElement) {\n var _getReactFiberFromNode;\n return !!((_getReactFiberFromNode = getReactFiberFromNode(node)) === null || _getReactFiberFromNode === void 0 ? void 0 : _getReactFiberFromNode.pendingProps.autoFocus);\n }\n return false;\n}\nexport function hasAutofocusFilter(node) {\n return hasAutofocusProp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n}\n"],"names":["hasAutofocusFilter","hasAutofocusProp","node","isAutoFocusableElement","nodeName","_getReactFiberFromNode","getReactFiberFromNode","pendingProps","autoFocus","NodeFilter","FILTER_ACCEPT","FILTER_SKIP"],"mappings":"AAAA,EAAE;AACF,uDAAuD;AACvD,EAAE;;;;;+BAgBcA;;aAAAA;;uCAfsB;AACtC;;;;;CAKC,GAAG,SAASC,iBAAiBC,IAAI,EAAE;IAChC,gJAAgJ;IAChJ,MAAMC,yBAAyBD,KAAKE,QAAQ,KAAK,YAAYF,KAAKE,QAAQ,KAAK,WAAWF,KAAKE,QAAQ,KAAK,YAAYF,KAAKE,QAAQ,KAAK;IAC1I,IAAID,wBAAwB;QACxB,IAAIE;QACJ,OAAO,CAAC,CAAE,CAAA,AAACA,CAAAA,0BAAyBC,IAAAA,4CAAqB,EAACJ,KAAI,MAAO,IAAI,IAAIG,4BAA2B,KAAK,IAAI,KAAK,IAAIA,wBAAuBE,YAAY,CAACC,SAAS,AAAD;IAC1K,CAAC;IACD,OAAO,KAAK;AAChB;AACO,SAASR,mBAAmBE,IAAI,EAAE;IACrC,OAAOD,iBAAiBC,QAAQO,WAAWC,aAAa,GAAGD,WAAWE,WAAW;AACrF"}
@@ -18,6 +18,3 @@ _exportStar(require("./toggleScrollListener"), exports);
18
18
  _exportStar(require("./hasAutoFocusFilter"), exports);
19
19
  _exportStar(require("./writeArrowUpdates"), exports);
20
20
  _exportStar(require("./writeContainerupdates"), exports);
21
- //# sourceMappingURL=index.js.map
22
-
23
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/index.js"],"sourcesContent":["export * from './parseFloatingUIPlacement';\nexport * from './getBoundary';\nexport * from './getReactFiberFromNode';\nexport * from './getScrollParent';\nexport * from './mergeArrowOffset';\nexport * from './toFloatingUIPadding';\nexport * from './toFloatingUIPlacement';\nexport * from './fromFloatingUIPlacement';\nexport * from './resolvePositioningShorthand';\nexport * from './useCallbackRef';\nexport * from './debounce';\nexport * from './toggleScrollListener';\nexport * from './hasAutoFocusFilter';\nexport * from './writeArrowUpdates';\nexport * from './writeContainerupdates';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './parseFloatingUIPlacement';\nexport * from './getBoundary';\nexport * from './getReactFiberFromNode';\nexport * from './getScrollParent';\nexport * from './mergeArrowOffset';\nexport * from './toFloatingUIPadding';\nexport * from './toFloatingUIPlacement';\nexport * from './fromFloatingUIPlacement';\nexport * from './resolvePositioningShorthand';\nexport * from './useCallbackRef';\nexport * from './debounce';\nexport * from './toggleScrollListener';\nexport * from './hasAutoFocusFilter';\nexport * from './writeArrowUpdates';\nexport * from './writeContainerupdates';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA"}
@@ -42,6 +42,4 @@ const addArrowOffset = (offset, arrowHeight)=>{
42
42
  ...offset,
43
43
  mainAxis: ((_offset_mainAxis = offset.mainAxis) !== null && _offset_mainAxis !== void 0 ? _offset_mainAxis : 0) + arrowHeight
44
44
  };
45
- }; //# sourceMappingURL=mergeArrowOffset.js.map
46
-
47
- //# sourceMappingURL=mergeArrowOffset.js.map
45
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/mergeArrowOffset.js"],"sourcesContent":["/**\n * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the\n * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset\n *\n * @internal\n * @param userOffset - The offset provided by the user\n * @param arrowHeight - The height of the arrow in px\n * @returns User offset augmented with arrow height\n */export function mergeArrowOffset(userOffset, arrowHeight) {\n if (typeof userOffset === 'number') {\n return addArrowOffset(userOffset, arrowHeight);\n }\n if (typeof userOffset === 'object' && userOffset !== null) {\n return addArrowOffset(userOffset, arrowHeight);\n }\n if (typeof userOffset === 'function') {\n return offsetParams => {\n const offset = userOffset(offsetParams);\n return addArrowOffset(offset, arrowHeight);\n };\n }\n return {\n mainAxis: arrowHeight\n };\n}\nconst addArrowOffset = (offset, arrowHeight) => {\n if (typeof offset === 'number') {\n return {\n mainAxis: offset + arrowHeight\n };\n }\n var _offset_mainAxis;\n return {\n ...offset,\n mainAxis: ((_offset_mainAxis = offset.mainAxis) !== null && _offset_mainAxis !== void 0 ? _offset_mainAxis : 0) + arrowHeight\n };\n};\n//# sourceMappingURL=mergeArrowOffset.js.map"],"names":["mergeArrowOffset","userOffset","arrowHeight","addArrowOffset","offsetParams","offset","mainAxis","_offset_mainAxis"],"mappings":"AAAA;;;;;;;;CAQC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,iBAAiBC,UAAU,EAAEC,WAAW,EAAE;IAC3D,IAAI,OAAOD,eAAe,UAAU;QAClC,OAAOE,eAAeF,YAAYC;IACpC,CAAC;IACD,IAAI,OAAOD,eAAe,YAAYA,eAAe,IAAI,EAAE;QACzD,OAAOE,eAAeF,YAAYC;IACpC,CAAC;IACD,IAAI,OAAOD,eAAe,YAAY;QACpC,OAAOG,CAAAA,eAAgB;YACrB,MAAMC,SAASJ,WAAWG;YAC1B,OAAOD,eAAeE,QAAQH;QAChC;IACF,CAAC;IACD,OAAO;QACLI,UAAUJ;IACZ;AACF;AACA,MAAMC,iBAAiB,CAACE,QAAQH,cAAgB;IAC9C,IAAI,OAAOG,WAAW,UAAU;QAC9B,OAAO;YACLC,UAAUD,SAASH;QACrB;IACF,CAAC;IACD,IAAIK;IACJ,OAAO;QACL,GAAGF,MAAM;QACTC,UAAU,AAAC,CAAA,AAACC,CAAAA,mBAAmBF,OAAOC,QAAQ,AAAD,MAAO,IAAI,IAAIC,qBAAqB,KAAK,IAAIA,mBAAmB,CAAC,AAAD,IAAKL;IACpH;AACF,GACA,4CAA4C"}
1
+ {"version":3,"sources":["mergeArrowOffset.js"],"sourcesContent":["/**\n * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the\n * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset\n *\n * @internal\n * @param userOffset - The offset provided by the user\n * @param arrowHeight - The height of the arrow in px\n * @returns User offset augmented with arrow height\n */ export function mergeArrowOffset(userOffset, arrowHeight) {\n if (typeof userOffset === 'number') {\n return addArrowOffset(userOffset, arrowHeight);\n }\n if (typeof userOffset === 'object' && userOffset !== null) {\n return addArrowOffset(userOffset, arrowHeight);\n }\n if (typeof userOffset === 'function') {\n return (offsetParams)=>{\n const offset = userOffset(offsetParams);\n return addArrowOffset(offset, arrowHeight);\n };\n }\n return {\n mainAxis: arrowHeight\n };\n}\nconst addArrowOffset = (offset, arrowHeight)=>{\n if (typeof offset === 'number') {\n return {\n mainAxis: offset + arrowHeight\n };\n }\n var _offset_mainAxis;\n return {\n ...offset,\n mainAxis: ((_offset_mainAxis = offset.mainAxis) !== null && _offset_mainAxis !== void 0 ? _offset_mainAxis : 0) + arrowHeight\n };\n};\n"],"names":["mergeArrowOffset","userOffset","arrowHeight","addArrowOffset","offsetParams","offset","mainAxis","_offset_mainAxis"],"mappings":"AAAA;;;;;;;;CAQC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,iBAAiBC,UAAU,EAAEC,WAAW,EAAE;IAC1D,IAAI,OAAOD,eAAe,UAAU;QAChC,OAAOE,eAAeF,YAAYC;IACtC,CAAC;IACD,IAAI,OAAOD,eAAe,YAAYA,eAAe,IAAI,EAAE;QACvD,OAAOE,eAAeF,YAAYC;IACtC,CAAC;IACD,IAAI,OAAOD,eAAe,YAAY;QAClC,OAAO,CAACG,eAAe;YACnB,MAAMC,SAASJ,WAAWG;YAC1B,OAAOD,eAAeE,QAAQH;QAClC;IACJ,CAAC;IACD,OAAO;QACHI,UAAUJ;IACd;AACJ;AACA,MAAMC,iBAAiB,CAACE,QAAQH,cAAc;IAC1C,IAAI,OAAOG,WAAW,UAAU;QAC5B,OAAO;YACHC,UAAUD,SAASH;QACvB;IACJ,CAAC;IACD,IAAIK;IACJ,OAAO;QACH,GAAGF,MAAM;QACTC,UAAU,AAAC,CAAA,AAACC,CAAAA,mBAAmBF,OAAOC,QAAQ,AAAD,MAAO,IAAI,IAAIC,qBAAqB,KAAK,IAAIA,mBAAmB,CAAC,AAAD,IAAKL;IACtH;AACJ"}
@@ -17,6 +17,4 @@ function parseFloatingUIPlacement(placement) {
17
17
  side: tokens[0],
18
18
  alignment: tokens[1]
19
19
  };
20
- } //# sourceMappingURL=parseFloatingUIPlacement.js.map
21
-
22
- //# sourceMappingURL=parseFloatingUIPlacement.js.map
20
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/parseFloatingUIPlacement.js"],"sourcesContent":["/**\n * Parses Floating UI placement and returns the different components\n * @param placement - the floating ui placement (i.e. bottom-start)\n *\n * @returns side and alignment components of the placement\n */export function parseFloatingUIPlacement(placement) {\n const tokens = placement.split('-');\n return {\n side: tokens[0],\n alignment: tokens[1]\n };\n}\n//# sourceMappingURL=parseFloatingUIPlacement.js.map"],"names":["parseFloatingUIPlacement","placement","tokens","split","side","alignment"],"mappings":"AAAA;;;;;CAKC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,yBAAyBC,SAAS,EAAE;IACrD,MAAMC,SAASD,UAAUE,KAAK,CAAC;IAC/B,OAAO;QACLC,MAAMF,MAAM,CAAC,EAAE;QACfG,WAAWH,MAAM,CAAC,EAAE;IACtB;AACF,EACA,oDAAoD"}
1
+ {"version":3,"sources":["parseFloatingUIPlacement.js"],"sourcesContent":["/**\n * Parses Floating UI placement and returns the different components\n * @param placement - the floating ui placement (i.e. bottom-start)\n *\n * @returns side and alignment components of the placement\n */ export function parseFloatingUIPlacement(placement) {\n const tokens = placement.split('-');\n return {\n side: tokens[0],\n alignment: tokens[1]\n };\n}\n"],"names":["parseFloatingUIPlacement","placement","tokens","split","side","alignment"],"mappings":"AAAA;;;;;CAKC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,yBAAyBC,SAAS,EAAE;IACpD,MAAMC,SAASD,UAAUE,KAAK,CAAC;IAC/B,OAAO;QACHC,MAAMF,MAAM,CAAC,EAAE;QACfG,WAAWH,MAAM,CAAC,EAAE;IACxB;AACJ"}
@@ -65,6 +65,4 @@ function resolvePositioningShorthand(shorthand) {
65
65
  return shorthandLookup[shorthand];
66
66
  }
67
67
  return shorthand;
68
- } //# sourceMappingURL=resolvePositioningShorthand.js.map
69
-
70
- //# sourceMappingURL=resolvePositioningShorthand.js.map
68
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/resolvePositioningShorthand.js"],"sourcesContent":["// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup = {\n above: {\n position: 'above',\n align: 'center'\n },\n 'above-start': {\n position: 'above',\n align: 'start'\n },\n 'above-end': {\n position: 'above',\n align: 'end'\n },\n below: {\n position: 'below',\n align: 'center'\n },\n 'below-start': {\n position: 'below',\n align: 'start'\n },\n 'below-end': {\n position: 'below',\n align: 'end'\n },\n before: {\n position: 'before',\n align: 'center'\n },\n 'before-top': {\n position: 'before',\n align: 'top'\n },\n 'before-bottom': {\n position: 'before',\n align: 'bottom'\n },\n after: {\n position: 'after',\n align: 'center'\n },\n 'after-top': {\n position: 'after',\n align: 'top'\n },\n 'after-bottom': {\n position: 'after',\n align: 'bottom'\n }\n};\nexport function resolvePositioningShorthand(shorthand) {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n return shorthand;\n}\n//# sourceMappingURL=resolvePositioningShorthand.js.map"],"names":["resolvePositioningShorthand","shorthandLookup","above","position","align","below","before","after","shorthand","undefined"],"mappings":"AAAA,uDAAuD;;;;;+BAmDvCA;;aAAAA;;AAlDhB,MAAMC,kBAAkB;IACtBC,OAAO;QACLC,UAAU;QACVC,OAAO;IACT;IACA,eAAe;QACbD,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACAC,OAAO;QACLF,UAAU;QACVC,OAAO;IACT;IACA,eAAe;QACbD,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACAE,QAAQ;QACNH,UAAU;QACVC,OAAO;IACT;IACA,cAAc;QACZD,UAAU;QACVC,OAAO;IACT;IACA,iBAAiB;QACfD,UAAU;QACVC,OAAO;IACT;IACAG,OAAO;QACLJ,UAAU;QACVC,OAAO;IACT;IACA,aAAa;QACXD,UAAU;QACVC,OAAO;IACT;IACA,gBAAgB;QACdD,UAAU;QACVC,OAAO;IACT;AACF;AACO,SAASJ,4BAA4BQ,SAAS,EAAE;IACrD,IAAIA,cAAcC,aAAaD,cAAc,IAAI,EAAE;QACjD,OAAO,CAAC;IACV,CAAC;IACD,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOP,eAAe,CAACO,UAAU;IACnC,CAAC;IACD,OAAOA;AACT,EACA,uDAAuD"}
1
+ {"version":3,"sources":["resolvePositioningShorthand.js"],"sourcesContent":["// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup = {\n above: {\n position: 'above',\n align: 'center'\n },\n 'above-start': {\n position: 'above',\n align: 'start'\n },\n 'above-end': {\n position: 'above',\n align: 'end'\n },\n below: {\n position: 'below',\n align: 'center'\n },\n 'below-start': {\n position: 'below',\n align: 'start'\n },\n 'below-end': {\n position: 'below',\n align: 'end'\n },\n before: {\n position: 'before',\n align: 'center'\n },\n 'before-top': {\n position: 'before',\n align: 'top'\n },\n 'before-bottom': {\n position: 'before',\n align: 'bottom'\n },\n after: {\n position: 'after',\n align: 'center'\n },\n 'after-top': {\n position: 'after',\n align: 'top'\n },\n 'after-bottom': {\n position: 'after',\n align: 'bottom'\n }\n};\nexport function resolvePositioningShorthand(shorthand) {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n return shorthand;\n}\n"],"names":["resolvePositioningShorthand","shorthandLookup","above","position","align","below","before","after","shorthand","undefined"],"mappings":"AAAA,uDAAuD;;;;;+BAmDvCA;;aAAAA;;AAlDhB,MAAMC,kBAAkB;IACpBC,OAAO;QACHC,UAAU;QACVC,OAAO;IACX;IACA,eAAe;QACXD,UAAU;QACVC,OAAO;IACX;IACA,aAAa;QACTD,UAAU;QACVC,OAAO;IACX;IACAC,OAAO;QACHF,UAAU;QACVC,OAAO;IACX;IACA,eAAe;QACXD,UAAU;QACVC,OAAO;IACX;IACA,aAAa;QACTD,UAAU;QACVC,OAAO;IACX;IACAE,QAAQ;QACJH,UAAU;QACVC,OAAO;IACX;IACA,cAAc;QACVD,UAAU;QACVC,OAAO;IACX;IACA,iBAAiB;QACbD,UAAU;QACVC,OAAO;IACX;IACAG,OAAO;QACHJ,UAAU;QACVC,OAAO;IACX;IACA,aAAa;QACTD,UAAU;QACVC,OAAO;IACX;IACA,gBAAgB;QACZD,UAAU;QACVC,OAAO;IACX;AACJ;AACO,SAASJ,4BAA4BQ,SAAS,EAAE;IACnD,IAAIA,cAAcC,aAAaD,cAAc,IAAI,EAAE;QAC/C,OAAO,CAAC;IACZ,CAAC;IACD,IAAI,OAAOA,cAAc,UAAU;QAC/B,OAAOP,eAAe,CAACO,UAAU;IACrC,CAAC;IACD,OAAOA;AACX"}
@@ -23,6 +23,4 @@ function toFloatingUIPadding(padding, isRtl) {
23
23
  paddingObject.right = padding[right];
24
24
  }
25
25
  return paddingObject;
26
- } //# sourceMappingURL=toFloatingUIPadding.js.map
27
-
28
- //# sourceMappingURL=toFloatingUIPadding.js.map
26
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/toFloatingUIPadding.js"],"sourcesContent":["export function toFloatingUIPadding(padding, isRtl) {\n if (typeof padding === 'number') {\n return padding;\n }\n const {\n start,\n end,\n ...verticalPadding\n } = padding;\n const paddingObject = verticalPadding;\n const left = isRtl ? 'end' : 'start';\n const right = isRtl ? 'start' : 'end';\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n return paddingObject;\n}\n//# sourceMappingURL=toFloatingUIPadding.js.map"],"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,oBAAoBC,OAAO,EAAEC,KAAK,EAAE;IAClD,IAAI,OAAOD,YAAY,UAAU;QAC/B,OAAOA;IACT,CAAC;IACD,MAAM,EACJE,MAAK,EACLC,IAAG,EACH,GAAGC,iBACJ,GAAGJ;IACJ,MAAMK,gBAAgBD;IACtB,MAAME,OAAOL,QAAQ,QAAQ,OAAO;IACpC,MAAMM,QAAQN,QAAQ,UAAU,KAAK;IACrC,0FAA0F;IAC1F,gCAAgC;IAChC,IAAID,OAAO,CAACM,KAAK,EAAE;QACjBD,cAAcC,IAAI,GAAGN,OAAO,CAACM,KAAK;IACpC,CAAC;IACD,IAAIN,OAAO,CAACO,MAAM,EAAE;QAClBF,cAAcE,KAAK,GAAGP,OAAO,CAACO,MAAM;IACtC,CAAC;IACD,OAAOF;AACT,EACA,+CAA+C"}
1
+ {"version":3,"sources":["toFloatingUIPadding.js"],"sourcesContent":["export function toFloatingUIPadding(padding, isRtl) {\n if (typeof padding === 'number') {\n return padding;\n }\n const { start , end , ...verticalPadding } = padding;\n const paddingObject = verticalPadding;\n const left = isRtl ? 'end' : 'start';\n const right = isRtl ? 'start' : 'end';\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n return paddingObject;\n}\n"],"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,oBAAoBC,OAAO,EAAEC,KAAK,EAAE;IAChD,IAAI,OAAOD,YAAY,UAAU;QAC7B,OAAOA;IACX,CAAC;IACD,MAAM,EAAEE,MAAK,EAAGC,IAAG,EAAG,GAAGC,iBAAiB,GAAGJ;IAC7C,MAAMK,gBAAgBD;IACtB,MAAME,OAAOL,QAAQ,QAAQ,OAAO;IACpC,MAAMM,QAAQN,QAAQ,UAAU,KAAK;IACrC,0FAA0F;IAC1F,gCAAgC;IAChC,IAAID,OAAO,CAACM,KAAK,EAAE;QACfD,cAAcC,IAAI,GAAGN,OAAO,CAACM,KAAK;IACtC,CAAC;IACD,IAAIN,OAAO,CAACO,MAAM,EAAE;QAChBF,cAAcE,KAAK,GAAGP,OAAO,CAACO,MAAM;IACxC,CAAC;IACD,OAAOF;AACX"}
@@ -34,6 +34,4 @@ const toFloatingUIPlacement = (align, position, rtl)=>{
34
34
  return `${computedPosition}-${computedAlignment}`;
35
35
  }
36
36
  return computedPosition;
37
- }; //# sourceMappingURL=toFloatingUIPlacement.js.map
38
-
39
- //# sourceMappingURL=toFloatingUIPlacement.js.map
37
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/toFloatingUIPlacement.js"],"sourcesContent":["const getPositionMap = rtl => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right'\n});\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = () => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined\n});\nconst shouldAlignToCenter = (p, a) => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;\n};\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const toFloatingUIPlacement = (align, position, rtl) => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}`;\n }\n return computedPosition;\n};\n//# sourceMappingURL=toFloatingUIPlacement.js.map"],"names":["toFloatingUIPlacement","getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","align","position","alignment","computedPosition","computedAlignment"],"mappings":";;;;+BAwBaA;;aAAAA;;AAxBb,MAAMC,iBAAiBC,CAAAA,MAAQ,CAAA;QAC7BC,OAAO;QACPC,OAAO;QACPC,QAAQH,MAAM,UAAU,MAAM;QAC9BI,OAAOJ,MAAM,SAAS,OAAO;IAC/B,CAAA;AACA,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMK,kBAAkB,IAAO,CAAA;QAC7BC,OAAO;QACPC,KAAK;QACLC,KAAK;QACLC,QAAQ;QACRC,QAAQC;IACV,CAAA;AACA,MAAMC,sBAAsB,CAACC,GAAGC,IAAM;IACpC,MAAMC,uBAAuBF,MAAM,WAAWA,MAAM;IACpD,MAAMG,oBAAoBF,MAAM,SAASA,MAAM;IAC/C,OAAOC,wBAAwBC,qBAAqB,CAACD,wBAAwB,CAACC;AAChF;AAKO,MAAMlB,wBAAwB,CAACmB,OAAOC,UAAUlB,MAAQ;IAC7D,MAAMmB,YAAYP,oBAAoBM,UAAUD,SAAS,WAAWA,KAAK;IACzE,MAAMG,mBAAmBF,YAAYnB,eAAeC,IAAI,CAACkB,SAAS;IAClE,MAAMG,oBAAoBF,aAAad,iBAAiB,CAACc,UAAU;IACnE,IAAIC,oBAAoBC,mBAAmB;QACzC,OAAO,CAAC,EAAED,iBAAiB,CAAC,EAAEC,kBAAkB,CAAC;IACnD,CAAC;IACD,OAAOD;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["toFloatingUIPlacement.js"],"sourcesContent":["const getPositionMap = (rtl)=>({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right'\n });\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = ()=>({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined\n });\nconst shouldAlignToCenter = (p, a)=>{\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n return positionedVertically && alignedVertically || !positionedVertically && !alignedVertically;\n};\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */ export const toFloatingUIPlacement = (align, position, rtl)=>{\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}`;\n }\n return computedPosition;\n};\n"],"names":["toFloatingUIPlacement","getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","align","position","alignment","computedPosition","computedAlignment"],"mappings":";;;;+BAuBiBA;;aAAAA;;AAvBjB,MAAMC,iBAAiB,CAACC,MAAO,CAAA;QACvBC,OAAO;QACPC,OAAO;QACPC,QAAQH,MAAM,UAAU,MAAM;QAC9BI,OAAOJ,MAAM,SAAS,OAAO;IACjC,CAAA;AACJ,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMK,kBAAkB,IAAK,CAAA;QACrBC,OAAO;QACPC,KAAK;QACLC,KAAK;QACLC,QAAQ;QACRC,QAAQC;IACZ,CAAA;AACJ,MAAMC,sBAAsB,CAACC,GAAGC,IAAI;IAChC,MAAMC,uBAAuBF,MAAM,WAAWA,MAAM;IACpD,MAAMG,oBAAoBF,MAAM,SAASA,MAAM;IAC/C,OAAOC,wBAAwBC,qBAAqB,CAACD,wBAAwB,CAACC;AAClF;AAIW,MAAMlB,wBAAwB,CAACmB,OAAOC,UAAUlB,MAAM;IAC7D,MAAMmB,YAAYP,oBAAoBM,UAAUD,SAAS,WAAWA,KAAK;IACzE,MAAMG,mBAAmBF,YAAYnB,eAAeC,IAAI,CAACkB,SAAS;IAClE,MAAMG,oBAAoBF,aAAad,iBAAiB,CAACc,UAAU;IACnE,IAAIC,oBAAoBC,mBAAmB;QACvC,OAAO,CAAC,EAAED,iBAAiB,CAAC,EAAEC,kBAAkB,CAAC;IACrD,CAAC;IACD,OAAOD;AACX"}
@@ -20,6 +20,4 @@ function toggleScrollListener(next, prev, handler) {
20
20
  const scrollParent = (0, _getScrollParent.getScrollParent)(next);
21
21
  scrollParent.addEventListener('scroll', handler);
22
22
  }
23
- } //# sourceMappingURL=toggleScrollListener.js.map
24
-
25
- //# sourceMappingURL=toggleScrollListener.js.map
23
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/toggleScrollListener.js"],"sourcesContent":["import { isHTMLElement } from '@fluentui/react-utilities';\nimport { getScrollParent } from './getScrollParent';\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */\nexport function toggleScrollListener(next, prev, handler) {\n if (next === prev) {\n return;\n }\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n//# sourceMappingURL=toggleScrollListener.js.map"],"names":["toggleScrollListener","next","prev","handler","isHTMLElement","prevScrollParent","getScrollParent","removeEventListener","scrollParent","addEventListener"],"mappings":";;;;+BAQgBA;;aAAAA;;gCARc;iCACE;AAOzB,SAASA,qBAAqBC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAE;IACxD,IAAIF,SAASC,MAAM;QACjB;IACF,CAAC;IACD,IAAIE,IAAAA,6BAAa,EAACF,OAAO;QACvB,MAAMG,mBAAmBC,IAAAA,gCAAe,EAACJ;QACzCG,iBAAiBE,mBAAmB,CAAC,UAAUJ;IACjD,CAAC;IACD,IAAIC,IAAAA,6BAAa,EAACH,OAAO;QACvB,MAAMO,eAAeF,IAAAA,gCAAe,EAACL;QACrCO,aAAaC,gBAAgB,CAAC,UAAUN;IAC1C,CAAC;AACH,EACA,gDAAgD"}
1
+ {"version":3,"sources":["toggleScrollListener.js"],"sourcesContent":["import { isHTMLElement } from '@fluentui/react-utilities';\nimport { getScrollParent } from './getScrollParent';\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */ export function toggleScrollListener(next, prev, handler) {\n if (next === prev) {\n return;\n }\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n"],"names":["toggleScrollListener","next","prev","handler","isHTMLElement","prevScrollParent","getScrollParent","removeEventListener","scrollParent","addEventListener"],"mappings":";;;;+BAOoBA;;aAAAA;;gCAPU;iCACE;AAMrB,SAASA,qBAAqBC,IAAI,EAAEC,IAAI,EAAEC,OAAO,EAAE;IAC1D,IAAIF,SAASC,MAAM;QACf;IACJ,CAAC;IACD,IAAIE,IAAAA,6BAAa,EAACF,OAAO;QACrB,MAAMG,mBAAmBC,IAAAA,gCAAe,EAACJ;QACzCG,iBAAiBE,mBAAmB,CAAC,UAAUJ;IACnD,CAAC;IACD,IAAIC,IAAAA,6BAAa,EAACH,OAAO;QACrB,MAAMO,eAAeF,IAAAA,gCAAe,EAACL;QACrCO,aAAaC,gBAAgB,CAAC,UAAUN;IAC5C,CAAC;AACL"}
@@ -39,6 +39,4 @@ function useCallbackRef(initialValue, callback, skipInitialResolve) {
39
39
  // update callback
40
40
  ref.callback = callback;
41
41
  return ref.facade;
42
- } //# sourceMappingURL=useCallbackRef.js.map
43
-
44
- //# sourceMappingURL=useCallbackRef.js.map
42
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/useCallbackRef.js"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef(initialValue, callback, skipInitialResolve) {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n if (last !== value) {\n ref.value = value;\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n ref.callback(value, last);\n }\n }\n }\n }));\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n//# sourceMappingURL=useCallbackRef.js.map"],"names":["useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","React","useRef","ref","useState","value","facade","current","last","useIsomorphicLayoutEffect"],"mappings":";;;;+BAmBgBA;;aAAAA;;;6DAnBO;gCACmB;AAkBnC,SAASA,eAAeC,YAAY,EAAEC,QAAQ,EAAEC,kBAAkB,EAAE;IACzE,MAAMC,UAAUC,OAAMC,MAAM,CAAC,IAAI;IACjC,MAAM,CAACC,IAAI,GAAGF,OAAMG,QAAQ,CAAC,IAAO,CAAA;YAClC,QAAQ;YACRC,OAAOR;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BQ,QAAQ;gBACN,IAAIC,WAAU;oBACZ,OAAOJ,IAAIE,KAAK;gBAClB;gBACA,IAAIE,SAAQF,MAAO;oBACjB,MAAMG,OAAOL,IAAIE,KAAK;oBACtB,IAAIG,SAASH,OAAO;wBAClBF,IAAIE,KAAK,GAAGA;wBACZ,IAAIN,sBAAsBC,QAAQO,OAAO,EAAE;4BACzC;wBACF,CAAC;wBACDJ,IAAIL,QAAQ,CAACO,OAAOG;oBACtB,CAAC;gBACH;YACF;QACF,CAAA;IACAC,IAAAA,yCAAyB,EAAC,IAAM;QAC9BT,QAAQO,OAAO,GAAG,KAAK;IACzB,GAAG,EAAE;IACL,kBAAkB;IAClBJ,IAAIL,QAAQ,GAAGA;IACf,OAAOK,IAAIG,MAAM;AACnB,EACA,0CAA0C"}
1
+ {"version":3,"sources":["useCallbackRef.js"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */ export function useCallbackRef(initialValue, callback, skipInitialResolve) {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(()=>({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current () {\n return ref.value;\n },\n set current (value){\n const last = ref.value;\n if (last !== value) {\n ref.value = value;\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n ref.callback(value, last);\n }\n }\n }\n }));\n useIsomorphicLayoutEffect(()=>{\n isFirst.current = false;\n }, []);\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","React","useRef","ref","useState","value","facade","current","last","useIsomorphicLayoutEffect"],"mappings":";;;;+BAkBoBA;;aAAAA;;;6DAlBG;gCACmB;AAiB/B,SAASA,eAAeC,YAAY,EAAEC,QAAQ,EAAEC,kBAAkB,EAAE;IAC3E,MAAMC,UAAUC,OAAMC,MAAM,CAAC,IAAI;IACjC,MAAM,CAACC,IAAI,GAAGF,OAAMG,QAAQ,CAAC,IAAK,CAAA;YAC1B,QAAQ;YACRC,OAAOR;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BQ,QAAQ;gBACJ,IAAIC,WAAW;oBACX,OAAOJ,IAAIE,KAAK;gBACpB;gBACA,IAAIE,SAASF,MAAM;oBACf,MAAMG,OAAOL,IAAIE,KAAK;oBACtB,IAAIG,SAASH,OAAO;wBAChBF,IAAIE,KAAK,GAAGA;wBACZ,IAAIN,sBAAsBC,QAAQO,OAAO,EAAE;4BACvC;wBACJ,CAAC;wBACDJ,IAAIL,QAAQ,CAACO,OAAOG;oBACxB,CAAC;gBACL;YACJ;QACJ,CAAA;IACJC,IAAAA,yCAAyB,EAAC,IAAI;QAC1BT,QAAQO,OAAO,GAAG,KAAK;IAC3B,GAAG,EAAE;IACL,kBAAkB;IAClBJ,IAAIL,QAAQ,GAAGA;IACf,OAAOK,IAAIG,MAAM;AACrB"}
@@ -18,6 +18,4 @@ function writeArrowUpdates(options) {
18
18
  left: `${arrowX}px`,
19
19
  top: `${arrowY}px`
20
20
  });
21
- } //# sourceMappingURL=writeArrowUpdates.js.map
22
-
23
- //# sourceMappingURL=writeArrowUpdates.js.map
21
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/writeArrowUpdates.js"],"sourcesContent":["/**\n * Writes all DOM element updates after position is computed\n */export function writeArrowUpdates(options) {\n const {\n arrow,\n middlewareData\n } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n const {\n x: arrowX,\n y: arrowY\n } = middlewareData.arrow;\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`\n });\n}\n//# sourceMappingURL=writeArrowUpdates.js.map"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"mappings":"AAAA;;CAEC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,kBAAkBC,OAAO,EAAE;IAC5C,MAAM,EACJC,MAAK,EACLC,eAAc,EACf,GAAGF;IACJ,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACnC;IACF,CAAC;IACD,MAAM,EACJE,GAAGC,OAAM,EACTC,GAAGC,OAAM,EACV,GAAGJ,eAAeD,KAAK;IACxBM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACzBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACpB;AACF,EACA,6CAA6C"}
1
+ {"version":3,"sources":["writeArrowUpdates.js"],"sourcesContent":["/**\n * Writes all DOM element updates after position is computed\n */ export function writeArrowUpdates(options) {\n const { arrow , middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n const { x: arrowX , y: arrowY } = middlewareData.arrow;\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`\n });\n}\n"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"mappings":"AAAA;;CAEC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,kBAAkBC,OAAO,EAAE;IAC3C,MAAM,EAAEC,MAAK,EAAGC,eAAc,EAAG,GAAGF;IACpC,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACjC;IACJ,CAAC;IACD,MAAM,EAAEE,GAAGC,OAAM,EAAGC,GAAGC,OAAM,EAAG,GAAGJ,eAAeD,KAAK;IACvDM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACvBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACtB;AACJ"}
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "writeContainerUpdates", {
9
9
  const _constants = require("../constants");
10
10
  function writeContainerUpdates(options) {
11
11
  var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;
12
- const { container , placement , middlewareData , strategy , lowPPI , coordinates } = options;
12
+ const { container , placement , middlewareData , strategy , lowPPI , coordinates , useTransform =true } = options;
13
13
  if (!container) {
14
14
  return;
15
15
  }
@@ -34,9 +34,16 @@ function writeContainerUpdates(options) {
34
34
  const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;
35
35
  const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;
36
36
  Object.assign(container.style, {
37
- transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,
38
37
  position: strategy
39
38
  });
40
- } //# sourceMappingURL=writeContainerupdates.js.map
41
-
42
- //# sourceMappingURL=writeContainerupdates.js.map
39
+ if (useTransform) {
40
+ Object.assign(container.style, {
41
+ transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`
42
+ });
43
+ return;
44
+ }
45
+ Object.assign(container.style, {
46
+ left: `${x}px`,
47
+ top: `${y}px`
48
+ });
49
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/writeContainerupdates.js"],"sourcesContent":["import { DATA_POSITIONING_ESCAPED, DATA_POSITIONING_HIDDEN, DATA_POSITIONING_INTERSECTING, DATA_POSITIONING_PLACEMENT } from '../constants';\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options) {\n var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;\n const {\n container,\n placement,\n middlewareData,\n strategy,\n lowPPI,\n coordinates\n } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n position: strategy\n });\n}\n//# sourceMappingURL=writeContainerupdates.js.map"],"names":["writeContainerUpdates","options","_middlewareData_hide","_middlewareData_hide1","_container_ownerDocument_defaultView","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","DATA_POSITIONING_PLACEMENT","removeAttribute","DATA_POSITIONING_INTERSECTING","intersectionObserver","intersecting","DATA_POSITIONING_ESCAPED","hide","escaped","DATA_POSITIONING_HIDDEN","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","transform","position"],"mappings":";;;;+BAIgBA;;aAAAA;;2BAJ6G;AAItH,SAASA,sBAAsBC,OAAO,EAAE;IAC7C,IAAIC,sBAAsBC,uBAAuBC;IACjD,MAAM,EACJC,UAAS,EACTC,UAAS,EACTC,eAAc,EACdC,SAAQ,EACRC,OAAM,EACNC,YAAW,EACZ,GAAGT;IACJ,IAAI,CAACI,WAAW;QACd;IACF,CAAC;IACDA,UAAUM,YAAY,CAACC,qCAA0B,EAAEN;IACnDD,UAAUQ,eAAe,CAACC,wCAA6B;IACvD,IAAIP,eAAeQ,oBAAoB,CAACC,YAAY,EAAE;QACpDX,UAAUM,YAAY,CAACG,wCAA6B,EAAE;IACxD,CAAC;IACDT,UAAUQ,eAAe,CAACI,mCAAwB;IAClD,IAAI,AAACf,CAAAA,uBAAuBK,eAAeW,IAAI,AAAD,MAAO,IAAI,IAAIhB,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBiB,OAAO,EAAE;QACpId,UAAUM,YAAY,CAACM,mCAAwB,EAAE;IACnD,CAAC;IACDZ,UAAUQ,eAAe,CAACO,kCAAuB;IACjD,IAAI,AAACjB,CAAAA,wBAAwBI,eAAeW,IAAI,AAAD,MAAO,IAAI,IAAIf,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBkB,eAAe,EAAE;QAC/IhB,UAAUM,YAAY,CAACS,kCAAuB,EAAE;IAClD,CAAC;IACD,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAME,mBAAmB,AAAC,CAAA,AAAClB,CAAAA,uCAAuCC,UAAUkB,aAAa,CAACC,WAAW,AAAD,MAAO,IAAI,IAAIpB,yCAAyC,KAAK,IAAI,KAAK,IAAIA,qCAAqCkB,gBAAgB,AAAD,KAAM;IACxO,MAAMG,IAAIC,KAAKC,KAAK,CAACjB,YAAYe,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAACjB,YAAYkB,CAAC,GAAGN,oBAAoBA;IACzDO,OAAOC,MAAM,CAACzB,UAAU0B,KAAK,EAAE;QAC7BC,WAAWvB,SAAS,CAAC,UAAU,EAAEgB,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QAClFK,UAAUzB;IACZ;AACF,EACA,iDAAiD"}
1
+ {"version":3,"sources":["writeContainerupdates.js"],"sourcesContent":["import { DATA_POSITIONING_ESCAPED, DATA_POSITIONING_HIDDEN, DATA_POSITIONING_INTERSECTING, DATA_POSITIONING_PLACEMENT } from '../constants';\n/**\n * Writes all container element position updates after the position is computed\n */ export function writeContainerUpdates(options) {\n var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;\n const { container , placement , middlewareData , strategy , lowPPI , coordinates , useTransform =true } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n Object.assign(container.style, {\n position: strategy\n });\n if (useTransform) {\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`\n });\n return;\n }\n Object.assign(container.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n}\n"],"names":["writeContainerUpdates","options","_middlewareData_hide","_middlewareData_hide1","_container_ownerDocument_defaultView","container","placement","middlewareData","strategy","lowPPI","coordinates","useTransform","setAttribute","DATA_POSITIONING_PLACEMENT","removeAttribute","DATA_POSITIONING_INTERSECTING","intersectionObserver","intersecting","DATA_POSITIONING_ESCAPED","hide","escaped","DATA_POSITIONING_HIDDEN","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","position","transform","left","top"],"mappings":";;;;+BAGoBA;;aAAAA;;2BAHyG;AAGlH,SAASA,sBAAsBC,OAAO,EAAE;IAC/C,IAAIC,sBAAsBC,uBAAuBC;IACjD,MAAM,EAAEC,UAAS,EAAGC,UAAS,EAAGC,eAAc,EAAGC,SAAQ,EAAGC,OAAM,EAAGC,YAAW,EAAGC,cAAc,IAAI,CAAA,EAAG,GAAGV;IAC3G,IAAI,CAACI,WAAW;QACZ;IACJ,CAAC;IACDA,UAAUO,YAAY,CAACC,qCAA0B,EAAEP;IACnDD,UAAUS,eAAe,CAACC,wCAA6B;IACvD,IAAIR,eAAeS,oBAAoB,CAACC,YAAY,EAAE;QAClDZ,UAAUO,YAAY,CAACG,wCAA6B,EAAE;IAC1D,CAAC;IACDV,UAAUS,eAAe,CAACI,mCAAwB;IAClD,IAAI,AAAChB,CAAAA,uBAAuBK,eAAeY,IAAI,AAAD,MAAO,IAAI,IAAIjB,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBkB,OAAO,EAAE;QAClIf,UAAUO,YAAY,CAACM,mCAAwB,EAAE;IACrD,CAAC;IACDb,UAAUS,eAAe,CAACO,kCAAuB;IACjD,IAAI,AAAClB,CAAAA,wBAAwBI,eAAeY,IAAI,AAAD,MAAO,IAAI,IAAIhB,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBmB,eAAe,EAAE;QAC7IjB,UAAUO,YAAY,CAACS,kCAAuB,EAAE;IACpD,CAAC;IACD,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAME,mBAAmB,AAAC,CAAA,AAACnB,CAAAA,uCAAuCC,UAAUmB,aAAa,CAACC,WAAW,AAAD,MAAO,IAAI,IAAIrB,yCAAyC,KAAK,IAAI,KAAK,IAAIA,qCAAqCmB,gBAAgB,AAAD,KAAM;IACxO,MAAMG,IAAIC,KAAKC,KAAK,CAAClB,YAAYgB,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAAClB,YAAYmB,CAAC,GAAGN,oBAAoBA;IACzDO,OAAOC,MAAM,CAAC1B,UAAU2B,KAAK,EAAE;QAC3BC,UAAUzB;IACd;IACA,IAAIG,cAAc;QACdmB,OAAOC,MAAM,CAAC1B,UAAU2B,KAAK,EAAE;YAC3BE,WAAWzB,SAAS,CAAC,UAAU,EAAEiB,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QACtF;QACA;IACJ,CAAC;IACDC,OAAOC,MAAM,CAAC1B,UAAU2B,KAAK,EAAE;QAC3BG,MAAM,CAAC,EAAET,EAAE,EAAE,CAAC;QACdU,KAAK,CAAC,EAAEP,EAAE,EAAE,CAAC;IACjB;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-positioning",
3
- "version": "9.5.14",
3
+ "version": "9.7.0",
4
4
  "description": "A react wrapper around Popper.js for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -30,10 +30,10 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@floating-ui/dom": "^1.2.0",
33
- "@fluentui/react-shared-contexts": "^9.5.0",
34
- "@fluentui/react-theme": "^9.1.8",
35
- "@fluentui/react-utilities": "^9.9.1",
36
- "@griffel/react": "^1.5.2",
33
+ "@fluentui/react-shared-contexts": "^9.5.1",
34
+ "@fluentui/react-theme": "^9.1.9",
35
+ "@fluentui/react-utilities": "^9.9.3",
36
+ "@griffel/react": "^1.5.7",
37
37
  "@swc/helpers": "^0.4.14"
38
38
  },
39
39
  "peerDependencies": {