@fluentui/react-badge 9.1.36 → 9.2.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,34 @@
2
2
  "name": "@fluentui/react-badge",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 14 Sep 2023 16:40:23 GMT",
5
+ "date": "Wed, 20 Sep 2023 14:13:55 GMT",
6
+ "tag": "@fluentui/react-badge_v9.2.0",
7
+ "version": "9.2.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "estebanmu@microsoft.com",
12
+ "package": "@fluentui/react-badge",
13
+ "commit": "0e79aed647914f7978da5f93c4fa833c9d20d443",
14
+ "comment": "feat: Presence badge should show Out of Office icon for Away+OOF and Offline+OOF statuses and export presence icon maps."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-badge",
19
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.9",
20
+ "commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-badge",
25
+ "comment": "Bump @fluentui/react-shared-contexts to v9.8.0",
26
+ "commit": "c60d4e7169457535c8d23701f6b951d1fff478ab"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Thu, 14 Sep 2023 16:44:47 GMT",
6
33
  "tag": "@fluentui/react-badge_v9.1.36",
7
34
  "version": "9.1.36",
8
35
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,23 @@
1
1
  # Change Log - @fluentui/react-badge
2
2
 
3
- This log was last generated on Thu, 14 Sep 2023 16:40:23 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 20 Sep 2023 14:13:55 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.2.0)
8
+
9
+ Wed, 20 Sep 2023 14:13:55 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.1.36..@fluentui/react-badge_v9.2.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: Presence badge should show Out of Office icon for Away+OOF and Offline+OOF statuses and export presence icon maps. ([PR #29131](https://github.com/microsoft/fluentui/pull/29131) by estebanmu@microsoft.com)
15
+ - Bump @fluentui/react-jsx-runtime to v9.0.9 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v9.8.0 ([PR #29193](https://github.com/microsoft/fluentui/pull/29193) by beachball)
17
+
7
18
  ## [9.1.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-badge_v9.1.36)
8
19
 
9
- Thu, 14 Sep 2023 16:40:23 GMT
20
+ Thu, 14 Sep 2023 16:44:47 GMT
10
21
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-badge_v9.1.35..@fluentui/react-badge_v9.1.36)
11
22
 
12
23
  ### Patches
package/dist/index.d.ts CHANGED
@@ -99,6 +99,14 @@ export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'color'
99
99
 
100
100
  export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'color' | 'shape'> & Required<Pick<CounterBadgeProps, 'appearance' | 'color' | 'count' | 'dot' | 'shape' | 'showZero'>>;
101
101
 
102
+ export declare const presenceAvailableFilled: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
103
+
104
+ export declare const presenceAvailableRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
105
+
106
+ export declare const presenceAwayFilled: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
107
+
108
+ export declare const presenceAwayRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
109
+
102
110
  /**
103
111
  * Define a styled Badge, using the `useBadge_unstable` hook.
104
112
  */
@@ -124,6 +132,20 @@ export declare type PresenceBadgeState = ComponentState<BadgeSlots> & BadgeState
124
132
 
125
133
  export declare type PresenceBadgeStatus = 'busy' | 'out-of-office' | 'away' | 'available' | 'offline' | 'do-not-disturb' | 'unknown' | 'blocked';
126
134
 
135
+ export declare const presenceBlockedRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
136
+
137
+ export declare const presenceBusyFilled: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
138
+
139
+ export declare const presenceDndFilled: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
140
+
141
+ export declare const presenceDndRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
142
+
143
+ export declare const presenceOfflineRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
144
+
145
+ export declare const presenceOofRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
146
+
147
+ export declare const presenceUnknownRegular: Record<PresenceBadgeState['size'], React_2.FunctionComponent>;
148
+
127
149
  export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
128
150
 
129
151
  /**
@@ -2,3 +2,4 @@ export * from './PresenceBadge';
2
2
  export * from './PresenceBadge.types';
3
3
  export * from './usePresenceBadge';
4
4
  export * from './usePresenceBadgeStyles.styles';
5
+ export * from './presenceIcons';
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC"}
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,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { slot } from '@fluentui/react-utilities';
3
- import { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceAwayRegular, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
3
+ import { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
4
4
  import { useBadge_unstable } from '../Badge/index';
5
5
  const iconMap = (status, outOfOffice, size)=>{
6
6
  switch(status){
7
7
  case 'available':
8
8
  return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];
9
9
  case 'away':
10
- return outOfOffice ? presenceAwayRegular[size] : presenceAwayFilled[size];
10
+ return outOfOffice ? presenceOofRegular[size] : presenceAwayFilled[size];
11
11
  case 'blocked':
12
12
  return presenceBlockedRegular[size];
13
13
  case 'busy':
@@ -15,7 +15,7 @@ const iconMap = (status, outOfOffice, size)=>{
15
15
  case 'do-not-disturb':
16
16
  return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];
17
17
  case 'offline':
18
- return presenceOfflineRegular[size];
18
+ return outOfOffice ? presenceOofRegular[size] : presenceOfflineRegular[size];
19
19
  case 'out-of-office':
20
20
  return presenceOofRegular[size];
21
21
  case 'unknown':
@@ -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 presenceAwayRegular,\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 ? presenceAwayRegular[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 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","presenceAwayRegular","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,mBAAmB,EACnBC,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,cAAcb,wBAAwB,CAACc,KAAK,GAAGf,uBAAuB,CAACe,KAAK;QACrF,KAAK;YACH,OAAOD,cAAcX,mBAAmB,CAACY,KAAK,GAAGb,kBAAkB,CAACa,KAAK;QAC3E,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,OAAOP,sBAAsB,CAACO,KAAK;QACrC,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,MAAMhC,KAAKiC,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","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,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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"}
@@ -73,7 +73,7 @@ export const usePresenceBadgeStyles_unstable = state => {
73
73
  const iconClassName = useIconClassName();
74
74
  const styles = useStyles();
75
75
  const isBusy = getIsBusy(state.status);
76
- 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 === 'away' && styles.statusAway, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && 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);
76
+ 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);
77
77
  if (state.icon) {
78
78
  state.icon.className = mergeClasses(presenceBadgeClassNames.icon, iconClassName, state.icon.className);
79
79
  }
@@ -1 +1 @@
1
- {"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","presenceBadgeClassNames","root","icon","getIsBusy","status","useRootClassName","useIconClassName","useStyles","statusBusy","sj55zd","statusAway","statusAvailable","statusOffline","statusOutOfOffice","statusUnknown","outOfOffice","outOfOfficeAvailable","outOfOfficeBusy","outOfOfficeUnknown","tiny","Bubjx69","a9b677","B2eet1l","B5pe6w7","p4uzdd","large","extraLarge","d","usePresenceBadgeStyles_unstable","state","rootClassName","iconClassName","styles","isBusy","className","size"],"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 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 === 'away' && styles.statusAway, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && 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, iconClass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kBAAkB,EAAEW,KAAK,CAACM,IAAI,KAAK,MAAM,IAAIH,MAAM,CAACb,IAAI,EAAEU,KAAK,CAACM,IAAI,KAAK,OAAO,IAAIH,MAAM,CAACP,KAAK,EAAEI,KAAK,CAACM,IAAI,KAAK,aAAa,IAAIH,MAAM,CAACN,UAAU,EAAEG,KAAK,CAAC5B,IAAI,CAACiC,SAAS,CAAC;EAC/+B,IAAIL,KAAK,CAAC3B,IAAI,EAAE;IACZ2B,KAAK,CAAC3B,IAAI,CAACgC,SAAS,GAAGpC,YAAY,CAACE,uBAAuB,CAACE,IAAI,EAAE6B,aAAa,EAAEF,KAAK,CAAC3B,IAAI,CAACgC,SAAS,CAAC;EAC1G;EACA,OAAOL,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","presenceBadgeClassNames","root","icon","getIsBusy","status","useRootClassName","useIconClassName","useStyles","statusBusy","sj55zd","statusAway","statusAvailable","statusOffline","statusOutOfOffice","statusUnknown","outOfOffice","outOfOfficeAvailable","outOfOfficeBusy","outOfOfficeUnknown","tiny","Bubjx69","a9b677","B2eet1l","B5pe6w7","p4uzdd","large","extraLarge","d","usePresenceBadgeStyles_unstable","state","rootClassName","iconClassName","styles","isBusy","className","size"],"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 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"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,uBAAuB,GAAG;EACnCC,IAAI,EAAE,mBAAmB;EACzBC,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,SAAS,GAAIC,MAAM,IAAG;EACxB,IAAIA,MAAM,KAAK,MAAM,IAAIA,MAAM,KAAK,gBAAgB,IAAIA,MAAM,KAAK,SAAS,EAAE;IAC1E,OAAO,IAAI;EACf;EACA,OAAO,KAAK;AAChB,CAAC;AACD,MAAMC,gBAAgB,gBAAGT,aAAA,sPAaxB,CAAC;AACF,MAAMU,gBAAgB,gBAAGV,aAAA,2DAGxB,CAAC;AACF,MAAMW,SAAS,gBAAGV,QAAA;EAAAW,UAAA;IAAAC,MAAA;EAAA;EAAAC,UAAA;IAAAD,MAAA;EAAA;EAAAE,eAAA;IAAAF,MAAA;EAAA;EAAAG,aAAA;IAAAH,MAAA;EAAA;EAAAI,iBAAA;IAAAJ,MAAA;EAAA;EAAAK,aAAA;IAAAL,MAAA;EAAA;EAAAM,WAAA;IAAAN,MAAA;EAAA;EAAAO,oBAAA;IAAAP,MAAA;EAAA;EAAAQ,eAAA;IAAAR,MAAA;EAAA;EAAAS,kBAAA;IAAAT,MAAA;EAAA;EAAAU,IAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC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AAM,KAAK,eAAe,IAAIyB,KAAK,CAACzB,MAAM,KAAK,MAAM,IAAIyB,KAAK,CAACzB,MAAM,KAAK,SAAS,CAAC,IAAI4B,MAAM,CAACnB,iBAAiB,EAAEgB,KAAK,CAACd,WAAW,IAAIc,KAAK,CAACzB,MAAM,KAAK,SAAS,IAAI4B,MAAM,CAACd,kBAAkB,EAAEW,KAAK,CAACM,IAAI,KAAK,MAAM,IAAIH,MAAM,CAACb,IAAI,EAAEU,KAAK,CAACM,IAAI,KAAK,OAAO,IAAIH,MAAM,CAACP,KAAK,EAAEI,KAAK,CAACM,IAAI,KAAK,aAAa,IAAIH,MAAM,CAACN,UAAU,EAAEG,KAAK,CAAC5B,IAAI,CAACiC,SAAS,CAAC;EAC95B,IAAIL,KAAK,CAAC3B,IAAI,EAAE;IACZ2B,KAAK,CAAC3B,IAAI,CAACgC,SAAS,GAAGpC,YAAY,CAACE,uBAAuB,CAACE,IAAI,EAAE6B,aAAa,EAAEF,KAAK,CAAC3B,IAAI,CAACgC,SAAS,CAAC;EAC1G;EACA,OAAOL,KAAK;AAChB,CAAC"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';
2
- export { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable } from './PresenceBadge';
2
+ export { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, presenceAwayRegular, presenceAwayFilled, presenceAvailableRegular, presenceAvailableFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndRegular, presenceDndFilled, presenceOofRegular, presenceOfflineRegular, presenceUnknownRegular } from './PresenceBadge';
3
3
  export { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable } from './CounterBadge';
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} 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","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,QACpB,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"],"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"}
@@ -7,3 +7,4 @@ _export_star._(require("./PresenceBadge"), exports);
7
7
  _export_star._(require("./PresenceBadge.types"), exports);
8
8
  _export_star._(require("./usePresenceBadge"), exports);
9
9
  _export_star._(require("./usePresenceBadgeStyles.styles"), exports);
10
+ _export_star._(require("./presenceIcons"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles.styles';\nexport * from './presenceIcons';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -18,7 +18,7 @@ const iconMap = (status, outOfOffice, size)=>{
18
18
  case 'available':
19
19
  return outOfOffice ? _presenceIcons.presenceAvailableRegular[size] : _presenceIcons.presenceAvailableFilled[size];
20
20
  case 'away':
21
- return outOfOffice ? _presenceIcons.presenceAwayRegular[size] : _presenceIcons.presenceAwayFilled[size];
21
+ return outOfOffice ? _presenceIcons.presenceOofRegular[size] : _presenceIcons.presenceAwayFilled[size];
22
22
  case 'blocked':
23
23
  return _presenceIcons.presenceBlockedRegular[size];
24
24
  case 'busy':
@@ -26,7 +26,7 @@ const iconMap = (status, outOfOffice, size)=>{
26
26
  case 'do-not-disturb':
27
27
  return outOfOffice ? _presenceIcons.presenceDndRegular[size] : _presenceIcons.presenceDndFilled[size];
28
28
  case 'offline':
29
- return _presenceIcons.presenceOfflineRegular[size];
29
+ return outOfOffice ? _presenceIcons.presenceOofRegular[size] : _presenceIcons.presenceOfflineRegular[size];
30
30
  case 'out-of-office':
31
31
  return _presenceIcons.presenceOofRegular[size];
32
32
  case 'unknown':
@@ -1 +1 @@
1
- {"version":3,"sources":["usePresenceBadge.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceAwayRegular, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nconst iconMap = (status, outOfOffice, size)=>{\n switch(status){\n case 'available':\n return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];\n case 'away':\n return outOfOffice ? presenceAwayRegular[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 presenceOfflineRegular[size];\n case 'out-of-office':\n return presenceOofRegular[size];\n case 'unknown':\n return presenceUnknownRegular[size];\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 * Returns the props and state required to render the component\n */ export const usePresenceBadge_unstable = (props, ref)=>{\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n const IconElement = iconMap(status, outOfOffice, size);\n const state = {\n ...useBadge_unstable({\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? /*#__PURE__*/ React.createElement(IconElement, null) : null\n },\n renderByDefault: true,\n elementType: 'span'\n })\n }, ref),\n status,\n outOfOffice\n };\n return state;\n};\n"],"names":["usePresenceBadge_unstable","iconMap","status","outOfOffice","size","presenceAvailableRegular","presenceAvailableFilled","presenceAwayRegular","presenceAwayFilled","presenceBlockedRegular","presenceUnknownRegular","presenceBusyFilled","presenceDndRegular","presenceDndFilled","presenceOfflineRegular","presenceOofRegular","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"],"mappings":";;;;+BAoCiBA;;;eAAAA;;;;iEApCM;gCACF;+BAC6O;uBAChO;AACl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,cAAc,WAAW,GAAGS,OAAMC,aAAa,CAACV,aAAa,QAAQ;gBACnF;gBACAW,iBAAiB;gBACjBC,aAAa;YACjB;QACJ,GAAGf,IAAI;QACPtB;QACAC;IACJ;IACA,OAAOyB;AACX"}
1
+ {"version":3,"sources":["usePresenceBadge.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';\nimport { useBadge_unstable } from '../Badge/index';\nconst iconMap = (status, outOfOffice, 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};\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 * Returns the props and state required to render the component\n */ export const usePresenceBadge_unstable = (props, ref)=>{\n const { size = 'medium', status = 'available', outOfOffice = false } = props;\n const statusText = DEFAULT_STRINGS[status];\n const oofText = props.outOfOffice && props.status !== 'out-of-office' ? ` ${DEFAULT_STRINGS['out-of-office']}` : '';\n const IconElement = iconMap(status, outOfOffice, size);\n const state = {\n ...useBadge_unstable({\n 'aria-label': statusText + oofText,\n role: 'img',\n ...props,\n size,\n icon: slot.optional(props.icon, {\n defaultProps: {\n children: IconElement ? /*#__PURE__*/ React.createElement(IconElement, null) : null\n },\n renderByDefault: true,\n elementType: 'span'\n })\n }, ref),\n status,\n outOfOffice\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"],"mappings":";;;;+BAoCiBA;;;eAAAA;;;;iEApCM;gCACF;+BACwN;uBAC3M;AAClC,MAAMC,UAAU,CAACC,QAAQC,aAAaC;IAClC,OAAOF;QACH,KAAK;YACD,OAAOC,cAAcE,uCAAwB,CAACD,KAAK,GAAGE,sCAAuB,CAACF,KAAK;QACvF,KAAK;YACD,OAAOD,cAAcI,iCAAkB,CAACH,KAAK,GAAGI,iCAAkB,CAACJ,KAAK;QAC5E,KAAK;YACD,OAAOK,qCAAsB,CAACL,KAAK;QACvC,KAAK;YACD,OAAOD,cAAcO,qCAAsB,CAACN,KAAK,GAAGO,iCAAkB,CAACP,KAAK;QAChF,KAAK;YACD,OAAOD,cAAcS,iCAAkB,CAACR,KAAK,GAAGS,gCAAiB,CAACT,KAAK;QAC3E,KAAK;YACD,OAAOD,cAAcI,iCAAkB,CAACH,KAAK,GAAGU,qCAAsB,CAACV,KAAK;QAChF,KAAK;YACD,OAAOG,iCAAkB,CAACH,KAAK;QACnC,KAAK;YACD,OAAOM,qCAAsB,CAACN,KAAK;IAC3C;AACJ;AACA,MAAMW,kBAAkB;IACpBC,MAAM;IACN,iBAAiB;IACjBC,MAAM;IACNC,WAAW;IACXC,SAAS;IACT,kBAAkB;IAClBC,SAAS;IACTC,SAAS;AACb;AAGW,MAAMrB,4BAA4B,CAACsB,OAAOC;IACjD,MAAM,EAAEnB,OAAO,QAAQ,EAAEF,SAAS,WAAW,EAAEC,cAAc,KAAK,EAAE,GAAGmB;IACvE,MAAME,aAAaT,eAAe,CAACb,OAAO;IAC1C,MAAMuB,UAAUH,MAAMnB,WAAW,IAAImB,MAAMpB,MAAM,KAAK,kBAAkB,CAAC,CAAC,EAAEa,eAAe,CAAC,gBAAgB,CAAC,CAAC,GAAG;IACjH,MAAMW,cAAczB,QAAQC,QAAQC,aAAaC;IACjD,MAAMuB,QAAQ;QACV,GAAGC,IAAAA,wBAAiB,EAAC;YACjB,cAAcJ,aAAaC;YAC3BI,MAAM;YACN,GAAGP,KAAK;YACRlB;YACA0B,MAAMC,oBAAI,CAACC,QAAQ,CAACV,MAAMQ,IAAI,EAAE;gBAC5BG,cAAc;oBACVC,UAAUR,cAAc,WAAW,GAAGS,OAAMC,aAAa,CAACV,aAAa,QAAQ;gBACnF;gBACAW,iBAAiB;gBACjBC,aAAa;YACjB;QACJ,GAAGf,IAAI;QACPrB;QACAC;IACJ;IACA,OAAOwB;AACX"}
@@ -109,7 +109,7 @@ const usePresenceBadgeStyles_unstable = (state)=>{
109
109
  const iconClassName = useIconClassName();
110
110
  const styles = useStyles();
111
111
  const isBusy = getIsBusy(state.status);
112
- state.root.className = (0, _react.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 === 'away' && styles.statusAway, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && 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);
112
+ state.root.className = (0, _react.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);
113
113
  if (state.icon) {
114
114
  state.icon.className = (0, _react.mergeClasses)(presenceBadgeClassNames.icon, iconClassName, state.icon.className);
115
115
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["usePresenceBadgeStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, 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 = /*#__PURE__*/__resetStyles(\"r832ydo\", null, [\".r832ydo{display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;border-radius:var(--borderRadiusCircular);background-color:var(--colorNeutralBackground1);padding:1px;background-clip:content-box;}\"]);\nconst useIconClassName = /*#__PURE__*/__resetStyles(\"r11ag4qr\", null, [\".r11ag4qr{display:flex;margin:-1px;}\"]);\nconst useStyles = /*#__PURE__*/__styles({\n statusBusy: {\n sj55zd: \"fvi85wt\"\n },\n statusAway: {\n sj55zd: \"f14k8a89\"\n },\n statusAvailable: {\n sj55zd: \"fqa5hgp\"\n },\n statusOffline: {\n sj55zd: \"f11d4kpn\"\n },\n statusOutOfOffice: {\n sj55zd: \"fdce8r3\"\n },\n statusUnknown: {\n sj55zd: \"f11d4kpn\"\n },\n outOfOffice: {\n sj55zd: \"fr0bkrk\"\n },\n outOfOfficeAvailable: {\n sj55zd: \"fqa5hgp\"\n },\n outOfOfficeBusy: {\n sj55zd: \"fvi85wt\"\n },\n outOfOfficeUnknown: {\n sj55zd: \"f11d4kpn\"\n },\n tiny: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f16dn6v3\",\n B2eet1l: \"f1w2irj7\",\n B5pe6w7: \"fab5kbq\",\n p4uzdd: \"f1ms1d91\"\n },\n large: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f64fuq3\",\n B5pe6w7: \"f1vfi1yj\",\n p4uzdd: \"f15s34gz\"\n },\n extraLarge: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f1w9dchk\",\n B5pe6w7: \"f14efy9b\",\n p4uzdd: \"fhipgdu\"\n }\n}, {\n d: [\".fvi85wt{color:var(--colorPaletteRedBackground3);}\", \".f14k8a89{color:var(--colorPaletteMarigoldBackground3);}\", \".fqa5hgp{color:var(--colorPaletteLightGreenForeground3);}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".fdce8r3{color:var(--colorPaletteBerryForeground3);}\", \".fr0bkrk{color:var(--colorNeutralBackground1);}\", \".f9ikmtg{aspect-ratio:1;}\", \".f16dn6v3{width:6px;}\", \".f1w2irj7{background-clip:unset;}\", \".fab5kbq svg{width:6px!important;}\", \".f1ms1d91 svg{height:6px!important;}\", \".f64fuq3{width:20px;}\", \".f1vfi1yj svg{width:20px!important;}\", \".f15s34gz svg{height:20px!important;}\", \".f1w9dchk{width:28px;}\", \".f14efy9b svg{width:28px!important;}\", \".fhipgdu svg{height:28px!important;}\"]\n});\n/**\n * Applies style classnames to slots\n */\nexport const usePresenceBadgeStyles_unstable = state => {\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 === 'away' && styles.statusAway, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && 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//# sourceMappingURL=usePresenceBadgeStyles.styles.js.map"],"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"],"mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IAoEAC,+BAA+B;eAA/BA;;;uBAtEyC;AAE/C,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;AACR;AACA,MAAMC,YAAYC,CAAAA;IAChB,IAAIA,WAAW,UAAUA,WAAW,oBAAoBA,WAAW,WAAW;QA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UAAU6B,OAAOrB,UAAU,EAAEkB,MAAM1B,MAAM,KAAK,eAAe6B,OAAOpB,eAAe,EAAEiB,MAAM1B,MAAM,KAAK,aAAa6B,OAAOnB,aAAa,EAAEgB,MAAM1B,MAAM,KAAK,mBAAmB6B,OAAOlB,iBAAiB,EAAEe,MAAM1B,MAAM,KAAK,aAAa6B,OAAOjB,aAAa,EAAEc,MAAMb,WAAW,IAAIgB,OAAOhB,WAAW,EAAEa,MAAMb,WAAW,IAAIa,MAAM1B,MAAM,KAAK,eAAe6B,OAAOf,oBAAoB,EAAEY,MAAMb,WAAW,IAAIiB,UAAUD,OAAOd,eAAe,EAAEW,MAAMb,WAAW,IAAIa,MAAM1B,MAAM,KAAK,UAAU6B,OAAOrB,UAAU,EAAEkB,MAAMb,WAAW,IAAIa,MAAM1B,MAAM,KAAK,aAAa6B,OAAOnB,aAAa,EAAEgB,MAAMb,WAAW,IAAIa,MAAM1B,MAAM,KAAK,mBAAmB6B,OAAOlB,iBAAiB,EAAEe,MAAMb,WAAW,IAAIa,MAAM1B,MAAM,KAAK,aAAa6B,OAAOb,kBAAkB,EAAEU,MAAMO,IAAI,KAAK,UAAUJ,OAAOZ,IAAI,EAAES,MAAMO,IAAI,KAAK,WAAWJ,OAAON,KAAK,EAAEG,MAAMO,IAAI,KAAK,iBAAiBJ,OAAOL,UAAU,EAAEE,MAAM7B,IAAI,CAACkC,SAAS;IAC9+B,IAAIL,MAAM5B,IAAI,EAAE;QACd4B,MAAM5B,IAAI,CAACiC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,wBAAwBG,IAAI,EAAE8B,eAAeF,MAAM5B,IAAI,CAACiC,SAAS;IACvG;IACA,OAAOL;AACT,GACA,yDAAyD"}
1
+ {"version":3,"sources":["usePresenceBadgeStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, 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 = /*#__PURE__*/__resetStyles(\"r832ydo\", null, [\".r832ydo{display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;border-radius:var(--borderRadiusCircular);background-color:var(--colorNeutralBackground1);padding:1px;background-clip:content-box;}\"]);\nconst useIconClassName = /*#__PURE__*/__resetStyles(\"r11ag4qr\", null, [\".r11ag4qr{display:flex;margin:-1px;}\"]);\nconst useStyles = /*#__PURE__*/__styles({\n statusBusy: {\n sj55zd: \"fvi85wt\"\n },\n statusAway: {\n sj55zd: \"f14k8a89\"\n },\n statusAvailable: {\n sj55zd: \"fqa5hgp\"\n },\n statusOffline: {\n sj55zd: \"f11d4kpn\"\n },\n statusOutOfOffice: {\n sj55zd: \"fdce8r3\"\n },\n statusUnknown: {\n sj55zd: \"f11d4kpn\"\n },\n outOfOffice: {\n sj55zd: \"fr0bkrk\"\n },\n outOfOfficeAvailable: {\n sj55zd: \"fqa5hgp\"\n },\n outOfOfficeBusy: {\n sj55zd: \"fvi85wt\"\n },\n outOfOfficeUnknown: {\n sj55zd: \"f11d4kpn\"\n },\n tiny: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f16dn6v3\",\n B2eet1l: \"f1w2irj7\",\n B5pe6w7: \"fab5kbq\",\n p4uzdd: \"f1ms1d91\"\n },\n large: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f64fuq3\",\n B5pe6w7: \"f1vfi1yj\",\n p4uzdd: \"f15s34gz\"\n },\n extraLarge: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f1w9dchk\",\n B5pe6w7: \"f14efy9b\",\n p4uzdd: \"fhipgdu\"\n }\n}, {\n d: [\".fvi85wt{color:var(--colorPaletteRedBackground3);}\", \".f14k8a89{color:var(--colorPaletteMarigoldBackground3);}\", \".fqa5hgp{color:var(--colorPaletteLightGreenForeground3);}\", \".f11d4kpn{color:var(--colorNeutralForeground3);}\", \".fdce8r3{color:var(--colorPaletteBerryForeground3);}\", \".fr0bkrk{color:var(--colorNeutralBackground1);}\", \".f9ikmtg{aspect-ratio:1;}\", \".f16dn6v3{width:6px;}\", \".f1w2irj7{background-clip:unset;}\", \".fab5kbq svg{width:6px!important;}\", \".f1ms1d91 svg{height:6px!important;}\", \".f64fuq3{width:20px;}\", \".f1vfi1yj svg{width:20px!important;}\", \".f15s34gz svg{height:20px!important;}\", \".f1w9dchk{width:28px;}\", \".f14efy9b svg{width:28px!important;}\", \".fhipgdu svg{height:28px!important;}\"]\n});\n/**\n * Applies style classnames to slots\n */\nexport const usePresenceBadgeStyles_unstable = state => {\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//# sourceMappingURL=usePresenceBadgeStyles.styles.js.map"],"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"],"mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IAoEAC,+BAA+B;eAA/BA;;;uBAtEyC;AAE/C,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;AACR;AACA,MAAMC,YAAYC,CAAAA;IAChB,IAAIA,WAAW,UAAUA,WAAW,oBAAoBA,WAAW,WAAW;QAC5E,OAAO;IACT;IACA,OAAO;AACT;AACA,MAAMC,mBAAmB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,MAAM;IAAC;CAAmO;AACzS,MAAMC,mBAAmB,WAAW,GAAED,IAAAA,oBAAa,EAAC,YAAY,MAAM;IAAC;CAAuC;AAC9G,MAAME,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCC,YAAY;QACVC,QAAQ;IACV;IACAC,YAAY;QACVD,QAAQ;IACV;IACAE,iBAAiB;QACfF,QAAQ;IACV;IACAG,eAAe;QACbH,QAAQ;IACV;IACAI,mBAAmB;QACjBJ,QAAQ;IACV;IACAK,eAAe;QACbL,QAAQ;IACV;IACAM,aAAa;QACXN,QAAQ;IACV;IACAO,sBAAsB;QACpBP,QAAQ;IACV;IACAQ,iBAAiB;QACfR,QAAQ;IACV;IACAS,oBAAoB;QAClBT,QAAQ;IACV;IACAU,MAAM;QACJC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,QAAQ;IACV;IACAC,OAAO;QACLL,SAAS;QACTC,QAAQ;QACRE,SAAS;QACTC,QAAQ;IACV;IACAE,YAAY;QACVN,SAAS;QACTC,QAAQ;QACRE,SAAS;QACTC,QAAQ;IACV;AACF,GAAG;IACDG,GAAG;QAAC;QAAsD;QAA4D;QAA6D;QAAoD;QAAwD;QAAmD;QAA6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,CAACiC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,wBAAwBG,IAAI,EAAE8B,eAAeF,MAAM5B,IAAI,CAACiC,SAAS;IACvG;IACA,OAAOL;AACT,GACA,yDAAyD"}
@@ -36,6 +36,39 @@ _export(exports, {
36
36
  usePresenceBadge_unstable: function() {
37
37
  return _PresenceBadge.usePresenceBadge_unstable;
38
38
  },
39
+ presenceAwayRegular: function() {
40
+ return _PresenceBadge.presenceAwayRegular;
41
+ },
42
+ presenceAwayFilled: function() {
43
+ return _PresenceBadge.presenceAwayFilled;
44
+ },
45
+ presenceAvailableRegular: function() {
46
+ return _PresenceBadge.presenceAvailableRegular;
47
+ },
48
+ presenceAvailableFilled: function() {
49
+ return _PresenceBadge.presenceAvailableFilled;
50
+ },
51
+ presenceBlockedRegular: function() {
52
+ return _PresenceBadge.presenceBlockedRegular;
53
+ },
54
+ presenceBusyFilled: function() {
55
+ return _PresenceBadge.presenceBusyFilled;
56
+ },
57
+ presenceDndRegular: function() {
58
+ return _PresenceBadge.presenceDndRegular;
59
+ },
60
+ presenceDndFilled: function() {
61
+ return _PresenceBadge.presenceDndFilled;
62
+ },
63
+ presenceOofRegular: function() {
64
+ return _PresenceBadge.presenceOofRegular;
65
+ },
66
+ presenceOfflineRegular: function() {
67
+ return _PresenceBadge.presenceOfflineRegular;
68
+ },
69
+ presenceUnknownRegular: function() {
70
+ return _PresenceBadge.presenceUnknownRegular;
71
+ },
39
72
  CounterBadge: function() {
40
73
  return _CounterBadge.CounterBadge;
41
74
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable } from './PresenceBadge';\nexport { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable } from './CounterBadge';\n"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","PresenceBadge","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IACxFC,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAClGC,YAAY;eAAZA,0BAAY;;IAAEC,sBAAsB;eAAtBA,oCAAsB;;IAAEC,8BAA8B;eAA9BA,4CAA8B;;IAAEC,wBAAwB;eAAxBA,sCAAwB;;;uBAFE;+BACU;8BACJ"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable, presenceAwayRegular, presenceAwayFilled, presenceAvailableRegular, presenceAvailableFilled, presenceBlockedRegular, presenceBusyFilled, presenceDndRegular, presenceDndFilled, presenceOofRegular, presenceOfflineRegular, presenceUnknownRegular } from './PresenceBadge';\nexport { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable } 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":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IACxFC,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAAEC,mBAAmB;eAAnBA,kCAAmB;;IAAEC,kBAAkB;eAAlBA,iCAAkB;;IAAEC,wBAAwB;eAAxBA,uCAAwB;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,sBAAsB;eAAtBA,qCAAsB;;IAAEC,kBAAkB;eAAlBA,iCAAkB;;IAAEC,kBAAkB;eAAlBA,iCAAkB;;IAAEC,iBAAiB;eAAjBA,gCAAiB;;IAAEC,kBAAkB;eAAlBA,iCAAkB;;IAAEC,sBAAsB;eAAtBA,qCAAsB;;IAAEC,sBAAsB;eAAtBA,qCAAsB;;IACrVC,YAAY;eAAZA,0BAAY;;IAAEC,sBAAsB;eAAtBA,oCAAsB;;IAAEC,8BAA8B;eAA9BA,4CAA8B;;IAAEC,wBAAwB;eAAxBA,sCAAwB;;;uBAFE;+BAC6P;8BACvP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-badge",
3
- "version": "9.1.36",
3
+ "version": "9.2.0",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -34,8 +34,8 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@fluentui/react-icons": "^2.0.207",
37
- "@fluentui/react-jsx-runtime": "^9.0.8",
38
- "@fluentui/react-shared-contexts": "^9.7.3",
37
+ "@fluentui/react-jsx-runtime": "^9.0.9",
38
+ "@fluentui/react-shared-contexts": "^9.8.0",
39
39
  "@fluentui/react-theme": "^9.1.12",
40
40
  "@fluentui/react-utilities": "^9.13.3",
41
41
  "@griffel/react": "^1.5.14",