@fluentui/react-badge 0.0.0-nightly9edaf68d4420211116.1 → 0.0.0-nightlya9c3d10d9520220113.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/CHANGELOG.json +155 -16
  2. package/CHANGELOG.md +38 -11
  3. package/dist/react-badge.d.ts +12 -13
  4. package/lib/components/Badge/Badge.types.d.ts +1 -1
  5. package/lib/components/Badge/renderBadge.js +5 -2
  6. package/lib/components/Badge/renderBadge.js.map +1 -1
  7. package/lib/components/Badge/useBadgeStyles.js +93 -54
  8. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  9. package/lib/components/CounterBadge/CounterBadge.types.d.ts +7 -8
  10. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  11. package/lib/components/CounterBadge/useCounterBadgeStyles.js +4 -35
  12. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  13. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
  14. package/lib/components/PresenceBadge/presenceIcons.d.ts +11 -0
  15. package/lib/components/PresenceBadge/presenceIcons.js +128 -0
  16. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -0
  17. package/lib/components/PresenceBadge/usePresenceBadge.js +29 -15
  18. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  19. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +39 -43
  20. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  21. package/lib-commonjs/components/Badge/Badge.types.d.ts +1 -1
  22. package/lib-commonjs/components/Badge/renderBadge.js +5 -2
  23. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  24. package/lib-commonjs/components/Badge/useBadgeStyles.js +93 -53
  25. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  26. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +7 -8
  27. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  28. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +3 -34
  29. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  30. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
  31. package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +11 -0
  32. package/lib-commonjs/components/PresenceBadge/presenceIcons.js +136 -0
  33. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -0
  34. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +28 -14
  35. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  36. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +38 -42
  37. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  38. package/package.json +11 -9
  39. package/lib/common/isConformant.d.ts +0 -4
  40. package/lib/common/isConformant.js +0 -13
  41. package/lib/common/isConformant.js.map +0 -1
  42. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  43. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -98
  44. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
  45. package/lib-commonjs/common/isConformant.d.ts +0 -4
  46. package/lib-commonjs/common/isConformant.js +0 -24
  47. package/lib-commonjs/common/isConformant.js.map +0 -1
  48. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  49. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -113
  50. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,52 +2,191 @@
2
2
  "name": "@fluentui/react-badge",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 16 Nov 2021 04:18:26 GMT",
6
- "tag": "@fluentui/react-badge_v0.0.0-nightly9edaf68d4420211116.1",
7
- "version": "0.0.0-nightly9edaf68d4420211116.1",
5
+ "date": "Thu, 13 Jan 2022 04:15:40 GMT",
6
+ "tag": "@fluentui/react-badge_v0.0.0-nightlya9c3d10d9520220113.1",
7
+ "version": "0.0.0-nightlya9c3d10d9520220113.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
11
  "author": "email not defined",
12
12
  "package": "@fluentui/react-badge",
