@fluentui/react-portal 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/CHANGELOG.json +271 -16
  2. package/CHANGELOG.md +77 -10
  3. package/dist/react-portal.d.ts +6 -5
  4. package/lib/Portal.js.map +1 -1
  5. package/lib/components/Portal/Portal.d.ts +2 -1
  6. package/lib/components/Portal/Portal.js +8 -6
  7. package/lib/components/Portal/Portal.js.map +1 -1
  8. package/lib/components/Portal/Portal.types.d.ts +2 -1
  9. package/lib/components/Portal/Portal.types.js.map +1 -1
  10. package/lib/components/Portal/index.js.map +1 -1
  11. package/lib/components/Portal/renderPortal.d.ts +1 -1
  12. package/lib/components/Portal/renderPortal.js +6 -2
  13. package/lib/components/Portal/renderPortal.js.map +1 -1
  14. package/lib/components/Portal/usePortal.d.ts +2 -2
  15. package/lib/components/Portal/usePortal.js +23 -17
  16. package/lib/components/Portal/usePortal.js.map +1 -1
  17. package/lib/components/Portal/usePortalMountNode.js +27 -21
  18. package/lib/components/Portal/usePortalMountNode.js.map +1 -1
  19. package/lib/index.js.map +1 -1
  20. package/lib/virtualParent/elementContains.js +18 -14
  21. package/lib/virtualParent/elementContains.js.map +1 -1
  22. package/lib/virtualParent/getParent.js +2 -1
  23. package/lib/virtualParent/getParent.js.map +1 -1
  24. package/lib/virtualParent/getVirtualParent.js +8 -5
  25. package/lib/virtualParent/getVirtualParent.js.map +1 -1
  26. package/lib/virtualParent/index.js.map +1 -1
  27. package/lib/virtualParent/isVirtualElement.js +1 -1
  28. package/lib/virtualParent/isVirtualElement.js.map +1 -1
  29. package/lib/virtualParent/setVirtualParent.js +11 -8
  30. package/lib/virtualParent/setVirtualParent.js.map +1 -1
  31. package/lib/virtualParent/types.js.map +1 -1
  32. package/lib-commonjs/Portal.js +7 -2
  33. package/lib-commonjs/Portal.js.map +1 -1
  34. package/lib-commonjs/components/Portal/Portal.d.ts +2 -1
  35. package/lib-commonjs/components/Portal/Portal.js +16 -7
  36. package/lib-commonjs/components/Portal/Portal.js.map +1 -1
  37. package/lib-commonjs/components/Portal/Portal.types.d.ts +2 -1
  38. package/lib-commonjs/components/Portal/Portal.types.js +4 -1
  39. package/lib-commonjs/components/Portal/Portal.types.js.map +1 -1
  40. package/lib-commonjs/components/Portal/index.js +10 -2
  41. package/lib-commonjs/components/Portal/index.js.map +1 -1
  42. package/lib-commonjs/components/Portal/renderPortal.d.ts +1 -1
  43. package/lib-commonjs/components/Portal/renderPortal.js +18 -7
  44. package/lib-commonjs/components/Portal/renderPortal.js.map +1 -1
  45. package/lib-commonjs/components/Portal/usePortal.d.ts +2 -2
  46. package/lib-commonjs/components/Portal/usePortal.js +39 -24
  47. package/lib-commonjs/components/Portal/usePortal.js.map +1 -1
  48. package/lib-commonjs/components/Portal/usePortalMountNode.js +41 -26
  49. package/lib-commonjs/components/Portal/usePortalMountNode.js.map +1 -1
  50. package/lib-commonjs/index.js +22 -5
  51. package/lib-commonjs/index.js.map +1 -1
  52. package/lib-commonjs/virtualParent/elementContains.js +26 -16
  53. package/lib-commonjs/virtualParent/elementContains.js.map +1 -1
  54. package/lib-commonjs/virtualParent/getParent.js +10 -3
  55. package/lib-commonjs/virtualParent/getParent.js.map +1 -1
  56. package/lib-commonjs/virtualParent/getVirtualParent.js +16 -7
  57. package/lib-commonjs/virtualParent/getVirtualParent.js.map +1 -1
  58. package/lib-commonjs/virtualParent/index.js +11 -2
  59. package/lib-commonjs/virtualParent/index.js.map +1 -1
  60. package/lib-commonjs/virtualParent/isVirtualElement.js +7 -2
  61. package/lib-commonjs/virtualParent/isVirtualElement.js.map +1 -1
  62. package/lib-commonjs/virtualParent/setVirtualParent.js +17 -9
  63. package/lib-commonjs/virtualParent/setVirtualParent.js.map +1 -1
  64. package/lib-commonjs/virtualParent/types.js +4 -1
  65. package/lib-commonjs/virtualParent/types.js.map +1 -1
  66. package/package.json +8 -10
  67. package/lib/common/isConformant.d.ts +0 -4
  68. package/lib/common/isConformant.js +0 -9
  69. package/lib/common/isConformant.js.map +0 -1
  70. package/lib-commonjs/common/isConformant.d.ts +0 -4
  71. package/lib-commonjs/common/isConformant.js +0 -13
  72. package/lib-commonjs/common/isConformant.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,46 +2,301 @@
