@fluentui/react-popover 0.0.0-nightly-20220623-0419.1 → 0.0.0-nightly-20220629-1444.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 +207 -22
- package/CHANGELOG.md +63 -11
- package/dist/index.d.ts +14 -3
- package/lib/components/Popover/Popover.types.js.map +1 -1
- package/lib/components/Popover/renderPopover.js +3 -1
- package/lib/components/Popover/renderPopover.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurface.js +3 -1
- package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib/popoverContext.js.map +1 -1
- package/lib-commonjs/components/Popover/renderPopover.js +3 -1
- package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +3 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib-commonjs/popoverContext.js.map +1 -1
- package/package.json +13 -14
package/CHANGELOG.json
CHANGED
@@ -2,72 +2,257 @@
|
|
2
2
|
"name": "@fluentui/react-popover",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-popover_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Wed, 29 Jun 2022 14:56:17 GMT",
|
6
|
+
"tag": "@fluentui/react-popover_v0.0.0-nightly-20220629-1444.1",
|
7
|
+
"version": "0.0.0-nightly-20220629-1444.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
|
+
{
|
11
|
+
"author": "email not defined",
|
12
|
+
"package": "@fluentui/react-popover",
|
13
|
+
"commit": "not available",
|
14
|
+
"comment": "Release nightly v9"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-popover",
|
19
|
+
"comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20220629-1444.1",
|
20
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-popover",
|
25
|
+
"comment": "Bump @fluentui/react-portal to v0.0.0-nightly-20220629-1444.1",
|
26
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-popover",
|
31
|
+
"comment": "Bump @fluentui/react-positioning to v0.0.0-nightly-20220629-1444.1",
|
32
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-popover",
|
37
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20220629-1444.1",
|
38
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-popover",
|
43
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220629-1444.1",
|
44
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"author": "beachball",
|
48
|
+
"package": "@fluentui/react-popover",
|
49
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220629-1444.1",
|
50
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"author": "beachball",
|
54
|
+
"package": "@fluentui/react-popover",
|
55
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220629-1444.1",
|
56
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"author": "beachball",
|
60
|
+
"package": "@fluentui/react-popover",
|
61
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220629-1444.1",
|
62
|
+
"commit": "69fd45674774a9e2e90bb9fcb472a7d0b13aeafd"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
}
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"date": "Tue, 28 Jun 2022 17:39:50 GMT",
|
69
|
+
"tag": "@fluentui/react-popover_v9.0.1",
|
70
|
+
"version": "9.0.1",
|
71
|
+
"comments": {
|
72
|
+
"patch": [
|
73
|
+
{
|
74
|
+
"author": "lingfangao@hotmail.com",
|
75
|
+
"package": "@fluentui/react-popover",
|
76
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b",
|
77
|
+
"comment": "fix: Use caret dependency range for Griffel"
|
78
|
+
},
|
79
|
+
{
|
80
|
+
"author": "beachball",
|
81
|
+
"package": "@fluentui/react-popover",
|
82
|
+
"comment": "Bump @fluentui/react-portal to v9.0.1",
|
83
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"author": "beachball",
|
87
|
+
"package": "@fluentui/react-popover",
|
88
|
+
"comment": "Bump @fluentui/react-positioning to v9.0.1",
|
89
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"author": "beachball",
|
93
|
+
"package": "@fluentui/react-popover",
|
94
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.1",
|
95
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"author": "beachball",
|
99
|
+
"package": "@fluentui/react-popover",
|
100
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10",
|
101
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
102
|
+
}
|
103
|
+
]
|
104
|
+
}
|
105
|
+
},
|
106
|
+
{
|
107
|
+
"date": "Tue, 28 Jun 2022 15:13:46 GMT",
|
108
|
+
"tag": "@fluentui/react-popover_v9.0.0",
|
109
|
+
"version": "9.0.0",
|
110
|
+
"comments": {
|
111
|
+
"none": [
|
112
|
+
{
|
113
|
+
"author": "tristan.watanabe@gmail.com",
|
114
|
+
"package": "@fluentui/react-popover",
|
115
|
+
"commit": "4d8b8d731abd8d9d293b724dc760a021ee10be43",
|
116
|
+
"comment": "chore: Move Popover stories to folder with index entry."
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"author": "lingfangao@hotmail.com",
|
120
|
+
"package": "@fluentui/react-popover",
|
121
|
+
"commit": "2da2d47e3dac6f8f4396ab112ab80b1dd34cc9ac",
|
122
|
+
"comment": "Bump cypress to v10"
|
123
|
+
}
|
124
|
+
],
|
125
|
+
"prerelease": [
|
126
|
+
{
|
127
|
+
"author": "lingfangao@hotmail.com",
|
128
|
+
"package": "@fluentui/react-popover",
|
129
|
+
"commit": "02ee30f8ef173f3a1d2c0c73bcdaef8abae5c055",
|
130
|
+
"comment": "feat: Adds `legacyTrapFocus` prop"
|
131
|
+
},
|
10
132
|
{
|
11
133
|
"author": "bernardo.sunderhus@gmail.com",
|
12
134
|
"package": "@fluentui/react-popover",
|
13
135
|
"commit": "ab7380ea15a9a8f0b33b2d31454044d3bb255a63",
|
14
136
|
"comment": "Updates getTriggerChild internal usage"
|
15
137
|
},
|
138
|
+
{
|
139
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
140
|
+
"package": "@fluentui/react-popover",
|
141
|
+
"commit": "ddf16d80c50d80bc07331b478f567629775f2898",
|
142
|
+
"comment": "chore: Adding scheduler as a peer dependency since this package has a dependency on @fluentui/react-context-selector."
|
143
|
+
},
|
16
144
|
{
|
17
145
|
"author": "lingfangao@hotmail.com",
|
18
146
|
"package": "@fluentui/react-popover",
|
19
147
|
"commit": "49c53f4d840db961602513e61482a93a5f83a9c3",
|
20
148
|
"comment": "fix: Add arrow padding to Popover arrrow"
|
21
149
|
},
|
150
|
+
{
|
151
|
+
"author": "lingfangao@hotmail.com",
|
152
|
+
"package": "@fluentui/react-popover",
|
153
|
+
"commit": "e0aabd850b15adf9c151ebd4e332f7c50ad6cfdf",
|
154
|
+
"comment": "Update 9.0.0-rc dependencies to use caret range"
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"author": "lingfangao@hotmail.com",
|
158
|
+
"package": "@fluentui/react-popover",
|
159
|
+
"commit": "675acea49c97f10837ddee9b8c4350ca27750125",
|
160
|
+
"comment": "Bump Griffel dependencies"
|
161
|
+
}
|
162
|
+
],
|
163
|
+
"patch": [
|
164
|
+
{
|
165
|
+
"author": "lingfangao@hotmail.com",
|
166
|
+
"package": "@fluentui/react-popover",
|
167
|
+
"commit": "c7b1348bdad7aa883c29bfbc96ef2a32e6ebc7dd",
|
168
|
+
"comment": "feat: Initial 9.0.0 release"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"author": "beachball",
|
172
|
+
"package": "@fluentui/react-popover",
|
173
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.0",
|
174
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
175
|
+
},
|
22
176
|
{
|
23
177
|
"author": "beachball",
|
24
178
|
"package": "@fluentui/react-popover",
|
25
|
-
"comment": "Bump @fluentui/react-
|
26
|
-
"commit": "
|
179
|
+
"comment": "Bump @fluentui/react-portal to v9.0.0",
|
180
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
27
181
|
},
|
28
182
|
{
|
29
183
|
"author": "beachball",
|
30
184
|
"package": "@fluentui/react-popover",
|
31
|
-
"comment": "Bump @fluentui/react-
|
32
|
-
"commit": "
|
185
|
+
"comment": "Bump @fluentui/react-positioning to v9.0.0",
|
186
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
33
187
|
},
|
34
188
|
{
|
35
189
|
"author": "beachball",
|
36
190
|
"package": "@fluentui/react-popover",
|
37
|
-
"comment": "Bump @fluentui/react-
|
38
|
-
"commit": "
|
191
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0",
|
192
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
39
193
|
},
|
40
194
|
{
|
41
195
|
"author": "beachball",
|
42
196
|
"package": "@fluentui/react-popover",
|
43
|
-
"comment": "Bump @fluentui/react-
|
44
|
-
"commit": "
|
197
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0",
|
198
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
45
199
|
},
|
46
200
|
{
|
47
201
|
"author": "beachball",
|
48
202
|
"package": "@fluentui/react-popover",
|
49
|
-
"comment": "Bump @fluentui/react-
|
50
|
-
"commit": "
|
203
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0",
|
204
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
51
205
|
},
|
52
206
|
{
|
53
207
|
"author": "beachball",
|
54
208
|
"package": "@fluentui/react-popover",
|
55
|
-
"comment": "Bump @fluentui/react-
|
56
|
-
"commit": "
|
209
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0",
|
210
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
57
211
|
},
|
58
212
|
{
|
59
213
|
"author": "beachball",
|
60
214
|
"package": "@fluentui/react-popover",
|
61
|
-
"comment": "Bump @fluentui/react-
|
62
|
-
"commit": "
|
215
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9",
|
216
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
63
217
|
}
|
64
|
-
]
|
65
|
-
|
218
|
+
]
|
219
|
+
}
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"date": "Thu, 23 Jun 2022 14:25:31 GMT",
|
223
|
+
"tag": "@fluentui/react-popover_v9.0.0-rc.14",
|
224
|
+
"version": "9.0.0-rc.14",
|
225
|
+
"comments": {
|
226
|
+
"prerelease": [
|
66
227
|
{
|
67
|
-
"author": "
|
228
|
+
"author": "beachball",
|
68
229
|
"package": "@fluentui/react-popover",
|
69
|
-
"
|
70
|
-
"
|
230
|
+
"comment": "Bump @fluentui/react-portal to v9.0.0-rc.14",
|
231
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"author": "beachball",
|
235
|
+
"package": "@fluentui/react-popover",
|
236
|
+
"comment": "Bump @fluentui/react-positioning to v9.0.0-rc.12",
|
237
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
238
|
+
},
|
239
|
+
{
|
240
|
+
"author": "beachball",
|
241
|
+
"package": "@fluentui/react-popover",
|
242
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.11",
|
243
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"author": "beachball",
|
247
|
+
"package": "@fluentui/react-popover",
|
248
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.14",
|
249
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
250
|
+
},
|
251
|
+
{
|
252
|
+
"author": "beachball",
|
253
|
+
"package": "@fluentui/react-popover",
|
254
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.10",
|
255
|
+
"commit": "b00790b7a0ea1473d8c3cc49c7ca0088002957ed"
|
71
256
|
}
|
72
257
|
]
|
73
258
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,25 +1,77 @@
|
|
1
1
|
# Change Log - @fluentui/react-popover
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Wed, 29 Jun 2022 14:56:17 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20220629-1444.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v0.0.0-nightly-20220629-1444.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.
|
9
|
+
Wed, 29 Jun 2022 14:56:17 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.1..@fluentui/react-popover_v0.0.0-nightly-20220629-1444.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
|
15
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
16
|
+
- Bump @fluentui/react-portal to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
17
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
18
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
19
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
20
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
21
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
22
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220629-1444.1 ([commit](https://github.com/microsoft/fluentui/commit/69fd45674774a9e2e90bb9fcb472a7d0b13aeafd) by beachball)
|
23
|
+
|
24
|
+
## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.1)
|
25
|
+
|
26
|
+
Tue, 28 Jun 2022 17:39:50 GMT
|
27
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0..@fluentui/react-popover_v9.0.1)
|
28
|
+
|
29
|
+
### Patches
|
30
|
+
|
31
|
+
- fix: Use caret dependency range for Griffel ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by lingfangao@hotmail.com)
|
32
|
+
- Bump @fluentui/react-portal to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
33
|
+
- Bump @fluentui/react-positioning to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
34
|
+
- Bump @fluentui/react-tabster to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
35
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
36
|
+
|
37
|
+
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0)
|
38
|
+
|
39
|
+
Tue, 28 Jun 2022 15:13:46 GMT
|
40
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-rc.14..@fluentui/react-popover_v9.0.0)
|
41
|
+
|
42
|
+
### Patches
|
43
|
+
|
44
|
+
- feat: Initial 9.0.0 release ([PR #23733](https://github.com/microsoft/fluentui/pull/23733) by lingfangao@hotmail.com)
|
45
|
+
- Bump @fluentui/react-context-selector to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
46
|
+
- Bump @fluentui/react-portal to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
47
|
+
- Bump @fluentui/react-positioning to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
48
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
49
|
+
- Bump @fluentui/react-tabster to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
50
|
+
- Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
51
|
+
- Bump @fluentui/react-utilities to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
52
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
53
|
+
|
54
|
+
### Changes
|
55
|
+
|
56
|
+
- feat: Adds `legacyTrapFocus` prop ([PR #23598](https://github.com/microsoft/fluentui/pull/23598) by lingfangao@hotmail.com)
|
14
57
|
- Updates getTriggerChild internal usage ([PR #23574](https://github.com/microsoft/fluentui/pull/23574) by bernardo.sunderhus@gmail.com)
|
58
|
+
- chore: Adding scheduler as a peer dependency since this package has a dependency on @fluentui/react-context-selector. ([PR #23681](https://github.com/microsoft/fluentui/pull/23681) by Humberto.Morimoto@microsoft.com)
|
15
59
|
- fix: Add arrow padding to Popover arrrow ([PR #23607](https://github.com/microsoft/fluentui/pull/23607) by lingfangao@hotmail.com)
|
16
|
-
-
|
17
|
-
- Bump
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
60
|
+
- Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
|
61
|
+
- Bump Griffel dependencies ([PR #23688](https://github.com/microsoft/fluentui/pull/23688) by lingfangao@hotmail.com)
|
62
|
+
|
63
|
+
## [9.0.0-rc.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-rc.14)
|
64
|
+
|
65
|
+
Thu, 23 Jun 2022 14:25:31 GMT
|
66
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-rc.13..@fluentui/react-popover_v9.0.0-rc.14)
|
67
|
+
|
68
|
+
### Changes
|
69
|
+
|
70
|
+
- Bump @fluentui/react-portal to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
71
|
+
- Bump @fluentui/react-positioning to v9.0.0-rc.12 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
72
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.11 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
73
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
74
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.10 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
|
23
75
|
|
24
76
|
## [9.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-rc.13)
|
25
77
|
|
package/dist/index.d.ts
CHANGED
@@ -14,6 +14,7 @@ import * as React_2 from 'react';
|
|
14
14
|
import { ReactElement } from 'react';
|
15
15
|
import type { Slot } from '@fluentui/react-utilities';
|
16
16
|
import type { SlotClassNames } from '@fluentui/react-utilities';
|
17
|
+
import type { UseModalAttributesOptions } from '@fluentui/react-tabster';
|
17
18
|
import type { usePositioningMouseTarget } from '@fluentui/react-positioning';
|
18
19
|
|
19
20
|
export declare const arrowHeights: Record<PopoverSize, number>;
|
@@ -38,7 +39,7 @@ export declare const Popover: React_2.FC<PopoverProps>;
|
|
38
39
|
/**
|
39
40
|
* Context shared between Popover and its children components
|
40
41
|
*/
|
41
|
-
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'toggleOpen' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'withArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus' | 'inline'>;
|
42
|
+
export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'toggleOpen' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'withArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus' | 'legacyTrapFocus' | 'inline'>;
|
42
43
|
|
43
44
|
/**
|
44
45
|
* Popover Props
|
@@ -120,7 +121,17 @@ export declare type PopoverProps = Pick<PortalProps, 'mountNode'> & {
|
|
120
121
|
*
|
121
122
|
* @default false
|
122
123
|
*/
|
123
|
-
trapFocus?:
|
124
|
+
trapFocus?: UseModalAttributesOptions['trapFocus'];
|
125
|
+
/**
|
126
|
+
* Must be used with the `trapFocus` prop
|
127
|
+
* Enables older Fluent UI focus trap behavior where the user
|
128
|
+
* cannot tab into the window outside of the document. This is now
|
129
|
+
* non-standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)
|
130
|
+
* where the focus trap involves setting outside elements inert.
|
131
|
+
*
|
132
|
+
* @default false
|
133
|
+
*/
|
134
|
+
legacyTrapFocus?: UseModalAttributesOptions['legacyTrapFocus'];
|
124
135
|
};
|
125
136
|
|
126
137
|
export declare const PopoverProvider: Provider<PopoverContextValue> & FC<ProviderProps<PopoverContextValue>>;
|
@@ -133,7 +144,7 @@ export declare type PopoverSize = 'small' | 'medium' | 'large';
|
|
133
144
|
/**
|
134
145
|
* Popover State
|
135
146
|
*/
|
136
|
-
export declare type PopoverState = Pick<PopoverProps, 'appearance' | 'mountNode' | 'onOpenChange' | 'openOnContext' | 'openOnHover' | 'trapFocus' | 'withArrow'> & Required<Pick<PopoverProps, 'inline' | 'open'>> & Pick<PopoverProps, 'children'> & {
|
147
|
+
export declare type PopoverState = Pick<PopoverProps, 'appearance' | 'mountNode' | 'onOpenChange' | 'openOnContext' | 'openOnHover' | 'trapFocus' | 'withArrow' | 'legacyTrapFocus'> & Required<Pick<PopoverProps, 'inline' | 'open'>> & Pick<PopoverProps, 'children'> & {
|
137
148
|
/**
|
138
149
|
* Ref of the pointing arrow
|
139
150
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Popover.types.js","sourceRoot":"../src/","sources":["components/Popover/Popover.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type {\n PositioningVirtualElement,\n PositioningShorthand,\n usePositioningMouseTarget,\n} from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport type PopoverProps = Pick<PortalProps, 'mountNode'> & {\n /**\n * A popover can appear styled with brand or inverted.\n * When not specified, the default style is used.\n */\n appearance?: 'brand' | 'inverted';\n\n /**\n * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.\n * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Popovers are rendered out of DOM order on `document.body` by default, use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Sets the delay for closing popover on mouse leave\n */\n mouseLeaveDelay?: number;\n\n /**\n * Display an arrow pointing to the target.\n *\n * @default false\n */\n withArrow?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: OpenPopoverEvents, data: OnOpenChangeData) => void;\n\n /**\n * Controls the opening of the Popover\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Flag to open the Popover by hovering the trigger\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Configures the position of the Popover\n */\n positioning?: PositioningShorthand;\n\n /**\n * Determines popover padding and arrow size\n *\n * @default medium\n */\n size?: PopoverSize;\n\n /**\n * Should trap focus\n *\n * @default false\n */\n trapFocus?:
|
1
|
+
{"version":3,"file":"Popover.types.js","sourceRoot":"../src/","sources":["components/Popover/Popover.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type {\n PositioningVirtualElement,\n PositioningShorthand,\n usePositioningMouseTarget,\n} from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\nimport type { UseModalAttributesOptions } from '@fluentui/react-tabster';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport type PopoverProps = Pick<PortalProps, 'mountNode'> & {\n /**\n * A popover can appear styled with brand or inverted.\n * When not specified, the default style is used.\n */\n appearance?: 'brand' | 'inverted';\n\n /**\n * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.\n * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Popovers are rendered out of DOM order on `document.body` by default, use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Sets the delay for closing popover on mouse leave\n */\n mouseLeaveDelay?: number;\n\n /**\n * Display an arrow pointing to the target.\n *\n * @default false\n */\n withArrow?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: OpenPopoverEvents, data: OnOpenChangeData) => void;\n\n /**\n * Controls the opening of the Popover\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Flag to open the Popover by hovering the trigger\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Configures the position of the Popover\n */\n positioning?: PositioningShorthand;\n\n /**\n * Determines popover padding and arrow size\n *\n * @default medium\n */\n size?: PopoverSize;\n\n /**\n * Should trap focus\n *\n * @default false\n */\n trapFocus?: UseModalAttributesOptions['trapFocus'];\n\n /**\n * Must be used with the `trapFocus` prop\n * Enables older Fluent UI focus trap behavior where the user\n * cannot tab into the window outside of the document. This is now\n * non-standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @default false\n */\n legacyTrapFocus?: UseModalAttributesOptions['legacyTrapFocus'];\n};\n\n/**\n * Popover State\n */\nexport type PopoverState = Pick<\n PopoverProps,\n | 'appearance'\n | 'mountNode'\n | 'onOpenChange'\n | 'openOnContext'\n | 'openOnHover'\n | 'trapFocus'\n | 'withArrow'\n | 'legacyTrapFocus'\n> &\n Required<Pick<PopoverProps, 'inline' | 'open'>> &\n Pick<PopoverProps, 'children'> & {\n /**\n * Ref of the pointing arrow\n */\n arrowRef: React.MutableRefObject<HTMLDivElement | null>;\n\n /**\n * Ref of the PopoverSurface\n */\n contentRef: React.MutableRefObject<HTMLElement | null>;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: PositioningVirtualElement | undefined;\n\n popoverSurface: React.ReactElement | undefined;\n\n popoverTrigger: React.ReactElement | undefined;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: ReturnType<typeof usePositioningMouseTarget>[1];\n\n /**\n * Callback to open/close the Popover\n */\n setOpen: (e: OpenPopoverEvents, open: boolean) => void;\n\n size: NonNullable<PopoverProps['size']>;\n\n /**\n * Callback to toggle the open state of the Popover\n */\n toggleOpen: (e: OpenPopoverEvents) => void;\n\n /**\n * Ref of the PopoverTrigger\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type OnOpenChangeData = { open: boolean };\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type OpenPopoverEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"]}
|
@@ -19,7 +19,8 @@ export const renderPopover_unstable = state => {
|
|
19
19
|
toggleOpen,
|
20
20
|
trapFocus,
|
21
21
|
triggerRef,
|
22
|
-
withArrow
|
22
|
+
withArrow,
|
23
|
+
legacyTrapFocus
|
23
24
|
} = state;
|
24
25
|
return /*#__PURE__*/React.createElement(PopoverContext.Provider, {
|
25
26
|
value: {
|
@@ -36,6 +37,7 @@ export const renderPopover_unstable = state => {
|
|
36
37
|
triggerRef,
|
37
38
|
size,
|
38
39
|
trapFocus,
|
40
|
+
legacyTrapFocus,
|
39
41
|
withArrow
|
40
42
|
}
|
41
43
|
}, state.popoverTrigger, state.open && state.popoverSurface);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,sBAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IACJ,UADI;IAEJ,QAFI;IAGJ,UAHI;IAIJ,MAJI;IAKJ,SALI;IAMJ,IANI;IAOJ,aAPI;IAQJ,WARI;IASJ,OATI;IAUJ,IAVI;IAWJ,UAXI;IAYJ,SAZI;IAaJ,UAbI;IAcJ;
|
1
|
+
{"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,sBAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IACJ,UADI;IAEJ,QAFI;IAGJ,UAHI;IAIJ,MAJI;IAKJ,SALI;IAMJ,IANI;IAOJ,aAPI;IAQJ,WARI;IASJ,OATI;IAUJ,IAVI;IAWJ,UAXI;IAYJ,SAZI;IAaJ,UAbI;IAcJ,SAdI;IAeJ;EAfI,IAgBF,KAhBJ;EAkBA,oBACE,KAAA,CAAA,aAAA,CAAC,cAAc,CAAC,QAAhB,EAAwB;IACtB,KAAK,EAAE;MACL,UADK;MAEL,QAFK;MAGL,UAHK;MAIL,MAJK;MAKL,SALK;MAML,IANK;MAOL,aAPK;MAQL,WARK;MASL,OATK;MAUL,UAVK;MAWL,UAXK;MAYL,IAZK;MAaL,SAbK;MAcL,eAdK;MAeL;IAfK;EADe,CAAxB,EAmBG,KAAK,CAAC,cAnBT,EAoBG,KAAK,CAAC,IAAN,IAAc,KAAK,CAAC,cApBvB,CADF;AAwBD,CA3CM","sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n const {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n size,\n toggleOpen,\n trapFocus,\n triggerRef,\n withArrow,\n legacyTrapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n legacyTrapFocus,\n withArrow,\n }}\n >\n {state.popoverTrigger}\n {state.open && state.popoverSurface}\n </PopoverContext.Provider>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -21,11 +21,13 @@ export const usePopoverSurface_unstable = (props, ref) => {
|
|
21
21
|
const withArrow = usePopoverContext_unstable(context => context.withArrow);
|
22
22
|
const appearance = usePopoverContext_unstable(context => context.appearance);
|
23
23
|
const trapFocus = usePopoverContext_unstable(context => context.trapFocus);
|
24
|
+
const legacyTrapFocus = usePopoverContext_unstable(context => context.legacyTrapFocus);
|
24
25
|
const inline = usePopoverContext_unstable(context => context.inline);
|
25
26
|
const {
|
26
27
|
modalAttributes
|
27
28
|
} = useModalAttributes({
|
28
|
-
trapFocus
|
29
|
+
trapFocus,
|
30
|
+
legacyTrapFocus
|
29
31
|
});
|
30
32
|
const state = {
|
31
33
|
inline,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PopoverSurface/usePopoverSurface.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,SAAS,kBAAT,QAAmC,yBAAnC;AACA,SAAS,0BAAT,QAA2C,sBAA3C;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,UAAU,GAAG,0BAA0B,CAAC,OAAO,IAAI,OAAO,CAAC,UAApB,CAA7C;EACA,MAAM,WAAW,GAAG,0BAA0B,CAAC,OAAO,IAAI,OAAO,CAAC,WAApB,CAA9C;EACA,MAAM,OAAO,GAAG,0BAA0B,CAAC,OAAO,IAAI,OAAO,CAAC,OAApB,CAA1C;EACA,MAAM,SAAS,GAAG,0BAA0B,CAAC,OAAO,IAAI,OAAO,CAAC,SAApB,CAA5C;EACA,MAAM,QAAQ,GAAG,0BAA0B,CAAC,OAAO,IAAI,OAAO,CAAC,QAApB,CAA3C;EACA,M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AD,EAAI,KAAJ,CAAP;IACD;;IAED,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;EACD,CAND;;EAQA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAwB,CAAD,IAA2C;WAAA,CAChE;IACA;;;IACA,IAAI,CAAC,CAAC,GAAF,KAAU,QAAV,KAAsB,CAAA,EAAA,GAAA,UAAU,CAAC,OAAX,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,QAAF,CAAW,CAAC,CAAC,MAAb,CAAxC,CAAJ,EAAoF;MAClF,OAAO,CAAC,CAAD,EAAI,KAAJ,CAAP;IACD;;IAED,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAG,CAAH,CAAjB;EACD,CARD;;EAUA,OAAO,KAAP;AACD,CApEM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverSurfaceProps, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (\n props: PopoverSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PopoverSurfaceState => {\n const contentRef = usePopoverContext_unstable(context => context.contentRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const mountNode = usePopoverContext_unstable(context => context.mountNode);\n const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n const size = usePopoverContext_unstable(context => context.size);\n const withArrow = usePopoverContext_unstable(context => context.withArrow);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n const legacyTrapFocus = usePopoverContext_unstable(context => context.legacyTrapFocus);\n const inline = usePopoverContext_unstable(context => context.inline);\n const { modalAttributes } = useModalAttributes({ trapFocus, legacyTrapFocus });\n\n const state: PopoverSurfaceState = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'complementary',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props,\n }),\n };\n\n const {\n onMouseEnter: onMouseEnterOriginal,\n onMouseLeave: onMouseLeaveOriginal,\n onKeyDown: onKeyDownOriginal,\n } = state.root;\n state.root.onMouseEnter = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n\n onMouseEnterOriginal?.(e);\n };\n\n state.root.onMouseLeave = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n\n onMouseLeaveOriginal?.(e);\n };\n\n state.root.onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape' && contentRef.current?.contains(e.target as HTMLDivElement)) {\n setOpen(e, false);\n }\n\n onKeyDownOriginal?.(e);\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAIA,OAAO,MAAM,cAAc,gBAAiC,aAAa,CAAsB;EAC7F,IAAI,EAAE,KADuF;EAE7F,OAAO,EAAE,MAAM,IAF8E;EAG7F,UAAU,EAAE,MAAM,IAH2E;EAI7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJiF;EAK7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CALiF;EAM7F,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CANmF;EAO7F,aAAa,EAAE,KAP8E;EAQ7F,WAAW,EAAE,KARgF;EAS7F,IAAI,EAAE,QATuF;EAU7F,SAAS,EAAE,KAVkF;EAW7F,MAAM,EAAE;AAXqF,CAAtB,CAAlE;AAcP,OAAO,MAAM,eAAe,GAAG,cAAc,CAAC,QAAvC;
|
1
|
+
{"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAIA,OAAO,MAAM,cAAc,gBAAiC,aAAa,CAAsB;EAC7F,IAAI,EAAE,KADuF;EAE7F,OAAO,EAAE,MAAM,IAF8E;EAG7F,UAAU,EAAE,MAAM,IAH2E;EAI7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJiF;EAK7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CALiF;EAM7F,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CANmF;EAO7F,aAAa,EAAE,KAP8E;EAQ7F,WAAW,EAAE,KARgF;EAS7F,IAAI,EAAE,QATuF;EAU7F,SAAS,EAAE,KAVkF;EAW7F,MAAM,EAAE;AAXqF,CAAtB,CAAlE;AAcP,OAAO,MAAM,eAAe,GAAG,cAAc,CAAC,QAAvC;AAwBP,OAAO,MAAM,0BAA0B,GAAO,QAAJ,IACxC,kBAAkB,CAAC,cAAD,EAAiB,QAAjB,CADb","sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue>({\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n openOnContext: false,\n openOnHover: false,\n size: 'medium',\n trapFocus: false,\n inline: false,\n});\n\nexport const PopoverProvider = PopoverContext.Provider;\n\n/**\n * Context shared between Popover and its children components\n */\nexport type PopoverContextValue = Pick<\n PopoverState,\n | 'open'\n | 'toggleOpen'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'withArrow'\n | 'arrowRef'\n | 'size'\n | 'appearance'\n | 'trapFocus'\n | 'legacyTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, selector);\n"],"sourceRoot":"../src/"}
|
@@ -28,7 +28,8 @@ const renderPopover_unstable = state => {
|
|
28
28
|
toggleOpen,
|
29
29
|
trapFocus,
|
30
30
|
triggerRef,
|
31
|
-
withArrow
|
31
|
+
withArrow,
|
32
|
+
legacyTrapFocus
|
32
33
|
} = state;
|
33
34
|
return React.createElement(popoverContext_1.PopoverContext.Provider, {
|
34
35
|
value: {
|
@@ -45,6 +46,7 @@ const renderPopover_unstable = state => {
|
|
45
46
|
triggerRef,
|
46
47
|
size,
|
47
48
|
trapFocus,
|
49
|
+
legacyTrapFocus,
|
48
50
|
withArrow
|
49
51
|
}
|
50
52
|
}, state.popoverTrigger, state.open && state.popoverSurface);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IACJ,UADI;IAEJ,QAFI;IAGJ,UAHI;IAIJ,MAJI;IAKJ,SALI;IAMJ,IANI;IAOJ,aAPI;IAQJ,WARI;IASJ,OATI;IAUJ,IAVI;IAWJ,UAXI;IAYJ,SAZI;IAaJ,UAbI;IAcJ;
|
1
|
+
{"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IACJ,UADI;IAEJ,QAFI;IAGJ,UAHI;IAIJ,MAJI;IAKJ,SALI;IAMJ,IANI;IAOJ,aAPI;IAQJ,WARI;IASJ,OATI;IAUJ,IAVI;IAWJ,UAXI;IAYJ,SAZI;IAaJ,UAbI;IAcJ,SAdI;IAeJ;EAfI,IAgBF,KAhBJ;EAkBA,OACE,KAAA,CAAA,aAAA,CAAC,gBAAA,CAAA,cAAA,CAAe,QAAhB,EAAwB;IACtB,KAAK,EAAE;MACL,UADK;MAEL,QAFK;MAGL,UAHK;MAIL,MAJK;MAKL,SALK;MAML,IANK;MAOL,aAPK;MAQL,WARK;MASL,OATK;MAUL,UAVK;MAWL,UAXK;MAYL,IAZK;MAaL,SAbK;MAcL,eAdK;MAeL;IAfK;EADe,CAAxB,EAmBG,KAAK,CAAC,cAnBT,EAoBG,KAAK,CAAC,IAAN,IAAc,KAAK,CAAC,cApBvB,CADF;AAwBD,CA3CM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n const {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n size,\n toggleOpen,\n trapFocus,\n triggerRef,\n withArrow,\n legacyTrapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n legacyTrapFocus,\n withArrow,\n }}\n >\n {state.popoverTrigger}\n {state.open && state.popoverSurface}\n </PopoverContext.Provider>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -31,11 +31,13 @@ const usePopoverSurface_unstable = (props, ref) => {
|
|
31
31
|
const withArrow = popoverContext_1.usePopoverContext_unstable(context => context.withArrow);
|
32
32
|
const appearance = popoverContext_1.usePopoverContext_unstable(context => context.appearance);
|
33
33
|
const trapFocus = popoverContext_1.usePopoverContext_unstable(context => context.trapFocus);
|
34
|
+
const legacyTrapFocus = popoverContext_1.usePopoverContext_unstable(context => context.legacyTrapFocus);
|
34
35
|
const inline = popoverContext_1.usePopoverContext_unstable(context => context.inline);
|
35
36
|
const {
|
36
37
|
modalAttributes
|
37
38
|
} = react_tabster_1.useModalAttributes({
|
38
|
-
trapFocus
|
39
|
+
trapFocus,
|
40
|
+
legacyTrapFocus
|
39
41
|
});
|
40
42
|
const state = {
|
41
43
|
inline,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PopoverSurface/usePopoverSurface.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,UAAU,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,UAA9C,CAAnB;EACA,MAAM,WAAW,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI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AAjB;EACD,CARD;;EAUA,OAAO,KAAP;AACD,CApEM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverSurfaceProps, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (\n props: PopoverSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PopoverSurfaceState => {\n const contentRef = usePopoverContext_unstable(context => context.contentRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const mountNode = usePopoverContext_unstable(context => context.mountNode);\n const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n const size = usePopoverContext_unstable(context => context.size);\n const withArrow = usePopoverContext_unstable(context => context.withArrow);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n const legacyTrapFocus = usePopoverContext_unstable(context => context.legacyTrapFocus);\n const inline = usePopoverContext_unstable(context => context.inline);\n const { modalAttributes } = useModalAttributes({ trapFocus, legacyTrapFocus });\n\n const state: PopoverSurfaceState = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'complementary',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props,\n }),\n };\n\n const {\n onMouseEnter: onMouseEnterOriginal,\n onMouseLeave: onMouseLeaveOriginal,\n onKeyDown: onKeyDownOriginal,\n } = state.root;\n state.root.onMouseEnter = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n\n onMouseEnterOriginal?.(e);\n };\n\n state.root.onMouseLeave = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n\n onMouseLeaveOriginal?.(e);\n };\n\n state.root.onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape' && contentRef.current?.contains(e.target as HTMLDivElement)) {\n setOpen(e, false);\n }\n\n onKeyDownOriginal?.(e);\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAAmC;EAC7F,IAAI,EAAE,KADuF;EAE7F,OAAO,EAAE,MAAM,IAF8E;EAG7F,UAAU,EAAE,MAAM,IAH2E;EAI7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJiF;EAK7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CALiF;EAM7F,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CANmF;EAO7F,aAAa,EAAE,KAP8E;EAQ7F,WAAW,EAAE,KARgF;EAS7F,IAAI,EAAE,QATuF;EAU7F,SAAS,EAAE,KAVkF;EAW7F,MAAM,EAAE;AAXqF,CAAnC,CAA/C;AAcA,OAAA,CAAA,eAAA,GAAkB,OAAA,CAAA,cAAA,CAAe,QAAjC;;
|
1
|
+
{"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAAmC;EAC7F,IAAI,EAAE,KADuF;EAE7F,OAAO,EAAE,MAAM,IAF8E;EAG7F,UAAU,EAAE,MAAM,IAH2E;EAI7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJiF;EAK7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CALiF;EAM7F,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CANmF;EAO7F,aAAa,EAAE,KAP8E;EAQ7F,WAAW,EAAE,KARgF;EAS7F,IAAI,EAAE,QATuF;EAU7F,SAAS,EAAE,KAVkF;EAW7F,MAAM,EAAE;AAXqF,CAAnC,CAA/C;AAcA,OAAA,CAAA,eAAA,GAAkB,OAAA,CAAA,cAAA,CAAe,QAAjC;;AAwBN,MAAM,0BAA0B,GAAO,QAAJ,IACxC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,cAAnB,EAAmC,QAAnC,CADK;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue>({\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n openOnContext: false,\n openOnHover: false,\n size: 'medium',\n trapFocus: false,\n inline: false,\n});\n\nexport const PopoverProvider = PopoverContext.Provider;\n\n/**\n * Context shared between Popover and its children components\n */\nexport type PopoverContextValue = Pick<\n PopoverState,\n | 'open'\n | 'toggleOpen'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'withArrow'\n | 'arrowRef'\n | 'size'\n | 'appearance'\n | 'trapFocus'\n | 'legacyTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, selector);\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-popover",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20220629-1444.1",
|
4
4
|
"description": "Popover component for Fluent UI",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -30,31 +30,30 @@
|
|
30
30
|
"devDependencies": {
|
31
31
|
"@fluentui/eslint-plugin": "*",
|
32
32
|
"@fluentui/react-conformance": "*",
|
33
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
33
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20220629-1444.1",
|
34
34
|
"@fluentui/scripts": "^1.0.0"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@fluentui/react-context-selector": "0.0.0-nightly-
|
38
|
-
"@
|
39
|
-
"@fluentui/react-
|
40
|
-
"@fluentui/react-
|
41
|
-
"@fluentui/react-
|
42
|
-
"@fluentui/react-
|
43
|
-
"@fluentui/react-
|
44
|
-
"@
|
37
|
+
"@fluentui/react-context-selector": "^0.0.0-nightly-20220629-1444.1",
|
38
|
+
"@fluentui/react-portal": "^0.0.0-nightly-20220629-1444.1",
|
39
|
+
"@fluentui/react-positioning": "^0.0.0-nightly-20220629-1444.1",
|
40
|
+
"@fluentui/react-shared-contexts": "^0.0.0-nightly-20220629-1444.1",
|
41
|
+
"@fluentui/react-tabster": "^0.0.0-nightly-20220629-1444.1",
|
42
|
+
"@fluentui/react-theme": "^0.0.0-nightly-20220629-1444.1",
|
43
|
+
"@fluentui/react-utilities": "^0.0.0-nightly-20220629-1444.1",
|
44
|
+
"@griffel/react": "^1.2.0",
|
45
45
|
"tslib": "^2.1.0"
|
46
46
|
},
|
47
47
|
"peerDependencies": {
|
48
48
|
"@types/react": ">=16.8.0 <18.0.0",
|
49
49
|
"@types/react-dom": ">=16.8.0 <18.0.0",
|
50
50
|
"react": ">=16.8.0 <18.0.0",
|
51
|
-
"react-dom": ">=16.8.0 <18.0.0"
|
51
|
+
"react-dom": ">=16.8.0 <18.0.0",
|
52
|
+
"scheduler": "^0.19.0 || ^0.20.0"
|
52
53
|
},
|
53
54
|
"beachball": {
|
54
55
|
"disallowedChangeTypes": [
|
55
|
-
"major"
|
56
|
-
"minor",
|
57
|
-
"patch"
|
56
|
+
"major"
|
58
57
|
]
|
59
58
|
},
|
60
59
|
"exports": {
|