13
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb",
13
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
+ {
17
+ "author": "ololubek@microsoft.com",
18
+ "package": "@fluentui/react-badge",
19
+ "commit": "7cb2a5d8db1b6a1ddb638aa82d5815ab5ae84e69",
20
+ "comment": "(fix): Update react-icons dependency to latest version"
21
+ },
22
+ {
23
+ "author": "behowell@microsoft.com",
24
+ "package": "@fluentui/react-badge",
25
+ "commit": "3bc0517363984081469903ee137a06543f825f1c",
26
+ "comment": "Add fontSize styling to icon slot, to automatically size user-provided icons"
27
+ },
28
+ {
29
+ "author": "olfedias@microsoft.com",
30
+ "package": "@fluentui/react-badge",
31
+ "commit": "5a49512b8e33d5a588212069a1f2827b806d584c",
32
+ "comment": "update styles to not use CSS shorthands"
33
+ },
34
+ {
35
+ "author": "lingfangao@hotmail.com",
36
+ "package": "@fluentui/react-badge",
37
+ "commit": "4e5e955acede0fc79334ef90a563de4bd35ee231",
38
+ "comment": "fix: use updated tokens for ghost and outline variants"
39
+ },
40
+ {
41
+ "author": "Humberto.Morimoto@microsoft.com",
42
+ "package": "@fluentui/react-badge",
43
+ "commit": "00a5d945904c896a0664de6ba72c145a255f0848",
44
+ "comment": "Updating use of tokens.fontWeight now that we don't need to use casting."
45
+ },
46
+ {
47
+ "author": "ololubek@microsoft.com",
48
+ "package": "@fluentui/react-badge",
49
+ "commit": "63cbefe55e5db10eedbde19392aa8b6376d6a7f7",
50
+ "comment": "Update react-icons usage to resizable icons"
51
+ },
52
+ {
53
+ "author": "behowell@microsoft.com",
54
+ "package": "@fluentui/react-badge",
55
+ "commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
56
+ "comment": "Remove component's shorthandProps array"
57
+ },
58
+ {
59
+ "author": "Humberto.Morimoto@microsoft.com",
60
+ "package": "@fluentui/react-badge",
61
+ "commit": "2c54271f07c30f65718e085084c2e5b213268dfd",
62
+ "comment": "react-badge: Replacing use of functions in makeStyles with direct use of tokens."
63
+ },
64
+ {
65
+ "author": "lingfangao@hotmail.com",
66
+ "package": "@fluentui/react-badge",
67
+ "commit": "4e7acd7ff3c437663de70206416d3c19b6a87cfa",
68
+ "comment": "fix: Add uniform padding and modify gaps"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui/react-badge",
73
+ "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
74
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@fluentui/react-badge",
79
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightlya9c3d10d9520220113.1",
80
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui/react-badge",
85
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlya9c3d10d9520220113.1",
86
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@fluentui/react-badge",
91
+ "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
92
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@fluentui/react-badge",
97
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
98
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
99
+ },
100
+ {
101
+ "author": "beachball",
102
+ "package": "@fluentui/react-badge",
103
+ "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
104
+ "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
105
+ }
106
+ ],
107
+ "none": [
108
+ {
109
+ "author": "elcraig@microsoft.com",
110
+ "package": "@fluentui/react-badge",
111
+ "commit": "d892c7f79c543b6008634ecd669b75b5108cad46",
112
+ "comment": "Remove outdated boilerplate comments"
113
+ }
114
+ ]
115
+ }
116
+ },
117
+ {
118
+ "date": "Thu, 25 Nov 2021 08:34:11 GMT",
119
+ "tag": "@fluentui/react-badge_v9.0.0-beta.4",
120
+ "version": "9.0.0-beta.4",
121
+ "comments": {
122
+ "none": [
123
+ {
124
+ "author": "lingfangao@hotmail.com",
125
+ "package": "@fluentui/react-badge",
126
+ "commit": "cc3fe8e29cbb4b9d03f26e9a06b58d7aa24ffb65",
127
+ "comment": "Migrate package to use solution style ts-config"
128
+ }
129
+ ],
130
+ "prerelease": [
131
+ {
132
+ "author": "lingfangao@hotmail.com",
133
+ "package": "@fluentui/react-badge",
134
+ "commit": "6183f8ae46233d7ecec2a3d12e7348b7b41eea0c",
135
+ "comment": "various styling fixes for base Badge component"
136
+ },
137
+ {
138
+ "author": "lingfangao@hotmail.com",
139
+ "package": "@fluentui/react-badge",
140
+ "commit": "c5c66cb39e6906f506bf30c9e56c0839f10e2d51",
141
+ "comment": "Reduce colour set and align with base badge colours"
142
+ },
143
+ {
144
+ "author": "ololubek@microsoft.com",
145
+ "package": "@fluentui/react-badge",
146
+ "commit": "ecab13cfd6ac22657020db8f86eb89f952b0f953",
147
+ "comment": "update react-icons dependency"
148
+ },
149
+ {
150
+ "author": "lingfangao@hotmail.com",
151
+ "package": "@fluentui/react-badge",
152
+ "commit": "48e52fc91e41ab721c9842f8f68ac84ad569a851",
153
+ "comment": "Remove props and return correct presence icons"
154
+ },
16
155
  {
17
156
  "author": "beachball",
18
157
  "package": "@fluentui/react-badge",
19
- "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly9edaf68d4420211116.1",
20
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb"
158
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
159
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
21
160
  },
22
161
  {
23
162
  "author": "beachball",
24
163
  "package": "@fluentui/react-badge",
25
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly9edaf68d4420211116.1",
26
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb"
164
+ "comment": "Bump @fluentui/react-theme to v9.0.0-beta.4",
165
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
27
166
  },
28
167
  {
29
168
  "author": "beachball",
30
169
  "package": "@fluentui/react-badge",
31
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly9edaf68d4420211116.1",
32
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb"
170
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
171
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
33
172
  },
34
173
  {
35
174
  "author": "beachball",
36
175
  "package": "@fluentui/react-badge",
37
- "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly9edaf68d4420211116.1",
38
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb"
176
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
177
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
39
178
  },
40
179
  {
41
180
  "author": "beachball",
42
181
  "package": "@fluentui/react-badge",
43
- "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly9edaf68d4420211116.1",
44
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb"
182
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
183
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
45
184
  },
46
185
  {
47
186
  "author": "beachball",
48
187
  "package": "@fluentui/react-badge",
49
- "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly9edaf68d4420211116.1",
50
- "commit": "5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb"
188
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4",
189
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
51
190
  }
52
191
  ]
53
192
  }
package/CHANGELOG.md CHANGED
@@ -1,23 +1,50 @@
1
1
  # Change Log - @fluentui/react-badge
2
2
 
3
- This log was last generated on Tue, 16 Nov 2021 04:18:26 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 13 Jan 2022 04:15:40 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly9edaf68d4420211116.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightly9edaf68d4420211116.1)
7
+ ## [0.0.0-nightlya9c3d10d9520220113.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightlya9c3d10d9520220113.1)
8
8
 
