@fluentui/react-badge 9.3.2 → 9.4.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/lib/Badge.js.map +1 -1
  3. package/lib/CounterBadge.js.map +1 -1
  4. package/lib/PresenceBadge.js.map +1 -1
  5. package/lib/components/Badge/Badge.js.map +1 -1
  6. package/lib/components/Badge/Badge.types.js.map +1 -1
  7. package/lib/components/Badge/index.js.map +1 -1
  8. package/lib/components/Badge/renderBadge.js.map +1 -1
  9. package/lib/components/Badge/useBadge.js.map +1 -1
  10. package/lib/components/Badge/useBadgeStyles.styles.raw.js +292 -0
  11. package/lib/components/Badge/useBadgeStyles.styles.raw.js.map +1 -0
  12. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  13. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  14. package/lib/components/CounterBadge/index.js.map +1 -1
  15. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  16. package/lib/components/CounterBadge/useCounterBadgeStyles.styles.raw.js +28 -0
  17. package/lib/components/CounterBadge/useCounterBadgeStyles.styles.raw.js.map +1 -0
  18. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  19. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  20. package/lib/components/PresenceBadge/index.js.map +1 -1
  21. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -1
  22. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  23. package/lib/components/PresenceBadge/usePresenceBadgeStyles.styles.raw.js +104 -0
  24. package/lib/components/PresenceBadge/usePresenceBadgeStyles.styles.raw.js.map +1 -0
  25. package/lib/index.js.map +1 -1
  26. package/lib-commonjs/Badge.js.map +1 -1
  27. package/lib-commonjs/CounterBadge.js.map +1 -1
  28. package/lib-commonjs/PresenceBadge.js.map +1 -1
  29. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  30. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  31. package/lib-commonjs/components/Badge/index.js.map +1 -1
  32. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  33. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  34. package/lib-commonjs/components/Badge/useBadgeStyles.styles.js.map +1 -1
  35. package/lib-commonjs/components/Badge/useBadgeStyles.styles.raw.js +302 -0
  36. package/lib-commonjs/components/Badge/useBadgeStyles.styles.raw.js.map +1 -0
  37. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  38. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  39. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  40. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  41. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.styles.js.map +1 -1
  42. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.styles.raw.js +44 -0
  43. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.styles.raw.js.map +1 -0
  44. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  45. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  46. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  47. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -1
  48. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  49. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.styles.js.map +1 -1
  50. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.styles.raw.js +120 -0
  51. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.styles.raw.js.map +1 -0
  52. package/lib-commonjs/index.js.map +1 -1
  53. package/package.json +3 -3
