@fluentui/react-infobutton 9.0.0-beta.1 → 9.0.0-beta.10

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.
Files changed (33) hide show
  1. package/CHANGELOG.json +278 -1
  2. package/CHANGELOG.md +103 -2
  3. package/dist/index.d.ts +1 -1
  4. package/lib/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  5. package/lib/components/InfoButton/InfoButton.js +0 -1
  6. package/lib/components/InfoButton/InfoButton.js.map +1 -1
  7. package/lib/components/InfoButton/InfoButton.types.js.map +1 -1
  8. package/lib/components/InfoButton/renderInfoButton.js +6 -4
  9. package/lib/components/InfoButton/renderInfoButton.js.map +1 -1
  10. package/lib/components/InfoButton/useInfoButton.js +1 -3
  11. package/lib/components/InfoButton/useInfoButton.js.map +1 -1
  12. package/lib/components/InfoButton/useInfoButtonStyles.js +108 -142
  13. package/lib/components/InfoButton/useInfoButtonStyles.js.map +1 -1
  14. package/lib/index.js.map +1 -1
  15. package/lib-commonjs/InfoButton.js +0 -2
  16. package/lib-commonjs/InfoButton.js.map +1 -1
  17. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js +0 -2
  18. package/lib-commonjs/components/InfoButton/DefaultInfoButtonIcons.js.map +1 -1
  19. package/lib-commonjs/components/InfoButton/InfoButton.js +0 -6
  20. package/lib-commonjs/components/InfoButton/InfoButton.js.map +1 -1
  21. package/lib-commonjs/components/InfoButton/InfoButton.types.js.map +1 -1
  22. package/lib-commonjs/components/InfoButton/index.js +0 -6
  23. package/lib-commonjs/components/InfoButton/index.js.map +1 -1
  24. package/lib-commonjs/components/InfoButton/renderInfoButton.js +6 -9
  25. package/lib-commonjs/components/InfoButton/renderInfoButton.js.map +1 -1
  26. package/lib-commonjs/components/InfoButton/useInfoButton.js +1 -10
  27. package/lib-commonjs/components/InfoButton/useInfoButton.js.map +1 -1
  28. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js +107 -147
  29. package/lib-commonjs/components/InfoButton/useInfoButtonStyles.js.map +1 -1
  30. package/lib-commonjs/index.js +0 -2
  31. package/lib-commonjs/index.js.map +1 -1
  32. package/package.json +9 -8
  33. package/Spec.md +0 -143
package/CHANGELOG.json CHANGED
@@ -2,7 +2,284 @@
2
2
  "name": "@fluentui/react-infobutton",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 17 Nov 2022 23:02:37 GMT",
