@fluentui/react-positioning 9.3.5 → 9.3.6
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +48 -1
- package/CHANGELOG.md +14 -2
- package/lib/createArrowStyles.js +0 -2
- package/lib/createArrowStyles.js.map +1 -1
- package/lib/createPositionManager.js +8 -17
- package/lib/createPositionManager.js.map +1 -1
- package/lib/createVirtualElementFromClick.js +0 -2
- package/lib/createVirtualElementFromClick.js.map +1 -1
- package/lib/middleware/coverTarget.js +0 -5
- package/lib/middleware/coverTarget.js.map +1 -1
- package/lib/middleware/flip.js +2 -1
- package/lib/middleware/flip.js.map +1 -1
- package/lib/middleware/intersecting.js.map +1 -1
- package/lib/middleware/maxSize.js +31 -38
- package/lib/middleware/maxSize.js.map +1 -1
- package/lib/middleware/offset.js +0 -1
- package/lib/middleware/offset.js.map +1 -1
- package/lib/middleware/shift.js +2 -2
- package/lib/middleware/shift.js.map +1 -1
- package/lib/usePositioning.js +16 -25
- package/lib/usePositioning.js.map +1 -1
- package/lib/usePositioningMouseTarget.js +0 -7
- package/lib/usePositioningMouseTarget.js.map +1 -1
- package/lib/utils/debounce.js +0 -1
- package/lib/utils/debounce.js.map +1 -1
- package/lib/utils/fromFloatingUIPlacement.js +2 -7
- package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
- package/lib/utils/getBoundary.js +0 -6
- package/lib/utils/getBoundary.js.map +1 -1
- package/lib/utils/getFloatingUIOffset.js +0 -3
- package/lib/utils/getFloatingUIOffset.js.map +1 -1
- package/lib/utils/getReactFiberFromNode.js +0 -4
- package/lib/utils/getReactFiberFromNode.js.map +1 -1
- package/lib/utils/getScrollParent.js +6 -18
- package/lib/utils/getScrollParent.js.map +1 -1
- package/lib/utils/hasAutoFocusFilter.js +2 -7
- package/lib/utils/hasAutoFocusFilter.js.map +1 -1
- package/lib/utils/mergeArrowOffset.js +2 -7
- package/lib/utils/mergeArrowOffset.js.map +1 -1
- package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
- package/lib/utils/resolvePositioningShorthand.js +0 -2
- package/lib/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib/utils/toFloatingUIPlacement.js +2 -8
- package/lib/utils/toFloatingUIPlacement.js.map +1 -1
- package/lib/utils/toggleScrollListener.js +0 -3
- package/lib/utils/toggleScrollListener.js.map +1 -1
- package/lib/utils/useCallbackRef.js +2 -8
- package/lib/utils/useCallbackRef.js.map +1 -1
- package/lib/utils/writeArrowUpdates.js +0 -2
- package/lib/utils/writeArrowUpdates.js.map +1 -1
- package/lib/utils/writeContainerupdates.js +0 -10
- package/lib/utils/writeContainerupdates.js.map +1 -1
- package/lib-amd/createPositionManager.js +3 -0
- package/lib-amd/createPositionManager.js.map +1 -1
- package/lib-amd/middleware/maxSize.js +24 -36
- package/lib-amd/middleware/maxSize.js.map +1 -1
- package/lib-amd/usePositioning.js +1 -1
- package/lib-amd/usePositioning.js.map +1 -1
- package/lib-commonjs/constants.js.map +1 -1
- package/lib-commonjs/createArrowStyles.js +0 -7
- package/lib-commonjs/createArrowStyles.js.map +1 -1
- package/lib-commonjs/createPositionManager.js +8 -21
- package/lib-commonjs/createPositionManager.js.map +1 -1
- package/lib-commonjs/createVirtualElementFromClick.js +0 -4
- package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
- package/lib-commonjs/index.js +0 -10
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/middleware/coverTarget.js +0 -8
- package/lib-commonjs/middleware/coverTarget.js.map +1 -1
- package/lib-commonjs/middleware/flip.js +2 -5
- package/lib-commonjs/middleware/flip.js.map +1 -1
- package/lib-commonjs/middleware/index.js +0 -7
- package/lib-commonjs/middleware/index.js.map +1 -1
- package/lib-commonjs/middleware/intersecting.js +0 -3
- package/lib-commonjs/middleware/intersecting.js.map +1 -1
- package/lib-commonjs/middleware/maxSize.js +30 -41
- package/lib-commonjs/middleware/maxSize.js.map +1 -1
- package/lib-commonjs/middleware/offset.js +0 -5
- package/lib-commonjs/middleware/offset.js.map +1 -1
- package/lib-commonjs/middleware/shift.js +2 -6
- package/lib-commonjs/middleware/shift.js.map +1 -1
- package/lib-commonjs/types.js.map +1 -1
- package/lib-commonjs/usePositioning.js +16 -34
- package/lib-commonjs/usePositioning.js.map +1 -1
- package/lib-commonjs/usePositioningMouseTarget.js +0 -11
- package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
- package/lib-commonjs/utils/debounce.js +0 -3
- package/lib-commonjs/utils/debounce.js.map +1 -1
- package/lib-commonjs/utils/fromFloatingUIPlacement.js +2 -9
- package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/getBoundary.js +0 -9
- package/lib-commonjs/utils/getBoundary.js.map +1 -1
- package/lib-commonjs/utils/getFloatingUIOffset.js +0 -6
- package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
- package/lib-commonjs/utils/getReactFiberFromNode.js +0 -5
- package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
- package/lib-commonjs/utils/getScrollParent.js +6 -23
- package/lib-commonjs/utils/getScrollParent.js.map +1 -1
- package/lib-commonjs/utils/hasAutoFocusFilter.js +5 -12
- package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -15
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/mergeArrowOffset.js +2 -9
- package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
- package/lib-commonjs/utils/parseFloatingUIPlacement.js +0 -2
- package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/resolvePositioningShorthand.js +2 -6
- package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib-commonjs/utils/toFloatingUIPlacement.js +2 -10
- package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/toggleScrollListener.js +0 -6
- package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
- package/lib-commonjs/utils/useCallbackRef.js +2 -12
- package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
- package/lib-commonjs/utils/writeArrowUpdates.js +0 -4
- package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
- package/lib-commonjs/utils/writeContainerupdates.js +0 -13
- package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
- package/package.json +4 -4
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
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.
|
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": "
|
27
|
+
"@fluentui/scripts": "*"
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
30
|
"@floating-ui/dom": "^1.0.0",
|
31
31
|
"@fluentui/react-shared-contexts": "^9.1.4",
|
32
32
|
"@fluentui/react-theme": "^9.1.5",
|
33
|
-
"@fluentui/react-utilities": "^9.3.
|
34
|
-
"@griffel/react": "^1.
|
33
|
+
"@fluentui/react-utilities": "^9.3.1",
|
34
|
+
"@griffel/react": "^1.5.2",
|
35
35
|
"tslib": "^2.1.0"
|
36
36
|
},
|
37
37
|
"peerDependencies": {
|