@fluentui/react-label 9.0.0-beta.1 → 9.0.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/CHANGELOG.json +281 -1
  2. package/CHANGELOG.md +66 -2
  3. package/Spec.md +33 -40
  4. package/dist/react-label.d.ts +15 -20
  5. package/lib/components/Label/Label.js +7 -7
  6. package/lib/components/Label/Label.js.map +1 -1
  7. package/lib/components/Label/Label.types.d.ts +9 -9
  8. package/lib/components/Label/renderLabel.d.ts +1 -1
  9. package/lib/components/Label/renderLabel.js +8 -8
  10. package/lib/components/Label/renderLabel.js.map +1 -1
  11. package/lib/components/Label/useLabel.d.ts +4 -9
  12. package/lib/components/Label/useLabel.js +18 -27
  13. package/lib/components/Label/useLabel.js.map +1 -1
  14. package/lib/components/Label/useLabelStyles.d.ts +2 -1
  15. package/lib/components/Label/useLabelStyles.js +7 -5
  16. package/lib/components/Label/useLabelStyles.js.map +1 -1
  17. package/lib-commonjs/Label.js +1 -1
  18. package/lib-commonjs/components/Label/Label.js +8 -8
  19. package/lib-commonjs/components/Label/Label.js.map +1 -1
  20. package/lib-commonjs/components/Label/Label.types.d.ts +9 -9
  21. package/lib-commonjs/components/Label/index.js +1 -1
  22. package/lib-commonjs/components/Label/renderLabel.d.ts +1 -1
  23. package/lib-commonjs/components/Label/renderLabel.js +12 -14
  24. package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
  25. package/lib-commonjs/components/Label/useLabel.d.ts +4 -9
  26. package/lib-commonjs/components/Label/useLabel.js +23 -33
  27. package/lib-commonjs/components/Label/useLabel.js.map +1 -1
  28. package/lib-commonjs/components/Label/useLabelStyles.d.ts +2 -1
  29. package/lib-commonjs/components/Label/useLabelStyles.js +12 -9
  30. package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
  31. package/lib-commonjs/index.js +1 -1
  32. package/package.json +9 -11
  33. package/lib/common/isConformant.d.ts +0 -4
  34. package/lib/common/isConformant.js +0 -11
  35. package/lib/common/isConformant.js.map +0 -1
  36. package/lib-commonjs/common/isConformant.d.ts +0 -4
  37. package/lib-commonjs/common/isConformant.js +0 -22
  38. package/lib-commonjs/common/isConformant.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,287 @@
2
2
  "name": "@fluentui/react-label",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 06 Oct 2021 10:36:00 GMT",
