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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. package/CHANGELOG.json +78 -24
  2. package/CHANGELOG.md +16 -11
  3. package/dist/react-badge.d.ts +15 -15
  4. package/lib/components/Badge/Badge.d.ts +1 -1
  5. package/lib/components/Badge/Badge.js +7 -7
  6. package/lib/components/Badge/Badge.js.map +1 -1
  7. package/lib/components/Badge/Badge.types.d.ts +4 -5
  8. package/lib/components/Badge/renderBadge.d.ts +1 -1
  9. package/lib/components/Badge/renderBadge.js +3 -3
  10. package/lib/components/Badge/renderBadge.js.map +1 -1
  11. package/lib/components/Badge/useBadge.d.ts +1 -1
  12. package/lib/components/Badge/useBadge.js +1 -1
  13. package/lib/components/Badge/useBadge.js.map +1 -1
  14. package/lib/components/Badge/useBadgeStyles.d.ts +1 -1
  15. package/lib/components/Badge/useBadgeStyles.js +151 -184
  16. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  17. package/lib/components/CounterBadge/CounterBadge.d.ts +1 -1
  18. package/lib/components/CounterBadge/CounterBadge.js +7 -7
  19. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  20. package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -1
  21. package/lib/components/CounterBadge/useCounterBadge.js +3 -3
  22. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  23. package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -1
  24. package/lib/components/CounterBadge/useCounterBadgeStyles.js +4 -4
  25. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  26. package/lib/components/PresenceBadge/PresenceBadge.d.ts +1 -1
  27. package/lib/components/PresenceBadge/PresenceBadge.js +7 -7
  28. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  29. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +1 -1
  30. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -1
  31. package/lib/components/PresenceBadge/usePresenceBadge.js +3 -3
  32. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  33. package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -1
  34. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +2 -2
  35. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  36. package/lib-commonjs/components/Badge/Badge.d.ts +1 -1
  37. package/lib-commonjs/components/Badge/Badge.js +4 -4
  38. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  39. package/lib-commonjs/components/Badge/Badge.types.d.ts +4 -5
  40. package/lib-commonjs/components/Badge/renderBadge.d.ts +1 -1
  41. package/lib-commonjs/components/Badge/renderBadge.js +5 -5
  42. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  43. package/lib-commonjs/components/Badge/useBadge.d.ts +1 -1
  44. package/lib-commonjs/components/Badge/useBadge.js +3 -3
  45. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  46. package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +1 -1
  47. package/lib-commonjs/components/Badge/useBadgeStyles.js +153 -186
  48. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  49. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -1
  50. package/lib-commonjs/components/CounterBadge/CounterBadge.js +4 -4
  51. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  52. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -1
  53. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +4 -4
  54. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  55. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -1
  56. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +7 -7
  57. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  58. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +1 -1
  59. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +4 -4
  60. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  61. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +1 -1
  62. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -1
  63. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +4 -4
  64. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  65. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -1
  66. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +6 -6
  67. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  68. package/package.json +12 -14
package/CHANGELOG.json CHANGED
@@ -2,15 +2,15 @@
2
2
  "name": "@fluentui/react-badge",
