@fluentui/react-positioning 9.3.4 → 9.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package/CHANGELOG.json +69 -1
  2. package/CHANGELOG.md +24 -2
  3. package/lib/createArrowStyles.js +0 -2
  4. package/lib/createArrowStyles.js.map +1 -1
  5. package/lib/createPositionManager.js +8 -17
  6. package/lib/createPositionManager.js.map +1 -1
  7. package/lib/createVirtualElementFromClick.js +0 -2
  8. package/lib/createVirtualElementFromClick.js.map +1 -1
  9. package/lib/middleware/coverTarget.js +0 -5
  10. package/lib/middleware/coverTarget.js.map +1 -1
  11. package/lib/middleware/flip.js +2 -1
  12. package/lib/middleware/flip.js.map +1 -1
  13. package/lib/middleware/intersecting.js.map +1 -1
  14. package/lib/middleware/maxSize.js +31 -38
  15. package/lib/middleware/maxSize.js.map +1 -1
  16. package/lib/middleware/offset.js +0 -1
  17. package/lib/middleware/offset.js.map +1 -1
  18. package/lib/middleware/shift.js +2 -2
  19. package/lib/middleware/shift.js.map +1 -1
  20. package/lib/usePositioning.js +16 -25
  21. package/lib/usePositioning.js.map +1 -1
  22. package/lib/usePositioningMouseTarget.js +0 -7
  23. package/lib/usePositioningMouseTarget.js.map +1 -1
  24. package/lib/utils/debounce.js +0 -1
  25. package/lib/utils/debounce.js.map +1 -1
  26. package/lib/utils/fromFloatingUIPlacement.js +2 -7
  27. package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
  28. package/lib/utils/getBoundary.js +0 -6
  29. package/lib/utils/getBoundary.js.map +1 -1
  30. package/lib/utils/getFloatingUIOffset.js +0 -3
  31. package/lib/utils/getFloatingUIOffset.js.map +1 -1
  32. package/lib/utils/getReactFiberFromNode.js +0 -4
  33. package/lib/utils/getReactFiberFromNode.js.map +1 -1
  34. package/lib/utils/getScrollParent.js +6 -18
  35. package/lib/utils/getScrollParent.js.map +1 -1
  36. package/lib/utils/hasAutoFocusFilter.js +2 -7
  37. package/lib/utils/hasAutoFocusFilter.js.map +1 -1
  38. package/lib/utils/mergeArrowOffset.js +2 -7
  39. package/lib/utils/mergeArrowOffset.js.map +1 -1
  40. package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
  41. package/lib/utils/resolvePositioningShorthand.js +0 -2
  42. package/lib/utils/resolvePositioningShorthand.js.map +1 -1
  43. package/lib/utils/toFloatingUIPlacement.js +2 -8
  44. package/lib/utils/toFloatingUIPlacement.js.map +1 -1
  45. package/lib/utils/toggleScrollListener.js +0 -3
  46. package/lib/utils/toggleScrollListener.js.map +1 -1
  47. package/lib/utils/useCallbackRef.js +2 -8
  48. package/lib/utils/useCallbackRef.js.map +1 -1
  49. package/lib/utils/writeArrowUpdates.js +0 -2
  50. package/lib/utils/writeArrowUpdates.js.map +1 -1
  51. package/lib/utils/writeContainerupdates.js +0 -10
  52. package/lib/utils/writeContainerupdates.js.map +1 -1
  53. package/lib-amd/createPositionManager.js +3 -0
  54. package/lib-amd/createPositionManager.js.map +1 -1
  55. package/lib-amd/middleware/maxSize.js +24 -36
  56. package/lib-amd/middleware/maxSize.js.map +1 -1
  57. package/lib-amd/usePositioning.js +1 -1
  58. package/lib-amd/usePositioning.js.map +1 -1
  59. package/lib-commonjs/constants.js.map +1 -1
  60. package/lib-commonjs/createArrowStyles.js +0 -7
  61. package/lib-commonjs/createArrowStyles.js.map +1 -1
  62. package/lib-commonjs/createPositionManager.js +8 -21
  63. package/lib-commonjs/createPositionManager.js.map +1 -1
  64. package/lib-commonjs/createVirtualElementFromClick.js +0 -4
  65. package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
  66. package/lib-commonjs/index.js +0 -10
  67. package/lib-commonjs/index.js.map +1 -1
  68. package/lib-commonjs/middleware/coverTarget.js +0 -8
  69. package/lib-commonjs/middleware/coverTarget.js.map +1 -1
  70. package/lib-commonjs/middleware/flip.js +2 -5
  71. package/lib-commonjs/middleware/flip.js.map +1 -1
  72. package/lib-commonjs/middleware/index.js +0 -7
  73. package/lib-commonjs/middleware/index.js.map +1 -1
  74. package/lib-commonjs/middleware/intersecting.js +0 -3
  75. package/lib-commonjs/middleware/intersecting.js.map +1 -1
  76. package/lib-commonjs/middleware/maxSize.js +30 -41
  77. package/lib-commonjs/middleware/maxSize.js.map +1 -1
  78. package/lib-commonjs/middleware/offset.js +0 -5
  79. package/lib-commonjs/middleware/offset.js.map +1 -1
  80. package/lib-commonjs/middleware/shift.js +2 -6
  81. package/lib-commonjs/middleware/shift.js.map +1 -1
  82. package/lib-commonjs/types.js.map +1 -1
  83. package/lib-commonjs/usePositioning.js +16 -34
  84. package/lib-commonjs/usePositioning.js.map +1 -1
  85. package/lib-commonjs/usePositioningMouseTarget.js +0 -11
  86. package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
  87. package/lib-commonjs/utils/debounce.js +0 -3
  88. package/lib-commonjs/utils/debounce.js.map +1 -1
  89. package/lib-commonjs/utils/fromFloatingUIPlacement.js +2 -9
  90. package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
  91. package/lib-commonjs/utils/getBoundary.js +0 -9
  92. package/lib-commonjs/utils/getBoundary.js.map +1 -1
  93. package/lib-commonjs/utils/getFloatingUIOffset.js +0 -6
  94. package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
  95. package/lib-commonjs/utils/getReactFiberFromNode.js +0 -5
  96. package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
  97. package/lib-commonjs/utils/getScrollParent.js +6 -23
  98. package/lib-commonjs/utils/getScrollParent.js.map +1 -1
  99. package/lib-commonjs/utils/hasAutoFocusFilter.js +5 -12
  100. package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
  101. package/lib-commonjs/utils/index.js +0 -15
  102. package/lib-commonjs/utils/index.js.map +1 -1
  103. package/lib-commonjs/utils/mergeArrowOffset.js +2 -9
  104. package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
  105. package/lib-commonjs/utils/parseFloatingUIPlacement.js +0 -2
  106. package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
  107. package/lib-commonjs/utils/resolvePositioningShorthand.js +2 -6
  108. package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
  109. package/lib-commonjs/utils/toFloatingUIPlacement.js +2 -10
  110. package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
  111. package/lib-commonjs/utils/toggleScrollListener.js +0 -6
  112. package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
  113. package/lib-commonjs/utils/useCallbackRef.js +2 -12
  114. package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
  115. package/lib-commonjs/utils/writeArrowUpdates.js +0 -4
  116. package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
  117. package/lib-commonjs/utils/writeContainerupdates.js +0 -13
  118. package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
  119. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-positioning/src/utils/writeContainerupdates.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;AAOA;;AAEG;;;AACH,SAAgB,qBAAhB,CAAsC,OAAtC,EAYC;;;EACC,MAAM;IAAE,SAAF;IAAa,SAAb;IAAwB,cAAxB;IAAwC,QAAxC;IAAkD,MAAlD;IAA0D;EAA1D,IAA0E,OAAhF;;EACA,IAAI,CAAC,SAAL,EAAgB;IACd;EACD;;EACD,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,0BAAvB,EAAmD,SAAnD;EACA,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,6BAA1B;;EACA,IAAI,cAAc,CAAC,oBAAf,CAAoC,YAAxC,EAAsD;IACpD,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,6BAAvB,EAAsD,EAAtD;EACD;;EAED,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,wBAA1B;;EACA,IAAI,CAAA,EAAA,GAAA,cAAc,CAAC,IAAf,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,OAAzB,EAAkC;IAChC,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,wBAAvB,EAAiD,EAAjD;EACD;;EAED,SAAS,CAAC,eAAV,CAA0B,WAAA,CAAA,uBAA1B;;EACA,IAAI,CAAA,EAAA,GAAA,cAAc,CAAC,IAAf,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,KAAA,CAAnB,GAAmB,EAAA,CAAE,eAAzB,EAA0C;IACxC,SAAS,CAAC,YAAV,CAAuB,WAAA,CAAA,uBAAvB,EAAgD,EAAhD;EACD;;EAED,MAAM,CAAC,GAAG,IAAI,CAAC,KAAL,CAAW,WAAW,CAAC,CAAvB,CAAV;EACA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAL,CAAW,WAAW,CAAC,CAAvB,CAAV;EAEA,MAAM,CAAC,MAAP,CAAc,SAAS,CAAC,KAAxB,EAA+B;IAC7B,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,KAAzB,GAAiC,eAAe,CAAC,OAAO,CAAC,QAD7C;IAE7B,QAAQ,EAAE;EAFmB,CAA/B;AAID;;AAxCD,OAAA,CAAA,qBAAA,GAAA,qBAAA","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 const x = Math.round(coordinates.x);\n const y = Math.round(coordinates.y);\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"],"sourceRoot":"../src/"}
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,MAAMO,CAAC,GAAGC,IAAI,CAACC,KAAK,CAACX,WAAW,CAACS,CAAC,CAAC;EACnC,MAAMG,CAAC,GAAGF,IAAI,CAACC,KAAK,CAACX,WAAW,CAACY,CAAC,CAAC;EAEnCC,MAAM,CAACC,MAAM,CAACnB,SAAS,CAACoB,KAAK,EAAE;IAC7BC,SAAS,EAAEjB,MAAM,GAAG,aAAaU,CAAC,OAAOG,CAAC,KAAK,GAAG,eAAeH,CAAC,OAAOG,CAAC,QAAQ;IAClFK,QAAQ,EAAEnB;GACX,CAAC;AACJ;AAxCAoB","names":["writeContainerUpdates","options","container","placement","middlewareData","strategy","lowPPI","coordinates","setAttribute","constants_1","removeAttribute","intersectionObserver","intersecting","hide","escaped","referenceHidden","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 const x = Math.round(coordinates.x);\n const y = Math.round(coordinates.y);\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-positioning",
3
- "version": "9.3.4",
3
+ "version": "9.3.6",
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",
@@ -24,14 +24,14 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@fluentui/eslint-plugin": "*",
27
- "@fluentui/scripts": "^1.0.0"
27
+ "@fluentui/scripts": "*"
28
28
  },
29
29
  "dependencies": {
30
30
  "@floating-ui/dom": "^1.0.0",
31
- "@fluentui/react-shared-contexts": "^9.1.3",
32
- "@fluentui/react-theme": "^9.1.4",
33
- "@fluentui/react-utilities": "^9.3.0",
34
- "@griffel/react": "^1.4.2",
31
+ "@fluentui/react-shared-contexts": "^9.1.4",
32
+ "@fluentui/react-theme": "^9.1.5",
33
+ "@fluentui/react-utilities": "^9.3.1",
34
+ "@griffel/react": "^1.5.2",
35
35
  "tslib": "^2.1.0"
36
36
  },
37
37
  "peerDependencies": {