5
+ "date": "Thu, 10 Feb 2022 08:44:35 GMT",
6
+ "tag": "@fluentui/react-label_v9.0.0-beta.5",
7
+ "version": "9.0.0-beta.5",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "martinhochel@microsoft.com",
12
+ "package": "@fluentui/react-label",
13
+ "commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
14
+ "comment": "chore: use storybook runner for all vNext packages"
15
+ },
16
+ {
17
+ "author": "elcraig@microsoft.com",
18
+ "package": "@fluentui/react-label",
19
+ "commit": "d892c7f79c543b6008634ecd669b75b5108cad46",
20
+ "comment": "Relocate comment about props to the correct type, and update spec to accurately reflect props"
21
+ },
22
+ {
23
+ "author": "bsunderhus@microsoft.com",
24
+ "package": "@fluentui/react-label",
25
+ "commit": "c0d4e63ee58e60e2c6674efbacc0783cd520984e",
26
+ "comment": "Updates components with nullRender changes"
27
+ },
28
+ {
29
+ "author": "elcraig@microsoft.com",
30
+ "package": "@fluentui/react-label",
31
+ "commit": "96d9c93544464bcc5ec36b7c5d724b77ae499c73",
32
+ "comment": "Update docs description"
33
+ },
34
+ {
35
+ "author": "andredias@microsoft.com",
36
+ "package": "@fluentui/react-label",
37
+ "commit": "084a7183511bae60a43e57fbd57979349c4736a4",
38
+ "comment": "Migrate package to use solution tsconfigs"
39
+ },
40
+ {
41
+ "author": "olfedias@microsoft.com",
42
+ "package": "@fluentui/react-label",
43
+ "commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
44
+ "comment": "remove inline-style-expand-shorthand from tsconfigs"
45
+ }
46
+ ],
47
+ "prerelease": [
48
+ {
49
+ "author": "lingfangao@hotmail.com",
50
+ "package": "@fluentui/react-label",
51
+ "commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
52
+ "comment": "Bump Fluent UI dependencies to 9.0.0-rc"
53
+ },
54
+ {
55
+ "author": "olfedias@microsoft.com",
56
+ "package": "@fluentui/react-label",
57
+ "commit": "742c191b7f2ea28505e49304117c090f9f36386c",
58
+ "comment": "Replace make-styles packages with griffel equivalents."
59
+ },
60
+ {
61
+ "author": "mgodbolt@microsoft.com",
62
+ "package": "@fluentui/react-label",
63
+ "commit": "839ec14849e112b85aa321d034739ec421199141",
64
+ "comment": "remove export of commons types"
65
+ },
66
+ {
67
+ "author": "Humberto.Morimoto@microsoft.com",
68
+ "package": "@fluentui/react-label",
69
+ "commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
70
+ "comment": "Updating based on changes to composition types."
71
+ },
72
+ {
73
+ "author": "Humberto.Morimoto@microsoft.com",
74
+ "package": "@fluentui/react-label",
75
+ "commit": "0bc161458eae5ae8d387172430496ce9829b1bb1",
76
+ "comment": "Using ComponentSlotProps instead of ObjectShorthandProps."
77
+ },
78
+ {
79
+ "author": "behowell@microsoft.com",
80
+ "package": "@fluentui/react-label",
81
+ "commit": "53b01d71e335715fda91b33e3d7bbd9d471d5ed3",
82
+ "comment": "Refactor component Slot typings"
83
+ },
84
+ {
85
+ "author": "Humberto.Morimoto@microsoft.com",
86
+ "package": "@fluentui/react-label",
87
+ "commit": "a052fbc9204600669d32b0ac346032d2cd8d9204",
88
+ "comment": "react-label: Replacing use of functions in makeStyles with direct use of tokens."
89
+ },
90
+ {
91
+ "author": "behowell@microsoft.com",
92
+ "package": "@fluentui/react-label",
93
+ "commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
94
+ "comment": "Remove component's shorthandProps array"
95
+ },
96
+ {
97
+ "author": "behowell@microsoft.com",
98
+ "package": "@fluentui/react-label",
99
+ "commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
100
+ "comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
101
+ },
102
+ {
103
+ "author": "Humberto.Morimoto@microsoft.com",
104
+ "package": "@fluentui/react-label",
105
+ "commit": "00a5d945904c896a0664de6ba72c145a255f0848",
106
+ "comment": "Updating use of tokens.fontWeight now that we don't need to use casting."
107
+ },
108
+ {
109
+ "author": "beachball",
110
+ "package": "@fluentui/react-label",
111
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
112
+ "commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
113
+ },
114
+ {
115
+ "author": "beachball",
116
+ "package": "@fluentui/react-label",
117
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1",
118
+ "commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
119
+ }
120
+ ]
121
+ }
122
+ },
123
+ {
124
+ "date": "Thu, 25 Nov 2021 08:34:14 GMT",
125
+ "tag": "@fluentui/react-label_v9.0.0-beta.4",
126
+ "version": "9.0.0-beta.4",
127
+ "comments": {
128
+ "prerelease": [
129
+ {
130
+ "author": "ololubek@microsoft.com",
131
+ "package": "@fluentui/react-label",
132
+ "commit": "a683ee69b17c667227acb71c59f609b4f1ca1ef9",
133
+ "comment": "Add aria-hidden to Label required field"
134
+ },
135
+ {
136
+ "author": "beachball",
137
+ "package": "@fluentui/react-label",
138
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
139
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
140
+ },
141
+ {
142
+ "author": "beachball",
143
+ "package": "@fluentui/react-label",
144
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
145
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
146
+ },
147
+ {
148
+ "author": "beachball",
149
+ "package": "@fluentui/react-label",
150
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
151
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
152
+ },
153
+ {
154
+ "author": "beachball",
155
+ "package": "@fluentui/react-label",
156
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
157
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
158
+ },
159
+ {
160
+ "author": "beachball",
161
+ "package": "@fluentui/react-label",
162
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4",
163
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
164
+ }
165
+ ]
166
+ }
167
+ },
168
+ {
169
+ "date": "Fri, 12 Nov 2021 13:25:25 GMT",
170
+ "tag": "@fluentui/react-label_v9.0.0-beta.3",
171
+ "version": "9.0.0-beta.3",
172
+ "comments": {
173
+ "none": [
174
+ {
175
+ "author": "lingfangao@hotmail.com",
176
+ "package": "@fluentui/react-label",
177
+ "commit": "7eff1eb4a259988273f8bc709e2951dbb8e0b695",
178
+ "comment": "chore(Label): Rework documentation to desired format"
179
+ },
180
+ {
181
+ "author": "lingfangao@hotmail.com",
182
+ "package": "@fluentui/react-label",
183
+ "commit": "00f70581480b536e723fb69edf0ae617beac4807",
184
+ "comment": "Remove beta release tag"
185
+ }
186
+ ],
187
+ "prerelease": [
188
+ {
189
+ "author": "gcox@microsoft.com",
190
+ "package": "@fluentui/react-label",
191
+ "commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
192
+ "comment": "Updated beta and RC components to ES2019"
193
+ },
194
+ {
195
+ "author": "olfedias@microsoft.com",
196
+ "package": "@fluentui/react-label",
197
+ "commit": "9186578324773f95f4d61be3d70e67752159d843",
198
+ "comment": "export static classes for components"
199
+ },
200
+ {
201
+ "author": "beachball",
202
+ "package": "@fluentui/react-label",
203
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
204
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
205
+ },
206
+ {
207
+ "author": "beachball",
208
+ "package": "@fluentui/react-label",
209
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
210
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
211
+ },
212
+ {
213
+ "author": "beachball",
214
+ "package": "@fluentui/react-label",
215
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
216
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
217
+ },
218
+ {
219
+ "author": "beachball",
220
+ "package": "@fluentui/react-label",
221
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
222
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
223
+ },
224
+ {
225
+ "author": "beachball",
226
+ "package": "@fluentui/react-label",
227
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
228
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
229
+ }
230
+ ]
231
+ }
232
+ },
233
+ {
234
+ "date": "Wed, 27 Oct 2021 12:14:18 GMT",
235
+ "tag": "@fluentui/react-label_v9.0.0-beta.2",
236
+ "version": "9.0.0-beta.2",
237
+ "comments": {
238
+ "prerelease": [
239
+ {
240
+ "author": "peter@draxler.ml",
241
+ "package": "@fluentui/react-label",
242
+ "commit": "f6db7c8d6b7db0902775e7857b62b745be35b59a",
243
+ "comment": "added styling of documentation"
244
+ },
245
+ {
246
+ "author": "gcox@microsoft.com",
247
+ "package": "@fluentui/react-label",
248
+ "commit": "9a5055bbb719173bdfa5c82c1ab14f93efa9c736",
249
+ "comment": "Removed duplicate 'Label' from story names"
250
+ },
251
+ {
252
+ "author": "beachball",
253
+ "package": "@fluentui/react-label",
254
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.2",
255
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
256
+ },
257
+ {
258
+ "author": "beachball",
259
+ "package": "@fluentui/react-label",
260
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.2",
261
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
262
+ },
263
+ {
264
+ "author": "beachball",
265
+ "package": "@fluentui/react-label",
266
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.2",
267
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
268
+ },
269
+ {
270
+ "author": "beachball",
271
+ "package": "@fluentui/react-label",
272
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2",
273
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
274
+ },
275
+ {
276
+ "author": "beachball",
277
+ "package": "@fluentui/react-label",
278
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.2",
279
+ "commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
280
+ }
281
+ ]
282
+ }
283
+ },
284
+ {
285
+ "date": "Wed, 06 Oct 2021 10:37:22 GMT",
6
286
  "tag": "@fluentui/react-label_v9.0.0-beta.1",
7
287
  "version": "9.0.0-beta.1",
8
288
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,76 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Wed, 06 Oct 2021 10:36:00 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 10 Feb 2022 08:44:35 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.5)
8
+
9
+ Thu, 10 Feb 2022 08:44:35 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.4..@fluentui/react-label_v9.0.0-beta.5)
11
+
12
+ ### Changes
13
+
14
+ - Bump Fluent UI dependencies to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
15
+ - Replace make-styles packages with griffel equivalents. ([PR #21430](https://github.com/microsoft/fluentui/pull/21430) by olfedias@microsoft.com)
16
+ - remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
17
+ - Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
18
+ - Using ComponentSlotProps instead of ObjectShorthandProps. ([PR #20890](https://github.com/microsoft/fluentui/pull/20890) by Humberto.Morimoto@microsoft.com)
19
+ - Refactor component Slot typings ([PR #21518](https://github.com/microsoft/fluentui/pull/21518) by behowell@microsoft.com)
20
+ - react-label: Replacing use of functions in makeStyles with direct use of tokens. ([PR #21046](https://github.com/microsoft/fluentui/pull/21046) by Humberto.Morimoto@microsoft.com)
21
+ - Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
22
+ - BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
23
+ - Updating use of tokens.fontWeight now that we don't need to use casting. ([PR #21217](https://github.com/microsoft/fluentui/pull/21217) by Humberto.Morimoto@microsoft.com)
24
+ - Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
25
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
26
+
27
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.4)
28
+
29
+ Thu, 25 Nov 2021 08:34:14 GMT
30
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.3..@fluentui/react-label_v9.0.0-beta.4)
31
+
32
+ ### Changes
33
+
34
+ - Add aria-hidden to Label required field ([PR #20680](https://github.com/microsoft/fluentui/pull/20680) by ololubek@microsoft.com)
35
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
36
+ - Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
37
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
38
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
39
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
40
+
41
+ ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.3)
42
+
43
+ Fri, 12 Nov 2021 13:25:25 GMT
44
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.2..@fluentui/react-label_v9.0.0-beta.3)
45
+
46
+ ### Changes
47
+
48
+ - Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
49
+ - export static classes for components ([PR #20456](https://github.com/microsoft/fluentui/pull/20456) by olfedias@microsoft.com)
50
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
51
+ - Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
52
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
53
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
54
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
55
+
56
+ ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.2)
57
+
58
+ Wed, 27 Oct 2021 12:14:18 GMT
59
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-beta.1..@fluentui/react-label_v9.0.0-beta.2)
60
+
61
+ ### Changes
62
+
63
+ - added styling of documentation ([PR #20193](https://github.com/microsoft/fluentui/pull/20193) by peter@draxler.ml)
64
+ - Removed duplicate 'Label' from story names ([PR #20269](https://github.com/microsoft/fluentui/pull/20269) by gcox@microsoft.com)
65
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
66
+ - Bump @fluentui/react-utilities to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
67
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
68
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
69
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
70
+
7
71
  ## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-beta.1)
8
72
 
9
- Wed, 06 Oct 2021 10:36:00 GMT
73
+ Wed, 06 Oct 2021 10:37:22 GMT
10
74
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-alpha.51..@fluentui/react-label_v9.0.0-beta.1)
11
75
 
12
76
  ### Changes
package/Spec.md CHANGED
@@ -75,55 +75,48 @@ The Label component should be simple as shown below. It will just need the text
75
75
  ## API
76
76
 
77
77
  ```ts
78
- /**
79
- * Label Props
80
- */
81
- export type LabelProps = ComponentProps &
82
- React.LabelHTMLAttributes<HTMLElement> & {
83
- /**
84
- * Renders the label as disabled
85
- * @defaultvalue false
86
- */
87
- disabled?: boolean;
88
-
89
- /**
90
- * Whether the associated form field is required or not. If true it will be an asterisk, otherwise it will be what is provided.
91
- * @defaultvalue false
92
- */
93
- required?: boolean | ShorthandProps<ComponentProps>;
78
+ export type LabelCommons = {
79
+ /**
80
+ * Renders the label as disabled
81
+ * @defaultvalue false
82
+ */
83
+ disabled: boolean;
94
84
 
95
- /**
96
- * A label supports different font sizes, see tokens for reference.
97
- * @defaultvalue 'medium'
98
- */
99
- size?: 'small' | 'medium' | 'large';
85
+ /**
86
+ * A label supports different sizes.
87
+ * @defaultvalue 'medium'
88
+ */
89
+ size: 'small' | 'medium' | 'large';
100
90
 
101
- /**
102
- * A label supports semibold/strong fontweight. When size is set to large, label strong will be set by default.
103
- * @defaultvalue false
104
- */
105
- strong?: boolean;
106
- };
91
+ /**
92
+ * A label supports semibold/strong fontweight.
93
+ * @defaultvalue false
94
+ */
95
+ strong: boolean;
96
+ };
107
97
 
108
- /**
109
- * Names of the shorthand properties in LabelProps
110
- */
111
- export type LabelShorthandProps = 'required';
98
+ export type LabelSlots = {
99
+ root: IntrinsicSlotProps<'label'>;
100
+ required?: IntrinsicSlotProps<'span'>;
101
+ };
112
102
 
113
103
  /**
114
- * Names of LabelProps that have a default value in useLabel
104
+ * State used in rendering Label
115
105
  */
116
- export type LabelDefaultedProps = never;
106
+ export type LabelState = ComponentState<LabelSlots> & LabelCommons;
117
107
 
118
108
  /**
119
- * State used in rendering Label
109
+ * Label Props
120
110
  */
121
- export type LabelState = ComponentState<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
122
- /**
123
- * Ref to the root element
124
- */
125
- ref: React.Ref<HTMLElement>;
126
- };
111
+ export type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> &
112
+ Partial<LabelCommons> & {
113
+ /**
114
+ * Displays and indicator that the label is for a required field. The required prop can be set to true to display
115
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
116
+ * @defaultvalue false
117
+ */
118
+ required?: boolean | IntrinsicSlotProps<'span'> | React.ReactNode;
119
+ };
127
120
  ```
128
121
 
129
122
  ## Structure
@@ -1,19 +1,17 @@
1
1
  import type { ComponentProps } from '@fluentui/react-utilities';
2
2
  import type { ComponentState } from '@fluentui/react-utilities';
3
3
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
- import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
5
- import type { ObjectShorthandProps } from '@fluentui/react-utilities';
6
4
  import * as React_2 from 'react';
5
+ import type { Slot } from '@fluentui/react-utilities';
7
6
 
8
7
  /**
9
8
  * A label component provides a title or name to a component.
10
9
  */
11
10
  export declare const Label: ForwardRefComponent<LabelProps>;
12
11
 
13
- /**
14
- * Label Props
15
- */
16
- export declare type LabelCommons = {
12
+ export declare const labelClassName = "fui-Label";
13
+
14
+ declare type LabelCommons = {
17
15
  /**
18
16
  * Renders the label as disabled
19
17
  * @defaultvalue false
@@ -31,24 +29,21 @@ export declare type LabelCommons = {
31
29
  strong: boolean;
32
30
  };
33
31
 
32
+ /**
33
+ * Label Props
34
+ */
34
35
  export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
35
36
  /**
36
37
  * Displays and indicator that the label is for a required field. The required prop can be set to true to display
37
38
  * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
38
39
  * @defaultvalue false
39
40
  */
40
- required?: boolean | ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>> | React_2.ReactNode;
41
+ required?: boolean | Slot<'span'>;
41
42
  };
42
43
 
43
- /**
44
- * Array of all shorthand properties listed in LabelShorthandProps
45
- * {@docCatergory Label}
46
- */
47
- export declare const labelShorthandProps: Array<keyof LabelSlots>;
48
-
49
44
  export declare type LabelSlots = {
50
- root: IntrinsicShorthandProps<'label'>;
51
- required?: IntrinsicShorthandProps<'span'>;
45
+ root: Slot<'label'>;
46
+ required?: Slot<'span'>;
52
47
  };
53
48
 
54
49
  /**
@@ -59,22 +54,22 @@ export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
59
54
  /**
60
55
  * Render the final JSX of Label
61
56
  */
62
- export declare const renderLabel: (state: LabelState) => JSX.Element;
57
+ export declare const renderLabel_unstable: (state: LabelState) => JSX.Element;
63
58
 
64
59
  /**
65
60
  * Create the state required to render Label.
66
61
  *
67
- * The returned state can be modified with hooks such as useLabelStyles,
68
- * before being passed to renderLabel.
62
+ * The returned state can be modified with hooks such as useLabelStyles_unstable,
63
+ * before being passed to renderLabel_unstable.
69
64
  *
70
65
  * @param props - props from this instance of Label
71
66
  * @param ref - reference to root HTMLElement of Label
72
67
  */
73
- export declare const useLabel: (props: LabelProps, ref: React_2.Ref<HTMLElement>) => LabelState;
68
+ export declare const useLabel_unstable: (props: LabelProps, ref: React_2.Ref<HTMLElement>) => LabelState;
74
69
 
75
70
  /**
76
71
  * Apply styling to the Label slots based on the state
77
72
  */
78
- export declare const useLabelStyles: (state: LabelState) => LabelState;
73
+ export declare const useLabelStyles_unstable: (state: LabelState) => LabelState;
79
74
 
80
75
  export { }
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useLabel } from './useLabel';
3
- import { renderLabel } from './renderLabel';
4
- import { useLabelStyles } from './useLabelStyles';
2
+ import { useLabel_unstable } from './useLabel';
3
+ import { renderLabel_unstable } from './renderLabel';
4
+ import { useLabelStyles_unstable } from './useLabelStyles';
5
5
  /**
6
6
  * A label component provides a title or name to a component.
7
7
  */
8
8
 
9
- export var Label = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useLabel(props, ref);
11
- useLabelStyles(state);
12
- return renderLabel(state);
9
+ export const Label = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useLabel_unstable(props, ref);
11
+ useLabelStyles_unstable(state);
12
+ return renderLabel_unstable(state);
13
13
  });
14
14
  Label.displayName = 'Label';
15
15
  //# sourceMappingURL=Label.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,YAAzB;AACA,SAAS,WAAT,QAA4B,eAA5B;AACA,SAAS,cAAT,QAA+B,kBAA/B;AAIA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAChF,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AAEA,EAAA,cAAc,CAAC,KAAD,CAAd;AACA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AAIA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;AAEA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AACA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,9 +1,5 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities';
2
- import * as React from 'react';
3
- /**
4
- * Label Props
5
- */
6
- export declare type LabelCommons = {
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
+ declare type LabelCommons = {
7
3
  /**
8
4
  * Renders the label as disabled
9
5
  * @defaultvalue false
@@ -21,18 +17,22 @@ export declare type LabelCommons = {
21
17
  strong: boolean;
22
18
  };
23
19
  export declare type LabelSlots = {
24
- root: IntrinsicShorthandProps<'label'>;
25
- required?: IntrinsicShorthandProps<'span'>;
20
+ root: Slot<'label'>;
21
+ required?: Slot<'span'>;
26
22
  };
27
23
  /**
28
24
  * State used in rendering Label
29
25
  */
30
26
  export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
27
+ /**
28
+ * Label Props
29
+ */
31
30
  export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
32
31
  /**
33
32
  * Displays and indicator that the label is for a required field. The required prop can be set to true to display
34
33
  * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
35
34
  * @defaultvalue false
36
35
  */
37
- required?: boolean | ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | React.ReactNode;
36
+ required?: boolean | Slot<'span'>;
38
37
  };
38
+ export {};
@@ -2,4 +2,4 @@ import type { LabelState } from './Label.types';
2
2
  /**
3
3
  * Render the final JSX of Label
4
4
  */
5
- export declare const renderLabel: (state: LabelState) => JSX.Element;
5
+ export declare const renderLabel_unstable: (state: LabelState) => JSX.Element;
@@ -1,16 +1,16 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
- import { labelShorthandProps } from './useLabel';
5
3
  /**
6
4
  * Render the final JSX of Label
7
5
  */
8
6
 
9
- export var renderLabel = function (state) {
10
- var _a = getSlots(state, labelShorthandProps),
11
- slots = _a.slots,
12
- slotProps = _a.slotProps;
13
-
14
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.root.children, /*#__PURE__*/React.createElement(slots.required, __assign({}, slotProps.required)));
7
+ export const renderLabel_unstable = state => {
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ }, state.root.children, slots.required && /*#__PURE__*/React.createElement(slots.required, { ...slotProps.required
14
+ }));
15
15
  };
16
16
  //# sourceMappingURL=renderLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,mBAAT,QAAoC,YAApC;AAGA;;AAEG;;AACH,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,QAAQ,CAAa,KAAb,EAAoB,mBAApB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFF,CADF;AAMD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Label/renderLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAI,KAAD,IAAsB;AACxD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,IAAN,CAAW,QADd,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;AAAf,GAAf,CAFrB,CADF;AAMD,CATM","sourceRoot":""}