@fluentui/react-positioning 9.15.3 → 9.15.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/CHANGELOG.md +24 -2
  2. package/dist/index.d.ts +1 -1
  3. package/lib/constants.js.map +1 -1
  4. package/lib/createArrowStyles.js.map +1 -1
  5. package/lib/createPositionManager.js.map +1 -1
  6. package/lib/createSlideStyles.js.map +1 -1
  7. package/lib/createVirtualElementFromClick.js.map +1 -1
  8. package/lib/index.js.map +1 -1
  9. package/lib/middleware/coverTarget.js.map +1 -1
  10. package/lib/middleware/flip.js.map +1 -1
  11. package/lib/middleware/index.js.map +1 -1
  12. package/lib/middleware/intersecting.js.map +1 -1
  13. package/lib/middleware/matchTargetSize.js.map +1 -1
  14. package/lib/middleware/maxSize.js.map +1 -1
  15. package/lib/middleware/offset.js.map +1 -1
  16. package/lib/middleware/shift.js.map +1 -1
  17. package/lib/types.js.map +1 -1
  18. package/lib/usePositioning.js +2 -0
  19. package/lib/usePositioning.js.map +1 -1
  20. package/lib/usePositioningMouseTarget.js.map +1 -1
  21. package/lib/utils/createResizeObserver.js.map +1 -1
  22. package/lib/utils/debounce.js.map +1 -1
  23. package/lib/utils/devtools.js.map +1 -1
  24. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  25. package/lib/utils/getBoundary.js.map +1 -1
  26. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  27. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  28. package/lib/utils/getScrollParent.js.map +1 -1
  29. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  30. package/lib/utils/index.js.map +1 -1
  31. package/lib/utils/listScrollParents.js.map +1 -1
  32. package/lib/utils/mergeArrowOffset.js.map +1 -1
  33. package/lib/utils/normalizeAutoSize.js.map +1 -1
  34. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  35. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  36. package/lib/utils/toFloatingUIPadding.js.map +1 -1
  37. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  38. package/lib/utils/toggleScrollListener.js.map +1 -1
  39. package/lib/utils/useCallbackRef.js.map +1 -1
  40. package/lib/utils/writeArrowUpdates.js.map +1 -1
  41. package/lib/utils/writeContainerupdates.js.map +1 -1
  42. package/lib-commonjs/constants.js +3 -3
  43. package/lib-commonjs/constants.js.map +1 -1
  44. package/lib-commonjs/createArrowStyles.js +3 -3
  45. package/lib-commonjs/createArrowStyles.js.map +1 -1
  46. package/lib-commonjs/createPositionManager.js.map +1 -1
  47. package/lib-commonjs/createSlideStyles.js.map +1 -1
  48. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  49. package/lib-commonjs/index.js +9 -9
  50. package/lib-commonjs/index.js.map +1 -1
  51. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  52. package/lib-commonjs/middleware/flip.js.map +1 -1
  53. package/lib-commonjs/middleware/index.js.map +1 -1
  54. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  55. package/lib-commonjs/middleware/matchTargetSize.js +3 -3
  56. package/lib-commonjs/middleware/matchTargetSize.js.map +1 -1
  57. package/lib-commonjs/middleware/maxSize.js +3 -3
  58. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  59. package/lib-commonjs/middleware/offset.js.map +1 -1
  60. package/lib-commonjs/middleware/shift.js.map +1 -1
  61. package/lib-commonjs/types.js.map +1 -1
  62. package/lib-commonjs/usePositioning.js +2 -0
  63. package/lib-commonjs/usePositioning.js.map +1 -1
  64. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  65. package/lib-commonjs/utils/createResizeObserver.js.map +1 -1
  66. package/lib-commonjs/utils/debounce.js.map +1 -1
  67. package/lib-commonjs/utils/devtools.js.map +1 -1
  68. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  69. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  70. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  71. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  72. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  73. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  74. package/lib-commonjs/utils/index.js.map +1 -1
  75. package/lib-commonjs/utils/listScrollParents.js.map +1 -1
  76. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  77. package/lib-commonjs/utils/normalizeAutoSize.js.map +1 -1
  78. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  79. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  80. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  81. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  82. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  83. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  84. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  85. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  86. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["useCallbackRef.js"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */ export function useCallbackRef(initialValue, callback, skipInitialResolve) {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(()=>({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current () {\n return ref.value;\n },\n set current (value){\n const last = ref.value;\n if (last !== value) {\n ref.value = value;\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n ref.callback(value, last);\n }\n }\n }\n }));\n useIsomorphicLayoutEffect(()=>{\n isFirst.current = false;\n }, []);\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","React","useRef","ref","useState","value","facade","current","last","useIsomorphicLayoutEffect"],"mappings":";;;;+BAkBoBA;;;eAAAA;;;;iEAlBG;gCACmB;AAiB/B,SAASA,eAAeC,YAAY,EAAEC,QAAQ,EAAEC,kBAAkB;IACzE,MAAMC,UAAUC,OAAMC,MAAM,CAAC;IAC7B,MAAM,CAACC,IAAI,GAAGF,OAAMG,QAAQ,CAAC,IAAK,CAAA;YAC1B,QAAQ;YACRC,OAAOR;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BQ,QAAQ;gBACJ,IAAIC,WAAW;oBACX,OAAOJ,IAAIE,KAAK;gBACpB;gBACA,IAAIE,SAASF,MAAM;oBACf,MAAMG,OAAOL,IAAIE,KAAK;oBACtB,IAAIG,SAASH,OAAO;wBAChBF,IAAIE,KAAK,GAAGA;wBACZ,IAAIN,sBAAsBC,QAAQO,OAAO,EAAE;4BACvC;wBACJ;wBACAJ,IAAIL,QAAQ,CAACO,OAAOG;oBACxB;gBACJ;YACJ;QACJ,CAAA;IACJC,IAAAA,yCAAyB,EAAC;QACtBT,QAAQO,OAAO,GAAG;IACtB,GAAG,EAAE;IACL,kBAAkB;IAClBJ,IAAIL,QAAQ,GAAGA;IACf,OAAOK,IAAIG,MAAM;AACrB"}
1
+ {"version":3,"sources":["useCallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef<T>(\n initialValue: T | null,\n callback: (newValue: T | null, lastValue: T | null) => void,\n skipInitialResolve?: boolean,\n): React.MutableRefObject<T | null> {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n\n ref.callback(value, last);\n }\n },\n },\n }));\n\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n\n // update callback\n ref.callback = callback;\n\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","React","useRef","ref","useState","value","facade","current","last","useIsomorphicLayoutEffect"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAoBgBA;;;eAAAA;;;;iEApBO;gCACmB;AAmBnC,SAASA,eACdC,YAAsB,EACtBC,QAA2D,EAC3DC,kBAA4B;IAE5B,MAAMC,UAAUC,OAAMC,MAAM,CAAC;IAC7B,MAAM,CAACC,IAAI,GAAGF,OAAMG,QAAQ,CAAC,IAAO,CAAA;YAClC,QAAQ;YACRC,OAAOR;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BQ,QAAQ;gBACN,IAAIC,WAAU;oBACZ,OAAOJ,IAAIE,KAAK;gBAClB;gBACA,IAAIE,SAAQF,MAAO;oBACjB,MAAMG,OAAOL,IAAIE,KAAK;oBAEtB,IAAIG,SAASH,OAAO;wBAClBF,IAAIE,KAAK,GAAGA;wBAEZ,IAAIN,sBAAsBC,QAAQO,OAAO,EAAE;4BACzC;wBACF;wBAEAJ,IAAIL,QAAQ,CAACO,OAAOG;oBACtB;gBACF;YACF;QACF,CAAA;IAEAC,IAAAA,yCAAAA,EAA0B;QACxBT,QAAQO,OAAO,GAAG;IACpB,GAAG,EAAE;IAEL,kBAAkB;IAClBJ,IAAIL,QAAQ,GAAGA;IAEf,OAAOK,IAAIG,MAAM;AACnB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["writeArrowUpdates.js"],"sourcesContent":["/**\n * Writes all DOM element updates after position is computed\n */ export function writeArrowUpdates(options) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`\n });\n}\n"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"mappings":"AAAA;;CAEC;;;;+BAAmBA;;;eAAAA;;;AAAT,SAASA,kBAAkBC,OAAO;IACzC,MAAM,EAAEC,KAAK,EAAEC,cAAc,EAAE,GAAGF;IAClC,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACjC;IACJ;IACA,MAAM,EAAEE,GAAGC,MAAM,EAAEC,GAAGC,MAAM,EAAE,GAAGJ,eAAeD,KAAK;IACrDM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACvBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACtB;AACJ"}
1
+ {"version":3,"sources":["writeArrowUpdates.ts"],"sourcesContent":["import { MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Writes all DOM element updates after position is computed\n */\nexport function writeArrowUpdates(options: { arrow: HTMLElement | null; middlewareData: MiddlewareData }) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n}\n"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA;;CAEC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,kBAAkBC,OAAsE;IACtG,MAAM,EAAEC,KAAK,EAAEC,cAAc,EAAE,GAAGF;IAClC,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACnC;IACF;IAEA,MAAM,EAAEE,GAAGC,MAAM,EAAEC,GAAGC,MAAM,EAAE,GAAGJ,eAAeD,KAAK;IAErDM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACzBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACpB;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["writeContainerupdates.js"],"sourcesContent":["import { DATA_POSITIONING_ESCAPED, DATA_POSITIONING_HIDDEN, DATA_POSITIONING_INTERSECTING, DATA_POSITIONING_PLACEMENT } from '../constants';\n/**\n * Writes all container element position updates after the position is computed\n */ export function writeContainerUpdates(options) {\n var _middlewareData_hide, _middlewareData_hide1, _container_ownerDocument_defaultView;\n const { container, placement, middlewareData, strategy, lowPPI, coordinates, useTransform = true } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if ((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if ((_middlewareData_hide1 = middlewareData.hide) === null || _middlewareData_hide1 === void 0 ? void 0 : _middlewareData_hide1.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = ((_container_ownerDocument_defaultView = container.ownerDocument.defaultView) === null || _container_ownerDocument_defaultView === void 0 ? void 0 : _container_ownerDocument_defaultView.devicePixelRatio) || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n Object.assign(container.style, {\n position: strategy\n });\n if (useTransform) {\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`\n });\n return;\n }\n Object.assign(container.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n}\n"],"names":["writeContainerUpdates","options","_middlewareData_hide","_middlewareData_hide1","_container_ownerDocument_defaultView","container","placement","middlewareData","strategy","lowPPI","coordinates","useTransform","setAttribute","DATA_POSITIONING_PLACEMENT","removeAttribute","DATA_POSITIONING_INTERSECTING","intersectionObserver","intersecting","DATA_POSITIONING_ESCAPED","hide","escaped","DATA_POSITIONING_HIDDEN","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","position","transform","left","top"],"mappings":";;;;+BAGoBA;;;eAAAA;;;2BAHyG;AAGlH,SAASA,sBAAsBC,OAAO;IAC7C,IAAIC,sBAAsBC,uBAAuBC;IACjD,MAAM,EAAEC,SAAS,EAAEC,SAAS,EAAEC,cAAc,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,eAAe,IAAI,EAAE,GAAGV;IACrG,IAAI,CAACI,WAAW;QACZ;IACJ;IACAA,UAAUO,YAAY,CAACC,qCAA0B,EAAEP;IACnDD,UAAUS,eAAe,CAACC,wCAA6B;IACvD,IAAIR,eAAeS,oBAAoB,CAACC,YAAY,EAAE;QAClDZ,UAAUO,YAAY,CAACG,wCAA6B,EAAE;IAC1D;IACAV,UAAUS,eAAe,CAACI,mCAAwB;IAClD,IAAI,AAAChB,CAAAA,uBAAuBK,eAAeY,IAAI,AAAD,MAAO,QAAQjB,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBkB,OAAO,EAAE;QAClIf,UAAUO,YAAY,CAACM,mCAAwB,EAAE;IACrD;IACAb,UAAUS,eAAe,CAACO,kCAAuB;IACjD,IAAI,AAAClB,CAAAA,wBAAwBI,eAAeY,IAAI,AAAD,MAAO,QAAQhB,0BAA0B,KAAK,IAAI,KAAK,IAAIA,sBAAsBmB,eAAe,EAAE;QAC7IjB,UAAUO,YAAY,CAACS,kCAAuB,EAAE;IACpD;IACA,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAME,mBAAmB,AAAC,CAAA,AAACnB,CAAAA,uCAAuCC,UAAUmB,aAAa,CAACC,WAAW,AAAD,MAAO,QAAQrB,yCAAyC,KAAK,IAAI,KAAK,IAAIA,qCAAqCmB,gBAAgB,AAAD,KAAM;IACxO,MAAMG,IAAIC,KAAKC,KAAK,CAAClB,YAAYgB,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAAClB,YAAYmB,CAAC,GAAGN,oBAAoBA;IACzDO,OAAOC,MAAM,CAAC1B,UAAU2B,KAAK,EAAE;QAC3BC,UAAUzB;IACd;IACA,IAAIG,cAAc;QACdmB,OAAOC,MAAM,CAAC1B,UAAU2B,KAAK,EAAE;YAC3BE,WAAWzB,SAAS,CAAC,UAAU,EAAEiB,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QACtF;QACA;IACJ;IACAC,OAAOC,MAAM,CAAC1B,UAAU2B,KAAK,EAAE;QAC3BG,MAAM,CAAC,EAAET,EAAE,EAAE,CAAC;QACdU,KAAK,CAAC,EAAEP,EAAE,EAAE,CAAC;IACjB;AACJ"}
1
+ {"version":3,"sources":["writeContainerupdates.ts"],"sourcesContent":["import type { Placement, MiddlewareData, Strategy, Coords } from '@floating-ui/dom';\nimport {\n DATA_POSITIONING_ESCAPED,\n DATA_POSITIONING_HIDDEN,\n DATA_POSITIONING_INTERSECTING,\n DATA_POSITIONING_PLACEMENT,\n} from '../constants';\n\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options: {\n container: HTMLElement | null;\n placement: Placement;\n middlewareData: MiddlewareData;\n /**\n * Layer acceleration can disable subpixel rendering which causes slightly\n * blurry text on low PPI displays, so we want to use 2D transforms\n * instead\n */\n lowPPI: boolean;\n strategy: Strategy;\n coordinates: Coords;\n useTransform?: boolean;\n}) {\n const { container, placement, middlewareData, strategy, lowPPI, coordinates, useTransform = true } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if (middlewareData.hide?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = container.ownerDocument.defaultView?.devicePixelRatio || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n\n Object.assign(container.style, {\n position: strategy,\n });\n\n if (useTransform) {\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n });\n return;\n }\n\n Object.assign(container.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n}\n"],"names":["writeContainerUpdates","options","middlewareData","container","placement","strategy","lowPPI","coordinates","useTransform","setAttribute","DATA_POSITIONING_PLACEMENT","removeAttribute","DATA_POSITIONING_INTERSECTING","intersectionObserver","intersecting","DATA_POSITIONING_ESCAPED","hide","escaped","DATA_POSITIONING_HIDDEN","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","position","transform","left","top"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWgBA;;;eAAAA;;;2BALT;AAKA,SAASA,sBAAsBC,OAarC;QAYKC,sBAKAA,uBAQqBC;IAxBzB,MAAM,EAAEA,SAAS,EAAEC,SAAS,EAAEF,cAAc,EAAEG,QAAQ,EAAEC,MAAM,EAAEC,WAAW,EAAEC,eAAe,IAAI,EAAE,GAAGP;IACrG,IAAI,CAACE,WAAW;QACd;IACF;IACAA,UAAUM,YAAY,CAACC,qCAAAA,EAA4BN;IACnDD,UAAUQ,eAAe,CAACC,wCAAAA;IAC1B,IAAIV,eAAeW,oBAAoB,CAACC,YAAY,EAAE;QACpDX,UAAUM,YAAY,CAACG,wCAAAA,EAA+B;IACxD;IAEAT,UAAUQ,eAAe,CAACI,mCAAAA;IAC1B,IAAA,AAAIb,CAAAA,uBAAAA,eAAec,IAAI,AAAJA,MAAI,QAAnBd,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAqBe,OAAO,EAAE;QAChCd,UAAUM,YAAY,CAACM,mCAAAA,EAA0B;IACnD;IAEAZ,UAAUQ,eAAe,CAACO,kCAAAA;IAC1B,IAAA,AAAIhB,CAAAA,wBAAAA,eAAec,IAAI,AAAJA,MAAI,QAAnBd,0BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,sBAAqBiB,eAAe,EAAE;QACxChB,UAAUM,YAAY,CAACS,kCAAAA,EAAyB;IAClD;IAEA,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAME,mBAAmBjB,CAAAA,CAAAA,uCAAAA,UAAUkB,aAAa,CAACC,WAAW,AAAXA,MAAW,QAAnCnB,yCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qCAAqCiB,gBAAgB,AAAhBA,KAAoB;IAClF,MAAMG,IAAIC,KAAKC,KAAK,CAAClB,YAAYgB,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAAClB,YAAYmB,CAAC,GAAGN,oBAAoBA;IAEzDO,OAAOC,MAAM,CAACzB,UAAU0B,KAAK,EAAE;QAC7BC,UAAUzB;IACZ;IAEA,IAAIG,cAAc;QAChBmB,OAAOC,MAAM,CAACzB,UAAU0B,KAAK,EAAE;YAC7BE,WAAWzB,SAAS,CAAC,UAAU,EAAEiB,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QACpF;QACA;IACF;IAEAC,OAAOC,MAAM,CAACzB,UAAU0B,KAAK,EAAE;QAC7BG,MAAM,CAAC,EAAET,EAAE,EAAE,CAAC;QACdU,KAAK,CAAC,EAAEP,EAAE,EAAE,CAAC;IACf;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-positioning",
3
- "version": "9.15.3",
3
+ "version": "9.15.5",
4
4
  "description": "A react wrapper around Popper.js for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -31,9 +31,9 @@
31
31
  "dependencies": {
32
32
  "@floating-ui/dom": "^1.2.0",
33
33
  "@floating-ui/devtools": "0.2.1",
34
- "@fluentui/react-shared-contexts": "^9.19.0",
34
+ "@fluentui/react-shared-contexts": "^9.19.1",
35
35
  "@fluentui/react-theme": "^9.1.19",
36
- "@fluentui/react-utilities": "^9.18.10",
36
+ "@fluentui/react-utilities": "^9.18.12",
37
37
  "@griffel/react": "^1.5.22",
38
38
  "@swc/helpers": "^0.5.1"
39
39
  },