@fluentui/react-positioning 9.4.3 → 9.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/CHANGELOG.json +51 -1
  2. package/CHANGELOG.md +22 -2
  3. package/dist/index.d.ts +7 -2
  4. package/lib/createArrowStyles.js.map +1 -1
  5. package/lib/createPositionManager.js.map +1 -1
  6. package/lib/createVirtualElementFromClick.js.map +1 -1
  7. package/lib/middleware/coverTarget.js.map +1 -1
  8. package/lib/middleware/flip.js +19 -3
  9. package/lib/middleware/flip.js.map +1 -1
  10. package/lib/middleware/intersecting.js.map +1 -1
  11. package/lib/middleware/maxSize.js +4 -2
  12. package/lib/middleware/maxSize.js.map +1 -1
  13. package/lib/middleware/offset.js.map +1 -1
  14. package/lib/middleware/shift.js.map +1 -1
  15. package/lib/types.js.map +1 -1
  16. package/lib/usePositioning.js +6 -3
  17. package/lib/usePositioning.js.map +1 -1
  18. package/lib/usePositioningMouseTarget.js.map +1 -1
  19. package/lib/utils/debounce.js.map +1 -1
  20. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  21. package/lib/utils/getBoundary.js.map +1 -1
  22. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  23. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  24. package/lib/utils/getScrollParent.js.map +1 -1
  25. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  26. package/lib/utils/mergeArrowOffset.js.map +1 -1
  27. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  28. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  29. package/lib/utils/toFloatingUIPadding.js.map +1 -1
  30. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  31. package/lib/utils/toggleScrollListener.js.map +1 -1
  32. package/lib/utils/useCallbackRef.js.map +1 -1
  33. package/lib/utils/writeArrowUpdates.js.map +1 -1
  34. package/lib/utils/writeContainerupdates.js.map +1 -1
  35. package/lib-amd/middleware/flip.js +10 -2
  36. package/lib-amd/middleware/flip.js.map +1 -1
  37. package/lib-amd/middleware/maxSize.js +2 -0
  38. package/lib-amd/middleware/maxSize.js.map +1 -1
  39. package/lib-amd/types.js.map +1 -1
  40. package/lib-amd/usePositioning.js +3 -2
  41. package/lib-amd/usePositioning.js.map +1 -1
  42. package/lib-amd/utils/getScrollParent.js.map +1 -1
  43. package/lib-commonjs/constants.js.map +1 -1
  44. package/lib-commonjs/createArrowStyles.js.map +1 -1
  45. package/lib-commonjs/createPositionManager.js.map +1 -1
  46. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  47. package/lib-commonjs/index.js.map +1 -1
  48. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  49. package/lib-commonjs/middleware/flip.js +18 -2
  50. package/lib-commonjs/middleware/flip.js.map +1 -1
  51. package/lib-commonjs/middleware/index.js.map +1 -1
  52. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  53. package/lib-commonjs/middleware/maxSize.js +4 -2
  54. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  55. package/lib-commonjs/middleware/offset.js.map +1 -1
  56. package/lib-commonjs/middleware/shift.js.map +1 -1
  57. package/lib-commonjs/types.js.map +1 -1
  58. package/lib-commonjs/usePositioning.js +6 -3
  59. package/lib-commonjs/usePositioning.js.map +1 -1
  60. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  61. package/lib-commonjs/utils/debounce.js.map +1 -1
  62. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  63. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  64. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  65. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  66. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  67. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  68. package/lib-commonjs/utils/index.js.map +1 -1
  69. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  70. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  71. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  72. package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
  73. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  74. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  75. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  76. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  77. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  78. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AACA;AAOA;;;AAGA,SAAgBA,qBAAqB,CAACC,OAYrC;;EACC,MAAM;IAAEC,SAAS;IAAEC,SAAS;IAAEC,cAAc;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAW,CAAE,GAAGN,OAAO;EACvF,IAAI,CAACC,SAAS,EAAE;IACd;;EAEFA,SAAS,CAACM,YAAY,CAACC,sCAA0B,EAAEN,SAAS,CAAC;EAC7DD,SAAS,CAACQ,eAAe,CAACD,yCAA6B,CAAC;EACxD,IAAIL,cAAc,CAACO,oBAAoB,CAACC,YAAY,EAAE;IACpDV,SAAS,CAACM,YAAY,CAACC,yCAA6B,EAAE,EAAE,CAAC;;EAG3DP,SAAS,CAACQ,eAAe,CAACD,oCAAwB,CAAC;EACnD,IAAI,oBAAc,CAACI,IAAI,0CAAEC,OAAO,EAAE;IAChCZ,SAAS,CAACM,YAAY,CAACC,oCAAwB,EAAE,EAAE,CAAC;;EAGtDP,SAAS,CAACQ,eAAe,CAACD,mCAAuB,CAAC;EAClD,IAAI,oBAAc,CAACI,IAAI,0CAAEE,eAAe,EAAE;IACxCb,SAAS,CAACM,YAAY,CAACC,mCAAuB,EAAE,EAAE,CAAC;;EAGrD;EACA;EACA;EACA;EACA,MAAMO,gBAAgB,GAAG,gBAAS,CAACC,aAAa,CAACC,WAAW,0CAAEF,gBAAgB,KAAI,CAAC;EACnF,MAAMG,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACd,WAAW,CAACY,CAAC,GAAGH,gBAAgB,CAAC,GAAGA,gBAAgB;EACzE,MAAMM,CAAC,GAAGF,IAAI,CAACC,KAAK,CAACd,WAAW,CAACe,CAAC,GAAGN,gBAAgB,CAAC,GAAGA,gBAAgB;EAEzEO,MAAM,CAACC,MAAM,CAACtB,SAAS,CAACuB,KAAK,EAAE;IAC7BC,SAAS,EAAEpB,MAAM,GAAG,aAAaa,CAAC,OAAOG,CAAC,KAAK,GAAG,eAAeH,CAAC,OAAOG,CAAC,QAAQ;IAClFK,QAAQ,EAAEtB;GACX,CAAC;AACJ;AA7CAuB","names":["writeContainerUpdates","options","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","constants_1","removeAttribute","intersectionObserver","intersecting","hide","escaped","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","transform","position","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-positioning/src/utils/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}) {\n const { container, placement, middlewareData, strategy, lowPPI, coordinates } = 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 transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n position: strategy,\n });\n}\n"]}