5
+ "date": "Thu, 26 Jan 2023 13:27:53 GMT",
6
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.10",
7
+ "version": "9.0.0-beta.10",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-infobutton",
13
+ "comment": "Bump @fluentui/react-popover to v9.4.4",
14
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-infobutton",
19
+ "comment": "Bump @fluentui/react-tabster to v9.4.1",
20
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-infobutton",
25
+ "comment": "Bump @fluentui/react-utilities to v9.5.0",
26
+ "commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Mon, 23 Jan 2023 16:43:12 GMT",
33
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.9",
34
+ "version": "9.0.0-beta.9",
35
+ "comments": {
36
+ "prerelease": [
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui/react-infobutton",
40
+ "comment": "Bump @fluentui/react-popover to v9.4.3",
41
+ "commit": "828c4260edc4fba07c9ccc8e94f15051c7fd25d3"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ {
47
+ "date": "Wed, 18 Jan 2023 16:32:57 GMT",
48
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.8",
49
+ "version": "9.0.0-beta.8",
50
+ "comments": {
51
+ "prerelease": [
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-infobutton",
55
+ "comment": "Bump @fluentui/react-popover to v9.4.2",
56
+ "commit": "13cf1d07a6df4617106c731ba0379b6102a08104"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-infobutton",
61
+ "comment": "Bump @fluentui/react-tabster to v9.4.0",
62
+ "commit": "13cf1d07a6df4617106c731ba0379b6102a08104"
63
+ }
64
+ ]
65
+ }
66
+ },
67
+ {
68
+ "date": "Mon, 16 Jan 2023 08:39:02 GMT",
69
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.7",
70
+ "version": "9.0.0-beta.7",
71
+ "comments": {
72
+ "prerelease": [
73
+ {
74
+ "author": "esteban.230@hotmail.com",
75
+ "package": "@fluentui/react-infobutton",
76
+ "commit": "4aa7a43c0c302dc151d6446abfde95fe9637edb0",
77
+ "comment": "fix: Update border for Teams HCM to be transparent."
78
+ },
79
+ {
80
+ "author": "esteban.230@hotmail.com",
81
+ "package": "@fluentui/react-infobutton",
82
+ "commit": "b326546752a1df3cf4d626dee2d5c47b59ba00ae",
83
+ "comment": "fix: Update PopoverSurface's role to note and remove need to cast props passed to popover slot."
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-infobutton",
88
+ "comment": "Bump @fluentui/react-popover to v9.4.1",
89
+ "commit": "a870d8360e47f3ea03358c4e75e89e08a74845d7"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-infobutton",
94
+ "comment": "Bump @fluentui/react-tabster to v9.3.7",
95
+ "commit": "a870d8360e47f3ea03358c4e75e89e08a74845d7"
96
+ }
97
+ ],
98
+ "none": [
99
+ {
100
+ "author": "martinhochel@microsoft.com",
101
+ "package": "@fluentui/react-infobutton",
102
+ "commit": "64bb45980d68de1219c6b36a7db5363f0a9cff9f",
103
+ "comment": "chore: migrate to packaged scripts"
104
+ }
105
+ ]
106
+ }
107
+ },
108
+ {
109
+ "date": "Mon, 09 Jan 2023 14:35:02 GMT",
110
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.6",
111
+ "version": "9.0.0-beta.6",
112
+ "comments": {
113
+ "prerelease": [
114
+ {
115
+ "author": "beachball",
116
+ "package": "@fluentui/react-infobutton",
117
+ "comment": "Bump @fluentui/react-popover to v9.4.0",
118
+ "commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
119
+ },
120
+ {
121
+ "author": "beachball",
122
+ "package": "@fluentui/react-infobutton",
123
+ "comment": "Bump @fluentui/react-tabster to v9.3.6",
124
+ "commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
125
+ },
126
+ {
127
+ "author": "beachball",
128
+ "package": "@fluentui/react-infobutton",
129
+ "comment": "Bump @fluentui/react-utilities to v9.4.0",
130
+ "commit": "d246e70eba59a37ec311dbf933b0745d34cb700d"
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ "date": "Wed, 04 Jan 2023 01:40:08 GMT",
137
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.5",
138
+ "version": "9.0.0-beta.5",
139
+ "comments": {
140
+ "prerelease": [
141
+ {
142
+ "author": "tristan.watanabe@gmail.com",
143
+ "package": "@fluentui/react-infobutton",
144
+ "commit": "b1f29f551486777885af53a857220bffa5342b0f",
145
+ "comment": "chore: migrate to new package structure."
146
+ },
147
+ {
148
+ "author": "olfedias@microsoft.com",
149
+ "package": "@fluentui/react-infobutton",
150
+ "commit": "2c38f1e4ae07b2b60df596efe11015a68f166dbf",
151
+ "comment": "chore: Update Griffel to latest version"
152
+ },
153
+ {
154
+ "author": "beachball",
155
+ "package": "@fluentui/react-infobutton",
156
+ "comment": "Bump @fluentui/react-popover to v9.3.6",
157
+ "commit": "3e322d15529451be153e97298873253e21af4082"
158
+ },
159
+ {
160
+ "author": "beachball",
161
+ "package": "@fluentui/react-infobutton",
162
+ "comment": "Bump @fluentui/react-tabster to v9.3.5",
163
+ "commit": "3e322d15529451be153e97298873253e21af4082"
164
+ },
165
+ {
166
+ "author": "beachball",
167
+ "package": "@fluentui/react-infobutton",
168
+ "comment": "Bump @fluentui/react-utilities to v9.3.1",
169
+ "commit": "3e322d15529451be153e97298873253e21af4082"
170
+ },
171
+ {
172
+ "author": "beachball",
173
+ "package": "@fluentui/react-infobutton",
174
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19",
175
+ "commit": "3e322d15529451be153e97298873253e21af4082"
176
+ }
177
+ ],
178
+ "none": [
179
+ {
180
+ "author": "martinhochel@microsoft.com",
181
+ "package": "@fluentui/react-infobutton",
182
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
183
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
184
+ },
185
+ {
186
+ "author": "martinhochel@microsoft.com",
187
+ "package": "@fluentui/react-infobutton",
188
+ "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
189
+ "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
190
+ }
191
+ ]
192
+ }
193
+ },
194
+ {
195
+ "date": "Wed, 21 Dec 2022 10:20:33 GMT",
196
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.4",
197
+ "version": "9.0.0-beta.4",
198
+ "comments": {
199
+ "prerelease": [
200
+ {
201
+ "author": "beachball",
202
+ "package": "@fluentui/react-infobutton",
203
+ "comment": "Bump @fluentui/react-popover to v9.3.5",
204
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
205
+ },
206
+ {
207
+ "author": "beachball",
208
+ "package": "@fluentui/react-infobutton",
209
+ "comment": "Bump @fluentui/react-tabster to v9.3.4",
210
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
211
+ },
212
+ {
213
+ "author": "beachball",
214
+ "package": "@fluentui/react-infobutton",
215
+ "comment": "Bump @fluentui/react-theme to v9.1.5",
216
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
217
+ }
218
+ ]
219
+ }
220
+ },
221
+ {
222
+ "date": "Tue, 20 Dec 2022 14:59:34 GMT",
223
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.3",
224
+ "version": "9.0.0-beta.3",
225
+ "comments": {
226
+ "prerelease": [
227
+ {
228
+ "author": "beachball",
229
+ "package": "@fluentui/react-infobutton",
230
+ "comment": "Bump @fluentui/react-popover to v9.3.4",
231
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
232
+ },
233
+ {
234
+ "author": "beachball",
235
+ "package": "@fluentui/react-infobutton",
236
+ "comment": "Bump @fluentui/react-tabster to v9.3.3",
237
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
238
+ },
239
+ {
240
+ "author": "beachball",
241
+ "package": "@fluentui/react-infobutton",
242
+ "comment": "Bump @fluentui/react-theme to v9.1.4",
243
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
244
+ },
245
+ {
246
+ "author": "beachball",
247
+ "package": "@fluentui/react-infobutton",
248
+ "comment": "Bump @fluentui/react-utilities to v9.3.0",
249
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
250
+ }
251
+ ]
252
+ }
253
+ },
254
+ {
255
+ "date": "Mon, 05 Dec 2022 18:29:39 GMT",
256
+ "tag": "@fluentui/react-infobutton_v9.0.0-beta.2",
257
+ "version": "9.0.0-beta.2",
258
+ "comments": {
259
+ "prerelease": [
260
+ {
261
+ "author": "beachball",
262
+ "package": "@fluentui/react-infobutton",
263
+ "comment": "Bump @fluentui/react-popover to v9.3.3",
264
+ "commit": "4c29542a51bf068e171690cc8e59c14489883912"
265
+ },
266
+ {
267
+ "author": "beachball",
268
+ "package": "@fluentui/react-infobutton",
269
+ "comment": "Bump @fluentui/react-tabster to v9.3.2",
270
+ "commit": "4c29542a51bf068e171690cc8e59c14489883912"
271
+ },
272
+ {
273
+ "author": "beachball",
274
+ "package": "@fluentui/react-infobutton",
275
+ "comment": "Bump @fluentui/react-theme to v9.1.3",
276
+ "commit": "4c29542a51bf068e171690cc8e59c14489883912"
277
+ }
278
+ ]
279
+ }
280
+ },
281
+ {
282
+ "date": "Thu, 17 Nov 2022 23:05:40 GMT",
6
283
  "tag": "@fluentui/react-infobutton_v9.0.0-beta.1",
7
284
  "version": "9.0.0-beta.1",
8
285
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,113 @@
1
1
  # Change Log - @fluentui/react-infobutton
2
2
 
3
- This log was last generated on Thu, 17 Nov 2022 23:02:37 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 26 Jan 2023 13:27:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.10)
8
+
9
+ Thu, 26 Jan 2023 13:27:53 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.9..@fluentui/react-infobutton_v9.0.0-beta.10)
11
+
12
+ ### Changes
13
+
14
+ - Bump @fluentui/react-popover to v9.4.4 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
15
+ - Bump @fluentui/react-tabster to v9.4.1 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
16
+ - Bump @fluentui/react-utilities to v9.5.0 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
17
+
18
+ ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.9)
19
+
20
+ Mon, 23 Jan 2023 16:43:12 GMT
21
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.8..@fluentui/react-infobutton_v9.0.0-beta.9)
22
+
23
+ ### Changes
24
+
25
+ - Bump @fluentui/react-popover to v9.4.3 ([PR #26434](https://github.com/microsoft/fluentui/pull/26434) by beachball)
26
+
27
+ ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.8)
28
+
29
+ Wed, 18 Jan 2023 16:32:57 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.7..@fluentui/react-infobutton_v9.0.0-beta.8)
31
+
32
+ ### Changes
33
+
34
+ - Bump @fluentui/react-popover to v9.4.2 ([PR #26377](https://github.com/microsoft/fluentui/pull/26377) by beachball)
35
+ - Bump @fluentui/react-tabster to v9.4.0 ([PR #26377](https://github.com/microsoft/fluentui/pull/26377) by beachball)
36
+
37
+ ## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.7)
38
+
39
+ Mon, 16 Jan 2023 08:39:02 GMT
40
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.6..@fluentui/react-infobutton_v9.0.0-beta.7)
41
+
42
+ ### Changes
43
+
44
+ - fix: Update border for Teams HCM to be transparent. ([PR #26305](https://github.com/microsoft/fluentui/pull/26305) by esteban.230@hotmail.com)
45
+ - fix: Update PopoverSurface's role to note and remove need to cast props passed to popover slot. ([PR #26300](https://github.com/microsoft/fluentui/pull/26300) by esteban.230@hotmail.com)
46
+ - Bump @fluentui/react-popover to v9.4.1 ([commit](https://github.com/microsoft/fluentui/commit/a870d8360e47f3ea03358c4e75e89e08a74845d7) by beachball)
47
+ - Bump @fluentui/react-tabster to v9.3.7 ([commit](https://github.com/microsoft/fluentui/commit/a870d8360e47f3ea03358c4e75e89e08a74845d7) by beachball)
48
+
49
+ ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.6)
50
+
51
+ Mon, 09 Jan 2023 14:35:02 GMT
52
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.5..@fluentui/react-infobutton_v9.0.0-beta.6)
53
+
54
+ ### Changes
55
+
56
+ - Bump @fluentui/react-popover to v9.4.0 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
57
+ - Bump @fluentui/react-tabster to v9.3.6 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
58
+ - Bump @fluentui/react-utilities to v9.4.0 ([PR #26255](https://github.com/microsoft/fluentui/pull/26255) by beachball)
59
+
60
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.5)
61
+
62
+ Wed, 04 Jan 2023 01:40:08 GMT
63
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.4..@fluentui/react-infobutton_v9.0.0-beta.5)
64
+
65
+ ### Changes
66
+
67
+ - chore: migrate to new package structure. ([PR #26111](https://github.com/microsoft/fluentui/pull/26111) by tristan.watanabe@gmail.com)
68
+ - chore: Update Griffel to latest version ([PR #26045](https://github.com/microsoft/fluentui/pull/26045) by olfedias@microsoft.com)
69
+ - Bump @fluentui/react-popover to v9.3.6 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
70
+ - Bump @fluentui/react-tabster to v9.3.5 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
71
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
72
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
73
+
74
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.4)
75
+
76
+ Wed, 21 Dec 2022 10:20:33 GMT
77
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.3..@fluentui/react-infobutton_v9.0.0-beta.4)
78
+
79
+ ### Changes
80
+
81
+ - Bump @fluentui/react-popover to v9.3.5 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
82
+ - Bump @fluentui/react-tabster to v9.3.4 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
83
+ - Bump @fluentui/react-theme to v9.1.5 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
84
+
85
+ ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.3)
86
+
87
+ Tue, 20 Dec 2022 14:59:34 GMT
88
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.2..@fluentui/react-infobutton_v9.0.0-beta.3)
89
+
90
+ ### Changes
91
+
92
+ - Bump @fluentui/react-popover to v9.3.4 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
93
+ - Bump @fluentui/react-tabster to v9.3.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
94
+ - Bump @fluentui/react-theme to v9.1.4 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
95
+ - Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
96
+
97
+ ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.2)
98
+
99
+ Mon, 05 Dec 2022 18:29:39 GMT
100
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-infobutton_v9.0.0-beta.1..@fluentui/react-infobutton_v9.0.0-beta.2)
101
+
102
+ ### Changes
103
+
104
+ - Bump @fluentui/react-popover to v9.3.3 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
105
+ - Bump @fluentui/react-tabster to v9.3.2 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
106
+ - Bump @fluentui/react-theme to v9.1.3 ([PR #25798](https://github.com/microsoft/fluentui/pull/25798) by beachball)
107
+
7
108
  ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-infobutton_v9.0.0-beta.1)
8
109
 
9
- Thu, 17 Nov 2022 23:02:37 GMT
110
+ Thu, 17 Nov 2022 23:05:40 GMT
10
111
 
11
112
  ### Changes
12
113
 
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ export declare type InfoButtonSlots = {
33
33
  /**
34
34
  * The Popover element that wraps the content and root. Use this slot to pass props to the Popover.
35
35
  */
36
- popover: NonNullable<Slot<PopoverProps>>;
36
+ popover: NonNullable<Slot<Partial<PopoverProps>>>;
37
37
  /**
38
38
  * The content to be displayed in the PopoverSurface when the button is pressed.
39
39
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-infobutton/src/components/InfoButton/DefaultInfoButtonIcons.tsx"],"names":[],"mappings":"AAAA,SACE,aADF,EAEE,YAFF,EAGE,aAHF,EAIE,YAJF,EAKE,aALF,EAME,YANF,EAOE,UAPF,QAQO,uBARP;AAUA,OAAO,MAAM,uBAAuB,gBAAG,UAAU,CAAC,YAAD,EAAe,aAAf,CAA1C;AACP,OAAO,MAAM,uBAAuB,gBAAG,UAAU,CAAC,YAAD,EAAe,aAAf,CAA1C;AACP,OAAO,MAAM,uBAAuB,gBAAG,UAAU,CAAC,YAAD,EAAe,aAAf,CAA1C","sourcesContent":["import {\n Info12Regular,\n Info12Filled,\n Info16Regular,\n Info16Filled,\n Info20Regular,\n Info20Filled,\n bundleIcon,\n} from '@fluentui/react-icons';\n\nexport const DefaultInfoButtonIcon12 = bundleIcon(Info12Filled, Info12Regular);\nexport const DefaultInfoButtonIcon16 = bundleIcon(Info16Filled, Info16Regular);\nexport const DefaultInfoButtonIcon20 = bundleIcon(Info20Filled, Info20Regular);\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,SACEA,aAAa,EACbC,YAAY,EACZC,aAAa,EACbC,YAAY,EACZC,aAAa,EACbC,YAAY,EACZC,UAAU,QACL,uBAAuB;AAE9B,OAAO,MAAMC,uBAAuB,gBAAGD,UAAU,CAACL,YAAY,EAAED,aAAa,CAAC;AAC9E,OAAO,MAAMQ,uBAAuB,gBAAGF,UAAU,CAACH,YAAY,EAAED,aAAa,CAAC;AAC9E,OAAO,MAAMO,uBAAuB,gBAAGH,UAAU,CAACD,YAAY,EAAED,aAAa,CAAC","names":["Info12Regular","Info12Filled","Info16Regular","Info16Filled","Info20Regular","Info20Filled","bundleIcon","DefaultInfoButtonIcon12","DefaultInfoButtonIcon16","DefaultInfoButtonIcon20"],"sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/DefaultInfoButtonIcons.tsx"],"sourcesContent":["import {\n Info12Regular,\n Info12Filled,\n Info16Regular,\n Info16Filled,\n Info20Regular,\n Info20Filled,\n bundleIcon,\n} from '@fluentui/react-icons';\n\nexport const DefaultInfoButtonIcon12 = bundleIcon(Info12Filled, Info12Regular);\nexport const DefaultInfoButtonIcon16 = bundleIcon(Info16Filled, Info16Regular);\nexport const DefaultInfoButtonIcon20 = bundleIcon(Info20Filled, Info20Regular);\n"]}
@@ -5,7 +5,6 @@ import { useInfoButtonStyles_unstable } from './useInfoButtonStyles';
5
5
  /**
6
6
  * InfoButtons provide a way to display additional information about a form field or an area in the UI.
7
7
  */
8
-
9
8
  export const InfoButton = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useInfoButton_unstable(props, ref);
11
10
  useInfoButtonStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAGA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;EAEA,4BAA4B,CAAC,KAAD,CAA5B;EACA,OAAO,yBAAyB,CAAC,KAAD,CAAhC;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderInfoButton_unstable } from './renderInfoButton';\nimport { useInfoButton_unstable } from './useInfoButton';\nimport { useInfoButtonStyles_unstable } from './useInfoButtonStyles';\nimport type { InfoButtonProps } from './InfoButton.types';\n\n/**\n * InfoButtons provide a way to display additional information about a form field or an area in the UI.\n */\nexport const InfoButton: ForwardRefComponent<InfoButtonProps> = React.forwardRef((props, ref) => {\n const state = useInfoButton_unstable(props, ref);\n\n useInfoButtonStyles_unstable(state);\n return renderInfoButton_unstable(state);\n});\n\nInfoButton.displayName = 'InfoButton';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,yBAAyB,QAAQ,oBAAoB;AAC9D,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,4BAA4B,QAAQ,uBAAuB;AAGpE;;;AAGA,OAAO,MAAMC,UAAU,gBAAyCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGN,sBAAsB,CAACI,KAAK,EAAEC,GAAG,CAAC;EAEhDJ,4BAA4B,CAACK,KAAK,CAAC;EACnC,OAAOP,yBAAyB,CAACO,KAAK,CAAC;AACzC,CAAC,CAAC;AAEFJ,UAAU,CAACK,WAAW,GAAG,YAAY","names":["React","renderInfoButton_unstable","useInfoButton_unstable","useInfoButtonStyles_unstable","InfoButton","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { renderInfoButton_unstable } from './renderInfoButton';\nimport { useInfoButton_unstable } from './useInfoButton';\nimport { useInfoButtonStyles_unstable } from './useInfoButtonStyles';\nimport type { InfoButtonProps } from './InfoButton.types';\n\n/**\n * InfoButtons provide a way to display additional information about a form field or an area in the UI.\n */\nexport const InfoButton: ForwardRefComponent<InfoButtonProps> = React.forwardRef((props, ref) => {\n const state = useInfoButton_unstable(props, ref);\n\n useInfoButtonStyles_unstable(state);\n return renderInfoButton_unstable(state);\n});\n\nInfoButton.displayName = 'InfoButton';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"InfoButton.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverProps, PopoverSurface } from '@fluentui/react-popover';\n\nexport type InfoButtonSlots = {\n root: NonNullable<Slot<'button'>>;\n\n /**\n * The Popover element that wraps the content and root. Use this slot to pass props to the Popover.\n */\n popover: NonNullable<Slot<PopoverProps>>;\n\n /**\n * The content to be displayed in the PopoverSurface when the button is pressed.\n */\n content: NonNullable<Slot<typeof PopoverSurface>>;\n};\n\n/**\n * InfoButton Props\n */\nexport type InfoButtonProps = Omit<ComponentProps<Partial<InfoButtonSlots>>, 'disabled'> & {\n /**\n * Size of the InfoButton.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n * State used in rendering InfoButton\n */\nexport type InfoButtonState = ComponentState<InfoButtonSlots> & Required<Pick<InfoButtonProps, 'size'>>;\n"]}
1
+ {"version":3,"file":"InfoButton.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { PopoverProps, PopoverSurface } from '@fluentui/react-popover';\n\nexport type InfoButtonSlots = {\n root: NonNullable<Slot<'button'>>;\n\n /**\n * The Popover element that wraps the content and root. Use this slot to pass props to the Popover.\n */\n popover: NonNullable<Slot<Partial<PopoverProps>>>;\n\n /**\n * The content to be displayed in the PopoverSurface when the button is pressed.\n */\n content: NonNullable<Slot<typeof PopoverSurface>>;\n};\n\n/**\n * InfoButton Props\n */\nexport type InfoButtonProps = Omit<ComponentProps<Partial<InfoButtonSlots>>, 'disabled'> & {\n /**\n * Size of the InfoButton.\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n * State used in rendering InfoButton\n */\nexport type InfoButtonState = ComponentState<InfoButtonSlots> & Required<Pick<InfoButtonProps, 'size'>>;\n"]}
@@ -4,15 +4,17 @@ import { PopoverTrigger } from '@fluentui/react-popover';
4
4
  /**
5
5
  * Render the final JSX of InfoButton
6
6
  */
7
-
8
7
  export const renderInfoButton_unstable = state => {
9
8
  const {
10
9
  slots,
11
10
  slotProps
12
11
  } = getSlots(state);
13
- return /*#__PURE__*/React.createElement(slots.popover, { ...slotProps.popover
14
- }, /*#__PURE__*/React.createElement(PopoverTrigger, null, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
15
- })), /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
12
+ return /*#__PURE__*/React.createElement(slots.popover, {
13
+ ...slotProps.popover
14
+ }, /*#__PURE__*/React.createElement(PopoverTrigger, null, /*#__PURE__*/React.createElement(slots.root, {
15
+ ...slotProps.root
16
+ })), /*#__PURE__*/React.createElement(slots.content, {
17
+ ...slotProps.content
16
18
  }));
17
19
  };
18
20
  //# sourceMappingURL=renderInfoButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAIA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAkB,KAAlB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAM,SAAS,CAAC;EAAhB,CAAd,eACE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CAJF,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { PopoverTrigger } from '@fluentui/react-popover';\nimport type { PopoverProps } from '@fluentui/react-popover';\nimport type { InfoButtonState, InfoButtonSlots } from './InfoButton.types';\n\n/**\n * Render the final JSX of InfoButton\n */\nexport const renderInfoButton_unstable = (state: InfoButtonState) => {\n const { slots, slotProps } = getSlots<InfoButtonSlots>(state);\n\n return (\n <slots.popover {...(slotProps.popover as PopoverProps)}>\n <PopoverTrigger>\n <slots.root {...slotProps.root} />\n </PopoverTrigger>\n <slots.content {...slotProps.content} />\n </slots.popover>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,cAAc,QAAQ,yBAAyB;AAIxD;;;AAGA,OAAO,MAAMC,yBAAyB,GAAIC,KAAsB,IAAI;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGL,QAAQ,CAAkBG,KAAK,CAAC;EAE7D,oBACEJ,oBAACK,KAAK,CAACE,OAAO;IAAA,GAAMD,SAAS,CAACC;EAAwB,gBACpDP,oBAACE,cAAc,qBACbF,oBAACK,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,EAAI,CACnB,eACjBR,oBAACK,KAAK,CAACI,OAAO;IAAA,GAAKH,SAAS,CAACG;EAAO,EAAI,CAC1B;AAEpB,CAAC","names":["React","getSlots","PopoverTrigger","renderInfoButton_unstable","state","slots","slotProps","popover","root","content"],"sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { PopoverTrigger } from '@fluentui/react-popover';\nimport type { PopoverProps } from '@fluentui/react-popover';\nimport type { InfoButtonState, InfoButtonSlots } from './InfoButton.types';\n\n/**\n * Render the final JSX of InfoButton\n */\nexport const renderInfoButton_unstable = (state: InfoButtonState) => {\n const { slots, slotProps } = getSlots<InfoButtonSlots>(state);\n\n return (\n <slots.popover {...(slotProps.popover as PopoverProps)}>\n <PopoverTrigger>\n <slots.root {...slotProps.root} />\n </PopoverTrigger>\n <slots.content {...slotProps.content} />\n </slots.popover>\n );\n};\n"]}
@@ -22,7 +22,6 @@ const popoverSizeMap = {
22
22
  * @param props - props from this instance of InfoButton
23
23
  * @param ref - reference to root HTMLElement of InfoButton
24
24
  */
25
-
26
25
  export const useInfoButton_unstable = (props, ref) => {
27
26
  const {
28
27
  size = 'medium'
@@ -43,7 +42,6 @@ export const useInfoButton_unstable = (props, ref) => {
43
42
  popover: resolveShorthand(props.popover, {
44
43
  required: true,
45
44
  defaultProps: {
46
- children: /*#__PURE__*/React.createElement(React.Fragment, null),
47
45
  positioning: 'above-start',
48
46
  size: popoverSizeMap[size],
49
47
  withArrow: true
@@ -52,7 +50,7 @@ export const useInfoButton_unstable = (props, ref) => {
52
50
  content: resolveShorthand(props.content, {
53
51
  required: true,
54
52
  defaultProps: {
55
- role: 'dialog'
53
+ role: 'note'
56
54
  }
57
55
  })
58
56
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,EAAkC,uBAAlC,EAA2D,uBAA3D,QAA0F,0BAA1F;AACA,SAAS,qBAAT,EAAgC,cAAhC,EAAgD,gBAAhD,QAAwE,2BAAxE;AACA,SAAS,OAAT,EAAkB,cAAlB,QAAwC,yBAAxC;AACA,SAAS,oBAAT,QAAqC,2BAArC;AAGA,MAAM,iBAAiB,GAAG;EACxB,KAAK,eAAE,KAAA,CAAA,aAAA,CAAC,uBAAD,EAAwB,IAAxB,CADiB;EAExB,MAAM,eAAE,KAAA,CAAA,aAAA,CAAC,uBAAD,EAAwB,IAAxB,CAFgB;EAGxB,KAAK,eAAE,KAAA,CAAA,aAAA,CAAC,uBAAD,EAAwB,IAAxB;AAHiB,CAA1B;AAMA,MAAM,cAAc,GAAG;EACrB,KAAK,EAAE,OADc;EAErB,MAAM,EAAE,OAFa;EAGrB,KAAK,EAAE;AAHc,CAAvB;AAMA;;;;;;;;AAQG;;AACH,OAAO,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;EAC7G,MAAM;IAAE,IAAI,GAAG;EAAT,IAAsB,KAA5B;EAEA,MAAM,KAAK,GAAoB;IAC7B,IAD6B;IAG7B,UAAU,EAAE;MACV,IAAI,EAAE,QADI;MAEV,OAAO,EAAE,OAFC;MAGV,OAAO,EAAE;IAHC,CAHiB;IAS7B,IAAI,EAAE,qBAAqB,CAAC,QAAD,EAAW;MACpC,QAAQ,EAAE,iBAAiB,CAAC,IAAD,CADS;MAEpC,IAAI,EAAE,QAF8B;MAGpC,GAAG,KAHiC;MAIpC;IAJoC,CAAX,CATE;IAe7B,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,CADE;QAEZ,WAAW,EAAE,aAFD;QAGZ,IAAI,EAAE,cAAc,CAAC,IAAD,CAHR;QAIZ,SAAS,EAAE;MAJC;IAFyB,CAAhB,CAfI;IAwB7B,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MACvC,QAAQ,EAAE,IAD6B;MAEvC,YAAY,EAAE;QACZ,IAAI,EAAE;MADM;IAFyB,CAAhB;EAxBI,CAA/B;EAgCA,MAAM,CAAC,WAAD,EAAc,cAAd,IAAgC,oBAAoB,CAAC;IACzD,KAAK,EAAE,KAAK,CAAC,OAAN,CAAc,IADoC;IAEzD,YAAY,EAAE,KAAK,CAAC,OAAN,CAAc,WAF6B;IAGzD,YAAY,EAAE;EAH2C,CAAD,CAA1D;EAMA,KAAK,CAAC,OAAN,CAAc,IAAd,GAAqB,WAArB;EACA,KAAK,CAAC,OAAN,CAAc,YAAd,GAA6B,cAAc,CAAC,KAAK,CAAC,OAAN,CAAc,YAAf,EAA6B,CAAC,CAAD,EAAI,IAAJ,KAAa,cAAc,CAAC,IAAI,CAAC,IAAN,CAAxD,CAA3C;EAEA,OAAO,KAAP;AACD,CA7CM","sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, resolveShorthand } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport type { InfoButtonProps, InfoButtonState } from './InfoButton.types';\n\nconst infoButtonIconMap = {\n small: <DefaultInfoButtonIcon12 />,\n medium: <DefaultInfoButtonIcon16 />,\n large: <DefaultInfoButtonIcon20 />,\n} as const;\n\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\n/**\n * Create the state required to render InfoButton.\n *\n * The returned state can be modified with hooks such as useInfoButtonStyles_unstable,\n * before being passed to renderInfoButton_unstable.\n *\n * @param props - props from this instance of InfoButton\n * @param ref - reference to root HTMLElement of InfoButton\n */\nexport const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref<HTMLElement>): InfoButtonState => {\n const { size = 'medium' } = props;\n\n const state: InfoButtonState = {\n size,\n\n components: {\n root: 'button',\n popover: Popover,\n content: PopoverSurface,\n },\n\n root: getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n ...props,\n ref,\n }),\n popover: resolveShorthand(props.popover, {\n required: true,\n defaultProps: {\n children: <></>,\n positioning: 'above-start',\n size: popoverSizeMap[size],\n withArrow: true,\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n role: 'dialog',\n },\n }),\n };\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false,\n });\n\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data) => setPopoverOpen(data.open));\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,EAAEC,uBAAuB,EAAEC,uBAAuB,QAAQ,0BAA0B;AACpH,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,2BAA2B;AACnG,SAASC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AACjE,SAASC,oBAAoB,QAAQ,2BAA2B;AAIhE,MAAMC,iBAAiB,GAAG;EACxBC,KAAK,eAAEX,oBAACC,uBAAuB,OAAG;EAClCW,MAAM,eAAEZ,oBAACE,uBAAuB,OAAG;EACnCW,KAAK,eAAEb,oBAACG,uBAAuB;CACvB;AAEV,MAAMW,cAAc,GAAG;EACrBH,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE,OAAO;EACfC,KAAK,EAAE;CACC;AAEV;;;;;;;;;AASA,OAAO,MAAME,sBAAsB,GAAG,CAACC,KAAsB,EAAEC,GAA2B,KAAqB;EAC7G,MAAM;IAAEC,IAAI,GAAG;EAAQ,CAAE,GAAGF,KAAK;EAEjC,MAAMG,KAAK,GAAoB;IAC7BD,IAAI;IAEJE,UAAU,EAAE;MACVC,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEf,OAA0C;MACnDgB,OAAO,EAAEf;KACV;IAEDa,IAAI,EAAEjB,qBAAqB,CAAC,QAAQ,EAAE;MACpCoB,QAAQ,EAAEd,iBAAiB,CAACQ,IAAI,CAAC;MACjCO,IAAI,EAAE,QAAQ;MACd,GAAGT,KAAK;MACRC;KACD,CAAC;IACFK,OAAO,EAAEhB,gBAAgB,CAACU,KAAK,CAACM,OAAO,EAAE;MACvCI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZC,WAAW,EAAE,aAAa;QAC1BV,IAAI,EAAEJ,cAAc,CAACI,IAAI,CAAC;QAC1BW,SAAS,EAAE;;KAEd,CAAC;IACFN,OAAO,EAAEjB,gBAAgB,CAACU,KAAK,CAACO,OAAO,EAAE;MACvCG,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZG,IAAI,EAAE;;KAET;GACF;EAED,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGvB,oBAAoB,CAAC;IACzDU,KAAK,EAAEA,KAAK,CAACG,OAAO,CAACW,IAAI;IACzBC,YAAY,EAAEf,KAAK,CAACG,OAAO,CAACa,WAAW;IACvCC,YAAY,EAAE;GACf,CAAC;EAEFjB,KAAK,CAACG,OAAO,CAACW,IAAI,GAAGF,WAAW;EAChCZ,KAAK,CAACG,OAAO,CAACe,YAAY,GAAGhC,cAAc,CAACc,KAAK,CAACG,OAAO,CAACe,YAAY,EAAE,CAACC,CAAC,EAAEC,IAAI,KAAKP,cAAc,CAACO,IAAI,CAACN,IAAI,CAAC,CAAC;EAE/G,OAAOd,KAAK;AACd,CAAC","names":["React","DefaultInfoButtonIcon12","DefaultInfoButtonIcon16","DefaultInfoButtonIcon20","getNativeElementProps","mergeCallbacks","resolveShorthand","Popover","PopoverSurface","useControllableState","infoButtonIconMap","small","medium","large","popoverSizeMap","useInfoButton_unstable","props","ref","size","state","components","root","popover","content","children","type","required","defaultProps","positioning","withArrow","role","popoverOpen","setPopoverOpen","open","defaultState","defaultOpen","initialState","onOpenChange","e","data"],"sourceRoot":"../src/","sources":["packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { DefaultInfoButtonIcon12, DefaultInfoButtonIcon16, DefaultInfoButtonIcon20 } from './DefaultInfoButtonIcons';\nimport { getNativeElementProps, mergeCallbacks, resolveShorthand } from '@fluentui/react-utilities';\nimport { Popover, PopoverSurface } from '@fluentui/react-popover';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport type { InfoButtonProps, InfoButtonState } from './InfoButton.types';\nimport type { PopoverProps } from '@fluentui/react-popover';\n\nconst infoButtonIconMap = {\n small: <DefaultInfoButtonIcon12 />,\n medium: <DefaultInfoButtonIcon16 />,\n large: <DefaultInfoButtonIcon20 />,\n} as const;\n\nconst popoverSizeMap = {\n small: 'small',\n medium: 'small',\n large: 'medium',\n} as const;\n\n/**\n * Create the state required to render InfoButton.\n *\n * The returned state can be modified with hooks such as useInfoButtonStyles_unstable,\n * before being passed to renderInfoButton_unstable.\n *\n * @param props - props from this instance of InfoButton\n * @param ref - reference to root HTMLElement of InfoButton\n */\nexport const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref<HTMLElement>): InfoButtonState => {\n const { size = 'medium' } = props;\n\n const state: InfoButtonState = {\n size,\n\n components: {\n root: 'button',\n popover: Popover as React.FC<Partial<PopoverProps>>,\n content: PopoverSurface,\n },\n\n root: getNativeElementProps('button', {\n children: infoButtonIconMap[size],\n type: 'button',\n ...props,\n ref,\n }),\n popover: resolveShorthand(props.popover, {\n required: true,\n defaultProps: {\n positioning: 'above-start',\n size: popoverSizeMap[size],\n withArrow: true,\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n role: 'note',\n },\n }),\n };\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: state.popover.open,\n defaultState: state.popover.defaultOpen,\n initialState: false,\n });\n\n state.popover.open = popoverOpen;\n state.popover.onOpenChange = mergeCallbacks(state.popover.onOpenChange, (e, data) => setPopoverOpen(data.open));\n\n return state;\n};\n"]}