@fluentui/react-label 9.0.0-alpha.42 → 9.0.0-alpha.46

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 (61) hide show
  1. package/CHANGELOG.json +171 -7
  2. package/CHANGELOG.md +59 -7
  3. package/dist/react-label.d.ts +26 -41
  4. package/lib/Label.js.map +1 -1
  5. package/lib/common/isConformant.js.map +1 -1
  6. package/lib/components/Label/Label.d.ts +2 -5
  7. package/lib/components/Label/Label.js.map +1 -1
  8. package/lib/components/Label/Label.types.d.ts +15 -26
  9. package/lib/components/Label/Label.types.js.map +1 -1
  10. package/lib/components/Label/index.js.map +1 -1
  11. package/lib/components/Label/renderLabel.js +3 -3
  12. package/lib/components/Label/renderLabel.js.map +1 -1
  13. package/lib/components/Label/useLabel.d.ts +3 -4
  14. package/lib/components/Label/useLabel.js +28 -40
  15. package/lib/components/Label/useLabel.js.map +1 -1
  16. package/lib/components/Label/useLabelStyles.js +1 -1
  17. package/lib/components/Label/useLabelStyles.js.map +1 -1
  18. package/lib/index.js.map +1 -1
  19. package/lib-commonjs/Label.js.map +1 -1
  20. package/lib-commonjs/common/isConformant.js.map +1 -1
  21. package/lib-commonjs/components/Label/Label.d.ts +2 -5
  22. package/lib-commonjs/components/Label/Label.js.map +1 -1
  23. package/lib-commonjs/components/Label/Label.types.d.ts +15 -26
  24. package/lib-commonjs/components/Label/Label.types.js.map +1 -1
  25. package/lib-commonjs/components/Label/index.js.map +1 -1
  26. package/lib-commonjs/components/Label/renderLabel.js +2 -2
  27. package/lib-commonjs/components/Label/renderLabel.js.map +1 -1
  28. package/lib-commonjs/components/Label/useLabel.d.ts +3 -4
  29. package/lib-commonjs/components/Label/useLabel.js +30 -41
  30. package/lib-commonjs/components/Label/useLabel.js.map +1 -1
  31. package/lib-commonjs/components/Label/useLabelStyles.js +1 -1
  32. package/lib-commonjs/components/Label/useLabelStyles.js.map +1 -1
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/package.json +6 -6
  35. package/lib-amd/Label.d.ts +0 -1
  36. package/lib-amd/Label.js +0 -6
  37. package/lib-amd/Label.js.map +0 -1
  38. package/lib-amd/common/isConformant.d.ts +0 -4
  39. package/lib-amd/common/isConformant.js +0 -15
  40. package/lib-amd/common/isConformant.js.map +0 -1
  41. package/lib-amd/components/Label/Label.d.ts +0 -10
  42. package/lib-amd/components/Label/Label.js +0 -15
  43. package/lib-amd/components/Label/Label.js.map +0 -1
  44. package/lib-amd/components/Label/Label.types.d.ts +0 -49
  45. package/lib-amd/components/Label/Label.types.js +0 -5
  46. package/lib-amd/components/Label/Label.types.js.map +0 -1
  47. package/lib-amd/components/Label/index.d.ts +0 -5
  48. package/lib-amd/components/Label/index.js +0 -10
  49. package/lib-amd/components/Label/index.js.map +0 -1
  50. package/lib-amd/components/Label/renderLabel.d.ts +0 -5
  51. package/lib-amd/components/Label/renderLabel.js +0 -16
  52. package/lib-amd/components/Label/renderLabel.js.map +0 -1
  53. package/lib-amd/components/Label/useLabel.d.ts +0 -18
  54. package/lib-amd/components/Label/useLabel.js +0 -53
  55. package/lib-amd/components/Label/useLabel.js.map +0 -1
  56. package/lib-amd/components/Label/useLabelStyles.d.ts +0 -5
  57. package/lib-amd/components/Label/useLabelStyles.js +0 -50
  58. package/lib-amd/components/Label/useLabelStyles.js.map +0 -1
  59. package/lib-amd/index.d.ts +0 -2
  60. package/lib-amd/index.js +0 -6
  61. package/lib-amd/index.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,171 @@