2
2
  "name": "@fluentui/react-portal",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 19 Oct 2021 12:39:14 GMT",
6
- "tag": "@fluentui/react-portal_v9.0.0-nightly.f81b28ceb3.1",
7
- "version": "9.0.0-nightly.f81b28ceb3.1",
5
+ "date": "Tue, 01 Mar 2022 02:16:14 GMT",
6
+ "tag": "@fluentui/react-portal_v9.0.0-rc.4",
7
+ "version": "9.0.0-rc.4",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
- "author": "email not defined",
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-portal",
13
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.4",
14
+ "commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-portal",
19
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.4",
20
+ "commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Fri, 18 Feb 2022 13:35:33 GMT",
27
+ "tag": "@fluentui/react-portal_v9.0.0-rc.3",
28
+ "version": "9.0.0-rc.3",
29
+ "comments": {
30
+ "prerelease": [
31
+ {
32
+ "author": "lingfangao@hotmail.com",
33
+ "package": "@fluentui/react-portal",
34
+ "commit": "1aa9e691fcccd9a64168cea7941c0f1e71fa1d14",
35
+ "comment": "fix: Source maps contain original source code"
36
+ },
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui/react-portal",
40
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.3",
41
+ "commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-portal",
46
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.3",
47
+ "commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-portal",
52
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.3",
53
+ "commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "date": "Thu, 10 Feb 2022 08:50:38 GMT",
60
+ "tag": "@fluentui/react-portal_v9.0.0-rc.1",
61
+ "version": "9.0.0-rc.1",
62
+ "comments": {
63
+ "none": [
64
+ {
65
+ "author": "olfedias@microsoft.com",
66
+ "package": "@fluentui/react-portal",
67
+ "commit": "f4883108ae74c089213780f09997115c0d547aef",
68
+ "comment": "update stories to not use CSS shorthands in styles"
69
+ },
70
+ {
71
+ "author": "Humberto.Morimoto@microsoft.com",
72
+ "package": "@fluentui/react-portal",
73
+ "commit": "60e153e786c586b867898109c07a51876d3bfd5a",
74
+ "comment": "Replacing use of functions in makeStyles with direct use of tokens"
75
+ },
76
+ {
77
+ "author": "martinhochel@microsoft.com",
78
+ "package": "@fluentui/react-portal",
79
+ "commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
80
+ "comment": "chore: use storybook runner for all vNext packages"
81
+ },
82
+ {
83
+ "author": "olfedias@microsoft.com",
84
+ "package": "@fluentui/react-portal",
85
+ "commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
86
+ "comment": "remove inline-style-expand-shorthand from tsconfigs"
87
+ }
88
+ ],
89
+ "prerelease": [
90
+ {
91
+ "author": "behowell@microsoft.com",
92
+ "package": "@fluentui/react-portal",
93
+ "commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
94
+ "comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
95
+ },
96
+ {
97
+ "author": "mgodbolt@microsoft.com",
98
+ "package": "@fluentui/react-portal",
99
+ "commit": "839ec14849e112b85aa321d034739ec421199141",
100
+ "comment": "remove export of commons types"
101
+ },
102
+ {
103
+ "author": "lingfangao@hotmail.com",
104
+ "package": "@fluentui/react-portal",
105
+ "commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
106
+ "comment": "Bump Fluent UI packages to 9.0.0-rc"
107
+ },
108
+ {
109
+ "author": "olfedias@microsoft.com",
110
+ "package": "@fluentui/react-portal",
111
+ "commit": "d525c8b2106551865d648873210a6b48c2326ecb",
112
+ "comment": "remove unused dependency on Griffel"
113
+ },
114
+ {
115
+ "author": "beachball",
116
+ "package": "@fluentui/react-portal",
117
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.1",
118
+ "commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
119
+ },
120
+ {
121
+ "author": "beachball",
122
+ "package": "@fluentui/react-portal",
123
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.1",
124
+ "commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
125
+ },
126
+ {
127
+ "author": "beachball",
128
+ "package": "@fluentui/react-portal",
129
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
130
+ "commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ "date": "Thu, 25 Nov 2021 08:34:15 GMT",
137
+ "tag": "@fluentui/react-portal_v9.0.0-beta.5",
138
+ "version": "9.0.0-beta.5",
139
+ "comments": {
140
+ "none": [
141
+ {
142
+ "author": "lingfangao@hotmail.com",
143
+ "package": "@fluentui/react-portal",
144
+ "commit": "8a141d14f3a14de2e1c4691dad908622f310a9d1",
145
+ "comment": "Migrate package to use solution tsconfigs"
146
+ }
147
+ ],
148
+ "prerelease": [
149
+ {
150
+ "author": "beachball",
151
+ "package": "@fluentui/react-portal",
152
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
153
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
154
+ },
155
+ {
156
+ "author": "beachball",
157
+ "package": "@fluentui/react-portal",
158
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.4",
159
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
160
+ },
161
+ {
162
+ "author": "beachball",
163
+ "package": "@fluentui/react-portal",
164
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-beta.5",
165
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
166
+ },
167
+ {
168
+ "author": "beachball",
169
+ "package": "@fluentui/react-portal",
170
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
171
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
172
+ },
173
+ {
174
+ "author": "beachball",
175
+ "package": "@fluentui/react-portal",
176
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
177
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
178
+ },
179
+ {
180
+ "author": "beachball",
181
+ "package": "@fluentui/react-portal",
182
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
183
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
184
+ }
185
+ ]
186
+ }
187
+ },
188
+ {
189
+ "date": "Fri, 12 Nov 2021 13:25:29 GMT",
190
+ "tag": "@fluentui/react-portal_v9.0.0-beta.4",
191
+ "version": "9.0.0-beta.4",
192
+ "comments": {
193
+ "none": [
194
+ {
195
+ "author": "lingfangao@hotmail.com",
196
+ "package": "@fluentui/react-portal",
197
+ "commit": "00f70581480b536e723fb69edf0ae617beac4807",
198
+ "comment": "Remove beta release tag"
199
+ },
200
+ {
201
+ "author": "mgodbolt@microsoft.com",
202
+ "package": "@fluentui/react-portal",
203
+ "commit": "7fafe76eb2c09f9d17a03c11ba73729d91ef411e",
204
+ "comment": "update docs descriptions"
205
+ }
206
+ ],
207
+ "prerelease": [
208
+ {
209
+ "author": "gcox@microsoft.com",
210
+ "package": "@fluentui/react-portal",
211
+ "commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
212
+ "comment": "Updated beta and RC components to ES2019"
213
+ },
214
+ {
215
+ "author": "gcox@microsoft.com",
216
+ "package": "@fluentui/react-portal",
217
+ "commit": "36404e1921159b0a69b4824ae86e6276e0723ea2",
218
+ "comment": "Broke up stories added codesandbox refs"
219
+ },
220
+ {
221
+ "author": "beachball",
222
+ "package": "@fluentui/react-portal",
223
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
224
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
225
+ },
226
+ {
227
+ "author": "beachball",
228
+ "package": "@fluentui/react-portal",
229
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.3",
230
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
231
+ },
232
+ {
233
+ "author": "beachball",
234
+ "package": "@fluentui/react-portal",
235
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-beta.4",
236
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
237
+ },
238
+ {
239
+ "author": "beachball",
240
+ "package": "@fluentui/react-portal",
241
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
242
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
243
+ },
244
+ {
245
+ "author": "beachball",
246
+ "package": "@fluentui/react-portal",
247
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
248
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
249
+ }
250
+ ]
251
+ }
252
+ },
253
+ {
254
+ "date": "Wed, 27 Oct 2021 12:14:21 GMT",
255
+ "tag": "@fluentui/react-portal_v9.0.0-beta.3",
256
+ "version": "9.0.0-beta.3",
257
+ "comments": {
258
+ "prerelease": [
259
+ {
260
+ "author": "gcox@microsoft.com",
261
+ "package": "@fluentui/react-portal",
262
+ "commit": "d730088d7f6e5965ba5d5ed0d449e250f171d791",
263
+ "comment": "Removed duplicate 'Portal' from story names"
264
+ },
265
+ {
266
+ "author": "peter@draxler.ml",
12
267
  "package": "@fluentui/react-portal",
13
- "comment": "Release nightly v9",
14
- "commit": "0ae8560ad3e7b4cb03f3f47152dfce2f81523cca"
268
+ "commit": "f6db7c8d6b7db0902775e7857b62b745be35b59a",
269
+ "comment": "added styling of documentation"
15
270
  },
16
271
  {
17
272
  "author": "beachball",
18
273
  "package": "@fluentui/react-portal",
19
- "comment": "Bump @fluentui/react-make-styles to v9.0.0-nightly.f81b28ceb3.1",
20
- "commit": "0ae8560ad3e7b4cb03f3f47152dfce2f81523cca"
274
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.2",
275
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
21
276
  },
22
277
  {
23
278
  "author": "beachball",
24
279
  "package": "@fluentui/react-portal",
25
- "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-nightly.f81b28ceb3.1",
26
- "commit": "0ae8560ad3e7b4cb03f3f47152dfce2f81523cca"
280
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.2",
281
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
27
282
  },
28
283
  {
29
284
  "author": "beachball",
30
285
  "package": "@fluentui/react-portal",
31
- "comment": "Bump @fluentui/react-tabster to v9.0.0-nightly.f81b28ceb3.1",
32
- "commit": "0ae8560ad3e7b4cb03f3f47152dfce2f81523cca"
286
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-beta.3",
287
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
33
288
  },
34
289
  {
35
290
  "author": "beachball",
36
291
  "package": "@fluentui/react-portal",
37
- "comment": "Bump @fluentui/react-utilities to v9.0.0-nightly.f81b28ceb3.1",
38
- "commit": "0ae8560ad3e7b4cb03f3f47152dfce2f81523cca"
292
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.2",
293
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
39
294
  },
40
295
  {
41
296
  "author": "beachball",
42
297
  "package": "@fluentui/react-portal",
43
- "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-nightly.f81b28ceb3.1",
44
- "commit": "0ae8560ad3e7b4cb03f3f47152dfce2f81523cca"
298
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2",
299
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
45
300
  }
46
301
  ]
47
302
  }
package/CHANGELOG.md CHANGED
@@ -1,22 +1,89 @@
1
1
  # Change Log - @fluentui/react-portal
2
2
 
3
- This log was last generated on Tue, 19 Oct 2021 12:39:14 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 01 Mar 2022 02:16:14 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.0.0-nightly.f81b28ceb3.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-nightly.f81b28ceb3.1)
7
+ ## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.4)
8
8
 
9
- Tue, 19 Oct 2021 12:39:14 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.2..@fluentui/react-portal_v9.0.0-nightly.f81b28ceb3.1)
9
+ Tue, 01 Mar 2022 02:16:14 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.3..@fluentui/react-portal_v9.0.0-rc.4)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/0ae8560ad3e7b4cb03f3f47152dfce2f81523cca) by email not defined)
15
- - Bump @fluentui/react-make-styles to v9.0.0-nightly.f81b28ceb3.1 ([commit](https://github.com/microsoft/fluentui/commit/0ae8560ad3e7b4cb03f3f47152dfce2f81523cca) by beachball)
16
- - Bump @fluentui/react-shared-contexts to v9.0.0-nightly.f81b28ceb3.1 ([commit](https://github.com/microsoft/fluentui/commit/0ae8560ad3e7b4cb03f3f47152dfce2f81523cca) by beachball)
17
- - Bump @fluentui/react-tabster to v9.0.0-nightly.f81b28ceb3.1 ([commit](https://github.com/microsoft/fluentui/commit/0ae8560ad3e7b4cb03f3f47152dfce2f81523cca) by beachball)
18
- - Bump @fluentui/react-utilities to v9.0.0-nightly.f81b28ceb3.1 ([commit](https://github.com/microsoft/fluentui/commit/0ae8560ad3e7b4cb03f3f47152dfce2f81523cca) by beachball)
19
- - Bump @fluentui/jest-serializer-make-styles to v9.0.0-nightly.f81b28ceb3.1 ([commit](https://github.com/microsoft/fluentui/commit/0ae8560ad3e7b4cb03f3f47152dfce2f81523cca) by beachball)
14
+ - Bump @fluentui/react-tabster to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
16
+
17
+ ## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.3)
18
+
19
+ Fri, 18 Feb 2022 13:35:33 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-rc.1..@fluentui/react-portal_v9.0.0-rc.3)
21
+
22
+ ### Changes
23
+
24
+ - fix: Source maps contain original source code ([PR #21690](https://github.com/microsoft/fluentui/pull/21690) by lingfangao@hotmail.com)
25
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
26
+ - Bump @fluentui/react-tabster to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
27
+ - Bump @fluentui/react-utilities to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
28
+
29
+ ## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-rc.1)
30
+
31
+ Thu, 10 Feb 2022 08:50:38 GMT
32
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.5..@fluentui/react-portal_v9.0.0-rc.1)
33
+
34
+ ### Changes
35
+
36
+ - 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)
37
+ - remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
38
+ - Bump Fluent UI packages to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
39
+ - remove unused dependency on Griffel ([PR #21393](https://github.com/microsoft/fluentui/pull/21393) by olfedias@microsoft.com)
40
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
41
+ - Bump @fluentui/react-tabster to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
42
+ - Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
43
+
44
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.5)
45
+
46
+ Thu, 25 Nov 2021 08:34:15 GMT
47
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.4..@fluentui/react-portal_v9.0.0-beta.5)
48
+
49
+ ### Changes
50
+
51
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
52
+ - Bump @fluentui/react-shared-contexts to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
53
+ - Bump @fluentui/react-tabster to v9.0.0-beta.5 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
54
+ - Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
55
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
56
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
57
+
58
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.4)
59
+
60
+ Fri, 12 Nov 2021 13:25:29 GMT
61
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.3..@fluentui/react-portal_v9.0.0-beta.4)
62
+
63
+ ### Changes
64
+
65
+ - Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
66
+ - Broke up stories added codesandbox refs ([PR #20372](https://github.com/microsoft/fluentui/pull/20372) by gcox@microsoft.com)
67
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
68
+ - Bump @fluentui/react-shared-contexts to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
69
+ - Bump @fluentui/react-tabster to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
70
+ - Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
71
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
72
+
73
+ ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.3)
74
+
75
+ Wed, 27 Oct 2021 12:14:21 GMT
76
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal_v9.0.0-beta.2..@fluentui/react-portal_v9.0.0-beta.3)
77
+
78
+ ### Changes
79
+
80
+ - Removed duplicate 'Portal' from story names ([PR #20270](https://github.com/microsoft/fluentui/pull/20270) by gcox@microsoft.com)
81
+ - added styling of documentation ([PR #20193](https://github.com/microsoft/fluentui/pull/20193) by peter@draxler.ml)
82
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
83
+ - Bump @fluentui/react-shared-contexts to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
84
+ - Bump @fluentui/react-tabster to v9.0.0-beta.3 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
85
+ - Bump @fluentui/react-utilities to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
86
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
20
87
 
21
88
  ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal_v9.0.0-beta.2)
22
89
 
@@ -9,11 +9,12 @@ import * as React_2 from 'react';
9
9
  export declare function elementContains(parent: HTMLElement | null, child: HTMLElement | null): boolean;
10
10
 
11
11
  /**
12
- * Component that renders children in a React portal
12
+ * A portal provides a way to render children into a DOM node
13
+ * that exists outside the DOM hierarchy of the parent component.
13
14
  */
14
15
  export declare const Portal: React_2.FC<PortalProps>;
15
16
 
16
- export declare type PortalCommons = {
17
+ declare type PortalCommons = {
17
18
  /**
18
19
  * React children
19
20
  */
@@ -39,7 +40,7 @@ export declare type PortalState = PortalCommons & {
39
40
  /**
40
41
  * Render the final JSX of Portal
41
42
  */
42
- export declare const renderPortal: (state: PortalState) => React_2.ReactElement;
43
+ export declare const renderPortal_unstable: (state: PortalState) => React_2.ReactElement;
43
44
 
44
45
  /**
45
46
  * Sets the virtual parent of an element.
@@ -52,10 +53,10 @@ export declare function setVirtualParent(child: HTMLElement, parent?: HTMLElemen
52
53
  /**
53
54
  * Create the state required to render Portal.
54
55
  *
55
- * The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal.
56
+ * The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.
56
57
  *
57
58
  * @param props - props from this instance of Portal
58
59
  */
59
- export declare const usePortal: (props: PortalProps) => PortalState;
60
+ export declare const usePortal_unstable: (props: PortalProps) => PortalState;
60
61
 
61
62
  export { }
package/lib/Portal.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.js","sourceRoot":"","sources":["../src/Portal.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"Portal.js","sourceRoot":"../src/","sources":["Portal.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Portal/index';\n"]}
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { PortalProps } from './Portal.types';
3
3
  /**
4
- * Component that renders children in a React portal
4
+ * A portal provides a way to render children into a DOM node
5
+ * that exists outside the DOM hierarchy of the parent component.
5
6
  */
6
7
  export declare const Portal: React.FC<PortalProps>;
@@ -1,11 +1,13 @@
1
- import { usePortal } from './usePortal';
2
- import { renderPortal } from './renderPortal';
1
+ import { usePortal_unstable } from './usePortal';
2
+ import { renderPortal_unstable } from './renderPortal';
3
3
  /**
4
- * Component that renders children in a React portal
4
+ * A portal provides a way to render children into a DOM node
5
+ * that exists outside the DOM hierarchy of the parent component.
5
6
  */
6
- export var Portal = function (props) {
7
- var state = usePortal(props);
8
- return renderPortal(state);
7
+
8
+ export const Portal = props => {
9
+ const state = usePortal_unstable(props);
10
+ return renderPortal_unstable(state);
9
11
  };
10
12
  Portal.displayName = 'Portal';
11
13
  //# sourceMappingURL=Portal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.js","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;GAEG;AACH,MAAM,CAAC,IAAM,MAAM,GAA0B,UAAA,KAAK;IAChD,IAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAE/B,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"sources":["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","sourcesContent":["import * as React from 'react';\n\nimport { usePortal_unstable } from './usePortal';\nimport { renderPortal_unstable } from './renderPortal';\nimport type { PortalProps } from './Portal.types';\n\n/**\n * A portal provides a way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n */\nexport const Portal: React.FC<PortalProps> = props => {\n const state = usePortal_unstable(props);\n\n return renderPortal_unstable(state);\n};\n\nPortal.displayName = 'Portal';\n"],"sourceRoot":"../src/"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare type PortalCommons = {
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 {};
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.types.js","sourceRoot":"","sources":["../../../src/components/Portal/Portal.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Portal.types.js","sourceRoot":"../src/","sources":["components/Portal/Portal.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\ntype PortalCommons = {\n /**\n * React children\n */\n children: React.ReactNode;\n /**\n * Where the portal children are mounted on DOM\n * @defaultValue a new element on document.body without any styling\n */\n mountNode: HTMLDivElement | undefined;\n};\n\nexport type PortalProps = Partial<PortalCommons>;\n\nexport type PortalState = PortalCommons & {\n /** Indicates if a Portal should be rendered. */\n shouldRender: boolean;\n\n /**\n * Ref to the root span element as virtual parent\n */\n virtualParentRootRef: React.MutableRefObject<HTMLSpanElement | null>;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Portal/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC","sourcesContent":["export * from './Portal';\nexport * from './Portal.types';\nexport * from './renderPortal';\nexport * from './usePortal';\n"]}
@@ -3,4 +3,4 @@ import type { PortalState } from './Portal.types';
3
3
  /**
4
4
  * Render the final JSX of Portal
5
5
  */
6
- export declare const renderPortal: (state: PortalState) => React.ReactElement;
6
+ export declare const renderPortal_unstable: (state: PortalState) => React.ReactElement;
@@ -3,7 +3,11 @@ import * as React from 'react';
3
3
  /**
4
4
  * Render the final JSX of Portal
5
5
  */
6
- export var renderPortal = function (state) {
7
- return (React.createElement("span", { hidden: true, ref: state.virtualParentRootRef }, state.shouldRender && state.mountNode && ReactDOM.createPortal(state.children, state.mountNode)));
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,"file":"renderPortal.js","sourceRoot":"","sources":["../../../src/components/Portal/renderPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;GAEG;AACH,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,KAAkB;IAC7C,OAAO,CACL,8BAAM,MAAM,QAAC,GAAG,EAAE,KAAK,CAAC,oBAAoB,IACzC,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,SAAS,IAAI,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,CAC3F,CACR,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"sources":["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","sourcesContent":["import * as ReactDOM from 'react-dom';\nimport * as React from 'react';\nimport type { PortalState } from './Portal.types';\n\n/**\n * Render the final JSX of Portal\n */\nexport const renderPortal_unstable = (state: PortalState): React.ReactElement => {\n return (\n <span hidden ref={state.virtualParentRootRef}>\n {state.shouldRender && state.mountNode && ReactDOM.createPortal(state.children, state.mountNode)}\n </span>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -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 renderPortal.
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 usePortal: (props: PortalProps) => PortalState;
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 renderPortal.
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
- export var usePortal = function (props) {
13
- var children = props.children, mountNode = props.mountNode;
14
- var virtualParentRootRef = React.useRef(null);
15
- var fallbackMountNode = usePortalMountNode({ disabled: !!mountNode });
16
- var state = {
17
- children: children,
18
- mountNode: mountNode !== null && mountNode !== void 0 ? mountNode : fallbackMountNode,
19
- shouldRender: !useIsSSR(),
20
- virtualParentRootRef: virtualParentRootRef,
21
- };
22
- React.useEffect(function () {
23
- if (state.virtualParentRootRef.current && state.mountNode) {
24
- setVirtualParent(state.mountNode, state.virtualParentRootRef.current);
25
- }
26
- }, [state.virtualParentRootRef, state.mountNode]);
27
- return state;
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,"file":"usePortal.js","sourceRoot":"","sources":["../../../src/components/Portal/usePortal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,KAAkB;IAClC,IAAA,QAAQ,GAAgB,KAAK,SAArB,EAAE,SAAS,GAAK,KAAK,UAAV,CAAW;IAEtC,IAAM,oBAAoB,GAAG,KAAK,CAAC,MAAM,CAAkB,IAAI,CAAC,CAAC;IACjE,IAAM,iBAAiB,GAAG,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IAExE,IAAM,KAAK,GAAgB;QACzB,QAAQ,UAAA;QACR,SAAS,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,iBAAiB;QACzC,YAAY,EAAE,CAAC,QAAQ,EAAE;QACzB,oBAAoB,sBAAA;KACrB,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC;QACd,IAAI,KAAK,CAAC,oBAAoB,CAAC,OAAO,IAAI,KAAK,CAAC,SAAS,EAAE;YACzD,gBAAgB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;SACvE;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAElD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
1
+ {"version":3,"sources":["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","sourcesContent":["import * as React from 'react';\nimport { useIsSSR } from '@fluentui/react-utilities';\nimport { usePortalMountNode } from './usePortalMountNode';\nimport { setVirtualParent } from '../../virtualParent/index';\nimport type { PortalProps, PortalState } from './Portal.types';\n\n/**\n * Create the state required to render Portal.\n *\n * The returned state can be modified with hooks such as usePortalStyles, before being passed to renderPortal_unstable.\n *\n * @param props - props from this instance of Portal\n */\nexport const usePortal_unstable = (props: PortalProps): PortalState => {\n const { children, mountNode } = props;\n\n const virtualParentRootRef = React.useRef<HTMLSpanElement>(null);\n const fallbackMountNode = usePortalMountNode({ disabled: !!mountNode });\n\n const state: PortalState = {\n children,\n mountNode: mountNode ?? fallbackMountNode,\n shouldRender: !useIsSSR(),\n virtualParentRootRef,\n };\n\n React.useEffect(() => {\n if (state.virtualParentRootRef.current && state.mountNode) {\n setVirtualParent(state.mountNode, state.virtualParentRootRef.current);\n }\n }, [state.virtualParentRootRef, state.mountNode]);\n\n return state;\n};\n"],"sourceRoot":"../src/"}