@fluentui/react-badge 0.0.0-nightly-20220302-0405.1
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.
- package/CHANGELOG.json +2968 -0
- package/CHANGELOG.md +1083 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/Spec.md +157 -0
- package/dist/react-badge.d.ts +159 -0
- package/lib/Badge.d.ts +1 -0
- package/lib/Badge.js +2 -0
- package/lib/Badge.js.map +1 -0
- package/lib/CounterBadge.d.ts +1 -0
- package/lib/CounterBadge.js +2 -0
- package/lib/CounterBadge.js.map +1 -0
- package/lib/PresenceBadge.d.ts +1 -0
- package/lib/PresenceBadge.js +2 -0
- package/lib/PresenceBadge.js.map +1 -0
- package/lib/components/Badge/Badge.d.ts +6 -0
- package/lib/components/Badge/Badge.js +15 -0
- package/lib/components/Badge/Badge.js.map +1 -0
- package/lib/components/Badge/Badge.types.d.ts +34 -0
- package/lib/components/Badge/Badge.types.js +2 -0
- package/lib/components/Badge/Badge.types.js.map +1 -0
- package/lib/components/Badge/index.d.ts +5 -0
- package/lib/components/Badge/index.js +5 -0
- package/lib/components/Badge/index.js.map +1 -0
- package/lib/components/Badge/renderBadge.d.ts +2 -0
- package/lib/components/Badge/renderBadge.js +13 -0
- package/lib/components/Badge/renderBadge.js.map +1 -0
- package/lib/components/Badge/useBadge.d.ts +6 -0
- package/lib/components/Badge/useBadge.js +33 -0
- package/lib/components/Badge/useBadge.js.map +1 -0
- package/lib/components/Badge/useBadgeStyles.d.ts +6 -0
- package/lib/components/Badge/useBadgeStyles.js +331 -0
- package/lib/components/Badge/useBadgeStyles.js.map +1 -0
- package/lib/components/CounterBadge/CounterBadge.d.ts +6 -0
- package/lib/components/CounterBadge/CounterBadge.js +15 -0
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -0
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +41 -0
- package/lib/components/CounterBadge/CounterBadge.types.js +2 -0
- package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -0
- package/lib/components/CounterBadge/index.d.ts +4 -0
- package/lib/components/CounterBadge/index.js +5 -0
- package/lib/components/CounterBadge/index.js.map +1 -0
- package/lib/components/CounterBadge/useCounterBadge.d.ts +6 -0
- package/lib/components/CounterBadge/useCounterBadge.js +30 -0
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -0
- package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +6 -0
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +31 -0
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -0
- package/lib/components/PresenceBadge/PresenceBadge.d.ts +6 -0
- package/lib/components/PresenceBadge/PresenceBadge.js +15 -0
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -0
- package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +19 -0
- package/lib/components/PresenceBadge/PresenceBadge.types.js +2 -0
- package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -0
- package/lib/components/PresenceBadge/index.d.ts +4 -0
- package/lib/components/PresenceBadge/index.js +5 -0
- package/lib/components/PresenceBadge/index.js.map +1 -0
- package/lib/components/PresenceBadge/presenceIcons.d.ts +11 -0
- package/lib/components/PresenceBadge/presenceIcons.js +128 -0
- package/lib/components/PresenceBadge/presenceIcons.js.map +1 -0
- package/lib/components/PresenceBadge/usePresenceBadge.d.ts +6 -0
- package/lib/components/PresenceBadge/usePresenceBadge.js +53 -0
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -0
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +6 -0
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +80 -0
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/lib-commonjs/Badge.d.ts +1 -0
- package/lib-commonjs/Badge.js +10 -0
- package/lib-commonjs/Badge.js.map +1 -0
- package/lib-commonjs/CounterBadge.d.ts +1 -0
- package/lib-commonjs/CounterBadge.js +10 -0
- package/lib-commonjs/CounterBadge.js.map +1 -0
- package/lib-commonjs/PresenceBadge.d.ts +1 -0
- package/lib-commonjs/PresenceBadge.js +10 -0
- package/lib-commonjs/PresenceBadge.js.map +1 -0
- package/lib-commonjs/components/Badge/Badge.d.ts +6 -0
- package/lib-commonjs/components/Badge/Badge.js +26 -0
- package/lib-commonjs/components/Badge/Badge.js.map +1 -0
- package/lib-commonjs/components/Badge/Badge.types.d.ts +34 -0
- package/lib-commonjs/components/Badge/Badge.types.js +6 -0
- package/lib-commonjs/components/Badge/Badge.types.js.map +1 -0
- package/lib-commonjs/components/Badge/index.d.ts +5 -0
- package/lib-commonjs/components/Badge/index.js +16 -0
- package/lib-commonjs/components/Badge/index.js.map +1 -0
- package/lib-commonjs/components/Badge/renderBadge.d.ts +2 -0
- package/lib-commonjs/components/Badge/renderBadge.js +24 -0
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -0
- package/lib-commonjs/components/Badge/useBadge.d.ts +6 -0
- package/lib-commonjs/components/Badge/useBadge.js +43 -0
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -0
- package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +6 -0
- package/lib-commonjs/components/Badge/useBadgeStyles.js +342 -0
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -0
- package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +6 -0
- package/lib-commonjs/components/CounterBadge/CounterBadge.js +26 -0
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -0
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +41 -0
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js +6 -0
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -0
- package/lib-commonjs/components/CounterBadge/index.d.ts +4 -0
- package/lib-commonjs/components/CounterBadge/index.js +16 -0
- package/lib-commonjs/components/CounterBadge/index.js.map +1 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +6 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +40 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +6 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +42 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +6 -0
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +26 -0
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +19 -0
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js +6 -0
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/index.d.ts +4 -0
- package/lib-commonjs/components/PresenceBadge/index.js +16 -0
- package/lib-commonjs/components/PresenceBadge/index.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +11 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js +136 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +6 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +65 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +6 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +91 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -0
- package/lib-commonjs/index.d.ts +5 -0
- package/lib-commonjs/index.js +18 -0
- package/lib-commonjs/index.js.map +1 -0
- package/package.json +64 -0
@@ -0,0 +1,331 @@
|
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
|
+
export const badgeClassName = 'fui-Badge';
|
4
|
+
|
5
|
+
const useRootStyles = /*#__PURE__*/__styles({
|
6
|
+
"base": {
|
7
|
+
"mc9l5x": "ftuwxu6",
|
8
|
+
"B7ck84d": "f1ewtqcl",
|
9
|
+
"Bt984gj": "f122n59",
|
10
|
+
"Brf1p80": "f4d9j23",
|
11
|
+
"Bhrd7zp": "fl43uef",
|
12
|
+
"B4j52fo": "f192inf7",
|
13
|
+
"Bekrc4i": ["f5tn483", "f1ojsxk5"],
|
14
|
+
"Bn0qgzm": "f1vxd6vx",
|
15
|
+
"ibv6hh": ["f1ojsxk5", "f5tn483"],
|
16
|
+
"icvyot": "fzkkow9",
|
17
|
+
"vrafjx": ["fcdblym", "fjik90z"],
|
18
|
+
"oivjwe": "fg706s2",
|
19
|
+
"wvpqe5": ["fjik90z", "fcdblym"],
|
20
|
+
"Bahqtrf": "fk6fouc",
|
21
|
+
"qhf8xq": "f10pi13n"
|
22
|
+
},
|
23
|
+
"tiny": {
|
24
|
+
"a9b677": "f16dn6v3",
|
25
|
+
"Bqenvij": "f3mu39s",
|
26
|
+
"Be2twd7": "f130uwy9"
|
27
|
+
},
|
28
|
+
"extra-small": {
|
29
|
+
"a9b677": "fpd43o0",
|
30
|
+
"Bqenvij": "f30q22z",
|
31
|
+
"Be2twd7": "f1tccstq"
|
32
|
+
},
|
33
|
+
"small": {
|
34
|
+
"Bf4jedk": "fq2vo04",
|
35
|
+
"Bqenvij": "fd461yt",
|
36
|
+
"z8tnut": "fq1loh5",
|
37
|
+
"z189sj": ["f12huiiw", "f161knb0"],
|
38
|
+
"Byoj8tv": "futqtb8",
|
39
|
+
"uwmqm3": ["f161knb0", "f12huiiw"],
|
40
|
+
"i8kkvl": "f1q8lukm",
|
41
|
+
"Belr9w4": "f1ma2n7n",
|
42
|
+
"Be2twd7": "f1n0apg3"
|
43
|
+
},
|
44
|
+
"medium": {
|
45
|
+
"Bqenvij": "fjamq6b",
|
46
|
+
"Bf4jedk": "f11u7vat",
|
47
|
+
"i8kkvl": "f1q8lukm",
|
48
|
+
"Belr9w4": "f1ma2n7n",
|
49
|
+
"z8tnut": "f10ra9hq",
|
50
|
+
"z189sj": ["f8wuabp", "fycuoez"],
|
51
|
+
"Byoj8tv": "f1y2xyjm",
|
52
|
+
"uwmqm3": ["fycuoez", "f8wuabp"],
|
53
|
+
"Be2twd7": "fnmn6fi"
|
54
|
+
},
|
55
|
+
"large": {
|
56
|
+
"Bf4jedk": "f17fgpbq",
|
57
|
+
"Bqenvij": "frvgh55",
|
58
|
+
"z8tnut": "f10ra9hq",
|
59
|
+
"z189sj": ["f8wuabp", "fycuoez"],
|
60
|
+
"Byoj8tv": "f1y2xyjm",
|
61
|
+
"uwmqm3": ["fycuoez", "f8wuabp"],
|
62
|
+
"Be2twd7": "f1ugzwwg",
|
63
|
+
"i8kkvl": "f1q8lukm",
|
64
|
+
"Belr9w4": "f1ma2n7n"
|
65
|
+
},
|
66
|
+
"extra-large": {
|
67
|
+
"Bf4jedk": "fwbmr0d",
|
68
|
+
"Bqenvij": "f1d2rq10",
|
69
|
+
"z8tnut": "f1xp5gbu",
|
70
|
+
"z189sj": ["f1sgzk6v", "f1bg5zqg"],
|
71
|
+
"Byoj8tv": "f1d7kygh",
|
72
|
+
"uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
|
73
|
+
"i8kkvl": "fgfbwa2",
|
74
|
+
"Belr9w4": "f1y3hx6l",
|
75
|
+
"Be2twd7": "f1ugzwwg",
|
76
|
+
"B4j52fo": "f18zi460",
|
77
|
+
"Bekrc4i": ["f1wpluaz", "fsfsuhs"],
|
78
|
+
"Bn0qgzm": "fmklw6v",
|
79
|
+
"ibv6hh": ["fsfsuhs", "f1wpluaz"]
|
80
|
+
},
|
81
|
+
"square": {},
|
82
|
+
"rounded": {
|
83
|
+
"Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
|
84
|
+
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
85
|
+
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
86
|
+
"Btl43ni": ["fyu767a", "f1jar5jt"]
|
87
|
+
},
|
88
|
+
"roundedSmallToTiny": {
|
89
|
+
"Bbmb7ep": ["f1g3puop", "fi2rrw2"],
|
90
|
+
"Beyfa6y": ["fi2rrw2", "f1g3puop"],
|
91
|
+
"B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
|
92
|
+
"Btl43ni": ["f1s4nn1u", "f1rstyi9"]
|
93
|
+
},
|
94
|
+
"circular": {
|
95
|
+
"Bbmb7ep": ["fxyqdnz", "fib3qew"],
|
96
|
+
"Beyfa6y": ["fib3qew", "fxyqdnz"],
|
97
|
+
"B7oj6ja": ["f14p2bvz", "fdqj3q4"],
|
98
|
+
"Btl43ni": ["fdqj3q4", "f14p2bvz"]
|
99
|
+
},
|
100
|
+
"filled": {
|
101
|
+
"g2u3we": "fghlq4f",
|
102
|
+
"h3c5rm": ["f1gn591s", "fjscplz"],
|
103
|
+
"B9xav0g": "fb073pr",
|
104
|
+
"zhjwy3": ["fjscplz", "f1gn591s"]
|
105
|
+
},
|
106
|
+
"filled-brand": {
|
107
|
+
"De3pzq": "ffp7eso",
|
108
|
+
"sj55zd": "f1phragk",
|
109
|
+
"g2u3we": "f1vp46cd",
|
110
|
+
"h3c5rm": ["f1lxz1cr", "ff8nh0i"],
|
111
|
+
"B9xav0g": "fe9j8it",
|
112
|
+
"zhjwy3": ["ff8nh0i", "f1lxz1cr"]
|
113
|
+
},
|
114
|
+
"filled-danger": {
|
115
|
+
"De3pzq": "fdl5y0r",
|
116
|
+
"sj55zd": "f1phragk",
|
117
|
+
"g2u3we": "f11ttmz8",
|
118
|
+
"h3c5rm": ["f1ratw88", "f459ikj"],
|
119
|
+
"B9xav0g": "fvovscg",
|
120
|
+
"zhjwy3": ["f459ikj", "f1ratw88"]
|
121
|
+
},
|
122
|
+
"filled-important": {
|
123
|
+
"De3pzq": "f1c73kur",
|
124
|
+
"sj55zd": "fr0bkrk"
|
125
|
+
},
|
126
|
+
"filled-informative": {
|
127
|
+
"De3pzq": "f3vzo32",
|
128
|
+
"sj55zd": "f11d4kpn"
|
129
|
+
},
|
130
|
+
"filled-severe": {
|
131
|
+
"De3pzq": "f1s438gw",
|
132
|
+
"sj55zd": "f1phragk"
|
133
|
+
},
|
134
|
+
"filled-subtle": {
|
135
|
+
"De3pzq": "fxugw4r",
|
136
|
+
"sj55zd": "f19n0e5"
|
137
|
+
},
|
138
|
+
"filled-success": {
|
139
|
+
"De3pzq": "flxk52p",
|
140
|
+
"sj55zd": "f1phragk"
|
141
|
+
},
|
142
|
+
"filled-warning": {
|
143
|
+
"De3pzq": "ffq97bm",
|
144
|
+
"sj55zd": "f19n0e5",
|
145
|
+
"g2u3we": "f1gyeiz5",
|
146
|
+
"h3c5rm": ["f1jnj1iq", "fd1epeu"],
|
147
|
+
"B9xav0g": "f102bkgo",
|
148
|
+
"zhjwy3": ["fd1epeu", "f1jnj1iq"]
|
149
|
+
},
|
150
|
+
"ghost": {
|
151
|
+
"icvyot": "f1ern45e",
|
152
|
+
"vrafjx": ["f1n71otn", "f1deefiw"],
|
153
|
+
"oivjwe": "f1h8hb77",
|
154
|
+
"wvpqe5": ["f1deefiw", "f1n71otn"]
|
155
|
+
},
|
156
|
+
"ghost-brand": {
|
157
|
+
"sj55zd": "f1817uup"
|
158
|
+
},
|
159
|
+
"ghost-danger": {
|
160
|
+
"sj55zd": "f1whyuy6"
|
161
|
+
},
|
162
|
+
"ghost-important": {
|
163
|
+
"sj55zd": "f19n0e5"
|
164
|
+
},
|
165
|
+
"ghost-informative": {
|
166
|
+
"sj55zd": "f11d4kpn"
|
167
|
+
},
|
168
|
+
"ghost-severe": {
|
169
|
+
"sj55zd": "f1l8vj45"
|
170
|
+
},
|
171
|
+
"ghost-subtle": {
|
172
|
+
"sj55zd": "fqpbvvt"
|
173
|
+
},
|
174
|
+
"ghost-success": {
|
175
|
+
"sj55zd": "f1m7fhi8"
|
176
|
+
},
|
177
|
+
"ghost-warning": {
|
178
|
+
"sj55zd": "fpti2h4"
|
179
|
+
},
|
180
|
+
"outline": {
|
181
|
+
"g2u3we": "f23ftbb",
|
182
|
+
"h3c5rm": ["f1gkuv52", "f1p1bl80"],
|
183
|
+
"B9xav0g": "fioka3i",
|
184
|
+
"zhjwy3": ["f1p1bl80", "f1gkuv52"]
|
185
|
+
},
|
186
|
+
"outline-brand": {
|
187
|
+
"sj55zd": "f1817uup"
|
188
|
+
},
|
189
|
+
"outline-danger": {
|
190
|
+
"sj55zd": "f1whyuy6"
|
191
|
+
},
|
192
|
+
"outline-important": {
|
193
|
+
"sj55zd": "f11d4kpn",
|
194
|
+
"g2u3we": "fq0vr37",
|
195
|
+
"h3c5rm": ["f1byw159", "f11cr0be"],
|
196
|
+
"B9xav0g": "f1c1zstj",
|
197
|
+
"zhjwy3": ["f11cr0be", "f1byw159"]
|
198
|
+
},
|
199
|
+
"outline-informative": {
|
200
|
+
"sj55zd": "f11d4kpn",
|
201
|
+
"g2u3we": "f68mrw8",
|
202
|
+
"h3c5rm": ["f7pw515", "fw35ms5"],
|
203
|
+
"B9xav0g": "frpde29",
|
204
|
+
"zhjwy3": ["fw35ms5", "f7pw515"]
|
205
|
+
},
|
206
|
+
"outline-severe": {
|
207
|
+
"sj55zd": "f1l8vj45"
|
208
|
+
},
|
209
|
+
"outline-subtle": {
|
210
|
+
"sj55zd": "fqpbvvt"
|
211
|
+
},
|
212
|
+
"outline-success": {
|
213
|
+
"sj55zd": "f1sms7z7"
|
214
|
+
},
|
215
|
+
"outline-warning": {
|
216
|
+
"sj55zd": "fpti2h4"
|
217
|
+
},
|
218
|
+
"tint": {},
|
219
|
+
"tint-brand": {
|
220
|
+
"De3pzq": "f16xkysk",
|
221
|
+
"sj55zd": "faj9fo0",
|
222
|
+
"g2u3we": "f161y7kd",
|
223
|
+
"h3c5rm": ["f1c8dzaj", "f1sl6hi9"],
|
224
|
+
"B9xav0g": "f1619yhw",
|
225
|
+
"zhjwy3": ["f1sl6hi9", "f1c8dzaj"]
|
226
|
+
},
|
227
|
+
"tint-danger": {
|
228
|
+
"De3pzq": "ff0poqj",
|
229
|
+
"sj55zd": "f1hcrxcs",
|
230
|
+
"g2u3we": "f1oqjm8o",
|
231
|
+
"h3c5rm": ["fkgrb8g", "frb5wm0"],
|
232
|
+
"B9xav0g": "f1iai1ph",
|
233
|
+
"zhjwy3": ["frb5wm0", "fkgrb8g"]
|
234
|
+
},
|
235
|
+
"tint-important": {
|
236
|
+
"De3pzq": "f945g0u",
|
237
|
+
"sj55zd": "fr0bkrk",
|
238
|
+
"g2u3we": "fghlq4f",
|
239
|
+
"h3c5rm": ["f1gn591s", "fjscplz"],
|
240
|
+
"B9xav0g": "fb073pr",
|
241
|
+
"zhjwy3": ["fjscplz", "f1gn591s"]
|
242
|
+
},
|
243
|
+
"tint-informative": {
|
244
|
+
"De3pzq": "f1ctqxl6",
|
245
|
+
"sj55zd": "f11d4kpn",
|
246
|
+
"g2u3we": "f68mrw8",
|
247
|
+
"h3c5rm": ["f7pw515", "fw35ms5"],
|
248
|
+
"B9xav0g": "frpde29",
|
249
|
+
"zhjwy3": ["fw35ms5", "f7pw515"]
|
250
|
+
},
|
251
|
+
"tint-severe": {
|
252
|
+
"De3pzq": "f1xzsg4",
|
253
|
+
"sj55zd": "f1k5f75o",
|
254
|
+
"g2u3we": "f18s257e",
|
255
|
+
"h3c5rm": ["f13ptu4t", "fiwx4jo"],
|
256
|
+
"B9xav0g": "f1geyuz0",
|
257
|
+
"zhjwy3": ["fiwx4jo", "f13ptu4t"]
|
258
|
+
},
|
259
|
+
"tint-subtle": {
|
260
|
+
"De3pzq": "fxugw4r",
|
261
|
+
"sj55zd": "f11d4kpn",
|
262
|
+
"g2u3we": "f68mrw8",
|
263
|
+
"h3c5rm": ["f7pw515", "fw35ms5"],
|
264
|
+
"B9xav0g": "frpde29",
|
265
|
+
"zhjwy3": ["fw35ms5", "f7pw515"]
|
266
|
+
},
|
267
|
+
"tint-success": {
|
268
|
+
"De3pzq": "f2vsrz6",
|
269
|
+
"sj55zd": "ffmvakt",
|
270
|
+
"g2u3we": "f3m3qtd",
|
271
|
+
"h3c5rm": ["f1bjyn17", "fksln3n"],
|
272
|
+
"B9xav0g": "frg4y0o",
|
273
|
+
"zhjwy3": ["fksln3n", "f1bjyn17"]
|
274
|
+
},
|
275
|
+
"tint-warning": {
|
276
|
+
"De3pzq": "f10s6hli",
|
277
|
+
"sj55zd": "fpti2h4",
|
278
|
+
"g2u3we": "f1e2bpek",
|
279
|
+
"h3c5rm": ["fnu3uvp", "fdpwmi9"],
|
280
|
+
"B9xav0g": "fk8fs0c",
|
281
|
+
"zhjwy3": ["fdpwmi9", "fnu3uvp"]
|
282
|
+
}
|
283
|
+
}, {
|
284
|
+
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1ewtqcl{box-sizing:border-box;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f10pi13n{position:relative;}", ".f16dn6v3{width:6px;}", ".f3mu39s{height:6px;}", ".f130uwy9{font-size:4px;}", ".fpd43o0{width:10px;}", ".f30q22z{height:10px;}", ".f1tccstq{font-size:6px;}", ".fq2vo04{min-width:16px;}", ".fd461yt{height:16px;}", ".fq1loh5{padding-top:2px;}", ".f12huiiw{padding-right:2px;}", ".f161knb0{padding-left:2px;}", ".futqtb8{padding-bottom:2px;}", ".f1q8lukm{-webkit-column-gap:4px;column-gap:4px;}", ".f1ma2n7n{row-gap:4px;}", ".f1n0apg3{font-size:8px;}", ".fjamq6b{height:20px;}", ".f11u7vat{min-width:20px;}", ".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".fnmn6fi{font-size:10px;}", ".f17fgpbq{min-width:24px;}", ".frvgh55{height:24px;}", ".f1ugzwwg{font-size:12px;}", ".fwbmr0d{min-width:32px;}", ".f1d2rq10{height:32px;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1y3hx6l{row-gap:6px;}", ".f18zi460{border-top-width:var(--strokeWidthThick);}", ".f1wpluaz{border-right-width:var(--strokeWidthThick);}", ".fsfsuhs{border-left-width:var(--strokeWidthThick);}", ".fmklw6v{border-bottom-width:var(--strokeWidthThick);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}", ".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}", ".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}", ".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}", ".fxyqdnz{border-bottom-right-radius:99px;}", ".fib3qew{border-bottom-left-radius:99px;}", ".f14p2bvz{border-top-right-radius:99px;}", ".fdqj3q4{border-top-left-radius:99px;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".f1vp46cd{border-top-color:var(--colorBrandBackground);}", ".f1lxz1cr{border-right-color:var(--colorBrandBackground);}", ".ff8nh0i{border-left-color:var(--colorBrandBackground);}", ".fe9j8it{border-bottom-color:var(--colorBrandBackground);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f11ttmz8{border-top-color:var(--colorPaletteRedBackground3);}", ".f1ratw88{border-right-color:var(--colorPaletteRedBackground3);}", ".f459ikj{border-left-color:var(--colorPaletteRedBackground3);}", ".fvovscg{border-bottom-color:var(--colorPaletteRedBackground3);}", ".f1c73kur{background-color:var(--colorNeutralForeground1);}", ".fr0bkrk{color:var(--colorNeutralBackground1);}", ".f3vzo32{background-color:var(--colorNeutralBackground5);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".flxk52p{background-color:var(--colorPaletteGreenBackground3);}", ".ffq97bm{background-color:var(--colorPaletteYellowBackground3);}", ".f1gyeiz5{border-top-color:var(--colorPaletteYellowBackground3);}", ".f1jnj1iq{border-right-color:var(--colorPaletteYellowBackground3);}", ".fd1epeu{border-left-color:var(--colorPaletteYellowBackground3);}", ".f102bkgo{border-bottom-color:var(--colorPaletteYellowBackground3);}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f1817uup{color:var(--colorBrandBackground);}", ".f1whyuy6{color:var(--colorPaletteRedForeground3);}", ".f1l8vj45{color:var(--colorPaletteDarkOrangeForeground3);}", ".fqpbvvt{color:var(--colorNeutralForegroundInverted);}", ".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}", ".fpti2h4{color:var(--colorPaletteYellowForeground2);}", ".f23ftbb{border-top-color:currentColor;}", ".f1gkuv52{border-right-color:currentColor;}", ".f1p1bl80{border-left-color:currentColor;}", ".fioka3i{border-bottom-color:currentColor;}", ".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f68mrw8{border-top-color:var(--colorNeutralStroke2);}", ".f7pw515{border-right-color:var(--colorNeutralStroke2);}", ".fw35ms5{border-left-color:var(--colorNeutralStroke2);}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".f1sms7z7{color:var(--colorPaletteGreenForeground2);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".faj9fo0{color:var(--colorBrandForeground2);}", ".f161y7kd{border-top-color:var(--colorBrandStroke2);}", ".f1c8dzaj{border-right-color:var(--colorBrandStroke2);}", ".f1sl6hi9{border-left-color:var(--colorBrandStroke2);}", ".f1619yhw{border-bottom-color:var(--colorBrandStroke2);}", ".ff0poqj{background-color:var(--colorPaletteRedBackground1);}", ".f1hcrxcs{color:var(--colorPaletteRedForeground1);}", ".f1oqjm8o{border-top-color:var(--colorPaletteRedBorder1);}", ".fkgrb8g{border-right-color:var(--colorPaletteRedBorder1);}", ".frb5wm0{border-left-color:var(--colorPaletteRedBorder1);}", ".f1iai1ph{border-bottom-color:var(--colorPaletteRedBorder1);}", ".f945g0u{background-color:var(--colorNeutralForeground3);}", ".f1ctqxl6{background-color:var(--colorNeutralBackground4);}", ".f1xzsg4{background-color:var(--colorPaletteDarkOrangeBackground1);}", ".f1k5f75o{color:var(--colorPaletteDarkOrangeForeground1);}", ".f18s257e{border-top-color:var(--colorPaletteDarkOrangeForeground2);}", ".f13ptu4t{border-right-color:var(--colorPaletteDarkOrangeForeground2);}", ".fiwx4jo{border-left-color:var(--colorPaletteDarkOrangeForeground2);}", ".f1geyuz0{border-bottom-color:var(--colorPaletteDarkOrangeForeground2);}", ".f2vsrz6{background-color:var(--colorPaletteGreenBackground1);}", ".ffmvakt{color:var(--colorPaletteGreenForeground1);}", ".f3m3qtd{border-top-color:var(--colorPaletteGreenBackground2);}", ".f1bjyn17{border-right-color:var(--colorPaletteGreenBackground2);}", ".fksln3n{border-left-color:var(--colorPaletteGreenBackground2);}", ".frg4y0o{border-bottom-color:var(--colorPaletteGreenBackground2);}", ".f10s6hli{background-color:var(--colorPaletteYellowBackground1);}", ".f1e2bpek{border-top-color:var(--colorPaletteYellowBackground2);}", ".fnu3uvp{border-right-color:var(--colorPaletteYellowBackground2);}", ".fdpwmi9{border-left-color:var(--colorPaletteYellowBackground2);}", ".fk8fs0c{border-bottom-color:var(--colorPaletteYellowBackground2);}"]
|
285
|
+
});
|
286
|
+
|
287
|
+
const useIconStyles = /*#__PURE__*/__styles({
|
288
|
+
"base": {
|
289
|
+
"mc9l5x": "f22iagw",
|
290
|
+
"Bmliigx": "fxe27oy",
|
291
|
+
"Bt984gj": "f122n59",
|
292
|
+
"Bqenvij": "f1l02sjl"
|
293
|
+
},
|
294
|
+
"tiny": {
|
295
|
+
"Be2twd7": "f1tccstq"
|
296
|
+
},
|
297
|
+
"extra-small": {
|
298
|
+
"Be2twd7": "fnmn6fi"
|
299
|
+
},
|
300
|
+
"small": {
|
301
|
+
"Be2twd7": "f1ugzwwg"
|
302
|
+
},
|
303
|
+
"medium": {
|
304
|
+
"Be2twd7": "f1ugzwwg"
|
305
|
+
},
|
306
|
+
"large": {
|
307
|
+
"Be2twd7": "f4ybsrx"
|
308
|
+
},
|
309
|
+
"extra-large": {
|
310
|
+
"Be2twd7": "fe5j1ua"
|
311
|
+
}
|
312
|
+
}, {
|
313
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fxe27oy{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1l02sjl{height:100%;}", ".f1tccstq{font-size:6px;}", ".fnmn6fi{font-size:10px;}", ".f1ugzwwg{font-size:12px;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}"]
|
314
|
+
});
|
315
|
+
/**
|
316
|
+
* Applies style classnames to slots
|
317
|
+
*/
|
318
|
+
|
319
|
+
|
320
|
+
export const useBadgeStyles_unstable = state => {
|
321
|
+
const rootStyles = useRootStyles();
|
322
|
+
state.root.className = mergeClasses(badgeClassName, rootStyles.base, rootStyles[state.size], rootStyles[state.shape], state.shape === 'rounded' && (state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny') && rootStyles.roundedSmallToTiny, rootStyles[state.appearance], rootStyles[`${state.appearance}-${state.color}`], state.root.className);
|
323
|
+
const iconStyles = useIconStyles();
|
324
|
+
|
325
|
+
if (state.icon) {
|
326
|
+
state.icon.className = mergeClasses(iconStyles.base, iconStyles[state.size], state.icon.className);
|
327
|
+
}
|
328
|
+
|
329
|
+
return state;
|
330
|
+
};
|
331
|
+
//# sourceMappingURL=useBadgeStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/Badge/useBadgeStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { BadgeState } from './Badge.types';\n\nexport const badgeClassName = 'fui-Badge';\n\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n fontWeight: tokens.fontWeightSemibold,\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n ...shorthands.borderStyle('solid'),\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n },\n\n // size\n\n tiny: {\n width: '6px',\n height: '6px',\n fontSize: '4px',\n },\n 'extra-small': {\n width: '10px',\n height: '10px',\n fontSize: '6px',\n },\n small: {\n minWidth: '16px',\n height: '16px',\n ...shorthands.padding('2px'),\n ...shorthands.gap('4px'),\n fontSize: '8px',\n },\n medium: {\n height: '20px',\n minWidth: '20px',\n ...shorthands.gap('4px'),\n ...shorthands.padding('4px'),\n fontSize: '10px',\n },\n large: {\n minWidth: '24px',\n height: '24px',\n ...shorthands.padding('4px'),\n fontSize: '12px',\n ...shorthands.gap('4px'),\n },\n 'extra-large': {\n minWidth: '32px',\n height: '32px',\n ...shorthands.padding('6px'),\n ...shorthands.gap('6px'),\n fontSize: '12px',\n ...shorthands.borderWidth(tokens.strokeWidthThick),\n },\n\n // shape\n\n square: {\n // Default border radius\n },\n rounded: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n roundedSmallToTiny: {\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n },\n circular: {\n ...shorthands.borderRadius('99px'),\n },\n\n // appearance: filled\n\n filled: {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n 'filled-brand': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorBrandBackground),\n },\n 'filled-danger': {\n backgroundColor: tokens.colorPaletteRedBackground3,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorPaletteRedBackground3),\n },\n 'filled-important': {\n backgroundColor: tokens.colorNeutralForeground1,\n color: tokens.colorNeutralBackground1,\n },\n 'filled-informative': {\n backgroundColor: tokens.colorNeutralBackground5,\n color: tokens.colorNeutralForeground3,\n },\n 'filled-severe': {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground3,\n color: tokens.colorNeutralForegroundOnBrand,\n },\n 'filled-subtle': {\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n },\n 'filled-success': {\n backgroundColor: tokens.colorPaletteGreenBackground3,\n color: tokens.colorNeutralForegroundOnBrand,\n },\n 'filled-warning': {\n backgroundColor: tokens.colorPaletteYellowBackground3,\n color: tokens.colorNeutralForeground1,\n ...shorthands.borderColor(tokens.colorPaletteYellowBackground3),\n },\n\n // appearance: ghost\n\n ghost: {\n ...shorthands.borderStyle('none'),\n },\n 'ghost-brand': {\n color: tokens.colorBrandBackground,\n },\n 'ghost-danger': {\n color: tokens.colorPaletteRedForeground3,\n },\n 'ghost-important': {\n color: tokens.colorNeutralForeground1,\n },\n 'ghost-informative': {\n color: tokens.colorNeutralForeground3,\n },\n 'ghost-severe': {\n color: tokens.colorPaletteDarkOrangeForeground3,\n },\n 'ghost-subtle': {\n color: tokens.colorNeutralForegroundInverted,\n },\n 'ghost-success': {\n color: tokens.colorPaletteGreenForeground3,\n },\n 'ghost-warning': {\n color: tokens.colorPaletteYellowForeground2,\n },\n\n // appearance: outline\n\n outline: {\n ...shorthands.borderColor('currentColor'),\n },\n 'outline-brand': {\n color: tokens.colorBrandBackground,\n },\n 'outline-danger': {\n color: tokens.colorPaletteRedForeground3,\n },\n 'outline-important': {\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n 'outline-informative': {\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n 'outline-severe': {\n color: tokens.colorPaletteDarkOrangeForeground3,\n },\n 'outline-subtle': {\n color: tokens.colorNeutralForegroundInverted,\n },\n 'outline-success': {\n color: tokens.colorPaletteGreenForeground2,\n },\n 'outline-warning': {\n color: tokens.colorPaletteYellowForeground2,\n },\n\n // appearance: tint\n\n tint: {\n // No shared colors between tint appearances\n },\n 'tint-brand': {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorBrandForeground2,\n ...shorthands.borderColor(tokens.colorBrandStroke2),\n },\n 'tint-danger': {\n backgroundColor: tokens.colorPaletteRedBackground1,\n color: tokens.colorPaletteRedForeground1,\n ...shorthands.borderColor(tokens.colorPaletteRedBorder1),\n },\n 'tint-important': {\n backgroundColor: tokens.colorNeutralForeground3,\n color: tokens.colorNeutralBackground1,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n 'tint-informative': {\n backgroundColor: tokens.colorNeutralBackground4,\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n 'tint-severe': {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground1,\n color: tokens.colorPaletteDarkOrangeForeground1,\n ...shorthands.borderColor(tokens.colorPaletteDarkOrangeForeground2),\n },\n 'tint-subtle': {\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStroke2),\n },\n 'tint-success': {\n backgroundColor: tokens.colorPaletteGreenBackground1,\n color: tokens.colorPaletteGreenForeground1,\n ...shorthands.borderColor(tokens.colorPaletteGreenBackground2),\n },\n 'tint-warning': {\n backgroundColor: tokens.colorPaletteYellowBackground1,\n color: tokens.colorPaletteYellowForeground2,\n ...shorthands.borderColor(tokens.colorPaletteYellowBackground2),\n },\n});\n\nconst useIconStyles = makeStyles({\n base: {\n display: 'flex',\n alignContent: 'center',\n alignItems: 'center',\n height: '100%',\n },\n\n // size\n\n tiny: {\n fontSize: '6px',\n },\n 'extra-small': {\n fontSize: '10px',\n },\n small: {\n fontSize: '12px',\n },\n medium: {\n fontSize: '12px',\n },\n large: {\n fontSize: '16px',\n },\n 'extra-large': {\n fontSize: '20px',\n },\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const useBadgeStyles_unstable = (state: BadgeState): BadgeState => {\n const rootStyles = useRootStyles();\n\n state.root.className = mergeClasses(\n badgeClassName,\n rootStyles.base,\n rootStyles[state.size],\n rootStyles[state.shape],\n state.shape === 'rounded' &&\n (state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny') &&\n rootStyles.roundedSmallToTiny,\n rootStyles[state.appearance],\n rootStyles[`${state.appearance}-${state.color}` as const],\n state.root.className,\n );\n\n const iconStyles = useIconStyles();\n if (state.icon) {\n state.icon.className = mergeClasses(iconStyles.base, iconStyles[state.size], state.icon.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CounterBadgeProps } from './CounterBadge.types';
|
2
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
|
+
/**
|
4
|
+
* Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
|
5
|
+
*/
|
6
|
+
export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { useCounterBadge_unstable } from './useCounterBadge';
|
3
|
+
import { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles';
|
4
|
+
import { renderBadge_unstable } from '../Badge/index';
|
5
|
+
/**
|
6
|
+
* Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.
|
7
|
+
*/
|
8
|
+
|
9
|
+
export const CounterBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = useCounterBadge_unstable(props, ref);
|
11
|
+
useCounterBadgeStyles_unstable(state);
|
12
|
+
return renderBadge_unstable(state);
|
13
|
+
});
|
14
|
+
CounterBadge.displayName = 'CounterBadge';
|
15
|
+
//# sourceMappingURL=CounterBadge.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,oBAAT,QAAqC,gBAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,wBAAwB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AACA,EAAA,8BAA8B,CAAC,KAAD,CAA9B;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALmE,CAA7D;AAOP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles';\nimport { renderBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps } from './CounterBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.\n */\nexport const CounterBadge: ForwardRefComponent<CounterBadgeProps> = React.forwardRef((props, ref) => {\n const state = useCounterBadge_unstable(props, ref);\n useCounterBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import type { BadgeProps, BadgeState } from '../Badge/index';
|
2
|
+
declare type CounterBadgeCommons = {
|
3
|
+
/**
|
4
|
+
* Max number to be displayed
|
5
|
+
* @default 99
|
6
|
+
*/
|
7
|
+
overflowCount: number;
|
8
|
+
/**
|
9
|
+
* Value displayed by the Badge
|
10
|
+
* @default 0
|
11
|
+
*/
|
12
|
+
count: number;
|
13
|
+
/**
|
14
|
+
* If the badge should be shown when count is 0
|
15
|
+
* @default false
|
16
|
+
*/
|
17
|
+
showZero: boolean;
|
18
|
+
/**
|
19
|
+
* If a dot should be displayed without the count
|
20
|
+
* @default false
|
21
|
+
*/
|
22
|
+
dot: boolean;
|
23
|
+
/**
|
24
|
+
* A Badge can be circular or rounded
|
25
|
+
* @default circular
|
26
|
+
*/
|
27
|
+
shape: 'circular' | 'rounded';
|
28
|
+
/**
|
29
|
+
* A Badge can be filled, ghost
|
30
|
+
* @default filled
|
31
|
+
*/
|
32
|
+
appearance: 'filled' | 'ghost';
|
33
|
+
/**
|
34
|
+
* Semantic colors for a counter badge
|
35
|
+
* @default brand
|
36
|
+
*/
|
37
|
+
color: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;
|
38
|
+
};
|
39
|
+
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;
|
40
|
+
export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;
|
41
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CounterBadge.types.js","sourceRoot":"../src/","sources":["components/CounterBadge/CounterBadge.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeProps, BadgeState } from '../Badge/index';\n\ntype CounterBadgeCommons = {\n /**\n * Max number to be displayed\n * @default 99\n */\n overflowCount: number;\n\n /**\n * Value displayed by the Badge\n * @default 0\n */\n count: number;\n\n /**\n * If the badge should be shown when count is 0\n * @default false\n */\n showZero: boolean;\n\n /**\n * If a dot should be displayed without the count\n * @default false\n */\n dot: boolean;\n\n /**\n * A Badge can be circular or rounded\n * @default circular\n */\n shape: 'circular' | 'rounded';\n\n /**\n * A Badge can be filled, ghost\n * @default filled\n */\n appearance: 'filled' | 'ghost';\n\n /**\n * Semantic colors for a counter badge\n * @default brand\n */\n color: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;\n};\n\nexport type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape' | 'color'> & Partial<CounterBadgeCommons>;\n\nexport type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape' | 'color'> & CounterBadgeCommons;\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/CounterBadge/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './CounterBadge';\nexport * from './CounterBadge.types';\nexport * from './useCounterBadge';\nexport * from './useCounterBadgeStyles';\n"]}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';
|
3
|
+
/**
|
4
|
+
* Returns the props and state required to render the component
|
5
|
+
*/
|
6
|
+
export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>) => CounterBadgeState;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { useBadge_unstable } from '../Badge/index';
|
2
|
+
/**
|
3
|
+
* Returns the props and state required to render the component
|
4
|
+
*/
|
5
|
+
|
6
|
+
export const useCounterBadge_unstable = (props, ref) => {
|
7
|
+
const {
|
8
|
+
shape = 'circular',
|
9
|
+
appearance = 'filled',
|
10
|
+
showZero = false,
|
11
|
+
overflowCount = 99,
|
12
|
+
count = 0,
|
13
|
+
dot = false
|
14
|
+
} = props;
|
15
|
+
const state = { ...useBadge_unstable(props, ref),
|
16
|
+
shape,
|
17
|
+
appearance,
|
18
|
+
showZero,
|
19
|
+
overflowCount,
|
20
|
+
count,
|
21
|
+
dot
|
22
|
+
};
|
23
|
+
|
24
|
+
if (!state.dot && !state.root.children) {
|
25
|
+
state.root.children = state.count > state.overflowCount ? `${state.overflowCount}+` : `${state.count}`;
|
26
|
+
}
|
27
|
+
|
28
|
+
return state;
|
29
|
+
};
|
30
|
+
//# sourceMappingURL=useCounterBadge.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"AACA,SAAS,iBAAT,QAAkC,gBAAlC;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAG,CAAC,KAAD,EAA2B,GAA3B,KAA6E;AACnH,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,UAAU,GAAG,QAFT;AAGJ,IAAA,QAAQ,GAAG,KAHP;AAIJ,IAAA,aAAa,GAAG,EAJZ;AAKJ,IAAA,KAAK,GAAG,CALJ;AAMJ,IAAA,GAAG,GAAG;AANF,MAOF,KAPJ;AASA,QAAM,KAAK,GAAsB,EAC/B,GAAI,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CADU;AAE/B,IAAA,KAF+B;AAG/B,IAAA,UAH+B;AAI/B,IAAA,QAJ+B;AAK/B,IAAA,aAL+B;AAM/B,IAAA,KAN+B;AAO/B,IAAA;AAP+B,GAAjC;;AAUA,MAAI,CAAC,KAAK,CAAC,GAAP,IAAc,CAAC,KAAK,CAAC,IAAN,CAAW,QAA9B,EAAwC;AACtC,IAAA,KAAK,CAAC,IAAN,CAAW,QAAX,GAAsB,KAAK,CAAC,KAAN,GAAc,KAAK,CAAC,aAApB,GAAoC,GAAG,KAAK,CAAC,aAAa,GAA1D,GAAgE,GAAG,KAAK,CAAC,KAAK,EAApG;AACD;;AAED,SAAO,KAAP;AACD,CAzBM","sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useCounterBadge_unstable = (props: CounterBadgeProps, ref: React.Ref<HTMLElement>): CounterBadgeState => {\n const {\n shape = 'circular',\n appearance = 'filled',\n showZero = false,\n overflowCount = 99,\n count = 0,\n dot = false,\n } = props;\n\n const state: CounterBadgeState = {\n ...(useBadge_unstable(props, ref) as CounterBadgeState),\n shape,\n appearance,\n showZero,\n overflowCount,\n count,\n dot,\n };\n\n if (!state.dot && !state.root.children) {\n state.root.children = state.count > state.overflowCount ? `${state.overflowCount}+` : `${state.count}`;\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { CounterBadgeState } from './CounterBadge.types';
|
2
|
+
export declare const counterBadgeClassName = "fui-CounterBadge";
|
3
|
+
/**
|
4
|
+
* Applies style classnames to slots
|
5
|
+
*/
|
6
|
+
export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState) => CounterBadgeState;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { shorthands, mergeClasses, __styles } from '@griffel/react';
|
2
|
+
import { useBadgeStyles_unstable } from '../Badge/useBadgeStyles';
|
3
|
+
export const counterBadgeClassName = 'fui-CounterBadge';
|
4
|
+
|
5
|
+
const useStyles = /*#__PURE__*/__styles({
|
6
|
+
"dot": {
|
7
|
+
"Bf4jedk": "fgfkb25",
|
8
|
+
"a9b677": "f16dn6v3",
|
9
|
+
"Bqenvij": "f3mu39s",
|
10
|
+
"z8tnut": "f1g0x7ka",
|
11
|
+
"z189sj": ["fhxju0i", "f1cnd47f"],
|
12
|
+
"Byoj8tv": "f1qch9an",
|
13
|
+
"uwmqm3": ["f1cnd47f", "fhxju0i"]
|
14
|
+
},
|
15
|
+
"hide": {
|
16
|
+
"mc9l5x": "fjseox"
|
17
|
+
}
|
18
|
+
}, {
|
19
|
+
"d": [".fgfkb25{min-width:auto;}", ".f16dn6v3{width:6px;}", ".f3mu39s{height:6px;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fjseox{display:none;}"]
|
20
|
+
});
|
21
|
+
/**
|
22
|
+
* Applies style classnames to slots
|
23
|
+
*/
|
24
|
+
|
25
|
+
|
26
|
+
export const useCounterBadgeStyles_unstable = state => {
|
27
|
+
const styles = useStyles();
|
28
|
+
state.root.className = mergeClasses(counterBadgeClassName, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
|
29
|
+
return useBadgeStyles_unstable(state);
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=useCounterBadgeStyles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAGA,OAAO,MAAM,qBAAqB,GAAG,kBAA9B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAYA;;AAEG;;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgD;AAC5F,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,qBADiC,EAEjC,KAAK,CAAC,GAAN,IAAa,MAAM,CAAC,GAFa,EAGjC,CAAC,KAAK,CAAC,QAAP,IAAmB,KAAK,CAAC,KAAN,KAAgB,CAAnC,IAAwC,CAAC,KAAK,CAAC,GAA/C,IAAsD,MAAM,CAAC,IAH5B,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;AAMA,SAAO,uBAAuB,CAAC,KAAD,CAA9B;AACD,CATM","sourcesContent":["import { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { useBadgeStyles_unstable } from '../Badge/useBadgeStyles';\nimport type { CounterBadgeState } from './CounterBadge.types';\n\nexport const counterBadgeClassName = 'fui-CounterBadge';\n\nconst useStyles = makeStyles({\n dot: {\n minWidth: 'auto',\n width: '6px',\n height: '6px',\n ...shorthands.padding('0'),\n },\n hide: {\n display: 'none',\n },\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const useCounterBadgeStyles_unstable = (state: CounterBadgeState): CounterBadgeState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n counterBadgeClassName,\n state.dot && styles.dot,\n !state.showZero && state.count === 0 && !state.dot && styles.hide,\n state.root.className,\n );\n return useBadgeStyles_unstable(state) as CounterBadgeState;\n};\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import type { PresenceBadgeProps } from './PresenceBadge.types';
|
2
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
|
+
/**
|
4
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
5
|
+
*/
|
6
|
+
export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { usePresenceBadge_unstable } from './usePresenceBadge';
|
3
|
+
import { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles';
|
4
|
+
import { renderBadge_unstable } from '../../Badge';
|
5
|
+
/**
|
6
|
+
* Define a styled Badge, using the `useBadge_unstable` hook.
|
7
|
+
*/
|
8
|
+
|
9
|
+
export const PresenceBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = usePresenceBadge_unstable(props, ref);
|
11
|
+
usePresenceBadgeStyles_unstable(state);
|
12
|
+
return renderBadge_unstable(state);
|
13
|
+
});
|
14
|
+
PresenceBadge.displayName = 'PresenceBadge';
|
15
|
+
//# sourceMappingURL=PresenceBadge.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,+BAAT,QAAgD,0BAAhD;AACA,SAAS,oBAAT,QAAqC,aAArC;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,yBAAyB,CAAC,KAAD,EAAQ,GAAR,CAAvC;AACA,EAAA,+BAA+B,CAAC,KAAD,CAA/B;AAEA,SAAO,oBAAoB,CAAC,KAAD,CAA3B;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles';\nimport { renderBadge_unstable } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const PresenceBadge: ForwardRefComponent<PresenceBadgeProps> = React.forwardRef((props, ref) => {\n const state = usePresenceBadge_unstable(props, ref);\n usePresenceBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
|
2
|
+
import type { BadgeCommons, BadgeSlots } from '../Badge/Badge.types';
|
3
|
+
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
4
|
+
declare type PresenceBadgeCommons = {
|
5
|
+
/**
|
6
|
+
* Represents several status
|
7
|
+
* @default available
|
8
|
+
*/
|
9
|
+
status: PresenceBadgeStatus;
|
10
|
+
/**
|
11
|
+
* Modifies the display to indicate that the user is out of office.
|
12
|
+
* This can be combined with any status to display an out-of-office version of that status
|
13
|
+
* @default false
|
14
|
+
*/
|
15
|
+
outOfOffice: boolean;
|
16
|
+
} & BadgeCommons;
|
17
|
+
export declare type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root'>>, 'color'> & Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;
|
18
|
+
export declare type PresenceBadgeState = PresenceBadgeCommons & ComponentState<BadgeSlots>;
|
19
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PresenceBadge.types.js","sourceRoot":"../src/","sources":["components/PresenceBadge/PresenceBadge.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { BadgeCommons, BadgeSlots } from '../Badge/Badge.types';\n\nexport type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';\n\ntype PresenceBadgeCommons = {\n /**\n * Represents several status\n * @default available\n */\n status: PresenceBadgeStatus;\n /**\n * Modifies the display to indicate that the user is out of office.\n * This can be combined with any status to display an out-of-office version of that status\n * @default false\n */\n outOfOffice: boolean;\n} & BadgeCommons;\n\nexport type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root'>>, 'color'> &\n Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;\n\nexport type PresenceBadgeState = PresenceBadgeCommons & ComponentState<BadgeSlots>;\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/PresenceBadge/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles';\n"]}
|