2
2
  "name": "@fluentui/react-label",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 21 Sep 2021 07:40:35 GMT",
5
+ "date": "Mon, 27 Sep 2021 08:04:28 GMT",
6
+ "tag": "@fluentui/react-label_v9.0.0-alpha.46",
7
+ "version": "9.0.0-alpha.46",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "email not defined",
12
+ "package": "@fluentui/react-label",
13
+ "comment": "refactor: simplify mergeprops for label",
14
+ "commit": "7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e"
15
+ }
16
+ ],
17
+ "prerelease": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@fluentui/react-label",
21
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.73",
22
+ "commit": "7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-label",
27
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-alpha.53",
28
+ "commit": "7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-label",
33
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.55",
34
+ "commit": "7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@fluentui/react-label",
39
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.48",
40
+ "commit": "7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e"
41
+ },
42
+ {
43
+ "author": "beachball",
44
+ "package": "@fluentui/react-label",
45
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.17",
46
+ "commit": "7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e"
47
+ }
48
+ ]
49
+ }
50
+ },
51
+ {
52
+ "date": "Fri, 24 Sep 2021 09:17:17 GMT",
53
+ "tag": "@fluentui/react-label_v9.0.0-alpha.45",
54
+ "version": "9.0.0-alpha.45",
55
+ "comments": {
56
+ "prerelease": [
57
+ {
58
+ "author": "beachball",
59
+ "package": "@fluentui/react-label",
60
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.72",
61
+ "commit": "0d26909912889432060fd4c87b2f4a45017e1532"
62
+ },
63
+ {
64
+ "author": "beachball",
65
+ "package": "@fluentui/react-label",
66
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-alpha.52",
67
+ "commit": "0d26909912889432060fd4c87b2f4a45017e1532"
68
+ },
69
+ {
70
+ "author": "beachball",
71
+ "package": "@fluentui/react-label",
72
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.54",
73
+ "commit": "0d26909912889432060fd4c87b2f4a45017e1532"
74
+ },
75
+ {
76
+ "author": "beachball",
77
+ "package": "@fluentui/react-label",
78
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.47",
79
+ "commit": "0d26909912889432060fd4c87b2f4a45017e1532"
80
+ },
81
+ {
82
+ "author": "beachball",
83
+ "package": "@fluentui/react-label",
84
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.16",
85
+ "commit": "0d26909912889432060fd4c87b2f4a45017e1532"
86
+ }
87
+ ]
88
+ }
89
+ },
90
+ {
91
+ "date": "Thu, 23 Sep 2021 08:21:34 GMT",
92
+ "tag": "@fluentui/react-label_v9.0.0-alpha.44",
93
+ "version": "9.0.0-alpha.44",
94
+ "comments": {
95
+ "prerelease": [
96
+ {
97
+ "author": "beachball",
98
+ "package": "@fluentui/react-label",
99
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.71",
100
+ "commit": "95682da34c48813f7658032ae490d21d2f363b90"
101
+ },
102
+ {
103
+ "author": "beachball",
104
+ "package": "@fluentui/react-label",
105
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-alpha.51",
106
+ "commit": "95682da34c48813f7658032ae490d21d2f363b90"
107
+ },
108
+ {
109
+ "author": "beachball",
110
+ "package": "@fluentui/react-label",
111
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.53",
112
+ "commit": "95682da34c48813f7658032ae490d21d2f363b90"
113
+ },
114
+ {
115
+ "author": "beachball",
116
+ "package": "@fluentui/react-label",
117
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.46",
118
+ "commit": "95682da34c48813f7658032ae490d21d2f363b90"
119
+ },
120
+ {
121
+ "author": "beachball",
122
+ "package": "@fluentui/react-label",
123
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.15",
124
+ "commit": "95682da34c48813f7658032ae490d21d2f363b90"
125
+ }
126
+ ]
127
+ }
128
+ },
129
+ {
130
+ "date": "Wed, 22 Sep 2021 10:10:07 GMT",
131
+ "tag": "@fluentui/react-label_v9.0.0-alpha.43",
132
+ "version": "9.0.0-alpha.43",
133
+ "comments": {
134
+ "prerelease": [
135
+ {
136
+ "author": "beachball",
137
+ "package": "@fluentui/react-label",
138
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.70",
139
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
140
+ },
141
+ {
142
+ "author": "beachball",
143
+ "package": "@fluentui/react-label",
144
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-alpha.50",
145
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
146
+ },
147
+ {
148
+ "author": "beachball",
149
+ "package": "@fluentui/react-label",
150
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.52",
151
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
152
+ },
153
+ {
154
+ "author": "beachball",
155
+ "package": "@fluentui/react-label",
156
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.45",
157
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
158
+ },
159
+ {
160
+ "author": "beachball",
161
+ "package": "@fluentui/react-label",
162
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.14",
163
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
164
+ }
165
+ ]
166
+ }
167
+ },
168
+ {
169
+ "date": "Tue, 21 Sep 2021 07:42:34 GMT",
6
170
  "tag": "@fluentui/react-label_v9.0.0-alpha.42",
7
171
  "version": "9.0.0-alpha.42",
8
172
  "comments": {
@@ -11,7 +175,7 @@
11
175
  "author": "elcraig@microsoft.com",
12
176
  "package": "@fluentui/react-label",
13
177
  "comment": "Remove unnecessary docCategory tags",
14
- "commit": "7ac237dbe5b9a3e452581f7478f811f43bba9f19"
178
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
15
179
  }
16
180
  ],
