@fluentui/react-portal 9.0.0-rc.11 → 9.0.0-rc.14
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 +70 -1
- package/CHANGELOG.md +33 -2
- package/lib/components/Portal/usePortalMountNode.js +1 -1
- package/lib/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortalMountNode.js +2 -2
- package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,76 @@
|
|
|
2
2
|
"name": "@fluentui/react-portal",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 21 Jun 2022 17:09:28 GMT",
|
|
6
|
+
"tag": "@fluentui/react-portal_v9.0.0-rc.14",
|
|
7
|
+
"version": "9.0.0-rc.14",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui/react-portal",
|
|
13
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.11",
|
|
14
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-portal",
|
|
19
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.14",
|
|
20
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Tue, 31 May 2022 21:28:41 GMT",
|
|
27
|
+
"tag": "@fluentui/react-portal_v9.0.0-rc.13",
|
|
28
|
+
"version": "9.0.0-rc.13",
|
|
29
|
+
"comments": {
|
|
30
|
+
"prerelease": [
|
|
31
|
+
{
|
|
32
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
33
|
+
"package": "@fluentui/react-portal",
|
|
34
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd",
|
|
35
|
+
"comment": "updates import to react-shared-components"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui/react-portal",
|
|
40
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.10",
|
|
41
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui/react-portal",
|
|
46
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.13",
|
|
47
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui/react-portal",
|
|
52
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.10",
|
|
53
|
+
"commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"date": "Thu, 26 May 2022 21:01:32 GMT",
|
|
60
|
+
"tag": "@fluentui/react-portal_v9.0.0-rc.12",
|
|
61
|
+
"version": "9.0.0-rc.12",
|
|
62
|
+
"comments": {
|
|
63
|
+
"prerelease": [
|
|
64
|
+
{
|
|
65
|
+
"author": "beachball",
|
|
66
|
+
"package": "@fluentui/react-portal",
|
|
67
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.12",
|
|
68
|
+
"commit": "3cf55ce998048554bf6a550de44403843ea8ede0"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"date": "Mon, 23 May 2022 18:56:51 GMT",
|
|
6
75
|
"tag": "@fluentui/react-portal_v9.0.0-rc.11",
|
|
7
76
|
"version": "9.0.0-rc.11",
|
|
8
77
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-portal
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 21 Jun 2022 17:09:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-rc.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.14)
|
|
8
|
+
|
|
9
|
+
Tue, 21 Jun 2022 17:09:28 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.13..@fluentui/react-portal_v9.0.0-rc.14)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.11 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
|
15
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
|
16
|
+
|
|
17
|
+
## [9.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.13)
|
|
18
|
+
|
|
19
|
+
Tue, 31 May 2022 21:28:41 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.12..@fluentui/react-portal_v9.0.0-rc.13)
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- updates import to react-shared-components ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by bernardo.sunderhus@gmail.com)
|
|
25
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
|
26
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
|
27
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
|
|
28
|
+
|
|
29
|
+
## [9.0.0-rc.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.12)
|
|
30
|
+
|
|
31
|
+
Thu, 26 May 2022 21:01:32 GMT
|
|
32
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.11..@fluentui/react-portal_v9.0.0-rc.12)
|
|
33
|
+
|
|
34
|
+
### Changes
|
|
35
|
+
|
|
36
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
|
|
37
|
+
|
|
7
38
|
## [9.0.0-rc.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.11)
|
|
8
39
|
|
|
9
|
-
Mon, 23 May 2022 18:
|
|
40
|
+
Mon, 23 May 2022 18:56:51 GMT
|
|
10
41
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.10..@fluentui/react-portal_v9.0.0-rc.11)
|
|
11
42
|
|
|
12
43
|
### Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';
|
|
3
|
-
import { useThemeClassName, useFluent } from '@fluentui/react-shared-contexts';
|
|
3
|
+
import { useThemeClassName_unstable as useThemeClassName, useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
|
|
4
4
|
import { useKeyboardNavAttribute } from '@fluentui/react-tabster';
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new element on a document.body to mount portals
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Portal/usePortalMountNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,2BAA1C;AACA,
|
|
1
|
+
{"version":3,"sources":["components/Portal/usePortalMountNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,2BAA1C;AACA,SACE,0BAA0B,IAAI,iBADhC,EAEE,kBAAkB,IAAI,SAFxB,QAGO,iCAHP;AAIA,SAAS,uBAAT,QAAwC,yBAAxC;AASA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,GAAI,OAAD,IAA2D;AAC3F,QAAM,cAAc,GAAG,iBAAiB,EAAxC;AACA,QAAM;AAAE,IAAA,cAAF;AAAkB,IAAA;AAAlB,MAA0B,SAAS,EAAzC;AAEA,QAAM,OAAO,GAAG,KAAK,CAAC,OAAN,CAAc,MAAK;AACjC,QAAI,cAAc,KAAK,SAAnB,IAAgC,OAAO,CAAC,QAA5C,EAAsD;AACpD,aAAO,IAAP;AACD;;AAED,UAAM,UAAU,GAAG,cAAc,CAAC,aAAf,CAA6B,KAA7B,CAAnB;AACA,IAAA,UAAU,CAAC,YAAX,CAAwB,OAAxB,EAAiC,cAAjC;AACA,IAAA,UAAU,CAAC,YAAX,CAAwB,KAAxB,EAA+B,GAA/B;AACA,IAAA,cAAc,CAAC,IAAf,CAAoB,WAApB,CAAgC,UAAhC;AAEA,WAAO,UAAP;AACD,GAXe,EAWb,CAAC,cAAD,EAAiB,cAAjB,EAAiC,GAAjC,EAAsC,OAAO,CAAC,QAA9C,CAXa,CAAhB;AAaC,EAAA,uBAAuB,GAA2C,OAAlE,GAA4E,OAA5E;AAED,EAAA,yBAAyB,CAAC,MAAK;AAC7B,WAAO,MAAK;;;AACV,OAAA,EAAA,GAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,KAAA,CAAtB,GAAsB,EAAA,CAAE,WAAF,CAAc,OAAd,CAAtB;AACD,KAFD;AAGD,GAJwB,EAItB,CAAC,OAAD,CAJsB,CAAzB;AAMA,SAAO,OAAP;AACD,CA1BM","sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport {\n useThemeClassName_unstable as useThemeClassName,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport { useKeyboardNavAttribute } from '@fluentui/react-tabster';\n\nexport type UsePortalMountNodeOptions = {\n /**\n * Since hooks cannot be called conditionally use this flag to disable creating the node\n */\n disabled?: boolean;\n};\n\n/**\n * Creates a new element on a document.body to mount portals\n */\nexport const usePortalMountNode = (options: UsePortalMountNodeOptions): HTMLElement | null => {\n const themeClassName = useThemeClassName();\n const { targetDocument, dir } = useFluent();\n\n const element = React.useMemo(() => {\n if (targetDocument === undefined || options.disabled) {\n return null;\n }\n\n const newElement = targetDocument.createElement('div');\n newElement.setAttribute('class', themeClassName);\n newElement.setAttribute('dir', dir);\n targetDocument.body.appendChild(newElement);\n\n return newElement;\n }, [targetDocument, themeClassName, dir, options.disabled]);\n\n (useKeyboardNavAttribute() as React.MutableRefObject<HTMLElement>).current = element!;\n\n useIsomorphicLayoutEffect(() => {\n return () => {\n element?.parentElement?.removeChild(element);\n };\n }, [element]);\n\n return element;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -18,11 +18,11 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
const usePortalMountNode = options => {
|
|
21
|
-
const themeClassName = react_shared_contexts_1.
|
|
21
|
+
const themeClassName = react_shared_contexts_1.useThemeClassName_unstable();
|
|
22
22
|
const {
|
|
23
23
|
targetDocument,
|
|
24
24
|
dir
|
|
25
|
-
} = react_shared_contexts_1.
|
|
25
|
+
} = react_shared_contexts_1.useFluent_unstable();
|
|
26
26
|
const element = React.useMemo(() => {
|
|
27
27
|
if (targetDocument === undefined || options.disabled) {
|
|
28
28
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Portal/usePortalMountNode.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;
|
|
1
|
+
{"version":3,"sources":["components/Portal/usePortalMountNode.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAIA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AASA;;AAEG;;;AACI,MAAM,kBAAkB,GAAI,OAAD,IAA2D;AAC3F,QAAM,cAAc,GAAG,uBAAA,CAAA,0BAAA,EAAvB;AACA,QAAM;AAAE,IAAA,cAAF;AAAkB,IAAA;AAAlB,MAA0B,uBAAA,CAAA,kBAAA,EAAhC;AAEA,QAAM,OAAO,GAAG,KAAK,CAAC,OAAN,CAAc,MAAK;AACjC,QAAI,cAAc,KAAK,SAAnB,IAAgC,OAAO,CAAC,QAA5C,EAAsD;AACpD,aAAO,IAAP;AACD;;AAED,UAAM,UAAU,GAAG,cAAc,CAAC,aAAf,CAA6B,KAA7B,CAAnB;AACA,IAAA,UAAU,CAAC,YAAX,CAAwB,OAAxB,EAAiC,cAAjC;AACA,IAAA,UAAU,CAAC,YAAX,CAAwB,KAAxB,EAA+B,GAA/B;AACA,IAAA,cAAc,CAAC,IAAf,CAAoB,WAApB,CAAgC,UAAhC;AAEA,WAAO,UAAP;AACD,GAXe,EAWb,CAAC,cAAD,EAAiB,cAAjB,EAAiC,GAAjC,EAAsC,OAAO,CAAC,QAA9C,CAXa,CAAhB;AAaC,EAAA,eAAA,CAAA,uBAAA,GAAkE,OAAlE,GAA4E,OAA5E;AAED,EAAA,iBAAA,CAAA,yBAAA,CAA0B,MAAK;AAC7B,WAAO,MAAK;;;AACV,OAAA,EAAA,GAAA,OAAO,KAAA,IAAP,IAAA,OAAO,KAAA,KAAA,CAAP,GAAO,KAAA,CAAP,GAAA,OAAO,CAAE,aAAT,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,KAAA,CAAtB,GAAsB,EAAA,CAAE,WAAF,CAAc,OAAd,CAAtB;AACD,KAFD;AAGD,GAJD,EAIG,CAAC,OAAD,CAJH;AAMA,SAAO,OAAP;AACD,CA1BM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport {\n useThemeClassName_unstable as useThemeClassName,\n useFluent_unstable as useFluent,\n} from '@fluentui/react-shared-contexts';\nimport { useKeyboardNavAttribute } from '@fluentui/react-tabster';\n\nexport type UsePortalMountNodeOptions = {\n /**\n * Since hooks cannot be called conditionally use this flag to disable creating the node\n */\n disabled?: boolean;\n};\n\n/**\n * Creates a new element on a document.body to mount portals\n */\nexport const usePortalMountNode = (options: UsePortalMountNodeOptions): HTMLElement | null => {\n const themeClassName = useThemeClassName();\n const { targetDocument, dir } = useFluent();\n\n const element = React.useMemo(() => {\n if (targetDocument === undefined || options.disabled) {\n return null;\n }\n\n const newElement = targetDocument.createElement('div');\n newElement.setAttribute('class', themeClassName);\n newElement.setAttribute('dir', dir);\n targetDocument.body.appendChild(newElement);\n\n return newElement;\n }, [targetDocument, themeClassName, dir, options.disabled]);\n\n (useKeyboardNavAttribute() as React.MutableRefObject<HTMLElement>).current = element!;\n\n useIsomorphicLayoutEffect(() => {\n return () => {\n element?.parentElement?.removeChild(element);\n };\n }, [element]);\n\n return element;\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-portal",
|
|
3
|
-
"version": "9.0.0-rc.
|
|
3
|
+
"version": "9.0.0-rc.14",
|
|
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",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"@fluentui/scripts": "^1.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fluentui/react-shared-contexts": "9.0.0-rc.
|
|
35
|
-
"@fluentui/react-tabster": "9.0.0-rc.
|
|
36
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
|
34
|
+
"@fluentui/react-shared-contexts": "9.0.0-rc.11",
|
|
35
|
+
"@fluentui/react-tabster": "9.0.0-rc.14",
|
|
36
|
+
"@fluentui/react-utilities": "9.0.0-rc.10",
|
|
37
37
|
"tslib": "^2.1.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|