@fluentui/react-badge 9.2.39 → 9.2.40
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -2
- package/lib/Badge.js.map +1 -1
- package/lib/CounterBadge.js.map +1 -1
- package/lib/PresenceBadge.js.map +1 -1
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/Badge.types.js.map +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.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib/components/CounterBadge/index.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib/components/PresenceBadge/index.js.map +1 -1
- package/lib/components/PresenceBadge/presenceIcons.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Badge.js.map +1 -1
- package/lib-commonjs/CounterBadge.js.map +1 -1
- package/lib-commonjs/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
- 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.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.styles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js +10 -10
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +32 -32
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
# Change Log - @fluentui/react-badge
|
2
2
|
|
3
|
-
This log was last generated on Mon,
|
3
|
+
This log was last generated on Mon, 15 Jul 2024 17:20:36 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.2.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.2.40)
|
8
|
+
|
9
|
+
Mon, 15 Jul 2024 17:20:36 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.2.39..@fluentui/react-badge_v9.2.40)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- fix: revert incorectly set npm versions in all packages ([PR #31937](https://github.com/microsoft/fluentui/pull/31937) by martinhochel@microsoft.com)
|
15
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.41 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.19.1 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v9.18.12 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
|
18
|
+
|
7
19
|
## [9.2.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.2.39)
|
8
20
|
|
9
|
-
Mon, 01 Jul 2024 20:
|
21
|
+
Mon, 01 Jul 2024 20:30:41 GMT
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.2.38..@fluentui/react-badge_v9.2.39)
|
11
23
|
|
12
24
|
### Patches
|
package/lib/Badge.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Badge.ts"],"sourcesContent":["export * from './components/Badge/index';\n"],"names":[],"mappings":"AAAA,cAAc,2BAA2B"}
|
1
|
+
{"version":3,"sources":["Badge.ts"],"sourcesContent":["export * from './components/Badge/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,2BAA2B"}
|
package/lib/CounterBadge.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CounterBadge.ts"],"sourcesContent":["export * from './components/CounterBadge/index';\n"],"names":[],"mappings":"AAAA,cAAc,kCAAkC"}
|
1
|
+
{"version":3,"sources":["CounterBadge.ts"],"sourcesContent":["export * from './components/CounterBadge/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,kCAAkC"}
|
package/lib/PresenceBadge.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["PresenceBadge.ts"],"sourcesContent":["export * from './components/PresenceBadge/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
|
1
|
+
{"version":3,"sources":["PresenceBadge.ts"],"sourcesContent":["export * from './components/PresenceBadge/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,mCAAmC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from './useBadge';\nimport { useBadgeStyles_unstable } from './useBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const Badge: ForwardRefComponent<BadgeProps> = React.forwardRef((props, ref) => {\n const state = useBadge_unstable(props, ref);\n\n useBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nBadge.displayName = 'Badge';\n"],"names":["React","useBadge_unstable","useBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","Badge","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,oBAAoB,QAAQ,gBAAgB;AAIrD;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQR,kBAAkBM,OAAOC;IAEvCN,wBAAwBO;IAExBN,4BAA4B,2BAA2BM;IAEvD,OAAOL,qBAAqBK;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
|
1
|
+
{"version":3,"sources":["Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from './useBadge';\nimport { useBadgeStyles_unstable } from './useBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const Badge: ForwardRefComponent<BadgeProps> = React.forwardRef((props, ref) => {\n const state = useBadge_unstable(props, ref);\n\n useBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nBadge.displayName = 'Badge';\n"],"names":["React","useBadge_unstable","useBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","Badge","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,oBAAoB,QAAQ,gBAAgB;AAIrD;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQR,kBAAkBM,OAAOC;IAEvCN,wBAAwBO;IAExBN,4BAA4B,2BAA2BM;IAEvD,OAAOL,qBAAqBK;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["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":["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":[],"rangeMappings":"","mappings":"AAyCA,WACyF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU;AAGxB,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,0BAA0B"}
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles.styles';\n"],"names":[],"rangeMappings":";;;","mappings":"AAAA,cAAc,UAAU;AAGxB,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,0BAA0B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { BadgeState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeState) => {\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;AAGxD,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
|
+
{"version":3,"sources":["renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { BadgeState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeState) => {\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"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,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 +1 @@
|
|
1
|
-
{"version":3,"sources":["useBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { 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 {\n shape = 'circular',\n size = 'medium',\n iconPosition = 'before',\n appearance = 'filled',\n color = 'brand',\n } = props;\n\n const state: BadgeState = {\n shape,\n size,\n iconPosition,\n appearance,\n color,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useBadge_unstable","props","ref","shape","size","iconPosition","appearance","color","state","components","root","icon","always","elementType","optional"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;CAEC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EACJC,QAAQ,UAAU,EAClBC,OAAO,QAAQ,EACfC,eAAe,QAAQ,EACvBC,aAAa,QAAQ,EACrBC,QAAQ,OAAO,EAChB,GAAGN;IAEJ,MAAMO,QAAoB;QACxBL;QACAC;QACAC;QACAC;QACAC;QACAE,YAAY;YACVC,MAAM;YACNC,MAAM;QACR;QACAD,MAAMX,KAAKa,MAAM,CACfd,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEY,aAAa;QAAM;QAEvBF,MAAMZ,KAAKe,QAAQ,CAACb,MAAMU,IAAI,EAAE;YAAEE,aAAa;QAAO;IACxD;IAEA,OAAOL;AACT,EAAE"}
|
1
|
+
{"version":3,"sources":["useBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { 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 {\n shape = 'circular',\n size = 'medium',\n iconPosition = 'before',\n appearance = 'filled',\n color = 'brand',\n } = props;\n\n const state: BadgeState = {\n shape,\n size,\n iconPosition,\n appearance,\n color,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useBadge_unstable","props","ref","shape","size","iconPosition","appearance","color","state","components","root","icon","always","elementType","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;CAEC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EACJC,QAAQ,UAAU,EAClBC,OAAO,QAAQ,EACfC,eAAe,QAAQ,EACvBC,aAAa,QAAQ,EACrBC,QAAQ,OAAO,EAChB,GAAGN;IAEJ,MAAMO,QAAoB;QACxBL;QACAC;QACAC;QACAC;QACAC;QACAE,YAAY;YACVC,MAAM;YACNC,MAAM;QACR;QACAD,MAAMX,KAAKa,MAAM,CACfd,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEY,aAAa;QAAM;QAEvBF,MAAMZ,KAAKe,QAAQ,CAACb,MAAMU,IAAI,EAAE;YAAEE,aAAa;QAAO;IACxD;IAEA,OAAOL;AACT,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CounterBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps } from './CounterBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.\n */\nexport const CounterBadge: ForwardRefComponent<CounterBadgeProps> = React.forwardRef((props, ref) => {\n const state = useCounterBadge_unstable(props, ref);\n\n useCounterBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCounterBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"names":["React","useCounterBadge_unstable","useCounterBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","CounterBadge","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,8BAA8B,QAAQ,iCAAiC;AAChF,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,oBAAoB,QAAQ,iBAAiB;AAItD;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CN,+BAA+BO;IAE/BN,4BAA4B,kCAAkCM;IAE9D,OAAOL,qBAAqBK;AAC9B,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
|
1
|
+
{"version":3,"sources":["CounterBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps } from './CounterBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.\n */\nexport const CounterBadge: ForwardRefComponent<CounterBadgeProps> = React.forwardRef((props, ref) => {\n const state = useCounterBadge_unstable(props, ref);\n\n useCounterBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCounterBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"names":["React","useCounterBadge_unstable","useCounterBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","CounterBadge","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,8BAA8B,QAAQ,iCAAiC;AAChF,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,oBAAoB,QAAQ,iBAAiB;AAItD;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CN,+BAA+BO;IAE/BN,4BAA4B,kCAAkCM;IAE9D,OAAOL,qBAAqBK;AAC9B,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["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":["CounterBadge.types.ts"],"sourcesContent":["import type { BadgeProps, BadgeState } from '../Badge/index';\n\nexport type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {\n /**\n * A Badge can have different appearances that emphasize certain parts of it:\n * - filled: The default appearance if one is not specified.\n * The badge background is filled with color with a contrasting foreground text to match.\n * - ghost: The badge background is transparent, with the foreground text taking color to emphasize it.\n * @default filled\n */\n appearance?: 'filled' | 'ghost';\n\n /**\n * Semantic colors for a counter badge\n * @default brand\n */\n color?: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;\n\n /**\n * Value displayed by the Badge\n * @default 0\n */\n count?: number;\n\n /**\n * If a dot should be displayed without the count\n * @default false\n */\n dot?: boolean;\n\n /**\n * Max number to be displayed\n * @default 99\n */\n overflowCount?: number;\n\n /**\n * A Badge can be circular or rounded\n * @default circular\n */\n shape?: 'circular' | 'rounded';\n\n /**\n * If the badge should be shown when count is 0\n * @default false\n */\n showZero?: boolean;\n};\n\nexport type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> &\n Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;\n"],"names":[],"rangeMappings":"","mappings":"AAiDA,WACqG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CounterBadge';\nexport * from './CounterBadge.types';\nexport * from './useCounterBadge';\nexport * from './useCounterBadgeStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC"}
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CounterBadge';\nexport * from './CounterBadge.types';\nexport * from './useCounterBadge';\nexport * from './useCounterBadgeStyles.styles';\n"],"names":[],"rangeMappings":";;;","mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCounterBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport type { BadgeState } from '../Badge/index';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useCounterBadge_unstable = (props: CounterBadgeProps, ref: React.Ref<HTMLElement>): CounterBadgeState => {\n const {\n shape = 'circular',\n appearance = 'filled',\n showZero = false,\n overflowCount = 99,\n count = 0,\n dot = false,\n } = props;\n\n const state: CounterBadgeState = {\n ...(useBadge_unstable(props, ref) as Pick<CounterBadgeState, keyof BadgeState>),\n shape,\n appearance,\n showZero,\n count,\n dot,\n };\n\n if ((count !== 0 || showZero) && !dot && !state.root.children) {\n state.root.children = count > overflowCount ? `${overflowCount}+` : `${count}`;\n }\n\n return state;\n};\n"],"names":["React","useBadge_unstable","useCounterBadge_unstable","props","ref","shape","appearance","showZero","overflowCount","count","dot","state","root","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,iBAAiB,QAAQ,iBAAiB;AAGnD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EACJC,QAAQ,UAAU,EAClBC,aAAa,QAAQ,EACrBC,WAAW,KAAK,EAChBC,gBAAgB,EAAE,EAClBC,QAAQ,CAAC,EACTC,MAAM,KAAK,EACZ,GAAGP;IAEJ,MAAMQ,QAA2B;QAC/B,GAAIV,kBAAkBE,OAAOC,IAAI;QACjCC;QACAC;QACAC;QACAE;QACAC;IACF;IAEA,IAAI,AAACD,CAAAA,UAAU,KAAKF,QAAO,KAAM,CAACG,OAAO,CAACC,MAAMC,IAAI,CAACC,QAAQ,EAAE;QAC7DF,MAAMC,IAAI,CAACC,QAAQ,GAAGJ,QAAQD,gBAAgB,CAAC,EAAEA,cAAc,CAAC,CAAC,GAAG,CAAC,EAAEC,MAAM,CAAC;IAChF;IAEA,OAAOE;AACT,EAAE"}
|
1
|
+
{"version":3,"sources":["useCounterBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport type { BadgeState } from '../Badge/index';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useCounterBadge_unstable = (props: CounterBadgeProps, ref: React.Ref<HTMLElement>): CounterBadgeState => {\n const {\n shape = 'circular',\n appearance = 'filled',\n showZero = false,\n overflowCount = 99,\n count = 0,\n dot = false,\n } = props;\n\n const state: CounterBadgeState = {\n ...(useBadge_unstable(props, ref) as Pick<CounterBadgeState, keyof BadgeState>),\n shape,\n appearance,\n showZero,\n count,\n dot,\n };\n\n if ((count !== 0 || showZero) && !dot && !state.root.children) {\n state.root.children = count > overflowCount ? `${overflowCount}+` : `${count}`;\n }\n\n return state;\n};\n"],"names":["React","useBadge_unstable","useCounterBadge_unstable","props","ref","shape","appearance","showZero","overflowCount","count","dot","state","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,iBAAiB,QAAQ,iBAAiB;AAGnD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EACJC,QAAQ,UAAU,EAClBC,aAAa,QAAQ,EACrBC,WAAW,KAAK,EAChBC,gBAAgB,EAAE,EAClBC,QAAQ,CAAC,EACTC,MAAM,KAAK,EACZ,GAAGP;IAEJ,MAAMQ,QAA2B;QAC/B,GAAIV,kBAAkBE,OAAOC,IAAI;QACjCC;QACAC;QACAC;QACAE;QACAC;IACF;IAEA,IAAI,AAACD,CAAAA,UAAU,KAAKF,QAAO,KAAM,CAACG,OAAO,CAACC,MAAMC,IAAI,CAACC,QAAQ,EAAE;QAC7DF,MAAMC,IAAI,CAACC,QAAQ,GAAGJ,QAAQD,gBAAgB,CAAC,EAAEA,cAAc,CAAC,CAAC,GAAG,CAAC,EAAEC,MAAM,CAAC;IAChF;IAEA,OAAOE;AACT,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["PresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const PresenceBadge: ForwardRefComponent<PresenceBadgeProps> = React.forwardRef((props, ref) => {\n const state = usePresenceBadge_unstable(props, ref);\n\n usePresenceBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePresenceBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"names":["React","usePresenceBadge_unstable","usePresenceBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","PresenceBadge","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,+BAA+B,QAAQ,kCAAkC;AAClF,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,oBAAoB,QAAQ,cAAc;AAInD;;CAEC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CN,gCAAgCO;IAEhCN,4BAA4B,mCAAmCM;IAE/D,OAAOL,qBAAqBK;AAC9B,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
1
|
+
{"version":3,"sources":["PresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const PresenceBadge: ForwardRefComponent<PresenceBadgeProps> = React.forwardRef((props, ref) => {\n const state = usePresenceBadge_unstable(props, ref);\n\n usePresenceBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePresenceBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"names":["React","usePresenceBadge_unstable","usePresenceBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","PresenceBadge","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,+BAA+B,QAAQ,kCAAkC;AAClF,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,oBAAoB,QAAQ,cAAc;AAInD;;CAEC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CN,gCAAgCO;IAEhCN,4BAA4B,mCAAmCM;IAE/D,OAAOL,qBAAqBK;AAC9B,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["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":["PresenceBadge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState, BadgeSlots } from '../Badge/Badge.types';\n\nexport type PresenceBadgeStatus =\n | 'busy'\n | 'out-of-office'\n | 'away'\n | 'available'\n | 'offline'\n | 'do-not-disturb'\n | 'unknown'\n | 'blocked';\n\nexport type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> &\n Pick<BadgeProps, 'size'> & {\n /**\n * Represents several status\n * @default available\n */\n status?: PresenceBadgeStatus;\n\n /**\n * Modifies the display to indicate that the user is out of office.\n * This can be combined with any status to display an out-of-office version of that status\n * @default false\n */\n outOfOffice?: boolean;\n };\n\nexport type PresenceBadgeState = ComponentState<BadgeSlots> &\n BadgeState &\n Required<Pick<PresenceBadgeProps, 'status' | 'outOfOffice'>>;\n"],"names":[],"rangeMappings":"","mappings":"AA6BA,WAE+D"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles.styles';\nexport * from './presenceIcons';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC;AAChD,cAAc,kBAAkB"}
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles.styles';\nexport * from './presenceIcons';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC;AAChD,cAAc,kBAAkB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["presenceIcons.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n PresenceAvailable10Regular,\n PresenceAvailable12Regular,\n PresenceAvailable16Regular,\n PresenceAvailable20Regular,\n PresenceAvailable10Filled,\n PresenceAvailable12Filled,\n PresenceAvailable16Filled,\n PresenceAvailable20Filled,\n PresenceAway10Regular,\n PresenceAway12Regular,\n PresenceAway16Regular,\n PresenceAway20Regular,\n PresenceAway10Filled,\n PresenceAway12Filled,\n PresenceAway16Filled,\n PresenceAway20Filled,\n PresenceBlocked10Regular,\n PresenceBlocked12Regular,\n PresenceBlocked16Regular,\n PresenceBlocked20Regular,\n PresenceBusy10Filled,\n PresenceBusy12Filled,\n PresenceBusy16Filled,\n PresenceBusy20Filled,\n PresenceDnd10Regular,\n PresenceDnd12Regular,\n PresenceDnd16Regular,\n PresenceDnd20Regular,\n PresenceDnd10Filled,\n PresenceDnd12Filled,\n PresenceDnd16Filled,\n PresenceDnd20Filled,\n PresenceOof10Regular,\n PresenceOof12Regular,\n PresenceOof16Regular,\n PresenceOof20Regular,\n PresenceOffline10Regular,\n PresenceOffline12Regular,\n PresenceOffline16Regular,\n PresenceOffline20Regular,\n PresenceUnknown10Regular,\n PresenceUnknown12Regular,\n PresenceUnknown16Regular,\n PresenceUnknown20Regular,\n} from '@fluentui/react-icons';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceAwayRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Regular,\n 'extra-small': PresenceAway10Regular,\n small: PresenceAway12Regular,\n medium: PresenceAway16Regular,\n large: PresenceAway20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Regular,\n};\n\nexport const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n large: PresenceAway20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Filled,\n};\n\nexport const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n large: PresenceAvailable20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Regular,\n};\n\nexport const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n large: PresenceAvailable20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Filled,\n};\n\nexport const presenceBlockedRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBlocked10Regular,\n 'extra-small': PresenceBlocked10Regular,\n small: PresenceBlocked12Regular,\n medium: PresenceBlocked16Regular,\n large: PresenceBlocked20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBlocked20Regular,\n};\n\nexport const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n large: PresenceBusy20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy20Filled,\n};\n\nexport const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n large: PresenceDnd20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Filled,\n};\n\nexport const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n large: PresenceDnd20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Regular,\n};\n\nexport const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n large: PresenceOof20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof20Regular,\n};\n\nexport const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n large: PresenceOffline20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline20Regular,\n};\n\nexport const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n large: PresenceUnknown20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown20Regular,\n};\n"],"names":["React","PresenceAvailable10Regular","PresenceAvailable12Regular","PresenceAvailable16Regular","PresenceAvailable20Regular","PresenceAvailable10Filled","PresenceAvailable12Filled","PresenceAvailable16Filled","PresenceAvailable20Filled","PresenceAway10Regular","PresenceAway12Regular","PresenceAway16Regular","PresenceAway20Regular","PresenceAway10Filled","PresenceAway12Filled","PresenceAway16Filled","PresenceAway20Filled","PresenceBlocked10Regular","PresenceBlocked12Regular","PresenceBlocked16Regular","PresenceBlocked20Regular","PresenceBusy10Filled","PresenceBusy12Filled","PresenceBusy16Filled","PresenceBusy20Filled","PresenceDnd10Regular","PresenceDnd12Regular","PresenceDnd16Regular","PresenceDnd20Regular","PresenceDnd10Filled","PresenceDnd12Filled","PresenceDnd16Filled","PresenceDnd20Filled","PresenceOof10Regular","PresenceOof12Regular","PresenceOof16Regular","PresenceOof20Regular","PresenceOffline10Regular","PresenceOffline12Regular","PresenceOffline16Regular","PresenceOffline20Regular","PresenceUnknown10Regular","PresenceUnknown12Regular","PresenceUnknown16Regular","PresenceUnknown20Regular","presenceAwayRegular","tiny","small","medium","large","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,yBAAyB,EACzBC,yBAAyB,EACzBC,yBAAyB,EACzBC,yBAAyB,EACzBC,qBAAqB,EACrBC,qBAAqB,EACrBC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB,EACnBC,mBAAmB,EACnBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,QACnB,wBAAwB;AAG/B,OAAO,MAAMC,sBAAmF;IAC9F,kDAAkD;IAClD,qDAAqD;IACrDC,MAAMrC;IACN,eAAeA;IACfsC,OAA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AkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDV,MAAMrB;IACN,eAAeA;IACfsB,OAAOrB;IACPsB,QAAQrB;IACRsB,OAAOrB;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAM6B,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDX,MAAMb;IACN,eAAeA;IACfc,OAAOb;IACPc,QAAQb;IACRc,OAAOb;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAMsB,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDZ,MAAMT;IACN,eAAeA;IACfU,OAAOT;IACPU,QAAQT;IACRU,OAAOT;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAMmB,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDb,MAAML;IACN,eAAeA;IACfM,OAAOL;IACPM,QAAQL;IACRM,OAAOL;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE"}
|
1
|
+
{"version":3,"sources":["presenceIcons.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n PresenceAvailable10Regular,\n PresenceAvailable12Regular,\n PresenceAvailable16Regular,\n PresenceAvailable20Regular,\n PresenceAvailable10Filled,\n PresenceAvailable12Filled,\n PresenceAvailable16Filled,\n PresenceAvailable20Filled,\n PresenceAway10Regular,\n PresenceAway12Regular,\n PresenceAway16Regular,\n PresenceAway20Regular,\n PresenceAway10Filled,\n PresenceAway12Filled,\n PresenceAway16Filled,\n PresenceAway20Filled,\n PresenceBlocked10Regular,\n PresenceBlocked12Regular,\n PresenceBlocked16Regular,\n PresenceBlocked20Regular,\n PresenceBusy10Filled,\n PresenceBusy12Filled,\n PresenceBusy16Filled,\n PresenceBusy20Filled,\n PresenceDnd10Regular,\n PresenceDnd12Regular,\n PresenceDnd16Regular,\n PresenceDnd20Regular,\n PresenceDnd10Filled,\n PresenceDnd12Filled,\n PresenceDnd16Filled,\n PresenceDnd20Filled,\n PresenceOof10Regular,\n PresenceOof12Regular,\n PresenceOof16Regular,\n PresenceOof20Regular,\n PresenceOffline10Regular,\n PresenceOffline12Regular,\n PresenceOffline16Regular,\n PresenceOffline20Regular,\n PresenceUnknown10Regular,\n PresenceUnknown12Regular,\n PresenceUnknown16Regular,\n PresenceUnknown20Regular,\n} from '@fluentui/react-icons';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceAwayRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Regular,\n 'extra-small': PresenceAway10Regular,\n small: PresenceAway12Regular,\n medium: PresenceAway16Regular,\n large: PresenceAway20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Regular,\n};\n\nexport const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n large: PresenceAway20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Filled,\n};\n\nexport const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n large: PresenceAvailable20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Regular,\n};\n\nexport const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n large: PresenceAvailable20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Filled,\n};\n\nexport const presenceBlockedRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBlocked10Regular,\n 'extra-small': PresenceBlocked10Regular,\n small: PresenceBlocked12Regular,\n medium: PresenceBlocked16Regular,\n large: PresenceBlocked20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBlocked20Regular,\n};\n\nexport const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n large: PresenceBusy20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy20Filled,\n};\n\nexport const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n large: PresenceDnd20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Filled,\n};\n\nexport const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n large: PresenceDnd20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Regular,\n};\n\nexport const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n large: PresenceOof20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof20Regular,\n};\n\nexport const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n large: PresenceOffline20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline20Regular,\n};\n\nexport const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n large: PresenceUnknown20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown20Regular,\n};\n"],"names":["React","PresenceAvailable10Regular","PresenceAvailable12Regular","PresenceAvailable16Regular","PresenceAvailable20Regular","PresenceAvailable10Filled","PresenceAvailable12Filled","PresenceAvailable16Filled","PresenceAvailable20Filled","PresenceAway10Regular","PresenceAway12Regular","PresenceAway16Regular","PresenceAway20Regular","PresenceAway10Filled","PresenceAway12Filled","PresenceAway16Filled","PresenceAway20Filled","PresenceBlocked10Regular","PresenceBlocked12Regular","PresenceBlocked16Regular","PresenceBlocked20Regular","PresenceBusy10Filled","PresenceBusy12Filled","PresenceBusy16Filled","PresenceBusy20Filled","PresenceDnd10Regular","PresenceDnd12Regular","PresenceDnd16Regular","PresenceDnd20Regular","PresenceDnd10Filled","PresenceDnd12Filled","PresenceDnd16Filled","PresenceDnd20Filled","PresenceOof10Regular","PresenceOof12Regular","PresenceOof16Regular","PresenceOof20Regular","PresenceOffline10Regular","PresenceOffline12Regular","PresenceOffline16Regular","PresenceOffline20Regular","PresenceUnknown10Regular","PresenceUnknown12Regular","PresenceUnknown16Regular","PresenceUnknown20Regular","presenceAwayRegular","tiny","small","medium","large","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,yBAAyB,EACzBC,yBAAyB,EACzBC,yBAAyB,EACzBC,yBAAyB,EACzBC,qBAAqB,EACrBC,qBAAqB,EACrBC,qBAAqB,EACrBC,qBAAqB,EACrBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,wBAAwB,EACxBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBAAoB,EACpBC,oBA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AeA;AACjB,EAAE;AAEF,OAAO,MAAMkC,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDR,MAAMzB;IACN,eAAeA;IACf0B,OAAOzB;IACP0B,QAAQzB;IACR0B,OAAOzB;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAM+B,oBAAiF;IAC5F,kDAAkD;IAClD,qDAAqD;IACrDT,MAAMjB;IACN,eAAeA;IACfkB,OAAOjB;IACPkB,QAAQjB;IACRkB,OAAOjB;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAMwB,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDV,MAAMrB;IACN,eAAeA;IACfsB,OAAOrB;IACPsB,QAAQrB;IACRsB,OAAOrB;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAM6B,qBAAkF;IAC7F,kDAAkD;IAClD,qDAAqD;IACrDX,MAAMb;IACN,eAAeA;IACfc,OAAOb;IACPc,QAAQb;IACRc,OAAOb;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAMsB,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDZ,MAAMT;IACN,eAAeA;IACfU,OAAOT;IACPU,QAAQT;IACRU,OAAOT;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE;AAEF,OAAO,MAAMmB,yBAAsF;IACjG,kDAAkD;IAClD,qDAAqD;IACrDb,MAAML;IACN,eAAeA;IACfM,OAAOL;IACPM,QAAQL;IACRM,OAAOL;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA;AACjB,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["usePresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';\n\nconst iconMap = (status: PresenceBadgeState['status'], outOfOffice: boolean, size: PresenceBadgeState['size']) => {\n switch (status) {\n case 'available':\n return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];\n case 'away':\n return outOfOffice ? presenceOofRegular[size] : presenceAwayFilled[size];\n case 'blocked':\n return presenceBlockedRegular[size];\n case 'busy':\n return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];\n case 'do-not-disturb':\n return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];\n case 'offline':\n return outOfOffice ? presenceOofRegular[size] : presenceOfflineRegular[size];\n case 'out-of-office':\n return presenceOofRegular[size];\n case 'unknown':\n return presenceUnknownRegular[size];\n }\n};\n\nconst DEFAULT_STRINGS = {\n busy: 'busy',\n 'out-of-office': 'out of office',\n away: 'away',\n available: 'available',\n offline: 'offline',\n 'do-not-disturb': 'do not disturb',\n unknown: 'unknown',\n blocked: 'blocked',\n};\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge_unstable = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeState => {\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...useBadge_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? <IconElement /> : null,\n },\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref,\n ),\n status,\n outOfOffice,\n };\n\n return state;\n};\n"],"names":["React","slot","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","useBadge_unstable","iconMap","status","outOfOffice","size","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","usePresenceBadge_unstable","props","ref","statusText","oofText","IconElement","state","role","icon","optional","defaultProps","children","renderByDefault","elementType"],"mappings":"AAAA,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,iBAAiB,QAAQ,iBAAiB;AAGnD,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,MAAMC,kBAAkB;IACtBC,MAAM;IACN,iBAAiB;IACjBC,MAAM;IACNC,WAAW;IACXC,SAAS;IACT,kBAAkB;IAClBC,SAAS;IACTC,SAAS;AACX;AAEA;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEV,OAAO,QAAQ,EAAEF,SAAS,WAAW,EAAEC,cAAc,KAAK,EAAE,GAAGU;IAEvE,MAAME,aAAaV,eAAe,CAACH,OAAO;IAC1C,MAAMc,UAAUH,MAAMV,WAAW,IAAIU,MAAMX,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEG,eAAe,CAAC,gBAAgB,CAAC,CAAC,GAAG;IAEjH,MAAMY,cAAchB,QAAQC,QAAQC,aAAaC;IAEjD,MAAMc,QAA4B;QAChC,GAAGlB,kBACD;YACE,cAAce,aAAaC;YAC3BG,MAAM;YACN,GAAGN,KAAK;YACRT;YACAgB,MAAM/B,KAAKgC,QAAQ,CAACR,MAAMO,IAAI,EAAE;gBAC9BE,cAAc;oBACZC,UAAUN,4BAAc,oBAACA,qBAAiB;gBAC5C;gBACAO,iBAAiB;gBACjBC,aAAa;YACf;QACF,GACAX,IACD;QACDZ;QACAC;IACF;IAEA,OAAOe;AACT,EAAE"}
|
1
|
+
{"version":3,"sources":["usePresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';\n\nconst iconMap = (status: PresenceBadgeState['status'], outOfOffice: boolean, size: PresenceBadgeState['size']) => {\n switch (status) {\n case 'available':\n return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];\n case 'away':\n return outOfOffice ? presenceOofRegular[size] : presenceAwayFilled[size];\n case 'blocked':\n return presenceBlockedRegular[size];\n case 'busy':\n return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];\n case 'do-not-disturb':\n return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];\n case 'offline':\n return outOfOffice ? presenceOofRegular[size] : presenceOfflineRegular[size];\n case 'out-of-office':\n return presenceOofRegular[size];\n case 'unknown':\n return presenceUnknownRegular[size];\n }\n};\n\nconst DEFAULT_STRINGS = {\n busy: 'busy',\n 'out-of-office': 'out of office',\n away: 'away',\n available: 'available',\n offline: 'offline',\n 'do-not-disturb': 'do not disturb',\n unknown: 'unknown',\n blocked: 'blocked',\n};\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge_unstable = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeState => {\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...useBadge_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? <IconElement /> : null,\n },\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref,\n ),\n status,\n outOfOffice,\n };\n\n return state;\n};\n"],"names":["React","slot","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","useBadge_unstable","iconMap","status","outOfOffice","size","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","usePresenceBadge_unstable","props","ref","statusText","oofText","IconElement","state","role","icon","optional","defaultProps","children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K,EAAE,GAAGU;IAEvE,MAAME,aAAaV,eAAe,CAACH,OAAO;IAC1C,MAAMc,UAAUH,MAAMV,WAAW,IAAIU,MAAMX,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEG,eAAe,CAAC,gBAAgB,CAAC,CAAC,GAAG;IAEjH,MAAMY,cAAchB,QAAQC,QAAQC,aAAaC;IAEjD,MAAMc,QAA4B;QAChC,GAAGlB,kBACD;YACE,cAAce,aAAaC;YAC3BG,MAAM;YACN,GAAGN,KAAK;YACRT;YACAgB,MAAM/B,KAAKgC,QAAQ,CAACR,MAAMO,IAAI,EAAE;gBAC9BE,cAAc;oBACZC,UAAUN,4BAAc,oBAACA,qBAAiB;gBAC5C;gBACAO,iBAAiB;gBACjBC,aAAa;YACf;QACF,GACAX,IACD;QACDZ;QACAC;IACF;IAEA,OAAOe;AACT,EAAE"}
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge';\nexport {\n PresenceBadge,\n presenceBadgeClassNames,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_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 { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n} from './CounterBadge';\nexport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","PresenceBadge","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","presenceAwayRegular","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular","CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable"],"mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU;AAEnH,SACEC,aAAa,EACbC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,mBAAmB,EACnBC,kBAAkB,EAClBC,wBAAwB,EACxBC,uBAAuB,EACvBC,sBAAsB,EACtBC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,sBAAsB,QACjB,kBAAkB;AAEzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,8BAA8B,EAC9BC,wBAAwB,QACnB,iBAAiB"}
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge';\nexport {\n PresenceBadge,\n presenceBadgeClassNames,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_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 { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n} from './CounterBadge';\nexport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","PresenceBadge","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","presenceAwayRegular","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular","CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable"],"rangeMappings":";;","mappings":"AAAA,SAASA,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU;AAEnH,SACEC,aAAa,EACbC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,EACzBC,mBAAmB,EACnBC,kBAAkB,EAClBC,wBAAwB,EACxBC,uBAAuB,EACvBC,sBAAsB,EACtBC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,EACjBC,kBAAkB,EAClBC,sBAAsB,EACtBC,sBAAsB,QACjB,kBAAkB;AAEzB,SACEC,YAAY,EACZC,sBAAsB,EACtBC,8BAA8B,EAC9BC,wBAAwB,QACnB,iBAAiB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Badge.
|
1
|
+
{"version":3,"sources":["Badge.ts"],"sourcesContent":["export * from './components/Badge/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CounterBadge.
|
1
|
+
{"version":3,"sources":["CounterBadge.ts"],"sourcesContent":["export * from './components/CounterBadge/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["PresenceBadge.
|
1
|
+
{"version":3,"sources":["PresenceBadge.ts"],"sourcesContent":["export * from './components/PresenceBadge/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Badge.
|
1
|
+
{"version":3,"sources":["Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from './useBadge';\nimport { useBadgeStyles_unstable } from './useBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const Badge: ForwardRefComponent<BadgeProps> = React.forwardRef((props, ref) => {\n const state = useBadge_unstable(props, ref);\n\n useBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nBadge.displayName = 'Badge';\n"],"names":["Badge","React","forwardRef","props","ref","state","useBadge_unstable","useBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;0BACW;sCACM;qCACI;6BACP;AAO9B,MAAMA,QAAAA,WAAAA,GAAyCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQC,IAAAA,2BAAAA,EAAkBH,OAAOC;IAEvCG,IAAAA,6CAAAA,EAAwBF;IAExBG,IAAAA,gDAAAA,EAA4B,2BAA2BH;IAEvD,OAAOI,IAAAA,iCAAAA,EAAqBJ;AAC9B;AAEAL,MAAMU,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
1
|
+
{"version":3,"sources":["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":[],"rangeMappings":"","mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;","mappings":";;;;;uBAAc;uBAGA;uBACA;uBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderBadge.
|
1
|
+
{"version":3,"sources":["renderBadge.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { BadgeState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeState) => {\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":["renderBadge_unstable","state","assertSlots","_jsxs","root","iconPosition","icon","_jsx","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;4BALb;gCAE4B;AAGrB,MAAMA,uBAAuB,CAACC;IACnCC,IAAAA,2BAAAA,EAAwBD;IAExB,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,YAAY,KAAK,YAAYJ,MAAMK,IAAI,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,IAAI,EAAA,CAAA;YAC5DL,MAAMG,IAAI,CAACI,QAAQ;YACnBP,MAAMI,YAAY,KAAK,WAAWJ,MAAMK,IAAI,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,IAAI,EAAA,CAAA;;;AAGlE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useBadge.
|
1
|
+
{"version":3,"sources":["useBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { 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 {\n shape = 'circular',\n size = 'medium',\n iconPosition = 'before',\n appearance = 'filled',\n color = 'brand',\n } = props;\n\n const state: BadgeState = {\n shape,\n size,\n iconPosition,\n appearance,\n color,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n };\n\n return state;\n};\n"],"names":["useBadge_unstable","props","ref","shape","size","iconPosition","appearance","color","state","components","root","icon","slot","always","getIntrinsicElementProps","elementType","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;gCACwB;AAMxC,MAAMA,oBAAoB,CAACC,OAAmBC;IACnD,MAAM,EACJC,QAAQ,UAAU,EAClBC,OAAO,QAAQ,EACfC,eAAe,QAAQ,EACvBC,aAAa,QAAQ,EACrBC,QAAQ,OAAO,EAChB,GAAGN;IAEJ,MAAMO,QAAoB;QACxBL;QACAC;QACAC;QACAC;QACAC;QACAE,YAAY;YACVC,MAAM;YACNC,MAAM;QACR;QACAD,MAAME,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FZ,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEc,aAAa;QAAM;QAEvBJ,MAAMC,oBAAAA,CAAKI,QAAQ,CAACf,MAAMU,IAAI,EAAE;YAAEI,aAAa;QAAO;IACxD;IAEA,OAAOP;AACT"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useBadgeStyles.styles.js"],"sourcesContent":["import { shorthands, __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const badgeClassNames = {\n root: 'fui-Badge',\n icon: 'fui-Badge__icon'\n};\n// The text content of the badge has additional horizontal padding, but there is no `text` slot to add that padding to.\n// Instead, add extra padding to the root, and a negative margin on the icon to \"remove\" the extra padding on the icon.\nconst textPadding = tokens.spacingHorizontalXXS;\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"r1l7mb74\", \"rntuq2r\", [\".r1l7mb74{display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;position:relative;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase200);height:20px;width:20px;min-width:max-content;padding:0 calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));border-radius:var(--borderRadiusCircular);border-color:var(--colorTransparentStroke);}\", \".r1l7mb74::after{content:\\\"\\\";position:absolute;top:0;left:0;bottom:0;right:0;border-style:solid;border-color:inherit;border-width:var(--strokeWidthThin);border-radius:inherit;}\", \".rntuq2r{display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;position:relative;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase200);height:20px;width:20px;min-width:max-content;padding:0 calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));border-radius:var(--borderRadiusCircular);border-color:var(--colorTransparentStroke);}\", \".rntuq2r::after{content:\\\"\\\";position:absolute;top:0;right:0;bottom:0;left:0;border-style:solid;border-color:inherit;border-width:var(--strokeWidthThin);border-radius:inherit;}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n fontSmallToTiny: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"f13mqy1h\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"fcpl73t\"\n },\n tiny: {\n a9b677: \"f16dn6v3\",\n Bqenvij: \"f3mu39s\",\n Be2twd7: \"f130uwy9\",\n Bg96gwp: \"fod1mrr\",\n Bf4jedk: \"f18p0k4z\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f19jm9xf\"\n },\n \"extra-small\": {\n a9b677: \"fpd43o0\",\n Bqenvij: \"f30q22z\",\n Be2twd7: \"f1tccstq\",\n Bg96gwp: \"f1y3arg5\",\n Bf4jedk: \"f18p0k4z\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f19jm9xf\"\n },\n small: {\n a9b677: \"fjw5fx7\",\n Bqenvij: \"fd461yt\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fupdldz\"\n },\n medium: {},\n large: {\n a9b677: \"fq4mcun\",\n Bqenvij: \"frvgh55\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1996nqw\"\n },\n \"extra-large\": {\n a9b677: \"f1szoe96\",\n Bqenvij: \"f1d2rq10\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fty64o7\"\n },\n square: {\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"f1fabniw\"\n },\n rounded: {\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\"\n },\n roundedSmallToTiny: {\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"fq9zq91\"\n },\n circular: {},\n borderGhost: {\n ap17g6: \"f10ludwy\"\n },\n filled: {},\n \"filled-brand\": {\n De3pzq: \"ffp7eso\",\n sj55zd: \"f1phragk\"\n },\n \"filled-danger\": {\n De3pzq: \"fdl5y0r\",\n sj55zd: \"f1phragk\"\n },\n \"filled-important\": {\n De3pzq: \"f1c73kur\",\n sj55zd: \"fr0bkrk\"\n },\n \"filled-informative\": {\n De3pzq: \"f3vzo32\",\n sj55zd: \"f11d4kpn\"\n },\n \"filled-severe\": {\n De3pzq: \"f1s438gw\",\n sj55zd: \"f1phragk\"\n },\n \"filled-subtle\": {\n De3pzq: \"fxugw4r\",\n sj55zd: \"f19n0e5\"\n },\n \"filled-success\": {\n De3pzq: \"flxk52p\",\n sj55zd: \"f1phragk\"\n },\n \"filled-warning\": {\n De3pzq: \"ffq97bm\",\n sj55zd: \"ff5vbop\"\n },\n ghost: {},\n \"ghost-brand\": {\n sj55zd: \"f16muhyy\"\n },\n \"ghost-danger\": {\n sj55zd: \"f1whyuy6\"\n },\n \"ghost-important\": {\n sj55zd: \"f19n0e5\"\n },\n \"ghost-informative\": {\n sj55zd: \"f11d4kpn\"\n },\n \"ghost-severe\": {\n sj55zd: \"f1l8vj45\"\n },\n \"ghost-subtle\": {\n sj55zd: \"fonrgv7\"\n },\n \"ghost-success\": {\n sj55zd: \"f1m7fhi8\"\n },\n \"ghost-warning\": {\n sj55zd: \"fpti2h4\"\n },\n outline: {\n g2u3we: \"f23ftbb\",\n h3c5rm: [\"f1gkuv52\", \"f1p1bl80\"],\n B9xav0g: \"fioka3i\",\n zhjwy3: [\"f1p1bl80\", \"f1gkuv52\"]\n },\n \"outline-brand\": {\n sj55zd: \"f16muhyy\"\n },\n \"outline-danger\": {\n sj55zd: \"f1whyuy6\",\n g2u3we: \"fyqpifd\",\n h3c5rm: [\"f3ukxca\", \"f1k7dugc\"],\n B9xav0g: \"f1njxb2b\",\n zhjwy3: [\"f1k7dugc\", \"f3ukxca\"]\n },\n \"outline-important\": {\n sj55zd: \"f11d4kpn\",\n g2u3we: \"fq0vr37\",\n h3c5rm: [\"f1byw159\", \"f11cr0be\"],\n B9xav0g: \"f1c1zstj\",\n zhjwy3: [\"f11cr0be\", \"f1byw159\"]\n },\n \"outline-informative\": {\n sj55zd: \"f11d4kpn\",\n g2u3we: \"f68mrw8\",\n h3c5rm: [\"f7pw515\", \"fw35ms5\"],\n B9xav0g: \"frpde29\",\n zhjwy3: [\"fw35ms5\", \"f7pw515\"]\n },\n \"outline-severe\": {\n sj55zd: \"f1l8vj45\"\n },\n \"outline-subtle\": {\n sj55zd: \"fonrgv7\"\n },\n \"outline-success\": {\n sj55zd: \"f1m7fhi8\",\n g2u3we: \"f1mmhl11\",\n h3c5rm: [\"f1tjpp2f\", \"f1ocn5n7\"],\n B9xav0g: \"f1gjv25d\",\n zhjwy3: [\"f1ocn5n7\", \"f1tjpp2f\"]\n },\n \"outline-warning\": {\n sj55zd: \"fpti2h4\"\n },\n tint: {},\n \"tint-brand\": {\n De3pzq: \"f16xkysk\",\n sj55zd: \"faj9fo0\",\n g2u3we: \"f161y7kd\",\n h3c5rm: [\"f1c8dzaj\", \"f1sl6hi9\"],\n B9xav0g: \"f1619yhw\",\n zhjwy3: [\"f1sl6hi9\", \"f1c8dzaj\"]\n },\n \"tint-danger\": {\n De3pzq: \"ff0poqj\",\n sj55zd: \"f1hcrxcs\",\n g2u3we: \"f1oqjm8o\",\n h3c5rm: [\"fkgrb8g\", \"frb5wm0\"],\n B9xav0g: \"f1iai1ph\",\n zhjwy3: [\"frb5wm0\", \"fkgrb8g\"]\n },\n \"tint-important\": {\n De3pzq: \"f945g0u\",\n sj55zd: \"fr0bkrk\",\n g2u3we: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"]\n },\n \"tint-informative\": {\n De3pzq: \"f1ctqxl6\",\n sj55zd: \"f11d4kpn\",\n g2u3we: \"f68mrw8\",\n h3c5rm: [\"f7pw515\", \"fw35ms5\"],\n B9xav0g: \"frpde29\",\n zhjwy3: [\"fw35ms5\", \"f7pw515\"]\n },\n \"tint-severe\": {\n De3pzq: \"f1xzsg4\",\n sj55zd: \"f1k5f75o\",\n g2u3we: \"fxy9dsj\",\n h3c5rm: [\"f54u6j2\", \"fcm23ze\"],\n B9xav0g: \"f4vf0uq\",\n zhjwy3: [\"fcm23ze\", \"f54u6j2\"]\n },\n \"tint-subtle\": {\n De3pzq: \"fxugw4r\",\n sj55zd: \"f11d4kpn\",\n g2u3we: \"f68mrw8\",\n h3c5rm: [\"f7pw515\", \"fw35ms5\"],\n B9xav0g: \"frpde29\",\n zhjwy3: [\"fw35ms5\", \"f7pw515\"]\n },\n \"tint-success\": {\n De3pzq: \"f2vsrz6\",\n sj55zd: \"ffmvakt\",\n g2u3we: \"fdmic9h\",\n h3c5rm: [\"f196y6m\", \"fetptd8\"],\n B9xav0g: \"f1pev5xq\",\n zhjwy3: [\"fetptd8\", \"f196y6m\"]\n },\n \"tint-warning\": {\n De3pzq: \"f10s6hli\",\n sj55zd: \"f42v8de\",\n g2u3we: \"fn9i3n\",\n h3c5rm: [\"f1aw8cx4\", \"f51if14\"],\n B9xav0g: \"fvq8iai\",\n zhjwy3: [\"f51if14\", \"f1aw8cx4\"]\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".f13mqy1h{font-size:var(--fontSizeBase100);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".fcpl73t{line-height:var(--lineHeightBase100);}\", \".f16dn6v3{width:6px;}\", \".f3mu39s{height:6px;}\", \".f130uwy9{font-size:4px;}\", \".fod1mrr{line-height:4px;}\", \".f18p0k4z{min-width:unset;}\", [\".f19jm9xf{padding:unset;}\", {\n p: -1\n }], \".fpd43o0{width:10px;}\", \".f30q22z{height:10px;}\", \".f1tccstq{font-size:6px;}\", \".f1y3arg5{line-height:6px;}\", [\".f19jm9xf{padding:unset;}\", {\n p: -1\n }], \".fjw5fx7{width:16px;}\", \".fd461yt{height:16px;}\", [\".fupdldz{padding:0 calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}\", {\n p: -1\n }], \".fq4mcun{width:24px;}\", \".frvgh55{height:24px;}\", [\".f1996nqw{padding:0 calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}\", {\n p: -1\n }], \".f1szoe96{width:32px;}\", \".f1d2rq10{height:32px;}\", [\".fty64o7{padding:0 calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}\", {\n p: -1\n }], [\".f1fabniw{border-radius:var(--borderRadiusNone);}\", {\n p: -1\n }], [\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], [\".fq9zq91{border-radius:var(--borderRadiusSmall);}\", {\n p: -1\n }], \".f10ludwy::after{display:none;}\", \".ffp7eso{background-color:var(--colorBrandBackground);}\", \".f1phragk{color:var(--colorNeutralForegroundOnBrand);}\", \".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}\", \".f1c73kur{background-color:var(--colorNeutralForeground1);}\", \".fr0bkrk{color:var(--colorNeutralBackground1);}\", \".f3vzo32{background-color:var(--colorNeutralBackground5);}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".f1s438gw{background-color:var(--colorPaletteDarkOrangeBackground3);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".flxk52p{background-color:var(--colorPaletteGreenBackground3);}\", \".ffq97bm{background-color:var(--colorPaletteYellowBackground3);}\", \".ff5vbop{color:var(--colorNeutralForeground1Static);}\", \".f16muhyy{color:var(--colorBrandForeground1);}\", \".f1whyuy6{color:var(--colorPaletteRedForeground3);}\", \".f1l8vj45{color:var(--colorPaletteDarkOrangeForeground3);}\", \".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}\", \".f1m7fhi8{color:var(--colorPaletteGreenForeground3);}\", \".fpti2h4{color:var(--colorPaletteYellowForeground2);}\", \".f23ftbb{border-top-color:currentColor;}\", \".f1gkuv52{border-right-color:currentColor;}\", \".f1p1bl80{border-left-color:currentColor;}\", \".fioka3i{border-bottom-color:currentColor;}\", \".fyqpifd{border-top-color:var(--colorPaletteRedBorder2);}\", \".f3ukxca{border-right-color:var(--colorPaletteRedBorder2);}\", \".f1k7dugc{border-left-color:var(--colorPaletteRedBorder2);}\", \".f1njxb2b{border-bottom-color:var(--colorPaletteRedBorder2);}\", \".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}\", \".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}\", \".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}\", \".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}\", \".f68mrw8{border-top-color:var(--colorNeutralStroke2);}\", \".f7pw515{border-right-color:var(--colorNeutralStroke2);}\", \".fw35ms5{border-left-color:var(--colorNeutralStroke2);}\", \".frpde29{border-bottom-color:var(--colorNeutralStroke2);}\", \".f1mmhl11{border-top-color:var(--colorPaletteGreenBorder2);}\", \".f1tjpp2f{border-right-color:var(--colorPaletteGreenBorder2);}\", \".f1ocn5n7{border-left-color:var(--colorPaletteGreenBorder2);}\", \".f1gjv25d{border-bottom-color:var(--colorPaletteGreenBorder2);}\", \".f16xkysk{background-color:var(--colorBrandBackground2);}\", \".faj9fo0{color:var(--colorBrandForeground2);}\", \".f161y7kd{border-top-color:var(--colorBrandStroke2);}\", \".f1c8dzaj{border-right-color:var(--colorBrandStroke2);}\", \".f1sl6hi9{border-left-color:var(--colorBrandStroke2);}\", \".f1619yhw{border-bottom-color:var(--colorBrandStroke2);}\", \".ff0poqj{background-color:var(--colorPaletteRedBackground1);}\", \".f1hcrxcs{color:var(--colorPaletteRedForeground1);}\", \".f1oqjm8o{border-top-color:var(--colorPaletteRedBorder1);}\", \".fkgrb8g{border-right-color:var(--colorPaletteRedBorder1);}\", \".frb5wm0{border-left-color:var(--colorPaletteRedBorder1);}\", \".f1iai1ph{border-bottom-color:var(--colorPaletteRedBorder1);}\", \".f945g0u{background-color:var(--colorNeutralForeground3);}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".f1ctqxl6{background-color:var(--colorNeutralBackground4);}\", \".f1xzsg4{background-color:var(--colorPaletteDarkOrangeBackground1);}\", \".f1k5f75o{color:var(--colorPaletteDarkOrangeForeground1);}\", \".fxy9dsj{border-top-color:var(--colorPaletteDarkOrangeBorder1);}\", \".f54u6j2{border-right-color:var(--colorPaletteDarkOrangeBorder1);}\", \".fcm23ze{border-left-color:var(--colorPaletteDarkOrangeBorder1);}\", \".f4vf0uq{border-bottom-color:var(--colorPaletteDarkOrangeBorder1);}\", \".f2vsrz6{background-color:var(--colorPaletteGreenBackground1);}\", \".ffmvakt{color:var(--colorPaletteGreenForeground1);}\", \".fdmic9h{border-top-color:var(--colorPaletteGreenBorder1);}\", \".f196y6m{border-right-color:var(--colorPaletteGreenBorder1);}\", \".fetptd8{border-left-color:var(--colorPaletteGreenBorder1);}\", \".f1pev5xq{border-bottom-color:var(--colorPaletteGreenBorder1);}\", \".f10s6hli{background-color:var(--colorPaletteYellowBackground1);}\", \".f42v8de{color:var(--colorPaletteYellowForeground1);}\", \".fn9i3n{border-top-color:var(--colorPaletteYellowBorder1);}\", \".f1aw8cx4{border-right-color:var(--colorPaletteYellowBorder1);}\", \".f51if14{border-left-color:var(--colorPaletteYellowBorder1);}\", \".fvq8iai{border-bottom-color:var(--colorPaletteYellowBorder1);}\"]\n});\nconst useIconRootClassName = /*#__PURE__*/__resetStyles(\"rttl5z0\", null, [\".rttl5z0{display:flex;line-height:1;margin:0 calc(-1 * var(--spacingHorizontalXXS));font-size:12px;}\"]);\nconst useIconStyles = /*#__PURE__*/__styles({\n beforeText: {\n t21cq0: [\"f1t8l4o1\", \"f11juvx6\"]\n },\n afterText: {\n Frg6f3: [\"f11juvx6\", \"f1t8l4o1\"]\n },\n beforeTextXL: {\n t21cq0: [\"f1rs9grm\", \"f1kwmkpi\"]\n },\n afterTextXL: {\n Frg6f3: [\"f1kwmkpi\", \"f1rs9grm\"]\n },\n tiny: {\n Be2twd7: \"f1tccstq\"\n },\n \"extra-small\": {\n Be2twd7: \"fnmn6fi\"\n },\n small: {\n Be2twd7: \"f1ugzwwg\"\n },\n medium: {},\n large: {\n Be2twd7: \"f4ybsrx\"\n },\n \"extra-large\": {\n Be2twd7: \"fe5j1ua\"\n }\n}, {\n d: [\".f1t8l4o1{margin-right:calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}\", \".f11juvx6{margin-left:calc(var(--spacingHorizontalXXS) + var(--spacingHorizontalXXS));}\", \".f1rs9grm{margin-right:calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}\", \".f1kwmkpi{margin-left:calc(var(--spacingHorizontalXS) + var(--spacingHorizontalXXS));}\", \".f1tccstq{font-size:6px;}\", \".fnmn6fi{font-size:10px;}\", \".f1ugzwwg{font-size:12px;}\", \".f4ybsrx{font-size:16px;}\", \".fe5j1ua{font-size:20px;}\"]\n});\n/**\n * Applies style classnames to slots\n */\nexport const useBadgeStyles_unstable = state => {\n 'use no memo';\n\n const rootClassName = useRootClassName();\n const rootStyles = useRootStyles();\n const smallToTiny = state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny';\n state.root.className = mergeClasses(badgeClassNames.root, rootClassName, smallToTiny && rootStyles.fontSmallToTiny, rootStyles[state.size], rootStyles[state.shape], state.shape === 'rounded' && smallToTiny && rootStyles.roundedSmallToTiny, state.appearance === 'ghost' && rootStyles.borderGhost, rootStyles[state.appearance], rootStyles[`${state.appearance}-${state.color}`], state.root.className);\n const iconRootClassName = useIconRootClassName();\n const iconStyles = useIconStyles();\n if (state.icon) {\n let iconPositionClass;\n if (state.root.children) {\n if (state.size === 'extra-large') {\n iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterTextXL : iconStyles.beforeTextXL;\n } else {\n iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterText : iconStyles.beforeText;\n }\n }\n state.icon.className = mergeClasses(badgeClassNames.icon, iconRootClassName, iconPositionClass, iconStyles[state.size], state.icon.className);\n }\n return state;\n};\n//# sourceMappingURL=useBadgeStyles.styles.js.map"],"names":["badgeClassNames","useBadgeStyles_unstable","root","icon","textPadding","tokens","spacingHorizontalXXS","useRootClassName","__resetStyles","useRootStyles","__styles","fontSmallToTiny","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","tiny","a9b677","Bqenvij","Bf4jedk","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","small","medium","large","square","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","rounded","roundedSmallToTiny","circular","borderGhost","ap17g6","filled","De3pzq","sj55zd","ghost","outline","g2u3we","h3c5rm","B9xav0g","zhjwy3","tint","d","p","useIconRootClassName","useIconStyles","beforeText","t21cq0","afterText","Frg6f3","beforeTextXL","afterTextXL","state","rootClassName","rootStyles","smallToTiny","size","className","mergeClasses","shape","appearance","color","iconRootClassName","iconStyles","iconPositionClass","children","iconPosition"],"mappings":";;;;;;;;;;;IAEaA,eAAe;eAAfA;;IA4TAC,uBAAuB;eAAvBA;;;uBA9TqD;4BACzB;AAClC,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,MAAM;AACR;AACA,uHAAuH;AACvH,uHAAuH;AACvH,MAAMC,cAAcC,kBAAM,CAACC,oBAAoB;AAC/C,MAAMC,mBAAmB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,WAAW;IAAC;IAA8c;IAAqL;IAA6c;CAAmL;AAC/0C,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAC1CC,iBAAiB;QACfC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;IACX;IACAC,MAAM;QACJC,QAAQ;QACRC,SAAS;QACTL,SAAS;QACTE,SAAS;QACTI,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACA,eAAe;QACbP,QAAQ;QACRC,SAAS;QACTL,SAAS;QACTE,SAAS;QACTI,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACAC,OAAO;QACLR,QAAQ;QACRC,SAAS;QACTE,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACAE,QAAQ,CAAC;IACTC,OAAO;QACLV,QAAQ;QACRC,SAAS;QACTE,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACA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,IAAI,CAAC,EAAEF,UAAU,CAACF,MAAMO,KAAK,CAAC,EAAEP,MAAMO,KAAK,KAAK,aAAaJ,eAAeD,WAAW1B,kBAAkB,EAAEwB,MAAMQ,UAAU,KAAK,WAAWN,WAAWxB,WAAW,EAAEwB,UAAU,CAACF,MAAMQ,UAAU,CAAC,EAAEN,UAAU,CAAC,CAAC,EAAEF,MAAMQ,UAAU,CAAC,CAAC,EAAER,MAAMS,KAAK,CAAC,CAAC,CAAC,EAAET,MAAMzD,IAAI,CAAC8D,SAAS;IAC5Y,MAAMK,oBAAoBlB;IAC1B,MAAMmB,aAAalB;IACnB,IAAIO,MAAMxD,IAAI,EAAE;QACd,IAAIoE;QACJ,IAAIZ,MAAMzD,IAAI,CAACsE,QAAQ,EAAE;YACvB,IAAIb,MAAMI,IAAI,KAAK,eAAe;gBAChCQ,oBAAoBZ,MAAMc,YAAY,KAAK,UAAUH,WAAWZ,WAAW,GAAGY,WAAWb,YAAY;YACvG,OAAO;gBACLc,oBAAoBZ,MAAMc,YAAY,KAAK,UAAUH,WAAWf,SAAS,GAAGe,WAAWjB,UAAU;YACnG;QACF;QACAM,MAAMxD,IAAI,CAAC6D,SAAS,GAAGC,IAAAA,mBAAY,EAACjE,gBAAgBG,IAAI,EAAEkE,mBAAmBE,mBAAmBD,UAAU,CAACX,MAAMI,IAAI,CAAC,EAAEJ,MAAMxD,IAAI,CAAC6D,SAAS;IAC9I;IACA,OAAOL;AACT,GACA,iDAAiD"}
|
1
|
+
{"version":3,"sources":["useBadgeStyles.styles.js"],"sourcesContent":["import { shorthands, makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const badgeClassNames = {\n root: 'fui-Badge',\n icon: 'fui-Badge__icon'\n};\n// The text content of the badge has additional horizontal padding, but there is no `text` slot to add that padding to.\n// Instead, add extra padding to the root, and a negative margin on the icon to \"remove\" the extra padding on the icon.\nconst textPadding = tokens.spacingHorizontalXXS;\nconst useRootClassName = makeResetStyles({\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n ...typographyStyles.caption1Strong,\n height: '20px',\n width: '20px',\n minWidth: 'max-content',\n padding: `0 calc(${tokens.spacingHorizontalXS} + ${textPadding})`,\n borderRadius: tokens.borderRadiusCircular,\n // Use a transparent stroke (rather than no border) so the border is visible in high contrast\n borderColor: tokens.colorTransparentStroke,\n '::after': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n borderStyle: 'solid',\n borderColor: 'inherit',\n borderWidth: tokens.strokeWidthThin,\n borderRadius: 'inherit'\n }\n});\nconst useRootStyles = makeStyles({\n fontSmallToTiny: {\n ...typographyStyles.caption2Strong\n },\n // size\n tiny: {\n width: '6px',\n height: '6px',\n fontSize: '4px',\n lineHeight: '4px',\n minWidth: 'unset',\n padding: 'unset'\n },\n 'extra-small': {\n width: '10px',\n height: '10px',\n fontSize: '6px',\n lineHeight: '6px',\n minWidth: 'unset',\n padding: 'unset'\n },\n small: {\n width: '16px',\n height: '16px',\n padding: `0 calc(${tokens.spacingHorizontalXXS} + ${textPadding})`\n },\n medium: {\n },\n large: {\n width: '24px',\n height: '24px',\n padding: `0 calc(${tokens.spacingHorizontalXS} + ${textPadding})`\n },\n 'extra-large': {\n width: '32px',\n height: '32px',\n padding: `0 calc(${tokens.spacingHorizontalSNudge} + ${textPadding})`\n },\n // shape\n square: {\n borderRadius: tokens.borderRadiusNone\n },\n rounded: {\n borderRadius: tokens.borderRadiusMedium\n },\n roundedSmallToTiny: {\n borderRadius: tokens.borderRadiusSmall\n },\n circular: {\n },\n // hide the boder when appearance is \"ghost\"\n borderGhost: {\n // The border is applied in an ::after pseudo-element because it should not affect layout.\n // The padding and size of the badge should be the same regardless of whether or not it has a border.\n '::after': {\n display: 'none'\n }\n },\n // appearance: filled\n filled: {\n },\n 'filled-brand': {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand\n },\n 'filled-danger': {\n backgroundColor: tokens.colorPaletteRedBackground3,\n color: tokens.colorNeutralForegroundOnBrand\n },\n 'filled-important': {\n backgroundColor: tokens.colorNeutralForeground1,\n color: tokens.colorNeutralBackground1\n },\n 'filled-informative': {\n backgroundColor: tokens.colorNeutralBackground5,\n color: tokens.colorNeutralForeground3\n },\n 'filled-severe': {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground3,\n color: tokens.colorNeutralForegroundOnBrand\n },\n 'filled-subtle': {\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1\n },\n 'filled-success': {\n backgroundColor: tokens.colorPaletteGreenBackground3,\n color: tokens.colorNeutralForegroundOnBrand\n },\n 'filled-warning': {\n backgroundColor: tokens.colorPaletteYellowBackground3,\n color: tokens.colorNeutralForeground1Static\n },\n // appearance: ghost\n ghost: {\n },\n 'ghost-brand': {\n color: tokens.colorBrandForeground1\n },\n 'ghost-danger': {\n color: tokens.colorPaletteRedForeground3\n },\n 'ghost-important': {\n color: tokens.colorNeutralForeground1\n },\n 'ghost-informative': {\n color: tokens.colorNeutralForeground3\n },\n 'ghost-severe': {\n color: tokens.colorPaletteDarkOrangeForeground3\n },\n 'ghost-subtle': {\n color: tokens.colorNeutralForegroundStaticInverted\n },\n 'ghost-success': {\n color: tokens.colorPaletteGreenForeground3\n },\n 'ghost-warning': {\n color: tokens.colorPaletteYellowForeground2\n },\n // appearance: outline\n outline: {\n ...shorthands.borderColor('currentColor')\n },\n 'outline-brand': {\n color: tokens.colorBrandForeground1\n },\n 'outline-danger': {\n color: tokens.colorPaletteRedForeground3,\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2)\n },\n 'outline-important': {\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible)\n },\n 'outline-informative': {\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStroke2)\n },\n 'outline-severe': {\n color: tokens.colorPaletteDarkOrangeForeground3\n },\n 'outline-subtle': {\n color: tokens.colorNeutralForegroundStaticInverted\n },\n 'outline-success': {\n color: tokens.colorPaletteGreenForeground3,\n ...shorthands.borderColor(tokens.colorPaletteGreenBorder2)\n },\n 'outline-warning': {\n color: tokens.colorPaletteYellowForeground2\n },\n // appearance: tint\n tint: {\n },\n 'tint-brand': {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorBrandForeground2,\n ...shorthands.borderColor(tokens.colorBrandStroke2)\n },\n 'tint-danger': {\n backgroundColor: tokens.colorPaletteRedBackground1,\n color: tokens.colorPaletteRedForeground1,\n ...shorthands.borderColor(tokens.colorPaletteRedBorder1)\n },\n 'tint-important': {\n backgroundColor: tokens.colorNeutralForeground3,\n color: tokens.colorNeutralBackground1,\n ...shorthands.borderColor(tokens.colorTransparentStroke)\n },\n 'tint-informative': {\n backgroundColor: tokens.colorNeutralBackground4,\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStroke2)\n },\n 'tint-severe': {\n backgroundColor: tokens.colorPaletteDarkOrangeBackground1,\n color: tokens.colorPaletteDarkOrangeForeground1,\n ...shorthands.borderColor(tokens.colorPaletteDarkOrangeBorder1)\n },\n 'tint-subtle': {\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground3,\n ...shorthands.borderColor(tokens.colorNeutralStroke2)\n },\n 'tint-success': {\n backgroundColor: tokens.colorPaletteGreenBackground1,\n color: tokens.colorPaletteGreenForeground1,\n ...shorthands.borderColor(tokens.colorPaletteGreenBorder1)\n },\n 'tint-warning': {\n backgroundColor: tokens.colorPaletteYellowBackground1,\n color: tokens.colorPaletteYellowForeground1,\n ...shorthands.borderColor(tokens.colorPaletteYellowBorder1)\n }\n});\nconst useIconRootClassName = makeResetStyles({\n display: 'flex',\n lineHeight: '1',\n margin: `0 calc(-1 * ${textPadding})`,\n fontSize: '12px'\n});\nconst useIconStyles = makeStyles({\n beforeText: {\n marginRight: `calc(${tokens.spacingHorizontalXXS} + ${textPadding})`\n },\n afterText: {\n marginLeft: `calc(${tokens.spacingHorizontalXXS} + ${textPadding})`\n },\n beforeTextXL: {\n marginRight: `calc(${tokens.spacingHorizontalXS} + ${textPadding})`\n },\n afterTextXL: {\n marginLeft: `calc(${tokens.spacingHorizontalXS} + ${textPadding})`\n },\n // size\n tiny: {\n fontSize: '6px'\n },\n 'extra-small': {\n fontSize: '10px'\n },\n small: {\n fontSize: '12px'\n },\n medium: {\n },\n large: {\n fontSize: '16px'\n },\n 'extra-large': {\n fontSize: '20px'\n }\n});\n/**\n * Applies style classnames to slots\n */ export const useBadgeStyles_unstable = (state)=>{\n 'use no memo';\n const rootClassName = useRootClassName();\n const rootStyles = useRootStyles();\n const smallToTiny = state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny';\n state.root.className = mergeClasses(badgeClassNames.root, rootClassName, smallToTiny && rootStyles.fontSmallToTiny, rootStyles[state.size], rootStyles[state.shape], state.shape === 'rounded' && smallToTiny && rootStyles.roundedSmallToTiny, state.appearance === 'ghost' && rootStyles.borderGhost, rootStyles[state.appearance], rootStyles[`${state.appearance}-${state.color}`], state.root.className);\n const iconRootClassName = useIconRootClassName();\n const iconStyles = useIconStyles();\n if (state.icon) {\n let iconPositionClass;\n if (state.root.children) {\n if (state.size === 'extra-large') {\n iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterTextXL : iconStyles.beforeTextXL;\n } else {\n iconPositionClass = state.iconPosition === 'after' ? iconStyles.afterText : iconStyles.beforeText;\n }\n }\n state.icon.className = mergeClasses(badgeClassNames.icon, iconRootClassName, iconPositionClass, iconStyles[state.size], state.icon.className);\n }\n return state;\n};\n"],"names":["badgeClassNames","useBadgeStyles_unstable","root","icon","textPadding","tokens","spacingHorizontalXXS","useRootClassName","__resetStyles","useRootStyles","__styles","fontSmallToTiny","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","tiny","a9b677","Bqenvij","Bf4jedk","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","small","medium","large","square","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","rounded","roundedSmallToTiny","circular","borderGhost","ap17g6","filled","De3pzq","sj55zd","ghost","outline","g2u3we","h3c5rm","B9xav0g","zhjwy3","tint","d","p","useIconRootClassName","useIconStyles","beforeText","t21cq0","afterText","Frg6f3","beforeTextXL","afterTextXL","state","rootClassName","rootStyles","smallToTiny","size","className","mergeClasses","shape","appearance","color","iconRootClassName","iconStyles","iconPositionClass","children","iconPosition"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,eAAe;eAAfA;;IA8QIC,uBAAuB;eAAvBA;;;uBAhRqD;4BAC7B;AAClC,MAAMD,kBAAkB;IAC3BE,MAAM;IACNC,MAAM;AACV;AACA,uHAAA;AACA,uHAAA;AACA,MAAMC,c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AAI,KAAK,eAAe;gBAC9BQ,oBAAoBZ,MAAMc,YAAY,KAAK,UAAUH,WAAWZ,WAAW,GAAGY,WAAWb,YAAY;YACzG,OAAO;gBACHc,oBAAoBZ,MAAMc,YAAY,KAAK,UAAUH,WAAWf,SAAS,GAAGe,WAAWjB,UAAU;YACrG;QACJ;QACAM,MAAMxD,IAAI,CAAC6D,SAAS,GAAGC,IAAAA,mBAAY,EAACjE,gBAAgBG,IAAI,EAAEkE,mBAAmBE,mBAAmBD,UAAU,CAACX,MAAMI,IAAI,CAAC,EAAEJ,MAAMxD,IAAI,CAAC6D,SAAS;IAChJ;IACA,OAAOL;AACX"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["CounterBadge.
|
1
|
+
{"version":3,"sources":["CounterBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCounterBadge_unstable } from './useCounterBadge';\nimport { useCounterBadgeStyles_unstable } from './useCounterBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps } from './CounterBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled CounterBadge, using the `useCounterBadge_unstable` hook.\n */\nexport const CounterBadge: ForwardRefComponent<CounterBadgeProps> = React.forwardRef((props, ref) => {\n const state = useCounterBadge_unstable(props, ref);\n\n useCounterBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('useCounterBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"names":["CounterBadge","React","forwardRef","props","ref","state","useCounterBadge_unstable","useCounterBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;6CACM;qCACH;uBACP;AAO9B,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,2BAAAA,EAAqBJ;AAC9B;AAEAL,aAAaU,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
1
|
+
{"version":3,"sources":["CounterBadge.types.ts"],"sourcesContent":["import type { BadgeProps, BadgeState } from '../Badge/index';\n\nexport type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color' | 'shape'> & {\n /**\n * A Badge can have different appearances that emphasize certain parts of it:\n * - filled: The default appearance if one is not specified.\n * The badge background is filled with color with a contrasting foreground text to match.\n * - ghost: The badge background is transparent, with the foreground text taking color to emphasize it.\n * @default filled\n */\n appearance?: 'filled' | 'ghost';\n\n /**\n * Semantic colors for a counter badge\n * @default brand\n */\n color?: Extract<BadgeProps['color'], 'brand' | 'danger' | 'important' | 'informative'>;\n\n /**\n * Value displayed by the Badge\n * @default 0\n */\n count?: number;\n\n /**\n * If a dot should be displayed without the count\n * @default false\n */\n dot?: boolean;\n\n /**\n * Max number to be displayed\n * @default 99\n */\n overflowCount?: number;\n\n /**\n * A Badge can be circular or rounded\n * @default circular\n */\n shape?: 'circular' | 'rounded';\n\n /**\n * If the badge should be shown when count is 0\n * @default false\n */\n showZero?: boolean;\n};\n\nexport type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> &\n Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;\n"],"names":[],"rangeMappings":"","mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './CounterBadge';\nexport * from './CounterBadge.types';\nexport * from './useCounterBadge';\nexport * from './useCounterBadgeStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCounterBadge.
|
1
|
+
{"version":3,"sources":["useCounterBadge.ts"],"sourcesContent":["import * as React from 'react';\nimport type { BadgeState } from '../Badge/index';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useCounterBadge_unstable = (props: CounterBadgeProps, ref: React.Ref<HTMLElement>): CounterBadgeState => {\n const {\n shape = 'circular',\n appearance = 'filled',\n showZero = false,\n overflowCount = 99,\n count = 0,\n dot = false,\n } = props;\n\n const state: CounterBadgeState = {\n ...(useBadge_unstable(props, ref) as Pick<CounterBadgeState, keyof BadgeState>),\n shape,\n appearance,\n showZero,\n count,\n dot,\n };\n\n if ((count !== 0 || showZero) && !dot && !state.root.children) {\n state.root.children = count > overflowCount ? `${overflowCount}+` : `${count}`;\n }\n\n return state;\n};\n"],"names":["useCounterBadge_unstable","props","ref","shape","appearance","showZero","overflowCount","count","dot","state","useBadge_unstable","root","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;uBAEW;AAM3B,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EACJC,QAAQ,UAAU,EAClBC,aAAa,QAAQ,EACrBC,WAAW,KAAK,EAChBC,gBAAgB,EAAE,EAClBC,QAAQ,CAAC,EACTC,MAAM,KAAK,EACZ,GAAGP;IAEJ,MAAMQ,QAA2B;QAC/B,GAAIC,IAAAA,wBAAAA,EAAkBT,OAAOC,IAAI;QACjCC;QACAC;QACAC;QACAE;QACAC;IACF;IAEA,IAAI,AAACD,CAAAA,UAAU,KAAKF,QAAAA,KAAa,CAACG,OAAO,CAACC,MAAME,IAAI,CAACC,QAAQ,EAAE;QAC7DH,MAAME,IAAI,CAACC,QAAQ,GAAGL,QAAQD,gBAAgB,CAAC,EAAEA,cAAc,CAAC,CAAC,GAAG,CAAC,EAAEC,MAAM,CAAC;IAChF;IAEA,OAAOE;AACT"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCounterBadgeStyles.styles.js"],"sourcesContent":["import { mergeClasses,
|
1
|
+
{"version":3,"sources":["useCounterBadgeStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { useBadgeStyles_unstable } from '../Badge/useBadgeStyles.styles';\nexport const counterBadgeClassNames = {\n root: 'fui-CounterBadge',\n icon: 'fui-CounterBadge__icon'\n};\nconst useStyles = makeStyles({\n dot: {\n minWidth: 'auto',\n width: '6px',\n height: '6px',\n padding: '0'\n },\n hide: {\n display: 'none'\n }\n});\n/**\n * Applies style classnames to slots\n */ export const useCounterBadgeStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(counterBadgeClassNames.root, state.dot && styles.dot, !state.root.children && !state.dot && styles.hide, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(counterBadgeClassNames.icon, state.icon.className);\n }\n return useBadgeStyles_unstable(state);\n};\n"],"names":["counterBadgeClassNames","useCounterBadgeStyles_unstable","root","icon","useStyles","__styles","dot","Bf4jedk","a9b677","Bqenvij","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","hide","mc9l5x","d","p","state","styles","className","mergeClasses","children","useBadgeStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,sBAAsB;eAAtBA;;IAiBIC,8BAA8B;eAA9BA;;;uBAnBwB;sCACD;AACjC,MAAMD,yBAAyB;IAClCE,MAAM;IACNC,MAAM;AACV;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,KAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,MAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA;AAaP,MAAMjB,iCAAkCkB,CAAAA;IAC/C;IACA,MAAMC,SAAShB;IACfe,MAAMjB,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,uBAAuBE,IAAI,EAAEiB,MAAMb,GAAG,IAAIc,OAAOd,GAAG,EAAE,CAACa,MAAMjB,IAAI,CAACqB,QAAQ,IAAI,CAACJ,MAAMb,GAAG,IAAIc,OAAOL,IAAI,EAAEI,MAAMjB,IAAI,CAACmB,SAAS;IACjK,IAAIF,MAAMhB,IAAI,EAAE;QACZgB,MAAMhB,IAAI,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,uBAAuBG,IAAI,EAAEgB,MAAMhB,IAAI,CAACkB,SAAS;IACzF;IACA,OAAOG,IAAAA,6CAAuB,EAACL;AACnC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["PresenceBadge.
|
1
|
+
{"version":3,"sources":["PresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge_unstable } from './usePresenceBadge';\nimport { usePresenceBadgeStyles_unstable } from './usePresenceBadgeStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { renderBadge_unstable } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const PresenceBadge: ForwardRefComponent<PresenceBadgeProps> = React.forwardRef((props, ref) => {\n const state = usePresenceBadge_unstable(props, ref);\n\n usePresenceBadgeStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePresenceBadgeStyles_unstable')(state);\n\n return renderBadge_unstable(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"names":["PresenceBadge","React","forwardRef","props","ref","state","usePresenceBadge_unstable","usePresenceBadgeStyles_unstable","useCustomStyleHook_unstable","renderBadge_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;kCACmB;8CACM;qCACJ;uBACP;AAO9B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAEhCG,IAAAA,gDAAAA,EAA4B,mCAAmCH;IAE/D,OAAOI,IAAAA,2BAAAA,EAAqBJ;AAC9B;AAEAL,cAAcU,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
1
|
+
{"version":3,"sources":["PresenceBadge.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState, BadgeSlots } from '../Badge/Badge.types';\n\nexport type PresenceBadgeStatus =\n | 'busy'\n | 'out-of-office'\n | 'away'\n | 'available'\n | 'offline'\n | 'do-not-disturb'\n | 'unknown'\n | 'blocked';\n\nexport type PresenceBadgeProps = Omit<ComponentProps<Pick<BadgeSlots, 'root' | 'icon'>>, 'color'> &\n Pick<BadgeProps, 'size'> & {\n /**\n * Represents several status\n * @default available\n */\n status?: PresenceBadgeStatus;\n\n /**\n * Modifies the display to indicate that the user is out of office.\n * This can be combined with any status to display an out-of-office version of that status\n * @default false\n */\n outOfOffice?: boolean;\n };\n\nexport type PresenceBadgeState = ComponentState<BadgeSlots> &\n BadgeState &\n Required<Pick<PresenceBadgeProps, 'status' | 'outOfOffice'>>;\n"],"names":[],"rangeMappings":"","mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles.styles';\nexport * from './presenceIcons';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
@@ -9,17 +9,17 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
|
13
|
-
return
|
14
|
-
},
|
15
|
-
presenceAwayFilled: function() {
|
16
|
-
return presenceAwayFilled;
|
12
|
+
presenceAvailableFilled: function() {
|
13
|
+
return presenceAvailableFilled;
|
17
14
|
},
|
18
15
|
presenceAvailableRegular: function() {
|
19
16
|
return presenceAvailableRegular;
|
20
17
|
},
|
21
|
-
|
22
|
-
return
|
18
|
+
presenceAwayFilled: function() {
|
19
|
+
return presenceAwayFilled;
|
20
|
+
},
|
21
|
+
presenceAwayRegular: function() {
|
22
|
+
return presenceAwayRegular;
|
23
23
|
},
|
24
24
|
presenceBlockedRegular: function() {
|
25
25
|
return presenceBlockedRegular;
|
@@ -33,12 +33,12 @@ _export(exports, {
|
|
33
33
|
presenceDndRegular: function() {
|
34
34
|
return presenceDndRegular;
|
35
35
|
},
|
36
|
-
presenceOofRegular: function() {
|
37
|
-
return presenceOofRegular;
|
38
|
-
},
|
39
36
|
presenceOfflineRegular: function() {
|
40
37
|
return presenceOfflineRegular;
|
41
38
|
},
|
39
|
+
presenceOofRegular: function() {
|
40
|
+
return presenceOofRegular;
|
41
|
+
},
|
42
42
|
presenceUnknownRegular: function() {
|
43
43
|
return presenceUnknownRegular;
|
44
44
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["presenceIcons.js"],"sourcesContent":["import * as React from 'react';\nimport { PresenceAvailable10Regular, PresenceAvailable12Regular, PresenceAvailable16Regular, PresenceAvailable20Regular, PresenceAvailable10Filled, PresenceAvailable12Filled, PresenceAvailable16Filled, PresenceAvailable20Filled, PresenceAway10Regular, PresenceAway12Regular, PresenceAway16Regular, PresenceAway20Regular, PresenceAway10Filled, PresenceAway12Filled, PresenceAway16Filled, PresenceAway20Filled, PresenceBlocked10Regular, PresenceBlocked12Regular, PresenceBlocked16Regular, PresenceBlocked20Regular, PresenceBusy10Filled, PresenceBusy12Filled, PresenceBusy16Filled, PresenceBusy20Filled, PresenceDnd10Regular, PresenceDnd12Regular, PresenceDnd16Regular, PresenceDnd20Regular, PresenceDnd10Filled, PresenceDnd12Filled, PresenceDnd16Filled, PresenceDnd20Filled, PresenceOof10Regular, PresenceOof12Regular, PresenceOof16Regular, PresenceOof20Regular, PresenceOffline10Regular, PresenceOffline12Regular, PresenceOffline16Regular, PresenceOffline20Regular, PresenceUnknown10Regular, PresenceUnknown12Regular, PresenceUnknown16Regular, PresenceUnknown20Regular } from '@fluentui/react-icons';\nexport const presenceAwayRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Regular,\n 'extra-small': PresenceAway10Regular,\n small: PresenceAway12Regular,\n medium: PresenceAway16Regular,\n large: PresenceAway20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Regular\n};\nexport const presenceAwayFilled = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n large: PresenceAway20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Filled\n};\nexport const presenceAvailableRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n large: PresenceAvailable20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Regular\n};\nexport const presenceAvailableFilled = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n large: PresenceAvailable20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Filled\n};\nexport const presenceBlockedRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBlocked10Regular,\n 'extra-small': PresenceBlocked10Regular,\n small: PresenceBlocked12Regular,\n medium: PresenceBlocked16Regular,\n large: PresenceBlocked20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBlocked20Regular\n};\nexport const presenceBusyFilled = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n large: PresenceBusy20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy20Filled\n};\nexport const presenceDndFilled = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n large: PresenceDnd20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Filled\n};\nexport const presenceDndRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n large: PresenceDnd20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Regular\n};\nexport const presenceOofRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n large: PresenceOof20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof20Regular\n};\nexport const presenceOfflineRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n large: PresenceOffline20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline20Regular\n};\nexport const presenceUnknownRegular = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n large: PresenceUnknown20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown20Regular\n};\n"],"names":["presenceAwayRegular","presenceAwayFilled","presenceAvailableRegular","presenceAvailableFilled","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOofRegular","presenceOfflineRegular","presenceUnknownRegular","tiny","PresenceAway10Regular","small","PresenceAway12Regular","medium","PresenceAway16Regular","large","PresenceAway20Regular","PresenceAway10Filled","PresenceAway12Filled","PresenceAway16Filled","PresenceAway20Filled","PresenceAvailable10Regular","PresenceAvailable12Regular","PresenceAvailable16Regular","PresenceAvailable20Regular","PresenceAvailable10Filled","PresenceAvailable12Filled","PresenceAvailable16Filled","PresenceAvailable20Filled","PresenceBlocked10Regular","PresenceBlocked12Regular","PresenceBlocked16Regular","PresenceBlocked20Regular","PresenceBusy10Filled","PresenceBusy12Filled","PresenceBusy16Filled","PresenceBusy20Filled","PresenceDnd10Filled","PresenceDnd12Filled","PresenceDnd16Filled","PresenceDnd20Filled","PresenceDnd10Regular","PresenceDnd12Regular","PresenceDnd16Regular","PresenceDnd20Regular","PresenceOof10Regular","PresenceOof12Regular","PresenceOof16Regular","PresenceOof20Regular","PresenceOffline10Regular","PresenceOffline12Regular","PresenceOffline16Regular","PresenceOffline20Regular","PresenceUnknown10Regular","PresenceUnknown12Regular","PresenceUnknown16Regular","PresenceUnknown20Regular"],"mappings":";;;;;;;;;;;IAEaA,mBAAmB;eAAnBA;;IAYAC,kBAAkB;eAAlBA;;IAYAC,wBAAwB;eAAxBA;;IAYAC,uBAAuB;eAAvBA;;IAYAC,sBAAsB;eAAtBA;;IAYAC,kBAAkB;eAAlBA;;IAYAC,iBAAiB;eAAjBA;;IAYAC,kBAAkB;eAAlBA;;IAYAC,kBAAkB;eAAlBA;;IAYAC,sBAAsB;eAAtBA;;IAYAC,sBAAsB;eAAtBA;;;;iEA1HU;4BAC4hC;AAC5iC,MAAMV,sBAAsB;IAC/B,kDAAkD;IAClD,qDAAqD;IACrDW,MAAMC,iCAAqB;IAC3B,eAAeA,iCAAqB;IACpCC,OAAOC,iCAAqB;IAC5BC,QAAQC,iCAAqB;IAC7BC,OAAOC,iCAAqB;IAC5B,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,iCAAqB;AACxC;AACO,MAAMjB,qBAAqB;IAC9B,kDAAkD;IAClD,qDAAqD;IACrDU,MAAMQ,gCAAoB;IAC1B,eAAeA,gCAAoB;IACnCN,OAAOO,gCAAoB;IAC3BL,QAAQM,gCAA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C;AACO,MAAMnC,qBAAqB;IAC9B,kDAAkD;IAClD,qDAAqD;IACrDI,MAAMgC,gCAAoB;IAC1B,eAAeA,gCAAoB;IACnC9B,OAAO+B,gCAAoB;IAC3B7B,QAAQ8B,gCAAoB;IAC5B5B,OAAO6B,gCAAoB;IAC3B,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,gCAAoB;AACvC;AACO,MAAMtC,qBAAqB;IAC9B,kDAAkD;IAClD,qDAAqD;IACrDG,MAAMoC,gCAAoB;IAC1B,eAAeA,gCAAoB;IACnClC,OAAOmC,gCAAoB;IAC3BjC,QAAQkC,gCAAoB;IAC5BhC,OAAOiC,gCAAoB;IAC3B,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,gCAAoB;AACvC;AACO,MAAMzC,yBAAyB;IAClC,kDAAkD;IAClD,qDAAqD;IACrDE,MAAMwC,oCAAwB;IAC9B,eAAeA,oCAAwB;IACvCtC,OAAOuC,oCAAwB;IAC/BrC,QAAQsC,oCAAwB;IAChCpC,OAAOqC,oCAAwB;IAC/B,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAwB;AAC3C;AACO,MAAM5C,yBAAyB;IAClC,kDAAkD;IAClD,qDAAqD;IACrDC,MAAM4C,oCAAwB;IAC9B,eAAeA,oCAAwB;IACvC1C,OAAO2C,oCAAwB;IAC/BzC,QAAQ0C,oCAAwB;IAChCxC,OAAOyC,oCAAwB;IAC/B,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAwB;AAC3C"}
|
1
|
+
{"version":3,"sources":["presenceIcons.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n PresenceAvailable10Regular,\n PresenceAvailable12Regular,\n PresenceAvailable16Regular,\n PresenceAvailable20Regular,\n PresenceAvailable10Filled,\n PresenceAvailable12Filled,\n PresenceAvailable16Filled,\n PresenceAvailable20Filled,\n PresenceAway10Regular,\n PresenceAway12Regular,\n PresenceAway16Regular,\n PresenceAway20Regular,\n PresenceAway10Filled,\n PresenceAway12Filled,\n PresenceAway16Filled,\n PresenceAway20Filled,\n PresenceBlocked10Regular,\n PresenceBlocked12Regular,\n PresenceBlocked16Regular,\n PresenceBlocked20Regular,\n PresenceBusy10Filled,\n PresenceBusy12Filled,\n PresenceBusy16Filled,\n PresenceBusy20Filled,\n PresenceDnd10Regular,\n PresenceDnd12Regular,\n PresenceDnd16Regular,\n PresenceDnd20Regular,\n PresenceDnd10Filled,\n PresenceDnd12Filled,\n PresenceDnd16Filled,\n PresenceDnd20Filled,\n PresenceOof10Regular,\n PresenceOof12Regular,\n PresenceOof16Regular,\n PresenceOof20Regular,\n PresenceOffline10Regular,\n PresenceOffline12Regular,\n PresenceOffline16Regular,\n PresenceOffline20Regular,\n PresenceUnknown10Regular,\n PresenceUnknown12Regular,\n PresenceUnknown16Regular,\n PresenceUnknown20Regular,\n} from '@fluentui/react-icons';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceAwayRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Regular,\n 'extra-small': PresenceAway10Regular,\n small: PresenceAway12Regular,\n medium: PresenceAway16Regular,\n large: PresenceAway20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Regular,\n};\n\nexport const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAway10Filled,\n 'extra-small': PresenceAway10Filled,\n small: PresenceAway12Filled,\n medium: PresenceAway16Filled,\n large: PresenceAway20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAway20Filled,\n};\n\nexport const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Regular,\n 'extra-small': PresenceAvailable10Regular,\n small: PresenceAvailable12Regular,\n medium: PresenceAvailable16Regular,\n large: PresenceAvailable20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Regular,\n};\n\nexport const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceAvailable10Filled,\n 'extra-small': PresenceAvailable10Filled,\n small: PresenceAvailable12Filled,\n medium: PresenceAvailable16Filled,\n large: PresenceAvailable20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceAvailable20Filled,\n};\n\nexport const presenceBlockedRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBlocked10Regular,\n 'extra-small': PresenceBlocked10Regular,\n small: PresenceBlocked12Regular,\n medium: PresenceBlocked16Regular,\n large: PresenceBlocked20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBlocked20Regular,\n};\n\nexport const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceBusy10Filled,\n 'extra-small': PresenceBusy10Filled,\n small: PresenceBusy12Filled,\n medium: PresenceBusy16Filled,\n large: PresenceBusy20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceBusy20Filled,\n};\n\nexport const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Filled,\n 'extra-small': PresenceDnd10Filled,\n small: PresenceDnd12Filled,\n medium: PresenceDnd16Filled,\n large: PresenceDnd20Filled,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Filled,\n};\n\nexport const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceDnd10Regular,\n 'extra-small': PresenceDnd10Regular,\n small: PresenceDnd12Regular,\n medium: PresenceDnd16Regular,\n large: PresenceDnd20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceDnd20Regular,\n};\n\nexport const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOof10Regular,\n 'extra-small': PresenceOof10Regular,\n small: PresenceOof12Regular,\n medium: PresenceOof16Regular,\n large: PresenceOof20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOof20Regular,\n};\n\nexport const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceOffline10Regular,\n 'extra-small': PresenceOffline10Regular,\n small: PresenceOffline12Regular,\n medium: PresenceOffline16Regular,\n large: PresenceOffline20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceOffline20Regular,\n};\n\nexport const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent> = {\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n tiny: PresenceUnknown10Regular,\n 'extra-small': PresenceUnknown10Regular,\n small: PresenceUnknown12Regular,\n medium: PresenceUnknown16Regular,\n large: PresenceUnknown20Regular,\n // FIXME not all presence icon sizes are available\n // https://github.com/microsoft/fluentui/issues/20650\n 'extra-large': PresenceUnknown20Regular,\n};\n"],"names":["presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","tiny","PresenceAway10Regular","small","PresenceAway12Regular","medium","PresenceAway16Regular","large","PresenceAway20Regular","PresenceAway10Filled","PresenceAway12Filled","PresenceAway16Filled","PresenceAway20Filled","PresenceAvailable10Regular","PresenceAvailable12Regular","PresenceAvailable16Regular","PresenceAvailable20Regular","PresenceAvailable10Filled","PresenceAvailable12Filled","PresenceAvailable16Filled","PresenceAvailable20Filled","PresenceBlocked10Regular","PresenceBlocked12Regular","PresenceBlocked16Regular","PresenceBlocked20Regular","PresenceBusy10Filled","PresenceBusy12Filled","PresenceBusy16Filled","PresenceBusy20Filled","PresenceDnd10Filled","PresenceDnd12Filled","PresenceDnd16Filled","PresenceDnd20Filled","PresenceDnd10Regular","PresenceDnd12Regular","PresenceDnd16Regular","PresenceDnd20Regular","PresenceOof10Regular","PresenceOof12Regular","PresenceOof16Regular","PresenceOof20Regular","PresenceOffline10Regular","PresenceOffline12Regular","PresenceOffline16Regular","PresenceOffline20Regular","PresenceUnknown10Regular","PresenceUnknown12Regular","PresenceUnknown16Regular","PresenceUnknown20Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAwFaA,uBAAAA;eAAAA;;IAbAC,wBAAAA;eAAAA;;IAbAC,kBAAAA;eAAAA;;IAbAC,mBAAAA;eAAAA;;IAoDAC,sBAAAA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A;IACN,eAAeA,oCAAAA;IACf1C,OAAO2C,oCAAAA;IACPzC,QAAQ0C,oCAAAA;IACRxC,OAAOyC,oCAAAA;IACP,kDAAkD;IAClD,qDAAqD;IACrD,eAAeA,oCAAAA;AACjB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["usePresenceBadge.
|
1
|
+
{"version":3,"sources":["usePresenceBadge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport {\n presenceAvailableFilled,\n presenceAvailableRegular,\n presenceAwayFilled,\n presenceBlockedRegular,\n presenceBusyFilled,\n presenceDndFilled,\n presenceDndRegular,\n presenceOfflineRegular,\n presenceOofRegular,\n presenceUnknownRegular,\n} from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nimport type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';\n\nconst iconMap = (status: PresenceBadgeState['status'], outOfOffice: boolean, size: PresenceBadgeState['size']) => {\n switch (status) {\n case 'available':\n return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];\n case 'away':\n return outOfOffice ? presenceOofRegular[size] : presenceAwayFilled[size];\n case 'blocked':\n return presenceBlockedRegular[size];\n case 'busy':\n return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];\n case 'do-not-disturb':\n return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];\n case 'offline':\n return outOfOffice ? presenceOofRegular[size] : presenceOfflineRegular[size];\n case 'out-of-office':\n return presenceOofRegular[size];\n case 'unknown':\n return presenceUnknownRegular[size];\n }\n};\n\nconst DEFAULT_STRINGS = {\n busy: 'busy',\n 'out-of-office': 'out of office',\n away: 'away',\n available: 'available',\n offline: 'offline',\n 'do-not-disturb': 'do not disturb',\n unknown: 'unknown',\n blocked: 'blocked',\n};\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge_unstable = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n): PresenceBadgeState => {\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n\n const IconElement = iconMap(status, outOfOffice, size);\n\n const state: PresenceBadgeState = {\n ...useBadge_unstable(\n {\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? <IconElement /> : null,\n },\n renderByDefault: true,\n elementType: 'span',\n }),\n },\n ref,\n ),\n status,\n outOfOffice,\n };\n\n return state;\n};\n"],"names":["usePresenceBadge_unstable","iconMap","status","outOfOffice","size","presenceAvailableRegular","presenceAvailableFilled","presenceOofRegular","presenceAwayFilled","presenceBlockedRegular","presenceUnknownRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOfflineRegular","DEFAULT_STRINGS","busy","away","available","offline","unknown","blocked","props","ref","statusText","oofText","IconElement","state","useBadge_unstable","role","icon","slot","optional","defaultProps","children","React","createElement","renderByDefault","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAoDaA;;;eAAAA;;;;iEApDU;gCACF;+BAYd;uBAC2B;AAGlC,MAAMC,UAAU,CAACC,QAAsCC,aAAsBC;IAC3E,OAAQF;QACN,KAAK;YACH,OAAOC,cAAcE,uCAAwB,CAACD,KAAK,GAAGE,sCAAuB,CAACF,KAAK;QACrF,KAAK;YACH,OAAOD,cAAcI,iCAAkB,CAACH,KAAK,GAAGI,iCAAkB,CAACJ,KAAK;QAC1E,KAAK;YACH,OAAOK,qCAAsB,CAACL,KAAK;QACrC,KAAK;YACH,OAAOD,cAAcO,qCAAsB,CAACN,KAAK,GAAGO,iCAAkB,CAACP,KAAK;QAC9E,KAAK;YACH,OAAOD,cAAcS,iCAAkB,CAACR,KAAK,GAAGS,gCAAiB,CAACT,KAAK;QACzE,KAAK;YACH,OAAOD,cAAcI,iCAAkB,CAACH,KAAK,GAAGU,qCAAsB,CAACV,KAAK;QAC9E,KAAK;YACH,OAAOG,iCAAkB,CAACH,KAAK;QACjC,KAAK;YACH,OAAOM,qCAAsB,CAACN,KAAK;IACvC;AACF;AAEA,MAAMW,kBAAkB;IACtBC,MAAM;IACN,iBAAiB;IACjBC,MAAM;IACNC,WAAW;IACXC,SAAS;IACT,kBAAkB;IAClBC,SAAS;IACTC,SAAS;AACX;AAKO,MAAMrB,4BAA4B,CACvCsB,OACAC;IAEA,MAAM,EAAEnB,OAAO,QAAQ,EAAEF,SAAS,WAAW,EAAEC,cAAc,KAAK,EAAE,GAAGmB;IAEvE,MAAME,aAAaT,eAAe,CAACb,OAAO;IAC1C,MAAMuB,UAAUH,MAAMnB,WAAW,IAAImB,MAAMpB,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEa,eAAe,CAAC,gBAAgB,CAAC,CAAC,GAAG;IAEjH,MAAMW,cAAczB,QAAQC,QAAQC,aAAaC;IAEjD,MAAMuB,QAA4B;QAChC,GAAGC,IAAAA,wBAAAA,EACD;YACE,cAAcJ,aAAaC;YAC3BI,MAAM;YACN,GAAGP,KAAK;YACRlB;YACA0B,MAAMC,oBAAAA,CAAKC,QAAQ,CAACV,MAAMQ,IAAI,EAAE;gBAC9BG,cAAc;oBACZC,UAAUR,cAAAA,WAAAA,GAAcS,OAAAC,aAAA,CAACV,aAAAA,QAAiB;gBAC5C;gBACAW,iBAAiB;gBACjBC,aAAa;YACf;QACF,GACAf,IACD;QACDrB;QACAC;IACF;IAEA,OAAOwB;AACT"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["usePresenceBadgeStyles.styles.js"],"sourcesContent":["import {
|
1
|
+
{"version":3,"sources":["usePresenceBadgeStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const presenceBadgeClassNames = {\n root: 'fui-PresenceBadge',\n icon: 'fui-PresenceBadge__icon'\n};\nconst getIsBusy = (status)=>{\n if (status === 'busy' || status === 'do-not-disturb' || status === 'blocked') {\n return true;\n }\n return false;\n};\nconst useRootClassName = makeResetStyles({\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: tokens.borderRadiusCircular,\n backgroundColor: tokens.colorNeutralBackground1,\n // The background color bleeds around the edge of the icon due to antialiasing on the svg and element background.\n // Since all presence icons have a border around the edge that is at least 1px wide*, we can inset the background\n // using padding and backgroundClip. The icon has margin: -1px to account for the padding.\n // (* except size=\"tiny\", where backgroundClip is unset)\n padding: '1px',\n backgroundClip: 'content-box'\n});\nconst useIconClassName = makeResetStyles({\n display: 'flex',\n margin: '-1px'\n});\nconst useStyles = makeStyles({\n statusBusy: {\n color: tokens.colorPaletteRedBackground3\n },\n statusAway: {\n color: tokens.colorPaletteMarigoldBackground3\n },\n statusAvailable: {\n color: tokens.colorPaletteLightGreenForeground3\n },\n statusOffline: {\n color: tokens.colorNeutralForeground3\n },\n statusOutOfOffice: {\n color: tokens.colorPaletteBerryForeground3\n },\n statusUnknown: {\n color: tokens.colorNeutralForeground3\n },\n outOfOffice: {\n color: tokens.colorNeutralBackground1\n },\n outOfOfficeAvailable: {\n color: tokens.colorPaletteLightGreenForeground3\n },\n outOfOfficeBusy: {\n color: tokens.colorPaletteRedBackground3\n },\n outOfOfficeUnknown: {\n color: tokens.colorNeutralForeground3\n },\n // Icons are not resizeable, and these sizes are currently missing\n // use `!important` to size the currently available icons to the missing ones\n //\n tiny: {\n aspectRatio: '1',\n width: '6px',\n backgroundClip: 'unset',\n '& svg': {\n width: '6px !important',\n height: '6px !important'\n }\n },\n large: {\n aspectRatio: '1',\n width: '20px',\n '& svg': {\n width: '20px !important',\n height: '20px !important'\n }\n },\n extraLarge: {\n aspectRatio: '1',\n width: '28px',\n '& svg': {\n width: '28px !important',\n height: '28px !important'\n }\n }\n});\n/**\n * Applies style classnames to slots\n */ export const usePresenceBadgeStyles_unstable = (state)=>{\n 'use no memo';\n const rootClassName = useRootClassName();\n const iconClassName = useIconClassName();\n const styles = useStyles();\n const isBusy = getIsBusy(state.status);\n state.root.className = mergeClasses(presenceBadgeClassNames.root, rootClassName, isBusy && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'out-of-office' && styles.statusOutOfOffice, state.status === 'unknown' && styles.statusUnknown, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && isBusy && styles.outOfOfficeBusy, state.outOfOffice && (state.status === 'out-of-office' || state.status === 'away' || state.status === 'offline') && styles.statusOutOfOffice, state.outOfOffice && state.status === 'unknown' && styles.outOfOfficeUnknown, state.size === 'tiny' && styles.tiny, state.size === 'large' && styles.large, state.size === 'extra-large' && styles.extraLarge, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(presenceBadgeClassNames.icon, iconClassName, state.icon.className);\n }\n return state;\n};\n"],"names":["presenceBadgeClassNames","usePresenceBadgeStyles_unstable","root","icon","getIsBusy","status","useRootClassName","__resetStyles","useIconClassName","useStyles","__styles","statusBusy","sj55zd","statusAway","statusAvailable","statusOffline","statusOutOfOffice","statusUnknown","outOfOffice","outOfOfficeAvailable","outOfOfficeBusy","outOfOfficeUnknown","tiny","Bubjx69","a9b677","B2eet1l","B5pe6w7","p4uzdd","large","extraLarge","d","state","rootClassName","iconClassName","styles","isBusy","className","mergeClasses","size"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IA0FIC,+BAA+B;eAA/BA;;;uBA5FyC;AAEnD,MA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15
|
-
|
16
|
-
return
|
17
|
-
},
|
18
|
-
renderBadge_unstable: function() {
|
19
|
-
return _Badge.renderBadge_unstable;
|
20
|
-
},
|
21
|
-
useBadgeStyles_unstable: function() {
|
22
|
-
return _Badge.useBadgeStyles_unstable;
|
23
|
-
},
|
24
|
-
useBadge_unstable: function() {
|
25
|
-
return _Badge.useBadge_unstable;
|
15
|
+
CounterBadge: function() {
|
16
|
+
return _CounterBadge.CounterBadge;
|
26
17
|
},
|
27
18
|
PresenceBadge: function() {
|
28
19
|
return _PresenceBadge.PresenceBadge;
|
29
20
|
},
|
30
|
-
|
31
|
-
return
|
21
|
+
badgeClassNames: function() {
|
22
|
+
return _Badge.badgeClassNames;
|
32
23
|
},
|
33
|
-
|
34
|
-
return
|
24
|
+
counterBadgeClassNames: function() {
|
25
|
+
return _CounterBadge.counterBadgeClassNames;
|
35
26
|
},
|
36
|
-
|
37
|
-
return _PresenceBadge.
|
27
|
+
presenceAvailableFilled: function() {
|
28
|
+
return _PresenceBadge.presenceAvailableFilled;
|
38
29
|
},
|
39
|
-
|
40
|
-
return _PresenceBadge.
|
30
|
+
presenceAvailableRegular: function() {
|
31
|
+
return _PresenceBadge.presenceAvailableRegular;
|
41
32
|
},
|
42
33
|
presenceAwayFilled: function() {
|
43
34
|
return _PresenceBadge.presenceAwayFilled;
|
44
35
|
},
|
45
|
-
|
46
|
-
return _PresenceBadge.
|
36
|
+
presenceAwayRegular: function() {
|
37
|
+
return _PresenceBadge.presenceAwayRegular;
|
47
38
|
},
|
48
|
-
|
49
|
-
return _PresenceBadge.
|
39
|
+
presenceBadgeClassNames: function() {
|
40
|
+
return _PresenceBadge.presenceBadgeClassNames;
|
50
41
|
},
|
51
42
|
presenceBlockedRegular: function() {
|
52
43
|
return _PresenceBadge.presenceBlockedRegular;
|
@@ -54,32 +45,41 @@ _export(exports, {
|
|
54
45
|
presenceBusyFilled: function() {
|
55
46
|
return _PresenceBadge.presenceBusyFilled;
|
56
47
|
},
|
57
|
-
presenceDndRegular: function() {
|
58
|
-
return _PresenceBadge.presenceDndRegular;
|
59
|
-
},
|
60
48
|
presenceDndFilled: function() {
|
61
49
|
return _PresenceBadge.presenceDndFilled;
|
62
50
|
},
|
63
|
-
|
64
|
-
return _PresenceBadge.
|
51
|
+
presenceDndRegular: function() {
|
52
|
+
return _PresenceBadge.presenceDndRegular;
|
65
53
|
},
|
66
54
|
presenceOfflineRegular: function() {
|
67
55
|
return _PresenceBadge.presenceOfflineRegular;
|
68
56
|
},
|
57
|
+
presenceOofRegular: function() {
|
58
|
+
return _PresenceBadge.presenceOofRegular;
|
59
|
+
},
|
69
60
|
presenceUnknownRegular: function() {
|
70
61
|
return _PresenceBadge.presenceUnknownRegular;
|
71
62
|
},
|
72
|
-
|
73
|
-
return
|
63
|
+
renderBadge_unstable: function() {
|
64
|
+
return _Badge.renderBadge_unstable;
|
74
65
|
},
|
75
|
-
|
76
|
-
return
|
66
|
+
useBadgeStyles_unstable: function() {
|
67
|
+
return _Badge.useBadgeStyles_unstable;
|
68
|
+
},
|
69
|
+
useBadge_unstable: function() {
|
70
|
+
return _Badge.useBadge_unstable;
|
77
71
|
},
|
78
72
|
useCounterBadgeStyles_unstable: function() {
|
79
73
|
return _CounterBadge.useCounterBadgeStyles_unstable;
|
80
74
|
},
|
81
75
|
useCounterBadge_unstable: function() {
|
82
76
|
return _CounterBadge.useCounterBadge_unstable;
|
77
|
+
},
|
78
|
+
usePresenceBadgeStyles_unstable: function() {
|
79
|
+
return _PresenceBadge.usePresenceBadgeStyles_unstable;
|
80
|
+
},
|
81
|
+
usePresenceBadge_unstable: function() {
|
82
|
+
return _PresenceBadge.usePresenceBadge_unstable;
|
83
83
|
}
|
84
84
|
});
|
85
85
|
const _Badge = require("./Badge");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge';\nexport {\n PresenceBadge,\n presenceBadgeClassNames,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_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 { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n} from './CounterBadge';\nexport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge';\n"],"names":["Badge","CounterBadge","PresenceBadge","badgeClassNames","counterBadgeClassNames","presenceAvailableFilled","presenceAvailableRegular","presenceAwayFilled","presenceAwayRegular","presenceBadgeClassNames","presenceBlockedRegular","presenceBusyFilled","presenceDndFilled","presenceDndRegular","presenceOfflineRegular","presenceOofRegular","presenceUnknownRegular","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","useCounterBadgeStyles_unstable","useCounterBadge_unstable","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAqBZC,YAAY;eAAZA,0BAAY;;IAlBZC,aAAa;eAAbA,4BAAa;;IAHCC,eAAe;eAAfA,sBAAe;;IAsB7BC,sBAAsB;eAAtBA,oCAAsB;;IAZtBC,uBAAuB;eAAvBA,sCAAuB;;IADvBC,wBAAwB;eAAxBA,uCAAwB;;IADxBC,kBAAkB;eAAlBA,iCAAkB;;IADlBC,mBAAmB;eAAnBA,kCAAmB;;IAHnBC,uBAAuB;eAAvBA,sCAAuB;;IAOvBC,sBAAsB;eAAtBA,qCAAsB;;IACtBC,kBAAkB;eAAlBA,iCAAkB;;IAElBC,iBAAiB;eAAjBA,gCAAiB;;IADjBC,kBAAkB;eAAlBA,iCAAkB;;IAGlBC,sBAAsB;eAAtBA,qCAAsB;;IADtBC,kBAAkB;eAAlBA,iCAAkB;;IAElBC,sBAAsB;eAAtBA,qCAAsB;;IAjBSC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IAuB/FC,8BAA8B;eAA9BA,4CAA8B;;IAC9BC,wBAAwB;eAAxBA,sCAAwB;;IAnBxBC,+BAA+B;eAA/BA,8CAA+B;;IAC/BC,yBAAyB;eAAzBA,wCAAyB;;;uBAN8E;+BAkBlG;8BAOA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-badge",
|
3
|
-
"version": "9.2.
|
3
|
+
"version": "9.2.40",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -33,10 +33,10 @@
|
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@fluentui/react-icons": "^2.0.245",
|
36
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
37
|
-
"@fluentui/react-shared-contexts": "^9.19.
|
36
|
+
"@fluentui/react-jsx-runtime": "^9.0.41",
|
37
|
+
"@fluentui/react-shared-contexts": "^9.19.1",
|
38
38
|
"@fluentui/react-theme": "^9.1.19",
|
39
|
-
"@fluentui/react-utilities": "^9.18.
|
39
|
+
"@fluentui/react-utilities": "^9.18.12",
|
40
40
|
"@griffel/react": "^1.5.22",
|
41
41
|
"@swc/helpers": "^0.5.1"
|
42
42
|
},
|