@fluentui/react-positioning 9.5.14 → 9.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/CHANGELOG.json +30 -1
  2. package/CHANGELOG.md +16 -2
  3. package/dist/index.d.ts +6 -1
  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/createVirtualElementFromClick.js +18 -19
  11. package/lib/createVirtualElementFromClick.js.map +1 -1
  12. package/lib/index.js +0 -1
  13. package/lib/index.js.map +1 -1
  14. package/lib/middleware/coverTarget.js +26 -32
  15. package/lib/middleware/coverTarget.js.map +1 -1
  16. package/lib/middleware/flip.js +22 -32
  17. package/lib/middleware/flip.js.map +1 -1
  18. package/lib/middleware/index.js +0 -1
  19. package/lib/middleware/index.js.map +1 -1
  20. package/lib/middleware/intersecting.js +16 -17
  21. package/lib/middleware/intersecting.js.map +1 -1
  22. package/lib/middleware/maxSize.js +25 -34
  23. package/lib/middleware/maxSize.js.map +1 -1
  24. package/lib/middleware/offset.js +3 -5
  25. package/lib/middleware/offset.js.map +1 -1
  26. package/lib/middleware/shift.js +21 -30
  27. package/lib/middleware/shift.js.map +1 -1
  28. package/lib/types.js +0 -1
  29. package/lib/types.js.map +1 -1
  30. package/lib/usePositioning.js +188 -154
  31. package/lib/usePositioning.js.map +1 -1
  32. package/lib/usePositioningMouseTarget.js +24 -23
  33. package/lib/usePositioningMouseTarget.js.map +1 -1
  34. package/lib/utils/debounce.js +13 -14
  35. package/lib/utils/debounce.js.map +1 -1
  36. package/lib/utils/fromFloatingUIPlacement.js +23 -28
  37. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  38. package/lib/utils/getBoundary.js +14 -16
  39. package/lib/utils/getBoundary.js.map +1 -1
  40. package/lib/utils/getFloatingUIOffset.js +16 -27
  41. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  42. package/lib/utils/getReactFiberFromNode.js +36 -37
  43. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  44. package/lib/utils/getScrollParent.js +35 -42
  45. package/lib/utils/getScrollParent.js.map +1 -1
  46. package/lib/utils/hasAutoFocusFilter.js +9 -11
  47. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  48. package/lib/utils/index.js +0 -1
  49. package/lib/utils/index.js.map +1 -1
  50. package/lib/utils/mergeArrowOffset.js +24 -25
  51. package/lib/utils/mergeArrowOffset.js.map +1 -1
  52. package/lib/utils/parseFloatingUIPlacement.js +6 -7
  53. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  54. package/lib/utils/resolvePositioningShorthand.js +55 -56
  55. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  56. package/lib/utils/toFloatingUIPadding.js +16 -21
  57. package/lib/utils/toFloatingUIPadding.js.map +1 -1
  58. package/lib/utils/toFloatingUIPlacement.js +25 -27
  59. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  60. package/lib/utils/toggleScrollListener.js +12 -14
  61. package/lib/utils/toggleScrollListener.js.map +1 -1
  62. package/lib/utils/useCallbackRef.js +30 -32
  63. package/lib/utils/useCallbackRef.js.map +1 -1
  64. package/lib/utils/writeArrowUpdates.js +10 -17
  65. package/lib/utils/writeArrowUpdates.js.map +1 -1
  66. package/lib/utils/writeContainerupdates.js +39 -39
  67. package/lib/utils/writeContainerupdates.js.map +1 -1
  68. package/lib-commonjs/constants.js +1 -3
  69. package/lib-commonjs/constants.js.map +1 -1
  70. package/lib-commonjs/createArrowStyles.js +1 -3
  71. package/lib-commonjs/createArrowStyles.js.map +1 -1
  72. package/lib-commonjs/createPositionManager.js +4 -5
  73. package/lib-commonjs/createPositionManager.js.map +1 -1
  74. package/lib-commonjs/createVirtualElementFromClick.js +1 -3
  75. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  76. package/lib-commonjs/index.js +0 -3
  77. package/lib-commonjs/index.js.map +1 -1
  78. package/lib-commonjs/middleware/coverTarget.js +1 -3
  79. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  80. package/lib-commonjs/middleware/flip.js +1 -3
  81. package/lib-commonjs/middleware/flip.js.map +1 -1
  82. package/lib-commonjs/middleware/index.js +0 -3
  83. package/lib-commonjs/middleware/index.js.map +1 -1
  84. package/lib-commonjs/middleware/intersecting.js +1 -3
  85. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  86. package/lib-commonjs/middleware/maxSize.js +1 -3
  87. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  88. package/lib-commonjs/middleware/offset.js +1 -3
  89. package/lib-commonjs/middleware/offset.js.map +1 -1
  90. package/lib-commonjs/middleware/shift.js +1 -3
  91. package/lib-commonjs/middleware/shift.js.map +1 -1
  92. package/lib-commonjs/types.js +0 -3
  93. package/lib-commonjs/types.js.map +1 -1
  94. package/lib-commonjs/usePositioning.js +6 -6
  95. package/lib-commonjs/usePositioning.js.map +1 -1
  96. package/lib-commonjs/usePositioningMouseTarget.js +1 -3
  97. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  98. package/lib-commonjs/utils/debounce.js +1 -3
  99. package/lib-commonjs/utils/debounce.js.map +1 -1
  100. package/lib-commonjs/utils/fromFloatingUIPlacement.js +1 -3
  101. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  102. package/lib-commonjs/utils/getBoundary.js +1 -3
  103. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  104. package/lib-commonjs/utils/getFloatingUIOffset.js +1 -3
  105. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  106. package/lib-commonjs/utils/getReactFiberFromNode.js +1 -3
  107. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  108. package/lib-commonjs/utils/getScrollParent.js +1 -3
  109. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  110. package/lib-commonjs/utils/hasAutoFocusFilter.js +1 -3
  111. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  112. package/lib-commonjs/utils/index.js +0 -3
  113. package/lib-commonjs/utils/index.js.map +1 -1
  114. package/lib-commonjs/utils/mergeArrowOffset.js +1 -3
  115. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  116. package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -3
  117. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  118. package/lib-commonjs/utils/resolvePositioningShorthand.js +1 -3
  119. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  120. package/lib-commonjs/utils/toFloatingUIPadding.js +1 -3
  121. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  122. package/lib-commonjs/utils/toFloatingUIPlacement.js +1 -3
  123. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  124. package/lib-commonjs/utils/toggleScrollListener.js +1 -3
  125. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  126. package/lib-commonjs/utils/useCallbackRef.js +1 -3
  127. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  128. package/lib-commonjs/utils/writeArrowUpdates.js +1 -3
  129. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  130. package/lib-commonjs/utils/writeContainerupdates.js +12 -5
  131. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  132. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/createArrowStyles.js"],"sourcesContent":["import { shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n * Helper that creates a makeStyles rule for an arrow element.\n * For runtime arrow size toggling simply create extra classnames to apply to the arrow element\n *\n * ```ts\n * makeStyles({\n * arrowWithSize: createArrowStyles({ arrowHeight: 6 }),\n *\n * arrowWithoutSize: createArrowStyles({ arrowHeight: undefined }),\n * mediumArrow: createArrowHeightStyles(4),\n * smallArrow: createArrowHeightStyles(2),\n * })\n * ...\n *\n * state.arrowWithSize.className = styles.arrowWithSize;\n * state.arrowWithoutSize.className = mergeClasses(\n * styles.arrowWithoutSize,\n * state.smallArrow && styles.smallArrow,\n * state.mediumArrow && styles.mediumArrow,\n * )\n * ```\n */\nexport function createArrowStyles(options) {\n const {\n arrowHeight,\n borderWidth = '1px',\n borderStyle = 'solid',\n borderColor = tokens.colorTransparentStroke\n } = options;\n return {\n position: 'absolute',\n backgroundColor: 'inherit',\n visibility: 'hidden',\n zIndex: -1,\n ...(arrowHeight && createArrowHeightStyles(arrowHeight)),\n '::before': {\n content: '\"\"',\n visibility: 'visible',\n position: 'absolute',\n boxSizing: 'border-box',\n width: 'inherit',\n height: 'inherit',\n backgroundColor: 'inherit',\n ...shorthands.borderRight(`${borderWidth} /* @noflip */`, `${borderStyle} /* @noflip */`, `${borderColor} /* @noflip */`),\n ...shorthands.borderBottom(borderWidth, borderStyle, borderColor),\n borderBottomRightRadius: tokens.borderRadiusSmall,\n transform: 'rotate(var(--angle)) translate(0, 50%) rotate(45deg)'\n },\n // Popper sets data-popper-placement on the root element, which is used to align the arrow\n ':global([data-popper-placement^=\"top\"])': {\n bottom: `-${borderWidth}`,\n '--angle': '0'\n },\n ':global([data-popper-placement^=\"right\"])': {\n left: `-${borderWidth} /* @noflip */`,\n '--angle': '90deg'\n },\n ':global([data-popper-placement^=\"bottom\"])': {\n top: `-${borderWidth}`,\n '--angle': '180deg'\n },\n ':global([data-popper-placement^=\"left\"])': {\n right: `-${borderWidth} /* @noflip */`,\n '--angle': '270deg'\n }\n };\n}\n/**\n * @internal\n * Creates CSS styles to size the arrow created by createArrowStyles to the given height.\n *\n * Use this when you need to create classes for several different arrow sizes. If you only need a\n * constant arrow size, you can pass the `arrowHeight` param to createArrowStyles instead.\n */\nexport function createArrowHeightStyles(arrowHeight) {\n // The arrow is a square rotated 45 degrees to have its bottom and right edges form a right triangle.\n // Multiply the triangle's height by sqrt(2) to get length of its edges.\n const edgeLength = `${1.414 * arrowHeight}px`;\n return {\n width: edgeLength,\n height: edgeLength\n };\n}\n//# sourceMappingURL=createArrowStyles.js.map"],"names":["createArrowStyles","createArrowHeightStyles","options","arrowHeight","borderWidth","borderStyle","borderColor","tokens","colorTransparentStroke","position","backgroundColor","visibility","zIndex","content","boxSizing","width","height","shorthands","borderRight","borderBottom","borderBottomRightRadius","borderRadiusSmall","transform","bottom","left","top","right","edgeLength"],"mappings":";;;;;;;;;;;IAyBgBA,iBAAiB,MAAjBA;IAoDAC,uBAAuB,MAAvBA;;uBA7EW;4BACJ;AAwBhB,SAASD,kBAAkBE,OAAO,EAAE;IACzC,MAAM,EACJC,YAAW,EACXC,aAAc,MAAK,EACnBC,aAAc,QAAO,EACrBC,aAAcC,kBAAM,CAACC,sBAAsB,CAAA,EAC5C,GAAGN;IACJ,OAAO;QACLO,UAAU;QACVC,iBAAiB;QACjBC,YAAY;QACZC,QAAQ,CAAC;QACT,GAAIT,eAAeF,wBAAwBE,YAAY;QACvD,YAAY;YACVU,SAAS;YACTF,YAAY;YACZF,UAAU;YACVK,WAAW;YACXC,OAAO;YACPC,QAAQ;YACRN,iBAAiB;YACjB,GAAGO,iBAAU,CAACC,WAAW,CAAC,CAAC,EAAEd,YAAY,cAAc,CAAC,EAAE,CAAC,EAAEC,YAAY,cAAc,CAAC,EAAE,CAAC,EAAEC,YAAY,cAAc,CAAC,CAAC;YACzH,GAAGW,iBAAU,CAACE,YAAY,CAACf,aAAaC,aAAaC,YAAY;YACjEc,yBAAyBb,kBAAM,CAACc,iBAAiB;YACjDC,WAAW;QACb;QACA,0FAA0F;QAC1F,2CAA2C;YACzCC,QAAQ,CAAC,CAAC,EAAEnB,YAAY,CAAC;YACzB,WAAW;QACb;QACA,6CAA6C;YAC3CoB,MAAM,CAAC,CAAC,EAAEpB,YAAY,cAAc,CAAC;YACrC,WAAW;QACb;QACA,8CAA8C;YAC5CqB,KAAK,CAAC,CAAC,EAAErB,YAAY,CAAC;YACtB,WAAW;QACb;QACA,4CAA4C;YAC1CsB,OAAO,CAAC,CAAC,EAAEtB,YAAY,cAAc,CAAC;YACtC,WAAW;QACb;IACF;AACF;AAQO,SAASH,wBAAwBE,WAAW,EAAE;IACnD,qGAAqG;IACrG,wEAAwE;IACxE,MAAMwB,aAAa,CAAC,EAAE,QAAQxB,YAAY,EAAE,CAAC;IAC7C,OAAO;QACLY,OAAOY;QACPX,QAAQW;IACV;AACF,EACA,6CAA6C"}
1
+ {"version":3,"sources":["createArrowStyles.js"],"sourcesContent":["import { shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n * Helper that creates a makeStyles rule for an arrow element.\n * For runtime arrow size toggling simply create extra classnames to apply to the arrow element\n *\n * ```ts\n * makeStyles({\n * arrowWithSize: createArrowStyles({ arrowHeight: 6 }),\n *\n * arrowWithoutSize: createArrowStyles({ arrowHeight: undefined }),\n * mediumArrow: createArrowHeightStyles(4),\n * smallArrow: createArrowHeightStyles(2),\n * })\n * ...\n *\n * state.arrowWithSize.className = styles.arrowWithSize;\n * state.arrowWithoutSize.className = mergeClasses(\n * styles.arrowWithoutSize,\n * state.smallArrow && styles.smallArrow,\n * state.mediumArrow && styles.mediumArrow,\n * )\n * ```\n */ export function createArrowStyles(options) {\n const { arrowHeight , borderWidth ='1px' , borderStyle ='solid' , borderColor =tokens.colorTransparentStroke } = options;\n return {\n position: 'absolute',\n backgroundColor: 'inherit',\n visibility: 'hidden',\n zIndex: -1,\n ...arrowHeight && createArrowHeightStyles(arrowHeight),\n '::before': {\n content: '\"\"',\n visibility: 'visible',\n position: 'absolute',\n boxSizing: 'border-box',\n width: 'inherit',\n height: 'inherit',\n backgroundColor: 'inherit',\n ...shorthands.borderRight(`${borderWidth} /* @noflip */`, `${borderStyle} /* @noflip */`, `${borderColor} /* @noflip */`),\n ...shorthands.borderBottom(borderWidth, borderStyle, borderColor),\n borderBottomRightRadius: tokens.borderRadiusSmall,\n transform: 'rotate(var(--angle)) translate(0, 50%) rotate(45deg)'\n },\n // Popper sets data-popper-placement on the root element, which is used to align the arrow\n ':global([data-popper-placement^=\"top\"])': {\n bottom: `-${borderWidth}`,\n '--angle': '0'\n },\n ':global([data-popper-placement^=\"right\"])': {\n left: `-${borderWidth} /* @noflip */`,\n '--angle': '90deg'\n },\n ':global([data-popper-placement^=\"bottom\"])': {\n top: `-${borderWidth}`,\n '--angle': '180deg'\n },\n ':global([data-popper-placement^=\"left\"])': {\n right: `-${borderWidth} /* @noflip */`,\n '--angle': '270deg'\n }\n };\n}\n/**\n * @internal\n * Creates CSS styles to size the arrow created by createArrowStyles to the given height.\n *\n * Use this when you need to create classes for several different arrow sizes. If you only need a\n * constant arrow size, you can pass the `arrowHeight` param to createArrowStyles instead.\n */ export function createArrowHeightStyles(arrowHeight) {\n // The arrow is a square rotated 45 degrees to have its bottom and right edges form a right triangle.\n // Multiply the triangle's height by sqrt(2) to get length of its edges.\n const edgeLength = `${1.414 * arrowHeight}px`;\n return {\n width: edgeLength,\n height: edgeLength\n };\n}\n"],"names":["createArrowStyles","createArrowHeightStyles","options","arrowHeight","borderWidth","borderStyle","borderColor","tokens","colorTransparentStroke","position","backgroundColor","visibility","zIndex","content","boxSizing","width","height","shorthands","borderRight","borderBottom","borderBottomRightRadius","borderRadiusSmall","transform","bottom","left","top","right","edgeLength"],"mappings":";;;;;;;;;;;IAwBoBA,iBAAiB,MAAjBA;IA8CAC,uBAAuB,MAAvBA;;uBAtEO;4BACJ;AAuBZ,SAASD,kBAAkBE,OAAO,EAAE;IAC3C,MAAM,EAAEC,YAAW,EAAGC,aAAa,MAAK,EAAGC,aAAa,QAAO,EAAGC,aAAaC,kBAAM,CAACC,sBAAsB,CAAA,EAAG,GAAGN;IAClH,OAAO;QACHO,UAAU;QACVC,iBAAiB;QACjBC,YAAY;QACZC,QAAQ,CAAC;QACT,GAAGT,eAAeF,wBAAwBE,YAAY;QACtD,YAAY;YACRU,SAAS;YACTF,YAAY;YACZF,UAAU;YACVK,WAAW;YACXC,OAAO;YACPC,QAAQ;YACRN,iBAAiB;YACjB,GAAGO,iBAAU,CAACC,WAAW,CAAC,CAAC,EAAEd,YAAY,cAAc,CAAC,EAAE,CAAC,EAAEC,YAAY,cAAc,CAAC,EAAE,CAAC,EAAEC,YAAY,cAAc,CAAC,CAAC;YACzH,GAAGW,iBAAU,CAACE,YAAY,CAACf,aAAaC,aAAaC,YAAY;YACjEc,yBAAyBb,kBAAM,CAACc,iBAAiB;YACjDC,WAAW;QACf;QACA,0FAA0F;QAC1F,2CAA2C;YACvCC,QAAQ,CAAC,CAAC,EAAEnB,YAAY,CAAC;YACzB,WAAW;QACf;QACA,6CAA6C;YACzCoB,MAAM,CAAC,CAAC,EAAEpB,YAAY,cAAc,CAAC;YACrC,WAAW;QACf;QACA,8CAA8C;YAC1CqB,KAAK,CAAC,CAAC,EAAErB,YAAY,CAAC;YACtB,WAAW;QACf;QACA,4CAA4C;YACxCsB,OAAO,CAAC,CAAC,EAAEtB,YAAY,cAAc,CAAC;YACtC,WAAW;QACf;IACJ;AACJ;AAOW,SAASH,wBAAwBE,WAAW,EAAE;IACrD,qGAAqG;IACrG,wEAAwE;IACxE,MAAMwB,aAAa,CAAC,EAAE,QAAQxB,YAAY,EAAE,CAAC;IAC7C,OAAO;QACHY,OAAOY;QACPX,QAAQW;IACZ;AACJ"}
@@ -10,7 +10,7 @@ const _dom = require("@floating-ui/dom");
10
10
  const _utils = require("./utils");
11
11
  const _reactUtilities = require("@fluentui/react-utilities");
12
12
  function createPositionManager(options) {
13
- const { container , target , arrow , strategy , middleware , placement } = options;
13
+ const { container , target , arrow , strategy , middleware , placement , useTransform =true } = options;
14
14
  let isDestroyed = false;
15
15
  if (!target || !container) {
16
16
  return {
@@ -71,7 +71,8 @@ function createPositionManager(options) {
71
71
  y
72
72
  },
73
73
  lowPPI: ((targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.devicePixelRatio) || 1) <= 1,
74
- strategy
74
+ strategy,
75
+ useTransform
75
76
  });
76
77
  }).catch((err)=>{
77
78
  // https://github.com/floating-ui/floating-ui/issues/1845
@@ -108,6 +109,4 @@ function createPositionManager(options) {
108
109
  updatePosition,
109
110
  dispose
110
111
  };
111
- } //# sourceMappingURL=createPositionManager.js.map
112
-
113
- //# sourceMappingURL=createPositionManager.js.map
112
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/createPositionManager.js"],"sourcesContent":["import { computePosition } from '@floating-ui/dom';\nimport { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from './utils';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n/**\n * @internal\n * @returns manager that handles positioning out of the react lifecycle\n */\nexport function createPositionManager(options) {\n const {\n container,\n target,\n arrow,\n strategy,\n middleware,\n placement\n } = options;\n let isDestroyed = false;\n if (!target || !container) {\n return {\n updatePosition: () => undefined,\n dispose: () => undefined\n };\n }\n let isFirstUpdate = true;\n const scrollParents = new Set();\n const targetWindow = container.ownerDocument.defaultView;\n // When the container is first resolved, set position `fixed` to avoid scroll jumps.\n // Without this scroll jumps can occur when the element is rendered initially and receives focus\n Object.assign(container.style, {\n position: 'fixed',\n left: 0,\n top: 0,\n margin: 0\n });\n const forceUpdate = () => {\n // debounced update can still occur afterwards\n // early return to avoid memory leaks\n if (isDestroyed) {\n return;\n }\n if (isFirstUpdate) {\n scrollParents.add(getScrollParent(container));\n if (isHTMLElement(target)) {\n scrollParents.add(getScrollParent(target));\n }\n scrollParents.forEach(scrollParent => {\n scrollParent.addEventListener('scroll', updatePosition);\n });\n isFirstUpdate = false;\n }\n Object.assign(container.style, {\n position: strategy\n });\n computePosition(target, container, {\n placement,\n middleware,\n strategy\n }).then(({\n x,\n y,\n middlewareData,\n placement: computedPlacement\n }) => {\n // Promise can still resolve after destruction\n // early return to avoid applying outdated position\n if (isDestroyed) {\n return;\n }\n writeArrowUpdates({\n arrow,\n middlewareData\n });\n writeContainerUpdates({\n container,\n middlewareData,\n placement: computedPlacement,\n coordinates: {\n x,\n y\n },\n lowPPI: ((targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.devicePixelRatio) || 1) <= 1,\n strategy\n });\n }).catch(err => {\n // https://github.com/floating-ui/floating-ui/issues/1845\n // FIXME for node > 14\n // node 15 introduces promise rejection which means that any components\n // tests need to be `it('', async () => {})` otherwise there can be race conditions with\n // JSDOM being torn down before this promise is resolved so globals like `window` and `document` don't exist\n // Unless all tests that ever use `usePositioning` are turned into async tests, any logging during testing\n // will actually be counter productive\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error('[usePositioning]: Failed to calculate position', err);\n }\n });\n };\n const updatePosition = debounce(() => forceUpdate());\n const dispose = () => {\n isDestroyed = true;\n if (targetWindow) {\n targetWindow.removeEventListener('scroll', updatePosition);\n targetWindow.removeEventListener('resize', updatePosition);\n }\n scrollParents.forEach(scrollParent => {\n scrollParent.removeEventListener('scroll', updatePosition);\n });\n };\n if (targetWindow) {\n targetWindow.addEventListener('scroll', updatePosition);\n targetWindow.addEventListener('resize', updatePosition);\n }\n // Update the position on initialization\n updatePosition();\n return {\n updatePosition,\n dispose\n };\n}\n//# sourceMappingURL=createPositionManager.js.map"],"names":["createPositionManager","options","container","target","arrow","strategy","middleware","placement","isDestroyed","updatePosition","undefined","dispose","isFirstUpdate","scrollParents","Set","targetWindow","ownerDocument","defaultView","Object","assign","style","position","left","top","margin","forceUpdate","add","getScrollParent","isHTMLElement","forEach","scrollParent","addEventListener","computePosition","then","x","y","middlewareData","computedPlacement","writeArrowUpdates","writeContainerUpdates","coordinates","lowPPI","devicePixelRatio","catch","err","process","env","NODE_ENV","console","error","debounce","removeEventListener"],"mappings":";;;;+BAOgBA;;aAAAA;;qBAPgB;uBACoD;gCACtD;AAKvB,SAASA,sBAAsBC,OAAO,EAAE;IAC7C,MAAM,EACJC,UAAS,EACTC,OAAM,EACNC,MAAK,EACLC,SAAQ,EACRC,WAAU,EACVC,UAAS,EACV,GAAGN;IACJ,IAAIO,cAAc,KAAK;IACvB,IAAI,CAACL,UAAU,CAACD,WAAW;QACzB,OAAO;YACLO,gBAAgB,IAA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AAA,KAAM;gBAC9GrC;YACF;QACF,GAAGsC,KAAK,CAACC,CAAAA,MAAO;YACd,yDAAyD;YACzD,sBAAsB;YACtB,uEAAuE;YACvE,wFAAwF;YACxF,4GAA4G;YAC5G,0GAA0G;YAC1G,sCAAsC;YACtC,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;gBAC1C,sCAAsC;gBACtCC,QAAQC,KAAK,CAAC,kDAAkDL;YAClE,CAAC;QACH;IACF;IACA,MAAMnC,iBAAiByC,IAAAA,eAAQ,EAAC,IAAMzB;IACtC,MAAMd,UAAU,IAAM;QACpBH,cAAc,IAAI;QAClB,IAAIO,cAAc;YAChBA,aAAaoC,mBAAmB,CAAC,UAAU1C;YAC3CM,aAAaoC,mBAAmB,CAAC,UAAU1C;QAC7C,CAAC;QACDI,cAAcgB,OAAO,CAACC,CAAAA,eAAgB;YACpCA,aAAaqB,mBAAmB,CAAC,UAAU1C;QAC7C;IACF;IACA,IAAIM,cAAc;QAChBA,aAAagB,gBAAgB,CAAC,UAAUtB;QACxCM,aAAagB,gBAAgB,CAAC,UAAUtB;IAC1C,CAAC;IACD,wCAAwC;IACxCA;IACA,OAAO;QACLA;QACAE;IACF;AACF,EACA,iDAAiD"}
1
+ {"version":3,"sources":["createPositionManager.js"],"sourcesContent":["import { computePosition } from '@floating-ui/dom';\nimport { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from './utils';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n/**\n * @internal\n * @returns manager that handles positioning out of the react lifecycle\n */ export function createPositionManager(options) {\n const { container , target , arrow , strategy , middleware , placement , useTransform =true } = options;\n let isDestroyed = false;\n if (!target || !container) {\n return {\n updatePosition: ()=>undefined,\n dispose: ()=>undefined\n };\n }\n let isFirstUpdate = true;\n const scrollParents = new Set();\n const targetWindow = container.ownerDocument.defaultView;\n // When the container is first resolved, set position `fixed` to avoid scroll jumps.\n // Without this scroll jumps can occur when the element is rendered initially and receives focus\n Object.assign(container.style, {\n position: 'fixed',\n left: 0,\n top: 0,\n margin: 0\n });\n const forceUpdate = ()=>{\n // debounced update can still occur afterwards\n // early return to avoid memory leaks\n if (isDestroyed) {\n return;\n }\n if (isFirstUpdate) {\n scrollParents.add(getScrollParent(container));\n if (isHTMLElement(target)) {\n scrollParents.add(getScrollParent(target));\n }\n scrollParents.forEach((scrollParent)=>{\n scrollParent.addEventListener('scroll', updatePosition);\n });\n isFirstUpdate = false;\n }\n Object.assign(container.style, {\n position: strategy\n });\n computePosition(target, container, {\n placement,\n middleware,\n strategy\n }).then(({ x , y , middlewareData , placement: computedPlacement })=>{\n // Promise can still resolve after destruction\n // early return to avoid applying outdated position\n if (isDestroyed) {\n return;\n }\n writeArrowUpdates({\n arrow,\n middlewareData\n });\n writeContainerUpdates({\n container,\n middlewareData,\n placement: computedPlacement,\n coordinates: {\n x,\n y\n },\n lowPPI: ((targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.devicePixelRatio) || 1) <= 1,\n strategy,\n useTransform\n });\n }).catch((err)=>{\n // https://github.com/floating-ui/floating-ui/issues/1845\n // FIXME for node > 14\n // node 15 introduces promise rejection which means that any components\n // tests need to be `it('', async () => {})` otherwise there can be race conditions with\n // JSDOM being torn down before this promise is resolved so globals like `window` and `document` don't exist\n // Unless all tests that ever use `usePositioning` are turned into async tests, any logging during testing\n // will actually be counter productive\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error('[usePositioning]: Failed to calculate position', err);\n }\n });\n };\n const updatePosition = debounce(()=>forceUpdate());\n const dispose = ()=>{\n isDestroyed = true;\n if (targetWindow) {\n targetWindow.removeEventListener('scroll', updatePosition);\n targetWindow.removeEventListener('resize', updatePosition);\n }\n scrollParents.forEach((scrollParent)=>{\n scrollParent.removeEventListener('scroll', updatePosition);\n });\n };\n if (targetWindow) {\n targetWindow.addEventListener('scroll', updatePosition);\n targetWindow.addEventListener('resize', updatePosition);\n }\n // Update the position on initialization\n updatePosition();\n return {\n updatePosition,\n dispose\n };\n}\n"],"names":["createPositionManager","options","container","target","arrow","strategy","middleware","placement","useTransform","isDestroyed","updatePosition","undefined","dispose","isFirstUpdate","scrollParents","Set","targetWindow","ownerDocument","defaultView","Object","assign","style","position","left","top","margin","forceUpdate","add","getScrollParent","isHTMLElement","forEach","scrollParent","addEventListener","computePosition","then","x","y","middlewareData","computedPlacement","writeArrowUpdates","writeContainerUpdates","coordinates","lowPPI","devicePixelRatio","catch","err","process","env","NODE_ENV","console","error","debounce","removeEventListener"],"mappings":";;;;+BAMoBA;;aAAAA;;qBANY;uBACoD;gCACtD;AAInB,SAASA,sBAAsBC,OAAO,EAAE;IAC/C,MAAM,EAAEC,UAAS,EAAGC,OAAM,EAAGC,MAAK,EAAGC,SAAQ,EAAGC,WAAU,EAAGC,UAAS,EAAGC,cAAc,IAAI,CAAA,EAAG,GAAGP;IACjG,IAAIQ,cAAc,KAAK;IACvB,IAAI,CAACN,UAAU,CAACD,WAAW;QACvB,OAAO;YACHQ,gBAAgB,IAAIC;YACpBC,SAAS,IAAID;QACjB;IACJ,CAAC;IACD,IAAIE,gBAAgB,IAAI;IACxB,MAAMC,gBAAgB,IAAIC;IAC1B,MAAMC,eAAed,UAAUe,aAAa,CAACC,WAAW;IACxD,oFAAoF;IACpF,gGAAgG;IAChGC,OAAOC,MAAM,CAAClB,UAAUmB,KAAK,EAAE;QAC3BC,UAAU;QACVC,MAAM;QACNC,KAAK;QACLC,QAAQ;IACZ;IACA,MAAMC,cAAc,IAAI;QACpB,8CAA8C;QAC9C,qCAAqC;QACrC,IAAIjB,aAAa;YACb;QACJ,CAAC;QACD,IAAII,eAAe;YACfC,cAAca,GAAG,CAACC,IAAAA,sBAAe,EAAC1B;YAClC,IAAI2B,IAAAA,6BAAa,EAAC1B,SAAS;gBACvBW,cAAca,GAAG,CAACC,IAAAA,sBAAe,EAACzB;YACtC,CAAC;YACDW,cAAcgB,OAAO,CAAC,CAACC,eAAe;gBAClCA,aAAaC,gBAAgB,CAAC,U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;IACA,IAAIM,cAAc;QACdA,aAAagB,gBAAgB,CAAC,UAAUtB;QACxCM,aAAagB,gBAAgB,CAAC,UAAUtB;IAC5C,CAAC;IACD,wCAAwC;IACxCA;IACA,OAAO;QACHA;QACAE;IACJ;AACJ"}
@@ -29,6 +29,4 @@ function createVirtualElementFromClick(nativeEvent) {
29
29
  return {
30
30
  getBoundingClientRect
31
31
  };
32
- } //# sourceMappingURL=createVirtualElementFromClick.js.map
33
-
34
- //# sourceMappingURL=createVirtualElementFromClick.js.map
32
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/createVirtualElementFromClick.js"],"sourcesContent":["/**\n * Creates a virtual element based on the position of a click event\n * Can be used as a target for popper in scenarios such as context menus\n */export function createVirtualElementFromClick(nativeEvent) {\n const left = nativeEvent.clientX;\n const top = nativeEvent.clientY;\n const right = left + 1;\n const bottom = top + 1;\n function getBoundingClientRect() {\n return {\n left,\n top,\n right,\n bottom,\n x: left,\n y: top,\n height: 1,\n width: 1\n };\n }\n return {\n getBoundingClientRect\n };\n}\n//# sourceMappingURL=createVirtualElementFromClick.js.map"],"names":["createVirtualElementFromClick","nativeEvent","left","clientX","top","clientY","right","bottom","getBoundingClientRect","x","y","height","width"],"mappings":"AAAA;;;CAGC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,8BAA8BC,WAAW,EAAE;IAC5D,MAAMC,OAAOD,YAAYE,OAAO;IAChC,MAAMC,MAAMH,YAAYI,OAAO;IAC/B,MAAMC,QAAQJ,OAAO;IACrB,MAAMK,SAASH,MAAM;IACrB,SAASI,wBAAwB;QAC/B,OAAO;YACLN;YACAE;YACAE;YACAC;YACAE,GAAGP;YACHQ,GAAGN;YACHO,QAAQ;YACRC,OAAO;QACT;IACF;IACA,OAAO;QACLJ;IACF;AACF,EACA,yDAAyD"}
1
+ {"version":3,"sources":["createVirtualElementFromClick.js"],"sourcesContent":["/**\n * Creates a virtual element based on the position of a click event\n * Can be used as a target for popper in scenarios such as context menus\n */ export function createVirtualElementFromClick(nativeEvent) {\n const left = nativeEvent.clientX;\n const top = nativeEvent.clientY;\n const right = left + 1;\n const bottom = top + 1;\n function getBoundingClientRect() {\n return {\n left,\n top,\n right,\n bottom,\n x: left,\n y: top,\n height: 1,\n width: 1\n };\n }\n return {\n getBoundingClientRect\n };\n}\n"],"names":["createVirtualElementFromClick","nativeEvent","left","clientX","top","clientY","right","bottom","getBoundingClientRect","x","y","height","width"],"mappings":"AAAA;;;CAGC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,8BAA8BC,WAAW,EAAE;IAC3D,MAAMC,OAAOD,YAAYE,OAAO;IAChC,MAAMC,MAAMH,YAAYI,OAAO;IAC/B,MAAMC,QAAQJ,OAAO;IACrB,MAAMK,SAASH,MAAM;IACrB,SAASI,wBAAwB;QAC7B,OAAO;YACHN;YACAE;YACAE;YACAC;YACAE,GAAGP;YACHQ,GAAGN;YACHO,QAAQ;YACRC,OAAO;QACX;IACJ;IACA,OAAO;QACHJ;IACJ;AACJ"}
@@ -22,6 +22,3 @@ const _createArrowStyles = require("./createArrowStyles");
22
22
  const _usePositioning = require("./usePositioning");
23
23
  const _usePositioningMouseTarget = require("./usePositioningMouseTarget");
24
24
  const _index = require("./utils/index");
25
- //# sourceMappingURL=index.js.map
26
-
27
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { createVirtualElementFromClick } from './createVirtualElementFromClick';\nexport { createArrowHeightStyles, createArrowStyles } from './createArrowStyles';\nexport { usePositioning } from './usePositioning';\nexport { usePositioningMouseTarget } from './usePositioningMouseTarget';\nexport { resolvePositioningShorthand, mergeArrowOffset } from './utils/index';\n//# sourceMappingURL=index.js.map"],"names":["createVirtualElementFromClick","createArrowHeightStyles","createArrowStyles","usePositioning","usePositioningMouseTarget","resolvePositioningShorthand","mergeArrowOffset"],"mappings":";;;;;;;;;;;IAASA,6BAA6B,MAA7BA,4DAA6B;IAC7BC,uBAAuB,MAAvBA,0CAAuB;IAAEC,iBAAiB,MAAjBA,oCAAiB;IAC1CC,cAAc,MAAdA,8BAAc;IACdC,yBAAyB,MAAzBA,oDAAyB;IACzBC,2BAA2B,MAA3BA,kCAA2B;IAAEC,gBAAgB,MAAhBA,uBAAgB;;+CAJR;mCACa;gCAC5B;2CACW;uBACoB;CAC9D,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { createVirtualElementFromClick } from './createVirtualElementFromClick';\nexport { createArrowHeightStyles, createArrowStyles } from './createArrowStyles';\nexport { usePositioning } from './usePositioning';\nexport { usePositioningMouseTarget } from './usePositioningMouseTarget';\nexport { resolvePositioningShorthand, mergeArrowOffset } from './utils/index';\n"],"names":["createVirtualElementFromClick","createArrowHeightStyles","createArrowStyles","usePositioning","usePositioningMouseTarget","resolvePositioningShorthand","mergeArrowOffset"],"mappings":";;;;;;;;;;;IAASA,6BAA6B,MAA7BA,4DAA6B;IAC7BC,uBAAuB,MAAvBA,0CAAuB;IAAEC,iBAAiB,MAAjBA,oCAAiB;IAC1CC,cAAc,MAAdA,8BAAc;IACdC,yBAAyB,MAAzBA,oDAAyB;IACzBC,2BAA2B,MAA3BA,kCAA2B;IAAEC,gBAAgB,MAAhBA,uBAAgB;;+CAJR;mCACa;gCAC5B;2CACW;uBACoB"}
@@ -34,6 +34,4 @@ function coverTarget() {
34
34
  return newCoords;
35
35
  }
36
36
  };
37
- } //# sourceMappingURL=coverTarget.js.map
38
-
39
- //# sourceMappingURL=coverTarget.js.map
37
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/coverTarget.js"],"sourcesContent":["import { parseFloatingUIPlacement } from '../utils/index';\nexport function coverTarget() {\n return {\n name: 'coverTarget',\n fn: middlewareArguments => {\n const {\n placement,\n rects,\n x,\n y\n } = middlewareArguments;\n const basePlacement = parseFloatingUIPlacement(placement).side;\n const newCoords = {\n x,\n y\n };\n switch (basePlacement) {\n case 'bottom':\n newCoords.y -= rects.reference.height;\n break;\n case 'top':\n newCoords.y += rects.reference.height;\n break;\n case 'left':\n newCoords.x += rects.reference.width;\n break;\n case 'right':\n newCoords.x -= rects.reference.width;\n break;\n }\n return newCoords;\n }\n };\n}\n//# sourceMappingURL=coverTarget.js.map"],"names":["coverTarget","name","fn","middlewareArguments","placement","rects","x","y","basePlacement","parseFloatingUIPlacement","side","newCoords","reference","height","width"],"mappings":";;;;+BACgBA;;aAAAA;;uBADyB;AAClC,SAASA,cAAc;IAC5B,OAAO;QACLC,MAAM;QACNC,IAAIC,CAAAA,sBAAuB;YACzB,MAAM,EACJC,UAAS,EACTC,MAAK,EACLC,EAAC,EACDC,EAAC,EACF,GAAGJ;YACJ,MAAMK,gBAAgBC,IAAAA,+BAAwB,EAACL,WAAWM,IAAI;YAC9D,MAAMC,YAAY;gBAChBL;gBACAC;YACF;YACA,OAAQC;gBACN,KAAK;oBACHG,UAAUJ,CAAC,IAAIF,MAAMO,SAAS,CAACC,MAAM;oBACrC,KAAM;gBACR,KAAK;oBACHF,UAAUJ,CAAC,IAAIF,MAAMO,SAAS,CAACC,MAAM;oBACrC,KAAM;gBACR,KAAK;oBACHF,UAAUL,CAAC,IAAID,MAAMO,SAAS,CAACE,KAAK;oBACpC,KAAM;gBACR,KAAK;oBACHH,UAAUL,CAAC,IAAID,MAAMO,SAAS,CAACE,KAAK;oBACpC,KAAM;YACV;YACA,OAAOH;QACT;IACF;AACF,EACA,uCAAuC"}
1
+ {"version":3,"sources":["coverTarget.js"],"sourcesContent":["import { parseFloatingUIPlacement } from '../utils/index';\nexport function coverTarget() {\n return {\n name: 'coverTarget',\n fn: (middlewareArguments)=>{\n const { placement , rects , x , y } = middlewareArguments;\n const basePlacement = parseFloatingUIPlacement(placement).side;\n const newCoords = {\n x,\n y\n };\n switch(basePlacement){\n case 'bottom':\n newCoords.y -= rects.reference.height;\n break;\n case 'top':\n newCoords.y += rects.reference.height;\n break;\n case 'left':\n newCoords.x += rects.reference.width;\n break;\n case 'right':\n newCoords.x -= rects.reference.width;\n break;\n }\n return newCoords;\n }\n };\n}\n"],"names":["coverTarget","name","fn","middlewareArguments","placement","rects","x","y","basePlacement","parseFloatingUIPlacement","side","newCoords","reference","height","width"],"mappings":";;;;+BACgBA;;aAAAA;;uBADyB;AAClC,SAASA,cAAc;IAC1B,OAAO;QACHC,MAAM;QACNC,IAAI,CAACC,sBAAsB;YACvB,MAAM,EAAEC,UAAS,EAAGC,MAAK,EAAGC,EAAC,EAAGC,EAAC,EAAG,GAAGJ;YACvC,MAAMK,gBAAgBC,IAAAA,+BAAwB,EAACL,WAAWM,IAAI;YAC9D,MAAMC,YAAY;gBACdL;gBACAC;YACJ;YACA,OAAOC;gBACH,KAAK;oBACDG,UAAUJ,CAAC,IAAIF,MAAMO,SAAS,CAACC,MAAM;oBACrC,KAAM;gBACV,KAAK;oBACDF,UAAUJ,CAAC,IAAIF,MAAMO,SAAS,CAACC,MAAM;oBACrC,KAAM;gBACV,KAAK;oBACDF,UAAUL,CAAC,IAAID,MAAMO,SAAS,CAACE,KAAK;oBACpC,KAAM;gBACV,KAAK;oBACDH,UAAUL,CAAC,IAAID,MAAMO,SAAS,CAACE,KAAK;oBACpC,KAAM;YACd;YACA,OAAOH;QACX;IACJ;AACJ"}
@@ -31,6 +31,4 @@ function flip(options) {
31
31
  fallbackPlacements
32
32
  }
33
33
  });
34
- } //# sourceMappingURL=flip.js.map
35
-
36
- //# sourceMappingURL=flip.js.map
34
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/flip.js"],"sourcesContent":["import { flip as baseFlip } from '@floating-ui/dom';\nimport { getBoundary, resolvePositioningShorthand, toFloatingUIPlacement } from '../utils/index';\nexport function flip(options) {\n const {\n hasScrollableElement,\n flipBoundary,\n container,\n fallbackPositions = [],\n isRtl\n } = options;\n const fallbackPlacements = fallbackPositions.reduce((acc, shorthand) => {\n const {\n position,\n align\n } = resolvePositioningShorthand(shorthand);\n const placement = toFloatingUIPlacement(align, position, isRtl);\n if (placement) {\n acc.push(placement);\n }\n return acc;\n }, []);\n return baseFlip({\n ...(hasScrollableElement && {\n boundary: 'clippingAncestors'\n }),\n ...(flipBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, flipBoundary)\n }),\n fallbackStrategy: 'bestFit',\n ...(fallbackPlacements.length && {\n fallbackPlacements\n })\n });\n}\n//# sourceMappingURL=flip.js.map"],"names":["flip","options","hasScrollableElement","flipBoundary","container","fallbackPositions","isRtl","fallbackPlacements","reduce","acc","shorthand","position","align","resolvePositioningShorthand","placement","toFloatingUIPlacement","push","baseFlip","boundary","altBoundary","getBoundary","fallbackStrategy","length"],"mappings":";;;;+BAEgBA;;aAAAA;;qBAFiB;uBAC+C;AACzE,SAASA,KAAKC,OAAO,EAAE;IAC5B,MAAM,EACJC,qBAAoB,EACpBC,aAAY,EACZC,UAAS,EACTC,mBAAoB,EAAE,CAAA,EACtBC,MAAK,EACN,GAAGL;IACJ,MAAMM,qBAAqBF,kBAAkBG,MAAM,CAAC,CAACC,KAAKC,YAAc;QACtE,MAAM,EACJC,SAAQ,EACRC,MAAK,EACN,GAAGC,IAAAA,kCAA2B,EAACH;QAChC,MAAMI,YAAYC,IAAAA,4BAAqB,EAACH,OAAOD,UAAUL;QACzD,IAAIQ,WAAW;YACbL,IAAIO,IAAI,CAACF;QACX,CAAC;QACD,OAAOL;IACT,GAAG,EAAE;IACL,OAAOQ,IAAAA,SAAQ,EAAC;QACd,GAAIf,wBAAwB;YAC1BgB,UAAU;QACZ,CAAC;QACD,GAAIf,gBAAgB;YAClBgB,aAAa,IAAI;YACjBD,UAAUE,IAAAA,kBAAW,EAAChB,WAAWD;QACnC,CAAC;QACDkB,kBAAkB;QAClB,GAAId,mBAAmBe,MAAM,IAAI;YAC/Bf;QACF,CAAC;IACH;AACF,EACA,gCAAgC"}
1
+ {"version":3,"sources":["flip.js"],"sourcesContent":["import { flip as baseFlip } from '@floating-ui/dom';\nimport { getBoundary, resolvePositioningShorthand, toFloatingUIPlacement } from '../utils/index';\nexport function flip(options) {\n const { hasScrollableElement , flipBoundary , container , fallbackPositions =[] , isRtl } = options;\n const fallbackPlacements = fallbackPositions.reduce((acc, shorthand)=>{\n const { position , align } = resolvePositioningShorthand(shorthand);\n const placement = toFloatingUIPlacement(align, position, isRtl);\n if (placement) {\n acc.push(placement);\n }\n return acc;\n }, []);\n return baseFlip({\n ...hasScrollableElement && {\n boundary: 'clippingAncestors'\n },\n ...flipBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, flipBoundary)\n },\n fallbackStrategy: 'bestFit',\n ...fallbackPlacements.length && {\n fallbackPlacements\n }\n });\n}\n"],"names":["flip","options","hasScrollableElement","flipBoundary","container","fallbackPositions","isRtl","fallbackPlacements","reduce","acc","shorthand","position","align","resolvePositioningShorthand","placement","toFloatingUIPlacement","push","baseFlip","boundary","altBoundary","getBoundary","fallbackStrategy","length"],"mappings":";;;;+BAEgBA;;aAAAA;;qBAFiB;uBAC+C;AACzE,SAASA,KAAKC,OAAO,EAAE;IAC1B,MAAM,EAAEC,qBAAoB,EAAGC,aAAY,EAAGC,UAAS,EAAGC,mBAAmB,EAAE,CAAA,EAAGC,MAAK,EAAG,GAAGL;IAC7F,MAAMM,qBAAqBF,kBAAkBG,MAAM,CAAC,CAACC,KAAKC,YAAY;QAClE,MAAM,EAAEC,SAAQ,EAAGC,MAAK,EAAG,GAAGC,IAAAA,kCAA2B,EAACH;QAC1D,MAAMI,YAAYC,IAAAA,4BAAqB,EAACH,OAAOD,UAAUL;QACzD,IAAIQ,WAAW;YACXL,IAAIO,IAAI,CAACF;QACb,CAAC;QACD,OAAOL;IACX,GAAG,EAAE;IACL,OAAOQ,IAAAA,SAAQ,EAAC;QACZ,GAAGf,wBAAwB;YACvBgB,UAAU;QACd,CAAC;QACD,GAAGf,gBAAgB;YACfgB,aAAa,IAAI;YACjBD,UAAUE,IAAAA,kBAAW,EAAChB,WAAWD;QACrC,CAAC;QACDkB,kBAAkB;QAClB,GAAGd,mBAAmBe,MAAM,IAAI;YAC5Bf;QACJ,CAAC;IACL;AACJ"}
@@ -9,6 +9,3 @@ _exportStar(require("./intersecting"), exports);
9
9
  _exportStar(require("./maxSize"), exports);
