@fluentui/react-portal 0.0.0-nightly-20230321-0440.1 → 0.0.0-nightly-20230324-0422.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.swcrc +30 -0
- package/CHANGELOG.json +48 -9
- package/CHANGELOG.md +20 -7
- package/lib/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.js +1 -0
- package/lib/components/Portal/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.types.js +1 -1
- package/lib/components/Portal/Portal.types.js.map +1 -1
- package/lib/components/Portal/index.js.map +1 -1
- package/lib/components/Portal/renderPortal.js.map +1 -1
- package/lib/components/Portal/usePortal.js.map +1 -1
- package/lib/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/virtualParent/elementContains.js.map +1 -1
- package/lib/virtualParent/getParent.js.map +1 -1
- package/lib/virtualParent/index.js.map +1 -1
- package/lib/virtualParent/isVirtualElement.js +1 -2
- package/lib/virtualParent/isVirtualElement.js.map +1 -1
- package/lib/virtualParent/setVirtualParent.js +1 -2
- package/lib/virtualParent/setVirtualParent.js.map +1 -1
- package/lib/virtualParent/types.js.map +1 -1
- package/lib-commonjs/Portal.js +5 -4
- package/lib-commonjs/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.js +14 -14
- package/lib-commonjs/components/Portal/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.types.js +5 -2
- package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
- package/lib-commonjs/components/Portal/index.js +8 -7
- package/lib-commonjs/components/Portal/index.js.map +1 -1
- package/lib-commonjs/components/Portal/renderPortal.js +15 -15
- package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortal.js +56 -55
- package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortalMountNode.js +86 -68
- package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib-commonjs/index.js +17 -34
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/virtualParent/elementContains.js +26 -30
- package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
- package/lib-commonjs/virtualParent/getParent.js +19 -22
- package/lib-commonjs/virtualParent/getParent.js.map +1 -1
- package/lib-commonjs/virtualParent/index.js +6 -5
- package/lib-commonjs/virtualParent/index.js.map +1 -1
- package/lib-commonjs/virtualParent/isVirtualElement.js +11 -10
- package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
- package/lib-commonjs/virtualParent/setVirtualParent.js +18 -17
- package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
- package/lib-commonjs/virtualParent/types.js +3 -2
- package/lib-commonjs/virtualParent/types.js.map +1 -1
- package/package.json +6 -6
@@ -1,24 +1,25 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.setVirtualParent = void 0;
|
7
1
|
/**
|
8
2
|
* Sets the virtual parent of an element.
|
9
3
|
*
|
10
4
|
* @param child - Theme element to set the virtual parent
|
11
5
|
* @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
|
12
|
-
*/
|
6
|
+
*/ "use strict";
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
Object.defineProperty(exports, "setVirtualParent", {
|
11
|
+
enumerable: true,
|
12
|
+
get: ()=>setVirtualParent
|
13
|
+
});
|
13
14
|
function setVirtualParent(child, parent) {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
|
15
|
+
if (!child) {
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
const virtualChild = child;
|
19
|
+
if (!virtualChild._virtual) {
|
20
|
+
virtualChild._virtual = {};
|
21
|
+
}
|
22
|
+
virtualChild._virtual.parent = parent;
|
23
|
+
} //# sourceMappingURL=setVirtualParent.js.map
|
24
|
+
|
24
25
|
//# sourceMappingURL=setVirtualParent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/virtualParent/setVirtualParent.js"],"sourcesContent":["/**\n * Sets the virtual parent of an element.\n *\n * @param child - Theme element to set the virtual parent\n * @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship\n */export function setVirtualParent(child, parent) {\n if (!child) {\n return;\n }\n const virtualChild = child;\n if (!virtualChild._virtual) {\n virtualChild._virtual = {};\n }\n virtualChild._virtual.parent = parent;\n}\n//# sourceMappingURL=setVirtualParent.js.map"],"names":["setVirtualParent","child","parent","virtualChild","_virtual"],"mappings":"AAAA;;;;;CAKC;;;;+BAAkBA;;aAAAA;;AAAT,SAASA,iBAAiBC,KAAK,EAAEC,MAAM,EAAE;IACjD,IAAI,CAACD,OAAO;QACV;IACF,CAAC;IACD,MAAME,eAAeF;IACrB,IAAI,CAACE,aAAaC,QAAQ,EAAE;QAC1BD,aAAaC,QAAQ,GAAG,CAAC;IAC3B,CAAC;IACDD,aAAaC,QAAQ,CAACF,MAAM,GAAGA;AACjC,EACA,4CAA4C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../lib/virtualParent/types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=types.js.map"],"names":[],"mappings":";;;;CACA,iCAAiC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-portal",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20230324-0422.1",
|
4
4
|
"description": "A utility component that creates portals compatible with Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"storybook": "start-storybook",
|
24
24
|
"type-check": "tsc -b tsconfig.json",
|
25
|
-
"generate-api": "
|
25
|
+
"generate-api": "just-scripts generate-api"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
@@ -31,11 +31,11 @@
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
35
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
36
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
34
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230324-0422.1",
|
35
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20230324-0422.1",
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230324-0422.1",
|
37
37
|
"@griffel/react": "^1.5.2",
|
38
|
-
"
|
38
|
+
"@swc/helpers": "^0.4.14",
|
39
39
|
"use-disposable": "^1.0.1"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|