17
181
  "prerelease": [
@@ -19,31 +183,31 @@
19
183
  "author": "gcox@microsoft.com",
20
184
  "package": "@fluentui/react-label",
21
185
  "comment": "Updating to types over interfaces",
22
- "commit": "7ac237dbe5b9a3e452581f7478f811f43bba9f19"
186
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
23
187
  },
24
188
  {
25
189
  "author": "beachball",
26
190
  "package": "@fluentui/react-label",
27
191
  "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.69",
28
- "commit": "7ac237dbe5b9a3e452581f7478f811f43bba9f19"
192
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
29
193
  },
30
194
  {
31
195
  "author": "beachball",
32
196
  "package": "@fluentui/react-label",
33
197
  "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.51",
34
- "commit": "7ac237dbe5b9a3e452581f7478f811f43bba9f19"
198
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
35
199
  },
36
200
  {
37
201
  "author": "beachball",
38
202
  "package": "@fluentui/react-label",
39
203
  "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.44",
40
- "commit": "7ac237dbe5b9a3e452581f7478f811f43bba9f19"
204
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
41
205
  },
42
206
  {
43
207
  "author": "beachball",
44
208
  "package": "@fluentui/react-label",
45
209
  "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.13",
46
- "commit": "7ac237dbe5b9a3e452581f7478f811f43bba9f19"
210
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
47
211
  }
48
212
  ]
49
213
  }
package/CHANGELOG.md CHANGED
@@ -1,21 +1,73 @@
1
1
  # Change Log - @fluentui/react-label
2
2
 