9
- Tue, 16 Nov 2021 04:18:26 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.3..@fluentui/react-badge_v0.0.0-nightly9edaf68d4420211116.1)
9
+ Thu, 13 Jan 2022 04:15:40 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.4..@fluentui/react-badge_v0.0.0-nightlya9c3d10d9520220113.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by email not defined)
15
- - Bump @fluentui/react-make-styles to v0.0.0-nightly9edaf68d4420211116.1 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by beachball)
16
- - Bump @fluentui/react-theme to v0.0.0-nightly9edaf68d4420211116.1 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by beachball)
17
- - Bump @fluentui/react-utilities to v0.0.0-nightly9edaf68d4420211116.1 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by beachball)
18
- - Bump @fluentui/babel-make-styles to v0.0.0-nightly9edaf68d4420211116.1 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by beachball)
19
- - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly9edaf68d4420211116.1 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by beachball)
20
- - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly9edaf68d4420211116.1 ([commit](https://github.com/microsoft/fluentui/commit/5833e6990fdc70fd5e4b99c4780af6bb12e8fdbb) by beachball)
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by email not defined)
15
+ - (fix): Update react-icons dependency to latest version ([PR #20943](https://github.com/microsoft/fluentui/pull/20943) by ololubek@microsoft.com)
16
+ - Add fontSize styling to icon slot, to automatically size user-provided icons ([PR #21219](https://github.com/microsoft/fluentui/pull/21219) by behowell@microsoft.com)
17
+ - update styles to not use CSS shorthands ([PR #20802](https://github.com/microsoft/fluentui/pull/20802) by olfedias@microsoft.com)
18
+ - fix: use updated tokens for ghost and outline variants ([PR #20893](https://github.com/microsoft/fluentui/pull/20893) by lingfangao@hotmail.com)
19
+ - 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)
20
+ - Update react-icons usage to resizable icons ([PR #21074](https://github.com/microsoft/fluentui/pull/21074) by ololubek@microsoft.com)
21
+ - Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
22
+ - react-badge: Replacing use of functions in makeStyles with direct use of tokens. ([PR #21038](https://github.com/microsoft/fluentui/pull/21038) by Humberto.Morimoto@microsoft.com)
23
+ - fix: Add uniform padding and modify gaps ([PR #20974](https://github.com/microsoft/fluentui/pull/20974) by lingfangao@hotmail.com)
24
+ - Bump @fluentui/react-make-styles to v0.0.0-nightlya9c3d10d9520220113.1 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by beachball)
25
+ - Bump @fluentui/react-theme to v0.0.0-nightlya9c3d10d9520220113.1 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by beachball)
26
+ - Bump @fluentui/react-utilities to v0.0.0-nightlya9c3d10d9520220113.1 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by beachball)
27
+ - Bump @fluentui/babel-make-styles to v0.0.0-nightlya9c3d10d9520220113.1 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by beachball)
28
+ - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlya9c3d10d9520220113.1 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by beachball)
29
+ - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlya9c3d10d9520220113.1 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by beachball)
30
+
31
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.4)
32
+
33
+ Thu, 25 Nov 2021 08:34:11 GMT
34
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.3..@fluentui/react-badge_v9.0.0-beta.4)
35
+
36
+ ### Changes
37
+
38
+ - various styling fixes for base Badge component ([PR #20693](https://github.com/microsoft/fluentui/pull/20693) by lingfangao@hotmail.com)
39
+ - Reduce colour set and align with base badge colours ([PR #20596](https://github.com/microsoft/fluentui/pull/20596) by lingfangao@hotmail.com)
40
+ - update react-icons dependency ([PR #20563](https://github.com/microsoft/fluentui/pull/20563) by ololubek@microsoft.com)
41
+ - Remove props and return correct presence icons ([PR #20630](https://github.com/microsoft/fluentui/pull/20630) by lingfangao@hotmail.com)
42
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
43
+ - Bump @fluentui/react-theme to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
44
+ - Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
45
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
46
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
47
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
21
48
 
22
49
  ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.3)
23
50
 
@@ -42,7 +42,7 @@ export declare type BadgeCommons = {
42
42
  export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
43
43
 
44
44
  export declare type BadgeSlots = {
45
- root: ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>;
45
+ root: ObjectShorthandProps<Omit<React_2.HTMLAttributes<HTMLElement>, 'color'>>;
46
46
  icon?: ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>;
47
47
  };
48
48
 
@@ -86,17 +86,16 @@ export declare type CounterBadgeCommons = {
86
86
  * @default filled
87
87
  */
88
88
  appearance: 'filled' | 'ghost';
89
+ /**
90
+ * Semantic colors for a counter badge
91
+ * @default brand
92
+ */
93
+ color: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
89
94
  };
90
95
 
91
- /**
92
- * {@docCategory CounterBadge}
93
- */
94
- export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
96
+ export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;
95
97
 
96
- /**
97
- * {@docCategory CounterBadge}
98
- */
99
- export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
98
+ export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
100
99
 
101
100
  /**
102
101
  * Define a styled Badge, using the `useBadge` hook.
@@ -105,7 +104,7 @@ export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
105
104
 
106
105
  export declare const presenceBadgeClassName = "fui-PresenceBadge";
107
106
 
108
- export declare interface PresenceBadgeCommons {
107
+ export declare type PresenceBadgeCommons = {
109
108
  /**
110
109
  * Represents several status
111
110
  * @default available
@@ -117,11 +116,11 @@ export declare interface PresenceBadgeCommons {
117
116
  * @default false
118
117
  */
119
118
  outOfOffice: boolean;
120
- }
119
+ } & BadgeCommons;
121
120
 
122
- export declare type PresenceBadgeProps = BadgeProps & Partial<PresenceBadgeCommons>;
121
+ export declare type PresenceBadgeProps = ComponentProps<Partial<Pick<BadgeSlots, 'root'>>> & Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;
123
122
 
124
- export declare type PresenceBadgeState = BadgeState & PresenceBadgeCommons;
123
+ export declare type PresenceBadgeState = PresenceBadgeCommons & ComponentState<BadgeSlots>;
125
124
 
126
125
  export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
127
126
 
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
3
3
  export declare type BadgeSlots = {
4
- root: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
4
+ root: ObjectShorthandProps<Omit<React.HTMLAttributes<HTMLElement>, 'color'>>;
5
5
  icon?: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
6
6
  };
7
7
  export declare type BadgeCommons = {
@@ -4,7 +4,10 @@ export const renderBadge = state => {
4
4
  const {
5
5
  slots,
6
6
  slotProps
7
- } = getSlots(state, ['icon', 'root']);
8
- return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), state.iconPosition === 'before' && /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)), state.root.children, state.iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)));
7
+ } = getSlots(state);
8
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
9
+ }, state.iconPosition === 'before' && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
10
+ }), state.root.children, state.iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
11
+ }));
9
12
  };
10
13
  //# sourceMappingURL=renderBadge.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAa,KAAb,EAAoB,CAAC,MAAD,EAAS,MAAT,CAApB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,iBAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADtC,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,iBAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAHrC,CADF;AAOD,CAVM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,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,YAAN,KAAuB,QAAvB,iBAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADtC,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,iBAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAHrC,CADF;AAOD,CAVM","sourceRoot":""}