@fluentui/react-positioning 9.5.13 → 9.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +45 -1
- package/CHANGELOG.md +25 -2
- package/dist/index.d.ts +6 -1
- package/lib/constants.js +0 -1
- package/lib/constants.js.map +1 -1
- package/lib/createArrowStyles.js +47 -55
- package/lib/createArrowStyles.js.map +1 -1
- package/lib/createPositionManager.js +95 -108
- package/lib/createPositionManager.js.map +1 -1
- package/lib/createVirtualElementFromClick.js +18 -19
- package/lib/createVirtualElementFromClick.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/middleware/coverTarget.js +26 -32
- package/lib/middleware/coverTarget.js.map +1 -1
- package/lib/middleware/flip.js +22 -32
- package/lib/middleware/flip.js.map +1 -1
- package/lib/middleware/index.js +0 -1
- package/lib/middleware/index.js.map +1 -1
- package/lib/middleware/intersecting.js +16 -17
- package/lib/middleware/intersecting.js.map +1 -1
- package/lib/middleware/maxSize.js +25 -34
- package/lib/middleware/maxSize.js.map +1 -1
- package/lib/middleware/offset.js +3 -5
- package/lib/middleware/offset.js.map +1 -1
- package/lib/middleware/shift.js +21 -30
- package/lib/middleware/shift.js.map +1 -1
- package/lib/types.js +0 -1
- package/lib/types.js.map +1 -1
- package/lib/usePositioning.js +188 -154
- package/lib/usePositioning.js.map +1 -1
- package/lib/usePositioningMouseTarget.js +24 -23
- package/lib/usePositioningMouseTarget.js.map +1 -1
- package/lib/utils/debounce.js +13 -14
- package/lib/utils/debounce.js.map +1 -1
- package/lib/utils/fromFloatingUIPlacement.js +23 -28
- package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
- package/lib/utils/getBoundary.js +14 -16
- package/lib/utils/getBoundary.js.map +1 -1
- package/lib/utils/getFloatingUIOffset.js +16 -27
- package/lib/utils/getFloatingUIOffset.js.map +1 -1
- package/lib/utils/getReactFiberFromNode.js +36 -37
- package/lib/utils/getReactFiberFromNode.js.map +1 -1
- package/lib/utils/getScrollParent.js +35 -42
- package/lib/utils/getScrollParent.js.map +1 -1
- package/lib/utils/hasAutoFocusFilter.js +9 -11
- package/lib/utils/hasAutoFocusFilter.js.map +1 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/mergeArrowOffset.js +24 -25
- package/lib/utils/mergeArrowOffset.js.map +1 -1
- package/lib/utils/parseFloatingUIPlacement.js +6 -7
- package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
- package/lib/utils/resolvePositioningShorthand.js +55 -56
- package/lib/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib/utils/toFloatingUIPadding.js +16 -21
- package/lib/utils/toFloatingUIPadding.js.map +1 -1
- package/lib/utils/toFloatingUIPlacement.js +25 -27
- package/lib/utils/toFloatingUIPlacement.js.map +1 -1
- package/lib/utils/toggleScrollListener.js +12 -14
- package/lib/utils/toggleScrollListener.js.map +1 -1
- package/lib/utils/useCallbackRef.js +30 -32
- package/lib/utils/useCallbackRef.js.map +1 -1
- package/lib/utils/writeArrowUpdates.js +10 -17
- package/lib/utils/writeArrowUpdates.js.map +1 -1
- package/lib/utils/writeContainerupdates.js +39 -39
- package/lib/utils/writeContainerupdates.js.map +1 -1
- package/lib-commonjs/constants.js +1 -3
- package/lib-commonjs/constants.js.map +1 -1
- package/lib-commonjs/createArrowStyles.js +1 -3
- package/lib-commonjs/createArrowStyles.js.map +1 -1
- package/lib-commonjs/createPositionManager.js +4 -5
- package/lib-commonjs/createPositionManager.js.map +1 -1
- package/lib-commonjs/createVirtualElementFromClick.js +1 -3
- package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/middleware/coverTarget.js +1 -3
- package/lib-commonjs/middleware/coverTarget.js.map +1 -1
- package/lib-commonjs/middleware/flip.js +1 -3
- package/lib-commonjs/middleware/flip.js.map +1 -1
- package/lib-commonjs/middleware/index.js +0 -3
- package/lib-commonjs/middleware/index.js.map +1 -1
- package/lib-commonjs/middleware/intersecting.js +1 -3
- package/lib-commonjs/middleware/intersecting.js.map +1 -1
- package/lib-commonjs/middleware/maxSize.js +1 -3
- package/lib-commonjs/middleware/maxSize.js.map +1 -1
- package/lib-commonjs/middleware/offset.js +1 -3
- package/lib-commonjs/middleware/offset.js.map +1 -1
- package/lib-commonjs/middleware/shift.js +1 -3
- package/lib-commonjs/middleware/shift.js.map +1 -1
- package/lib-commonjs/types.js +0 -3
- package/lib-commonjs/types.js.map +1 -1
- package/lib-commonjs/usePositioning.js +6 -6
- package/lib-commonjs/usePositioning.js.map +1 -1
- package/lib-commonjs/usePositioningMouseTarget.js +1 -3
- package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
- package/lib-commonjs/utils/debounce.js +1 -3
- package/lib-commonjs/utils/debounce.js.map +1 -1
- package/lib-commonjs/utils/fromFloatingUIPlacement.js +1 -3
- package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/getBoundary.js +1 -3
- package/lib-commonjs/utils/getBoundary.js.map +1 -1
- package/lib-commonjs/utils/getFloatingUIOffset.js +1 -3
- package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
- package/lib-commonjs/utils/getReactFiberFromNode.js +1 -3
- package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
- package/lib-commonjs/utils/getScrollParent.js +1 -3
- package/lib-commonjs/utils/getScrollParent.js.map +1 -1
- package/lib-commonjs/utils/hasAutoFocusFilter.js +1 -3
- package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -3
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/mergeArrowOffset.js +1 -3
- package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
- package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -3
- package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/resolvePositioningShorthand.js +1 -3
- package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib-commonjs/utils/toFloatingUIPadding.js +1 -3
- package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
- package/lib-commonjs/utils/toFloatingUIPlacement.js +1 -3
- package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/toggleScrollListener.js +1 -3
- package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
- package/lib-commonjs/utils/useCallbackRef.js +1 -3
- package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
- package/lib-commonjs/utils/writeArrowUpdates.js +1 -3
- package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
- package/lib-commonjs/utils/writeContainerupdates.js +12 -5
- package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
- package/package.json +3 -3
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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
|
-
}
|
112
|
-
|
113
|
-
//# sourceMappingURL=createPositionManager.js.map
|
112
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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,UAAUtB;YAC5C;YACAG,gBAAgB,KAAK;QACzB,CAAC;QACDM,OAAOC,MAAM,CAAClB,UAAUmB,KAAK,EAAE;YAC3BC,UAAUjB;QACd;QACA4B,IAAAA,oBAAe,EAAC9B,QAAQD,WA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;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
package/lib-commonjs/index.js
CHANGED
@@ -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":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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
|
-
}
|
15
|
-
|
16
|
-
//# sourceMappingURL=offset.js.map
|
14
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
package/lib-commonjs/types.js
CHANGED
@@ -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":["
|
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
|
-
}
|
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,MAAMG,eAAeJ,OAAMC,MAAM,CAAC,IAAI;IACtC,MAAMI,WAAWL,OAAMC,MAAM,CAAC,IAAI;IAClC,MAAM,EACJK,SAAU,IAAI,CAAA,EACf,GAAGR;IACJ,MAAMS,4BAA4BC,sBAAsBV;IACxD,MAAMW,wBAAwBT,OAAMU,WAAW,CAAC,IAAM;QACpD,IAAIX,WAAWY,OAAO,EAAE;YACtBZ,WAAWY,OAAO,CAACC,OAAO;QAC5B,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;YAC5DZ,WAAWY,OAAO,GAAGK,IAAAA,4CAAqB,EAAC;gBACzCC,WAAWb,aAAaO,OAAO;gBAC/BG;gBACAI,OAAOb,SAASM,OAAO;gBACvB,GAAGJ,0BAA0BH,aAAaO,OAAO,EAAEN,SAASM,OAAO,CAAC;YACtE;QACF,CAAC;IACH,GAAG;QAACL;QAASC;KAA0B;IACvC,MAAMY,oBAAoBC,IAAAA,gCAAgB,EAACN,CAAAA,SAAU;QACnDX,kBAAkBQ,OAAO,GAA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B,EACvBC,kBAAiB,EAClB,GAAGpE;IACJ,MAAM,EACJqE,IAAG,EACJ,GAAGC,IAAAA,uCAAS;IACb,MAAMC,QAAQF,QAAQ;IACtB,MAAMG,WAAWN,gBAAgB,UAAU,UAAU;IACrD,OAAOhE,OAAMU,WAAW,CAAC,CAACO,WAAWC,QAAU;QAC7C,MAAMqD,uBAAuBC,IAAAA,sBAAe,EAACvD;QAC7C,MAAMwD,aAAa;YAACf,UAAUgB,IAAAA,kBAAgB,EAAChB;YAASF,eAAemB,IAAAA,uBAAqB;YAAI,CAACf,UAAUgB,IAAAA,gBAAc,EAAC;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,AA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AAYC,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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
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,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ACnB,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
|
-
};
|
63
|
-
|
64
|
-
//# sourceMappingURL=getScrollParent.js.map
|
62
|
+
};
|