3
- This log was last generated on Tue, 21 Sep 2021 07:40:35 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 27 Sep 2021 08:04:28 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-alpha.46](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-alpha.46)
8
+
9
+ Mon, 27 Sep 2021 08:04:28 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-alpha.45..@fluentui/react-label_v9.0.0-alpha.46)
11
+
12
+ ### Changes
13
+
14
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.73 ([commit](https://github.com/microsoft/fluentui/commit/7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.53 ([commit](https://github.com/microsoft/fluentui/commit/7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e) by beachball)
16
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.55 ([commit](https://github.com/microsoft/fluentui/commit/7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e) by beachball)
17
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.48 ([commit](https://github.com/microsoft/fluentui/commit/7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e) by beachball)
18
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.17 ([commit](https://github.com/microsoft/fluentui/commit/7a6d4d03fc1157272a6641fd05fc27f51ba1cc0e) by beachball)
19
+
20
+ ## [9.0.0-alpha.45](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-alpha.45)
21
+
22
+ Fri, 24 Sep 2021 09:17:17 GMT
23
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-alpha.44..@fluentui/react-label_v9.0.0-alpha.45)
24
+
25
+ ### Changes
26
+
27
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.72 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
28
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.52 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
29
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.54 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
30
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.47 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
31
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.16 ([PR #19950](https://github.com/microsoft/fluentui/pull/19950) by beachball)
32
+
33
+ ## [9.0.0-alpha.44](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-alpha.44)
34
+
35
+ Thu, 23 Sep 2021 08:21:34 GMT
36
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-alpha.43..@fluentui/react-label_v9.0.0-alpha.44)
37
+
38
+ ### Changes
39
+
40
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.71 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
41
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.51 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
42
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.53 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
43
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.46 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
44
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.15 ([commit](https://github.com/microsoft/fluentui/commit/95682da34c48813f7658032ae490d21d2f363b90) by beachball)
45
+
46
+ ## [9.0.0-alpha.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-alpha.43)
47
+
48
+ Wed, 22 Sep 2021 10:10:07 GMT
49
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-alpha.42..@fluentui/react-label_v9.0.0-alpha.43)
50
+
51
+ ### Changes
52
+
53
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.70 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
54
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.50 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
55
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.52 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
56
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.45 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
57
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.14 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
58
+
7
59
  ## [9.0.0-alpha.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-alpha.42)
8
60
 
9
- Tue, 21 Sep 2021 07:40:35 GMT
61
+ Tue, 21 Sep 2021 07:42:34 GMT
10
62
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-label_v9.0.0-alpha.41..@fluentui/react-label_v9.0.0-alpha.42)
11
63
 
12
64
  ### Changes
13
65
 
14
- - Updating to types over interfaces ([PR #19880](https://github.com/microsoft/fluentui/pull/19880) by gcox@microsoft.com)
15
- - Bump @fluentui/react-make-styles to v9.0.0-alpha.69 ([PR #19880](https://github.com/microsoft/fluentui/pull/19880) by beachball)
16
- - Bump @fluentui/babel-make-styles to v9.0.0-alpha.51 ([PR #19880](https://github.com/microsoft/fluentui/pull/19880) by beachball)
17
- - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.44 ([PR #19880](https://github.com/microsoft/fluentui/pull/19880) by beachball)
18
- - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.13 ([PR #19880](https://github.com/microsoft/fluentui/pull/19880) by beachball)
66
+ - Updating to types over interfaces ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by gcox@microsoft.com)
67
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.69 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
68
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.51 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
69
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.44 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
70
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.13 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
19
71
 
20
72
  ## [9.0.0-alpha.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-label_v9.0.0-alpha.41)
21
73
 
@@ -1,75 +1,61 @@
1
- import { ComponentPropsCompat } from '@fluentui/react-utilities';
2
- import type { ComponentStateCompat } from '@fluentui/react-utilities';
3
- import { ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
1
+ import { ComponentProps } from '@fluentui/react-utilities';
2
+ import type { ComponentState } from '@fluentui/react-utilities';
3
+ import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
4
+ import { ObjectShorthandProps } from '@fluentui/react-utilities';
4
5
  import * as React_2 from 'react';
5
- import type { ShorthandPropsCompat } from '@fluentui/react-utilities';
6
6
 
7
7
  /**
8
8
  * A label component provides a title or name to a component.
9
9
  */
10
- export declare const Label: React_2.ForwardRefExoticComponent<ComponentPropsCompat & React_2.LabelHTMLAttributes<HTMLLabelElement> & {
11
- disabled?: boolean | undefined;
12
- required?: string | number | boolean | React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | React_2.ReactNodeArray | React_2.ReactPortal | ObjectShorthandPropsCompat<ComponentPropsCompat> | null | undefined;
13
- size?: "small" | "medium" | "large" | undefined;
14
- strong?: boolean | undefined;
10
+ export declare const Label: React_2.ForwardRefExoticComponent<Pick<ComponentProps<LabelSlots, "root">, "form" | "slot" | "style" | "title" | "key" | "htmlFor" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as"> & Partial<LabelCommons> & {
11
+ required?: string | number | boolean | {} | React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | React_2.ReactNodeArray | React_2.ReactPortal | ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>> | null | undefined;
15
12
  } & React_2.RefAttributes<HTMLElement>>;
16
13
 
17
- /**
18
- * Names of LabelProps that have a default value in useLabel
19
- */
20
- export declare type LabelDefaultedProps = 'size';
21
-
22
14
  /**
23
15
  * Label Props
24
16
  */
25
- export declare type LabelProps = ComponentPropsCompat & React_2.LabelHTMLAttributes<HTMLLabelElement> & {
17
+ export declare type LabelCommons = {
26
18
  /**
27
19
  * Renders the label as disabled
28
20
  * @defaultvalue false
29
21
  */
30
- disabled?: boolean;
31
- /**
32
- * Displays and indicator that the label is for a required field. The required prop can be set to true to display
33
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
34
- * @defaultvalue false
35
- */
36
- required?: boolean | ShorthandPropsCompat<ComponentPropsCompat>;
22
+ disabled: boolean;
37
23
  /**
38
24
  * A label supports different sizes.
39
25
  * @defaultvalue 'medium'
40
26
  */
41
- size?: 'small' | 'medium' | 'large';
27
+ size: 'small' | 'medium' | 'large';
42
28
  /**
43
29
  * A label supports semibold/strong fontweight.
44
30
  * @defaultvalue false
45
31
  */
46
- strong?: boolean;
32
+ strong: boolean;
47
33
  };
48
34
 
49
- /**
50
- * Names of the shorthand properties in LabelProps
51
- */
52
- export declare type LabelShorthandProps = 'required';
35
+ export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
36
+ /**
37
+ * Displays and indicator that the label is for a required field. The required prop can be set to true to display
38
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
39
+ * @defaultvalue false
40
+ */
41
+ required?: boolean | ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>> | React_2.ReactNode;
42
+ };
53
43
 
54
44
  /**
55
45
  * Array of all shorthand properties listed in LabelShorthandProps
56
46
  * {@docCatergory Label}
57
47
  */
58
- export declare const labelShorthandProps: LabelShorthandProps[];
48
+ export declare const labelShorthandProps: Array<keyof LabelSlots>;
49
+
50
+ export declare type LabelSlots = {
51
+ root: IntrinsicShorthandProps<'label'>;
52
+ required?: IntrinsicShorthandProps<'span'>;
53
+ };
59
54
 
60
55
  /**
61
56
  * State used in rendering Label
62
57
  */
63
- export declare type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
64
- /**
65
- * Ref to the root element
66
- */
67
- ref: React_2.Ref<HTMLElement>;
68
- /**
69
- * The required prop resolved to a slot object
70
- */
71
- required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;
72
- };
58
+ export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
73
59
 
74
60
  /**
75
61
  * Render the final JSX of Label
@@ -84,9 +70,8 @@ export declare const renderLabel: (state: LabelState) => JSX.Element;
84
70
  *
85
71
  * @param props - props from this instance of Label
86
72
  * @param ref - reference to root HTMLElement of Label
87
- * @param defaultProps - (optional) default prop values provided by the implementing type
88
73
  */
89
- export declare const useLabel: (props: LabelProps, ref: React_2.Ref<HTMLElement>, defaultProps?: LabelProps | undefined) => LabelState;
74
+ export declare const useLabel: (props: LabelProps, ref: React_2.Ref<HTMLElement>) => LabelState;
90
75
 
91
76
  /**
92
77
  * Apply styling to the Label slots based on the state
package/lib/Label.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"../src/","sources":["Label.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Label/index';\n"]}
1
+ {"version":3,"file":"Label.js","sourceRoot":"","sources":["../src/Label.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE;AAH+C,GAA7D;AAMA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE;AAH+C,GAA7D;AAMA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -2,9 +2,6 @@ import * as React from 'react';
2
2
  /**
3
3
  * A label component provides a title or name to a component.
4
4
  */
5
- export declare const Label: React.ForwardRefExoticComponent<import("@fluentui/react-utilities").ComponentPropsCompat & React.LabelHTMLAttributes<HTMLLabelElement> & {
6
- disabled?: boolean | undefined;
7
- required?: string | number | boolean | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ObjectShorthandPropsCompat<import("@fluentui/react-utilities").ComponentPropsCompat> | null | undefined;
8
- size?: "small" | "medium" | "large" | undefined;
9
- strong?: boolean | undefined;
5
+ export declare const Label: React.ForwardRefExoticComponent<Pick<import("@fluentui/react-utilities").ComponentProps<import("./Label.types").LabelSlots, "root">, "form" | "slot" | "style" | "title" | "key" | "htmlFor" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as"> & Partial<import("./Label.types").LabelCommons> & {
6
+ required?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | null | undefined;
10
7
  } & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["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;AAGA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAAG,KAAK,CAAC,UAAN,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AAEA,EAAA,cAAc,CAAC,KAAD,CAAd;AACA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALoB,CAAd;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useLabel } from './useLabel';\nimport { renderLabel } from './renderLabel';\nimport { useLabelStyles } from './useLabelStyles';\nimport type { LabelProps } from './Label.types';\n\n/**\n * A label component provides a title or name to a component.\n */\nexport const Label = React.forwardRef<HTMLElement, LabelProps>((props, ref) => {\n const state = useLabel(props, ref);\n\n useLabelStyles(state);\n return renderLabel(state);\n});\n\nLabel.displayName = 'Label';\n"],"sourceRoot":"../src/"}
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;AAGA;;AAEG;;AACH,OAAO,IAAM,KAAK,gBAAG,KAAK,CAAC,UAAN,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AAEA,EAAA,cAAc,CAAC,KAAD,CAAd;AACA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALoB,CAAd;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,49 +1,38 @@
1
+ import type { ComponentProps, ComponentState, IntrinsicShorthandProps, ObjectShorthandProps } from '@fluentui/react-utilities';
1
2
  import * as React from 'react';
2
- import type { ComponentPropsCompat, ComponentStateCompat, ObjectShorthandPropsCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Label Props
5
5
  */
6
- export declare type LabelProps = ComponentPropsCompat & React.LabelHTMLAttributes<HTMLLabelElement> & {
6
+ export declare type LabelCommons = {
7
7
  /**
8
8
  * Renders the label as disabled
9
9
  * @defaultvalue false
10
10
  */
11
- disabled?: boolean;
12
- /**
13
- * Displays and indicator that the label is for a required field. The required prop can be set to true to display
14
- * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
15
- * @defaultvalue false
16
- */
17
- required?: boolean | ShorthandPropsCompat<ComponentPropsCompat>;
11
+ disabled: boolean;
18
12
  /**
19
13
  * A label supports different sizes.
20
14
  * @defaultvalue 'medium'
21
15
  */
22
- size?: 'small' | 'medium' | 'large';
16
+ size: 'small' | 'medium' | 'large';
23
17
  /**
24
18
  * A label supports semibold/strong fontweight.
25
19
  * @defaultvalue false
26
20
  */
27
- strong?: boolean;
21
+ strong: boolean;
22
+ };
23
+ export declare type LabelSlots = {
24
+ root: IntrinsicShorthandProps<'label'>;
25
+ required?: IntrinsicShorthandProps<'span'>;
28
26
  };
29
- /**
30
- * Names of the shorthand properties in LabelProps
31
- */
32
- export declare type LabelShorthandProps = 'required';
33
- /**
34
- * Names of LabelProps that have a default value in useLabel
35
- */
36
- export declare type LabelDefaultedProps = 'size';
37
27
  /**
38
28
  * State used in rendering Label
39
29
  */
40
- export declare type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {
41
- /**
42
- * Ref to the root element
43
- */
44
- ref: React.Ref<HTMLElement>;
30
+ export declare type LabelState = ComponentState<LabelSlots> & LabelCommons;
31
+ export declare type LabelProps = Omit<ComponentProps<LabelSlots>, 'required'> & Partial<LabelCommons> & {
45
32
  /**
46
- * The required prop resolved to a slot object
33
+ * Displays and indicator that the label is for a required field. The required prop can be set to true to display
34
+ * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.
35
+ * @defaultvalue false
47
36
  */
48
- required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;
37
+ required?: boolean | ObjectShorthandProps<React.HTMLAttributes<HTMLElement>> | React.ReactNode;
49
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Label.types.js","sourceRoot":"../src/","sources":["components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type {\n ComponentPropsCompat,\n ComponentStateCompat,\n ObjectShorthandPropsCompat,\n ShorthandPropsCompat,\n} from '@fluentui/react-utilities';\n\n/**\n * Label Props\n */\nexport type LabelProps = ComponentPropsCompat &\n React.LabelHTMLAttributes<HTMLLabelElement> & {\n /**\n * Renders the label as disabled\n * @defaultvalue false\n */\n disabled?: boolean;\n\n /**\n * Displays and indicator that the label is for a required field. The required prop can be set to true to display\n * an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.\n * @defaultvalue false\n */\n required?: boolean | ShorthandPropsCompat<ComponentPropsCompat>;\n\n /**\n * A label supports different sizes.\n * @defaultvalue 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * A label supports semibold/strong fontweight.\n * @defaultvalue false\n */\n strong?: boolean;\n };\n\n/**\n * Names of the shorthand properties in LabelProps\n */\nexport type LabelShorthandProps = 'required';\n\n/**\n * Names of LabelProps that have a default value in useLabel\n */\nexport type LabelDefaultedProps = 'size';\n\n/**\n * State used in rendering Label\n */\nexport type LabelState = ComponentStateCompat<LabelProps, LabelShorthandProps, LabelDefaultedProps> & {\n /**\n * Ref to the root element\n */\n ref: React.Ref<HTMLElement>;\n\n /**\n * The required prop resolved to a slot object\n */\n required?: ObjectShorthandPropsCompat<ComponentPropsCompat>;\n};\n"]}
1
+ {"version":3,"file":"Label.types.js","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Label/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Label';\nexport * from './Label.types';\nexport * from './renderLabel';\nexport * from './useLabel';\nexport * from './useLabelStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { __assign } from "tslib";
2
2
  import * as React from 'react';
3
- import { getSlotsCompat } from '@fluentui/react-utilities';
3
+ import { getSlots } from '@fluentui/react-utilities';
4
4
  import { labelShorthandProps } from './useLabel';
5
5
  /**
6
6
  * Render the final JSX of Label
7
7
  */
8
8
 
9
9
  export var renderLabel = function (state) {
10
- var _a = getSlotsCompat(state, labelShorthandProps),
10
+ var _a = getSlots(state, labelShorthandProps),
11
11
  slots = _a.slots,
12
12
  slotProps = _a.slotProps;
13
13
 
14
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.children, state.required && /*#__PURE__*/React.createElement(slots.required, __assign({}, slotProps.required)));
14
+ return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.root.children, /*#__PURE__*/React.createElement(slots.required, __assign({}, slotProps.required)));
15
15
  };
16
16
  //# sourceMappingURL=renderLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Label/renderLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,mBAAT,QAAoC,YAApC;AAGA;;AAEG;;AACH,OAAO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,EAAQ,mBAAR,CAArC;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,QADT,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,QAAf,CAAf,CAFrB,CADF;AAMD,CATM","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { labelShorthandProps } from './useLabel';\nimport type { LabelState } from './Label.types';\n\n/**\n * Render the final JSX of Label\n */\nexport const renderLabel = (state: LabelState) => {\n const { slots, slotProps } = getSlotsCompat(state, labelShorthandProps);\n\n return (\n <slots.root {...slotProps.root}>\n {state.children}\n {state.required && <slots.required {...slotProps.required} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
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,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import type { LabelProps, LabelShorthandProps, LabelState } from './Label.types';
2
+ import type { LabelProps, LabelSlots, LabelState } from './Label.types';
3
3
  /**
4
4
  * Array of all shorthand properties listed in LabelShorthandProps
5
5
  * {@docCatergory Label}
6
6
  */
7
- export declare const labelShorthandProps: LabelShorthandProps[];
7
+ export declare const labelShorthandProps: Array<keyof LabelSlots>;
8
8
  /**
9
9
  * Create the state required to render Label.
10
10
  *
@@ -13,6 +13,5 @@ export declare const labelShorthandProps: LabelShorthandProps[];
13
13
  *
14
14
  * @param props - props from this instance of Label
15
15
  * @param ref - reference to root HTMLElement of Label
16
- * @param defaultProps - (optional) default prop values provided by the implementing type
17
16
  */
18
- export declare const useLabel: (props: LabelProps, ref: React.Ref<HTMLElement>, defaultProps?: LabelProps | undefined) => LabelState;
17
+ export declare const useLabel: (props: LabelProps, ref: React.Ref<HTMLElement>) => LabelState;