10
10
  _exportStar(require("./offset"), exports);
11
11
  _exportStar(require("./shift"), exports);
12
- //# sourceMappingURL=index.js.map
13
-
14
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/index.js"],"sourcesContent":["export * from './coverTarget';\nexport * from './flip';\nexport * from './intersecting';\nexport * from './maxSize';\nexport * from './offset';\nexport * from './shift';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './coverTarget';\nexport * from './flip';\nexport * from './intersecting';\nexport * from './maxSize';\nexport * from './offset';\nexport * from './shift';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA"}
@@ -25,6 +25,4 @@ function intersecting() {
25
25
  };
26
26
  }
27
27
  };
28
- } //# sourceMappingURL=intersecting.js.map
29
-
30
- //# sourceMappingURL=intersecting.js.map
28
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/intersecting.js"],"sourcesContent":["import { detectOverflow } from '@floating-ui/dom';\nexport function intersecting() {\n return {\n name: 'intersectionObserver',\n fn: async middlewareArguments => {\n const floatingRect = middlewareArguments.rects.floating;\n const altOverflow = await detectOverflow(middlewareArguments, {\n altBoundary: true\n });\n const isIntersectingTop = altOverflow.top < floatingRect.height && altOverflow.top > 0;\n const isIntersectingBottom = altOverflow.bottom < floatingRect.height && altOverflow.bottom > 0;\n const isIntersecting = isIntersectingTop || isIntersectingBottom;\n return {\n data: {\n intersecting: isIntersecting\n }\n };\n }\n };\n}\n//# sourceMappingURL=intersecting.js.map"],"names":["intersecting","name","fn","middlewareArguments","floatingRect","rects","floating","altOverflow","detectOverflow","altBoundary","isIntersectingTop","top","height","isIntersectingBottom","bottom","isIntersecting","data"],"mappings":";;;;+BACgBA;;aAAAA;;qBADe;AACxB,SAASA,eAAe;IAC7B,OAAO;QACLC,MAAM;QACNC,IAAI,OAAMC,sBAAuB;YAC/B,MAAMC,eAAeD,oBAAoBE,KAAK,CAACC,QAAQ;YACvD,MAAMC,cAAc,MAAMC,IAAAA,mBAAc,EAACL,qBAAqB;gBAC5DM,aAAa,IAAI;YACnB;YACA,MAAMC,oBAAoBH,YAAYI,GAAG,GAAGP,aAAaQ,MAAM,IAAIL,YAAYI,GAAG,GAAG;YACrF,MAAME,uBAAuBN,YAAYO,MAAM,GAAGV,aAAaQ,MAAM,IAAIL,YAAYO,MAAM,GAAG;YAC9F,MAAMC,iBAAiBL,qBAAqBG;YAC5C,OAAO;gBACLG,MAAM;oBACJhB,cAAce;gBAChB;YACF;QACF;IACF;AACF,EACA,wCAAwC"}
1
+ {"version":3,"sources":["intersecting.js"],"sourcesContent":["import { detectOverflow } from '@floating-ui/dom';\nexport function intersecting() {\n return {\n name: 'intersectionObserver',\n fn: async (middlewareArguments)=>{\n const floatingRect = middlewareArguments.rects.floating;\n const altOverflow = await detectOverflow(middlewareArguments, {\n altBoundary: true\n });\n const isIntersectingTop = altOverflow.top < floatingRect.height && altOverflow.top > 0;\n const isIntersectingBottom = altOverflow.bottom < floatingRect.height && altOverflow.bottom > 0;\n const isIntersecting = isIntersectingTop || isIntersectingBottom;\n return {\n data: {\n intersecting: isIntersecting\n }\n };\n }\n };\n}\n"],"names":["intersecting","name","fn","middlewareArguments","floatingRect","rects","floating","altOverflow","detectOverflow","altBoundary","isIntersectingTop","top","height","isIntersectingBottom","bottom","isIntersecting","data"],"mappings":";;;;+BACgBA;;aAAAA;;qBADe;AACxB,SAASA,eAAe;IAC3B,OAAO;QACHC,MAAM;QACNC,IAAI,OAAOC,sBAAsB;YAC7B,MAAMC,eAAeD,oBAAoBE,KAAK,CAACC,QAAQ;YACvD,MAAMC,cAAc,MAAMC,IAAAA,mBAAc,EAACL,qBAAqB;gBAC1DM,aAAa,IAAI;YACrB;YACA,MAAMC,oBAAoBH,YAAYI,GAAG,GAAGP,aAAaQ,MAAM,IAAIL,YAAYI,GAAG,GAAG;YACrF,MAAME,uBAAuBN,YAAYO,MAAM,GAAGV,aAAaQ,MAAM,IAAIL,YAAYO,MAAM,GAAG;YAC9F,MAAMC,iBAAiBL,qBAAqBG;YAC5C,OAAO;gBACHG,MAAM;oBACFhB,cAAce;gBAClB;YACJ;QACJ;IACJ;AACJ"}
@@ -34,6 +34,4 @@ function maxSize(autoSize, options) {
34
34
  }
