@fluentui/react-positioning 0.0.0-nightlyfbae36b19b20211111.1 → 0.0.0-nightlyfc5cfdc52420220215.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +173 -8
- package/CHANGELOG.md +49 -7
- package/dist/react-positioning.d.ts +113 -35
- package/lib/createArrowStyles.d.ts +64 -0
- package/lib/createArrowStyles.js +87 -0
- package/lib/createArrowStyles.js.map +1 -0
- package/lib/createVirtualElementFromClick.js +17 -15
- package/lib/createVirtualElementFromClick.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +28 -7
- package/lib/usePopper.d.ts +2 -14
- package/lib/usePopper.js +367 -311
- package/lib/usePopper.js.map +1 -1
- package/lib/usePopperMouseTarget.js +28 -22
- package/lib/usePopperMouseTarget.js.map +1 -1
- package/lib/utils/getBasePlacement.js +1 -1
- package/lib/utils/getBasePlacement.js.map +1 -1
- package/lib/utils/getBoundary.js +15 -10
- package/lib/utils/getBoundary.js.map +1 -1
- package/lib/utils/getReactFiberFromNode.js +39 -35
- package/lib/utils/getReactFiberFromNode.js.map +1 -1
- package/lib/utils/getScrollParent.js +46 -32
- package/lib/utils/getScrollParent.js.map +1 -1
- package/lib/utils/mergeArrowOffset.js +29 -24
- package/lib/utils/mergeArrowOffset.js.map +1 -1
- package/lib/utils/positioningHelper.d.ts +2 -2
- package/lib/utils/positioningHelper.js +38 -30
- package/lib/utils/positioningHelper.js.map +1 -1
- package/lib/utils/resolvePositioningShorthand.js +57 -19
- package/lib/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib/utils/useCallbackRef.js +35 -29
- package/lib/utils/useCallbackRef.js.map +1 -1
- package/lib-commonjs/createArrowStyles.d.ts +64 -0
- package/lib-commonjs/createArrowStyles.js +100 -0
- package/lib-commonjs/createArrowStyles.js.map +1 -0
- package/lib-commonjs/createVirtualElementFromClick.js +23 -16
- package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
- package/lib-commonjs/index.d.ts +2 -1
- package/lib-commonjs/index.js +28 -6
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types.d.ts +28 -7
- package/lib-commonjs/types.js +4 -1
- package/lib-commonjs/types.js.map +1 -1
- package/lib-commonjs/usePopper.d.ts +2 -14
- package/lib-commonjs/usePopper.js +382 -316
- package/lib-commonjs/usePopper.js.map +1 -1
- package/lib-commonjs/usePopperMouseTarget.js +38 -25
- package/lib-commonjs/usePopperMouseTarget.js.map +1 -1
- package/lib-commonjs/utils/getBasePlacement.js +7 -2
- package/lib-commonjs/utils/getBasePlacement.js.map +1 -1
- package/lib-commonjs/utils/getBoundary.js +23 -12
- package/lib-commonjs/utils/getBoundary.js.map +1 -1
- package/lib-commonjs/utils/getReactFiberFromNode.js +44 -36
- package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
- package/lib-commonjs/utils/getScrollParent.js +53 -33
- package/lib-commonjs/utils/getScrollParent.js.map +1 -1
- package/lib-commonjs/utils/index.js +14 -2
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/mergeArrowOffset.js +35 -25
- package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
- package/lib-commonjs/utils/positioningHelper.d.ts +2 -2
- package/lib-commonjs/utils/positioningHelper.js +46 -31
- package/lib-commonjs/utils/positioningHelper.js.map +1 -1
- package/lib-commonjs/utils/resolvePositioningShorthand.js +65 -22
- package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib-commonjs/utils/useCallbackRef.js +45 -32
- package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
- package/package.json +7 -8
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usePopper.js","sourceRoot":"","sources":["../src/usePopper.ts"],"names":[],"mappings":";;;AAAA,+DAAkH;AAClH,2EAA4D;AAC5D,yCAQuB;AACvB,2CAA2C;AAC3C,+BAA+B;AA4B/B,EAAE;AACF,uDAAuD;AACvD,EAAE;AAEF;;;GAGG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A;AAA3B,GAAP;AACD;;AAxLD,OAAA,CAAA,SAAA,GAAA,SAAA","sourceRoot":""}
|
@@ -1,8 +1,13 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.usePopperMouseTarget = void 0;
|
4
|
-
|
5
|
-
const
|
7
|
+
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
|
+
|
10
|
+
const createVirtualElementFromClick_1 = /*#__PURE__*/require("./createVirtualElementFromClick");
|
6
11
|
/**
|
7
12
|
* A state hook that manages a popper virtual element from mouseevents.
|
8
13
|
* Useful for scenarios where a component needs to be positioned by mouse click (e.g. contextmenu)
|
@@ -11,28 +16,36 @@ const createVirtualElementFromClick_1 = require("./createVirtualElementFromClick
|
|
11
16
|
* @param initialState - initializes a user provided state similare to useState
|
12
17
|
* @returns state and dispatcher for a Popper virtual element that uses native/synthetic mouse events
|
13
18
|
*/
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
19
|
+
|
20
|
+
|
21
|
+
const usePopperMouseTarget = initialState => {
|
22
|
+
const [virtualElement, setVirtualElement] = React.useState(initialState);
|
23
|
+
|
24
|
+
const setVirtualMouseTarget = event => {
|
25
|
+
if (event === undefined || event === null) {
|
26
|
+
setVirtualElement(undefined);
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
|
30
|
+
let mouseevent;
|
31
|
+
|
32
|
+
if (!(event instanceof MouseEvent)) {
|
33
|
+
mouseevent = event.nativeEvent;
|
34
|
+
} else {
|
35
|
+
mouseevent = event;
|
36
|
+
}
|
37
|
+
|
38
|
+
if (!(mouseevent instanceof MouseEvent) && process.env.NODE_ENV !== 'production') {
|
39
|
+
// eslint-disable-next-line no-console
|
40
|
+
console.error('usePopperMouseTarget should only be used with MouseEvent');
|
41
|
+
}
|
42
|
+
|
43
|
+
const contextTarget = createVirtualElementFromClick_1.createVirtualElementFromClick(mouseevent);
|
44
|
+
setVirtualElement(contextTarget);
|
45
|
+
};
|
46
|
+
|
47
|
+
return [virtualElement, setVirtualMouseTarget];
|
36
48
|
};
|
49
|
+
|
37
50
|
exports.usePopperMouseTarget = usePopperMouseTarget;
|
38
51
|
//# sourceMappingURL=usePopperMouseTarget.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../src/usePopperMouseTarget.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,+BAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;AAGA;;;;;;;AAOG;;;AACI,MAAM,oBAAoB,GAAI,YAAD,IAA6E;AAC/G,QAAM,CAAC,cAAD,EAAiB,iBAAjB,IAAsC,KAAK,CAAC,QAAN,CAAoD,YAApD,CAA5C;;AAEA,QAAM,qBAAqB,GAAI,KAAD,IAA4D;AACxF,QAAI,KAAK,KAAK,SAAV,IAAuB,KAAK,KAAK,IAArC,EAA2C;AACzC,MAAA,iBAAiB,CAAC,SAAD,CAAjB;AACA;AACD;;AAED,QAAI,UAAJ;;AACA,QAAI,EAAE,KAAK,YAAY,UAAnB,CAAJ,EAAoC;AAClC,MAAA,UAAU,GAAG,KAAK,CAAC,WAAnB;AACD,KAFD,MAEO;AACL,MAAA,UAAU,GAAG,KAAb;AACD;;AAED,QAAI,EAAE,UAAU,YAAY,UAAxB,KAAuC,OAAO,CAAC,GAAR,CAAY,QAAZ,KAAyB,YAApE,EAAkF;AAChF;AACA,MAAA,OAAO,CAAC,KAAR,CAAc,0DAAd;AACD;;AAED,UAAM,aAAa,GAAG,+BAAA,CAAA,6BAAA,CAA8B,UAA9B,CAAtB;AACA,IAAA,iBAAiB,CAAC,aAAD,CAAjB;AACD,GApBD;;AAsBA,SAAO,CAAC,cAAD,EAAiB,qBAAjB,CAAP;AACD,CA1BM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourceRoot":""}
|
@@ -1,5 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.getBasePlacement = void 0;
|
4
7
|
/**
|
5
8
|
* Returns the base placement value
|
@@ -7,8 +10,10 @@ exports.getBasePlacement = void 0;
|
|
7
10
|
*
|
8
11
|
* @returns bottom-start -> bottom
|
9
12
|
*/
|
13
|
+
|
10
14
|
function getBasePlacement(placement) {
|
11
|
-
|
15
|
+
return placement.split('-')[0];
|
12
16
|
}
|
17
|
+
|
13
18
|
exports.getBasePlacement = getBasePlacement;
|
14
19
|
//# sourceMappingURL=getBasePlacement.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/utils/getBasePlacement.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;AAKG;;AACH,SAAgB,gBAAhB,CAAiC,SAAjC,EAA8D;AAC5D,SAAO,SAAS,CAAC,KAAV,CAAgB,GAAhB,EAAqB,CAArB,CAAP;AACD;;AAFD,OAAA,CAAA,gBAAA,GAAA,gBAAA","sourceRoot":""}
|
@@ -1,22 +1,33 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.getBoundary = void 0;
|
4
|
-
|
7
|
+
|
8
|
+
const getScrollParent_1 = /*#__PURE__*/require("./getScrollParent");
|
5
9
|
/**
|
6
10
|
* Allows to mimic a behavior from V1 of Popper and accept `window` and `scrollParent` as strings.
|
7
11
|
*/
|
12
|
+
|
13
|
+
|
8
14
|
function getBoundary(element, boundary) {
|
9
|
-
|
10
|
-
|
15
|
+
if (boundary === 'window') {
|
16
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument.documentElement;
|
17
|
+
}
|
18
|
+
|
19
|
+
if (boundary === 'scrollParent') {
|
20
|
+
let boundariesNode = getScrollParent_1.getScrollParent(element);
|
21
|
+
|
22
|
+
if (boundariesNode.nodeName === 'BODY') {
|
23
|
+
boundariesNode = element === null || element === void 0 ? void 0 : element.ownerDocument.documentElement;
|
11
24
|
}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
return boundariesNode;
|
18
|
-
}
|
19
|
-
return boundary;
|
25
|
+
|
26
|
+
return boundariesNode;
|
27
|
+
}
|
28
|
+
|
29
|
+
return boundary;
|
20
30
|
}
|
31
|
+
|
21
32
|
exports.getBoundary = getBoundary;
|
22
33
|
//# sourceMappingURL=getBoundary.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/utils/getBoundary.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAGA;;AAEG;;;AACH,SAAgB,WAAhB,CAA4B,OAA5B,EAAyD,QAAzD,EAA4E;AAC1E,MAAI,QAAQ,KAAK,QAAjB,EAA2B;AACzB,WAAO,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,CAAwB,eAA/B;AACD;;AAED,MAAI,QAAQ,KAAK,cAAjB,EAAiC;AAC/B,QAAI,cAAc,GAA4B,iBAAA,CAAA,eAAA,CAAgB,OAAhB,CAA9C;;AAEA,QAAI,cAAc,CAAC,QAAf,KAA4B,MAAhC,EAAwC;AACtC,MAAA,cAAc,GAAG,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,CAAwB,eAAzC;AACD;;AAED,WAAO,cAAP;AACD;;AAED,SAAO,QAAP;AACD;;AAhBD,OAAA,CAAA,WAAA,GAAA,WAAA","sourceRoot":""}
|
@@ -1,46 +1,54 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.getReactFiberFromNode = void 0;
|
4
7
|
var WorkTag;
|
8
|
+
|
5
9
|
(function (WorkTag) {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
10
|
+
WorkTag[WorkTag["FunctionComponent"] = 0] = "FunctionComponent";
|
11
|
+
WorkTag[WorkTag["ClassComponent"] = 1] = "ClassComponent";
|
12
|
+
WorkTag[WorkTag["IndeterminateComponent"] = 2] = "IndeterminateComponent";
|
13
|
+
WorkTag[WorkTag["HostRoot"] = 3] = "HostRoot";
|
14
|
+
WorkTag[WorkTag["HostPortal"] = 4] = "HostPortal";
|
15
|
+
WorkTag[WorkTag["HostComponent"] = 5] = "HostComponent";
|
16
|
+
WorkTag[WorkTag["HostText"] = 6] = "HostText";
|
17
|
+
WorkTag[WorkTag["Fragment"] = 7] = "Fragment";
|
18
|
+
WorkTag[WorkTag["Mode"] = 8] = "Mode";
|
19
|
+
WorkTag[WorkTag["ContextConsumer"] = 9] = "ContextConsumer";
|
20
|
+
WorkTag[WorkTag["ContextProvider"] = 10] = "ContextProvider";
|
21
|
+
WorkTag[WorkTag["ForwardRef"] = 11] = "ForwardRef";
|
22
|
+
WorkTag[WorkTag["Profiler"] = 12] = "Profiler";
|
23
|
+
WorkTag[WorkTag["SuspenseComponent"] = 13] = "SuspenseComponent";
|
24
|
+
WorkTag[WorkTag["MemoComponent"] = 14] = "MemoComponent";
|
25
|
+
WorkTag[WorkTag["SimpleMemoComponent"] = 15] = "SimpleMemoComponent";
|
26
|
+
WorkTag[WorkTag["LazyComponent"] = 16] = "LazyComponent";
|
27
|
+
WorkTag[WorkTag["IncompleteClassComponent"] = 17] = "IncompleteClassComponent";
|
28
|
+
WorkTag[WorkTag["DehydratedFragment"] = 18] = "DehydratedFragment";
|
29
|
+
WorkTag[WorkTag["SuspenseListComponent"] = 19] = "SuspenseListComponent";
|
30
|
+
WorkTag[WorkTag["FundamentalComponent"] = 20] = "FundamentalComponent";
|
31
|
+
WorkTag[WorkTag["ScopeComponent"] = 21] = "ScopeComponent";
|
28
32
|
})(WorkTag || (WorkTag = {}));
|
33
|
+
|
29
34
|
function getReactFiberFromNode(elm) {
|
30
|
-
|
31
|
-
|
35
|
+
if (!elm) {
|
36
|
+
return null;
|
37
|
+
}
|
38
|
+
|
39
|
+
for (const k in elm) {
|
40
|
+
// React 16 uses "__reactInternalInstance$" prefix
|
41
|
+
// React 17 uses "__reactFiber$" prefix
|
42
|
+
// https://github.com/facebook/react/pull/18377
|
43
|
+
if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {
|
44
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
45
|
+
// @ts-ignore
|
46
|
+
return elm[k];
|
32
47
|
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
// https://github.com/facebook/react/pull/18377
|
37
|
-
if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {
|
38
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
39
|
-
// @ts-ignore
|
40
|
-
return elm[k];
|
41
|
-
}
|
42
|
-
}
|
43
|
-
throw new Error('getReactFiber(): Failed to find a React Fiber on a node');
|
48
|
+
}
|
49
|
+
|
50
|
+
throw new Error('getReactFiber(): Failed to find a React Fiber on a node');
|
44
51
|
}
|
52
|
+
|
45
53
|
exports.getReactFiberFromNode = getReactFiberFromNode;
|
46
54
|
//# sourceMappingURL=getReactFiberFromNode.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/utils/getReactFiberFromNode.ts"],"names":[],"mappings":";;;;;;AAuEA,IAAK,OAAL;;AAAA,CAAA,UAAK,OAAL,EAAY;AACV,EAAA,OAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,mBAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,gBAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,wBAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,iBAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,GAAA,EAAA,CAAA,GAAA,iBAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,GAAA,EAAA,CAAA,GAAA,YAAA;AACA,EAAA,OAAA,CAAA,OAAA,CAAA,UAAA,CAAA,GAAA,EAAA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76 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.getScrollParent = exports.getParentNode = void 0;
|
4
7
|
/**
|
5
8
|
* Returns the parent node or the host of the node argument.
|
6
9
|
* @param node - DOM node.
|
7
10
|
* @returns - parent DOM node.
|
8
11
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
const getParentNode = node => {
|
14
|
+
if (node.nodeName === 'HTML') {
|
15
|
+
return node;
|
16
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
17
|
+
|
18
|
+
|
19
|
+
return node.parentNode || node.host;
|
15
20
|
};
|
21
|
+
|
16
22
|
exports.getParentNode = getParentNode;
|
17
23
|
/**
|
18
24
|
* Returns CSS styles of the given node.
|
19
25
|
* @param node - DOM node.
|
20
26
|
* @returns - CSS styles.
|
21
27
|
*/
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
28
|
+
|
29
|
+
const getStyleComputedProperty = node => {
|
30
|
+
var _a;
|
31
|
+
|
32
|
+
if (node.nodeType !== 1) {
|
33
|
+
return {};
|
34
|
+
}
|
35
|
+
|
36
|
+
const window = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
37
|
+
return window.getComputedStyle(node, null);
|
29
38
|
};
|
30
39
|
/**
|
31
40
|
* Returns the first scrollable parent of the given element.
|
32
41
|
* @param node - DOM node.
|
33
42
|
* @returns - the first scrollable parent.
|
34
43
|
*/
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
44
|
+
|
45
|
+
|
46
|
+
const getScrollParent = node => {
|
47
|
+
// Return body, `getScroll` will take care to get the correct `scrollTop` from it
|
48
|
+
const parentNode = node && exports.getParentNode(node); // eslint-disable-next-line
|
49
|
+
|
50
|
+
if (!parentNode) return document.body;
|
51
|
+
|
52
|
+
switch (parentNode.nodeName) {
|
53
|
+
case 'HTML':
|
54
|
+
case 'BODY':
|
55
|
+
return parentNode.ownerDocument.body;
|
56
|
+
|
57
|
+
case '#document':
|
58
|
+
return parentNode.body;
|
59
|
+
} // If any of the overflow props is defined for the node then we return it as the parent
|
60
|
+
|
61
|
+
|
62
|
+
const {
|
63
|
+
overflow,
|
64
|
+
overflowX,
|
65
|
+
overflowY
|
66
|
+
} = getStyleComputedProperty(parentNode);
|
67
|
+
|
68
|
+
if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
|
69
|
+
return parentNode;
|
70
|
+
}
|
71
|
+
|
72
|
+
return exports.getScrollParent(parentNode);
|
54
73
|
};
|
74
|
+
|
55
75
|
exports.getScrollParent = getScrollParent;
|
56
76
|
//# sourceMappingURL=getScrollParent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/utils/getScrollParent.ts"],"names":[],"mappings":";;;;;;AAAA;;;;AAIG;;AACI,MAAM,aAAa,GAAI,IAAD,IAAmC;AAC9D,MAAI,IAAI,CAAC,QAAL,KAAkB,MAAtB,EAA8B;AAC5B,WAAO,IAAP;AACD,GAH6D,CAI9D;;;AACA,SAAO,IAAI,CAAC,UAAL,IAAoB,IAAY,CAAC,IAAxC;AACD,CANM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb;AAQb;;;;AAIG;;AACH,MAAM,wBAAwB,GAAI,IAAD,IAAoD;;;AACnF,MAAI,IAAI,CAAC,QAAL,KAAkB,CAAtB,EAAyB;AACvB,WAAO,EAAP;AACD;;AAED,QAAM,MAAM,GAAG,CAAA,EAAA,GAAA,IAAI,CAAC,aAAL,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,WAAnC;AACA,SAAO,MAAO,CAAC,gBAAR,CAAyB,IAAzB,EAA+B,IAA/B,CAAP;AACD,CAPD;AASA;;;;AAIG;;;AACI,MAAM,eAAe,GAAI,IAAD,IAAqD;AAClF;AACA,QAAM,UAAU,GAAG,IAAI,IAAI,OAAA,CAAA,aAAA,CAAc,IAAd,CAA3B,CAFkF,CAGlF;;AACA,MAAI,CAAC,UAAL,EAAiB,OAAO,QAAQ,CAAC,IAAhB;;AAEjB,UAAQ,UAAU,CAAC,QAAnB;AACE,SAAK,MAAL;AACA,SAAK,MAAL;AACE,aAAO,UAAU,CAAC,aAAX,CAA0B,IAAjC;;AACF,SAAK,WAAL;AACE,aAAS,UAAmC,CAAC,IAA7C;AALJ,GANkF,CAclF;;;AACA,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA,SAAZ;AAAuB,IAAA;AAAvB,MAAqC,wBAAwB,CAAC,UAAD,CAAnE;;AACA,MAAI,wBAAwB,IAAxB,CAA6B,QAAS,GAAG,SAAZ,GAAyB,SAAtD,CAAJ,EAAsE;AACpE,WAAO,UAAP;AACD;;AAED,SAAO,OAAA,CAAA,eAAA,CAAgB,UAAhB,CAAP;AACD,CArBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourceRoot":""}
|
@@ -1,12 +1,24 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
|
+
|
4
9
|
tslib_1.__exportStar(require("./getBasePlacement"), exports);
|
10
|
+
|
5
11
|
tslib_1.__exportStar(require("./getBoundary"), exports);
|
12
|
+
|
6
13
|
tslib_1.__exportStar(require("./getReactFiberFromNode"), exports);
|
14
|
+
|
7
15
|
tslib_1.__exportStar(require("./getScrollParent"), exports);
|
16
|
+
|
8
17
|
tslib_1.__exportStar(require("./mergeArrowOffset"), exports);
|
18
|
+
|
9
19
|
tslib_1.__exportStar(require("./positioningHelper"), exports);
|
20
|
+
|
10
21
|
tslib_1.__exportStar(require("./resolvePositioningShorthand"), exports);
|
22
|
+
|
11
23
|
tslib_1.__exportStar(require("./useCallbackRef"), exports);
|
12
24
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,+BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
|
@@ -1,5 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
3
6
|
exports.mergeArrowOffset = void 0;
|
4
7
|
/**
|
5
8
|
* Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the
|
@@ -9,33 +12,40 @@ exports.mergeArrowOffset = void 0;
|
|
9
12
|
* @param arrowHeight - The height of the arrow in px
|
10
13
|
* @returns User offset augmented with arrow height
|
11
14
|
*/
|
15
|
+
|
12
16
|
function mergeArrowOffset(userOffset, arrowHeight) {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
17
|
+
let offsetWithArrow = userOffset;
|
18
|
+
|
19
|
+
if (!userOffset) {
|
20
|
+
return [0, arrowHeight];
|
21
|
+
}
|
22
|
+
|
23
|
+
if (Array.isArray(offsetWithArrow)) {
|
24
|
+
setArrowOffset(offsetWithArrow, arrowHeight);
|
25
|
+
return offsetWithArrow;
|
26
|
+
}
|
27
|
+
|
28
|
+
if (typeof offsetWithArrow === 'function') {
|
29
|
+
const userOffsetFn = offsetWithArrow;
|
30
|
+
|
31
|
+
offsetWithArrow = offsetParams => {
|
32
|
+
const offset = userOffsetFn(offsetParams);
|
33
|
+
setArrowOffset(offset, arrowHeight);
|
34
|
+
return offset;
|
35
|
+
};
|
36
|
+
} // This should never happen
|
37
|
+
|
38
|
+
|
39
|
+
return [0, 0];
|
31
40
|
}
|
41
|
+
|
32
42
|
exports.mergeArrowOffset = mergeArrowOffset;
|
43
|
+
|
33
44
|
const setArrowOffset = (offset, arrowHeight) => {
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
}
|
45
|
+
if (offset[1] !== null && offset[1] !== undefined) {
|
46
|
+
offset[1] += arrowHeight;
|
47
|
+
} else {
|
48
|
+
offset[1] = arrowHeight;
|
49
|
+
}
|
40
50
|
};
|
41
51
|
//# sourceMappingURL=mergeArrowOffset.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/utils/mergeArrowOffset.ts"],"names":[],"mappings":";;;;;;AAEA;;;;;;;AAOG;;AACH,SAAgB,gBAAhB,CAAiC,UAAjC,EAAwE,WAAxE,EAA2F;AACzF,MAAI,eAAe,GAAG,UAAtB;;AACA,MAAI,CAAC,UAAL,EAAiB;AACf,WAAO,CAAC,CAAD,EAAI,WAAJ,CAAP;AACD;;AAED,MAAI,KAAK,CAAC,OAAN,CAAc,eAAd,CAAJ,EAAoC;AAClC,IAAA,cAAc,CAAC,eAAD,EAAkB,WAAlB,CAAd;AACA,WAAO,eAAP;AACD;;AAED,MAAI,OAAO,eAAP,KAA2B,UAA/B,EAA2C;AACzC,UAAM,YAAY,GAAG,eAArB;;AACA,IAAA,eAAe,GAAG,YAAY,IAAG;AAC/B,YAAM,MAAM,GAAG,YAAY,CAAC,YAAD,CAA3B;AACA,MAAA,cAAc,CAAC,MAAD,EAAS,WAAT,CAAd;AACA,aAAO,MAAP;AACD,KAJD;AAKD,GAlBwF,CAoBzF;;;AACA,SAAO,CAAC,CAAD,EAAI,CAAJ,CAAP;AACD;;AAtBD,OAAA,CAAA,gBAAA,GAAA,gBAAA;;AAwBA,MAAM,cAAc,GAAG,CAAC,MAAD,EAAiE,WAAjE,KAAwF;AAC7G,MAAI,MAAM,CAAC,CAAD,CAAN,KAAc,IAAd,IAAsB,MAAM,CAAC,CAAD,CAAN,KAAc,SAAxC,EAAmD;AACjD,IAAA,MAAM,CAAC,CAAD,CAAN,IAAa,WAAb;AACD,GAFD,MAEO;AACL,IAAA,MAAM,CAAC,CAAD,CAAN,GAAY,WAAZ;AACD;AACF,CAND","sourceRoot":""}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as PopperJs from '@popperjs/core';
|
2
|
-
import type { Offset } from '../types';
|
2
|
+
import type { Alignment, Offset, Position } from '../types';
|
3
3
|
/**
|
4
4
|
* @see positioninHelper.test.ts for expected placement values
|
5
5
|
*/
|
6
|
-
export declare const getPlacement: (align?:
|
6
|
+
export declare const getPlacement: (align?: Alignment | undefined, position?: Position | undefined, rtl?: boolean | undefined) => PopperJs.Placement;
|
7
7
|
export declare const applyRtlToOffset: (offset: Offset | undefined) => Offset | undefined;
|