@fluentui/react-portal 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 +184 -21
- package/CHANGELOG.md +50 -10
- package/dist/react-portal.d.ts +4 -4
- package/lib/components/Portal/Portal.js +5 -4
- package/lib/components/Portal/Portal.js.map +1 -1
- package/lib/components/Portal/Portal.types.d.ts +2 -1
- package/lib/components/Portal/renderPortal.d.ts +1 -1
- package/lib/components/Portal/renderPortal.js +6 -2
- package/lib/components/Portal/renderPortal.js.map +1 -1
- package/lib/components/Portal/usePortal.d.ts +2 -2
- package/lib/components/Portal/usePortal.js +23 -17
- package/lib/components/Portal/usePortal.js.map +1 -1
- package/lib/components/Portal/usePortalMountNode.js +27 -21
- package/lib/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib/virtualParent/elementContains.js +18 -14
- package/lib/virtualParent/elementContains.js.map +1 -1
- package/lib/virtualParent/getParent.js +2 -1
- package/lib/virtualParent/getParent.js.map +1 -1
- package/lib/virtualParent/getVirtualParent.js +8 -5
- package/lib/virtualParent/getVirtualParent.js.map +1 -1
- package/lib/virtualParent/isVirtualElement.js +1 -1
- package/lib/virtualParent/isVirtualElement.js.map +1 -1
- package/lib/virtualParent/setVirtualParent.js +11 -8
- package/lib/virtualParent/setVirtualParent.js.map +1 -1
- package/lib-commonjs/Portal.js +7 -2
- package/lib-commonjs/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.js +13 -5
- package/lib-commonjs/components/Portal/Portal.js.map +1 -1
- package/lib-commonjs/components/Portal/Portal.types.d.ts +2 -1
- package/lib-commonjs/components/Portal/Portal.types.js +4 -1
- package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
- package/lib-commonjs/components/Portal/index.js +10 -2
- package/lib-commonjs/components/Portal/index.js.map +1 -1
- package/lib-commonjs/components/Portal/renderPortal.d.ts +1 -1
- package/lib-commonjs/components/Portal/renderPortal.js +18 -7
- package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortal.d.ts +2 -2
- package/lib-commonjs/components/Portal/usePortal.js +39 -24
- package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
- package/lib-commonjs/components/Portal/usePortalMountNode.js +41 -26
- package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
- package/lib-commonjs/index.js +22 -5
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/virtualParent/elementContains.js +26 -16
- package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
- package/lib-commonjs/virtualParent/getParent.js +10 -3
- package/lib-commonjs/virtualParent/getParent.js.map +1 -1
- package/lib-commonjs/virtualParent/getVirtualParent.js +16 -7
- package/lib-commonjs/virtualParent/getVirtualParent.js.map +1 -1
- package/lib-commonjs/virtualParent/index.js +11 -2
- package/lib-commonjs/virtualParent/index.js.map +1 -1
- package/lib-commonjs/virtualParent/isVirtualElement.js +7 -2
- package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
- package/lib-commonjs/virtualParent/setVirtualParent.js +17 -9
- package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
- package/lib-commonjs/virtualParent/types.js +4 -1
- package/lib-commonjs/virtualParent/types.js.map +1 -1
- package/package.json +8 -10
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -9
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -13
- package/lib-commonjs/common/isConformant.js.map +0 -1
package/CHANGELOG.json
CHANGED
@@ -2,67 +2,230 @@
|
|
2
2
|
"name": "@fluentui/react-portal",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-portal_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Tue, 15 Feb 2022 04:11:41 GMT",
|
6
|
+
"tag": "@fluentui/react-portal_v0.0.0-nightlyfc5cfdc52420220215.1",
|
7
|
+
"version": "0.0.0-nightlyfc5cfdc52420220215.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-portal",
|
13
|
-
"commit": "
|
13
|
+
"commit": "911569f28daa07a66ee59e1d8b7cfaf6f86051e9",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
16
|
{
|
17
|
-
"author": "
|
17
|
+
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-portal",
|
19
|
-
"
|
20
|
-
"
|
19
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightlyfc5cfdc52420220215.1",
|
20
|
+
"commit": "911569f28daa07a66ee59e1d8b7cfaf6f86051e9"
|
21
21
|
},
|
22
22
|
{
|
23
|
-
"author": "
|
23
|
+
"author": "beachball",
|
24
24
|
"package": "@fluentui/react-portal",
|
25
|
-
"
|
26
|
-
"
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightlyfc5cfdc52420220215.1",
|
26
|
+
"commit": "911569f28daa07a66ee59e1d8b7cfaf6f86051e9"
|
27
27
|
},
|
28
28
|
{
|
29
29
|
"author": "beachball",
|
30
30
|
"package": "@fluentui/react-portal",
|
31
|
-
"comment": "Bump @fluentui/react-
|
32
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyfc5cfdc52420220215.1",
|
32
|
+
"commit": "911569f28daa07a66ee59e1d8b7cfaf6f86051e9"
|
33
|
+
}
|
34
|
+
]
|
35
|
+
}
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"date": "Thu, 10 Feb 2022 08:50:38 GMT",
|
39
|
+
"tag": "@fluentui/react-portal_v9.0.0-rc.1",
|
40
|
+
"version": "9.0.0-rc.1",
|
41
|
+
"comments": {
|
42
|
+
"none": [
|
43
|
+
{
|
44
|
+
"author": "olfedias@microsoft.com",
|
45
|
+
"package": "@fluentui/react-portal",
|
46
|
+
"commit": "f4883108ae74c089213780f09997115c0d547aef",
|
47
|
+
"comment": "update stories to not use CSS shorthands in styles"
|
33
48
|
},
|
34
49
|
{
|
35
|
-
"author": "
|
50
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
51
|
+
"package": "@fluentui/react-portal",
|
52
|
+
"commit": "60e153e786c586b867898109c07a51876d3bfd5a",
|
53
|
+
"comment": "Replacing use of functions in makeStyles with direct use of tokens"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "martinhochel@microsoft.com",
|
57
|
+
"package": "@fluentui/react-portal",
|
58
|
+
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
59
|
+
"comment": "chore: use storybook runner for all vNext packages"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "olfedias@microsoft.com",
|
63
|
+
"package": "@fluentui/react-portal",
|
64
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
65
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"prerelease": [
|
69
|
+
{
|
70
|
+
"author": "behowell@microsoft.com",
|
71
|
+
"package": "@fluentui/react-portal",
|
72
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
73
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"author": "mgodbolt@microsoft.com",
|
77
|
+
"package": "@fluentui/react-portal",
|
78
|
+
"commit": "839ec14849e112b85aa321d034739ec421199141",
|
79
|
+
"comment": "remove export of commons types"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"author": "lingfangao@hotmail.com",
|
83
|
+
"package": "@fluentui/react-portal",
|
84
|
+
"commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
|
85
|
+
"comment": "Bump Fluent UI packages to 9.0.0-rc"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"author": "olfedias@microsoft.com",
|
36
89
|
"package": "@fluentui/react-portal",
|
37
|
-
"
|
38
|
-
"
|
90
|
+
"commit": "d525c8b2106551865d648873210a6b48c2326ecb",
|
91
|
+
"comment": "remove unused dependency on Griffel"
|
39
92
|
},
|
40
93
|
{
|
41
94
|
"author": "beachball",
|
42
95
|
"package": "@fluentui/react-portal",
|
43
|
-
"comment": "Bump @fluentui/react-
|
44
|
-
"commit": "
|
96
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.1",
|
97
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
45
98
|
},
|
46
99
|
{
|
47
100
|
"author": "beachball",
|
48
101
|
"package": "@fluentui/react-portal",
|
49
|
-
"comment": "Bump @fluentui/react-
|
50
|
-
"commit": "
|
102
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.1",
|
103
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
51
104
|
},
|
52
105
|
{
|
53
106
|
"author": "beachball",
|
54
107
|
"package": "@fluentui/react-portal",
|
55
|
-
"comment": "Bump @fluentui/
|
56
|
-
"commit": "
|
108
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
|
109
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
110
|
+
}
|
111
|
+
]
|
112
|
+
}
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"date": "Thu, 25 Nov 2021 08:34:15 GMT",
|
116
|
+
"tag": "@fluentui/react-portal_v9.0.0-beta.5",
|
117
|
+
"version": "9.0.0-beta.5",
|
118
|
+
"comments": {
|
119
|
+
"none": [
|
120
|
+
{
|
121
|
+
"author": "lingfangao@hotmail.com",
|
122
|
+
"package": "@fluentui/react-portal",
|
123
|
+
"commit": "8a141d14f3a14de2e1c4691dad908622f310a9d1",
|
124
|
+
"comment": "Migrate package to use solution tsconfigs"
|
57
125
|
}
|
58
126
|
],
|
127
|
+
"prerelease": [
|
128
|
+
{
|
129
|
+
"author": "beachball",
|
130
|
+
"package": "@fluentui/react-portal",
|
131
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
|
132
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"author": "beachball",
|
136
|
+
"package": "@fluentui/react-portal",
|
137
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.4",
|
138
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"author": "beachball",
|
142
|
+
"package": "@fluentui/react-portal",
|
143
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.5",
|
144
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"author": "beachball",
|
148
|
+
"package": "@fluentui/react-portal",
|
149
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
|
150
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"author": "beachball",
|
154
|
+
"package": "@fluentui/react-portal",
|
155
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
|
156
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"author": "beachball",
|
160
|
+
"package": "@fluentui/react-portal",
|
161
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
|
162
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
163
|
+
}
|
164
|
+
]
|
165
|
+
}
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"date": "Fri, 12 Nov 2021 13:25:29 GMT",
|
169
|
+
"tag": "@fluentui/react-portal_v9.0.0-beta.4",
|
170
|
+
"version": "9.0.0-beta.4",
|
171
|
+
"comments": {
|
59
172
|
"none": [
|
173
|
+
{
|
174
|
+
"author": "lingfangao@hotmail.com",
|
175
|
+
"package": "@fluentui/react-portal",
|
176
|
+
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
|
177
|
+
"comment": "Remove beta release tag"
|
178
|
+
},
|
60
179
|
{
|
61
180
|
"author": "mgodbolt@microsoft.com",
|
62
181
|
"package": "@fluentui/react-portal",
|
63
182
|
"commit": "7fafe76eb2c09f9d17a03c11ba73729d91ef411e",
|
64
183
|
"comment": "update docs descriptions"
|
65
184
|
}
|
185
|
+
],
|
186
|
+
"prerelease": [
|
187
|
+
{
|
188
|
+
"author": "gcox@microsoft.com",
|
189
|
+
"package": "@fluentui/react-portal",
|
190
|
+
"commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
|
191
|
+
"comment": "Updated beta and RC components to ES2019"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"author": "gcox@microsoft.com",
|
195
|
+
"package": "@fluentui/react-portal",
|
196
|
+
"commit": "36404e1921159b0a69b4824ae86e6276e0723ea2",
|
197
|
+
"comment": "Broke up stories added codesandbox refs"
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"author": "beachball",
|
201
|
+
"package": "@fluentui/react-portal",
|
202
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
|
203
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"author": "beachball",
|
207
|
+
"package": "@fluentui/react-portal",
|
208
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.3",
|
209
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
210
|
+
},
|
211
|
+
{
|
212
|
+
"author": "beachball",
|
213
|
+
"package": "@fluentui/react-portal",
|
214
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.4",
|
215
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"author": "beachball",
|
219
|
+
"package": "@fluentui/react-portal",
|
220
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
|
221
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"author": "beachball",
|
225
|
+
"package": "@fluentui/react-portal",
|
226
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
|
227
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
228
|
+
}
|
66
229
|
]
|
67
230
|
}
|
68
231
|
},
|
package/CHANGELOG.md
CHANGED
@@ -1,24 +1,64 @@
|
|
1
1
|
# Change Log - @fluentui/react-portal
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 15 Feb 2022 04:11:41 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightlyfc5cfdc52420220215.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v0.0.0-nightlyfc5cfdc52420220215.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-
|
9
|
+
Tue, 15 Feb 2022 04:11:41 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.1..@fluentui/react-portal_v0.0.0-nightlyfc5cfdc52420220215.1)
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/911569f28daa07a66ee59e1d8b7cfaf6f86051e9) by email not defined)
|
15
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightlyfc5cfdc52420220215.1 ([commit](https://github.com/microsoft/fluentui/commit/911569f28daa07a66ee59e1d8b7cfaf6f86051e9) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightlyfc5cfdc52420220215.1 ([commit](https://github.com/microsoft/fluentui/commit/911569f28daa07a66ee59e1d8b7cfaf6f86051e9) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightlyfc5cfdc52420220215.1 ([commit](https://github.com/microsoft/fluentui/commit/911569f28daa07a66ee59e1d8b7cfaf6f86051e9) by beachball)
|
18
|
+
|
19
|
+
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.1)
|
20
|
+
|
21
|
+
Thu, 10 Feb 2022 08:50:38 GMT
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.5..@fluentui/react-portal_v9.0.0-rc.1)
|
23
|
+
|
24
|
+
### Changes
|
25
|
+
|
26
|
+
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
27
|
+
- remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
|
28
|
+
- Bump Fluent UI packages to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
|
29
|
+
- remove unused dependency on Griffel ([PR #21393](https://github.com/microsoft/fluentui/pull/21393) by olfedias@microsoft.com)
|
30
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
31
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
32
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
33
|
+
|
34
|
+
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.5)
|
35
|
+
|
36
|
+
Thu, 25 Nov 2021 08:34:15 GMT
|
37
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.4..@fluentui/react-portal_v9.0.0-beta.5)
|
38
|
+
|
39
|
+
### Changes
|
40
|
+
|
41
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
42
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
43
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.5 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
44
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
45
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
46
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
47
|
+
|
48
|
+
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.4)
|
49
|
+
|
50
|
+
Fri, 12 Nov 2021 13:25:29 GMT
|
51
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.3..@fluentui/react-portal_v9.0.0-beta.4)
|
11
52
|
|
12
53
|
### Changes
|
13
54
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/b913f5d66978b4e311c72ff6ba9f00d5817ab025) by email not defined)
|
15
55
|
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
|
16
56
|
- Broke up stories added codesandbox refs ([PR #20372](https://github.com/microsoft/fluentui/pull/20372) by gcox@microsoft.com)
|
17
|
-
- Bump @fluentui/react-make-styles to
|
18
|
-
- Bump @fluentui/react-shared-contexts to
|
19
|
-
- Bump @fluentui/react-tabster to
|
20
|
-
- Bump @fluentui/react-utilities to
|
21
|
-
- Bump @fluentui/jest-serializer-make-styles to
|
57
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
58
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
59
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
60
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
61
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
22
62
|
|
23
63
|
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.3)
|
24
64
|
|
package/dist/react-portal.d.ts
CHANGED
@@ -14,7 +14,7 @@ export declare function elementContains(parent: HTMLElement | null, child: HTMLE
|
|
14
14
|
*/
|
15
15
|
export declare const Portal: React_2.FC<PortalProps>;
|
16
16
|
|
17
|
-
|
17
|
+
declare type PortalCommons = {
|
18
18
|
/**
|
19
19
|
* React children
|
20
20
|
*/
|
@@ -40,7 +40,7 @@ export declare type PortalState = PortalCommons & {
|
|
40
40
|
/**
|
41
41
|
* Render the final JSX of Portal
|
42
42
|
*/
|
43
|
-
export declare const
|
43
|
+
export declare const renderPortal_unstable: (state: PortalState) => React_2.ReactElement;
|
44
44
|
|
45
45
|
/**
|
46
46
|
* Sets the virtual parent of an element.
|
@@ -53,10 +53,10 @@ export declare function setVirtualParent(child: HTMLElement, parent?: HTMLElemen
|
|
53
53
|
/**
|
54
54
|
* Create the state required to render Portal.
|
55
55
|
*
|
56
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
56
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
57
57
|
*
|
58
58
|
* @param props - props from this instance of Portal
|
59
59
|
*/
|
60
|
-
export declare const
|
60
|
+
export declare const usePortal_unstable: (props: PortalProps) => PortalState;
|
61
61
|
|
62
62
|
export { }
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { usePortal_unstable } from './usePortal';
|
2
|
+
import { renderPortal_unstable } from './renderPortal';
|
3
3
|
/**
|
4
4
|
* A portal provides a way to render children into a DOM node
|
5
5
|
* that exists outside the DOM hierarchy of the parent component.
|
6
6
|
*/
|
7
|
+
|
7
8
|
export const Portal = props => {
|
8
|
-
|
9
|
-
|
9
|
+
const state = usePortal_unstable(props);
|
10
|
+
return renderPortal_unstable(state);
|
10
11
|
};
|
11
12
|
Portal.displayName = 'Portal';
|
12
13
|
//# sourceMappingURL=Portal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAEA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AAGA;;;AAGG;;AACH,OAAO,MAAM,MAAM,GAA0B,KAAK,IAAG;AACnD,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,CAAhC;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CAJM;AAMP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
|
2
|
+
declare type PortalCommons = {
|
3
3
|
/**
|
4
4
|
* React children
|
5
5
|
*/
|
@@ -19,3 +19,4 @@ export declare type PortalState = PortalCommons & {
|
|
19
19
|
*/
|
20
20
|
virtualParentRootRef: React.MutableRefObject<HTMLSpanElement | null>;
|
21
21
|
};
|
22
|
+
export {};
|
@@ -3,7 +3,11 @@ import * as React from 'react';
|
|
3
3
|
/**
|
4
4
|
* Render the final JSX of Portal
|
5
5
|
*/
|
6
|
-
|
7
|
-
|
6
|
+
|
7
|
+
export const renderPortal_unstable = state => {
|
8
|
+
return /*#__PURE__*/React.createElement("span", {
|
9
|
+
hidden: true,
|
10
|
+
ref: state.virtualParentRootRef
|
11
|
+
}, state.shouldRender && state.mountNode && /*#__PURE__*/ReactDOM.createPortal(state.children, state.mountNode));
|
8
12
|
};
|
9
13
|
//# sourceMappingURL=renderPortal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/renderPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAZ,MAA0B,WAA1B;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAA2C;AAC9E,sBACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,MAAM,EAAA,IAAZ;AAAa,IAAA,GAAG,EAAE,KAAK,CAAC;AAAxB,GAAA,EACG,KAAK,CAAC,YAAN,IAAsB,KAAK,CAAC,SAA5B,iBAAyC,QAAQ,CAAC,YAAT,CAAsB,KAAK,CAAC,QAA5B,EAAsC,KAAK,CAAC,SAA5C,CAD5C,CADF;AAKD,CANM","sourceRoot":""}
|
@@ -2,8 +2,8 @@ import type { PortalProps, PortalState } from './Portal.types';
|
|
2
2
|
/**
|
3
3
|
* Create the state required to render Portal.
|
4
4
|
*
|
5
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
5
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
6
6
|
*
|
7
7
|
* @param props - props from this instance of Portal
|
8
8
|
*/
|
9
|
-
export declare const
|
9
|
+
export declare const usePortal_unstable: (props: PortalProps) => PortalState;
|
@@ -5,25 +5,31 @@ import { setVirtualParent } from '../../virtualParent/index';
|
|
5
5
|
/**
|
6
6
|
* Create the state required to render Portal.
|
7
7
|
*
|
8
|
-
* The returned state can be modified with hooks such as usePortalStyles, before being passed to
|
8
|
+
* The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
|
9
9
|
*
|
10
10
|
* @param props - props from this instance of Portal
|
11
11
|
*/
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
12
|
+
|
13
|
+
export const usePortal_unstable = props => {
|
14
|
+
const {
|
15
|
+
children,
|
16
|
+
mountNode
|
17
|
+
} = props;
|
18
|
+
const virtualParentRootRef = React.useRef(null);
|
19
|
+
const fallbackMountNode = usePortalMountNode({
|
20
|
+
disabled: !!mountNode
|
21
|
+
});
|
22
|
+
const state = {
|
23
|
+
children,
|
24
|
+
mountNode: mountNode !== null && mountNode !== void 0 ? mountNode : fallbackMountNode,
|
25
|
+
shouldRender: !useIsSSR(),
|
26
|
+
virtualParentRootRef
|
27
|
+
};
|
28
|
+
React.useEffect(() => {
|
29
|
+
if (state.virtualParentRootRef.current && state.mountNode) {
|
30
|
+
setVirtualParent(state.mountNode, state.virtualParentRootRef.current);
|
31
|
+
}
|
32
|
+
}, [state.virtualParentRootRef, state.mountNode]);
|
33
|
+
return state;
|
28
34
|
};
|
29
35
|
//# sourceMappingURL=usePortal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/usePortal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,kBAAT,QAAmC,sBAAnC;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AAGA;;;;;;AAMG;;AACH,OAAO,MAAM,kBAAkB,GAAI,KAAD,IAAoC;AACpE,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA0B,KAAhC;AAEA,QAAM,oBAAoB,GAAG,KAAK,CAAC,MAAN,CAA8B,IAA9B,CAA7B;AACA,QAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAAE,IAAA,QAAQ,EAAE,CAAC,CAAC;AAAd,GAAD,CAA5C;AAEA,QAAM,KAAK,GAAgB;AACzB,IAAA,QADyB;AAEzB,IAAA,SAAS,EAAE,SAAS,KAAA,IAAT,IAAA,SAAS,KAAA,KAAA,CAAT,GAAA,SAAA,GAAa,iBAFC;AAGzB,IAAA,YAAY,EAAE,CAAC,QAAQ,EAHE;AAIzB,IAAA;AAJyB,GAA3B;AAOA,EAAA,KAAK,CAAC,SAAN,CAAgB,MAAK;AACnB,QAAI,KAAK,CAAC,oBAAN,CAA2B,OAA3B,IAAsC,KAAK,CAAC,SAAhD,EAA2D;AACzD,MAAA,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB,KAAK,CAAC,oBAAN,CAA2B,OAA7C,CAAhB;AACD;AACF,GAJD,EAIG,CAAC,KAAK,CAAC,oBAAP,EAA6B,KAAK,CAAC,SAAnC,CAJH;AAMA,SAAO,KAAP;AACD,CApBM","sourceRoot":""}
|
@@ -5,26 +5,32 @@ import { useKeyboardNavAttribute } from '@fluentui/react-tabster';
|
|
5
5
|
/**
|
6
6
|
* Creates a new element on a document.body to mount portals
|
7
7
|
*/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
return
|
8
|
+
|
9
|
+
export const usePortalMountNode = options => {
|
10
|
+
const themeClassName = useThemeClassName();
|
11
|
+
const {
|
12
|
+
targetDocument,
|
13
|
+
dir
|
14
|
+
} = useFluent();
|
15
|
+
const element = React.useMemo(() => {
|
16
|
+
if (targetDocument === undefined || options.disabled) {
|
17
|
+
return undefined;
|
18
|
+
}
|
19
|
+
|
20
|
+
const newElement = targetDocument.createElement('div');
|
21
|
+
newElement.setAttribute('class', themeClassName);
|
22
|
+
newElement.setAttribute('dir', dir);
|
23
|
+
targetDocument.body.appendChild(newElement);
|
24
|
+
return newElement;
|
25
|
+
}, [targetDocument, themeClassName, dir, options.disabled]);
|
26
|
+
useKeyboardNavAttribute().current = element;
|
27
|
+
useIsomorphicLayoutEffect(() => {
|
28
|
+
return () => {
|
29
|
+
var _a;
|
30
|
+
|
31
|
+
(_a = element === null || element === void 0 ? void 0 : element.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(element);
|
32
|
+
};
|
33
|
+
}, [element]);
|
34
|
+
return element;
|
29
35
|
};
|
30
36
|
//# sourceMappingURL=usePortalMountNode.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../../src/components/Portal/usePortalMountNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,2BAA1C;AACA,SAAS,iBAAT,EAA4B,SAA5B,QAA6C,iCAA7C;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AASA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,GAAI,OAAD,IAAuC;AACvE,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,SAAP;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","sourceRoot":""}
|
@@ -5,22 +5,26 @@ import { getParent } from './getParent';
|
|
5
5
|
*
|
6
6
|
* @returns true if the child can find the parent in its virtual hierarchy
|
7
7
|
*/
|
8
|
+
|
8
9
|
export function elementContains(parent, child) {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
if (!parent || !child) {
|
11
|
+
return false;
|
12
|
+
}
|
13
|
+
|
14
|
+
if (parent === child) {
|
15
|
+
return true;
|
16
|
+
} else {
|
17
|
+
while (child) {
|
18
|
+
const nextParent = getParent(child);
|
19
|
+
|
20
|
+
if (nextParent === parent) {
|
13
21
|
return true;
|
22
|
+
}
|
23
|
+
|
24
|
+
child = nextParent;
|
14
25
|
}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
if (nextParent === parent) {
|
19
|
-
return true;
|
20
|
-
}
|
21
|
-
child = nextParent;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
return false;
|
26
|
+
}
|
27
|
+
|
28
|
+
return false;
|
25
29
|
}
|
26
30
|
//# sourceMappingURL=elementContains.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["../../src/virtualParent/elementContains.ts"],"names":[],"mappings":"AAAA,SAAS,SAAT,QAA0B,aAA1B;AACA;;;;;AAKG;;AACH,OAAM,SAAU,eAAV,CAA0B,MAA1B,EAAsD,KAAtD,EAA+E;AACnF,MAAI,CAAC,MAAD,IAAW,CAAC,KAAhB,EAAuB;AACrB,WAAO,KAAP;AACD;;AAED,MAAI,MAAM,KAAK,KAAf,EAAsB;AACpB,WAAO,IAAP;AACD,GAFD,MAEO;AACL,WAAO,KAAP,EAAc;AACZ,YAAM,UAAU,GAAuB,SAAS,CAAC,KAAD,CAAhD;;AAEA,UAAI,UAAU,KAAK,MAAnB,EAA2B;AACzB,eAAO,IAAP;AACD;;AAED,MAAA,KAAK,GAAG,UAAR;AACD;AACF;;AAED,SAAO,KAAP;AACD","sourceRoot":""}
|