35
35
  }
36
36
  });
37
- } //# sourceMappingURL=maxSize.js.map
38
-
39
- //# sourceMappingURL=maxSize.js.map
37
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/maxSize.js"],"sourcesContent":["import { size } from '@floating-ui/dom';\nimport { getBoundary } from '../utils/getBoundary';\nexport function maxSize(autoSize, options) {\n const {\n container,\n overflowBoundary\n } = options;\n return size({\n ...(overflowBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, overflowBoundary)\n }),\n apply({\n availableHeight,\n availableWidth,\n elements,\n rects\n }) {\n const applyMaxWidth = autoSize === 'always' || autoSize === 'width-always' || rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width');\n const applyMaxHeight = autoSize === 'always' || autoSize === 'height-always' || rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height');\n if (applyMaxHeight) {\n Object.assign(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n boxSizing: 'border-box',\n overflowY: 'auto'\n });\n }\n if (applyMaxWidth) {\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n boxSizing: 'border-box',\n overflowX: 'auto'\n });\n }\n }\n });\n}\n//# sourceMappingURL=maxSize.js.map"],"names":["maxSize","autoSize","options","container","overflowBoundary","size","altBoundary","boundary","getBoundary","apply","availableHeight","availableWidth","elements","rects","applyMaxWidth","floating","width","applyMaxHeight","height","Object","assign","style","maxHeight","boxSizing","overflowY","maxWidth","overflowX"],"mappings":";;;;+BAEgBA;;aAAAA;;qBAFK;6BACO;AACrB,SAASA,QAAQC,QAAQ,EAAEC,OAAO,EAAE;IACzC,MAAM,EACJC,UAAS,EACTC,iBAAgB,EACjB,GAAGF;IACJ,OAAOG,IAAAA,SAAI,EAAC;QACV,GAAID,oBAAoB;YACtBE,aAAa,IAAI;YACjBC,UAAUC,IAAAA,wBAAW,EAACL,WAAWC;QACnC,CAAC;QACDK,OAAM,EACJC,gBAAe,EACfC,eAAc,EACdC,SAAQ,EACRC,MAAK,EACN,EAAE;YACD,MAAMC,gBAAgBb,aAAa,YAAYA,aAAa,kBAAkBY,MAAME,QAAQ,CAACC,KAAK,GAAGL,kBAAmBV,CAAAA,aAAa,IAAI,IAAIA,aAAa,OAAM;YAChK,MAAMgB,iBAAiBhB,aAAa,YAAYA,aAAa,mBAAmBY,MAAME,QAAQ,CAACG,MAAM,GAAGR,mBAAoBT,CAAAA,aAAa,IAAI,IAAIA,aAAa,QAAO;YACrK,IAAIgB,gBAAgB;gBAClBE,OAAOC,MAAM,CAACR,SAASG,QAAQ,CAACM,KAAK,EAAE;oBACrCC,WAAW,CAAC,EAAEZ,gBAAgB,EAAE,CAAC;oBACjCa,WAAW;oBACXC,WAAW;gBACb;YACF,CAAC;YACD,IAAIV,eAAe;gBACjBK,OAAOC,MAAM,CAACR,SAASG,QAAQ,CAACM,KAAK,EAAE;oBACrCI,UAAU,CAAC,EAAEd,eAAe,EAAE,CAAC;oBAC/BY,WAAW;oBACXG,WAAW;gBACb;YACF,CAAC;QACH;IACF;AACF,EACA,mCAAmC"}
1
+ {"version":3,"sources":["maxSize.js"],"sourcesContent":["import { size } from '@floating-ui/dom';\nimport { getBoundary } from '../utils/getBoundary';\nexport function maxSize(autoSize, options) {\n const { container , overflowBoundary } = options;\n return size({\n ...overflowBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, overflowBoundary)\n },\n apply ({ availableHeight , availableWidth , elements , rects }) {\n const applyMaxWidth = autoSize === 'always' || autoSize === 'width-always' || rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width');\n const applyMaxHeight = autoSize === 'always' || autoSize === 'height-always' || rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height');\n if (applyMaxHeight) {\n Object.assign(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n boxSizing: 'border-box',\n overflowY: 'auto'\n });\n }\n if (applyMaxWidth) {\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n boxSizing: 'border-box',\n overflowX: 'auto'\n });\n }\n }\n });\n}\n"],"names":["maxSize","autoSize","options","container","overflowBoundary","size","altBoundary","boundary","getBoundary","apply","availableHeight","availableWidth","elements","rects","applyMaxWidth","floating","width","applyMaxHeight","height","Object","assign","style","maxHeight","boxSizing","overflowY","maxWidth","overflowX"],"mappings":";;;;+BAEgBA;;aAAAA;;qBAFK;6BACO;AACrB,SAASA,QAAQC,QAAQ,EAAEC,OAAO,EAAE;IACvC,MAAM,EAAEC,UAAS,EAAGC,iBAAgB,EAAG,GAAGF;IAC1C,OAAOG,IAAAA,SAAI,EAAC;QACR,GAAGD,oBAAoB;YACnBE,aAAa,IAAI;YACjBC,UAAUC,IAAAA,wBAAW,EAACL,WAAWC;QACrC,CAAC;QACDK,OAAO,EAAEC,gBAAe,EAAGC,eAAc,EAAGC,SAAQ,EAAGC,MAAK,EAAG,EAAE;YAC7D,MAAMC,gBAAgBb,aAAa,YAAYA,aAAa,kBAAkBY,MAAME,QAAQ,CAACC,KAAK,GAAGL,kBAAmBV,CAAAA,aAAa,IAAI,IAAIA,aAAa,OAAM;YAChK,MAAMgB,iBAAiBhB,aAAa,YAAYA,aAAa,mBAAmBY,MAAME,QAAQ,CAACG,MAAM,GAAGR,mBAAoBT,CAAAA,aAAa,IAAI,IAAIA,aAAa,QAAO;YACrK,IAAIgB,gBAAgB;gBAChBE,OAAOC,MAAM,CAACR,SAASG,QAAQ,CAACM,KAAK,EAAE;oBACnCC,WAAW,CAAC,EAAEZ,gBAAgB,EAAE,CAAC;oBACjCa,WAAW;oBACXC,WAAW;gBACf;YACJ,CAAC;YACD,IAAIV,eAAe;gBACfK,OAAOC,MAAM,CAACR,SAASG,QAAQ,CAACM,KAAK,EAAE;oBACnCI,UAAU,CAAC,EAAEd,eAAe,EAAE,CAAC;oBAC/BY,WAAW;oBACXG,WAAW;gBACf;YACJ,CAAC;QACL;IACJ;AACJ"}
@@ -11,6 +11,4 @@ const _getFloatingUIOffset = require("../utils/getFloatingUIOffset");
11
11
  function offset(offsetValue) {
12
12
  const floatingUIOffset = (0, _getFloatingUIOffset.getFloatingUIOffset)(offsetValue);
13
13
  return (0, _dom.offset)(floatingUIOffset);
14
- } //# sourceMappingURL=offset.js.map
15
-
16
- //# sourceMappingURL=offset.js.map
14
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/offset.js"],"sourcesContent":["import { offset as baseOffset } from '@floating-ui/dom';\nimport { getFloatingUIOffset } from '../utils/getFloatingUIOffset';\n/**\n * Wraps floating UI offset middleware to to transform offset value\n */\nexport function offset(offsetValue) {\n const floatingUIOffset = getFloatingUIOffset(offsetValue);\n return baseOffset(floatingUIOffset);\n}\n//# sourceMappingURL=offset.js.map"],"names":["offset","offsetValue","floatingUIOffset","getFloatingUIOffset","baseOffset"],"mappings":";;;;+BAKgBA;;aAAAA;;qBALqB;qCACD;AAI7B,SAASA,OAAOC,WAAW,EAAE;IAClC,MAAMC,mBAAmBC,IAAAA,wCAAmB,EAACF;IAC7C,OAAOG,IAAAA,WAAU,EAACF;AACpB,EACA,kCAAkC"}
1
+ {"version":3,"sources":["offset.js"],"sourcesContent":["import { offset as baseOffset } from '@floating-ui/dom';\nimport { getFloatingUIOffset } from '../utils/getFloatingUIOffset';\n/**\n * Wraps floating UI offset middleware to to transform offset value\n */ export function offset(offsetValue) {\n const floatingUIOffset = getFloatingUIOffset(offsetValue);\n return baseOffset(floatingUIOffset);\n}\n"],"names":["offset","offsetValue","floatingUIOffset","getFloatingUIOffset","baseOffset"],"mappings":";;;;+BAIoBA;;aAAAA;;qBAJiB;qCACD;AAGzB,SAASA,OAAOC,WAAW,EAAE;IACpC,MAAMC,mBAAmBC,IAAAA,wCAAmB,EAACF;IAC7C,OAAOG,IAAAA,WAAU,EAACF;AACtB"}
@@ -29,6 +29,4 @@ function shift(options) {
29
29
  boundary: (0, _index.getBoundary)(container, overflowBoundary)
30
30
  }
