@fluentui/react-popover 0.0.0-nightly0e0cf06c3420211029.1 → 0.0.0-nightly131c59c96120211203.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 +206 -24
- package/CHANGELOG.md +56 -15
- package/dist/react-popover.d.ts +2 -0
- package/lib/components/Popover/Popover.js +2 -2
- package/lib/components/Popover/Popover.js.map +1 -1
- package/lib/components/Popover/renderPopover.js +27 -25
- package/lib/components/Popover/renderPopover.js.map +1 -1
- package/lib/components/Popover/usePopover.js +39 -51
- package/lib/components/Popover/usePopover.js.map +1 -1
- package/lib/components/PopoverSurface/PopoverSurface.js +2 -2
- package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/renderPopoverSurface.js +6 -7
- package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurface.js +41 -55
- package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +1 -0
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +29 -16
- package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
- package/lib/components/PopoverTrigger/PopoverTrigger.js +2 -2
- package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
- package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
- package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
- package/lib/components/PopoverTrigger/usePopoverTrigger.js +25 -33
- package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
- package/lib/popoverContext.js +3 -7
- package/lib/popoverContext.js.map +1 -1
- package/lib-commonjs/Popover.js +1 -1
- package/lib-commonjs/PopoverSurface.js +1 -1
- package/lib-commonjs/PopoverTrigger.js +1 -1
- package/lib-commonjs/components/Popover/Popover.js +4 -4
- package/lib-commonjs/components/Popover/Popover.js.map +1 -1
- package/lib-commonjs/components/Popover/index.js +1 -1
- package/lib-commonjs/components/Popover/renderPopover.js +29 -27
- package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
- package/lib-commonjs/components/Popover/usePopover.js +45 -58
- package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +6 -6
- package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/index.js +1 -1
- package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +10 -12
- package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +44 -59
- package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +1 -0
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +30 -16
- package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +4 -4
- package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/index.js +1 -1
- package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
- package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
- package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +29 -38
- package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/lib-commonjs/popoverContext.js +3 -7
- package/lib-commonjs/popoverContext.js.map +1 -1
- package/package.json +13 -13
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -13
- package/lib/common/isConformant.js.map +0 -1
- package/lib/common/mockUsePopoverContext.d.ts +0 -7
- package/lib/common/mockUsePopoverContext.js +0 -38
- package/lib/common/mockUsePopoverContext.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -24
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/mockUsePopoverContext.d.ts +0 -7
- package/lib-commonjs/common/mockUsePopoverContext.js +0 -49
- package/lib-commonjs/common/mockUsePopoverContext.js.map +0 -1
package/CHANGELOG.json
CHANGED
@@ -2,84 +2,266 @@
|
|
2
2
|
"name": "@fluentui/react-popover",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Fri,
|
6
|
-
"tag": "@fluentui/react-popover_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Fri, 03 Dec 2021 04:13:22 GMT",
|
6
|
+
"tag": "@fluentui/react-popover_v0.0.0-nightly131c59c96120211203.1",
|
7
|
+
"version": "0.0.0-nightly131c59c96120211203.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-popover",
|
13
|
-
"commit": "
|
13
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "olfedias@microsoft.com",
|
18
|
+
"package": "@fluentui/react-popover",
|
19
|
+
"commit": "ec0e785df9c70a2202dc5cc3cb4001d1ee635124",
|
20
|
+
"comment": "update styles to not use CSS shorthands"
|
21
|
+
},
|
16
22
|
{
|
17
23
|
"author": "beachball",
|
18
24
|
"package": "@fluentui/react-popover",
|
19
|
-
"comment": "Bump @fluentui/react-context-selector to v0.0.0-
|
20
|
-
"commit": "
|
25
|
+
"comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly131c59c96120211203.1",
|
26
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
21
27
|
},
|
22
28
|
{
|
23
29
|
"author": "beachball",
|
24
30
|
"package": "@fluentui/react-popover",
|
25
|
-
"comment": "Bump @fluentui/react-make-styles to v0.0.0-
|
26
|
-
"commit": "
|
31
|
+
"comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly131c59c96120211203.1",
|
32
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
27
33
|
},
|
28
34
|
{
|
29
35
|
"author": "beachball",
|
30
36
|
"package": "@fluentui/react-popover",
|
31
|
-
"comment": "Bump @fluentui/react-portal to v0.0.0-
|
32
|
-
"commit": "
|
37
|
+
"comment": "Bump @fluentui/react-portal to v0.0.0-nightly131c59c96120211203.1",
|
38
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
33
39
|
},
|
34
40
|
{
|
35
41
|
"author": "beachball",
|
36
42
|
"package": "@fluentui/react-popover",
|
37
|
-
"comment": "Bump @fluentui/react-positioning to v0.0.0-
|
38
|
-
"commit": "
|
43
|
+
"comment": "Bump @fluentui/react-positioning to v0.0.0-nightly131c59c96120211203.1",
|
44
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
39
45
|
},
|
40
46
|
{
|
41
47
|
"author": "beachball",
|
42
48
|
"package": "@fluentui/react-popover",
|
43
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-
|
44
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly131c59c96120211203.1",
|
50
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
45
51
|
},
|
46
52
|
{
|
47
53
|
"author": "beachball",
|
48
54
|
"package": "@fluentui/react-popover",
|
49
|
-
"comment": "Bump @fluentui/react-tabster to v0.0.0-
|
50
|
-
"commit": "
|
55
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly131c59c96120211203.1",
|
56
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
51
57
|
},
|
52
58
|
{
|
53
59
|
"author": "beachball",
|
54
60
|
"package": "@fluentui/react-popover",
|
55
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-
|
56
|
-
"commit": "
|
61
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly131c59c96120211203.1",
|
62
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
57
63
|
},
|
58
64
|
{
|
59
65
|
"author": "beachball",
|
60
66
|
"package": "@fluentui/react-popover",
|
61
|
-
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-
|
62
|
-
"commit": "
|
67
|
+
"comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly131c59c96120211203.1",
|
68
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
63
69
|
},
|
64
70
|
{
|
65
71
|
"author": "beachball",
|
66
72
|
"package": "@fluentui/react-popover",
|
67
|
-
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-
|
68
|
-
"commit": "
|
73
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly131c59c96120211203.1",
|
74
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
69
75
|
},
|
70
76
|
{
|
71
77
|
"author": "beachball",
|
72
78
|
"package": "@fluentui/react-popover",
|
73
|
-
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-
|
74
|
-
"commit": "
|
79
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly131c59c96120211203.1",
|
80
|
+
"commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
|
81
|
+
}
|
82
|
+
]
|
83
|
+
}
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"date": "Thu, 25 Nov 2021 08:34:15 GMT",
|
87
|
+
"tag": "@fluentui/react-popover_v9.0.0-beta.5",
|
88
|
+
"version": "9.0.0-beta.5",
|
89
|
+
"comments": {
|
90
|
+
"prerelease": [
|
91
|
+
{
|
92
|
+
"author": "lingfangao@hotmail.com",
|
93
|
+
"package": "@fluentui/react-popover",
|
94
|
+
"commit": "58db204f28af1d68df7260ff580cf91f0adcfb66",
|
95
|
+
"comment": "Add transparent outline to arrow for HC"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"author": "beachball",
|
99
|
+
"package": "@fluentui/react-popover",
|
100
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.0-beta.4",
|
101
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"author": "beachball",
|
105
|
+
"package": "@fluentui/react-popover",
|
106
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
|
107
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"author": "beachball",
|
111
|
+
"package": "@fluentui/react-popover",
|
112
|
+
"comment": "Bump @fluentui/react-portal to v9.0.0-beta.5",
|
113
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"author": "beachball",
|
117
|
+
"package": "@fluentui/react-popover",
|
118
|
+
"comment": "Bump @fluentui/react-positioning to v9.0.0-beta.4",
|
119
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"author": "beachball",
|
123
|
+
"package": "@fluentui/react-popover",
|
124
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.4",
|
125
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"author": "beachball",
|
129
|
+
"package": "@fluentui/react-popover",
|
130
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.5",
|
131
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"author": "beachball",
|
135
|
+
"package": "@fluentui/react-popover",
|
136
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
|
137
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"author": "beachball",
|
141
|
+
"package": "@fluentui/react-popover",
|
142
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
|
143
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"author": "beachball",
|
147
|
+
"package": "@fluentui/react-popover",
|
148
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
|
149
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"author": "beachball",
|
153
|
+
"package": "@fluentui/react-popover",
|
154
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4",
|
155
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
75
156
|
}
|
76
157
|
],
|
158
|
+
"none": [
|
159
|
+
{
|
160
|
+
"author": "lingfangao@hotmail.com",
|
161
|
+
"package": "@fluentui/react-popover",
|
162
|
+
"commit": "8a141d14f3a14de2e1c4691dad908622f310a9d1",
|
163
|
+
"comment": "Migrate package to use solution tsconfigs"
|
164
|
+
}
|
165
|
+
]
|
166
|
+
}
|
167
|
+
},
|
168
|
+
{
|
169
|
+
"date": "Fri, 12 Nov 2021 13:25:28 GMT",
|
170
|
+
"tag": "@fluentui/react-popover_v9.0.0-beta.4",
|
171
|
+
"version": "9.0.0-beta.4",
|
172
|
+
"comments": {
|
77
173
|
"none": [
|
78
174
|
{
|
79
175
|
"author": "mgodbolt@microsoft.com",
|
80
176
|
"package": "@fluentui/react-popover",
|
81
177
|
"commit": "7fafe76eb2c09f9d17a03c11ba73729d91ef411e",
|
82
178
|
"comment": "update docs descriptions"
|
179
|
+
},
|
180
|
+
{
|
181
|
+
"author": "lingfangao@hotmail.com",
|
182
|
+
"package": "@fluentui/react-popover",
|
183
|
+
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
|
184
|
+
"comment": "Remove beta release tag"
|
185
|
+
}
|
186
|
+
],
|
187
|
+
"prerelease": [
|
188
|
+
{
|
189
|
+
"author": "gcox@microsoft.com",
|
190
|
+
"package": "@fluentui/react-popover",
|
191
|
+
"commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
|
192
|
+
"comment": "Updated beta and RC components to ES2019"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"author": "lingfangao@hotmail.com",
|
196
|
+
"package": "@fluentui/react-popover",
|
197
|
+
"commit": "054822c82e40601815f6cd77733a761b72047e4b",
|
198
|
+
"comment": "fix(Popover): use `dialog` as value for `aria-haspopup` for focus trap"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"author": "olfedias@microsoft.com",
|
202
|
+
"package": "@fluentui/react-popover",
|
203
|
+
"commit": "ade4f5d3fa5a6b1c81097403f5c2f2afd859aa14",
|
204
|
+
"comment": "export static classes for components"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"author": "beachball",
|
208
|
+
"package": "@fluentui/react-popover",
|
209
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.0-beta.3",
|
210
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"author": "beachball",
|
214
|
+
"package": "@fluentui/react-popover",
|
215
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
|
216
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"author": "beachball",
|
220
|
+
"package": "@fluentui/react-popover",
|
221
|
+
"comment": "Bump @fluentui/react-portal to v9.0.0-beta.4",
|
222
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"author": "beachball",
|
226
|
+
"package": "@fluentui/react-popover",
|
227
|
+
"comment": "Bump @fluentui/react-positioning to v9.0.0-beta.3",
|
228
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"author": "beachball",
|
232
|
+
"package": "@fluentui/react-popover",
|
233
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.3",
|
234
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
235
|
+
},
|
236
|
+
{
|
237
|
+
"author": "beachball",
|
238
|
+
"package": "@fluentui/react-popover",
|
239
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.4",
|
240
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"author": "beachball",
|
244
|
+
"package": "@fluentui/react-popover",
|
245
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
|
246
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"author": "beachball",
|
250
|
+
"package": "@fluentui/react-popover",
|
251
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
|
252
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"author": "beachball",
|
256
|
+
"package": "@fluentui/react-popover",
|
257
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
|
258
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"author": "beachball",
|
262
|
+
"package": "@fluentui/react-popover",
|
263
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
|
264
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
83
265
|
}
|
84
266
|
]
|
85
267
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,27 +1,68 @@
|
|
1
1
|
# Change Log - @fluentui/react-popover
|
2
2
|
|
3
|
-
This log was last generated on Fri,
|
3
|
+
This log was last generated on Fri, 03 Dec 2021 04:13:22 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightly131c59c96120211203.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v0.0.0-nightly131c59c96120211203.1)
|
8
8
|
|
9
|
-
Fri,
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-beta.
|
9
|
+
Fri, 03 Dec 2021 04:13:22 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-beta.5..@fluentui/react-popover_v0.0.0-nightly131c59c96120211203.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
15
|
-
-
|
16
|
-
- Bump @fluentui/react-
|
17
|
-
- Bump @fluentui/react-
|
18
|
-
- Bump @fluentui/react-
|
19
|
-
- Bump @fluentui/react-
|
20
|
-
- Bump @fluentui/react-
|
21
|
-
- Bump @fluentui/react-
|
22
|
-
- Bump @fluentui/
|
23
|
-
- Bump @fluentui/
|
24
|
-
- Bump @fluentui/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by email not defined)
|
15
|
+
- update styles to not use CSS shorthands ([PR #20796](https://github.com/microsoft/fluentui/pull/20796) by olfedias@microsoft.com)
|
16
|
+
- Bump @fluentui/react-context-selector to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
17
|
+
- Bump @fluentui/react-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
18
|
+
- Bump @fluentui/react-portal to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
19
|
+
- Bump @fluentui/react-positioning to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
20
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
21
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
22
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
23
|
+
- Bump @fluentui/babel-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
24
|
+
- Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
25
|
+
- Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
|
26
|
+
|
27
|
+
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-beta.5)
|
28
|
+
|
29
|
+
Thu, 25 Nov 2021 08:34:15 GMT
|
30
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-beta.4..@fluentui/react-popover_v9.0.0-beta.5)
|
31
|
+
|
32
|
+
### Changes
|
33
|
+
|
34
|
+
- Add transparent outline to arrow for HC ([PR #20541](https://github.com/microsoft/fluentui/pull/20541) by lingfangao@hotmail.com)
|
35
|
+
- Bump @fluentui/react-context-selector to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
36
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
37
|
+
- Bump @fluentui/react-portal to v9.0.0-beta.5 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
38
|
+
- Bump @fluentui/react-positioning to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
39
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
40
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.5 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
41
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
42
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
43
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
44
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
45
|
+
|
46
|
+
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-beta.4)
|
47
|
+
|
48
|
+
Fri, 12 Nov 2021 13:25:28 GMT
|
49
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-beta.3..@fluentui/react-popover_v9.0.0-beta.4)
|
50
|
+
|
51
|
+
### Changes
|
52
|
+
|
53
|
+
- Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
|
54
|
+
- fix(Popover): use `dialog` as value for `aria-haspopup` for focus trap ([PR #20494](https://github.com/microsoft/fluentui/pull/20494) by lingfangao@hotmail.com)
|
55
|
+
- export static classes for components ([PR #20450](https://github.com/microsoft/fluentui/pull/20450) by olfedias@microsoft.com)
|
56
|
+
- Bump @fluentui/react-context-selector to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
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-portal to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
59
|
+
- Bump @fluentui/react-positioning to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
60
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
61
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
62
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
63
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
64
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
65
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
25
66
|
|
26
67
|
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-beta.3)
|
27
68
|
|
package/dist/react-popover.d.ts
CHANGED
@@ -134,6 +134,8 @@ export declare type PopoverState = PopoverCommons & Pick<PopoverProps, 'children
|
|
134
134
|
*/
|
135
135
|
export declare const PopoverSurface: ForwardRefComponent<PopoverSurfaceProps>;
|
136
136
|
|
137
|
+
export declare const popoverSurfaceClassName = "fui-PopoverSurface";
|
138
|
+
|
137
139
|
/**
|
138
140
|
* PopoverSurface Props
|
139
141
|
*/
|
@@ -4,8 +4,8 @@ import { renderPopover } from './renderPopover';
|
|
4
4
|
* Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.
|
5
5
|
*/
|
6
6
|
|
7
|
-
export
|
8
|
-
|
7
|
+
export const Popover = props => {
|
8
|
+
const state = usePopover(props);
|
9
9
|
return renderPopover(state);
|
10
10
|
};
|
11
11
|
Popover.displayName = 'Popover';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AACA,SAAS,UAAT,QAA2B,cAA3B;AACA,SAAS,aAAT,QAA8B,iBAA9B;AAGA;;AAEG;;AACH,OAAO,
|
1
|
+
{"version":3,"sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AACA,SAAS,UAAT,QAA2B,cAA3B;AACA,SAAS,aAAT,QAA8B,iBAA9B;AAGA;;AAEG;;AACH,OAAO,MAAM,OAAO,GAA2B,KAAK,IAAG;AACrD,QAAM,KAAK,GAAG,UAAU,CAAC,KAAD,CAAxB;AAEA,SAAO,aAAa,CAAC,KAAD,CAApB;AACD,CAJM;AAMP,OAAO,CAAC,WAAR,GAAsB,SAAtB","sourceRoot":""}
|
@@ -4,33 +4,35 @@ import { PopoverContext } from '../../popoverContext';
|
|
4
4
|
* Render the final JSX of Popover
|
5
5
|
*/
|
6
6
|
|
7
|
-
export
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
7
|
+
export const renderPopover = state => {
|
8
|
+
const {
|
9
|
+
open,
|
10
|
+
setOpen,
|
11
|
+
triggerRef,
|
12
|
+
contentRef,
|
13
|
+
openOnContext,
|
14
|
+
openOnHover,
|
15
|
+
mountNode,
|
16
|
+
arrowRef,
|
17
|
+
size,
|
18
|
+
noArrow,
|
19
|
+
appearance,
|
20
|
+
trapFocus
|
21
|
+
} = state;
|
20
22
|
return /*#__PURE__*/React.createElement(PopoverContext.Provider, {
|
21
23
|
value: {
|
22
|
-
open
|
23
|
-
setOpen
|
24
|
-
triggerRef
|
25
|
-
contentRef
|
26
|
-
openOnHover
|
27
|
-
openOnContext
|
28
|
-
mountNode
|
29
|
-
arrowRef
|
30
|
-
size
|
31
|
-
noArrow
|
32
|
-
appearance
|
33
|
-
trapFocus
|
24
|
+
open,
|
25
|
+
setOpen,
|
26
|
+
triggerRef,
|
27
|
+
contentRef,
|
28
|
+
openOnHover,
|
29
|
+
openOnContext,
|
30
|
+
mountNode,
|
31
|
+
arrowRef,
|
32
|
+
size,
|
33
|
+
noArrow,
|
34
|
+
appearance,
|
35
|
+
trapFocus
|
34
36
|
}
|
35
37
|
}, state.children);
|
36
38
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Popover/renderPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,sBAA/B;AAGA;;AAEG;;AACH,OAAO,
|
1
|
+
{"version":3,"sources":["../../../src/components/Popover/renderPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,sBAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,aAAa,GAAI,KAAD,IAAwB;AACnD,QAAM;AACJ,IAAA,IADI;AAEJ,IAAA,OAFI;AAGJ,IAAA,UAHI;AAIJ,IAAA,UAJI;AAKJ,IAAA,aALI;AAMJ,IAAA,WANI;AAOJ,IAAA,SAPI;AAQJ,IAAA,QARI;AASJ,IAAA,IATI;AAUJ,IAAA,OAVI;AAWJ,IAAA,UAXI;AAYJ,IAAA;AAZI,MAaF,KAbJ;AAeA,sBACE,KAAA,CAAA,aAAA,CAAC,cAAc,CAAC,QAAhB,EAAwB;AACtB,IAAA,KAAK,EAAE;AACL,MAAA,IADK;AAEL,MAAA,OAFK;AAGL,MAAA,UAHK;AAIL,MAAA,UAJK;AAKL,MAAA,WALK;AAML,MAAA,aANK;AAOL,MAAA,SAPK;AAQL,MAAA,QARK;AASL,MAAA,IATK;AAUL,MAAA,OAVK;AAWL,MAAA,UAXK;AAYL,MAAA;AAZK;AADe,GAAxB,EAgBG,KAAK,CAAC,QAhBT,CADF;AAoBD,CApCM","sourceRoot":""}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { useControllableState, useEventCallback, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';
|
4
3
|
import { useFluent } from '@fluentui/react-shared-contexts';
|
@@ -14,70 +13,59 @@ import { arrowHeights } from '../PopoverSurface/index';
|
|
14
13
|
* @param props - props from this instance of Popover
|
15
14
|
*/
|
16
15
|
|
17
|
-
export
|
18
|
-
|
19
|
-
|
20
|
-
setContextTarget = _a[1];
|
21
|
-
|
22
|
-
var initialState = __assign({
|
16
|
+
export const usePopover = props => {
|
17
|
+
const [contextTarget, setContextTarget] = usePopperMouseTarget();
|
18
|
+
const initialState = {
|
23
19
|
size: 'medium',
|
24
|
-
contextTarget
|
25
|
-
setContextTarget
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
var targetDocument = useFluent().targetDocument;
|
20
|
+
contextTarget,
|
21
|
+
setContextTarget,
|
22
|
+
...props
|
23
|
+
};
|
24
|
+
const [open, setOpen] = useOpenState(initialState);
|
25
|
+
const popperRefs = usePopoverRefs(initialState);
|
26
|
+
const {
|
27
|
+
targetDocument
|
28
|
+
} = useFluent();
|
34
29
|
useOnClickOutside({
|
35
30
|
contains: elementContains,
|
36
31
|
element: targetDocument,
|
37
|
-
callback:
|
38
|
-
return setOpen(ev, false);
|
39
|
-
},
|
32
|
+
callback: ev => setOpen(ev, false),
|
40
33
|
refs: [popperRefs.triggerRef, popperRefs.contentRef],
|
41
34
|
disabled: !open
|
42
35
|
});
|
43
36
|
useOnScrollOutside({
|
44
37
|
contains: elementContains,
|
45
38
|
element: targetDocument,
|
46
|
-
callback:
|
47
|
-
return setOpen(ev, false);
|
48
|
-
},
|
39
|
+
callback: ev => setOpen(ev, false),
|
49
40
|
refs: [popperRefs.triggerRef, popperRefs.contentRef],
|
50
41
|
disabled: !open || !initialState.openOnContext
|
51
42
|
});
|
52
|
-
return
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
43
|
+
return { ...initialState,
|
44
|
+
...popperRefs,
|
45
|
+
open,
|
46
|
+
setOpen,
|
47
|
+
setContextTarget,
|
48
|
+
contextTarget
|
49
|
+
};
|
58
50
|
};
|
59
51
|
/**
|
60
52
|
* Creates and manages the Popover open state
|
61
53
|
*/
|
62
54
|
|
63
55
|
function useOpenState(state) {
|
64
|
-
|
56
|
+
const onOpenChange = useEventCallback((e, data) => {
|
65
57
|
var _a;
|
66
58
|
|
67
59
|
return (_a = state.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(state, e, data);
|
68
60
|
});
|
69
|
-
|
70
|
-
var _a = useControllableState({
|
61
|
+
const [open, setOpenState] = useControllableState({
|
71
62
|
state: state.open,
|
72
63
|
defaultState: state.defaultOpen,
|
73
64
|
initialState: false
|
74
|
-
})
|
75
|
-
open = _a[0],
|
76
|
-
setOpenState = _a[1];
|
77
|
-
|
65
|
+
});
|
78
66
|
state.open = open !== undefined ? open : state.open;
|
79
|
-
|
80
|
-
|
67
|
+
const setContextTarget = state.setContextTarget;
|
68
|
+
const setOpen = React.useCallback((e, shouldOpen) => {
|
81
69
|
if (shouldOpen && e.type === 'contextmenu') {
|
82
70
|
setContextTarget(e);
|
83
71
|
}
|
@@ -86,7 +74,7 @@ function useOpenState(state) {
|
|
86
74
|
setContextTarget(undefined);
|
87
75
|
}
|
88
76
|
|
89
|
-
setOpenState(
|
77
|
+
setOpenState(prevOpen => {
|
90
78
|
// More than one event (mouse, focus, keyboard) can request the Popover to close
|
91
79
|
// We assume the first event is the correct one
|
92
80
|
if (prevOpen !== shouldOpen) {
|
@@ -106,12 +94,12 @@ function useOpenState(state) {
|
|
106
94
|
|
107
95
|
|
108
96
|
function usePopoverRefs(state) {
|
109
|
-
|
97
|
+
const popperOptions = {
|
110
98
|
position: 'above',
|
111
99
|
align: 'center',
|
112
|
-
target: state.openOnContext ? state.contextTarget : undefined
|
113
|
-
|
114
|
-
|
100
|
+
target: state.openOnContext ? state.contextTarget : undefined,
|
101
|
+
...resolvePositioningShorthand(state.positioning)
|
102
|
+
}; // no reason to render arrow when covering the target
|
115
103
|
|
116
104
|
if (popperOptions.coverTarget) {
|
117
105
|
state.noArrow = true;
|
@@ -121,15 +109,15 @@ function usePopoverRefs(state) {
|
|
121
109
|
popperOptions.offset = mergeArrowOffset(popperOptions.offset, arrowHeights[state.size]);
|
122
110
|
}
|
123
111
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
112
|
+
const {
|
113
|
+
targetRef: triggerRef,
|
114
|
+
containerRef: contentRef,
|
115
|
+
arrowRef
|
116
|
+
} = usePopper(popperOptions);
|
129
117
|
return {
|
130
|
-
triggerRef
|
131
|
-
contentRef
|
132
|
-
arrowRef
|
118
|
+
triggerRef,
|
119
|
+
contentRef,
|
120
|
+
arrowRef
|
133
121
|
};
|
134
122
|
}
|
135
123
|
//# sourceMappingURL=usePopover.js.map
|