@@ -0,0 +1,302 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ badgeClassNames: function() {
13
+ return badgeClassNames;
14
+ },
15
+ useBadgeStyles_unstable: function() {
16
+ return useBadgeStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const badgeClassNames = {
22
+ root: 'fui-Badge',
23
+ icon: 'fui-Badge__icon'
24
+ };
25
+ // The text content of the badge has additional horizontal padding, but there is no `text` slot to add that padding to.
26
+ // Instead, add extra padding to the root, and a negative margin on the icon to "remove" the extra padding on the icon.
27
+ const textPadding = _reacttheme.tokens.spacingHorizontalXXS;
28
+ const useRootClassName = (0, _react.makeResetStyles)({
29
+ display: 'inline-flex',
30
+ boxSizing: 'border-box',
31
+ alignItems: 'center',
32
+ justifyContent: 'center',
33
+ position: 'relative',
34
+ ..._reacttheme.typographyStyles.caption1Strong,
35
+ height: '20px',
36
+ minWidth: '20px',
37
+ padding: `0 calc(${_reacttheme.tokens.spacingHorizontalXS} + ${textPadding})`,
38
+ borderRadius: _reacttheme.tokens.borderRadiusCircular,
39
+ // Use a transparent stroke (rather than no border) so the border is visible in high contrast
40
+ borderColor: _reacttheme.tokens.colorTransparentStroke,
41
+ '::after': {
42
+ content: '""',
43
+ position: 'absolute',
44
+ top: 0,
45
+ left: 0,
46
+ bottom: 0,
47
+ right: 0,
48
+ borderStyle: 'solid',
49
+ borderColor: 'inherit',
50
+ borderWidth: _reacttheme.tokens.strokeWidthThin,
51
+ borderRadius: 'inherit'
52
+ }
53
+ });
54
+ const useRootStyles = (0, _react.makeStyles)({
55
+ fontSmallToTiny: {
56
+ ..._reacttheme.typographyStyles.caption2Strong
57
+ },
58
+ // size
59
+ tiny: {
60
+ width: '6px',
61
+ height: '6px',
62
+ fontSize: '4px',
63
+ lineHeight: '4px',
64
+ minWidth: 'unset',
65
+ padding: 'unset'
66
+ },
67
+ 'extra-small': {
68
+ width: '10px',
69
+ height: '10px',
70
+ fontSize: '6px',
71
+ lineHeight: '6px',
72
+ minWidth: 'unset',
73
+ padding: 'unset'
74
+ },
75
+ small: {
76
+ minWidth: '16px',
77
+ height: '16px',
78
+ padding: `0 calc(${_reacttheme.tokens.spacingHorizontalXXS} + ${textPadding})`
79
+ },
80
+ medium: {},
81
+ large: {
82
+ minWidth: '24px',
83
+ height: '24px',
84
+ padding: `0 calc(${_reacttheme.tokens.spacingHorizontalXS} + ${textPadding})`
85
+ },
86
+ 'extra-large': {
87
+ minWidth: '32px',
88
+ height: '32px',
89
+ padding: `0 calc(${_reacttheme.tokens.spacingHorizontalSNudge} + ${textPadding})`
90
+ },
91
+ // shape
92
+ square: {
93
+ borderRadius: _reacttheme.tokens.borderRadiusNone
94
+ },
95
+ rounded: {
96
+ borderRadius: _reacttheme.tokens.borderRadiusMedium
97
+ },
98
+ roundedSmallToTiny: {
99
+ borderRadius: _reacttheme.tokens.borderRadiusSmall
100
+ },
101
+ circular: {},
102
+ // hide the boder when appearance is "ghost"
103
+ borderGhost: {
104
+ // The border is applied in an ::after pseudo-element because it should not affect layout.
105
+ // The padding and size of the badge should be the same regardless of whether or not it has a border.
106
+ '::after': {
107
+ display: 'none'
108
+ }
109
+ },
110
+ // appearance: filled
111
+ filled: {},
112
+ 'filled-brand': {
113
+ backgroundColor: _reacttheme.tokens.colorBrandBackground,
114
+ color: _reacttheme.tokens.colorNeutralForegroundOnBrand
115
+ },
116
+ 'filled-danger': {
117
+ backgroundColor: _reacttheme.tokens.colorPaletteRedBackground3,
118
+ color: _reacttheme.tokens.colorNeutralForegroundOnBrand
119
+ },
120
+ 'filled-important': {
121
+ backgroundColor: _reacttheme.tokens.colorNeutralForeground1,
122
+ color: _reacttheme.tokens.colorNeutralBackground1
123
+ },
124
+ 'filled-informative': {
125
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground5,
126
+ color: _reacttheme.tokens.colorNeutralForeground3
127
+ },
128
+ 'filled-severe': {
129
+ backgroundColor: _reacttheme.tokens.colorPaletteDarkOrangeBackground3,
130
+ color: _reacttheme.tokens.colorNeutralForegroundOnBrand
131
+ },
132
+ 'filled-subtle': {
133
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
134
+ color: _reacttheme.tokens.colorNeutralForeground1
135
+ },
136
+ 'filled-success': {
137
+ backgroundColor: _reacttheme.tokens.colorPaletteGreenBackground3,
138
+ color: _reacttheme.tokens.colorNeutralForegroundOnBrand
139
+ },
140
+ 'filled-warning': {
141
+ backgroundColor: _reacttheme.tokens.colorPaletteYellowBackground3,
142
+ color: _reacttheme.tokens.colorNeutralForeground1Static
143
+ },
144
+ // appearance: ghost
145
+ ghost: {},
146
+ 'ghost-brand': {
147
+ color: _reacttheme.tokens.colorBrandForeground1
148
+ },
149
+ 'ghost-danger': {
150
+ color: _reacttheme.tokens.colorPaletteRedForeground3
151
+ },
152
+ 'ghost-important': {
153
+ color: _reacttheme.tokens.colorNeutralForeground1
154
+ },
155
+ 'ghost-informative': {
156
+ color: _reacttheme.tokens.colorNeutralForeground3
157
+ },
158
+ 'ghost-severe': {
159
+ color: _reacttheme.tokens.colorPaletteDarkOrangeForeground3
160
+ },
161
+ 'ghost-subtle': {
162
+ color: _reacttheme.tokens.colorNeutralForegroundStaticInverted
163
+ },
164
+ 'ghost-success': {
165
+ color: _reacttheme.tokens.colorPaletteGreenForeground3
166
+ },
167
+ 'ghost-warning': {
168
+ color: _reacttheme.tokens.colorPaletteYellowForeground2
169
+ },
170
+ // appearance: outline
171
+ outline: {
172
+ ..._react.shorthands.borderColor('currentColor')
173
+ },
174
+ 'outline-brand': {
175
+ color: _reacttheme.tokens.colorBrandForeground1
176
+ },
177
+ 'outline-danger': {
178
+ color: _reacttheme.tokens.colorPaletteRedForeground3,
179
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorPaletteRedBorder2)
180
+ },
181
+ 'outline-important': {
182
+ color: _reacttheme.tokens.colorNeutralForeground3,
183
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStrokeAccessible)
184
+ },
185
+ 'outline-informative': {
186
+ color: _reacttheme.tokens.colorNeutralForeground3,
187
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke2)
188
+ },
189
+ 'outline-severe': {
190
+ color: _reacttheme.tokens.colorPaletteDarkOrangeForeground3
191
+ },
192
+ 'outline-subtle': {
193
+ color: _reacttheme.tokens.colorNeutralForegroundStaticInverted
194
+ },
195
+ 'outline-success': {
196
+ color: _reacttheme.tokens.colorPaletteGreenForeground3,
197
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorPaletteGreenBorder2)
198
+ },
199
+ 'outline-warning': {
200
+ color: _reacttheme.tokens.colorPaletteYellowForeground2
201
+ },
202
+ // appearance: tint
203
+ tint: {},
204
+ 'tint-brand': {
205
+ backgroundColor: _reacttheme.tokens.colorBrandBackground2,
206
+ color: _reacttheme.tokens.colorBrandForeground2,
207
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorBrandStroke2)
208
+ },
209
+ 'tint-danger': {
210
+ backgroundColor: _reacttheme.tokens.colorPaletteRedBackground1,
211
+ color: _reacttheme.tokens.colorPaletteRedForeground1,
212
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorPaletteRedBorder1)
213
+ },
214
+ 'tint-important': {
215
+ backgroundColor: _reacttheme.tokens.colorNeutralForeground3,
216
+ color: _reacttheme.tokens.colorNeutralBackground1,
217
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorTransparentStroke)
218
+ },
219
+ 'tint-informative': {
220
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground4,
221
+ color: _reacttheme.tokens.colorNeutralForeground3,
222
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke2)
223
+ },
224
+ 'tint-severe': {
225
+ backgroundColor: _reacttheme.tokens.colorPaletteDarkOrangeBackground1,
226
+ color: _reacttheme.tokens.colorPaletteDarkOrangeForeground1,
227
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorPaletteDarkOrangeBorder1)
228
+ },
229
+ 'tint-subtle': {
230
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1,
231
+ color: _reacttheme.tokens.colorNeutralForeground3,
232
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke2)
233
+ },
234
+ 'tint-success': {
235
+ backgroundColor: _reacttheme.tokens.colorPaletteGreenBackground1,
236
+ color: _reacttheme.tokens.colorPaletteGreenForeground1,
237
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorPaletteGreenBorder1)
238
+ },
239
+ 'tint-warning': {
240
+ backgroundColor: _reacttheme.tokens.colorPaletteYellowBackground1,
241
+ color: _reacttheme.tokens.colorPaletteYellowForeground1,
242
+ ..._react.shorthands.borderColor(_reacttheme.tokens.colorPaletteYellowBorder1)
243
+ }
244
+ });
245
+ const useIconRootClassName = (0, _react.makeResetStyles)({
246
+ display: 'flex',
247
+ lineHeight: '1',
248
+ margin: `0 calc(-1 * ${textPadding})`,
249
+ fontSize: '12px'
250
+ });
251
+ const useIconStyles = (0, _react.makeStyles)({
252
+ beforeText: {
253
+ marginRight: `calc(${_reacttheme.tokens.spacingHorizontalXXS} + ${textPadding})`
254
+ },
255
+ afterText: {
256
+ marginLeft: `calc(${_reacttheme.tokens.spacingHorizontalXXS} + ${textPadding})`
257
+ },
258
+ beforeTextXL: {
259
+ marginRight: `calc(${_reacttheme.tokens.spacingHorizontalXS} + ${textPadding})`
260
+ },
261
+ afterTextXL: {
262
+ marginLeft: `calc(${_reacttheme.tokens.spacingHorizontalXS} + ${textPadding})`
263
+ },
264
+ // size
265
+ tiny: {
266
+ fontSize: '6px'
267
+ },
268
+ 'extra-small': {
269
+ fontSize: '10px'
270
+ },
271
+ small: {
272
+ fontSize: '12px'
273
+ },
274
+ medium: {},
275
+ large: {
276
+ fontSize: '16px'
277
+ },
278
+ 'extra-large': {
279
+ fontSize: '20px'
280
+ }
281
+ });
282
+ const useBadgeStyles_unstable = (state)=>{
283
+ 'use no memo';
284
+ const rootClassName = useRootClassName();
285
+ const rootStyles = useRootStyles();
286
+ const smallToTiny = state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny';
287
+ state.root.className = (0, _react.mergeClasses)(badgeClassNames.root, rootClassName, smallToTiny && rootStyles.fontSmallToTiny, rootStyles[state.size], rootStyles[state.shape], state.shape === 'rounded' && smallToTiny && rootStyles.roundedSmallToTiny, state.appearance === 'ghost' && rootStyles.borderGhost, rootStyles[state.appearance], rootStyles[`${state.appearance}-${state.color}`], state.root.className);
288
+ const iconRootClassName = useIconRootClassName();
289
+ const iconStyles = useIconStyles();
290
+ if (state.icon) {
291
+ let iconPositionClass;
292
+ if (state.root.children) {
293
+ if (state.size === 'extra-large') {
294
+ iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterTextXL : iconStyles.beforeTextXL;
295
+ } else {
296
+ iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterText : iconStyles.beforeText;
297
+ }
298
+ }
299
+ state.icon.className = (0, _react.mergeClasses)(badgeClassNames.icon, iconRootClassName, iconPositionClass, iconStyles[state.size], state.icon.className);
300
+ }
301
+ return state;
302
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Badge/useBadgeStyles.styles.ts"],"sourcesContent":["import { shorthands, makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { BadgeSlots, BadgeState } from './Badge.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const badgeClassNames: SlotClassNames<BadgeSlots> = {\n root: 'fui-Badge',\n icon: 'fui-Badge__icon',\n};\n\n// The text content of the badge has additional horizontal padding, but there is no `text` slot to add that padding to.\n// Instead, add extra padding to the root, and a negative margin on the icon to \"remove\" the extra padding on the icon.\nconst textPadding = tokens.spacingHorizontalXXS;\n\nconst useRootClassName = makeResetStyles({\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n ...typographyStyles.caption1Strong,\n height: '20px',\n minWidth: '20px',\n padding: `0 calc(${tokens.spacingHorizontalXS} + ${textPadding})`,\n borderRadius: tokens.borderRadiusCircular,\n // Use a transparent stroke (rather than no border) so the border is visible in high contrast\n borderColor: tokens.colorTransparentStroke,\n\n '::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n borderStyle: 'solid',\n borderColor: 'inherit',\n borderWidth: tokens.strokeWidthThin,\n borderRadius: 'inherit',\n },\n});\n\nconst useRootStyles = makeStyles({\n fontSmallToTiny: {\n ...typographyStyles.caption2Strong,\n },\n\n // size\n\n tiny: {\n width: '6px',\n height: '6px',\n fontSize: '4px',\n lineHeight: '4px',\n minWidth: 'unset',\n padding: 'unset',\n },\n 'extra-small': {\n width: '10px',\n height: '10px',\n fontSize: '6px',\n lineHeight: '6px',\n minWidth: 'unset',\n padding: 'unset',\n },\n small: {\n minWidth: '16px',\n height: '16px',\n padding: `0 calc(${tokens.spacingHorizontalXXS} + ${textPadding})`,\n },\n medium: {\n // Set by useRootClassName\n },\n large: {\n minWidth: '24px',\n height: '24px',\n padding: `0 calc(${tokens.spacingHorizontalXS} + ${textPadding})`,\n },\n 'extra-large': {\n minWidth: '32px',\n height: '32px',\n padding: `0 calc(${tokens.spacingHorizontalSNudge} + ${textPadding})`,\n },\n\n // shape\n\n square: { borderRadius: tokens.borderRadiusNone },\n rounded: { borderRadius: tokens.borderRadiusMedium },\n roundedSmallToTiny: { borderRadius: tokens.borderRadiusSmall },\n circular: {\n // Set by useRootClassName\n },\n // hide the boder when appearance is \"ghost\"\n\n borderGhost: {\n // The border is applied in an ::after pseudo-element because it should not affect layout.\n // The padding and size of the badge should be the same regardless of whether or not it has a border.\n '::after': {\n display: 'none',\n },\n },\n\n // appearance: filled\n\n filled: {\n // Set by useRootClassName\n },\n 'filled-brand': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n },\n 'filled-danger': {\n backgroundColor: tokens.colorPaletteRedBackground3,\n color: tokens.colorNeutralForegroundOnBrand,\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.colorNeutralForeground1Static,\n },\n\n // appearance: ghost\n\n ghost: {\n // No shared colors between ghost appearances\n },\n 'ghost-brand': {\n color: tokens.colorBrandForeground1,\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.colorNeutralForegroundStaticInverted,\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.colorBrandForeground1,\n },\n 'outline-danger': {\n color: tokens.colorPaletteRedForeground3,\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\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.colorNeutralForegroundStaticInverted,\n },\n 'outline-success': {\n color: tokens.colorPaletteGreenForeground3,\n ...shorthands.borderColor(tokens.colorPaletteGreenBorder2),\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.colorPaletteDarkOrangeBorder1),\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.colorPaletteGreenBorder1),\n },\n 'tint-warning': {\n backgroundColor: tokens.colorPaletteYellowBackground1,\n color: tokens.colorPaletteYellowForeground1,\n ...shorthands.borderColor(tokens.colorPaletteYellowBorder1),\n },\n});\n\nconst useIconRootClassName = makeResetStyles({\n display: 'flex',\n lineHeight: '1',\n margin: `0 calc(-1 * ${textPadding})`, // Remove text padding added to root\n fontSize: '12px',\n});\n\nconst useIconStyles = makeStyles({\n beforeText: {\n marginRight: `calc(${tokens.spacingHorizontalXXS} + ${textPadding})`,\n },\n afterText: {\n marginLeft: `calc(${tokens.spacingHorizontalXXS} + ${textPadding})`,\n },\n\n beforeTextXL: {\n marginRight: `calc(${tokens.spacingHorizontalXS} + ${textPadding})`,\n },\n afterTextXL: {\n marginLeft: `calc(${tokens.spacingHorizontalXS} + ${textPadding})`,\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 // Set by useIconRootClassName\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 'use no memo';\n\n const rootClassName = useRootClassName();\n const rootStyles = useRootStyles();\n\n const smallToTiny = state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny';\n\n state.root.className = mergeClasses(\n badgeClassNames.root,\n rootClassName,\n smallToTiny && rootStyles.fontSmallToTiny,\n rootStyles[state.size],\n rootStyles[state.shape],\n state.shape === 'rounded' && smallToTiny && rootStyles.roundedSmallToTiny,\n state.appearance === 'ghost' && rootStyles.borderGhost,\n rootStyles[state.appearance],\n rootStyles[`${state.appearance}-${state.color}` as const],\n state.root.className,\n );\n\n const iconRootClassName = useIconRootClassName();\n const iconStyles = useIconStyles();\n if (state.icon) {\n let iconPositionClass;\n if (state.root.children) {\n if (state.size === 'extra-large') {\n iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterTextXL : iconStyles.beforeTextXL;\n } else {\n iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterText : iconStyles.beforeText;\n }\n }\n\n state.icon.className = mergeClasses(\n badgeClassNames.icon,\n iconRootClassName,\n iconPositionClass,\n iconStyles[state.size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"names":["shorthands","makeResetStyles","makeStyles","mergeClasses","tokens","typographyStyles","badgeClassNames","root","icon","textPadding","spacingHorizontalXXS","useRootClassName","display","boxSizing","alignItems","justifyContent","position","caption1Strong","height","minWidth","padding","spacingHorizontalXS","borderRadius","borderRadiusCircular","borderColor","colorTransparentStroke","content","top","left","bottom","right","borderStyle","borderWidth","strokeWidthThin","useRootStyles","fontSmallToTiny","caption2Strong","tiny","width","fontSize","lineHeight","small","medium","large","spacingHorizontalSNudge","square","borderRadiusNone","rounded","borderRadiusMedium","roundedSmallToTiny","borderRadiusSmall","circular","borderGhost","filled","backgroundColor","colorBrandBackground","color","colorNeutralForegroundOnBrand","colorPaletteRedBackground3","colorNeutralForeground1","colorNeutralBackground1","colorNeutralBackground5","colorNeutralForeground3","colorPaletteDarkOrangeBackground3","colorPaletteGreenBackground3","colorPaletteYellowBackground3","colorNeutralForeground1Static","ghost","colorBrandForeground1","colorPaletteRedForeground3","colorPaletteDarkOrangeForeground3","colorNeutralForegroundStaticInverted","colorPaletteGreenForeground3","colorPaletteYellowForeground2","outline","colorPaletteRedBorder2","colorNeutralStrokeAccessible","colorNeutralStroke2","colorPaletteGreenBorder2","tint","colorBrandBackground2","colorBrandForeground2","colorBrandStroke2","colorPaletteRedBackground1","colorPaletteRedForeground1","colorPaletteRedBorder1","colorNeutralBackground4","colorPaletteDarkOrangeBackground1","colorPaletteDarkOrangeForeground1","colorPaletteDarkOrangeBorder1","colorPaletteGreenBackground1","colorPaletteGreenForeground1","colorPaletteGreenBorder1","colorPaletteYellowBackground1","colorPaletteYellowForeground1","colorPaletteYellowBorder1","useIconRootClassName","margin","useIconStyles","beforeText","marginRight","afterText","marginLeft","beforeTextXL","afterTextXL","useBadgeStyles_unstable","state","rootClassName","rootStyles","smallToTiny","size","className","shape","appearance","iconRootClassName","iconStyles","iconPositionClass","children","iconPosition"],"mappings":";;;;;;;;;;;IAKaM,eAAAA;;;IAqSAmG,uBAAAA;;;;uBA1SyD,iBAAiB;4BAC9C,wBAAwB;AAI1D,wBAAoD;IACzDlG,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G,IAAI,CAACuG,SAAS;IAExB;IAEA,OAAOL;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CounterBadge/CounterBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCounterBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCounterBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"names":["CounterBadge","React","forwardRef","props","ref","state","useCounterBadge_unstable","useCounterBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;6CACM;qCACH;uBACP;AAO9B,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,2BAAAA,EAAqBJ;AAC9B;AAEAL,aAAaU,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/CounterBadge/CounterBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCounterBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCounterBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"names":["React","useCounterBadge_unstable","useCounterBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","CounterBadge","forwardRef","props","ref","state","displayName"],"mappings":";;;;+BAWaK;;;;;;;iEAXU,QAAQ;iCACU,oBAAoB;6CACd,iCAAiC;qCACpC,kCAAkC;uBACzC,iBAAiB;AAO/C,qBAAMA,WAAAA,GAAuDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQR,6CAAAA,EAAyBM,OAAOC;QAE9CN,2DAAAA,EAA+BO;QAE/BN,gDAAAA,EAA4B,kCAAkCM;IAE9D,WAAOL,2BAAAA,EAAqBK;AAC9B,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CounterBadge/CounterBadge.types.ts"],"sourcesContent":["import type { BadgeProps, BadgeState } from '../Badge/index';\n\nexport type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {\n /**\n * A Badge can have different appearances that emphasize certain parts of it:\n * - filled: The default appearance if one is not specified.\n * The badge background is filled with color with a contrasting foreground text to match.\n * - ghost: The badge background is transparent, with the foreground text taking color to emphasize it.\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 /**\n * Value displayed by the Badge\n * @default 0\n */\n count?: number;\n\n /**\n * If a dot should be displayed without the count\n * @default false\n */\n dot?: boolean;\n\n /**\n * Max number to be displayed\n * @default 99\n */\n overflowCount?: number;\n\n /**\n * A Badge can be circular or rounded\n * @default circular\n */\n shape?: 'circular' | 'rounded';\n\n /**\n * If the badge should be shown when count is 0\n * @default false\n */\n showZero?: boolean;\n};\n\nexport type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> &\n Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;\n"],"names":[],"rangeMappings":"","mappings":""}
1
+ {"version":3,"sources":["../src/components/CounterBadge/CounterBadge.types.ts"],"sourcesContent":["import type { BadgeProps, BadgeState } from '../Badge/index';\n\nexport type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {\n /**\n * A Badge can have different appearances that emphasize certain parts of it:\n * - filled: The default appearance if one is not specified.\n * The badge background is filled with color with a contrasting foreground text to match.\n * - ghost: The badge background is transparent, with the foreground text taking color to emphasize it.\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 /**\n * Value displayed by the Badge\n * @default 0\n */\n count?: number;\n\n /**\n * If a dot should be displayed without the count\n * @default false\n */\n dot?: boolean;\n\n /**\n * Max number to be displayed\n * @default 99\n */\n overflowCount?: number;\n\n /**\n * A Badge can be circular or rounded\n * @default circular\n */\n shape?: 'circular' | 'rounded';\n\n /**\n * If the badge should be shown when count is 0\n * @default false\n */\n showZero?: boolean;\n};\n\nexport type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> &\n Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;\n"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CounterBadge/index.ts"],"sourcesContent":["export { CounterBadge } from './CounterBadge';\nexport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\nexport { useCounterBadge_unstable } from './useCounterBadge';\nexport { counterBadgeClassNames, useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\n"],"names":["CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,YAAY;eAAZA,0BAAY;;IAGZC,sBAAsB;eAAtBA,mDAAsB;;IAAEC,8BAA8B;eAA9BA,2DAA8B;;IADtDC,wBAAwB;eAAxBA,yCAAwB;;;8BAFJ;iCAEY;6CAC8B"}
1
+ {"version":3,"sources":["../src/components/CounterBadge/index.ts"],"sourcesContent":["export { CounterBadge } from './CounterBadge';\nexport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\nexport { useCounterBadge_unstable } from './useCounterBadge';\nexport { counterBadgeClassNames, useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\n"],"names":["CounterBadge","useCounterBadge_unstable","counterBadgeClassNames","useCounterBadgeStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAGZE,mDAAsB;;;eAAEC,2DAA8B;;;eADtDF,yCAAwB;;;8BAFJ,iBAAiB;iCAEL,oBAAoB;6CACU,iCAAiC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CounterBadge/useCounterBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport type { BadgeState } from '../Badge/index';\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 Pick<CounterBadgeState, keyof BadgeState>),\n shape,\n appearance,\n showZero,\n count,\n dot,\n };\n\n if ((count !== 0 || showZero) && !dot && !state.root.children) {\n state.root.children = count > overflowCount ? `${overflowCount}+` : `${count}`;\n }\n\n return state;\n};\n"],"names":["useCounterBadge_unstable","props","ref","shape","appearance","showZero","overflowCount","count","dot","state","useBadge_unstable","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;uBAEW;AAM3B,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EACJC,QAAQ,UAAU,EAClBC,aAAa,QAAQ,EACrBC,WAAW,KAAK,EAChBC,gBAAgB,EAAE,EAClBC,QAAQ,CAAC,EACTC,MAAM,KAAK,EACZ,GAAGP;IAEJ,MAAMQ,QAA2B;QAC/B,GAAIC,IAAAA,wBAAAA,EAAkBT,OAAOC,IAAI;QACjCC;QACAC;QACAC;QACAE;QACAC;IACF;IAEA,IAAI,AAACD,CAAAA,UAAU,KAAKF,QAAAA,KAAa,CAACG,OAAO,CAACC,MAAME,IAAI,CAACC,QAAQ,EAAE;QAC7DH,MAAME,IAAI,CAACC,QAAQ,GAAGL,QAAQD,gBAAgB,CAAC,EAAEA,cAAc,CAAC,CAAC,GAAG,CAAC,EAAEC,MAAM,CAAC;IAChF;IAEA,OAAOE;AACT"}
1
+ {"version":3,"sources":["../src/components/CounterBadge/useCounterBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport type { BadgeState } from '../Badge/index';\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 Pick<CounterBadgeState, keyof BadgeState>),\n shape,\n appearance,\n showZero,\n count,\n dot,\n };\n\n if ((count !== 0 || showZero) && !dot && !state.root.children) {\n state.root.children = count > overflowCount ? `${overflowCount}+` : `${count}`;\n }\n\n return state;\n};\n"],"names":["React","useBadge_unstable","useCounterBadge_unstable","props","ref","shape","appearance","showZero","overflowCount","count","dot","state","root","children"],"mappings":";;;;+BAQaE;;;;;;;iEARU,QAAQ;uBAEG,iBAAiB;AAM5C,iCAAiC,CAACC,OAA0BC;IACjE,MAAM,EACJC,QAAQ,UAAU,EAClBC,aAAa,QAAQ,EACrBC,WAAW,KAAK,EAChBC,gBAAgB,EAAE,EAClBC,QAAQ,CAAC,EACTC,MAAM,KAAK,EACZ,GAAGP;IAEJ,MAAMQ,QAA2B;QAC/B,OAAIV,wBAAAA,EAAkBE,OAAOC,IAAI;QACjCC;QACAC;QACAC;QACAE;QACAC;IACF;IAEA,IAAKD,CAAAA,UAAU,KAAKF,QAAAA,CAAO,IAAM,CAACG,OAAO,CAACC,MAAMC,IAAI,CAACC,QAAQ,EAAE;QAC7DF,MAAMC,IAAI,CAACC,QAAQ,GAAGJ,QAAQD,gBAAgB,GAAGA,cAAc,CAAC,CAAC,GAAG,GAAGC,OAAO;IAChF;IAEA,OAAOE;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useCounterBadgeStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { useBadgeStyles_unstable } from '../Badge/useBadgeStyles.styles';\nexport const counterBadgeClassNames = {\n root: 'fui-CounterBadge',\n icon: 'fui-CounterBadge__icon'\n};\nconst useStyles = makeStyles({\n dot: {\n minWidth: 'auto',\n width: '6px',\n height: '6px',\n padding: '0'\n },\n hide: {\n display: 'none'\n }\n});\n/**\n * Applies style classnames to slots\n */ export const useCounterBadgeStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(counterBadgeClassNames.root, state.dot && styles.dot, !state.root.children && !state.dot && styles.hide, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(counterBadgeClassNames.icon, state.icon.className);\n }\n return useBadgeStyles_unstable(state);\n};\n"],"names":["counterBadgeClassNames","useCounterBadgeStyles_unstable","root","icon","useStyles","__styles","dot","Bf4jedk","a9b677","Bqenvij","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","hide","mc9l5x","d","p","state","styles","className","mergeClasses","children","useBadgeStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,sBAAsB;eAAtBA;;IAiBIC,8BAA8B;eAA9BA;;;uBAnBwB;sCACD;AACjC,MAAMD,yBAAyB;IAClCE,MAAM;IACNC,MAAM;AACV;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,KAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,MAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA;AAaP,MAAMjB,iCAAkCkB,CAAAA;IAC/C;IACA,MAAMC,SAAShB;IACfe,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,uBAAuBE,IAAI,EAAEiB,MAAMb,GAAG,IAAIc,OAAOd,GAAG,EAAE,CAACa,MAAMjB,IAAI,CAACqB,QAAQ,IAAI,CAACJ,MAAMb,GAAG,IAAIc,OAAOL,IAAI,EAAEI,MAAMjB,IAAI,CAACmB,SAAS;IACjK,IAAIF,MAAMhB,IAAI,EAAE;QACZgB,MAAMhB,IAAI,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,uBAAuBG,IAAI,EAAEgB,MAAMhB,IAAI,CAACkB,SAAS;IACzF;IACA,OAAOG,IAAAA,6CAAuB,EAACL;AACnC"}
1
+ {"version":3,"sources":["useCounterBadgeStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { useBadgeStyles_unstable } from '../Badge/useBadgeStyles.styles';\nexport const counterBadgeClassNames = {\n root: 'fui-CounterBadge',\n icon: 'fui-CounterBadge__icon'\n};\nconst useStyles = makeStyles({\n dot: {\n minWidth: 'auto',\n width: '6px',\n height: '6px',\n padding: '0'\n },\n hide: {\n display: 'none'\n }\n});\n/**\n * Applies style classnames to slots\n */ export const useCounterBadgeStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(counterBadgeClassNames.root, state.dot && styles.dot, !state.root.children && !state.dot && styles.hide, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(counterBadgeClassNames.icon, state.icon.className);\n }\n return useBadgeStyles_unstable(state);\n};\n"],"names":["mergeClasses","__styles","useBadgeStyles_unstable","counterBadgeClassNames","root","icon","useStyles","dot","Bf4jedk","a9b677","Bqenvij","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","hide","mc9l5x","d","p","useCounterBadgeStyles_unstable","state","styles","className","children"],"mappings":";;;;;;;;;;;IAEaG,sBAAsB;;;IAiBlBiB,8BAA8B;;;;uBAnBN,gBAAgB;sCACjB,gCAAgC;AACjE,+BAA+B;IAClChB,IAAI,EAAE,kBAAkB;IACxBC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,GAAGL,mBAAA,EAAA;IAAAM,GAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAC,IAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,CAAA,EAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA,CAUjB,CAAC;AAGS,uCAAwCE,KAAK,IAAG;IACvD,aAAa;IACb,MAAMC,MAAM,GAAGhB,SAAS,CAAC,CAAC;IAC1Be,KAAK,CAACjB,IAAI,CAACmB,SAAS,OAAGvB,mBAAY,EAACG,sBAAsB,CAACC,IAAI,EAAEiB,KAAK,CAACd,GAAG,IAAIe,MAAM,CAACf,GAAG,EAAE,CAACc,KAAK,CAACjB,IAAI,CAACoB,QAAQ,IAAI,CAACH,KAAK,CAACd,GAAG,IAAIe,MAAM,CAACN,IAAI,EAAEK,KAAK,CAACjB,IAAI,CAACmB,SAAS,CAAC;IAClK,IAAIF,KAAK,CAAChB,IAAI,EAAE;QACZgB,KAAK,CAAChB,IAAI,CAACkB,SAAS,OAAGvB,mBAAY,EAACG,sBAAsB,CAACE,IAAI,EAAEgB,KAAK,CAAChB,IAAI,CAACkB,SAAS,CAAC;IAC1F;IACA,WAAOrB,6CAAuB,EAACmB,KAAK,CAAC;AACzC,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ counterBadgeClassNames: function() {
13
+ return counterBadgeClassNames;
14
+ },
15
+ useCounterBadgeStyles_unstable: function() {
16
+ return useCounterBadgeStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _useBadgeStylesstyles = require("../Badge/useBadgeStyles.styles");
21
+ const counterBadgeClassNames = {
22
+ root: 'fui-CounterBadge',
23
+ icon: 'fui-CounterBadge__icon'
24
+ };
25
+ const useStyles = (0, _react.makeStyles)({
26
+ dot: {
27
+ minWidth: 'auto',
28
+ width: '6px',
29
+ height: '6px',
30
+ padding: '0'
31
+ },
32
+ hide: {
33
+ display: 'none'
34
+ }
35
+ });
36
+ const useCounterBadgeStyles_unstable = (state)=>{
37
+ 'use no memo';
38
+ const styles = useStyles();
39
+ state.root.className = (0, _react.mergeClasses)(counterBadgeClassNames.root, state.dot && styles.dot, !state.root.children && !state.dot && styles.hide, state.root.className);
40
+ if (state.icon) {
41
+ state.icon.className = (0, _react.mergeClasses)(counterBadgeClassNames.icon, state.icon.className);
42
+ }
43
+ return (0, _useBadgeStylesstyles.useBadgeStyles_unstable)(state);
44
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/CounterBadge/useCounterBadgeStyles.styles.ts"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { useBadgeStyles_unstable } from '../Badge/useBadgeStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { BadgeSlots } from '../Badge/Badge.types';\nimport type { CounterBadgeState } from './CounterBadge.types';\n\nexport const counterBadgeClassNames: SlotClassNames<BadgeSlots> = {\n root: 'fui-CounterBadge',\n icon: 'fui-CounterBadge__icon',\n};\n\nconst useStyles = makeStyles({\n dot: {\n minWidth: 'auto',\n width: '6px',\n height: '6px',\n 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 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n counterBadgeClassNames.root,\n state.dot && styles.dot,\n !state.root.children && !state.dot && styles.hide,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(counterBadgeClassNames.icon, state.icon.className);\n }\n\n return useBadgeStyles_unstable(state) as CounterBadgeState;\n};\n"],"names":["mergeClasses","makeStyles","useBadgeStyles_unstable","counterBadgeClassNames","root","icon","useStyles","dot","minWidth","width","height","padding","hide","display","useCounterBadgeStyles_unstable","state","styles","className","children"],"mappings":";;;;;;;;;;;IAMaG,sBAAAA;;;IAoBAW,8BAAAA;;;;uBA1B4B,iBAAiB;sCAClB,iCAAiC;AAKlE,+BAA2D;IAChEV,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,MAAMC,gBAAYL,iBAAAA,EAAW;IAC3BM,KAAK;QACHC,UAAU;QACVC,OAAO;QACPC,QAAQ;QACRC,SAAS;IACX;IACAC,MAAM;QACJC,SAAS;IACX;AACF;AAKO,uCAAuC,CAACE;IAC7C;IAEA,MAAMC,SAASV;IACfS,MAAMX,IAAI,CAACa,SAAS,OAAGjB,mBAAAA,EACrBG,uBAAuBC,IAAI,EAC3BW,MAAMR,GAAG,IAAIS,OAAOT,GAAG,EACvB,CAACQ,MAAMX,IAAI,CAACc,QAAQ,IAAI,CAACH,MAAMR,GAAG,IAAIS,OAAOJ,IAAI,EACjDG,MAAMX,IAAI,CAACa,SAAS;IAGtB,IAAIF,MAAMV,IAAI,EAAE;QACdU,MAAMV,IAAI,CAACY,SAAS,OAAGjB,mBAAAA,EAAaG,uBAAuBE,IAAI,EAAEU,MAAMV,IAAI,CAACY,SAAS;IACvF;IAEA,WAAOf,6CAAAA,EAAwBa;AACjC,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/PresenceBadge/PresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n usePresenceBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePresenceBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"names":["PresenceBadge","React","forwardRef","props","ref","state","usePresenceBadge_unstable","usePresenceBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;kCACmB;8CACM;qCACJ;uBACP;AAO9B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAEhCG,IAAAA,gDAAAA,EAA4B,mCAAmCH;IAE/D,OAAOI,IAAAA,2BAAAA,EAAqBJ;AAC9B;AAEAL,cAAcU,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/PresenceBadge/PresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n usePresenceBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePresenceBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"names":["React","usePresenceBadge_unstable","usePresenceBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","PresenceBadge","forwardRef","props","ref","state","displayName"],"mappings":";;;;+BAWaK;;;;;;;iEAXU,QAAQ;kCACW,qBAAqB;8CACf,kCAAkC;qCACtC,kCAAkC;uBACzC,cAAc;AAO5C,sBAAMA,WAAAA,GAAyDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,+CAAAA,EAA0BM,OAAOC;QAE/CN,6DAAAA,EAAgCO;QAEhCN,gDAAAA,EAA4B,mCAAmCM;IAE/D,WAAOL,2BAAAA,EAAqBK;AAC9B,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/PresenceBadge/PresenceBadge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState, BadgeSlots } from '../Badge/Badge.types';\n\nexport type PresenceBadgeStatus =\n | 'busy'\n | 'out-of-office'\n | 'away'\n | 'available'\n | 'offline'\n | 'do-not-disturb'\n | 'unknown'\n | 'blocked';\n\nexport type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> &\n Pick<BadgeProps, 'size'> & {\n /**\n * Represents several status\n * @default available\n */\n status?: PresenceBadgeStatus;\n\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 };\n\nexport type PresenceBadgeState = ComponentState<BadgeSlots> &\n BadgeState &\n Required<Pick<PresenceBadgeProps, 'status' | 'outOfOffice'>>;\n"],"names":[],"rangeMappings":"","mappings":""}
1
+ {"version":3,"sources":["../src/components/PresenceBadge/PresenceBadge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState, BadgeSlots } from '../Badge/Badge.types';\n\nexport type PresenceBadgeStatus =\n | 'busy'\n | 'out-of-office'\n | 'away'\n | 'available'\n | 'offline'\n | 'do-not-disturb'\n | 'unknown'\n | 'blocked';\n\nexport type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> &\n Pick<BadgeProps, 'size'> & {\n /**\n * Represents several status\n * @default available\n */\n status?: PresenceBadgeStatus;\n\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 };\n\nexport type PresenceBadgeState = ComponentState<BadgeSlots> &\n BadgeState &\n Required<Pick<PresenceBadgeProps, 'status' | 'outOfOffice'>>;\n"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/PresenceBadge/index.ts"],"sourcesContent":["export { PresenceBadge } from './PresenceBadge';\nexport type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge.types';\nexport { usePresenceBadge_unstable } from './usePresenceBadge';\nexport { presenceBadgeClassNames, usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nexport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceAwayRegular,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\n"],"names":["PresenceBadge","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBadgeClassNames","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAKpBC,uBAAuB;eAAvBA,sCAAuB;;IACvBC,wBAAwB;eAAxBA,uCAAwB;;IACxBC,kBAAkB;eAAlBA,iCAAkB;;IAClBC,mBAAmB;eAAnBA,kCAAmB;;IALZC,uBAAuB;eAAvBA,qDAAuB;;IAM9BC,sBAAsB;eAAtBA,qCAAsB;;IACtBC,kBAAkB;eAAlBA,iCAAkB;;IAClBC,iBAAiB;eAAjBA,gCAAiB;;IACjBC,kBAAkB;eAAlBA,iCAAkB;;IAClBC,sBAAsB;eAAtBA,qCAAsB;;IACtBC,kBAAkB;eAAlBA,iCAAkB;;IAClBC,sBAAsB;eAAtBA,qCAAsB;;IAZUC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAFJ;kCAEY;8CAC+B;+BAalE"}
1
+ {"version":3,"sources":["../src/components/PresenceBadge/index.ts"],"sourcesContent":["export { PresenceBadge } from './PresenceBadge';\nexport type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge.types';\nexport { usePresenceBadge_unstable } from './usePresenceBadge';\nexport { presenceBadgeClassNames, usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nexport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceAwayRegular,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\n"],"names":["PresenceBadge","usePresenceBadge_unstable","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular"],"mappings":";;;;;;;;;;;IAASA;2CAAa;;2BAKG;eAAvBI;;;eACAC,uCAAwB;;;eACxBC,iCAAkB;;uBACC;eAAnBC;;;eALOL,qDAAuB;;;eAM9BM,qCAAsB;;;eACtBC,iCAAkB;;;eAClBC,gCAAiB;;;eACjBC,iCAAkB;;IAClBC;oDAAsB;;;eACtBC,iCAAkB;;;eAClBC,qCAAsB;;;eAZUX,6DAA+B;;;eADxDF,2CAAyB;;;+BAFJ,kBAAkB;kCAEN,qBAAqB;8CACU,kCAAkC;+BAapG,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/PresenceBadge/presenceIcons.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n PresenceAvailable10Regular,\n PresenceAvailable12Regular,\n PresenceAvailable16Regular,\n PresenceAvailable20Regular,\n PresenceAvailable10Filled,\n PresenceAvailable12Filled,\n PresenceAvailable16Filled,\n PresenceAvailable20Filled,\n PresenceAway10Regular,\n PresenceAway12Regular,\n PresenceAway16Regular,\n PresenceAway20Regular,\n PresenceAway10Filled,\n PresenceAway12Filled,\n PresenceAway16Filled,\n PresenceAway20Filled,\n PresenceBlocked10Regular,\n PresenceBlocked12Regular,\n PresenceBlocked16Regular,\n PresenceBlocked20Regular,\n PresenceBusy10Filled,\n PresenceBusy12Filled,\n PresenceBusy16Filled,\n PresenceBusy20Filled,\n PresenceDnd10Regular,\n PresenceDnd12Regular,\n PresenceDnd16Regular,\n PresenceDnd20Regular,\n PresenceDnd10Filled,\n PresenceDnd12Filled,\n PresenceDnd16Filled,\n PresenceDnd20Filled,\n PresenceOof10Regular,\n PresenceOof12Regular,\n PresenceOof16Regular,\n PresenceOof20Regular,\n PresenceOffline10Regular,\n PresenceOffline12Regular,\n PresenceOffline16Regular,\n PresenceOffline20Regular,\n PresenceUnknown10Regular,\n PresenceUnknown12Regular,\n PresenceUnknown16Regular,\n PresenceUnknown20Regular,\n} from '@fluentui/react-icons';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceAwayRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Regular,\n 'extra-small': PresenceAway10Regular,\n small: PresenceAway12Regular,\n medium: PresenceAway16Regular,\n large: PresenceAway20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Regular,\n};\n\nexport const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n large: PresenceAway20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Filled,\n};\n\nexport const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n large: PresenceAvailable20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Regular,\n};\n\nexport const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n large: PresenceAvailable20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Filled,\n};\n\nexport const presenceBlockedRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBlocked10Regular,\n 'extra-small': PresenceBlocked10Regular,\n small: PresenceBlocked12Regular,\n medium: PresenceBlocked16Regular,\n large: PresenceBlocked20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBlocked20Regular,\n};\n\nexport const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n large: PresenceBusy20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy20Filled,\n};\n\nexport const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n large: PresenceDnd20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Filled,\n};\n\nexport const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n large: PresenceDnd20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Regular,\n};\n\nexport const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n large: PresenceOof20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof20Regular,\n};\n\nexport const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n large: PresenceOffline20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline20Regular,\n};\n\nexport const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n large: PresenceUnknown20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown20Regular,\n};\n"],"names":["presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","tiny","PresenceAway10Regular","small","PresenceAway12Regular","medium","PresenceAway16Regular","large","PresenceAway20Regular","PresenceAway10Filled","PresenceAway12Filled","PresenceAway16Filled","PresenceAway20Filled","PresenceAvailable10Regular","PresenceAvailable12Regular","PresenceAvailable16Regular","PresenceAvailable20Regular","PresenceAvailable10Filled","PresenceAvailable12Filled","PresenceAvailable16Filled","PresenceAvailable20Filled","PresenceBlocked10Regular","PresenceBlocked12Regular","PresenceBlocked16Regular","PresenceBlocked20Regular","PresenceBusy10Filled","PresenceBusy12Filled","PresenceBusy16Filled","PresenceBusy20Filled","PresenceDnd10Filled","PresenceDnd12Filled","PresenceDnd16Filled","PresenceDnd20Filled","PresenceDnd10Regular","PresenceDnd12Regular","PresenceDnd16Regular","PresenceDnd20Regular","PresenceOof10Regular","PresenceOof12Regular","PresenceOof16Regular","PresenceOof20Regular","PresenceOffline10Regular","PresenceOffline12Regular","PresenceOffline16Regular","PresenceOffline20Regular","PresenceUnknown10Regular","PresenceUnknown12Regular","PresenceUnknown16Regular","PresenceUnknown20Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAwFaA,uBAAAA;eAAAA;;IAbAC,wBAAAA;eAAAA;;IAbAC,kBAAAA;eAAAA;;IAbAC,mBAAAA;eAAAA;;IAoDAC,sBAAAA;eAAAA;;IAaAC,kBAAAA;eAAAA;;IAaAC,iBAAAA;eAAAA;;IAaAC,kBAAAA;eAAAA;;IA0BAC,sBAAAA;eAAAA;;IAbAC,kBAAAA;eAAAA;;IA0BAC,sBAAAA;eAAAA;;;;iEAnLU;4BA8ChB;AAGA,MAAMP,sBAAmF;IAC9F,kDAAkD;IAClD,qDAAqD;IACrDQ,MAAMC,iCAAAA;IACN,eAAeA,iCAAAA;IACfC,OAAOC,iCAAAA;IACPC,QAAQC,iCAAAA;IACRC,OAAOC,iCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,iCAAAA;AACjB;AAEO,MAAMhB,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDS,MAAMQ,gCAAAA;IACN,eAAeA,gCAAAA;IACfN,OAAOO,gCAAAA;IACPL,QAAQM,gCAAAA;IACRJ,OAAOK,gCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,gCAAAA;AACjB;AAEO,MAAMrB,2BAAwF;IACnG,kDAAkD;IAClD,qDAAqD;IACrDU,MAAMY,sCAAA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IACrD,eAAeA,gCAAAA;AACjB;AAEO,MAAMrC,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDE,MAAMoC,gCAAAA;IACN,eAAeA,gCAAAA;IACflC,OAAOmC,gCAAAA;IACPjC,QAAQkC,gCAAAA;IACRhC,OAAOiC,gCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,gCAAAA;AACjB;AAEO,MAAM1C,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDG,MAAMwC,oCAAAA;IACN,eAAeA,oCAAAA;IACftC,OAAOuC,oCAAAA;IACPrC,QAAQsC,oCAAAA;IACRpC,OAAOqC,oCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAAA;AACjB;AAEO,MAAM5C,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDC,MAAM4C,oCAAAA;IACN,eAAeA,oCAAAA;IACf1C,OAAO2C,oCAAAA;IACPzC,QAAQ0C,oCAAAA;IACRxC,OAAOyC,oCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAAA;AACjB"}
1
+ {"version":3,"sources":["../src/components/PresenceBadge/presenceIcons.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n PresenceAvailable10Regular,\n PresenceAvailable12Regular,\n PresenceAvailable16Regular,\n PresenceAvailable20Regular,\n PresenceAvailable10Filled,\n PresenceAvailable12Filled,\n PresenceAvailable16Filled,\n PresenceAvailable20Filled,\n PresenceAway10Regular,\n PresenceAway12Regular,\n PresenceAway16Regular,\n PresenceAway20Regular,\n PresenceAway10Filled,\n PresenceAway12Filled,\n PresenceAway16Filled,\n PresenceAway20Filled,\n PresenceBlocked10Regular,\n PresenceBlocked12Regular,\n PresenceBlocked16Regular,\n PresenceBlocked20Regular,\n PresenceBusy10Filled,\n PresenceBusy12Filled,\n PresenceBusy16Filled,\n PresenceBusy20Filled,\n PresenceDnd10Regular,\n PresenceDnd12Regular,\n PresenceDnd16Regular,\n PresenceDnd20Regular,\n PresenceDnd10Filled,\n PresenceDnd12Filled,\n PresenceDnd16Filled,\n PresenceDnd20Filled,\n PresenceOof10Regular,\n PresenceOof12Regular,\n PresenceOof16Regular,\n PresenceOof20Regular,\n PresenceOffline10Regular,\n PresenceOffline12Regular,\n PresenceOffline16Regular,\n PresenceOffline20Regular,\n PresenceUnknown10Regular,\n PresenceUnknown12Regular,\n PresenceUnknown16Regular,\n PresenceUnknown20Regular,\n} from '@fluentui/react-icons';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceAwayRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Regular,\n 'extra-small': PresenceAway10Regular,\n small: PresenceAway12Regular,\n medium: PresenceAway16Regular,\n large: PresenceAway20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Regular,\n};\n\nexport const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n large: PresenceAway20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Filled,\n};\n\nexport const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n large: PresenceAvailable20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Regular,\n};\n\nexport const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n large: PresenceAvailable20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Filled,\n};\n\nexport const presenceBlockedRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBlocked10Regular,\n 'extra-small': PresenceBlocked10Regular,\n small: PresenceBlocked12Regular,\n medium: PresenceBlocked16Regular,\n large: PresenceBlocked20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBlocked20Regular,\n};\n\nexport const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n large: PresenceBusy20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy20Filled,\n};\n\nexport const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n large: PresenceDnd20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Filled,\n};\n\nexport const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n large: PresenceDnd20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Regular,\n};\n\nexport const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n large: PresenceOof20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof20Regular,\n};\n\nexport const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n large: PresenceOffline20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline20Regular,\n};\n\nexport const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n large: PresenceUnknown20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown20Regular,\n};\n"],"names":["React","PresenceAvailable10Regular","PresenceAvailable12Regular","PresenceAvailable16Regular","PresenceAvailable20Regular","PresenceAvailable10Filled","PresenceAvailable12Filled","PresenceAvailable16Filled","PresenceAvailable20Filled","PresenceAway10Regular","PresenceAway12Regular","PresenceAway16Regular","PresenceAway20Regular","PresenceAway10Filled","PresenceAway12Filled","PresenceAway16Filled","PresenceAway20Filled","PresenceBlocked10Regular","PresenceBlocked12Regular","PresenceBlocked16Regular","PresenceBlocked20Regular","PresenceBusy10Filled","PresenceBusy12Filled","PresenceBusy16Filled","PresenceBusy20Filled","PresenceDnd10Regular","PresenceDnd12Regular","PresenceDnd16Regular","PresenceDnd20Regular","PresenceDnd10Filled","PresenceDnd12Filled","PresenceDnd16Filled","PresenceDnd20Filled","PresenceOof10Regular","PresenceOof12Regular","PresenceOof16Regular","PresenceOof20Regular","PresenceOffline10Regular","PresenceOffline12Regular","PresenceOffline16Regular","PresenceOffline20Regular","PresenceUnknown10Regular","PresenceUnknown12Regular","PresenceUnknown16Regular","PresenceUnknown20Regular","presenceAwayRegular","tiny","small","medium","large","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular"],"mappings":";;;;;;;;;;;IAwFaoD,uBAAAA;;;IAbAD,wBAAAA;;;sBAbAD;;;uBAbAL;;;0BAoDAQ;;;sBAaAC;;;IAaAC,iBAAAA;;;IAaAC,kBAAAA;;;0BA0BAE;;;sBAbAD;;;0BA0BAE;eAAAA;;;;iEAnLU,QAAQ;4BA8CxB,wBAAwB;AAGxB,MAAMd,sBAAmF;IAC9F,kDAAkD;IAClD,qDAAqD;IACrDC,MAAMrC,iCAAAA;IACN,eAAeA,iCAAAA;IACfsC,OAAOrC,iCAAAA;IACPsC,QAAQrC,iCAAAA;IACRsC,OAAOrC,iCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,iCAAAA;AACjB,EAAE;AAEK,MAAMsC,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDJ,MAAMjC,gCAAAA;IACN,eAAeA,gCAAAA;IACfkC,OAAOjC,gCAAAA;IACPkC,QAAQjC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,2BAAwF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDc,MAAMrB,gCAAAA;IACN,eAAeA,gCAAAA;IACfsB,OAAOrB,gCAAAA;IACPsB,QAAQrB,gCAAAA;IACRsB,OAAOrB,gCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,gCAAAA;AACjB,EAAE;AAEK,MAAM6B,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDX,MAAMb,gCAAAA;IACN,eAAeA,gCAAAA;IACfc,OAAOb,gCAAAA;IACPc,QAAQb,gCAAAA;IACRc,OAAOb,gCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,gCAAAA;AACjB,EAAE;AAEK,MAAMsB,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDZ,MAAMT,oCAAAA;IACN,eAAeA,oCAAAA;IACfU,OAAOT,oCAAAA;IACPU,QAAQT,oCAAAA;IACRU,OAAOT,oCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAAA;AACjB,EAAE;AAEK,+BAA4F;IACjG,kDAAkD;IAClD,qDAAqD;IACrDM,MAAML,oCAAAA;IACN,eAAeA,oCAAAA;IACfM,OAAOL,oCAAAA;IACPM,QAAQL,oCAAAA;IACRM,OAAOL,oCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAAA;AACjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/PresenceBadge/usePresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';\n\nconst iconMap = (status: PresenceBadgeState['status'], outOfOffice: boolean, size: PresenceBadgeState['size']) => {\n switch (status) {\n case 'available':\n return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];\n case 'away':\n return outOfOffice ? presenceOofRegular[size] : presenceAwayFilled[size];\n case 'blocked':\n return presenceBlockedRegular[size];\n case 'busy':\n return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];\n case 'do-not-disturb':\n return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];\n case 'offline':\n return outOfOffice ? presenceOofRegular[size] : presenceOfflineRegular[size];\n case 'out-of-office':\n return presenceOofRegular[size];\n case 'unknown':\n return presenceUnknownRegular[size];\n }\n};\n\nconst DEFAULT_STRINGS = {\n busy: 'busy',\n 'out-of-office': 'out of office',\n away: 'away',\n available: 'available',\n offline: 'offline',\n 'do-not-disturb': 'do not disturb',\n unknown: 'unknown',\n blocked: 'blocked',\n};\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge_unstable = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeState => {\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...useBadge_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? <IconElement /> : null,\n },\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref,\n ),\n status,\n outOfOffice,\n };\n\n return state;\n};\n"],"names":["usePresenceBadge_unstable","iconMap","status","outOfOffice","size","presenceAvailableRegular","presenceAvailableFilled","presenceOofRegular","presenceAwayFilled","presenceBlockedRegular","presenceUnknownRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOfflineRegular","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","props","ref","statusText","oofText","IconElement","state","useBadge_unstable","role","icon","slot","optional","defaultProps","children","React","createElement","renderByDefault","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAoDaA;;;eAAAA;;;;iEApDU;gCACF;+BAYd;uBAC2B;AAGlC,MAAMC,UAAU,CAACC,QAAsCC,aAAsBC;IAC3E,OAAQF;QACN,KAAK;YACH,OAAOC,cAAcE,uCAAwB,CAACD,KAAK,GAAGE,sCAAuB,CAACF,KAAK;QACrF,KAAK;YACH,OAAOD,cAAcI,iCAAkB,CAACH,KAAK,GAAGI,iCAAkB,CAACJ,KAAK;QAC1E,KAAK;YACH,OAAOK,qCAAsB,CAACL,KAAK;QACrC,KAAK;YACH,OAAOD,cAAcO,qCAAsB,CAACN,KAAK,GAAGO,iCAAkB,CAACP,KAAK;QAC9E,KAAK;YACH,OAAOD,cAAcS,iCAAkB,CAACR,KAAK,GAAGS,gCAAiB,CAACT,KAAK;QACzE,KAAK;YACH,OAAOD,cAAcI,iCAAkB,CAACH,KAAK,GAAGU,qCAAsB,CAACV,KAAK;QAC9E,KAAK;YACH,OAAOG,iCAAkB,CAACH,KAAK;QACjC,KAAK;YACH,OAAOM,qCAAsB,CAACN,KAAK;IACvC;AACF;AAEA,MAAMW,kBAAkB;IACtBC,MAAM;IACN,iBAAiB;IACjBC,MAAM;IACNC,WAAW;IACXC,SAAS;IACT,kBAAkB;IAClBC,SAAS;IACTC,SAAS;AACX;AAKO,MAAMrB,4BAA4B,CACvCsB,OACAC;IAEA,MAAM,EAAEnB,OAAO,QAAQ,EAAEF,SAAS,WAAW,EAAEC,cAAc,KAAK,EAAE,GAAGmB;IAEvE,MAAME,aAAaT,eAAe,CAACb,OAAO;IAC1C,MAAMuB,UAAUH,MAAMnB,WAAW,IAAImB,MAAMpB,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEa,eAAe,CAAC,gBAAgB,CAAC,CAAC,GAAG;IAEjH,MAAMW,cAAczB,QAAQC,QAAQC,aAAaC;IAEjD,MAAMuB,QAA4B;QAChC,GAAGC,IAAAA,wBAAAA,EACD;YACE,cAAcJ,aAAaC;YAC3BI,MAAM;YACN,GAAGP,KAAK;YACRlB;YACA0B,MAAMC,oBAAAA,CAAKC,QAAQ,CAACV,MAAMQ,IAAI,EAAE;gBAC9BG,cAAc;oBACZC,UAAUR,cAAAA,WAAAA,GAAcS,OAAAC,aAAA,CAACV,aAAAA,QAAiB;gBAC5C;gBACAW,iBAAiB;gBACjBC,aAAa;YACf;QACF,GACAf,IACD;QACDrB;QACAC;IACF;IAEA,OAAOwB;AACT"}
1
+ {"version":3,"sources":["../src/components/PresenceBadge/usePresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';\n\nconst iconMap = (status: PresenceBadgeState['status'], outOfOffice: boolean, size: PresenceBadgeState['size']) => {\n switch (status) {\n case 'available':\n return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];\n case 'away':\n return outOfOffice ? presenceOofRegular[size] : presenceAwayFilled[size];\n case 'blocked':\n return presenceBlockedRegular[size];\n case 'busy':\n return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];\n case 'do-not-disturb':\n return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];\n case 'offline':\n return outOfOffice ? presenceOofRegular[size] : presenceOfflineRegular[size];\n case 'out-of-office':\n return presenceOofRegular[size];\n case 'unknown':\n return presenceUnknownRegular[size];\n }\n};\n\nconst DEFAULT_STRINGS = {\n busy: 'busy',\n 'out-of-office': 'out of office',\n away: 'away',\n available: 'available',\n offline: 'offline',\n 'do-not-disturb': 'do not disturb',\n unknown: 'unknown',\n blocked: 'blocked',\n};\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge_unstable = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeState => {\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...useBadge_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? <IconElement /> : null,\n },\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref,\n ),\n status,\n outOfOffice,\n };\n\n return state;\n};\n"],"names":["React","slot","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","useBadge_unstable","iconMap","status","outOfOffice","size","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","usePresenceBadge_unstable","props","ref","statusText","oofText","IconElement","state","role","icon","optional","defaultProps","children","renderByDefault","elementType"],"mappings":";;;;+BAoDawB;;;;;;;iEApDU,QAAQ;gCACV,4BAA4B;+BAY1C,kBAAkB;uBACS,iBAAiB;AAGnD,MAAMX,UAAU,CAACC,QAAsCC,aAAsBC;IAC3E,OAAQF;QACN,KAAK;YACH,OAAOC,cAAcZ,uCAAwB,CAACa,KAAK,GAAGd,sCAAuB,CAACc,KAAK;QACrF,KAAK;YACH,OAAOD,cAAcL,iCAAkB,CAACM,KAAK,GAAGZ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