3
3
  "entries": [
4
4
  {
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",
5
+ "date": "Wed, 09 Feb 2022 04:13:05 GMT",
6
+ "tag": "@fluentui/react-badge_v0.0.0-nightlyb2b3ec1da320220209.1",
7
+ "version": "0.0.0-nightlyb2b3ec1da320220209.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
11
  "author": "email not defined",
12
12
  "package": "@fluentui/react-badge",
13
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075",
13
+ "commit": "066f84c7bef7f4df47448557396199d8b7f26480",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
16
  {
@@ -19,12 +19,24 @@
19
19
  "commit": "7cb2a5d8db1b6a1ddb638aa82d5815ab5ae84e69",
20
20
  "comment": "(fix): Update react-icons dependency to latest version"
21
21
  },
22
+ {
23
+ "author": "behowell@microsoft.com",
24
+ "package": "@fluentui/react-badge",
25
+ "commit": "f5e7fa7a2129d3a4637a2ce777cecec435c256ec",
26
+ "comment": "Refactor and re-organize Badge styles; no visual changes."
27
+ },
22
28
  {
23
29
  "author": "behowell@microsoft.com",
24
30
  "package": "@fluentui/react-badge",
25
31
  "commit": "3bc0517363984081469903ee137a06543f825f1c",
26
32
  "comment": "Add fontSize styling to icon slot, to automatically size user-provided icons"
27
33
  },
34
+ {
35
+ "author": "Humberto.Morimoto@microsoft.com",
36
+ "package": "@fluentui/react-badge",
37
+ "commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
38
+ "comment": "Updating based on changes to composition types."
39
+ },
28
40
  {
29
41
  "author": "olfedias@microsoft.com",
30
42
  "package": "@fluentui/react-badge",
@@ -43,12 +55,24 @@
43
55
  "commit": "00a5d945904c896a0664de6ba72c145a255f0848",
44
56
  "comment": "Updating use of tokens.fontWeight now that we don't need to use casting."
45
57
  },
58
+ {
59
+ "author": "tristan.watanabe@gmail.com",
60
+ "package": "@fluentui/react-badge",
61
+ "commit": "13f940ea4687d769dd2faf61edc27ff75f6bb565",
62
+ "comment": "Allow React 17 in peerDependencies."
63
+ },
46
64
  {
47
65
  "author": "ololubek@microsoft.com",
48
66
  "package": "@fluentui/react-badge",
49
67
  "commit": "63cbefe55e5db10eedbde19392aa8b6376d6a7f7",
50
68
  "comment": "Update react-icons usage to resizable icons"
51
69
  },
70
+ {
71
+ "author": "behowell@microsoft.com",
72
+ "package": "@fluentui/react-badge",
73
+ "commit": "53b01d71e335715fda91b33e3d7bbd9d471d5ed3",
74
+ "comment": "Refactor component Slot typings"
75
+ },
52
76
  {
53
77
  "author": "behowell@microsoft.com",
54
78
  "package": "@fluentui/react-badge",
@@ -58,50 +82,56 @@
58
82
  {
59
83
  "author": "Humberto.Morimoto@microsoft.com",
60
84
  "package": "@fluentui/react-badge",
61
- "commit": "2c54271f07c30f65718e085084c2e5b213268dfd",
62
- "comment": "react-badge: Replacing use of functions in makeStyles with direct use of tokens."
85
+ "commit": "0bc161458eae5ae8d387172430496ce9829b1bb1",
86
+ "comment": "Using ComponentSlotProps instead of ObjectShorthandProps."
63
87
  },
64
88
  {
65
- "author": "lingfangao@hotmail.com",
89
+ "author": "olfedias@microsoft.com",
66
90
  "package": "@fluentui/react-badge",
67
- "commit": "4e7acd7ff3c437663de70206416d3c19b6a87cfa",
68
- "comment": "fix: Add uniform padding and modify gaps"
91
+ "commit": "b23239743c4f5518bcf7dcad496a36fc16bbd2e5",
92
+ "comment": "update @fluentui/react-icons package"
69
93
  },
70
94
  {
71
- "author": "beachball",
95
+ "author": "olfedias@microsoft.com",
72
96
  "package": "@fluentui/react-badge",
73
- "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
74
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
97
+ "commit": "8c75114e82b205810c9ac3692af71f6f7748225c",
98
+ "comment": "use Griffel packages"
75
99
  },
76
100
  {
77
- "author": "beachball",
101
+ "author": "Humberto.Morimoto@microsoft.com",
78
102
  "package": "@fluentui/react-badge",
79
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightlya9c3d10d9520220113.1",
80
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
103
+ "commit": "2c54271f07c30f65718e085084c2e5b213268dfd",
104
+ "comment": "react-badge: Replacing use of functions in makeStyles with direct use of tokens."
81
105
  },
82
106
  {
83
- "author": "beachball",
107
+ "author": "behowell@microsoft.com",
84
108
  "package": "@fluentui/react-badge",
85
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlya9c3d10d9520220113.1",
86
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
109
+ "commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
110
+ "comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
111
+ },
112
+ {
113
+ "author": "lingfangao@hotmail.com",
114
+ "package": "@fluentui/react-badge",
115
+ "commit": "4e7acd7ff3c437663de70206416d3c19b6a87cfa",
116
+ "comment": "fix: Add uniform padding and modify gaps"
87
117
  },
88
118
  {
89
119
  "author": "beachball",
90
120
  "package": "@fluentui/react-badge",
91
- "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
92
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
121
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightlyb2b3ec1da320220209.1",
122
+ "commit": "066f84c7bef7f4df47448557396199d8b7f26480"
93
123
  },
94
124
  {
95
125
  "author": "beachball",
96
126
  "package": "@fluentui/react-badge",
97
- "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
98
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
127
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightlyb2b3ec1da320220209.1",
128
+ "commit": "066f84c7bef7f4df47448557396199d8b7f26480"
99
129
  },
100
130
  {
101
131
  "author": "beachball",
102
132
  "package": "@fluentui/react-badge",
103
- "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightlya9c3d10d9520220113.1",
104
- "commit": "e5182b449d13b07c2da6a36ece6f79ec664c4075"
133
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightlyb2b3ec1da320220209.1",
134
+ "commit": "066f84c7bef7f4df47448557396199d8b7f26480"
105
135
  }
106
136
  ],
107
137
  "none": [
@@ -110,6 +140,30 @@
110
140
  "package": "@fluentui/react-badge",
111
141
  "commit": "d892c7f79c543b6008634ecd669b75b5108cad46",
112
142
  "comment": "Remove outdated boilerplate comments"
143
+ },
144
+ {
145
+ "author": "martinhochel@microsoft.com",
146
+ "package": "@fluentui/react-badge",
147
+ "commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
148
+ "comment": "chore: use storybook runner for all vNext packages"
149
+ },
150
+ {
151
+ "author": "olfedias@microsoft.com",
152
+ "package": "@fluentui/react-badge",
153
+ "commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
154
+ "comment": "remove inline-style-expand-shorthand from tsconfigs"
155
+ },
156
+ {
157
+ "author": "bsunderhus@microsoft.com",
158
+ "package": "@fluentui/react-badge",
159
+ "commit": "c0d4e63ee58e60e2c6674efbacc0783cd520984e",
160
+ "comment": "Updates components with nullRender changes"
161
+ },
162
+ {
163
+ "author": "tkrasniqi@microsoft.com",
164
+ "package": "@fluentui/react-badge",
165
+ "commit": "87e12a2e3a9d90b4ff95d3ed333739756d190f6c",
166
+ "comment": "Updated best practices for long text"
113
167
  }
114
168
  ]
115
169
  }