1
+ {"version":3,"names":["constants_1","require","writeContainerUpdates","options","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","DATA_POSITIONING_PLACEMENT","removeAttribute","DATA_POSITIONING_INTERSECTING","intersectionObserver","intersecting","DATA_POSITIONING_ESCAPED","_a","hide","escaped","DATA_POSITIONING_HIDDEN","_b","referenceHidden","devicePixelRatio","_c","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","transform","position","exports"],"sources":["../src/packages/react-components/react-positioning/src/utils/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}) {\n const { container, placement, middlewareData, strategy, lowPPI, coordinates } = 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 transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n position: strategy,\n });\n}\n"],"mappings":";;;;;;AACA,MAAAA,WAAA,gBAAAC,OAAA;AAOA;;;AAGA,SAAgBC,qBAAqBA,CAACC,OAYrC;;EACC,MAAM;IAAEC,SAAS;IAAEC,SAAS;IAAEC,cAAc;IAAEC,QAAQ;IAAEC,MAAM;IAAEC;EAAW,CAAE,GAAGN,OAAO;EACvF,IAAI,CAACC,SAAS,EAAE;IACd;;EAEFA,SAAS,CAACM,YAAY,CAACV,WAAA,CAAAW,0BAA0B,EAAEN,SAAS,CAAC;EAC7DD,SAAS,CAACQ,eAAe,CAACZ,WAAA,CAAAa,6BAA6B,CAAC;EACxD,IAAIP,cAAc,CAACQ,oBAAoB,CAACC,YAAY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fluentui/react-positioning",
3
- "version": "9.4.3",
3
+ "version": "9.5.1",
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",
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@floating-ui/dom": "^1.2.0",
32
- "@fluentui/react-shared-contexts": "^9.2.0",
32
+ "@fluentui/react-shared-contexts": "^9.3.0",
33
33
  "@fluentui/react-theme": "^9.1.5",
34
- "@fluentui/react-utilities": "^9.6.0",
34
+ "@fluentui/react-utilities": "^9.6.1",
35
35
  "@griffel/react": "^1.5.2",
36
36
  "tslib": "^2.1.0"
37
37
  },