@fluentui/react-portal 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.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/CHANGELOG.json +9 -9
- package/CHANGELOG.md +7 -7
- package/lib/Portal.js +1 -1
- package/lib/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.js +3 -4
- 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 +4 -4
- package/lib/components/Portal/index.js.map +1 -1
- package/lib/components/Portal/renderPortal.js +2 -2
- package/lib/components/Portal/renderPortal.js.map +1 -1
- package/lib/components/Portal/usePortal.js +6 -6
- package/lib/components/Portal/usePortal.js.map +1 -1
- package/lib/components/Portal/usePortalMountNode.js +11 -11
- package/lib/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/virtualParent/elementContains.js +1 -1
- package/lib/virtualParent/elementContains.js.map +1 -1
- package/lib/virtualParent/getParent.js +2 -2
- package/lib/virtualParent/getParent.js.map +1 -1
- package/lib/virtualParent/index.js +2 -2
- package/lib/virtualParent/index.js.map +1 -1
- package/lib/virtualParent/isVirtualElement.js +2 -1
- package/lib/virtualParent/isVirtualElement.js.map +1 -1
- package/lib/virtualParent/setVirtualParent.js +2 -1
- package/lib/virtualParent/setVirtualParent.js.map +1 -1
- package/lib/virtualParent/types.js.map +1 -1
- package/lib-commonjs/Portal.js +4 -5
- 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 +2 -5
- package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
- package/lib-commonjs/components/Portal/index.js +7 -8
- 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 +55 -56
- package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortalMountNode.js +68 -86
- package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib-commonjs/index.js +34 -17
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/virtualParent/elementContains.js +30 -26
- package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
- package/lib-commonjs/virtualParent/getParent.js +22 -19
- package/lib-commonjs/virtualParent/getParent.js.map +1 -1
- package/lib-commonjs/virtualParent/index.js +5 -6
- package/lib-commonjs/virtualParent/index.js.map +1 -1
- package/lib-commonjs/virtualParent/isVirtualElement.js +10 -11
- package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
- package/lib-commonjs/virtualParent/setVirtualParent.js +17 -18
- package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
- package/lib-commonjs/virtualParent/types.js +2 -3
- package/lib-commonjs/virtualParent/types.js.map +1 -1
- package/package.json +8 -7
- package/.swcrc +0 -39
@@ -1,25 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.setVirtualParent = void 0;
|
1
7
|
/**
|
2
8
|
* Sets the virtual parent of an element.
|
3
9
|
*
|
4
10
|
* @param child - Theme element to set the virtual parent
|
5
11
|
* @param parent - The virtual parent, use `undefined` to remove a virtual parent relationship
|
6
|
-
*/
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
8
|
-
value: true
|
9
|
-
});
|
10
|
-
Object.defineProperty(exports, "setVirtualParent", {
|
11
|
-
enumerable: true,
|
12
|
-
get: ()=>setVirtualParent
|
13
|
-
});
|
12
|
+
*/
|
14
13
|
function setVirtualParent(child, parent) {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
}
|
24
|
-
|
14
|
+
if (!child) {
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
const virtualChild = child;
|
18
|
+
if (!virtualChild._virtual) {
|
19
|
+
virtualChild._virtual = {};
|
20
|
+
}
|
21
|
+
virtualChild._virtual.parent = parent;
|
22
|
+
}
|
23
|
+
exports.setVirtualParent = setVirtualParent;
|
25
24
|
//# sourceMappingURL=setVirtualParent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":["setVirtualParent","child","parent","virtualChild","_virtual","exports"],"sources":["../../../../../../../../packages/react-components/react-portal/src/virtualParent/setVirtualParent.ts"],"sourcesContent":["import type { VirtualElement } from './types';\n\n/**\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 */\nexport function setVirtualParent(child: Node, parent?: Node): void {\n if (!child) {\n return;\n }\n\n const virtualChild = child as VirtualElement;\n\n if (!virtualChild._virtual) {\n virtualChild._virtual = {};\n }\n\n virtualChild._virtual.parent = parent;\n}\n"],"mappings":";;;;;;AAEA;;;;;;AAMA,SAAgBA,gBAAgBA,CAACC,KAAW,EAAEC,MAAa;EACzD,IAAI,CAACD,KAAK,EAAE;IACV;;EAGF,MAAME,YAAY,GAAGF,KAAuB;EAE5C,IAAI,CAACE,YAAY,CAACC,QAAQ,EAAE;IAC1BD,YAAY,CAACC,QAAQ,GAAG,EAAE;;EAG5BD,YAAY,CAACC,QAAQ,CAACF,MAAM,GAAGA,MAAM;AACvC;AAZAG,OAAA,CAAAL,gBAAA,GAAAA,gBAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"names":[],"sources":["../../../../../../../../packages/react-components/react-portal/src/virtualParent/types.ts"],"sourcesContent":["export interface VirtualElement extends Node {\n _virtual: {\n parent?: Node;\n };\n}\n"],"mappings":""}
|
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-20230321-0440.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": "just-scripts
|
25
|
+
"generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
|
26
26
|
},
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
@@ -31,12 +31,12 @@
|
|
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-20230321-0440.1",
|
35
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20230321-0440.1",
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230321-0440.1",
|
37
37
|
"@griffel/react": "^1.5.2",
|
38
|
-
"
|
39
|
-
"
|
38
|
+
"tslib": "^2.1.0",
|
39
|
+
"use-disposable": "^1.0.1"
|
40
40
|
},
|
41
41
|
"peerDependencies": {
|
42
42
|
"@types/react": ">=16.8.0 <19.0.0",
|
@@ -48,6 +48,7 @@
|
|
48
48
|
"exports": {
|
49
49
|
".": {
|
50
50
|
"types": "./dist/index.d.ts",
|
51
|
+
"node": "./lib-commonjs/index.js",
|
51
52
|
"import": "./lib/index.js",
|
52
53
|
"require": "./lib-commonjs/index.js"
|
53
54
|
},
|
package/.swcrc
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
-
"env": {
|
4
|
-
"targets": {
|
5
|
-
"chrome": "84",
|
6
|
-
"edge": "84",
|
7
|
-
"firefox": "75",
|
8
|
-
"opera": "73",
|
9
|
-
"safari": "14.1"
|
10
|
-
},
|
11
|
-
"bugfixes": true
|
12
|
-
},
|
13
|
-
"exclude": [
|
14
|
-
"/testing",
|
15
|
-
"/**/*.cy.ts",
|
16
|
-
"/**/*.cy.tsx",
|
17
|
-
"/**/*.spec.ts",
|
18
|
-
"/**/*.spec.tsx",
|
19
|
-
"/**/*.test.ts",
|
20
|
-
"/**/*.test.tsx"
|
21
|
-
],
|
22
|
-
"jsc": {
|
23
|
-
"parser": {
|
24
|
-
"syntax": "typescript",
|
25
|
-
"tsx": true,
|
26
|
-
"decorators": false,
|
27
|
-
"dynamicImport": false
|
28
|
-
},
|
29
|
-
"externalHelpers": true,
|
30
|
-
"transform": {
|
31
|
-
"react": {
|
32
|
-
"runtime": "classic",
|
33
|
-
"useSpread": true
|
34
|
-
}
|
35
|
-
}
|
36
|
-
},
|
37
|
-
"minify": false,
|
38
|
-
"sourceMaps": true
|
39
|
-
}
|