package/CHANGELOG.md CHANGED
@@ -1,32 +1,37 @@
1
1
  # Change Log - @fluentui/react-badge
2
2
 
3
- This log was last generated on Thu, 13 Jan 2022 04:15:40 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 09 Feb 2022 04:13:05 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightlya9c3d10d9520220113.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightlya9c3d10d9520220113.1)
7
+ ## [0.0.0-nightlyb2b3ec1da320220209.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v0.0.0-nightlyb2b3ec1da320220209.1)
8
8
 
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)
9
+ Wed, 09 Feb 2022 04:13:05 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.0.0-beta.4..@fluentui/react-badge_v0.0.0-nightlyb2b3ec1da320220209.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/e5182b449d13b07c2da6a36ece6f79ec664c4075) by email not defined)
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/066f84c7bef7f4df47448557396199d8b7f26480) by email not defined)
15
15
  - (fix): Update react-icons dependency to latest version ([PR #20943](https://github.com/microsoft/fluentui/pull/20943) by ololubek@microsoft.com)
16
+ - Refactor and re-organize Badge styles; no visual changes. ([PR #21271](https://github.com/microsoft/fluentui/pull/21271) by behowell@microsoft.com)
16
17
  - 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)
18
+ - Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
17
19
  - update styles to not use CSS shorthands ([PR #20802](https://github.com/microsoft/fluentui/pull/20802) by olfedias@microsoft.com)
18
20
  - fix: use updated tokens for ghost and outline variants ([PR #20893](https://github.com/microsoft/fluentui/pull/20893) by lingfangao@hotmail.com)
19
21
  - 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)
22
+ - Allow React 17 in peerDependencies. ([PR #21544](https://github.com/microsoft/fluentui/pull/21544) by tristan.watanabe@gmail.com)
20
23
  - Update react-icons usage to resizable icons ([PR #21074](https://github.com/microsoft/fluentui/pull/21074) by ololubek@microsoft.com)
24
+ - Refactor component Slot typings ([PR #21518](https://github.com/microsoft/fluentui/pull/21518) by behowell@microsoft.com)
21
25
  - Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
26
+ - Using ComponentSlotProps instead of ObjectShorthandProps. ([PR #20890](https://github.com/microsoft/fluentui/pull/20890) by Humberto.Morimoto@microsoft.com)
27
+ - update @fluentui/react-icons package ([PR #21498](https://github.com/microsoft/fluentui/pull/21498) by olfedias@microsoft.com)
28
+ - use Griffel packages ([PR #21437](https://github.com/microsoft/fluentui/pull/21437) by olfedias@microsoft.com)
22
29
  - 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)
30
+ - 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
31
  - 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)
32
+ - Bump @fluentui/react-theme to v0.0.0-nightlyb2b3ec1da320220209.1 ([commit](https://github.com/microsoft/fluentui/commit/066f84c7bef7f4df47448557396199d8b7f26480) by beachball)
33
+ - Bump @fluentui/react-utilities to v0.0.0-nightlyb2b3ec1da320220209.1 ([commit](https://github.com/microsoft/fluentui/commit/066f84c7bef7f4df47448557396199d8b7f26480) by beachball)
34
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightlyb2b3ec1da320220209.1 ([commit](https://github.com/microsoft/fluentui/commit/066f84c7bef7f4df47448557396199d8b7f26480) by beachball)
30
35
 
31
36
  ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.0.0-beta.4)
32
37
 
@@ -1,11 +1,11 @@
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 { ObjectShorthandProps } from '@fluentui/react-utilities';
5
4
  import * as React_2 from 'react';
5
+ import type { Slot } from '@fluentui/react-utilities';
6
6
 
7
7
  /**
8
- * Define a styled Badge, using the `useBadge` hook.
8
+ * Define a styled Badge, using the `useBadge_unstable` hook.
9
9
  */
10
10
  export declare const Badge: ForwardRefComponent<BadgeProps>;
11
11
 
@@ -39,17 +39,17 @@ export declare type BadgeCommons = {
39
39
  size: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
40
40
  };
41
41
 
42
- export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
42
+ export declare type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & Partial<BadgeCommons>;
43
43
 
44
44
  export declare type BadgeSlots = {
45
- root: ObjectShorthandProps<Omit<React_2.HTMLAttributes<HTMLElement>, 'color'>>;
46
- icon?: ObjectShorthandProps<React_2.HTMLAttributes<HTMLElement>>;
45
+ root: Slot<'div'>;
46
+ icon?: Slot<'span'>;
47
47
  };
48
48
 
49
49
  export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
50
50
 
51
51
  /**
52
- * Define a styled CounterBadge, using the `useCounterBadge` hook.
52
+ * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
53
53
  */
54
54
  export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
55
55
 
@@ -98,7 +98,7 @@ export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'
98
98
  export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
99
99
 
100
100
  /**
101
- * Define a styled Badge, using the `useBadge` hook.
101
+ * Define a styled Badge, using the `useBadge_unstable` hook.
102
102
  */
103
103
  export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
104
104
 
@@ -118,42 +118,42 @@ export declare type PresenceBadgeCommons = {
118
118
  outOfOffice: boolean;
119
119
  } & BadgeCommons;
120
120
 
121
- export declare type PresenceBadgeProps = ComponentProps<Partial<Pick<BadgeSlots, 'root'>>> & Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;
121
+ export declare type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root'>>, 'color'> & Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;
122
122
 
123
123
  export declare type PresenceBadgeState = PresenceBadgeCommons & ComponentState<BadgeSlots>;
124
124
 
125
125
  export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
126
126
 
127
- export declare const renderBadge: (state: BadgeState) => JSX.Element;
127
+ export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
128
128
 
129
129
  /**
130
130
  * Returns the props and state required to render the component
131
131
  */
132
- export declare const useBadge: (props: BadgeProps, ref: React_2.Ref<HTMLElement>) => BadgeState;
132
+ export declare const useBadge_unstable: (props: BadgeProps, ref: React_2.Ref<HTMLElement>) => BadgeState;
133
133
 
134
134
  /**
135
135
  * Applies style classnames to slots
136
136
  */
137
- export declare const useBadgeStyles: (state: BadgeState) => BadgeState;
137
+ export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;
138
138
 
139
139
  /**
140
140
  * Returns the props and state required to render the component
141
141
  */
142
- export declare const useCounterBadge: (props: CounterBadgeProps, ref: React_2.Ref<HTMLElement>) => CounterBadgeState;
142
+ export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React_2.Ref<HTMLElement>) => CounterBadgeState;
143
143
 
144
144
  /**
145
145
  * Applies style classnames to slots
146
146
  */
147
- export declare const useCounterBadgeStyles: (state: CounterBadgeState) => CounterBadgeState;
147
+ export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
148
148
 
149
149
  /**
150
150
  * Returns the props and state required to render the component
151
151
  */
152
- export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React_2.Ref<HTMLElement>) => PresenceBadgeState;
152
+ export declare const usePresenceBadge_unstable: (props: PresenceBadgeProps, ref: React_2.Ref<HTMLElement>) => PresenceBadgeState;
153
153
 
154
154
  /**
155
155
  * Applies style classnames to slots
156
156
  */
157
- export declare const usePresenceBadgeStyles: (state: PresenceBadgeState) => PresenceBadgeState;
157
+ export declare const usePresenceBadgeStyles_unstable: (state: PresenceBadgeState) => PresenceBadgeState;
158
158
 
159
159
  export { }
@@ -1,6 +1,6 @@
1
1
  import type { BadgeProps } from './Badge.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled Badge, using the `useBadge` hook.
4
+ * Define a styled Badge, using the `useBadge_unstable` hook.
5
5
  */
6
6
  export declare const Badge: ForwardRefComponent<BadgeProps>;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useBadge } from './useBadge';
3
- import { useBadgeStyles } from './useBadgeStyles';
4
- import { renderBadge } from './renderBadge';
2
+ import { useBadge_unstable } from './useBadge';
3
+ import { useBadgeStyles_unstable } from './useBadgeStyles';
4
+ import { renderBadge_unstable } from './renderBadge';
5
5
  /**
6
- * Define a styled Badge, using the `useBadge` hook.
6
+ * Define a styled Badge, using the `useBadge_unstable` hook.
7
7
  */
8
8
 
9
9
  export const Badge = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useBadge(props, ref);
11
- useBadgeStyles(state);
12
- return renderBadge(state);
10
+ const state = useBadge_unstable(props, ref);
11
+ useBadgeStyles_unstable(state);
12
+ return renderBadge_unstable(state);
13
13
  });
14
14
  Badge.displayName = 'Badge';
15
15
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,YAAzB;AACA,SAAS,cAAT,QAA+B,kBAA/B;AACA,SAAS,WAAT,QAA4B,eAA5B;AAIA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,QAAQ,CAAC,KAAD,EAAQ,GAAR,CAAtB;AACA,EAAA,cAAc,CAAC,KAAD,CAAd;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,oBAAT,QAAqC,eAArC;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;AACA,EAAA,uBAAuB,CAAC,KAAD,CAAvB;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,8 +1,7 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
2
  export declare type BadgeSlots = {
4
- root: ObjectShorthandProps<Omit<React.HTMLAttributes<HTMLElement>, 'color'>>;
5
- icon?: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
3
+ root: Slot<'div'>;
4
+ icon?: Slot<'span'>;
6
5
  };
7
6
  export declare type BadgeCommons = {
8
7
  /**
@@ -31,5 +30,5 @@ export declare type BadgeCommons = {
31
30
  */
32
31
  size: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
33
32
  };
34
- export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
33
+ export declare type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & Partial<BadgeCommons>;
35
34
  export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
@@ -1,2 +1,2 @@
1
1
  import type { BadgeState } from './Badge.types';
2
- export declare const renderBadge: (state: BadgeState) => JSX.Element;
2
+ export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
- export const renderBadge = state => {
3
+ export const renderBadge_unstable = state => {
4
4
  const {
5
5
  slots,
6
6
  slotProps
7
7
  } = getSlots(state);
8
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
9
+ }, state.iconPosition === 'before' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
10
+ }), state.root.children, state.iconPosition === 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
11
11
  }));
12
12
  };
13
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,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":""}
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,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,YAAN,KAAuB,QAAvB,IAAmC,KAAK,CAAC,IAAzC,iBAAiD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADpD,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,IAAkC,KAAK,CAAC,IAAxC,iBAAgD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAHnD,CADF;AAOD,CAVM","sourceRoot":""}
@@ -3,4 +3,4 @@ import type { BadgeProps, BadgeState } from './Badge.types';
3
3
  /**
4
4
  * Returns the props and state required to render the component
5
5
  */
6
- export declare const useBadge: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
6
+ export declare const useBadge_unstable: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
@@ -3,7 +3,7 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
3
3
  * Returns the props and state required to render the component
4
4
  */
5
5
 
6
- export const useBadge = (props, ref) => {
6
+ export const useBadge_unstable = (props, ref) => {
7
7
  const {
8
8
  shape = 'circular',
9
9
  size = 'medium',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,QAAQ,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;AACrF,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,IAAI,GAAG,QAFH;AAGJ,IAAA,YAAY,GAAG,QAHX;AAIJ,IAAA,UAAU,GAAG,QAJT;AAKJ,IAAA,KAAK,GAAG;AALJ,MAMF,KANJ;AAQA,QAAM,KAAK,GAAe;AACxB,IAAA,KADwB;AAExB,IAAA,IAFwB;AAGxB,IAAA,YAHwB;AAIxB,IAAA,UAJwB;AAKxB,IAAA,KALwB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KANY;AAUxB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,qBAAe,IAFkB;AAGjC,SAAG;AAH8B,KAAR,CAVH;AAexB,IAAA,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP;AAfE,GAA1B;AAkBA,SAAO,KAAP;AACD,CA5BM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;AAEG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;AAC9F,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,IAAI,GAAG,QAFH;AAGJ,IAAA,YAAY,GAAG,QAHX;AAIJ,IAAA,UAAU,GAAG,QAJT;AAKJ,IAAA,KAAK,GAAG;AALJ,MAMF,KANJ;AAQA,QAAM,KAAK,GAAe;AACxB,IAAA,KADwB;AAExB,IAAA,IAFwB;AAGxB,IAAA,YAHwB;AAIxB,IAAA,UAJwB;AAKxB,IAAA,KALwB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KANY;AAUxB,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,qBAAe,IAFkB;AAGjC,SAAG;AAH8B,KAAR,CAVH;AAexB,IAAA,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP;AAfE,GAA1B;AAkBA,SAAO,KAAP;AACD,CA5BM","sourceRoot":""}
@@ -3,4 +3,4 @@ export declare const badgeClassName = "fui-Badge";
3
3
  /**
4
4
  * Applies style classnames to slots
5
5
  */
6
- export declare const useBadgeStyles: (state: BadgeState) => BadgeState;
6
+ export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;