@fluentui/react-badge 9.4.15 → 9.5.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.md +20 -2
- package/dist/index.d.ts +39 -1
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/CounterBadge.js +1 -1
- package/lib/CounterBadge.js.map +1 -1
- package/lib/PresenceBadge.js +1 -1
- package/lib/PresenceBadge.js.map +1 -1
- package/lib/components/Badge/Badge.types.js.map +1 -1
- package/lib/components/Badge/index.js +1 -1
- package/lib/components/Badge/index.js.map +1 -1
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadge.js +18 -9
- package/lib/components/Badge/useBadge.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib/components/CounterBadge/index.js +1 -1
- package/lib/components/CounterBadge/index.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.js +18 -4
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib/components/PresenceBadge/index.js +1 -1
- package/lib/components/PresenceBadge/index.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.js +31 -9
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Badge.js +3 -0
- package/lib-commonjs/Badge.js.map +1 -1
- package/lib-commonjs/CounterBadge.js +3 -0
- package/lib-commonjs/CounterBadge.js.map +1 -1
- package/lib-commonjs/PresenceBadge.js +3 -0
- package/lib-commonjs/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
- package/lib-commonjs/components/Badge/index.js +3 -0
- package/lib-commonjs/components/Badge/index.js.map +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadge.js +24 -12
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/index.js +3 -0
- package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +23 -6
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js +3 -0
- package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +36 -10
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/index.js +9 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-badge
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 30 Mar 2026 14:35:48 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.5.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.5.1)
|
|
8
|
+
|
|
9
|
+
Mon, 30 Mar 2026 14:35:48 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.5.0..@fluentui/react-badge_v9.5.1)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: fix incorrect PresenceBadge aria-label ([PR #35927](https://github.com/microsoft/fluentui/pull/35927) by dmytrokirpa@microsoft.com)
|
|
15
|
+
|
|
16
|
+
## [9.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.5.0)
|
|
17
|
+
|
|
18
|
+
Thu, 26 Mar 2026 08:12:47 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.4.15..@fluentui/react-badge_v9.5.0)
|
|
20
|
+
|
|
21
|
+
### Minor changes
|
|
22
|
+
|
|
23
|
+
- feat: add base hooks for Badge ([PR #35811](https://github.com/microsoft/fluentui/pull/35811) by dmytrokirpa@microsoft.com)
|
|
24
|
+
|
|
7
25
|
## [9.4.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.4.15)
|
|
8
26
|
|
|
9
|
-
Wed, 25 Feb 2026 13:28
|
|
27
|
+
Wed, 25 Feb 2026 13:32:28 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.4.14..@fluentui/react-badge_v9.4.15)
|
|
11
29
|
|
|
12
30
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare const Badge: ForwardRefComponent<BadgeProps>;
|
|
13
13
|
|
|
14
|
+
export declare type BadgeBaseProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape' | 'size'>;
|
|
15
|
+
|
|
16
|
+
export declare type BadgeBaseState = Omit<BadgeState, 'appearance' | 'color' | 'shape' | 'size'>;
|
|
17
|
+
|
|
14
18
|
export declare const badgeClassNames: SlotClassNames<BadgeSlots>;
|
|
15
19
|
|
|
16
20
|
export declare type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {
|
|
@@ -53,6 +57,10 @@ export declare type BadgeState = ComponentState<BadgeSlots> & Required<Pick<Badg
|
|
|
53
57
|
*/
|
|
54
58
|
export declare const CounterBadge: ForwardRefComponent<CounterBadgeProps>;
|
|
55
59
|
|
|
60
|
+
export declare type CounterBadgeBaseProps = Omit<CounterBadgeProps, 'appearance' | 'color' | 'shape' | 'size'>;
|
|
61
|
+
|
|
62
|
+
export declare type CounterBadgeBaseState = Omit<CounterBadgeState, 'appearance' | 'color' | 'shape' | 'size'>;
|
|
63
|
+
|
|
56
64
|
export declare const counterBadgeClassNames: SlotClassNames<BadgeSlots>;
|
|
57
65
|
|
|
58
66
|
export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {
|
|
@@ -111,6 +119,10 @@ export declare const presenceAwayRegular: Record<PresenceBadgeState['size'], Rea
|
|
|
111
119
|
*/
|
|
112
120
|
export declare const PresenceBadge: ForwardRefComponent<PresenceBadgeProps>;
|
|
113
121
|
|
|
122
|
+
export declare type PresenceBadgeBaseProps = Omit<PresenceBadgeProps, 'size'>;
|
|
123
|
+
|
|
124
|
+
export declare type PresenceBadgeBaseState = Omit<PresenceBadgeState, 'appearance' | 'color' | 'shape' | 'size'>;
|
|
125
|
+
|
|
114
126
|
export declare const presenceBadgeClassNames: SlotClassNames<BadgeSlots>;
|
|
115
127
|
|
|
116
128
|
export declare type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> & Pick<BadgeProps, 'size'> & {
|
|
@@ -145,13 +157,21 @@ export declare const presenceOofRegular: Record<PresenceBadgeState['size'], Reac
|
|
|
145
157
|
|
|
146
158
|
export declare const presenceUnknownRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
|
|
147
159
|
|
|
148
|
-
export declare const renderBadge_unstable: (state:
|
|
160
|
+
export declare const renderBadge_unstable: (state: BadgeBaseState) => JSXElement;
|
|
149
161
|
|
|
150
162
|
/**
|
|
151
163
|
* Returns the props and state required to render the component
|
|
152
164
|
*/
|
|
153
165
|
export declare const useBadge_unstable: (props: BadgeProps, ref: React_2.Ref<HTMLElement>) => BadgeState;
|
|
154
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Base hook for Badge component, which manages state related to slots structure and ARIA attributes.
|
|
169
|
+
*
|
|
170
|
+
* @param props - User provided props to the Badge component.
|
|
171
|
+
* @param ref - User provided ref to be passed to the Badge component.
|
|
172
|
+
*/
|
|
173
|
+
export declare const useBadgeBase_unstable: (props: BadgeBaseProps, ref: React_2.Ref<HTMLDivElement>) => BadgeBaseState;
|
|
174
|
+
|
|
155
175
|
/**
|
|
156
176
|
* Applies style classnames to slots
|
|
157
177
|
*/
|
|
@@ -162,6 +182,14 @@ export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;
|
|
|
162
182
|
*/
|
|
163
183
|
export declare const useCounterBadge_unstable: (props: CounterBadgeProps, ref: React_2.Ref<HTMLElement>) => CounterBadgeState;
|
|
164
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Base hook for CounterBadge component, which manages state related to slots structure and counter logic.
|
|
187
|
+
*
|
|
188
|
+
* @param props - User provided props to the CounterBadge component.
|
|
189
|
+
* @param ref - User provided ref to be passed to the CounterBadge component.
|
|
190
|
+
*/
|
|
191
|
+
export declare const useCounterBadgeBase_unstable: (props: CounterBadgeBaseProps, ref: React_2.Ref<HTMLElement>) => CounterBadgeBaseState;
|
|
192
|
+
|
|
165
193
|
/**
|
|
166
194
|
* Applies style classnames to slots
|
|
167
195
|
*/
|
|
@@ -172,6 +200,16 @@ export declare const useCounterBadgeStyles_unstable: (state: CounterBadgeState)
|
|
|
172
200
|
*/
|
|
173
201
|
export declare const usePresenceBadge_unstable: (props: PresenceBadgeProps, ref: React_2.Ref<HTMLElement>) => PresenceBadgeState;
|
|
174
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Base hook for PresenceBadge component, which manages state related to presence status and ARIA attributes.
|
|
205
|
+
* Note: size is excluded from BaseProps as it is a design prop; icon selection uses the 'medium' size default.
|
|
206
|
+
* To render size-specific icons, use the full usePresenceBadge_unstable hook.
|
|
207
|
+
*
|
|
208
|
+
* @param props - User provided props to the PresenceBadge component.
|
|
209
|
+
* @param ref - User provided ref to be passed to the PresenceBadge component.
|
|
210
|
+
*/
|
|
211
|
+
export declare const usePresenceBadgeBase_unstable: (props: PresenceBadgeBaseProps, ref: React_2.Ref<HTMLElement>) => PresenceBadgeBaseState;
|
|
212
|
+
|
|
175
213
|
/**
|
|
176
214
|
* Applies style classnames to slots
|
|
177
215
|
*/
|
package/lib/Badge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './components/Badge/index';
|
|
1
|
+
export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable, useBadgeBase_unstable } from './components/Badge/index';
|
package/lib/Badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Badge.ts"],"sourcesContent":["export type { BadgeProps, BadgeSlots, BadgeState } from './components/Badge/index';\nexport {\n Badge,\n badgeClassNames,\n renderBadge_unstable,\n useBadgeStyles_unstable,\n useBadge_unstable,\n} from './components/Badge/index';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable"],"mappings":"AACA,SACEA,KAAK,EACLC,eAAe,EACfC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,
|
|
1
|
+
{"version":3,"sources":["../src/Badge.ts"],"sourcesContent":["export type { BadgeBaseProps, BadgeProps, BadgeSlots, BadgeBaseState, BadgeState } from './components/Badge/index';\nexport {\n Badge,\n badgeClassNames,\n renderBadge_unstable,\n useBadgeStyles_unstable,\n useBadge_unstable,\n useBadgeBase_unstable,\n} from './components/Badge/index';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","useBadgeBase_unstable"],"mappings":"AACA,SACEA,KAAK,EACLC,eAAe,EACfC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,EACjBC,qBAAqB,QAChB,2BAA2B"}
|
package/lib/CounterBadge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable } from './components/CounterBadge/index';
|
|
1
|
+
export { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable, useCounterBadgeBase_unstable } from './components/CounterBadge/index';
|
package/lib/CounterBadge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/CounterBadge.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/CounterBadge.ts"],"sourcesContent":["export type {\n CounterBadgeProps,\n CounterBadgeState,\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n} from './components/CounterBadge/index';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n useCounterBadgeBase_unstable,\n} from './components/CounterBadge/index';\n"],"names":["CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable","useCounterBadgeBase_unstable"],"mappings":"AAMA,SACEA,YAAY,EACZC,sBAAsB,EACtBC,8BAA8B,EAC9BC,wBAAwB,EACxBC,4BAA4B,QACvB,kCAAkC"}
|
package/lib/PresenceBadge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PresenceBadge, presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceAwayRegular, presenceBadgeClassNames, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable } from './components/PresenceBadge/index';
|
|
1
|
+
export { PresenceBadge, presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceAwayRegular, presenceBadgeClassNames, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, usePresenceBadgeBase_unstable } from './components/PresenceBadge/index';
|
package/lib/PresenceBadge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/PresenceBadge.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/PresenceBadge.ts"],"sourcesContent":["export type {\n PresenceBadgeProps,\n PresenceBadgeState,\n PresenceBadgeStatus,\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n} from './components/PresenceBadge/index';\nexport {\n PresenceBadge,\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceAwayRegular,\n presenceBadgeClassNames,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_unstable,\n usePresenceBadgeBase_unstable,\n} from './components/PresenceBadge/index';\n"],"names":["PresenceBadge","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBadgeClassNames","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","usePresenceBadgeBase_unstable"],"mappings":"AAOA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,wBAAwB,EACxBC,kBAAkB,EAClBC,mBAAmB,EACnBC,uBAAuB,EACvBC,sBAAsB,EACtBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,kBAAkB,EAClBC,sBAAsB,EACtBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,6BAA6B,QACxB,mCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/Badge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type BadgeSlots = {\n root: Slot<'div'>;\n icon?: Slot<'span'>;\n};\n\n// react has a non-standard `color` attribute in its types\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a4ab0fa432320e70da9e51c8ae2e47377f65804b/types/react/index.d.ts#L1868\nexport type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {\n /**\n * A Badge can be filled, outline, ghost, inverted\n * @defaultvalue filled\n */\n appearance?: 'filled' | 'ghost' | 'outline' | 'tint';\n\n /**\n * A Badge can be one of preset colors\n * @defaultvalue brand\n */\n color?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';\n\n /**\n * A Badge can position the icon before or after the content.\n * @defaultvalue before\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A Badge can be square, circular or rounded.\n * @defaultvalue circular\n */\n shape?: 'circular' | 'rounded' | 'square';\n\n /**\n * A Badge can be on of several preset sizes.\n * @defaultvalue medium\n */\n size?: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';\n};\n\nexport type BadgeState = ComponentState<BadgeSlots> &\n Required<Pick<BadgeProps, 'appearance' | 'color' | 'iconPosition' | 'shape' | 'size'>>;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/Badge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type BadgeSlots = {\n root: Slot<'div'>;\n icon?: Slot<'span'>;\n};\n\n// react has a non-standard `color` attribute in its types\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a4ab0fa432320e70da9e51c8ae2e47377f65804b/types/react/index.d.ts#L1868\nexport type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {\n /**\n * A Badge can be filled, outline, ghost, inverted\n * @defaultvalue filled\n */\n appearance?: 'filled' | 'ghost' | 'outline' | 'tint';\n\n /**\n * A Badge can be one of preset colors\n * @defaultvalue brand\n */\n color?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';\n\n /**\n * A Badge can position the icon before or after the content.\n * @defaultvalue before\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A Badge can be square, circular or rounded.\n * @defaultvalue circular\n */\n shape?: 'circular' | 'rounded' | 'square';\n\n /**\n * A Badge can be on of several preset sizes.\n * @defaultvalue medium\n */\n size?: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';\n};\n\nexport type BadgeState = ComponentState<BadgeSlots> &\n Required<Pick<BadgeProps, 'appearance' | 'color' | 'iconPosition' | 'shape' | 'size'>>;\n\nexport type BadgeBaseProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape' | 'size'>;\n\nexport type BadgeBaseState = Omit<BadgeState, 'appearance' | 'color' | 'shape' | 'size'>;\n"],"names":[],"mappings":"AA8CA,WAAyF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Badge } from './Badge';
|
|
2
2
|
export { renderBadge_unstable } from './renderBadge';
|
|
3
|
-
export { useBadge_unstable } from './useBadge';
|
|
3
|
+
export { useBadge_unstable, useBadgeBase_unstable } from './useBadge';
|
|
4
4
|
export { badgeClassNames, useBadgeStyles_unstable } from './useBadgeStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/index.ts"],"sourcesContent":["export { Badge } from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport { renderBadge_unstable } from './renderBadge';\nexport { useBadge_unstable } from './useBadge';\nexport { badgeClassNames, useBadgeStyles_unstable } from './useBadgeStyles.styles';\n"],"names":["Badge","renderBadge_unstable","useBadge_unstable","badgeClassNames","useBadgeStyles_unstable"],"mappings":"AAAA,SAASA,KAAK,QAAQ,UAAU;AAGhC,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/index.ts"],"sourcesContent":["export { Badge } from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeBaseProps, BadgeBaseState, BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport { renderBadge_unstable } from './renderBadge';\nexport { useBadge_unstable, useBadgeBase_unstable } from './useBadge';\nexport { badgeClassNames, useBadgeStyles_unstable } from './useBadgeStyles.styles';\n"],"names":["Badge","renderBadge_unstable","useBadge_unstable","useBadgeBase_unstable","badgeClassNames","useBadgeStyles_unstable"],"mappings":"AAAA,SAASA,KAAK,QAAQ,UAAU;AAGhC,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,EAAEC,qBAAqB,QAAQ,aAAa;AACtE,SAASC,eAAe,EAAEC,uBAAuB,QAAQ,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { BadgeBaseState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeBaseState): JSXElement => {\n assertSlots<BadgeSlots>(state);\n\n return (\n <state.root>\n {state.iconPosition === 'before' && state.icon && <state.icon />}\n {state.root.children}\n {state.iconPosition === 'after' && state.icon && <state.icon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderBadge_unstable","state","root","iconPosition","icon","children"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAKxD,OAAO,MAAMC,uBAAuB,CAACC;IACnCF,YAAwBE;IAExB,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,YAAY,KAAK,YAAYF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;YAC5DH,MAAMC,IAAI,CAACG,QAAQ;YACnBJ,MAAME,YAAY,KAAK,WAAWF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;;;AAGlE,EAAE"}
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
4
|
/**
|
|
4
5
|
* Returns the props and state required to render the component
|
|
5
6
|
*/ export const useBadge_unstable = (props, ref)=>{
|
|
6
|
-
const { shape = 'circular', size = 'medium',
|
|
7
|
-
const state =
|
|
7
|
+
const { shape = 'circular', size = 'medium', appearance = 'filled', color = 'brand', ...badgeProps } = props;
|
|
8
|
+
const state = useBadgeBase_unstable(badgeProps, ref);
|
|
9
|
+
return {
|
|
10
|
+
...state,
|
|
8
11
|
shape,
|
|
9
12
|
size,
|
|
10
|
-
iconPosition,
|
|
11
13
|
appearance,
|
|
12
|
-
color
|
|
14
|
+
color
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Base hook for Badge component, which manages state related to slots structure and ARIA attributes.
|
|
19
|
+
*
|
|
20
|
+
* @param props - User provided props to the Badge component.
|
|
21
|
+
* @param ref - User provided ref to be passed to the Badge component.
|
|
22
|
+
*/ export const useBadgeBase_unstable = (props, ref)=>{
|
|
23
|
+
const { iconPosition = 'before' } = props;
|
|
24
|
+
return {
|
|
25
|
+
iconPosition,
|
|
13
26
|
components: {
|
|
14
27
|
root: 'div',
|
|
15
28
|
icon: 'span'
|
|
16
29
|
},
|
|
17
30
|
root: slot.always(getIntrinsicElementProps('div', {
|
|
18
|
-
|
|
19
|
-
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
20
|
-
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
21
|
-
ref: ref,
|
|
31
|
+
ref,
|
|
22
32
|
...props
|
|
23
33
|
}), {
|
|
24
34
|
elementType: 'div'
|
|
@@ -27,5 +37,4 @@ import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
|
27
37
|
elementType: 'span'
|
|
28
38
|
})
|
|
29
39
|
};
|
|
30
|
-
return state;
|
|
31
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/useBadge.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/useBadge.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { BadgeBaseProps, BadgeBaseState, BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge_unstable = (props: BadgeProps, ref: React.Ref<HTMLElement>): BadgeState => {\n const { shape = 'circular', size = 'medium', appearance = 'filled', color = 'brand', ...badgeProps } = props;\n\n const state = useBadgeBase_unstable(badgeProps, ref as React.Ref<HTMLDivElement>);\n\n return {\n ...state,\n shape,\n size,\n appearance,\n color,\n };\n};\n\n/**\n * Base hook for Badge component, which manages state related to slots structure and ARIA attributes.\n *\n * @param props - User provided props to the Badge component.\n * @param ref - User provided ref to be passed to the Badge component.\n */\nexport const useBadgeBase_unstable = (props: BadgeBaseProps, ref: React.Ref<HTMLDivElement>): BadgeBaseState => {\n const { iconPosition = 'before' } = props;\n\n return {\n iconPosition,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useBadge_unstable","props","ref","shape","size","appearance","color","badgeProps","state","useBadgeBase_unstable","iconPosition","components","root","icon","always","elementType","optional"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;CAEC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EAAEC,QAAQ,UAAU,EAAEC,OAAO,QAAQ,EAAEC,aAAa,QAAQ,EAAEC,QAAQ,OAAO,EAAE,GAAGC,YAAY,GAAGN;IAEvG,MAAMO,QAAQC,sBAAsBF,YAAYL;IAEhD,OAAO;QACL,GAAGM,KAAK;QACRL;QACAC;QACAC;QACAC;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAMG,wBAAwB,CAACR,OAAuBC;IAC3D,MAAM,EAAEQ,eAAe,QAAQ,EAAE,GAAGT;IAEpC,OAAO;QACLS;QACAC,YAAY;YACVC,MAAM;YACNC,MAAM;QACR;QACAD,MAAMb,KAAKe,MAAM,CACfhB,yBAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEc,aAAa;QAAM;QAEvBF,MAAMd,KAAKiB,QAAQ,CAACf,MAAMY,IAAI,EAAE;YAAEE,aAAa;QAAO;IACxD;AACF,EAAE"}
|
|
@@ -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":[],"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\nexport type CounterBadgeBaseProps = Omit<CounterBadgeProps, 'appearance' | 'color' | 'shape' | 'size'>;\n\nexport type CounterBadgeBaseState = Omit<CounterBadgeState, 'appearance' | 'color' | 'shape' | 'size'>;\n"],"names":[],"mappings":"AAsDA,WAAuG"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { CounterBadge } from './CounterBadge';
|
|
2
|
-
export { useCounterBadge_unstable } from './useCounterBadge';
|
|
2
|
+
export { useCounterBadge_unstable, useCounterBadgeBase_unstable } from './useCounterBadge';
|
|
3
3
|
export { counterBadgeClassNames, useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CounterBadge/index.ts"],"sourcesContent":["export { CounterBadge } from './CounterBadge';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/CounterBadge/index.ts"],"sourcesContent":["export { CounterBadge } from './CounterBadge';\nexport type {\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n CounterBadgeProps,\n CounterBadgeState,\n} from './CounterBadge.types';\nexport { useCounterBadge_unstable, useCounterBadgeBase_unstable } from './useCounterBadge';\nexport { counterBadgeClassNames, useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\n"],"names":["CounterBadge","useCounterBadge_unstable","useCounterBadgeBase_unstable","counterBadgeClassNames","useCounterBadgeStyles_unstable"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAO9C,SAASC,wBAAwB,EAAEC,4BAA4B,QAAQ,oBAAoB;AAC3F,SAASC,sBAAsB,EAAEC,8BAA8B,QAAQ,iCAAiC"}
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useBadgeBase_unstable } from '../Badge/index';
|
|
4
4
|
/**
|
|
5
5
|
* Returns the props and state required to render the component
|
|
6
6
|
*/ export const useCounterBadge_unstable = (props, ref)=>{
|
|
7
|
-
const { shape = 'circular', appearance = 'filled',
|
|
8
|
-
const state =
|
|
9
|
-
|
|
7
|
+
const { shape = 'circular', appearance = 'filled', color = 'brand', size = 'medium', ...counterBadgeProps } = props;
|
|
8
|
+
const state = useCounterBadgeBase_unstable(counterBadgeProps, ref);
|
|
9
|
+
return {
|
|
10
|
+
...state,
|
|
10
11
|
shape,
|
|
11
12
|
appearance,
|
|
13
|
+
color,
|
|
14
|
+
size
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Base hook for CounterBadge component, which manages state related to slots structure and counter logic.
|
|
19
|
+
*
|
|
20
|
+
* @param props - User provided props to the CounterBadge component.
|
|
21
|
+
* @param ref - User provided ref to be passed to the CounterBadge component.
|
|
22
|
+
*/ export const useCounterBadgeBase_unstable = (props, ref)=>{
|
|
23
|
+
const { showZero = false, overflowCount = 99, count = 0, dot = false, ...badgeProps } = props;
|
|
24
|
+
const state = {
|
|
25
|
+
...useBadgeBase_unstable(badgeProps, ref),
|
|
12
26
|
showZero,
|
|
13
27
|
count,
|
|
14
28
|
dot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CounterBadge/useCounterBadge.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport
|
|
1
|
+
{"version":3,"sources":["../src/components/CounterBadge/useCounterBadge.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useBadgeBase_unstable } from '../Badge/index';\nimport type {\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n CounterBadgeProps,\n CounterBadgeState,\n} 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 { shape = 'circular', appearance = 'filled', color = 'brand', size = 'medium', ...counterBadgeProps } = props;\n\n const state = useCounterBadgeBase_unstable(counterBadgeProps, ref);\n\n return {\n ...state,\n shape,\n appearance,\n color,\n size,\n };\n};\n\n/**\n * Base hook for CounterBadge component, which manages state related to slots structure and counter logic.\n *\n * @param props - User provided props to the CounterBadge component.\n * @param ref - User provided ref to be passed to the CounterBadge component.\n */\nexport const useCounterBadgeBase_unstable = (\n props: CounterBadgeBaseProps,\n ref: React.Ref<HTMLElement>,\n): CounterBadgeBaseState => {\n const { showZero = false, overflowCount = 99, count = 0, dot = false, ...badgeProps } = props;\n\n const state: CounterBadgeBaseState = {\n ...useBadgeBase_unstable(badgeProps, ref as React.Ref<HTMLDivElement>),\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","useBadgeBase_unstable","useCounterBadge_unstable","props","ref","shape","appearance","color","size","counterBadgeProps","state","useCounterBadgeBase_unstable","showZero","overflowCount","count","dot","badgeProps","root","children"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AAQvD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,UAAU,EAAEC,aAAa,QAAQ,EAAEC,QAAQ,OAAO,EAAEC,OAAO,QAAQ,EAAE,GAAGC,mBAAmB,GAAGN;IAE9G,MAAMO,QAAQC,6BAA6BF,mBAAmBL;IAE9D,OAAO;QACL,GAAGM,KAAK;QACRL;QACAC;QACAC;QACAC;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAMG,+BAA+B,CAC1CR,OACAC;IAEA,MAAM,EAAEQ,WAAW,KAAK,EAAEC,gBAAgB,EAAE,EAAEC,QAAQ,CAAC,EAAEC,MAAM,KAAK,EAAE,GAAGC,YAAY,GAAGb;IAExF,MAAMO,QAA+B;QACnC,GAAGT,sBAAsBe,YAAYZ,IAAiC;QACtEQ;QACAE;QACAC;IACF;IAEA,IAAI,AAACD,CAAAA,UAAU,KAAKF,QAAO,KAAM,CAACG,OAAO,CAACL,MAAMO,IAAI,CAACC,QAAQ,EAAE;QAC7DR,MAAMO,IAAI,CAACC,QAAQ,GAAGJ,QAAQD,gBAAgB,GAAGA,cAAc,CAAC,CAAC,GAAG,GAAGC,OAAO;IAChF;IAEA,OAAOJ;AACT,EAAE"}
|
|
@@ -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":[],"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\nexport type PresenceBadgeBaseProps = Omit<PresenceBadgeProps, 'size'>;\n\nexport type PresenceBadgeBaseState = Omit<PresenceBadgeState, 'appearance' | 'color' | 'shape' | 'size'>;\n"],"names":[],"mappings":"AAmCA,WAAyG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { PresenceBadge } from './PresenceBadge';
|
|
2
|
-
export { usePresenceBadge_unstable } from './usePresenceBadge';
|
|
2
|
+
export { usePresenceBadge_unstable, usePresenceBadgeBase_unstable } from './usePresenceBadge';
|
|
3
3
|
export { presenceBadgeClassNames, usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';
|
|
4
4
|
export { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceAwayRegular, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/PresenceBadge/index.ts"],"sourcesContent":["export { PresenceBadge } from './PresenceBadge';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/PresenceBadge/index.ts"],"sourcesContent":["export { PresenceBadge } from './PresenceBadge';\nexport type {\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n PresenceBadgeProps,\n PresenceBadgeState,\n PresenceBadgeStatus,\n} from './PresenceBadge.types';\nexport { usePresenceBadge_unstable, usePresenceBadgeBase_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","usePresenceBadgeBase_unstable","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular"],"mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;AAQhD,SAASC,yBAAyB,EAAEC,6BAA6B,QAAQ,qBAAqB;AAC9F,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,kCAAkC;AAC3G,SACEC,uBAAuB,EACvBC,wBAAwB,EACxBC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,EACtBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,kBAAkB,EAClBC,sBAAsB,QACjB,kBAAkB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { slot } from '@fluentui/react-utilities';
|
|
4
4
|
import { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
|
|
5
|
-
import {
|
|
5
|
+
import { useBadgeBase_unstable } from '../Badge/index';
|
|
6
6
|
const iconMap = (status, outOfOffice, size)=>{
|
|
7
7
|
switch(status){
|
|
8
8
|
case 'available':
|
|
@@ -23,7 +23,7 @@ const iconMap = (status, outOfOffice, size)=>{
|
|
|
23
23
|
return presenceUnknownRegular[size];
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const DEFAULT_STRINGS = {
|
|
26
|
+
export const DEFAULT_STRINGS = {
|
|
27
27
|
busy: 'busy',
|
|
28
28
|
'out-of-office': 'out of office',
|
|
29
29
|
away: 'away',
|
|
@@ -36,20 +36,42 @@ const DEFAULT_STRINGS = {
|
|
|
36
36
|
/**
|
|
37
37
|
* Returns the props and state required to render the component
|
|
38
38
|
*/ export const usePresenceBadge_unstable = (props, ref)=>{
|
|
39
|
-
const { size = 'medium',
|
|
39
|
+
const { size = 'medium', outOfOffice = false, ...baseProps } = props;
|
|
40
|
+
var _props_status;
|
|
41
|
+
const status = (_props_status = props.status) !== null && _props_status !== void 0 ? _props_status : 'available';
|
|
42
|
+
const IconElement = iconMap(status, outOfOffice, size);
|
|
43
|
+
const state = {
|
|
44
|
+
...usePresenceBadgeBase_unstable(baseProps, ref),
|
|
45
|
+
appearance: 'filled',
|
|
46
|
+
color: 'brand',
|
|
47
|
+
shape: 'circular',
|
|
48
|
+
size,
|
|
49
|
+
outOfOffice
|
|
50
|
+
};
|
|
51
|
+
if (state.icon) {
|
|
52
|
+
var _state_icon;
|
|
53
|
+
var _children;
|
|
54
|
+
(_children = (_state_icon = state.icon).children) !== null && _children !== void 0 ? _children : _state_icon.children = /*#__PURE__*/ React.createElement(IconElement, null);
|
|
55
|
+
}
|
|
56
|
+
return state;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Base hook for PresenceBadge component, which manages state related to presence status and ARIA attributes.
|
|
60
|
+
* Note: size is excluded from BaseProps as it is a design prop; icon selection uses the 'medium' size default.
|
|
61
|
+
* To render size-specific icons, use the full usePresenceBadge_unstable hook.
|
|
62
|
+
*
|
|
63
|
+
* @param props - User provided props to the PresenceBadge component.
|
|
64
|
+
* @param ref - User provided ref to be passed to the PresenceBadge component.
|
|
65
|
+
*/ export const usePresenceBadgeBase_unstable = (props, ref)=>{
|
|
66
|
+
const { status = 'available', outOfOffice = false } = props;
|
|
40
67
|
const statusText = DEFAULT_STRINGS[status];
|
|
41
68
|
const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';
|
|
42
|
-
const IconElement = iconMap(status, outOfOffice, size);
|
|
43
69
|
const state = {
|
|
44
|
-
...
|
|
70
|
+
...useBadgeBase_unstable({
|
|
45
71
|
'aria-label': statusText + oofText,
|
|
46
72
|
role: 'img',
|
|
47
73
|
...props,
|
|
48
|
-
size,
|
|
49
74
|
icon: slot.optional(props.icon, {
|
|
50
|
-
defaultProps: {
|
|
51
|
-
children: IconElement ? /*#__PURE__*/ React.createElement(IconElement, null) : null
|
|
52
|
-
},
|
|
53
75
|
renderByDefault: true,
|
|
54
76
|
elementType: 'span'
|
|
55
77
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/PresenceBadge/usePresenceBadge.tsx"],"sourcesContent":["'use client';\n\nimport * 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 {
|
|
1
|
+
{"version":3,"sources":["../src/components/PresenceBadge/usePresenceBadge.tsx"],"sourcesContent":["'use client';\n\nimport * 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 { useBadgeBase_unstable } from '../Badge/index';\nimport type {\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n PresenceBadgeProps,\n PresenceBadgeState,\n} 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\nexport const 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', outOfOffice = false, ...baseProps } = props;\n const status = props.status ?? 'available';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...usePresenceBadgeBase_unstable(baseProps, ref),\n appearance: 'filled',\n color: 'brand',\n shape: 'circular',\n size,\n outOfOffice,\n };\n\n if (state.icon) {\n state.icon.children ??= <IconElement />;\n }\n\n return state;\n};\n\n/**\n * Base hook for PresenceBadge component, which manages state related to presence status and ARIA attributes.\n * Note: size is excluded from BaseProps as it is a design prop; icon selection uses the 'medium' size default.\n * To render size-specific icons, use the full usePresenceBadge_unstable hook.\n *\n * @param props - User provided props to the PresenceBadge component.\n * @param ref - User provided ref to be passed to the PresenceBadge component.\n */\nexport const usePresenceBadgeBase_unstable = (\n props: PresenceBadgeBaseProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeBaseState => {\n const { 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 state: PresenceBadgeBaseState = {\n ...useBadgeBase_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n icon: slot.optional(props.icon, {\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref as React.Ref<HTMLDivElement>,\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","useBadgeBase_unstable","iconMap","status","outOfOffice","size","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","usePresenceBadge_unstable","props","ref","baseProps","IconElement","state","usePresenceBadgeBase_unstable","appearance","color","shape","icon","children","statusText","oofText","role","optional","renderByDefault","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,IAAI,QAAQ,4BAA4B;AACjD,SACEC,uBAAuB,EACvBC,wBAAwB,EACxBC,kBAAkB,EAClBC,sBAAsB,EACtBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,kBAAkB,EAClBC,sBAAsB,QACjB,kBAAkB;AACzB,SAASC,qBAAqB,QAAQ,iBAAiB;AAQvD,MAAMC,UAAU,CAACC,QAAsCC,aAAsBC;IAC3E,OAAQF;QACN,KAAK;YACH,OAAOC,cAAcZ,wBAAwB,CAACa,KAAK,GAAGd,uBAAuB,CAACc,KAAK;QACrF,KAAK;YACH,OAAOD,cAAcL,kBAAkB,CAACM,KAAK,GAAGZ,kBAAkB,CAACY,KAAK;QAC1E,KAAK;YACH,OAAOX,sBAAsB,CAACW,KAAK;QACrC,KAAK;YACH,OAAOD,cAAcJ,sBAAsB,CAACK,KAAK,GAAGV,kBAAkB,CAACU,KAAK;QAC9E,KAAK;YACH,OAAOD,cAAcP,kBAAkB,CAACQ,KAAK,GAAGT,iBAAiB,CAACS,KAAK;QACzE,KAAK;YACH,OAAOD,cAAcL,kBAAkB,CAACM,KAAK,GAAGP,sBAAsB,CAACO,KAAK;QAC9E,KAAK;YACH,OAAON,kBAAkB,CAACM,KAAK;QACjC,KAAK;YACH,OAAOL,sBAAsB,CAACK,KAAK;IACvC;AACF;AAEA,OAAO,MAAMC,kBAAkB;IAC7BC,MAAM;IACN,iBAAiB;IACjBC,MAAM;IACNC,WAAW;IACXC,SAAS;IACT,kBAAkB;IAClBC,SAAS;IACTC,SAAS;AACX,EAAE;AAEF;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEV,OAAO,QAAQ,EAAED,cAAc,KAAK,EAAE,GAAGY,WAAW,GAAGF;QAChDA;IAAf,MAAMX,SAASW,CAAAA,gBAAAA,MAAMX,MAAM,cAAZW,2BAAAA,gBAAgB;IAE/B,MAAMG,cAAcf,QAAQC,QAAQC,aAAaC;IAEjD,MAAMa,QAA4B;QAChC,GAAGC,8BAA8BH,WAAWD,IAAI;QAChDK,YAAY;QACZC,OAAO;QACPC,OAAO;QACPjB;QACAD;IACF;IAEA,IAAIc,MAAMK,IAAI,EAAE;YACdL;;QAAAA,cAAAA,cAAAA,MAAMK,IAAI,EAACC,yDAAXN,YAAWM,yBAAa,oBAACP;IAC3B;IAEA,OAAOC;AACT,EAAE;AAEF;;;;;;;CAOC,GACD,OAAO,MAAMC,gCAAgC,CAC3CL,OACAC;IAEA,MAAM,EAAEZ,SAAS,WAAW,EAAEC,cAAc,KAAK,EAAE,GAAGU;IAEtD,MAAMW,aAAanB,eAAe,CAACH,OAAO;IAC1C,MAAMuB,UAAUZ,MAAMV,WAAW,IAAIU,MAAMX,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEG,eAAe,CAAC,gBAAgB,EAAE,GAAG;IAEjH,MAAMY,QAAgC;QACpC,GAAGjB,sBACD;YACE,cAAcwB,aAAaC;YAC3BC,MAAM;YACN,GAAGb,KAAK;YACRS,MAAMjC,KAAKsC,QAAQ,CAACd,MAAMS,IAAI,EAAE;gBAC9BM,iBAAiB;gBACjBC,aAAa;YACf;QACF,GACAf,IACD;QACDZ;QACAC;IACF;IAEA,OAAOc;AACT,EAAE"}
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';
|
|
2
|
-
export { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, presenceAwayRegular, presenceAwayFilled, presenceAvailableRegular, presenceAvailableFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndRegular, presenceDndFilled, presenceOofRegular, presenceOfflineRegular, presenceUnknownRegular } from './PresenceBadge';
|
|
3
|
-
export { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable } from './CounterBadge';
|
|
1
|
+
export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable, useBadgeBase_unstable } from './Badge';
|
|
2
|
+
export { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, usePresenceBadgeBase_unstable, presenceAwayRegular, presenceAwayFilled, presenceAvailableRegular, presenceAvailableFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndRegular, presenceDndFilled, presenceOofRegular, presenceOfflineRegular, presenceUnknownRegular } from './PresenceBadge';
|
|
3
|
+
export { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable, useCounterBadgeBase_unstable } from './CounterBadge';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Badge,\n badgeClassNames,\n renderBadge_unstable,\n useBadgeStyles_unstable,\n useBadge_unstable,\n useBadgeBase_unstable,\n} from './Badge';\nexport type { BadgeProps, BadgeSlots, BadgeState, BadgeBaseProps, BadgeBaseState } from './Badge';\nexport {\n PresenceBadge,\n presenceBadgeClassNames,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_unstable,\n usePresenceBadgeBase_unstable,\n presenceAwayRegular,\n presenceAwayFilled,\n presenceAvailableRegular,\n presenceAvailableFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndRegular,\n presenceDndFilled,\n presenceOofRegular,\n presenceOfflineRegular,\n presenceUnknownRegular,\n} from './PresenceBadge';\nexport type {\n PresenceBadgeProps,\n PresenceBadgeState,\n PresenceBadgeStatus,\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n} from './PresenceBadge';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n useCounterBadgeBase_unstable,\n} from './CounterBadge';\nexport type {\n CounterBadgeProps,\n CounterBadgeState,\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n} from './CounterBadge';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","useBadgeBase_unstable","PresenceBadge","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","usePresenceBadgeBase_unstable","presenceAwayRegular","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular","CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable","useCounterBadgeBase_unstable"],"mappings":"AAAA,SACEA,KAAK,EACLC,eAAe,EACfC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,EACjBC,qBAAqB,QAChB,UAAU;AAEjB,SACEC,aAAa,EACbC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,6BAA6B,EAC7BC,mBAAmB,EACnBC,kBAAkB,EAClBC,wBAAwB,EACxBC,uBAAuB,EACvBC,sBAAsB,EACtBC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,sBAAsB,QACjB,kBAAkB;AAQzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,8BAA8B,EAC9BC,wBAAwB,EACxBC,4BAA4B,QACvB,iBAAiB"}
|
package/lib-commonjs/Badge.js
CHANGED
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
renderBadge_unstable: function() {
|
|
19
19
|
return _index.renderBadge_unstable;
|
|
20
20
|
},
|
|
21
|
+
useBadgeBase_unstable: function() {
|
|
22
|
+
return _index.useBadgeBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useBadgeStyles_unstable: function() {
|
|
22
25
|
return _index.useBadgeStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Badge.ts"],"sourcesContent":["export type { BadgeProps, BadgeSlots, BadgeState } from './components/Badge/index';\nexport {\n Badge,\n badgeClassNames,\n renderBadge_unstable,\n useBadgeStyles_unstable,\n useBadge_unstable,\n} from './components/Badge/index';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable"],"mappings":";;;;;;;;;;;;eAEEA,YAAK;;;eACLC,sBAAe;;;eACfC,2BAAoB;;;
|
|
1
|
+
{"version":3,"sources":["../src/Badge.ts"],"sourcesContent":["export type { BadgeBaseProps, BadgeProps, BadgeSlots, BadgeBaseState, BadgeState } from './components/Badge/index';\nexport {\n Badge,\n badgeClassNames,\n renderBadge_unstable,\n useBadgeStyles_unstable,\n useBadge_unstable,\n useBadgeBase_unstable,\n} from './components/Badge/index';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","useBadgeBase_unstable"],"mappings":";;;;;;;;;;;;eAEEA,YAAK;;;eACLC,sBAAe;;;eACfC,2BAAoB;;;eAGpBG,4BAAqB;;;eAFrBF,8BAAuB;;;eACvBC,wBAAiB;;;uBAEZ,2BAA2B"}
|
|
@@ -15,6 +15,9 @@ _export(exports, {
|
|
|
15
15
|
counterBadgeClassNames: function() {
|
|
16
16
|
return _index.counterBadgeClassNames;
|
|
17
17
|
},
|
|
18
|
+
useCounterBadgeBase_unstable: function() {
|
|
19
|
+
return _index.useCounterBadgeBase_unstable;
|
|
20
|
+
},
|
|
18
21
|
useCounterBadgeStyles_unstable: function() {
|
|
19
22
|
return _index.useCounterBadgeStyles_unstable;
|
|
20
23
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/CounterBadge.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/CounterBadge.ts"],"sourcesContent":["export type {\n CounterBadgeProps,\n CounterBadgeState,\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n} from './components/CounterBadge/index';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n useCounterBadgeBase_unstable,\n} from './components/CounterBadge/index';\n"],"names":["CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable","useCounterBadgeBase_unstable"],"mappings":";;;;;;;;;;;;eAOEA,mBAAY;;;eACZC,6BAAsB;;;eAGtBG,mCAA4B;;;eAF5BF,qCAA8B;;;eAC9BC,+BAAwB;;;uBAEnB,kCAAkC"}
|
|
@@ -48,6 +48,9 @@ _export(exports, {
|
|
|
48
48
|
presenceUnknownRegular: function() {
|
|
49
49
|
return _index.presenceUnknownRegular;
|
|
50
50
|
},
|
|
51
|
+
usePresenceBadgeBase_unstable: function() {
|
|
52
|
+
return _index.usePresenceBadgeBase_unstable;
|
|
53
|
+
},
|
|
51
54
|
usePresenceBadgeStyles_unstable: function() {
|
|
52
55
|
return _index.usePresenceBadgeStyles_unstable;
|
|
53
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/PresenceBadge.ts"],"sourcesContent":["export type {
|
|
1
|
+
{"version":3,"sources":["../src/PresenceBadge.ts"],"sourcesContent":["export type {\n PresenceBadgeProps,\n PresenceBadgeState,\n PresenceBadgeStatus,\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n} from './components/PresenceBadge/index';\nexport {\n PresenceBadge,\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceAwayRegular,\n presenceBadgeClassNames,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_unstable,\n usePresenceBadgeBase_unstable,\n} from './components/PresenceBadge/index';\n"],"names":["PresenceBadge","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBadgeClassNames","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","usePresenceBadgeBase_unstable"],"mappings":";;;;;;;;;;;IAQEA,aAAa;;;;eACbC,8BAAuB;;;eACvBC,+BAAwB;;;eACxBC,yBAAkB;;;eAClBC,0BAAmB;;;eACnBC,8BAAuB;;;eACvBC,6BAAsB;;;eACtBC,yBAAkB;;;eAClBC,wBAAiB;;;eACjBC,yBAAkB;;;eAClBC,6BAAsB;;;eACtBC,yBAAkB;;;eAClBC,6BAAsB;;;eAGtBG,oCAA6B;;;eAF7BF,sCAA+B;;;eAC/BC,gCAAyB;;;uBAEpB,mCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/Badge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type BadgeSlots = {\n root: Slot<'div'>;\n icon?: Slot<'span'>;\n};\n\n// react has a non-standard `color` attribute in its types\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a4ab0fa432320e70da9e51c8ae2e47377f65804b/types/react/index.d.ts#L1868\nexport type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {\n /**\n * A Badge can be filled, outline, ghost, inverted\n * @defaultvalue filled\n */\n appearance?: 'filled' | 'ghost' | 'outline' | 'tint';\n\n /**\n * A Badge can be one of preset colors\n * @defaultvalue brand\n */\n color?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';\n\n /**\n * A Badge can position the icon before or after the content.\n * @defaultvalue before\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A Badge can be square, circular or rounded.\n * @defaultvalue circular\n */\n shape?: 'circular' | 'rounded' | 'square';\n\n /**\n * A Badge can be on of several preset sizes.\n * @defaultvalue medium\n */\n size?: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';\n};\n\nexport type BadgeState = ComponentState<BadgeSlots> &\n Required<Pick<BadgeProps, 'appearance' | 'color' | 'iconPosition' | 'shape' | 'size'>>;\n"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/Badge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type BadgeSlots = {\n root: Slot<'div'>;\n icon?: Slot<'span'>;\n};\n\n// react has a non-standard `color` attribute in its types\n// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a4ab0fa432320e70da9e51c8ae2e47377f65804b/types/react/index.d.ts#L1868\nexport type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & {\n /**\n * A Badge can be filled, outline, ghost, inverted\n * @defaultvalue filled\n */\n appearance?: 'filled' | 'ghost' | 'outline' | 'tint';\n\n /**\n * A Badge can be one of preset colors\n * @defaultvalue brand\n */\n color?: 'brand' | 'danger' | 'important' | 'informative' | 'severe' | 'subtle' | 'success' | 'warning';\n\n /**\n * A Badge can position the icon before or after the content.\n * @defaultvalue before\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A Badge can be square, circular or rounded.\n * @defaultvalue circular\n */\n shape?: 'circular' | 'rounded' | 'square';\n\n /**\n * A Badge can be on of several preset sizes.\n * @defaultvalue medium\n */\n size?: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';\n};\n\nexport type BadgeState = ComponentState<BadgeSlots> &\n Required<Pick<BadgeProps, 'appearance' | 'color' | 'iconPosition' | 'shape' | 'size'>>;\n\nexport type BadgeBaseProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape' | 'size'>;\n\nexport type BadgeBaseState = Omit<BadgeState, 'appearance' | 'color' | 'shape' | 'size'>;\n"],"names":[],"mappings":""}
|
|
@@ -18,6 +18,9 @@ _export(exports, {
|
|
|
18
18
|
renderBadge_unstable: function() {
|
|
19
19
|
return _renderBadge.renderBadge_unstable;
|
|
20
20
|
},
|
|
21
|
+
useBadgeBase_unstable: function() {
|
|
22
|
+
return _useBadge.useBadgeBase_unstable;
|
|
23
|
+
},
|
|
21
24
|
useBadgeStyles_unstable: function() {
|
|
22
25
|
return _useBadgeStylesstyles.useBadgeStyles_unstable;
|
|
23
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/index.ts"],"sourcesContent":["export { Badge } from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport { renderBadge_unstable } from './renderBadge';\nexport { useBadge_unstable } from './useBadge';\nexport { badgeClassNames, useBadgeStyles_unstable } from './useBadgeStyles.styles';\n"],"names":["Badge","renderBadge_unstable","useBadge_unstable","badgeClassNames","useBadgeStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,YAAK;;;
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/index.ts"],"sourcesContent":["export { Badge } from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeBaseProps, BadgeBaseState, BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport { renderBadge_unstable } from './renderBadge';\nexport { useBadge_unstable, useBadgeBase_unstable } from './useBadge';\nexport { badgeClassNames, useBadgeStyles_unstable } from './useBadgeStyles.styles';\n"],"names":["Badge","renderBadge_unstable","useBadge_unstable","useBadgeBase_unstable","badgeClassNames","useBadgeStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,YAAK;;;eAKLI,qCAAe;;;eAFfH,iCAAoB;;;eACDE,+BAAqB;;;eACvBE,6CAAuB;;;eADxCH,2BAAiB;;;uBAJJ,UAAU;6BAGK,gBAAgB;0BACI,aAAa;sCACb,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { BadgeBaseState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeBaseState): JSXElement => {\n assertSlots<BadgeSlots>(state);\n\n return (\n <state.root>\n {state.iconPosition === 'before' && state.icon && <state.icon />}\n {state.root.children}\n {state.iconPosition === 'after' && state.icon && <state.icon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderBadge_unstable","state","root","iconPosition","icon","children"],"mappings":";;;;+BAQaC;;;;;;4BAPb,iCAAiD;gCAErB,4BAA4B;AAKjD,6BAA6B,CAACC;QACnCF,2BAAAA,EAAwBE;IAExB,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAME,YAAY,KAAK,YAAYF,MAAMG,IAAI,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,IAAI,EAAA,CAAA;YAC5DH,MAAMC,IAAI,CAACG,QAAQ;YACnBJ,MAAME,YAAY,KAAK,WAAWF,MAAMG,IAAI,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMG,IAAI,EAAA,CAAA;;;AAGlE,EAAE"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
"use strict";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", {
|
|
3
4
|
value: true
|
|
4
5
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
useBadgeBase_unstable: function() {
|
|
14
|
+
return useBadgeBase_unstable;
|
|
15
|
+
},
|
|
16
|
+
useBadge_unstable: function() {
|
|
8
17
|
return useBadge_unstable;
|
|
9
18
|
}
|
|
10
19
|
});
|
|
@@ -12,22 +21,26 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
21
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
22
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
14
23
|
const useBadge_unstable = (props, ref)=>{
|
|
15
|
-
const { shape = 'circular', size = 'medium',
|
|
16
|
-
const state =
|
|
24
|
+
const { shape = 'circular', size = 'medium', appearance = 'filled', color = 'brand', ...badgeProps } = props;
|
|
25
|
+
const state = useBadgeBase_unstable(badgeProps, ref);
|
|
26
|
+
return {
|
|
27
|
+
...state,
|
|
17
28
|
shape,
|
|
18
29
|
size,
|
|
19
|
-
iconPosition,
|
|
20
30
|
appearance,
|
|
21
|
-
color
|
|
31
|
+
color
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const useBadgeBase_unstable = (props, ref)=>{
|
|
35
|
+
const { iconPosition = 'before' } = props;
|
|
36
|
+
return {
|
|
37
|
+
iconPosition,
|
|
22
38
|
components: {
|
|
23
39
|
root: 'div',
|
|
24
40
|
icon: 'span'
|
|
25
41
|
},
|
|
26
42
|
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
|
27
|
-
|
|
28
|
-
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
29
|
-
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
30
|
-
ref: ref,
|
|
43
|
+
ref,
|
|
31
44
|
...props
|
|
32
45
|
}), {
|
|
33
46
|
elementType: 'div'
|
|
@@ -36,5 +49,4 @@ const useBadge_unstable = (props, ref)=>{
|
|
|
36
49
|
elementType: 'span'
|
|
37
50
|
})
|
|
38
51
|
};
|
|
39
|
-
return state;
|
|
40
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Badge/useBadge.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Badge/useBadge.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { BadgeBaseProps, BadgeBaseState, BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge_unstable = (props: BadgeProps, ref: React.Ref<HTMLElement>): BadgeState => {\n const { shape = 'circular', size = 'medium', appearance = 'filled', color = 'brand', ...badgeProps } = props;\n\n const state = useBadgeBase_unstable(badgeProps, ref as React.Ref<HTMLDivElement>);\n\n return {\n ...state,\n shape,\n size,\n appearance,\n color,\n };\n};\n\n/**\n * Base hook for Badge component, which manages state related to slots structure and ARIA attributes.\n *\n * @param props - User provided props to the Badge component.\n * @param ref - User provided ref to be passed to the Badge component.\n */\nexport const useBadgeBase_unstable = (props: BadgeBaseProps, ref: React.Ref<HTMLDivElement>): BadgeBaseState => {\n const { iconPosition = 'before' } = props;\n\n return {\n iconPosition,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useBadge_unstable","props","ref","shape","size","appearance","color","badgeProps","state","useBadgeBase_unstable","iconPosition","components","root","icon","always","elementType","optional"],"mappings":"AAAA;;;;;;;;;;;;yBA6BaY;eAAAA;;qBApBAT;;;;;iEAPU,QAAQ;gCACgB,4BAA4B;AAMpE,MAAMA,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EAAEC,QAAQ,UAAU,EAAEC,OAAO,QAAQ,EAAEC,aAAa,QAAQ,EAAEC,QAAQ,OAAO,EAAE,GAAGC,YAAY,GAAGN;IAEvG,MAAMO,QAAQC,sBAAsBF,YAAYL;IAEhD,OAAO;QACL,GAAGM,KAAK;QACRL;QACAC;QACAC;QACAC;IACF;AACF,EAAE;AAQK,8BAA8B,CAACL,OAAuBC;IAC3D,MAAM,EAAEQ,eAAe,QAAQ,EAAE,GAAGT;IAEpC,OAAO;QACLS;QACAC,YAAY;YACVC,MAAM;YACNC,MAAM;QACR;QACAD,MAAMb,oBAAAA,CAAKe,MAAM,KACfhB,wCAAAA,EAAyB,OAAO;YAC9BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEc,aAAa;QAAM;QAEvBF,MAAMd,oBAAAA,CAAKiB,QAAQ,CAACf,MAAMY,IAAI,EAAE;YAAEE,aAAa;QAAO;IACxD;AACF,EAAE"}
|
|
@@ -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":[],"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\nexport type CounterBadgeBaseProps = Omit<CounterBadgeProps, 'appearance' | 'color' | 'shape' | 'size'>;\n\nexport type CounterBadgeBaseState = Omit<CounterBadgeState, 'appearance' | 'color' | 'shape' | 'size'>;\n"],"names":[],"mappings":""}
|
|
@@ -15,6 +15,9 @@ _export(exports, {
|
|
|
15
15
|
counterBadgeClassNames: function() {
|
|
16
16
|
return _useCounterBadgeStylesstyles.counterBadgeClassNames;
|
|
17
17
|
},
|
|
18
|
+
useCounterBadgeBase_unstable: function() {
|
|
19
|
+
return _useCounterBadge.useCounterBadgeBase_unstable;
|
|
20
|
+
},
|
|
18
21
|
useCounterBadgeStyles_unstable: function() {
|
|
19
22
|
return _useCounterBadgeStylesstyles.useCounterBadgeStyles_unstable;
|
|
20
23
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CounterBadge/index.ts"],"sourcesContent":["export { CounterBadge } from './CounterBadge';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/CounterBadge/index.ts"],"sourcesContent":["export { CounterBadge } from './CounterBadge';\nexport type {\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n CounterBadgeProps,\n CounterBadgeState,\n} from './CounterBadge.types';\nexport { useCounterBadge_unstable, useCounterBadgeBase_unstable } from './useCounterBadge';\nexport { counterBadgeClassNames, useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\n"],"names":["CounterBadge","useCounterBadge_unstable","useCounterBadgeBase_unstable","counterBadgeClassNames","useCounterBadgeStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAQZG,mDAAsB;;;eADID,6CAA4B;;;eAC9BE,2DAA8B;;;eADtDH,yCAAwB;;;8BAPJ,iBAAiB;iCAOyB,oBAAoB;6CACpB,iCAAiC"}
|
|
@@ -3,9 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
useCounterBadgeBase_unstable: function() {
|
|
14
|
+
return useCounterBadgeBase_unstable;
|
|
15
|
+
},
|
|
16
|
+
useCounterBadge_unstable: function() {
|
|
9
17
|
return useCounterBadge_unstable;
|
|
10
18
|
}
|
|
11
19
|
});
|
|
@@ -13,11 +21,20 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
13
21
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
22
|
const _index = require("../Badge/index");
|
|
15
23
|
const useCounterBadge_unstable = (props, ref)=>{
|
|
16
|
-
const { shape = 'circular', appearance = 'filled',
|
|
17
|
-
const state =
|
|
18
|
-
|
|
24
|
+
const { shape = 'circular', appearance = 'filled', color = 'brand', size = 'medium', ...counterBadgeProps } = props;
|
|
25
|
+
const state = useCounterBadgeBase_unstable(counterBadgeProps, ref);
|
|
26
|
+
return {
|
|
27
|
+
...state,
|
|
19
28
|
shape,
|
|
20
29
|
appearance,
|
|
30
|
+
color,
|
|
31
|
+
size
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const useCounterBadgeBase_unstable = (props, ref)=>{
|
|
35
|
+
const { showZero = false, overflowCount = 99, count = 0, dot = false, ...badgeProps } = props;
|
|
36
|
+
const state = {
|
|
37
|
+
...(0, _index.useBadgeBase_unstable)(badgeProps, ref),
|
|
21
38
|
showZero,
|
|
22
39
|
count,
|
|
23
40
|
dot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/CounterBadge/useCounterBadge.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport
|
|
1
|
+
{"version":3,"sources":["../src/components/CounterBadge/useCounterBadge.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useBadgeBase_unstable } from '../Badge/index';\nimport type {\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n CounterBadgeProps,\n CounterBadgeState,\n} 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 { shape = 'circular', appearance = 'filled', color = 'brand', size = 'medium', ...counterBadgeProps } = props;\n\n const state = useCounterBadgeBase_unstable(counterBadgeProps, ref);\n\n return {\n ...state,\n shape,\n appearance,\n color,\n size,\n };\n};\n\n/**\n * Base hook for CounterBadge component, which manages state related to slots structure and counter logic.\n *\n * @param props - User provided props to the CounterBadge component.\n * @param ref - User provided ref to be passed to the CounterBadge component.\n */\nexport const useCounterBadgeBase_unstable = (\n props: CounterBadgeBaseProps,\n ref: React.Ref<HTMLElement>,\n): CounterBadgeBaseState => {\n const { showZero = false, overflowCount = 99, count = 0, dot = false, ...badgeProps } = props;\n\n const state: CounterBadgeBaseState = {\n ...useBadgeBase_unstable(badgeProps, ref as React.Ref<HTMLDivElement>),\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","useBadgeBase_unstable","useCounterBadge_unstable","props","ref","shape","appearance","color","size","counterBadgeProps","state","useCounterBadgeBase_unstable","showZero","overflowCount","count","dot","badgeProps","root","children"],"mappings":"AAAA;;;;;;;;;;;;gCAkCaW;eAAAA;;4BApBAT;;;;;iEAZU,QAAQ;uBACO,iBAAiB;AAWhD,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,UAAU,EAAEC,aAAa,QAAQ,EAAEC,QAAQ,OAAO,EAAEC,OAAO,QAAQ,EAAE,GAAGC,mBAAmB,GAAGN;IAE9G,MAAMO,QAAQC,6BAA6BF,mBAAmBL;IAE9D,OAAO;QACL,GAAGM,KAAK;QACRL;QACAC;QACAC;QACAC;IACF;AACF,EAAE;AAQK,qCAAqC,CAC1CL,OACAC;IAEA,MAAM,EAAEQ,WAAW,KAAK,EAAEC,gBAAgB,EAAE,EAAEC,QAAQ,CAAC,EAAEC,MAAM,KAAK,EAAE,GAAGC,YAAY,GAAGb;IAExF,MAAMO,QAA+B;QACnC,OAAGT,4BAAAA,EAAsBe,YAAYZ,IAAiC;QACtEQ;QACAE;QACAC;IACF;IAEA,IAAKD,CAAAA,UAAU,KAAKF,QAAAA,CAAO,IAAM,CAACG,OAAO,CAACL,MAAMO,IAAI,CAACC,QAAQ,EAAE;QAC7DR,MAAMO,IAAI,CAACC,QAAQ,GAAGJ,QAAQD,gBAAgB,GAAGA,cAAc,CAAC,CAAC,GAAG,GAAGC,OAAO;IAChF;IAEA,OAAOJ;AACT,EAAE"}
|
|
@@ -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":[],"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\nexport type PresenceBadgeBaseProps = Omit<PresenceBadgeProps, 'size'>;\n\nexport type PresenceBadgeBaseState = Omit<PresenceBadgeState, 'appearance' | 'color' | 'shape' | 'size'>;\n"],"names":[],"mappings":""}
|
|
@@ -48,6 +48,9 @@ _export(exports, {
|
|
|
48
48
|
presenceUnknownRegular: function() {
|
|
49
49
|
return _presenceIcons.presenceUnknownRegular;
|
|
50
50
|
},
|
|
51
|
+
usePresenceBadgeBase_unstable: function() {
|
|
52
|
+
return _usePresenceBadge.usePresenceBadgeBase_unstable;
|
|
53
|
+
},
|
|
51
54
|
usePresenceBadgeStyles_unstable: function() {
|
|
52
55
|
return _usePresenceBadgeStylesstyles.usePresenceBadgeStyles_unstable;
|
|
53
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/PresenceBadge/index.ts"],"sourcesContent":["export { PresenceBadge } from './PresenceBadge';\nexport type {
|
|
1
|
+
{"version":3,"sources":["../src/components/PresenceBadge/index.ts"],"sourcesContent":["export { PresenceBadge } from './PresenceBadge';\nexport type {\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n PresenceBadgeProps,\n PresenceBadgeState,\n PresenceBadgeStatus,\n} from './PresenceBadge.types';\nexport { usePresenceBadge_unstable, usePresenceBadgeBase_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","usePresenceBadgeBase_unstable","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular"],"mappings":";;;;;;;;;;;IAASA;2CAAa;;;eAWpBK,sCAAuB;;;eACvBC,uCAAwB;;;eACxBC,iCAAkB;;;eAClBC,kCAAmB;;;eALZL,qDAAuB;;;eAM9BM,qCAAsB;;;eACtBC,iCAAkB;;;eAClBC,gCAAiB;;;eACjBC,iCAAkB;;IAClBC;oDAAsB;;;eACtBC,iCAAkB;;;eAClBC,qCAAsB;;;eAbYb,+CAA6B;;;eAC/BE,6DAA+B;;;eADxDH,2CAAyB;;;+BARJ,kBAAkB;kCAQyB,qBAAqB;8CACrB,kCAAkC;+BAapG,kBAAkB"}
|
|
@@ -3,9 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
function _export(target, all) {
|
|
7
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: all[name]
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
_export(exports, {
|
|
13
|
+
DEFAULT_STRINGS: function() {
|
|
14
|
+
return DEFAULT_STRINGS;
|
|
15
|
+
},
|
|
16
|
+
usePresenceBadgeBase_unstable: function() {
|
|
17
|
+
return usePresenceBadgeBase_unstable;
|
|
18
|
+
},
|
|
19
|
+
usePresenceBadge_unstable: function() {
|
|
9
20
|
return usePresenceBadge_unstable;
|
|
10
21
|
}
|
|
11
22
|
});
|
|
@@ -45,20 +56,35 @@ const DEFAULT_STRINGS = {
|
|
|
45
56
|
blocked: 'blocked'
|
|
46
57
|
};
|
|
47
58
|
const usePresenceBadge_unstable = (props, ref)=>{
|
|
48
|
-
const { size = 'medium',
|
|
59
|
+
const { size = 'medium', outOfOffice = false, ...baseProps } = props;
|
|
60
|
+
var _props_status;
|
|
61
|
+
const status = (_props_status = props.status) !== null && _props_status !== void 0 ? _props_status : 'available';
|
|
62
|
+
const IconElement = iconMap(status, outOfOffice, size);
|
|
63
|
+
const state = {
|
|
64
|
+
...usePresenceBadgeBase_unstable(baseProps, ref),
|
|
65
|
+
appearance: 'filled',
|
|
66
|
+
color: 'brand',
|
|
67
|
+
shape: 'circular',
|
|
68
|
+
size,
|
|
69
|
+
outOfOffice
|
|
70
|
+
};
|
|
71
|
+
if (state.icon) {
|
|
72
|
+
var _state_icon;
|
|
73
|
+
var _children;
|
|
74
|
+
(_children = (_state_icon = state.icon).children) !== null && _children !== void 0 ? _children : _state_icon.children = /*#__PURE__*/ _react.createElement(IconElement, null);
|
|
75
|
+
}
|
|
76
|
+
return state;
|
|
77
|
+
};
|
|
78
|
+
const usePresenceBadgeBase_unstable = (props, ref)=>{
|
|
79
|
+
const { status = 'available', outOfOffice = false } = props;
|
|
49
80
|
const statusText = DEFAULT_STRINGS[status];
|
|
50
81
|
const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';
|
|
51
|
-
const IconElement = iconMap(status, outOfOffice, size);
|
|
52
82
|
const state = {
|
|
53
|
-
...(0, _index.
|
|
83
|
+
...(0, _index.useBadgeBase_unstable)({
|
|
54
84
|
'aria-label': statusText + oofText,
|
|
55
85
|
role: 'img',
|
|
56
86
|
...props,
|
|
57
|
-
size,
|
|
58
87
|
icon: _reactutilities.slot.optional(props.icon, {
|
|
59
|
-
defaultProps: {
|
|
60
|
-
children: IconElement ? /*#__PURE__*/ _react.createElement(IconElement, null) : null
|
|
61
|
-
},
|
|
62
88
|
renderByDefault: true,
|
|
63
89
|
elementType: 'span'
|
|
64
90
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/PresenceBadge/usePresenceBadge.tsx"],"sourcesContent":["'use client';\n\nimport * 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 {
|
|
1
|
+
{"version":3,"sources":["../src/components/PresenceBadge/usePresenceBadge.tsx"],"sourcesContent":["'use client';\n\nimport * 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 { useBadgeBase_unstable } from '../Badge/index';\nimport type {\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n PresenceBadgeProps,\n PresenceBadgeState,\n} 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\nexport const 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', outOfOffice = false, ...baseProps } = props;\n const status = props.status ?? 'available';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...usePresenceBadgeBase_unstable(baseProps, ref),\n appearance: 'filled',\n color: 'brand',\n shape: 'circular',\n size,\n outOfOffice,\n };\n\n if (state.icon) {\n state.icon.children ??= <IconElement />;\n }\n\n return state;\n};\n\n/**\n * Base hook for PresenceBadge component, which manages state related to presence status and ARIA attributes.\n * Note: size is excluded from BaseProps as it is a design prop; icon selection uses the 'medium' size default.\n * To render size-specific icons, use the full usePresenceBadge_unstable hook.\n *\n * @param props - User provided props to the PresenceBadge component.\n * @param ref - User provided ref to be passed to the PresenceBadge component.\n */\nexport const usePresenceBadgeBase_unstable = (\n props: PresenceBadgeBaseProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeBaseState => {\n const { 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 state: PresenceBadgeBaseState = {\n ...useBadgeBase_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n icon: slot.optional(props.icon, {\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref as React.Ref<HTMLDivElement>,\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","useBadgeBase_unstable","iconMap","status","outOfOffice","size","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","usePresenceBadge_unstable","props","ref","baseProps","IconElement","state","usePresenceBadgeBase_unstable","appearance","color","shape","icon","children","statusText","oofText","role","optional","renderByDefault","elementType"],"mappings":"AAAA;;;;;;;;;;;;mBA6CaiB;eAAAA;;iCA+CAa;eAAAA;;IAjCAN,yBAAAA;;;;;iEAzDU,QAAQ;gCACV,4BAA4B;+BAY1C,kBAAkB;uBACa,iBAAiB;AAQvD,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,iCAAkB,CAACY,KAAK;QAC1E,KAAK;YACH,OAAOX,qCAAsB,CAACW,KAAK;QACrC,KAAK;YACH,OAAOD,cAAcJ,qCAAsB,CAACK,KAAK,GAAGV,iCAAkB,CAACU,KAAK;QAC9E,KAAK;YACH,OAAOD,cAAcP,iCAAkB,CAACQ,KAAK,GAAGT,gCAAiB,CAACS,KAAK;QACzE,KAAK;YACH,OAAOD,cAAcL,iCAAkB,CAACM,KAAK,GAAGP,qCAAsB,CAACO,KAAK;QAC9E,KAAK;YACH,OAAON,iCAAkB,CAACM,KAAK;QACjC,KAAK;YACH,OAAOL,qCAAsB,CAACK,KAAK;IACvC;AACF;AAEO,wBAAwB;IAC7BE,MAAM;IACN,iBAAiB;IACjBC,MAAM;IACNC,WAAW;IACXC,SAAS;IACT,kBAAkB;IAClBC,SAAS;IACTC,SAAS;AACX,EAAE;AAKK,kCAAkC,CACvCE,OACAC;IAEA,MAAM,EAAEV,OAAO,QAAQ,EAAED,cAAc,KAAK,EAAE,GAAGY,WAAW,GAAGF;QAChDA;IAAf,MAAMX,SAASW,iBAAAA,MAAMX,MAAAA,AAAM,MAAA,QAAZW,kBAAAA,KAAAA,IAAAA,gBAAgB;IAE/B,MAAMG,cAAcf,QAAQC,QAAQC,aAAaC;IAEjD,MAAMa,QAA4B;QAChC,GAAGC,8BAA8BH,WAAWD,IAAI;QAChDK,YAAY;QACZC,OAAO;QACPC,OAAO;QACPjB;QACAD;IACF;IAEA,IAAIc,MAAMK,IAAI,EAAE;YACdL;;QAAAA,CAAAA,YAAAA,CAAAA,cAAAA,MAAMK,IAAAA,AAAI,EAACC,QAAAA,MAAAA,QAAAA,cAAAA,KAAAA,IAAAA,YAAXN,YAAWM,QAAAA,GAAAA,WAAAA,GAAa,OAAA,aAAA,CAACP,aAAAA;IAC3B;IAEA,OAAOC;AACT,EAAE;AAUK,sCAAsC,CAC3CJ,OACAC;IAEA,MAAM,EAAEZ,SAAS,WAAW,EAAEC,cAAc,KAAK,EAAE,GAAGU;IAEtD,MAAMW,aAAanB,eAAe,CAACH,OAAO;IAC1C,MAAMuB,UAAUZ,MAAMV,WAAW,IAAIU,MAAMX,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEG,eAAe,CAAC,gBAAgB,EAAE,GAAG;IAEjH,MAAMY,QAAgC;QACpC,OAAGjB,4BAAAA,EACD;YACE,cAAcwB,aAAaC;YAC3BC,MAAM;YACN,GAAGb,KAAK;YACRS,MAAMjC,oBAAAA,CAAKsC,QAAQ,CAACd,MAAMS,IAAI,EAAE;gBAC9BM,iBAAiB;gBACjBC,aAAa;YACf;QACF,GACAf,IACD;QACDZ;QACAC;IACF;IAEA,OAAOc;AACT,EAAE"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -63,18 +63,27 @@ _export(exports, {
|
|
|
63
63
|
renderBadge_unstable: function() {
|
|
64
64
|
return _Badge.renderBadge_unstable;
|
|
65
65
|
},
|
|
66
|
+
useBadgeBase_unstable: function() {
|
|
67
|
+
return _Badge.useBadgeBase_unstable;
|
|
68
|
+
},
|
|
66
69
|
useBadgeStyles_unstable: function() {
|
|
67
70
|
return _Badge.useBadgeStyles_unstable;
|
|
68
71
|
},
|
|
69
72
|
useBadge_unstable: function() {
|
|
70
73
|
return _Badge.useBadge_unstable;
|
|
71
74
|
},
|
|
75
|
+
useCounterBadgeBase_unstable: function() {
|
|
76
|
+
return _CounterBadge.useCounterBadgeBase_unstable;
|
|
77
|
+
},
|
|
72
78
|
useCounterBadgeStyles_unstable: function() {
|
|
73
79
|
return _CounterBadge.useCounterBadgeStyles_unstable;
|
|
74
80
|
},
|
|
75
81
|
useCounterBadge_unstable: function() {
|
|
76
82
|
return _CounterBadge.useCounterBadge_unstable;
|
|
77
83
|
},
|
|
84
|
+
usePresenceBadgeBase_unstable: function() {
|
|
85
|
+
return _PresenceBadge.usePresenceBadgeBase_unstable;
|
|
86
|
+
},
|
|
78
87
|
usePresenceBadgeStyles_unstable: function() {
|
|
79
88
|
return _PresenceBadge.usePresenceBadgeStyles_unstable;
|
|
80
89
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Badge,\n badgeClassNames,\n renderBadge_unstable,\n useBadgeStyles_unstable,\n useBadge_unstable,\n useBadgeBase_unstable,\n} from './Badge';\nexport type { BadgeProps, BadgeSlots, BadgeState, BadgeBaseProps, BadgeBaseState } from './Badge';\nexport {\n PresenceBadge,\n presenceBadgeClassNames,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_unstable,\n usePresenceBadgeBase_unstable,\n presenceAwayRegular,\n presenceAwayFilled,\n presenceAvailableRegular,\n presenceAvailableFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndRegular,\n presenceDndFilled,\n presenceOofRegular,\n presenceOfflineRegular,\n presenceUnknownRegular,\n} from './PresenceBadge';\nexport type {\n PresenceBadgeProps,\n PresenceBadgeState,\n PresenceBadgeStatus,\n PresenceBadgeBaseProps,\n PresenceBadgeBaseState,\n} from './PresenceBadge';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n useCounterBadgeBase_unstable,\n} from './CounterBadge';\nexport type {\n CounterBadgeProps,\n CounterBadgeState,\n CounterBadgeBaseProps,\n CounterBadgeBaseState,\n} from './CounterBadge';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","useBadgeBase_unstable","PresenceBadge","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","usePresenceBadgeBase_unstable","presenceAwayRegular","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular","CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable","useCounterBadgeBase_unstable"],"mappings":";;;;;;;;;;;SACO;eAALA;;;eAkCAsB,0BAAY;;;eAzBZhB,4BAAa;;;eARbL,sBAAe;;;eAkCfsB,oCAAsB;;;eAlBtBT,sCAAuB;;;eADvBD,uCAAwB;;;eADxBD,iCAAkB;;;eADlBD,kCAAmB;;;eAJnBJ,sCAAuB;;;eAQvBQ,qCAAsB;;IACtBC,kBAAkB;;;qBAED;eAAjBE;;;eADAD,iCAAkB;;;eAGlBG,qCAAsB;;;eADtBD,iCAAkB;;;eAElBE,qCAAsB;;;eAtBtBnB,2BAAoB;;;eAGpBG,4BAAqB;;;eAFrBF,8BAAuB;;;eACvBC,wBAAiB;;;eAkCjBsB,0CAA4B;;kCAFE;eAA9BF;;;eACAC,sCAAwB;;;eAxBxBf,4CAA6B;;;eAF7BF,8CAA+B;;6BACN;eAAzBC;;;uBANK,UAAU;+BAmBV,kBAAkB;8BAclB,iBAAiB"}
|