31
31
  });
32
- } //# sourceMappingURL=shift.js.map
33
-
34
- //# sourceMappingURL=shift.js.map
32
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/middleware/shift.js"],"sourcesContent":["import { shift as baseShift, limitShift } from '@floating-ui/dom';\nimport { getBoundary, toFloatingUIPadding } from '../utils/index';\n/**\n * Wraps the floating UI shift middleware for easier usage of our options\n */\nexport function shift(options) {\n const {\n hasScrollableElement,\n disableTether,\n overflowBoundary,\n container,\n overflowBoundaryPadding,\n isRtl\n } = options;\n return baseShift({\n ...(hasScrollableElement && {\n boundary: 'clippingAncestors'\n }),\n ...(disableTether && {\n crossAxis: disableTether === 'all',\n limiter: limitShift({\n crossAxis: disableTether !== 'all',\n mainAxis: false\n })\n }),\n ...(overflowBoundaryPadding && {\n padding: toFloatingUIPadding(overflowBoundaryPadding, isRtl)\n }),\n ...(overflowBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, overflowBoundary)\n })\n });\n}\n//# sourceMappingURL=shift.js.map"],"names":["shift","options","hasScrollableElement","disableTether","overflowBoundary","container","overflowBoundaryPadding","isRtl","baseShift","boundary","crossAxis","limiter","limitShift","mainAxis","padding","toFloatingUIPadding","altBoundary","getBoundary"],"mappings":";;;;+BAKgBA;;aAAAA;;qBAL+B;uBACE;AAI1C,SAASA,MAAMC,OAAO,EAAE;IAC7B,MAAM,EACJC,qBAAoB,EACpBC,cAAa,EACbC,iBAAgB,EAChBC,UAAS,EACTC,wBAAuB,EACvBC,MAAK,EACN,GAAGN;IACJ,OAAOO,IAAAA,UAAS,EAAC;QACf,GAAIN,wBAAwB;YAC1BO,UAAU;QACZ,CAAC;QACD,GAAIN,iBAAiB;YACnBO,WAAWP,kBAAkB;YAC7BQ,SAASC,IAAAA,eAAU,EAAC;gBAClBF,WAAWP,kBAAkB;gBAC7BU,UAAU,KAAK;YACjB;QACF,CAAC;QACD,GAAIP,2BAA2B;YAC7BQ,SAASC,IAAAA,0BAAmB,EAACT,yBAAyBC;QACxD,CAAC;QACD,GAAIH,oBAAoB;YACtBY,aAAa,IAAI;YACjBP,UAAUQ,IAAAA,kBAAW,EAACZ,WAAWD;QACnC,CAAC;IACH;AACF,EACA,iCAAiC"}
1
+ {"version":3,"sources":["shift.js"],"sourcesContent":["import { shift as baseShift, limitShift } from '@floating-ui/dom';\nimport { getBoundary, toFloatingUIPadding } from '../utils/index';\n/**\n * Wraps the floating UI shift middleware for easier usage of our options\n */ export function shift(options) {\n const { hasScrollableElement , disableTether , overflowBoundary , container , overflowBoundaryPadding , isRtl } = options;\n return baseShift({\n ...hasScrollableElement && {\n boundary: 'clippingAncestors'\n },\n ...disableTether && {\n crossAxis: disableTether === 'all',\n limiter: limitShift({\n crossAxis: disableTether !== 'all',\n mainAxis: false\n })\n },\n ...overflowBoundaryPadding && {\n padding: toFloatingUIPadding(overflowBoundaryPadding, isRtl)\n },\n ...overflowBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, overflowBoundary)\n }\n });\n}\n"],"names":["shift","options","hasScrollableElement","disableTether","overflowBoundary","container","overflowBoundaryPadding","isRtl","baseShift","boundary","crossAxis","limiter","limitShift","mainAxis","padding","toFloatingUIPadding","altBoundary","getBoundary"],"mappings":";;;;+BAIoBA;;aAAAA;;qBAJ2B;uBACE;AAGtC,SAASA,MAAMC,OAAO,EAAE;IAC/B,MAAM,EAAEC,qBAAoB,EAAGC,cAAa,EAAGC,iBAAgB,EAAGC,UAAS,EAAGC,wBAAuB,EAAGC,MAAK,EAAG,GAAGN;IACnH,OAAOO,IAAAA,UAAS,EAAC;QACb,GAAGN,wBAAwB;YACvBO,UAAU;QACd,CAAC;QACD,GAAGN,iBAAiB;YAChBO,WAAWP,kBAAkB;YAC7BQ,SAASC,IAAAA,eAAU,EAAC;gBAChBF,WAAWP,kBAAkB;gBAC7BU,UAAU,KAAK;YACnB;QACJ,CAAC;QACD,GAAGP,2BAA2B;YAC1BQ,SAASC,IAAAA,0BAAmB,EAACT,yBAAyBC;QAC1D,CAAC;QACD,GAAGH,oBAAoB;YACnBY,aAAa,IAAI;YACjBP,UAAUQ,IAAAA,kBAAW,EAACZ,WAAWD;QACrC,CAAC;IACL;AACJ"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
6
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
- //# sourceMappingURL=types.js.map
8
-
9
- //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,iCAAiC"}
1
+ {"version":3,"sources":["types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
@@ -143,7 +143,7 @@ function usePositioning(options) {
143
143
  };
144
144
  }
145
145
  function usePositioningOptions(options) {
146
- const { align , arrowPadding , autoSize , coverTarget , flipBoundary , offset , overflowBoundary , pinned , position , unstable_disableTether: disableTether , positionFixed , overflowBoundaryPadding , fallbackPositions } = options;
146
+ const { align , arrowPadding , autoSize , coverTarget , flipBoundary , offset , overflowBoundary , pinned , position , unstable_disableTether: disableTether , positionFixed , overflowBoundaryPadding , fallbackPositions , useTransform } = options;
147
147
  const { dir } = (0, _reactSharedContexts.useFluent_unstable)();
148
148
  const isRtl = dir === 'rtl';
149
149
  const strategy = positionFixed ? 'fixed' : 'absolute';
@@ -187,7 +187,8 @@ function usePositioningOptions(options) {
187
187
  return {
188
188
  placement,
189
189
  middleware,
190
- strategy
190
+ strategy,
191
+ useTransform
191
192
  };
192
193
  }, [
193
194
  align,
@@ -203,8 +204,7 @@ function usePositioningOptions(options) {
203
204
  position,
204
205
  strategy,
205
206
  overflowBoundaryPadding,
206
- fallbackPositions
207
+ fallbackPositions,
208
+ useTransform
207
209
  ]);
208
- } //# sourceMappingURL=usePositioning.js.map
209
-
210
- //# sourceMappingURL=usePositioning.js.map
210
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/usePositioning.js"],"sourcesContent":["import { hide as hideMiddleware, arrow as arrowMiddleware } from '@floating-ui/dom';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { canUseDOM, useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useCallbackRef, toFloatingUIPlacement, hasAutofocusFilter, hasScrollParent } from './utils';\nimport { shift as shiftMiddleware, flip as flipMiddleware, coverTarget as coverTargetMiddleware, maxSize as maxSizeMiddleware, offset as offsetMiddleware, intersecting as intersectingMiddleware } from './middleware';\nimport { createPositionManager } from './createPositionManager';\n/**\n * @internal\n */\nexport function usePositioning(options) {\n const managerRef = React.useRef(null);\n const targetRef = React.useRef(null);\n const overrideTargetRef = React.useRef(null);\n const containerRef = React.useRef(null);\n const arrowRef = React.useRef(null);\n const {\n enabled = true\n } = options;\n const resolvePositioningOptions = usePositioningOptions(options);\n const updatePositionManager = React.useCallback(() => {\n if (managerRef.current) {\n managerRef.current.dispose();\n }\n managerRef.current = null;\n var _overrideTargetRef_current;\n const target = (_overrideTargetRef_current = overrideTargetRef.current) !== null && _overrideTargetRef_current !== void 0 ? _overrideTargetRef_current : targetRef.current;\n if (enabled && canUseDOM() && target && containerRef.current) {\n managerRef.current = createPositionManager({\n container: containerRef.current,\n target,\n arrow: arrowRef.current,\n ...resolvePositioningOptions(containerRef.current, arrowRef.current)\n });\n }\n }, [enabled, resolvePositioningOptions]);\n const setOverrideTarget = useEventCallback(target => {\n overrideTargetRef.current = target;\n updatePositionManager();\n });\n React.useImperativeHandle(options.positioningRef, () => {\n return {\n updatePosition: () => {\n var _managerRef_current;\n return (_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.updatePosition();\n },\n setTarget: target => {\n if (options.target && process.env.NODE_ENV !== 'production') {\n const err = new Error();\n // eslint-disable-next-line no-console\n console.warn('Imperative setTarget should not be used at the same time as target option');\n // eslint-disable-next-line no-console\n console.warn(err.stack);\n }\n setOverrideTarget(target);\n }\n };\n }, [options.target, setOverrideTarget]);\n useIsomorphicLayoutEffect(() => {\n var _options_target;\n setOverrideTarget((_options_target = options.target) !== null && _options_target !== void 0 ? _options_target : null);\n }, [options.target, setOverrideTarget]);\n useIsomorphicLayoutEffect(() => {\n updatePositionManager();\n }, [updatePositionManager]);\n if (process.env.NODE_ENV !== 'production') {\n // This checked should run only in development mode\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (containerRef.current) {\n var _contentNode_ownerDocument;\n const contentNode = containerRef.current;\n const treeWalker = (_contentNode_ownerDocument = contentNode.ownerDocument) === null || _contentNode_ownerDocument === void 0 ? void 0 : _contentNode_ownerDocument.createTreeWalker(contentNode, NodeFilter.SHOW_ELEMENT, {\n acceptNode: hasAutofocusFilter\n });\n while (treeWalker.nextNode()) {\n const node = treeWalker.currentNode;\n // eslint-disable-next-line no-console\n console.warn('<Popper>:', node);\n // eslint-disable-next-line no-console\n console.warn(['<Popper>: ^ this node contains \"autoFocus\" prop on a React element. This can break the initial', 'positioning of an element and cause a window jump effect. This issue occurs because React polyfills', '\"autoFocus\" behavior to solve inconsistencies between different browsers:', 'https://github.com/facebook/react/issues/11851#issuecomment-351787078', '\\n', 'However, \".focus()\" in this case occurs before any other React effects will be executed', '(React.useEffect(), componentDidMount(), etc.) and we can not prevent this behavior. If you really', 'want to use \"autoFocus\" please add \"position: fixed\" to styles of the element that is wrapped by', '\"Popper\".', `In general, it's not recommended to use \"autoFocus\" as it may break accessibility aspects:`, 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md', '\\n', 'We suggest to use the \"trapFocus\" prop on Fluent components or a catch \"ref\" and then use', '\"ref.current.focus\" in React.useEffect():', 'https://reactjs.org/docs/refs-and-the-dom.html#adding-a-ref-to-a-dom-element'].join(' '));\n }\n }\n // We run this check once, no need to add deps here\n // TODO: Should be rework to handle options.enabled and contentRef updates\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n const setTarget = useCallbackRef(null, target => {\n if (targetRef.current !== target) {\n targetRef.current = target;\n updatePositionManager();\n }\n });\n const setContainer = useCallbackRef(null, container => {\n if (containerRef.current !== container) {\n containerRef.current = container;\n updatePositionManager();\n }\n });\n const setArrow = useCallbackRef(null, arrow => {\n if (arrowRef.current !== arrow) {\n arrowRef.current = arrow;\n updatePositionManager();\n }\n });\n // Let users use callback refs so they feel like 'normal' DOM refs\n return {\n targetRef: setTarget,\n containerRef: setContainer,\n arrowRef: setArrow\n };\n}\nfunction usePositioningOptions(options) {\n const {\n align,\n arrowPadding,\n autoSize,\n coverTarget,\n flipBoundary,\n offset,\n overflowBoundary,\n pinned,\n position,\n unstable_disableTether: disableTether,\n positionFixed,\n overflowBoundaryPadding,\n fallbackPositions\n } = options;\n const {\n dir\n } = useFluent();\n const isRtl = dir === 'rtl';\n const strategy = positionFixed ? 'fixed' : 'absolute';\n return React.useCallback((container, arrow) => {\n const hasScrollableElement = hasScrollParent(container);\n const middleware = [offset && offsetMiddleware(offset), coverTarget && coverTargetMiddleware(), !pinned && flipMiddleware({\n container,\n flipBoundary,\n hasScrollableElement,\n isRtl,\n fallbackPositions\n }), shiftMiddleware({\n container,\n hasScrollableElement,\n overflowBoundary,\n disableTether,\n overflowBoundaryPadding,\n isRtl\n }), autoSize && maxSizeMiddleware(autoSize, {\n container,\n overflowBoundary\n }), intersectingMiddleware(), arrow && arrowMiddleware({\n element: arrow,\n padding: arrowPadding\n }), hideMiddleware({\n strategy: 'referenceHidden'\n }), hideMiddleware({\n strategy: 'escaped'\n })].filter(Boolean);\n const placement = toFloatingUIPlacement(align, position, isRtl);\n return {\n placement,\n middleware,\n strategy\n };\n }, [align, arrowPadding, autoSize, coverTarget, disableTether, flipBoundary, isRtl, offset, overflowBoundary, pinned, position, strategy, overflowBoundaryPadding, fallbackPositions]);\n}\n//# sourceMappingURL=usePositioning.js.map"],"names":["usePositioning","options","managerRef","React","useRef","targetRef","overrideTargetRef","containerRef","arrowRef","enabled","resolvePositioningOptions","usePositioningOptions","updatePositionManager","useCallback","current","dispose","_overrideTargetRef_current","target","canUseDOM","createPositionManager","container","arrow","setOverrideTarget","useEventCallback","useImperativeHandle","positioningRef","updatePosition","_managerRef_current","setTarget","process","env","NODE_ENV","err","Error","console","warn","stack","useIsomorphicLayoutEffect","_options_target","useEffect","_contentNode_ownerDocument","contentNode","treeWalker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","hasAutofocusFilter","nextNode","node","currentNode","join","useCallbackRef","setContainer","setArrow","align","arrowPadding","autoSize","coverTarget","flipBoundary","offset","overflowBoundary","pinned","position","unstable_disableTether","disableTether","positionFixed","overflowBoundaryPadding","fallbackPositions","dir","useFluent","isRtl","strategy","hasScrollableElement","hasScrollParent","middleware","offsetMiddleware","coverTargetMiddleware","flipMiddleware","shiftMiddleware","maxSizeMiddleware","intersectingMiddleware","arrowMiddleware","element","padding","hideMiddleware","filter","Boolean","placement","toFloatingUIPlacement"],"mappings":";;;;+BAUgBA;;aAAAA;;;qBAViD;qCACjB;gCACuB;6DAChD;uBACoE;4BAC8G;uCACnK;AAI/B,SAASA,eAAeC,OAAO,EAAE;IACtC,MAAMC,aAAaC,OAAMC,MAAM,CAAC,IAAI;IACpC,MAAMC,YAAYF,OAAMC,MAAM,CAAC,IAAI;IACnC,MAAME,oBAAoBH,OAAMC,MAAM,CAAC,IAAI;IAC3C,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gBACxH3D;gBACAwC;gBACAc;gBACAF;gBACAH;YACF;YAAIW,IAAAA,iBAAe,EAAC;gBAClB5D;gBACAsD;gBACAZ;gBACAI;gBACAE;gBACAI;YACF;YAAId,YAAYuB,IAAAA,mBAAiB,EAACvB,UAAU;gBAC1CtC;gBACA0C;YACF;YAAIoB,IAAAA,wBAAsB;YAAI7D,SAAS8D,IAAAA,UAAe,EAAC;gBACrDC,SAAS/D;gBACTgE,SAAS5B;YACX;YAAI6B,IAAAA,SAAc,EAAC;gBACjBb,UAAU;YACZ;YAAIa,IAAAA,SAAc,EAAC;gBACjBb,UAAU;YACZ;SAAG,CAACc,MAAM,CAACC;QACX,MAAMC,YAAYC,IAAAA,4BAAqB,EAAClC,OAAOQ,UAAUQ;QACzD,OAAO;YACLiB;YACAb;YACAH;QACF;IACF,GAAG;QAACjB;QAAOC;QAAcC;QAAUC;QAAaO;QAAeN;QAAcY;QAAOX;QAAQC;QAAkBC;QAAQC;QAAUS;QAAUL;QAAyBC;KAAkB;AACvL,EACA,0CAA0C"}
1
+ {"version":3,"sources":["usePositioning.js"],"sourcesContent":["import { hide as hideMiddleware, arrow as arrowMiddleware } from '@floating-ui/dom';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { canUseDOM, useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useCallbackRef, toFloatingUIPlacement, hasAutofocusFilter, hasScrollParent } from './utils';\nimport { shift as shiftMiddleware, flip as flipMiddleware, coverTarget as coverTargetMiddleware, maxSize as maxSizeMiddleware, offset as offsetMiddleware, intersecting as intersectingMiddleware } from './middleware';\nimport { createPositionManager } from './createPositionManager';\n/**\n * @internal\n */ export function usePositioning(options) {\n const managerRef = React.useRef(null);\n const targetRef = React.useRef(null);\n const overrideTargetRef = React.useRef(null);\n const containerRef = React.useRef(null);\n const arrowRef = React.useRef(null);\n const { enabled =true } = options;\n const resolvePositioningOptions = usePositioningOptions(options);\n const updatePositionManager = React.useCallback(()=>{\n if (managerRef.current) {\n managerRef.current.dispose();\n }\n managerRef.current = null;\n var _overrideTargetRef_current;\n const target = (_overrideTargetRef_current = overrideTargetRef.current) !== null && _overrideTargetRef_current !== void 0 ? _overrideTargetRef_current : targetRef.current;\n if (enabled && canUseDOM() && target && containerRef.current) {\n managerRef.current = createPositionManager({\n container: containerRef.current,\n target,\n arrow: arrowRef.current,\n ...resolvePositioningOptions(containerRef.current, arrowRef.current)\n });\n }\n }, [\n enabled,\n resolvePositioningOptions\n ]);\n const setOverrideTarget = useEventCallback((target)=>{\n overrideTargetRef.current = target;\n updatePositionManager();\n });\n React.useImperativeHandle(options.positioningRef, ()=>{\n return {\n updatePosition: ()=>{\n var _managerRef_current;\n return (_managerRef_current = managerRef.current) === null || _managerRef_current === void 0 ? void 0 : _managerRef_current.updatePosition();\n },\n setTarget: (target)=>{\n if (options.target && process.env.NODE_ENV !== 'production') {\n const err = new Error();\n // eslint-disable-next-line no-console\n console.warn('Imperative setTarget should not be used at the same time as target option');\n // eslint-disable-next-line no-console\n console.warn(err.stack);\n }\n setOverrideTarget(target);\n }\n };\n }, [\n options.target,\n setOverrideTarget\n ]);\n useIsomorphicLayoutEffect(()=>{\n var _options_target;\n setOverrideTarget((_options_target = options.target) !== null && _options_target !== void 0 ? _options_target : null);\n }, [\n options.target,\n setOverrideTarget\n ]);\n useIsomorphicLayoutEffect(()=>{\n updatePositionManager();\n }, [\n updatePositionManager\n ]);\n if (process.env.NODE_ENV !== 'production') {\n // This checked should run only in development mode\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(()=>{\n if (containerRef.current) {\n var _contentNode_ownerDocument;\n const contentNode = containerRef.current;\n const treeWalker = (_contentNode_ownerDocument = contentNode.ownerDocument) === null || _contentNode_ownerDocument === void 0 ? void 0 : _contentNode_ownerDocument.createTreeWalker(contentNode, NodeFilter.SHOW_ELEMENT, {\n acceptNode: hasAutofocusFilter\n });\n while(treeWalker.nextNode()){\n const node = treeWalker.currentNode;\n // eslint-disable-next-line no-console\n console.warn('<Popper>:', node);\n // eslint-disable-next-line no-console\n console.warn([\n '<Popper>: ^ this node contains \"autoFocus\" prop on a React element. This can break the initial',\n 'positioning of an element and cause a window jump effect. This issue occurs because React polyfills',\n '\"autoFocus\" behavior to solve inconsistencies between different browsers:',\n 'https://github.com/facebook/react/issues/11851#issuecomment-351787078',\n '\\n',\n 'However, \".focus()\" in this case occurs before any other React effects will be executed',\n '(React.useEffect(), componentDidMount(), etc.) and we can not prevent this behavior. If you really',\n 'want to use \"autoFocus\" please add \"position: fixed\" to styles of the element that is wrapped by',\n '\"Popper\".',\n `In general, it's not recommended to use \"autoFocus\" as it may break accessibility aspects:`,\n 'https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md',\n '\\n',\n 'We suggest to use the \"trapFocus\" prop on Fluent components or a catch \"ref\" and then use',\n '\"ref.current.focus\" in React.useEffect():',\n 'https://reactjs.org/docs/refs-and-the-dom.html#adding-a-ref-to-a-dom-element'\n ].join(' '));\n }\n }\n // We run this check once, no need to add deps here\n // TODO: Should be rework to handle options.enabled and contentRef updates\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n }\n const setTarget = useCallbackRef(null, (target)=>{\n if (targetRef.current !== target) {\n targetRef.current = target;\n updatePositionManager();\n }\n });\n const setContainer = useCallbackRef(null, (container)=>{\n if (containerRef.current !== container) {\n containerRef.current = container;\n updatePositionManager();\n }\n });\n const setArrow = useCallbackRef(null, (arrow)=>{\n if (arrowRef.current !== arrow) {\n arrowRef.current = arrow;\n updatePositionManager();\n }\n });\n // Let users use callback refs so they feel like 'normal' DOM refs\n return {\n targetRef: setTarget,\n containerRef: setContainer,\n arrowRef: setArrow\n };\n}\nfunction usePositioningOptions(options) {\n const { align , arrowPadding , autoSize , coverTarget , flipBoundary , offset , overflowBoundary , pinned , position , unstable_disableTether: disableTether , positionFixed , overflowBoundaryPadding , fallbackPositions , useTransform } = options;\n const { dir } = useFluent();\n const isRtl = dir === 'rtl';\n const strategy = positionFixed ? 'fixed' : 'absolute';\n return React.useCallback((container, arrow)=>{\n const hasScrollableElement = hasScrollParent(container);\n const middleware = [\n offset && offsetMiddleware(offset),\n coverTarget && coverTargetMiddleware(),\n !pinned && flipMiddleware({\n container,\n flipBoundary,\n hasScrollableElement,\n isRtl,\n fallbackPositions\n }),\n shiftMiddleware({\n container,\n hasScrollableElement,\n overflowBoundary,\n disableTether,\n overflowBoundaryPadding,\n isRtl\n }),\n autoSize && maxSizeMiddleware(autoSize, {\n container,\n overflowBoundary\n }),\n intersectingMiddleware(),\n arrow && arrowMiddleware({\n element: arrow,\n padding: arrowPadding\n }),\n hideMiddleware({\n strategy: 'referenceHidden'\n }),\n hideMiddleware({\n strategy: 'escaped'\n })\n ].filter(Boolean);\n const placement = toFloatingUIPlacement(align, position, isRtl);\n return {\n placement,\n middleware,\n strategy,\n useTransform\n };\n }, [\n align,\n arrowPadding,\n autoSize,\n coverTarget,\n disableTether,\n flipBoundary,\n isRtl,\n offset,\n overflowBoundary,\n pinned,\n position,\n strategy,\n overflowBoundaryPadding,\n fallbackPositions,\n useTransform\n ]);\n}\n"],"names":["usePositioning","options","managerRef","React","useRef","targetRef","overrideTargetRef","containerRef","arrowRef","enabled","resolvePositioningOptions","usePositioningOptions","updatePositionManager","useCallback","current","dispose","_overrideTargetRef_current","target","canUseDOM","createPositionManager","container","arrow","setOverrideTarget","useEventCallback","useImperativeHandle","positioningRef","updatePosition","_managerRef_current","setTarget","process","env","NODE_ENV","err","Error","console","warn","stack","useIsomorphicLayoutEffect","_options_target","useEffect","_contentNode_ownerDocument","contentNode","treeWalker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","hasAutofocusFilter","nextNode","node","currentNode","join","useCallbackRef","setContainer","setArrow","align","arrowPadding","autoSize","coverTarget","flipBoundary","offset","overflowBoundary","pinned","position","unstable_disableTether","disableTether","positionFixed","overflowBoundaryPadding","fallbackPositions","useTransform","dir","useFluent","isRtl","strategy","hasScrollableElement","hasScrollParent","middleware","offsetMiddleware","coverTargetMiddleware","flipMiddleware","shiftMiddleware","maxSizeMiddleware","intersectingMiddleware","arrowMiddleware","element","padding","hideMiddleware","filter","Boolean","placement","toFloatingUIPlacement"],"mappings":";;;;+BASoBA;;aAAAA;;;qBAT6C;qCACjB;gCACuB;6DAChD;uBACoE;4BAC8G;uCACnK;AAG3B,SAASA,eAAeC,OAAO,EAAE;IACxC,MAAMC,aAAaC,OAAMC,MAAM,CAAC,IAAI;IACpC,MAAMC,YAAYF,OAAMC,MAAM,CAAC,IAAI;IACnC,MAAME,oBAAoBH,OAAMC,MAAM,CAAC,IAAI;IAC3C,MAAMG,eAAeJ,OAAMC,MAAM,CAAC,IAAI;IACtC,MAAMI,WAAWL,OAAMC,MAAM,CAAC,IAAI;IAClC,MAAM,EAAEK,SAAS,IAAI,CAAA,EAAG,GAAGR;IAC3B,MAAMS,4BAA4BC,sBAAsBV;IACxD,MAAMW,wBAAwBT,OAAMU,WAAW,CAAC,IAAI;QAChD,IAAIX,WAAWY,OAAO,EAAE;YACpBZ,WAAWY,OAAO,CAACC,OAAO;QAC9B,CAAC;QACDb,WAAWY,OAAO,GAAG,IAAI;QACzB,IAAIE;QACJ,MAAMC,SAAS,AAACD,CAAAA,6BAA6BV,kBAAkBQ,OAAO,AAAD,MAAO,IAAI,IAAIE,+BAA+B,KAAK,IAAIA,6BAA6BX,UAAUS,OAAO;QAC1K,IAAIL,WAAWS,IAAAA,yBAAS,OAAMD,UAAUV,aAAaO,OAAO,EAAE;YAC1DZ,WAAWY,OAAO,GAAGK,IAAAA,4CAAqB,EAAC;gBACvCC,WAAWb,aAAaO,OAAO;gBAC/BG;gBACAI,OAAOb,SAASM,OAAO;gBACvB,GAAGJ,0BAA0BH,aAAaO,OAAO,EAAEN,SAASM,OAAO,CAAC;YACxE;QACJ,CAAC;IACL,GAAG;QACCL;QACAC;KACH;IACD,MAAMY,oBAAoBC,I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EAAGC,cAAa,EAAGC,wBAAuB,EAAGC,kBAAiB,EAAGC,aAAY,EAAG,GAAGrE;IAC/O,MAAM,EAAEsE,IAAG,EAAG,GAAGC,IAAAA,uCAAS;IAC1B,MAAMC,QAAQF,QAAQ;IACtB,MAAMG,WAAWP,gBAAgB,UAAU,UAAU;IACrD,OAAOhE,OAAMU,WAAW,CAAC,CAACO,WAAWC,QAAQ;QACzC,MAAMsD,uBAAuBC,IAAAA,sBAAe,EAACxD;QAC7C,MAAMyD,aAAa;YACfhB,UAAUiB,IAAAA,kBAAgB,EAACjB;YAC3BF,eAAeoB,IAAAA,uBAAqB;YACpC,CAAChB,UAAUiB,IAAAA,gBAAc,EAAC;gBACtB5D;gBACAwC;gBACAe;gBACAF;gBACAJ;YACJ;YACAY,IAAAA,iBAAe,EAAC;gBACZ7D;gBACAuD;gBACAb;gBACAI;gBACAE;gBACAK;YACJ;YACAf,YAAYwB,IAAAA,mBAAiB,EAACxB,UAAU;gBACpCtC;gBACA0C;YACJ;YACAqB,IAAAA,wBAAsB;YACtB9D,SAAS+D,IAAAA,UAAe,EAAC;gBACrBC,SAAShE;gBACTiE,SAAS7B;YACb;YACA8B,IAAAA,SAAc,EAAC;gBACXb,UAAU;YACd;YACAa,IAAAA,SAAc,EAAC;gBACXb,UAAU;YACd;SACH,CAACc,MAAM,CAACC;QACT,MAAMC,YAAYC,IAAAA,4BAAqB,EAACnC,OAAOQ,UAAUS;QACzD,OAAO;YACHiB;YACAb;YACAH;YACAJ;QACJ;IACJ,GAAG;QACCd;QACAC;QACAC;QACAC;QACAO;QACAN;QACAa;QACAZ;QACAC;QACAC;QACAC;QACAU;QACAN;QACAC;QACAC;KACH;AACL"}
@@ -33,6 +33,4 @@ const usePositioningMouseTarget = (initialState)=>{
33
33
  virtualElement,
34
34
  setVirtualMouseTarget
35
35
  ];
36
- }; //# sourceMappingURL=usePositioningMouseTarget.js.map
37
-
38
- //# sourceMappingURL=usePositioningMouseTarget.js.map
36
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/usePositioningMouseTarget.js"],"sourcesContent":["import * as React from 'react';\nimport { createVirtualElementFromClick } from './createVirtualElementFromClick';\n/**\n * @internal\n * A state hook that manages a popper virtual element from mouseevents.\n * Useful for scenarios where a component needs to be positioned by mouse click (e.g. contextmenu)\n * React synthetic events are not persisted by this hook\n *\n * @param initialState - initializes a user provided state similare to useState\n * @returns state and dispatcher for a Popper virtual element that uses native/synthetic mouse events\n */\nexport const usePositioningMouseTarget = initialState => {\n const [virtualElement, setVirtualElement] = React.useState(initialState);\n const setVirtualMouseTarget = event => {\n if (event === undefined || event === null) {\n setVirtualElement(undefined);\n return;\n }\n let mouseevent;\n if (!(event instanceof MouseEvent)) {\n mouseevent = event.nativeEvent;\n } else {\n mouseevent = event;\n }\n if (!(mouseevent instanceof MouseEvent) && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('usePositioningMouseTarget should only be used with MouseEvent');\n }\n const contextTarget = createVirtualElementFromClick(mouseevent);\n setVirtualElement(contextTarget);\n };\n return [virtualElement, setVirtualMouseTarget];\n};\n//# sourceMappingURL=usePositioningMouseTarget.js.map"],"names":["usePositioningMouseTarget","initialState","virtualElement","setVirtualElement","React","useState","setVirtualMouseTarget","event","undefined","mouseevent","MouseEvent","nativeEvent","process","env","NODE_ENV","console","error","contextTarget","createVirtualElementFromClick"],"mappings":";;;;+BAWaA;;aAAAA;;;6DAXU;+CACuB;AAUvC,MAAMA,4BAA4BC,CAAAA,eAAgB;IACvD,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGC,OAAMC,QAAQ,CAACJ;IAC3D,MAAMK,wBAAwBC,CAAAA,QAAS;QACrC,IAAIA,UAAUC,aAAaD,UAAU,IAAI,EAAE;YACzCJ,kBAAkBK;YAClB;QACF,CAAC;QACD,IAAIC;QACJ,IAAI,CAAEF,CAAAA,iBAAiBG,UAAS,GAAI;YAClCD,aAAaF,MAAMI,WAAW;QAChC,OAAO;YACLF,aAAaF;QACf,CAAC;QACD,IAAI,CAAEE,CAAAA,sBAAsBC,UAAS,KAAME,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YAChF,sCAAsC;YACtCC,QAAQC,KAAK,CAAC;QAChB,CAAC;QACD,MAAMC,gBAAgBC,IAAAA,4DAA6B,EAACT;QACpDN,kBAAkBc;IACpB;IACA,OAAO;QAACf;QAAgBI;KAAsB;AAChD,GACA,qDAAqD"}
1
+ {"version":3,"sources":["usePositioningMouseTarget.js"],"sourcesContent":["import * as React from 'react';\nimport { createVirtualElementFromClick } from './createVirtualElementFromClick';\n/**\n * @internal\n * A state hook that manages a popper virtual element from mouseevents.\n * Useful for scenarios where a component needs to be positioned by mouse click (e.g. contextmenu)\n * React synthetic events are not persisted by this hook\n *\n * @param initialState - initializes a user provided state similare to useState\n * @returns state and dispatcher for a Popper virtual element that uses native/synthetic mouse events\n */ export const usePositioningMouseTarget = (initialState)=>{\n const [virtualElement, setVirtualElement] = React.useState(initialState);\n const setVirtualMouseTarget = (event)=>{\n if (event === undefined || event === null) {\n setVirtualElement(undefined);\n return;\n }\n let mouseevent;\n if (!(event instanceof MouseEvent)) {\n mouseevent = event.nativeEvent;\n } else {\n mouseevent = event;\n }\n if (!(mouseevent instanceof MouseEvent) && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error('usePositioningMouseTarget should only be used with MouseEvent');\n }\n const contextTarget = createVirtualElementFromClick(mouseevent);\n setVirtualElement(contextTarget);\n };\n return [\n virtualElement,\n setVirtualMouseTarget\n ];\n};\n"],"names":["usePositioningMouseTarget","initialState","virtualElement","setVirtualElement","React","useState","setVirtualMouseTarget","event","undefined","mouseevent","MouseEvent","nativeEvent","process","env","NODE_ENV","console","error","contextTarget","createVirtualElementFromClick"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;+CACuB;AASnC,MAAMA,4BAA4B,CAACC,eAAe;IACzD,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGC,OAAMC,QAAQ,CAACJ;IAC3D,MAAMK,wBAAwB,CAACC,QAAQ;QACnC,IAAIA,UAAUC,aAAaD,UAAU,IAAI,EAAE;YACvCJ,kBAAkBK;YAClB;QACJ,CAAC;QACD,IAAIC;QACJ,IAAI,CAAEF,CAAAA,iBAAiBG,UAAS,GAAI;YAChCD,aAAaF,MAAMI,WAAW;QAClC,OAAO;YACHF,aAAaF;QACjB,CAAC;QACD,IAAI,CAAEE,CAAAA,sBAAsBC,UAAS,KAAME,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;YAC9E,sCAAsC;YACtCC,QAAQC,KAAK,CAAC;QAClB,CAAC;QACD,MAAMC,gBAAgBC,IAAAA,4DAA6B,EAACT;QACpDN,kBAAkBc;IACtB;IACA,OAAO;QACHf;QACAI;KACH;AACL"}
@@ -24,6 +24,4 @@ function debounce(fn) {
24
24
  }
25
25
  return pending;
26
26
  };
27
- } //# sourceMappingURL=debounce.js.map
28
-
29
- //# sourceMappingURL=debounce.js.map
27
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/debounce.js"],"sourcesContent":["/**\n * Promise microtask debouncer used by Popper.js v2\n * This is no longer exported in Floating UI (Popper.js v3)\n * https://github.com/floating-ui/floating-ui/blob/v2.x/src/utils/debounce.js\n * @param fn function that will be debounced\n */export function debounce(fn) {\n let pending;\n return () => {\n if (!pending) {\n pending = new Promise(resolve => {\n Promise.resolve().then(() => {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n return pending;\n };\n}\n//# sourceMappingURL=debounce.js.map"],"names":["debounce","fn","pending","Promise","resolve","then","undefined"],"mappings":"AAAA;;;;;CAKC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,SAASC,EAAE,EAAE;IAC9B,IAAIC;IACJ,OAAO,IAAM;QACX,IAAI,CAACA,SAAS;YACZA,UAAU,IAAIC,QAAQC,CAAAA,UAAW;gBAC/BD,QAAQC,OAAO,GAAGC,IAAI,CAAC,IAAM;oBAC3BH,UAAUI;oBACVF,QAAQH;gBACV;YACF;QACF,CAAC;QACD,OAAOC;IACT;AACF,EACA,oCAAoC"}
1
+ {"version":3,"sources":["debounce.js"],"sourcesContent":["/**\n * Promise microtask debouncer used by Popper.js v2\n * This is no longer exported in Floating UI (Popper.js v3)\n * https://github.com/floating-ui/floating-ui/blob/v2.x/src/utils/debounce.js\n * @param fn function that will be debounced\n */ export function debounce(fn) {\n let pending;\n return ()=>{\n if (!pending) {\n pending = new Promise((resolve)=>{\n Promise.resolve().then(()=>{\n pending = undefined;\n resolve(fn());\n });\n });\n }\n return pending;\n };\n}\n"],"names":["debounce","fn","pending","Promise","resolve","then","undefined"],"mappings":"AAAA;;;;;CAKC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,SAASC,EAAE,EAAE;IAC7B,IAAIC;IACJ,OAAO,IAAI;QACP,IAAI,CAACA,SAAS;YACVA,UAAU,IAAIC,QAAQ,CAACC,UAAU;gBAC7BD,QAAQC,OAAO,GAAGC,IAAI,CAAC,IAAI;oBACvBH,UAAUI;oBACVF,QAAQH;gBACZ;YACJ;QACJ,CAAC;QACD,OAAOC;IACX;AACJ"}
@@ -35,6 +35,4 @@ const fromFloatingUIPlacement = (placement)=>{
35
35
  position,
36
36
  alignment
37
37
  };
38
- }; //# sourceMappingURL=fromFloatingUIPlacement.js.map
39
-
40
- //# sourceMappingURL=fromFloatingUIPlacement.js.map
38
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../lib/utils/fromFloatingUIPlacement.js"],"sourcesContent":["import { parseFloatingUIPlacement } from './parseFloatingUIPlacement';\nconst getPositionMap = () => ({\n top: 'above',\n bottom: 'below',\n right: 'after',\n left: 'before'\n});\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = position => {\n if (position === 'above' || position === 'below') {\n return {\n start: 'start',\n end: 'end'\n };\n }\n return {\n start: 'top',\n end: 'bottom'\n };\n};\n/**\n * Maps Floating UI placement to positioning values\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const fromFloatingUIPlacement = placement => {\n const {\n side,\n alignment: floatingUIAlignment\n } = parseFloatingUIPlacement(placement);\n const position = getPositionMap()[side];\n const alignment = floatingUIAlignment && getAlignmentMap(position)[floatingUIAlignment];\n return {\n position,\n alignment\n };\n};\n//# sourceMappingURL=fromFloatingUIPlacement.js.map"],"names":["fromFloatingUIPlacement","getPositionMap","top","bottom","right","left","getAlignmentMap","position","start","end","placement","side","alignment","floatingUIAlignment","parseFloatingUIPlacement"],"mappings":";;;;+BAyBaA;;aAAAA;;0CAzB4B;AACzC,MAAMC,iBAAiB,IAAO,CAAA;QAC5BC,KAAK;QACLC,QAAQ;QACRC,OAAO;QACPC,MAAM;IACR,CAAA;AACA,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMC,kBAAkBC,CAAAA,WAAY;IAClC,IAAIA,aAAa,WAAWA,aAAa,SAAS;QAChD,OAAO;YACLC,OAAO;YACPC,KAAK;QACP;IACF,CAAC;IACD,OAAO;QACLD,OAAO;QACPC,KAAK;IACP;AACF;AAKO,MAAMT,0BAA0BU,CAAAA,YAAa;IAClD,MAAM,EACJC,KAAI,EACJC,WAAWC,oBAAmB,EAC/B,GAAGC,IAAAA,kDAAwB,EAACJ;IAC7B,MAAMH,WAAWN,gBAAgB,CAACU,KAAK;IACvC,MAAMC,YAAYC,uBAAuBP,gBAAgBC,SAAS,CAACM,oBAAoB;IACvF,OAAO;QACLN;QACAK;IACF;AACF,GACA,mDAAmD"}
1
+ {"version":3,"sources":["fromFloatingUIPlacement.js"],"sourcesContent":["import { parseFloatingUIPlacement } from './parseFloatingUIPlacement';\nconst getPositionMap = ()=>({\n top: 'above',\n bottom: 'below',\n right: 'after',\n left: 'before'\n });\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (position)=>{\n if (position === 'above' || position === 'below') {\n return {\n start: 'start',\n end: 'end'\n };\n }\n return {\n start: 'top',\n end: 'bottom'\n };\n};\n/**\n * Maps Floating UI placement to positioning values\n * @see positioningHelper.test.ts for expected placement values\n */ export const fromFloatingUIPlacement = (placement)=>{\n const { side , alignment: floatingUIAlignment } = parseFloatingUIPlacement(placement);\n const position = getPositionMap()[side];\n const alignment = floatingUIAlignment && getAlignmentMap(position)[floatingUIAlignment];\n return {\n position,\n alignment\n };\n};\n"],"names":["fromFloatingUIPlacement","getPositionMap","top","bottom","right","left","getAlignmentMap","position","start","end","placement","side","alignment","floatingUIAlignment","parseFloatingUIPlacement"],"mappings":";;;;+BAwBiBA;;aAAAA;;0CAxBwB;AACzC,MAAMC,iBAAiB,IAAK,CAAA;QACpBC,KAAK;QACLC,QAAQ;QACRC,OAAO;QACPC,MAAM;IACV,CAAA;AACJ,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMC,kBAAkB,CAACC,WAAW;IAChC,IAAIA,aAAa,WAAWA,aAAa,SAAS;QAC9C,OAAO;YACHC,OAAO;YACPC,KAAK;QACT;IACJ,CAAC;IACD,OAAO;QACHD,OAAO;QACPC,KAAK;IACT;AACJ;AAIW,MAAMT,0BAA0B,CAACU,YAAY;IACpD,MAAM,EAAEC,KAAI,EAAGC,WAAWC,oBAAmB,EAAG,GAAGC,IAAAA,kDAAwB,EAACJ;IAC5E,MAAMH,WAAWN,gBAAgB,CAACU,KAAK;IACvC,MAAMC,YAAYC,uBAAuBP,gBAAgBC,SAAS,CAACM,oBAAoB;IACvF,OAAO;QACHN;QACAK;IACJ;AACJ"}
@@ -22,6 +22,4 @@ function getBoundary(element, boundary) {
22
22
  return boundariesNode;
23
23
  }
24
24
  return boundary;
25
- } //# sourceMappingURL=getBoundary.js.map
26
-
27
- //# sourceMappingURL=getBoundary.js.map
25
+ }
@@ -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,C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AIE,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
+ };