@fluentui/react-persona 9.2.34 → 9.2.36

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,97 @@
2
2
  "name": "@fluentui/react-persona",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 24 Aug 2023 10:23:08 GMT",
5
+ "date": "Tue, 05 Sep 2023 13:23:02 GMT",
6
+ "tag": "@fluentui/react-persona_v9.2.36",
7
+ "version": "9.2.36",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-persona",
13
+ "commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
14
+ "comment": "chore: migrate package to use JSX importSource"
15
+ },
16
+ {
17
+ "author": "bernardo.sunderhus@gmail.com",
18
+ "package": "@fluentui/react-persona",
19
+ "commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
20
+ "comment": "bumps @swc/helpers version to 0.5.1"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-persona",
25
+ "comment": "Bump @fluentui/react-avatar to v9.5.26",
26
+ "commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-persona",
31
+ "comment": "Bump @fluentui/react-badge to v9.1.32",
32
+ "commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-persona",
37
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.3",
38
+ "commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-persona",
43
+ "comment": "Bump @fluentui/react-theme to v9.1.12",
44
+ "commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-persona",
49
+ "comment": "Bump @fluentui/react-utilities to v9.13.1",
50
+ "commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-persona",
55
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.4",
56
+ "commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "date": "Tue, 29 Aug 2023 12:57:36 GMT",
63
+ "tag": "@fluentui/react-persona_v9.2.35",
64
+ "version": "9.2.35",
65
+ "comments": {
66
+ "patch": [
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-persona",
70
+ "comment": "Bump @fluentui/react-avatar to v9.5.25",
71
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@fluentui/react-persona",
76
+ "comment": "Bump @fluentui/react-badge to v9.1.31",
77
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-persona",
82
+ "comment": "Bump @fluentui/react-utilities to v9.13.0",
83
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-persona",
88
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.3",
89
+ "commit": "f40ca42c8392904750bf1ef24826d273d1a5b4d5"
90
+ }
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "date": "Thu, 24 Aug 2023 10:26:35 GMT",
6
96
  "tag": "@fluentui/react-persona_v9.2.34",
7
97
  "version": "9.2.34",
8
98
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,40 @@
1
1
  # Change Log - @fluentui/react-persona
2
2
 
3
- This log was last generated on Thu, 24 Aug 2023 10:23:08 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 05 Sep 2023 13:23:02 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.2.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.36)
8
+
9
+ Tue, 05 Sep 2023 13:23:02 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.35..@fluentui/react-persona_v9.2.36)
11
+
12
+ ### Patches
13
+
14
+ - chore: migrate package to use JSX importSource ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
15
+ - bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
16
+ - Bump @fluentui/react-avatar to v9.5.26 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
17
+ - Bump @fluentui/react-badge to v9.1.32 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.7.3 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
19
+ - Bump @fluentui/react-theme to v9.1.12 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.13.1 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
21
+ - Bump @fluentui/react-jsx-runtime to v9.0.4 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
22
+
23
+ ## [9.2.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.35)
24
+
25
+ Tue, 29 Aug 2023 12:57:36 GMT
26
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.34..@fluentui/react-persona_v9.2.35)
27
+
28
+ ### Patches
29
+
30
+ - Bump @fluentui/react-avatar to v9.5.25 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
31
+ - Bump @fluentui/react-badge to v9.1.31 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
32
+ - Bump @fluentui/react-utilities to v9.13.0 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
33
+ - Bump @fluentui/react-jsx-runtime to v9.0.3 ([PR #29005](https://github.com/microsoft/fluentui/pull/29005) by beachball)
34
+
7
35
  ## [9.2.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.34)
8
36
 
9
- Thu, 24 Aug 2023 10:23:08 GMT
37
+ Thu, 24 Aug 2023 10:26:35 GMT
10
38
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.33..@fluentui/react-persona_v9.2.34)
11
39
 
12
40
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["Persona.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderPersona_unstable } from './renderPersona';\nimport { usePersona_unstable } from './usePersona';\nimport { usePersonaStyles_unstable } from './usePersonaStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { PersonaProps } from './Persona.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A Persona is a visual representation of a person or status that showcases an Avatar, PresenceBadge,\n * or an Avatar with a PresenceBadge.\n */\nexport const Persona: ForwardRefComponent<PersonaProps> = React.forwardRef((props, ref) => {\n const state = usePersona_unstable(props, ref);\n\n usePersonaStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePersonaStyles_unstable')(state);\n\n return renderPersona_unstable(state);\n});\n\nPersona.displayName = 'Persona';\n"],"names":["React","renderPersona_unstable","usePersona_unstable","usePersonaStyles_unstable","useCustomStyleHook_unstable","Persona","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,yBAAyB,QAAQ,4BAA4B;AAGtE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,wBAA6CL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACzF,MAAMC,QAAQP,oBAAoBK,OAAOC;IAEzCL,0BAA0BM;IAE1BL,4BAA4B,6BAA6BK;IAEzD,OAAOR,uBAAuBQ;AAChC,GAAG;AAEHJ,QAAQK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Persona.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderPersona_unstable } from './renderPersona';\nimport { usePersona_unstable } from './usePersona';\nimport { usePersonaStyles_unstable } from './usePersonaStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { PersonaProps } from './Persona.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * A Persona is a visual representation of a person or status that showcases an Avatar, PresenceBadge,\n * or an Avatar with a PresenceBadge.\n */\nexport const Persona: ForwardRefComponent<PersonaProps> = React.forwardRef((props, ref) => {\n const state = usePersona_unstable(props, ref);\n\n usePersonaStyles_unstable(state);\n\n useCustomStyleHook_unstable('usePersonaStyles_unstable')(state);\n\n return renderPersona_unstable(state);\n});\n\nPersona.displayName = 'Persona';\n"],"names":["React","renderPersona_unstable","usePersona_unstable","usePersonaStyles_unstable","useCustomStyleHook_unstable","Persona","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,yBAAyB,QAAQ,4BAA4B;AAGtE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,wBAA6CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjF,MAAMC,QAAQP,oBAAoBK,OAAOC;IAEzCL,0BAA0BM;IAE1BL,4BAA4B,6BAA6BK;IAEzD,OAAOR,uBAAuBQ;AAChC,GAAG;AAEHJ,QAAQK,WAAW,GAAG"}
@@ -1,10 +1,19 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Persona
5
5
  */ export const renderPersona_unstable = (state)=>{
6
- const { presenceOnly , textPosition } = state;
6
+ const { presenceOnly, textPosition } = state;
7
7
  assertSlots(state);
8
- const coin = presenceOnly ? state.presence && /*#__PURE__*/ createElement(state.presence, null) : state.avatar && /*#__PURE__*/ createElement(state.avatar, null);
9
- return /*#__PURE__*/ createElement(state.root, null, (textPosition === 'after' || textPosition === 'below') && coin, state.primaryText && /*#__PURE__*/ createElement(state.primaryText, null), state.secondaryText && /*#__PURE__*/ createElement(state.secondaryText, null), state.tertiaryText && /*#__PURE__*/ createElement(state.tertiaryText, null), state.quaternaryText && /*#__PURE__*/ createElement(state.quaternaryText, null), textPosition === 'before' && coin);
8
+ const coin = presenceOnly ? state.presence && /*#__PURE__*/ _jsx(state.presence, {}) : state.avatar && /*#__PURE__*/ _jsx(state.avatar, {});
9
+ return /*#__PURE__*/ _jsxs(state.root, {
10
+ children: [
11
+ (textPosition === 'after' || textPosition === 'below') && coin,
12
+ state.primaryText && /*#__PURE__*/ _jsx(state.primaryText, {}),
13
+ state.secondaryText && /*#__PURE__*/ _jsx(state.secondaryText, {}),
14
+ state.tertiaryText && /*#__PURE__*/ _jsx(state.tertiaryText, {}),
15
+ state.quaternaryText && /*#__PURE__*/ _jsx(state.quaternaryText, {}),
16
+ textPosition === 'before' && coin
17
+ ]
18
+ });
10
19
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPersona.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { PersonaState, PersonaSlots } from './Persona.types';\n\n/**\n * Render the final JSX of Persona\n */\nexport const renderPersona_unstable = (state: PersonaState) => {\n const { presenceOnly, textPosition } = state;\n assertSlots<PersonaSlots>(state);\n\n const coin = presenceOnly ? state.presence && <state.presence /> : state.avatar && <state.avatar />;\n\n return (\n <state.root>\n {(textPosition === 'after' || textPosition === 'below') && coin}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.quaternaryText && <state.quaternaryText />}\n {textPosition === 'before' && coin}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderPersona_unstable","state","presenceOnly","textPosition","coin","presence","avatar","root","primaryText","secondaryText","tertiaryText","quaternaryText"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC,QAAwB;IAC7D,MAAM,EAAEC,aAAY,EAAEC,aAAY,EAAE,GAAGF;IACvCF,YAA0BE;IAE1B,MAAMG,OAAOF,eAAeD,MAAMI,QAAQ,kBAAI,AAdhD,cAciDJ,MAAMI,QAAQ,UAAMJ,MAAMK,MAAM,kBAAI,AAdrF,cAcsFL,MAAMK,MAAM,OAAG;IAEnG,qBACE,AAjBJ,cAiBKL,MAAMM,IAAI,QACR,AAACJ,CAAAA,iBAAiB,WAAWA,iBAAiB,OAAM,KAAMC,MAC1DH,MAAMO,WAAW,kBAAI,AAnB5B,cAmB6BP,MAAMO,WAAW,SACvCP,MAAMQ,aAAa,kBAAI,AApB9B,cAoB+BR,MAAMQ,aAAa,SAC3CR,MAAMS,YAAY,kBAAI,AArB7B,cAqB8BT,MAAMS,YAAY,SACzCT,MAAMU,cAAc,kBAAI,AAtB/B,cAsBgCV,MAAMU,cAAc,SAC7CR,iBAAiB,YAAYC;AAGpC,EAAE"}
1
+ {"version":3,"sources":["renderPersona.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { PersonaState, PersonaSlots } from './Persona.types';\n\n/**\n * Render the final JSX of Persona\n */\nexport const renderPersona_unstable = (state: PersonaState) => {\n const { presenceOnly, textPosition } = state;\n assertSlots<PersonaSlots>(state);\n\n const coin = presenceOnly ? state.presence && <state.presence /> : state.avatar && <state.avatar />;\n\n return (\n <state.root>\n {(textPosition === 'after' || textPosition === 'below') && coin}\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.quaternaryText && <state.quaternaryText />}\n {textPosition === 'before' && coin}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderPersona_unstable","state","presenceOnly","textPosition","coin","presence","avatar","root","primaryText","secondaryText","tertiaryText","quaternaryText"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC;IACrC,MAAM,EAAEC,YAAY,EAAEC,YAAY,EAAE,GAAGF;IACvCF,YAA0BE;IAE1B,MAAMG,OAAOF,eAAeD,MAAMI,QAAQ,kBAAI,KAACJ,MAAMI,QAAQ,QAAMJ,MAAMK,MAAM,kBAAI,KAACL,MAAMK,MAAM;IAEhG,qBACE,MAACL,MAAMM,IAAI;;YACPJ,CAAAA,iBAAiB,WAAWA,iBAAiB,OAAM,KAAMC;YAC1DH,MAAMO,WAAW,kBAAI,KAACP,MAAMO,WAAW;YACvCP,MAAMQ,aAAa,kBAAI,KAACR,MAAMQ,aAAa;YAC3CR,MAAMS,YAAY,kBAAI,KAACT,MAAMS,YAAY;YACzCT,MAAMU,cAAc,kBAAI,KAACV,MAAMU,cAAc;YAC7CR,iBAAiB,YAAYC;;;AAGpC,EAAE"}
@@ -11,7 +11,7 @@ import { PresenceBadge } from '@fluentui/react-badge';
11
11
  * @param props - props from this instance of Persona
12
12
  * @param ref - reference to root HTMLElement of Persona
13
13
  */ export const usePersona_unstable = (props, ref)=>{
14
- const { name , presenceOnly =false , size ='medium' , textAlignment ='start' , textPosition ='after' } = props;
14
+ const { name, presenceOnly = false, size = 'medium', textAlignment = 'start', textPosition = 'after' } = props;
15
15
  const primaryText = slot.optional(props.primaryText, {
16
16
  renderByDefault: true,
17
17
  defaultProps: {
@@ -1 +1 @@
1
- {"version":3,"sources":["usePersona.ts"],"sourcesContent":["import * as React from 'react';\nimport { Avatar } from '@fluentui/react-avatar';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { PresenceBadge } from '@fluentui/react-badge';\nimport type { PersonaProps, PersonaState } from './Persona.types';\n\n/**\n * Create the state required to render Persona.\n *\n * The returned state can be modified with hooks such as usePersonaStyles_unstable,\n * before being passed to renderPersona_unstable.\n *\n * @param props - props from this instance of Persona\n * @param ref - reference to root HTMLElement of Persona\n */\nexport const usePersona_unstable = (props: PersonaProps, ref: React.Ref<HTMLElement>): PersonaState => {\n const { name, presenceOnly = false, size = 'medium', textAlignment = 'start', textPosition = 'after' } = props;\n\n const primaryText = slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: name,\n },\n elementType: 'span',\n });\n const secondaryText = slot.optional(props.secondaryText, { elementType: 'span' });\n const tertiaryText = slot.optional(props.tertiaryText, { elementType: 'span' });\n const quaternaryText = slot.optional(props.quaternaryText, { elementType: 'span' });\n const numTextLines = [primaryText, secondaryText, tertiaryText, quaternaryText].filter(Boolean).length;\n return {\n numTextLines,\n presenceOnly,\n size,\n textAlignment,\n textPosition,\n components: {\n root: 'div',\n avatar: Avatar,\n presence: PresenceBadge,\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n quaternaryText: 'span',\n },\n\n root: slot.always(\n getNativeElementProps(\n 'div',\n {\n ...props,\n ref,\n },\n /* excludedPropNames */ ['name'],\n ),\n { elementType: 'div' },\n ),\n avatar: !presenceOnly\n ? slot.optional(props.avatar, {\n renderByDefault: true,\n defaultProps: {\n name,\n badge: props.presence,\n size: avatarSizes[size],\n },\n elementType: Avatar,\n })\n : undefined,\n presence: presenceOnly\n ? slot.optional(props.presence, {\n defaultProps: {\n size: presenceSizes[size],\n },\n elementType: PresenceBadge,\n })\n : undefined,\n primaryText,\n secondaryText,\n tertiaryText,\n quaternaryText,\n };\n};\n\nconst presenceSizes = {\n 'extra-small': 'tiny',\n small: 'extra-small',\n medium: 'small',\n large: 'medium',\n 'extra-large': 'large',\n huge: 'large',\n} as const;\n\nconst avatarSizes = {\n 'extra-small': 20,\n small: 28,\n medium: 32,\n large: 36,\n 'extra-large': 40,\n huge: 56,\n} as const;\n"],"names":["React","Avatar","getNativeElementProps","slot","PresenceBadge","usePersona_unstable","props","ref","name","presenceOnly","size","textAlignment","textPosition","primaryText","optional","renderByDefault","defaultProps","children","elementType","secondaryText","tertiaryText","quaternaryText","numTextLines","filter","Boolean","length","components","root","avatar","presence","always","badge","avatarSizes","undefined","presenceSizes","small","medium","large","huge"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,aAAa,QAAQ,wBAAwB;AAGtD;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAqBC,MAA8C;IACrG,MAAM,EAAEC,KAAI,EAAEC,cAAe,KAAK,CAAA,EAAEC,MAAO,SAAQ,EAAEC,eAAgB,QAAO,EAAEC,cAAe,QAAO,EAAE,GAAGN;IAEzG,MAAMO,cAAcV,KAAKW,QAAQ,CAACR,MAAMO,WAAW,EAAE;QACnDE,iBAAiB,IAAI;QACrBC,cAAc;YACZC,UAAUT;QACZ;QACAU,aAAa;IACf;IACA,MAAMC,gBAAgBhB,KAAKW,QAAQ,CAACR,MAAMa,aAAa,EAAE;QAAED,aAAa;IAAO;IAC/E,MAAME,eAAejB,KAAKW,QAAQ,CAACR,MAAMc,YAAY,EAAE;QAAEF,aAAa;IAAO;IAC7E,MAAMG,iBAAiBlB,KAAKW,QAAQ,CAACR,MAAMe,cAAc,EAAE;QAAEH,aAAa;IAAO;IACjF,MAAMI,eAAe;QAACT;QAAaM;QAAeC;QAAcC;KAAe,CAACE,MAAM,CAACC,SAASC,MAAM;IACtG,OAAO;QACLH;QACAb;QACAC;QACAC;QACAC;QACAc,YAAY;YACVC,MAAM;YACNC,QAAQ3B;YACR4B,UAAUzB;YACVS,aAAa;YACbM,eAAe;YACfC,cAAc;YACdC,gBAAgB;QAClB;QAEAM,MAAMxB,KAAK2B,MAAM,CACf5B,sBACE,OACA;YACE,GAAGI,KAAK;YACRC;QACF,GACA,qBAAqB,GAAG;YAAC;SAAO,GAElC;YAAEW,aAAa;QAAM;QAEvBU,QAAQ,CAACnB,eACLN,KAAKW,QAAQ,CAACR,MAAMsB,MAAM,EAAE;YAC1Bb,iBAAiB,IAAI;YACrBC,cAAc;gBACZR;gBACAuB,OAAOzB,MAAMuB,QAAQ;gBACrBnB,MAAMsB,WAAW,CAACtB,KAAK;YACzB;YACAQ,aAAajB;QACf,KACAgC,SAAS;QACbJ,UAAUpB,eACNN,KAAKW,QAAQ,CAACR,MAAMuB,QAAQ,EAAE;YAC5Bb,cAAc;gBACZN,MAAMwB,aAAa,CAACxB,KAAK;YAC3B;YACAQ,aAAad;QACf,KACA6B,SAAS;QACbpB;QACAM;QACAC;QACAC;IACF;AACF,EAAE;AAEF,MAAMa,gBAAgB;IACpB,eAAe;IACfC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACR;AAEA,MAAMN,cAAc;IAClB,eAAe;IACfG,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACR"}
1
+ {"version":3,"sources":["usePersona.ts"],"sourcesContent":["import * as React from 'react';\nimport { Avatar } from '@fluentui/react-avatar';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { PresenceBadge } from '@fluentui/react-badge';\nimport type { PersonaProps, PersonaState } from './Persona.types';\n\n/**\n * Create the state required to render Persona.\n *\n * The returned state can be modified with hooks such as usePersonaStyles_unstable,\n * before being passed to renderPersona_unstable.\n *\n * @param props - props from this instance of Persona\n * @param ref - reference to root HTMLElement of Persona\n */\nexport const usePersona_unstable = (props: PersonaProps, ref: React.Ref<HTMLElement>): PersonaState => {\n const { name, presenceOnly = false, size = 'medium', textAlignment = 'start', textPosition = 'after' } = props;\n\n const primaryText = slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: name,\n },\n elementType: 'span',\n });\n const secondaryText = slot.optional(props.secondaryText, { elementType: 'span' });\n const tertiaryText = slot.optional(props.tertiaryText, { elementType: 'span' });\n const quaternaryText = slot.optional(props.quaternaryText, { elementType: 'span' });\n const numTextLines = [primaryText, secondaryText, tertiaryText, quaternaryText].filter(Boolean).length;\n return {\n numTextLines,\n presenceOnly,\n size,\n textAlignment,\n textPosition,\n components: {\n root: 'div',\n avatar: Avatar,\n presence: PresenceBadge,\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n quaternaryText: 'span',\n },\n\n root: slot.always(\n getNativeElementProps(\n 'div',\n {\n ...props,\n ref,\n },\n /* excludedPropNames */ ['name'],\n ),\n { elementType: 'div' },\n ),\n avatar: !presenceOnly\n ? slot.optional(props.avatar, {\n renderByDefault: true,\n defaultProps: {\n name,\n badge: props.presence,\n size: avatarSizes[size],\n },\n elementType: Avatar,\n })\n : undefined,\n presence: presenceOnly\n ? slot.optional(props.presence, {\n defaultProps: {\n size: presenceSizes[size],\n },\n elementType: PresenceBadge,\n })\n : undefined,\n primaryText,\n secondaryText,\n tertiaryText,\n quaternaryText,\n };\n};\n\nconst presenceSizes = {\n 'extra-small': 'tiny',\n small: 'extra-small',\n medium: 'small',\n large: 'medium',\n 'extra-large': 'large',\n huge: 'large',\n} as const;\n\nconst avatarSizes = {\n 'extra-small': 20,\n small: 28,\n medium: 32,\n large: 36,\n 'extra-large': 40,\n huge: 56,\n} as const;\n"],"names":["React","Avatar","getNativeElementProps","slot","PresenceBadge","usePersona_unstable","props","ref","name","presenceOnly","size","textAlignment","textPosition","primaryText","optional","renderByDefault","defaultProps","children","elementType","secondaryText","tertiaryText","quaternaryText","numTextLines","filter","Boolean","length","components","root","avatar","presence","always","badge","avatarSizes","undefined","presenceSizes","small","medium","large","huge"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,aAAa,QAAQ,wBAAwB;AAGtD;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAsB,CAACC,OAAqBC;IACvD,MAAM,EAAEC,IAAI,EAAEC,eAAe,KAAK,EAAEC,OAAO,QAAQ,EAAEC,gBAAgB,OAAO,EAAEC,eAAe,OAAO,EAAE,GAAGN;IAEzG,MAAMO,cAAcV,KAAKW,QAAQ,CAACR,MAAMO,WAAW,EAAE;QACnDE,iBAAiB;QACjBC,cAAc;YACZC,UAAUT;QACZ;QACAU,aAAa;IACf;IACA,MAAMC,gBAAgBhB,KAAKW,QAAQ,CAACR,MAAMa,aAAa,EAAE;QAAED,aAAa;IAAO;IAC/E,MAAME,eAAejB,KAAKW,QAAQ,CAACR,MAAMc,YAAY,EAAE;QAAEF,aAAa;IAAO;IAC7E,MAAMG,iBAAiBlB,KAAKW,QAAQ,CAACR,MAAMe,cAAc,EAAE;QAAEH,aAAa;IAAO;IACjF,MAAMI,eAAe;QAACT;QAAaM;QAAeC;QAAcC;KAAe,CAACE,MAAM,CAACC,SAASC,MAAM;IACtG,OAAO;QACLH;QACAb;QACAC;QACAC;QACAC;QACAc,YAAY;YACVC,MAAM;YACNC,QAAQ3B;YACR4B,UAAUzB;YACVS,aAAa;YACbM,eAAe;YACfC,cAAc;YACdC,gBAAgB;QAClB;QAEAM,MAAMxB,KAAK2B,MAAM,CACf5B,sBACE,OACA;YACE,GAAGI,KAAK;YACRC;QACF,GACA,qBAAqB,GAAG;YAAC;SAAO,GAElC;YAAEW,aAAa;QAAM;QAEvBU,QAAQ,CAACnB,eACLN,KAAKW,QAAQ,CAACR,MAAMsB,MAAM,EAAE;YAC1Bb,iBAAiB;YACjBC,cAAc;gBACZR;gBACAuB,OAAOzB,MAAMuB,QAAQ;gBACrBnB,MAAMsB,WAAW,CAACtB,KAAK;YACzB;YACAQ,aAAajB;QACf,KACAgC;QACJJ,UAAUpB,eACNN,KAAKW,QAAQ,CAACR,MAAMuB,QAAQ,EAAE;YAC5Bb,cAAc;gBACZN,MAAMwB,aAAa,CAACxB,KAAK;YAC3B;YACAQ,aAAad;QACf,KACA6B;QACJpB;QACAM;QACAC;QACAC;IACF;AACF,EAAE;AAEF,MAAMa,gBAAgB;IACpB,eAAe;IACfC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACR;AAEA,MAAMN,cAAc;IAClB,eAAe;IACfG,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACR"}
@@ -1 +1 @@
1
- {"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","typographyStyles","personaClassNames","root","avatar","presence","primaryText","secondaryText","tertiaryText","quaternaryText","avatarSpacing","useRootClassName","useStyles","beforeAfterCenter","wkccdc","after","before","B7hvi0a","Budl1dq","below","Bxotwcr","media","Ijaq50","mediaBeforeAfterCenter","start","qb2dma","center","afterAlignToPrimary","Bw0ie65","beforeAlignToPrimary","Br312pm","secondLineSpacing","B6of3ja","primary","secondary","tertiary","quaternary","d","useAvatarSpacingStyles","Bs1gm4r","small","medium","large","huge","t21cq0","jrapky","Frg6f3","usePresenceSpacingStyles","usePersonaStyles_unstable","state","presenceOnly","size","textAlignment","textPosition","alignToPrimary","alignBeforeAfterCenter","primaryTextClassName","optionalTextClassName","useTextClassNames","rootClassName","styles","avatarSpacingStyles","presenceSpacingStyles","className","usePrimaryTextBaseClassName","useOptionalTextBaseClassName","useTextStyles","body1","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","caption1","subtitle2","primaryTextBaseClassName","optionalTextBaseClassName","textStyles","primaryTextSize","alignToPrimaryClassName","numTextLines"],"sources":["usePersonaStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const personaClassNames = {\n root: 'fui-Persona',\n avatar: 'fui-Persona__avatar',\n presence: 'fui-Persona__presence',\n primaryText: 'fui-Persona__primaryText',\n secondaryText: 'fui-Persona__secondaryText',\n tertiaryText: 'fui-Persona__tertiaryText',\n quaternaryText: 'fui-Persona__quaternaryText'\n};\nconst avatarSpacing = `--fui-Persona__avatar--spacing`;\nconst useRootClassName = makeResetStyles({\n display: 'inline-grid',\n gridAutoRows: 'max-content',\n gridAutoFlow: 'column',\n justifyItems: 'start',\n gridTemplateColumns: 'max-content [middle] auto'\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n beforeAfterCenter: {\n // This template is needed to make sure the Avatar is centered when it takes up more space than the text lines\n gridTemplateRows: '1fr [primary] max-content [secondary] max-content [tertiary] max-content [quaternary] max-content 1fr'\n },\n after: {\n },\n before: {\n justifyItems: 'end',\n gridTemplateColumns: 'auto [middle] max-content'\n },\n below: {\n gridAutoFlow: 'unset',\n justifyItems: 'center',\n gridTemplateColumns: 'unset'\n },\n media: {\n gridRowStart: 'span 5'\n },\n mediaBeforeAfterCenter: {\n gridRowStart: 'span 6'\n },\n start: {\n alignSelf: 'start'\n },\n center: {\n alignSelf: 'center'\n },\n afterAlignToPrimary: {\n alignSelf: 'center',\n gridRowStart: 'unset',\n gridColumnEnd: 'middle'\n },\n beforeAlignToPrimary: {\n alignSelf: 'center',\n gridRowStart: 'unset',\n gridColumnStart: 'middle'\n },\n secondLineSpacing: {\n marginTop: '-2px'\n },\n primary: {\n gridRowStart: 'primary'\n },\n secondary: {\n gridRowStart: 'secondary'\n },\n tertiary: {\n gridRowStart: 'tertiary'\n },\n quaternary: {\n gridRowStart: 'quaternary'\n }\n});\nconst useAvatarSpacingStyles = makeStyles({\n 'extra-small': {\n [avatarSpacing]: tokens.spacingHorizontalSNudge\n },\n small: {\n [avatarSpacing]: tokens.spacingHorizontalS\n },\n medium: {\n [avatarSpacing]: tokens.spacingHorizontalS\n },\n large: {\n [avatarSpacing]: tokens.spacingHorizontalMNudge\n },\n 'extra-large': {\n [avatarSpacing]: tokens.spacingHorizontalMNudge\n },\n huge: {\n [avatarSpacing]: tokens.spacingHorizontalM\n },\n after: {\n marginRight: `var(${avatarSpacing})`\n },\n below: {\n marginBottom: `var(${avatarSpacing})`\n },\n before: {\n marginLeft: `var(${avatarSpacing})`\n }\n});\nconst usePresenceSpacingStyles = makeStyles({\n small: {\n [avatarSpacing]: tokens.spacingHorizontalSNudge\n }\n});\n/**\n * Apply styling to the Persona slots based on the state\n */ export const usePersonaStyles_unstable = (state)=>{\n const { presenceOnly , size , textAlignment , textPosition } = state;\n const alignToPrimary = presenceOnly && textAlignment === 'start' && size !== 'extra-large' && size !== 'huge';\n const alignBeforeAfterCenter = textPosition !== 'below' && textAlignment === 'center';\n const { primaryTextClassName , optionalTextClassName } = useTextClassNames(state, alignToPrimary);\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const avatarSpacingStyles = useAvatarSpacingStyles();\n const presenceSpacingStyles = {\n ...avatarSpacingStyles,\n ...usePresenceSpacingStyles()\n };\n state.root.className = mergeClasses(personaClassNames.root, rootClassName, alignBeforeAfterCenter && styles.beforeAfterCenter, styles[textPosition], state.root.className);\n if (state.avatar) {\n state.avatar.className = mergeClasses(personaClassNames.avatar, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], avatarSpacingStyles[size], avatarSpacingStyles[textPosition], state.avatar.className);\n }\n if (state.presence) {\n state.presence.className = mergeClasses(personaClassNames.presence, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], presenceSpacingStyles[size], presenceSpacingStyles[textPosition], textPosition === 'after' && alignToPrimary && styles.afterAlignToPrimary, textPosition === 'before' && alignToPrimary && styles.beforeAlignToPrimary, state.presence.className);\n }\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(personaClassNames.primaryText, alignBeforeAfterCenter && styles.primary, primaryTextClassName, state.primaryText.className);\n }\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(personaClassNames.secondaryText, alignBeforeAfterCenter && styles.secondary, optionalTextClassName, styles.secondLineSpacing, state.secondaryText.className);\n }\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(personaClassNames.tertiaryText, alignBeforeAfterCenter && styles.tertiary, optionalTextClassName, state.tertiaryText.className);\n }\n if (state.quaternaryText) {\n state.quaternaryText.className = mergeClasses(personaClassNames.quaternaryText, alignBeforeAfterCenter && styles.quaternary, optionalTextClassName, state.quaternaryText.className);\n }\n return state;\n};\nconst usePrimaryTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1\n});\nconst useOptionalTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1\n});\nconst useTextStyles = makeStyles({\n beforeAlignToPrimary: {\n gridColumnEnd: 'middle'\n },\n afterAlignToPrimary: {\n gridColumnStart: 'middle'\n },\n body1: typographyStyles.body1,\n caption1: typographyStyles.caption1,\n subtitle2: typographyStyles.subtitle2\n});\nconst useTextClassNames = (state, alignToPrimary)=>{\n const { presenceOnly , size , textPosition } = state;\n const primaryTextBaseClassName = usePrimaryTextBaseClassName();\n const optionalTextBaseClassName = useOptionalTextBaseClassName();\n const textStyles = useTextStyles();\n let primaryTextSize;\n let alignToPrimaryClassName;\n if (presenceOnly) {\n if (size === 'extra-small') {\n primaryTextSize = state.numTextLines <= 1 && textStyles.caption1;\n } else if (size === 'extra-large' || size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n }\n if (alignToPrimary) {\n if (textPosition === 'before') {\n alignToPrimaryClassName = textStyles.beforeAlignToPrimary;\n } else if (textPosition === 'after') {\n alignToPrimaryClassName = textStyles.afterAlignToPrimary;\n }\n }\n } else {\n if (size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n } else if (size === 'extra-large') {\n primaryTextSize = textStyles.subtitle2;\n }\n }\n return {\n primaryTextClassName: mergeClasses(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),\n optionalTextClassName: mergeClasses(optionalTextBaseClassName, !presenceOnly && size === 'huge' && textStyles.body1, alignToPrimaryClassName)\n };\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,IAAI,EAAE,aAAa;EACnBC,MAAM,EAAE,qBAAqB;EAC7BC,QAAQ,EAAE,uBAAuB;EACjCC,WAAW,EAAE,0BAA0B;EACvCC,aAAa,EAAE,4BAA4B;EAC3CC,YAAY,EAAE,2BAA2B;EACzCC,cAAc,EAAE;AACpB,CAAC;AACD,MAAMC,aAAa,GAAI,gCAA+B;AACtD,MAAMC,gBAAgB,gBAAGd,aAAA,yKAMxB,CAAC;AACF;AACA;AACA;AAAI,MAAMe,SAAS,gBAAGd,QAAA;EAAAe,iBAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;EAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,KAAA;IAAAC,OAAA;IAAAH,OAAA;IAAAC,OAAA;EAAA;EAAAG,KAAA;IAAAC,MAAA;EAAA;EAAAC,sBAAA;IAAAD,MAAA;EAAA;EAAAE,KAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAD,MAAA;EAAA;EAAAE,mBAAA;IAAAF,MAAA;IAAAH,MAAA;IAA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,KAAK,aAAa,EAAE;MAC/B0B,eAAe,GAAGD,UAAU,CAACH,SAAS;IAC1C;EACJ;EACA,OAAO;IACHjB,oBAAoB,EAAEzD,YAAY,CAAC2E,wBAAwB,EAAEG,eAAe,EAAEC,uBAAuB,CAAC;IACtGrB,qBAAqB,EAAE1D,YAAY,CAAC4E,yBAAyB,EAAE,CAACzB,YAAY,IAAIC,IAAI,KAAK,MAAM,IAAIyB,UAAU,CAACT,KAAK,EAAEW,uBAAuB;EAChJ,CAAC;AACL,CAAC"}
1
+ {"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","typographyStyles","personaClassNames","root","avatar","presence","primaryText","secondaryText","tertiaryText","quaternaryText","avatarSpacing","useRootClassName","useStyles","beforeAfterCenter","wkccdc","after","before","B7hvi0a","Budl1dq","below","Bxotwcr","media","Ijaq50","mediaBeforeAfterCenter","start","qb2dma","center","afterAlignToPrimary","Bw0ie65","beforeAlignToPrimary","Br312pm","secondLineSpacing","B6of3ja","primary","secondary","tertiary","quaternary","d","useAvatarSpacingStyles","Bs1gm4r","small","medium","large","huge","t21cq0","jrapky","Frg6f3","usePresenceSpacingStyles","usePersonaStyles_unstable","state","presenceOnly","size","textAlignment","textPosition","alignToPrimary","alignBeforeAfterCenter","primaryTextClassName","optionalTextClassName","useTextClassNames","rootClassName","styles","avatarSpacingStyles","presenceSpacingStyles","className","usePrimaryTextBaseClassName","useOptionalTextBaseClassName","useTextStyles","body1","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","caption1","subtitle2","primaryTextBaseClassName","optionalTextBaseClassName","textStyles","primaryTextSize","alignToPrimaryClassName","numTextLines"],"sources":["usePersonaStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const personaClassNames = {\n root: 'fui-Persona',\n avatar: 'fui-Persona__avatar',\n presence: 'fui-Persona__presence',\n primaryText: 'fui-Persona__primaryText',\n secondaryText: 'fui-Persona__secondaryText',\n tertiaryText: 'fui-Persona__tertiaryText',\n quaternaryText: 'fui-Persona__quaternaryText'\n};\nconst avatarSpacing = `--fui-Persona__avatar--spacing`;\nconst useRootClassName = makeResetStyles({\n display: 'inline-grid',\n gridAutoRows: 'max-content',\n gridAutoFlow: 'column',\n justifyItems: 'start',\n gridTemplateColumns: 'max-content [middle] auto'\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n beforeAfterCenter: {\n // This template is needed to make sure the Avatar is centered when it takes up more space than the text lines\n gridTemplateRows: '1fr [primary] max-content [secondary] max-content [tertiary] max-content [quaternary] max-content 1fr'\n },\n after: {\n },\n before: {\n justifyItems: 'end',\n gridTemplateColumns: 'auto [middle] max-content'\n },\n below: {\n gridAutoFlow: 'unset',\n justifyItems: 'center',\n gridTemplateColumns: 'unset'\n },\n media: {\n gridRowStart: 'span 5'\n },\n mediaBeforeAfterCenter: {\n gridRowStart: 'span 6'\n },\n start: {\n alignSelf: 'start'\n },\n center: {\n alignSelf: 'center'\n },\n afterAlignToPrimary: {\n alignSelf: 'center',\n gridRowStart: 'unset',\n gridColumnEnd: 'middle'\n },\n beforeAlignToPrimary: {\n alignSelf: 'center',\n gridRowStart: 'unset',\n gridColumnStart: 'middle'\n },\n secondLineSpacing: {\n marginTop: '-2px'\n },\n primary: {\n gridRowStart: 'primary'\n },\n secondary: {\n gridRowStart: 'secondary'\n },\n tertiary: {\n gridRowStart: 'tertiary'\n },\n quaternary: {\n gridRowStart: 'quaternary'\n }\n});\nconst useAvatarSpacingStyles = makeStyles({\n 'extra-small': {\n [avatarSpacing]: tokens.spacingHorizontalSNudge\n },\n small: {\n [avatarSpacing]: tokens.spacingHorizontalS\n },\n medium: {\n [avatarSpacing]: tokens.spacingHorizontalS\n },\n large: {\n [avatarSpacing]: tokens.spacingHorizontalMNudge\n },\n 'extra-large': {\n [avatarSpacing]: tokens.spacingHorizontalMNudge\n },\n huge: {\n [avatarSpacing]: tokens.spacingHorizontalM\n },\n after: {\n marginRight: `var(${avatarSpacing})`\n },\n below: {\n marginBottom: `var(${avatarSpacing})`\n },\n before: {\n marginLeft: `var(${avatarSpacing})`\n }\n});\nconst usePresenceSpacingStyles = makeStyles({\n small: {\n [avatarSpacing]: tokens.spacingHorizontalSNudge\n }\n});\n/**\n * Apply styling to the Persona slots based on the state\n */ export const usePersonaStyles_unstable = (state)=>{\n const { presenceOnly, size, textAlignment, textPosition } = state;\n const alignToPrimary = presenceOnly && textAlignment === 'start' && size !== 'extra-large' && size !== 'huge';\n const alignBeforeAfterCenter = textPosition !== 'below' && textAlignment === 'center';\n const { primaryTextClassName, optionalTextClassName } = useTextClassNames(state, alignToPrimary);\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const avatarSpacingStyles = useAvatarSpacingStyles();\n const presenceSpacingStyles = {\n ...avatarSpacingStyles,\n ...usePresenceSpacingStyles()\n };\n state.root.className = mergeClasses(personaClassNames.root, rootClassName, alignBeforeAfterCenter && styles.beforeAfterCenter, styles[textPosition], state.root.className);\n if (state.avatar) {\n state.avatar.className = mergeClasses(personaClassNames.avatar, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], avatarSpacingStyles[size], avatarSpacingStyles[textPosition], state.avatar.className);\n }\n if (state.presence) {\n state.presence.className = mergeClasses(personaClassNames.presence, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], presenceSpacingStyles[size], presenceSpacingStyles[textPosition], textPosition === 'after' && alignToPrimary && styles.afterAlignToPrimary, textPosition === 'before' && alignToPrimary && styles.beforeAlignToPrimary, state.presence.className);\n }\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(personaClassNames.primaryText, alignBeforeAfterCenter && styles.primary, primaryTextClassName, state.primaryText.className);\n }\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(personaClassNames.secondaryText, alignBeforeAfterCenter && styles.secondary, optionalTextClassName, styles.secondLineSpacing, state.secondaryText.className);\n }\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(personaClassNames.tertiaryText, alignBeforeAfterCenter && styles.tertiary, optionalTextClassName, state.tertiaryText.className);\n }\n if (state.quaternaryText) {\n state.quaternaryText.className = mergeClasses(personaClassNames.quaternaryText, alignBeforeAfterCenter && styles.quaternary, optionalTextClassName, state.quaternaryText.className);\n }\n return state;\n};\nconst usePrimaryTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1\n});\nconst useOptionalTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1\n});\nconst useTextStyles = makeStyles({\n beforeAlignToPrimary: {\n gridColumnEnd: 'middle'\n },\n afterAlignToPrimary: {\n gridColumnStart: 'middle'\n },\n body1: typographyStyles.body1,\n caption1: typographyStyles.caption1,\n subtitle2: typographyStyles.subtitle2\n});\nconst useTextClassNames = (state, alignToPrimary)=>{\n const { presenceOnly, size, textPosition } = state;\n const primaryTextBaseClassName = usePrimaryTextBaseClassName();\n const optionalTextBaseClassName = useOptionalTextBaseClassName();\n const textStyles = useTextStyles();\n let primaryTextSize;\n let alignToPrimaryClassName;\n if (presenceOnly) {\n if (size === 'extra-small') {\n primaryTextSize = state.numTextLines <= 1 && textStyles.caption1;\n } else if (size === 'extra-large' || size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n }\n if (alignToPrimary) {\n if (textPosition === 'before') {\n alignToPrimaryClassName = textStyles.beforeAlignToPrimary;\n } else if (textPosition === 'after') {\n alignToPrimaryClassName = textStyles.afterAlignToPrimary;\n }\n }\n } else {\n if (size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n } else if (size === 'extra-large') {\n primaryTextSize = textStyles.subtitle2;\n }\n }\n return {\n primaryTextClassName: mergeClasses(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),\n optionalTextClassName: mergeClasses(optionalTextBaseClassName, !presenceOnly && size === 'huge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  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./components/Persona/index"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./components/Persona/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["Persona.js"],"sourcesContent":["export * from './components/Persona/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["Persona.js"],"sourcesContent":["export * from './components/Persona/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "Persona", {
6
6
  enumerable: true,
7
- get: ()=>Persona
7
+ get: function() {
8
+ return Persona;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _renderPersona = require("./renderPersona");
12
14
  const _usePersona = require("./usePersona");
13
- const _usePersonaStylesStyles = require("./usePersonaStyles.styles");
14
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const _usePersonaStylesstyles = require("./usePersonaStyles.styles");
16
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
17
  const Persona = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _usePersona.usePersona_unstable)(props, ref);
17
- (0, _usePersonaStylesStyles.usePersonaStyles_unstable)(state);
18
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('usePersonaStyles_unstable')(state);
19
+ (0, _usePersonaStylesstyles.usePersonaStyles_unstable)(state);
20
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('usePersonaStyles_unstable')(state);
19
21
  return (0, _renderPersona.renderPersona_unstable)(state);
20
22
  });
21
23
  Persona.displayName = 'Persona';
@@ -1 +1 @@
1
- {"version":3,"sources":["Persona.js"],"sourcesContent":["import * as React from 'react';\nimport { renderPersona_unstable } from './renderPersona';\nimport { usePersona_unstable } from './usePersona';\nimport { usePersonaStyles_unstable } from './usePersonaStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A Persona is a visual representation of a person or status that showcases an Avatar, PresenceBadge,\n * or an Avatar with a PresenceBadge.\n */ export const Persona = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = usePersona_unstable(props, ref);\n usePersonaStyles_unstable(state);\n useCustomStyleHook_unstable('usePersonaStyles_unstable')(state);\n return renderPersona_unstable(state);\n});\nPersona.displayName = 'Persona';\n"],"names":["Persona","React","forwardRef","props","ref","state","usePersona_unstable","usePersonaStyles_unstable","useCustomStyleHook_unstable","renderPersona_unstable","displayName"],"mappings":";;;;+BAQiBA;;aAAAA;;;6DARM;+BACgB;4BACH;wCACM;qCACE;AAIjC,MAAMA,UAAU,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACpE,MAAMC,QAAQC,IAAAA,+BAAmB,EAACH,OAAOC;IACzCG,IAAAA,iDAAyB,EAACF;IAC1BG,IAAAA,gDAA2B,EAAC,6BAA6BH;IACzD,OAAOI,IAAAA,qCAAsB,EAACJ;AAClC;AACAL,QAAQU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Persona.js"],"sourcesContent":["import * as React from 'react';\nimport { renderPersona_unstable } from './renderPersona';\nimport { usePersona_unstable } from './usePersona';\nimport { usePersonaStyles_unstable } from './usePersonaStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A Persona is a visual representation of a person or status that showcases an Avatar, PresenceBadge,\n * or an Avatar with a PresenceBadge.\n */ export const Persona = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = usePersona_unstable(props, ref);\n usePersonaStyles_unstable(state);\n useCustomStyleHook_unstable('usePersonaStyles_unstable')(state);\n return renderPersona_unstable(state);\n});\nPersona.displayName = 'Persona';\n"],"names":["Persona","React","forwardRef","props","ref","state","usePersona_unstable","usePersonaStyles_unstable","useCustomStyleHook_unstable","renderPersona_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;+BACgB;4BACH;wCACM;qCACE;AAIjC,MAAMA,UAAU,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC9D,MAAMC,QAAQC,IAAAA,+BAAmB,EAACH,OAAOC;IACzCG,IAAAA,iDAAyB,EAACF;IAC1BG,IAAAA,gDAA2B,EAAC,6BAA6BH;IACzD,OAAOI,IAAAA,qCAAsB,EAACJ;AAClC;AACAL,QAAQU,WAAW,GAAG"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./Persona"), exports);
7
- _exportStar(require("./Persona.types"), exports);
8
- _exportStar(require("./renderPersona"), exports);
9
- _exportStar(require("./usePersona"), exports);
10
- _exportStar(require("./usePersonaStyles.styles"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Persona"), exports);
7
+ _export_star._(require("./Persona.types"), exports);
8
+ _export_star._(require("./renderPersona"), exports);
9
+ _export_star._(require("./usePersona"), exports);
10
+ _export_star._(require("./usePersonaStyles.styles"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Persona';\nexport * from './Persona.types';\nexport * from './renderPersona';\nexport * from './usePersona';\nexport * from './usePersonaStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Persona';\nexport * from './Persona.types';\nexport * from './renderPersona';\nexport * from './usePersona';\nexport * from './usePersonaStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1,16 +1,27 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderPersona_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderPersona_unstable
7
+ get: function() {
8
+ return renderPersona_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
11
13
  const renderPersona_unstable = (state)=>{
12
- const { presenceOnly , textPosition } = state;
13
- (0, _reactUtilities.assertSlots)(state);
14
- const coin = presenceOnly ? state.presence && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.presence, null) : state.avatar && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.avatar, null);
15
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, (textPosition === 'after' || textPosition === 'below') && coin, state.primaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.primaryText, null), state.secondaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.secondaryText, null), state.tertiaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.tertiaryText, null), state.quaternaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.quaternaryText, null), textPosition === 'before' && coin);
14
+ const { presenceOnly, textPosition } = state;
15
+ (0, _reactutilities.assertSlots)(state);
16
+ const coin = presenceOnly ? state.presence && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.presence, {}) : state.avatar && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.avatar, {});
17
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
18
+ children: [
19
+ (textPosition === 'after' || textPosition === 'below') && coin,
20
+ state.primaryText && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.primaryText, {}),
21
+ state.secondaryText && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.secondaryText, {}),
22
+ state.tertiaryText && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.tertiaryText, {}),
23
+ state.quaternaryText && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.quaternaryText, {}),
24
+ textPosition === 'before' && coin
25
+ ]
26
+ });
16
27
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderPersona.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Persona\n */ export const renderPersona_unstable = (state)=>{\n const { presenceOnly , textPosition } = state;\n assertSlots(state);\n const coin = presenceOnly ? state.presence && /*#__PURE__*/ createElement(state.presence, null) : state.avatar && /*#__PURE__*/ createElement(state.avatar, null);\n return /*#__PURE__*/ createElement(state.root, null, (textPosition === 'after' || textPosition === 'below') && coin, state.primaryText && /*#__PURE__*/ createElement(state.primaryText, null), state.secondaryText && /*#__PURE__*/ createElement(state.secondaryText, null), state.tertiaryText && /*#__PURE__*/ createElement(state.tertiaryText, null), state.quaternaryText && /*#__PURE__*/ createElement(state.quaternaryText, null), textPosition === 'before' && coin);\n};\n"],"names":["renderPersona_unstable","state","presenceOnly","textPosition","assertSlots","coin","presence","createElement","avatar","root","primaryText","secondaryText","tertiaryText","quaternaryText"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,yBAAyB,CAACC,QAAQ;IAC/C,MAAM,EAAEC,aAAY,EAAGC,aAAY,EAAG,GAAGF;IACzCG,IAAAA,2BAAW,EAACH;IACZ,MAAMI,OAAOH,eAAeD,MAAMK,QAAQ,IAAI,WAAW,GAAGC,IAAAA,8BAAa,EAACN,MAAMK,QAAQ,EAAE,IAAI,IAAIL,MAAMO,MAAM,IAAI,WAAW,GAAGD,IAAAA,8BAAa,EAACN,MAAMO,MAAM,EAAE,IAAI,CAAC;IACjK,OAAO,WAAW,GAAGD,IAAAA,8BAAa,EAACN,MAAMQ,IAAI,EAAE,IAAI,EAAE,AAACN,CAAAA,iBAAiB,WAAWA,iBAAiB,OAAM,KAAME,MAAMJ,MAAMS,WAAW,IAAI,WAAW,GAAGH,IAAAA,8BAAa,EAACN,MAAMS,WAAW,EAAE,IAAI,GAAGT,MAAMU,aAAa,IAAI,WAAW,GAAGJ,IAAAA,8BAAa,EAACN,MAAMU,aAAa,EAAE,IAAI,GAAGV,MAAMW,YAAY,IAAI,WAAW,GAAGL,IAAAA,8BAAa,EAACN,MAAMW,YAAY,EAAE,IAAI,GAAGX,MAAMY,cAAc,IAAI,WAAW,GAAGN,IAAAA,8BAAa,EAACN,MAAMY,cAAc,EAAE,IAAI,GAAGV,iBAAiB,YAAYE;AAC9c"}
1
+ {"version":3,"sources":["renderPersona.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Persona\n */ export const renderPersona_unstable = (state)=>{\n const { presenceOnly, textPosition } = state;\n assertSlots(state);\n const coin = presenceOnly ? state.presence && /*#__PURE__*/ _jsx(state.presence, {}) : state.avatar && /*#__PURE__*/ _jsx(state.avatar, {});\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n (textPosition === 'after' || textPosition === 'below') && coin,\n state.primaryText && /*#__PURE__*/ _jsx(state.primaryText, {}),\n state.secondaryText && /*#__PURE__*/ _jsx(state.secondaryText, {}),\n state.tertiaryText && /*#__PURE__*/ _jsx(state.tertiaryText, {}),\n state.quaternaryText && /*#__PURE__*/ _jsx(state.quaternaryText, {}),\n textPosition === 'before' && coin\n ]\n });\n};\n"],"names":["renderPersona_unstable","state","presenceOnly","textPosition","assertSlots","coin","presence","_jsx","avatar","_jsxs","root","children","primaryText","secondaryText","tertiaryText","quaternaryText"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAI7DA;;;eAAAA;;;4BAJ2G;gCAChG;AAGjB,MAAMA,yBAAyB,CAACC;IACvC,MAAM,EAAEC,YAAY,EAAEC,YAAY,EAAE,GAAGF;IACvCG,IAAAA,2BAAW,EAACH;IACZ,MAAMI,OAAOH,eAAeD,MAAMK,QAAQ,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,QAAQ,EAAE,CAAC,KAAKL,MAAMO,MAAM,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,MAAM,EAAE,CAAC;IACzI,OAAO,WAAW,GAAGC,IAAAA,gBAAK,EAACR,MAAMS,IAAI,EAAE;QACnCC,UAAU;YACLR,CAAAA,iBAAiB,WAAWA,iBAAiB,OAAM,KAAME;YAC1DJ,MAAMW,WAAW,IAAI,WAAW,GAAGL,IAAAA,eAAI,EAACN,MAAMW,WAAW,EAAE,CAAC;YAC5DX,MAAMY,aAAa,IAAI,WAAW,GAAGN,IAAAA,eAAI,EAACN,MAAMY,aAAa,EAAE,CAAC;YAChEZ,MAAMa,YAAY,IAAI,WAAW,GAAGP,IAAAA,eAAI,EAACN,MAAMa,YAAY,EAAE,CAAC;YAC9Db,MAAMc,cAAc,IAAI,WAAW,GAAGR,IAAAA,eAAI,EAACN,MAAMc,cAAc,EAAE,CAAC;YAClEZ,iBAAiB,YAAYE;SAChC;IACL;AACJ"}
@@ -4,29 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "usePersona_unstable", {
6
6
  enumerable: true,
7
- get: ()=>usePersona_unstable
7
+ get: function() {
8
+ return usePersona_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactAvatar = require("@fluentui/react-avatar");
12
- const _reactUtilities = require("@fluentui/react-utilities");
13
- const _reactBadge = require("@fluentui/react-badge");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactavatar = require("@fluentui/react-avatar");
14
+ const _reactutilities = require("@fluentui/react-utilities");
15
+ const _reactbadge = require("@fluentui/react-badge");
14
16
  const usePersona_unstable = (props, ref)=>{
15
- const { name , presenceOnly =false , size ='medium' , textAlignment ='start' , textPosition ='after' } = props;
16
- const primaryText = _reactUtilities.slot.optional(props.primaryText, {
17
+ const { name, presenceOnly = false, size = 'medium', textAlignment = 'start', textPosition = 'after' } = props;
18
+ const primaryText = _reactutilities.slot.optional(props.primaryText, {
17
19
  renderByDefault: true,
18
20
  defaultProps: {
19
21
  children: name
20
22
  },
21
23
  elementType: 'span'
22
24
  });
23
- const secondaryText = _reactUtilities.slot.optional(props.secondaryText, {
25
+ const secondaryText = _reactutilities.slot.optional(props.secondaryText, {
24
26
  elementType: 'span'
25
27
  });
26
- const tertiaryText = _reactUtilities.slot.optional(props.tertiaryText, {
28
+ const tertiaryText = _reactutilities.slot.optional(props.tertiaryText, {
27
29
  elementType: 'span'
28
30
  });
29
- const quaternaryText = _reactUtilities.slot.optional(props.quaternaryText, {
31
+ const quaternaryText = _reactutilities.slot.optional(props.quaternaryText, {
30
32
  elementType: 'span'
31
33
  });
32
34
  const numTextLines = [
@@ -43,14 +45,14 @@ const usePersona_unstable = (props, ref)=>{
43
45
  textPosition,
44
46
  components: {
45
47
  root: 'div',
46
- avatar: _reactAvatar.Avatar,
47
- presence: _reactBadge.PresenceBadge,
48
+ avatar: _reactavatar.Avatar,
49
+ presence: _reactbadge.PresenceBadge,
48
50
  primaryText: 'span',
49
51
  secondaryText: 'span',
50
52
  tertiaryText: 'span',
51
53
  quaternaryText: 'span'
52
54
  },
53
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
55
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
54
56
  ...props,
55
57
  ref
56
58
  }, /* excludedPropNames */ [
@@ -58,20 +60,20 @@ const usePersona_unstable = (props, ref)=>{
58
60
  ]), {
59
61
  elementType: 'div'
60
62
  }),
61
- avatar: !presenceOnly ? _reactUtilities.slot.optional(props.avatar, {
63
+ avatar: !presenceOnly ? _reactutilities.slot.optional(props.avatar, {
62
64
  renderByDefault: true,
63
65
  defaultProps: {
64
66
  name,
65
67
  badge: props.presence,
66
68
  size: avatarSizes[size]
67
69
  },
68
- elementType: _reactAvatar.Avatar
70
+ elementType: _reactavatar.Avatar
69
71
  }) : undefined,
70
- presence: presenceOnly ? _reactUtilities.slot.optional(props.presence, {
72
+ presence: presenceOnly ? _reactutilities.slot.optional(props.presence, {
71
73
  defaultProps: {
72
74
  size: presenceSizes[size]
73
75
  },
74
- elementType: _reactBadge.PresenceBadge
76
+ elementType: _reactbadge.PresenceBadge
75
77
  }) : undefined,
76
78
  primaryText,
77
79
  secondaryText,
@@ -1 +1 @@
1
- {"version":3,"sources":["usePersona.js"],"sourcesContent":["import * as React from 'react';\nimport { Avatar } from '@fluentui/react-avatar';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { PresenceBadge } from '@fluentui/react-badge';\n/**\n * Create the state required to render Persona.\n *\n * The returned state can be modified with hooks such as usePersonaStyles_unstable,\n * before being passed to renderPersona_unstable.\n *\n * @param props - props from this instance of Persona\n * @param ref - reference to root HTMLElement of Persona\n */ export const usePersona_unstable = (props, ref)=>{\n const { name , presenceOnly =false , size ='medium' , textAlignment ='start' , textPosition ='after' } = props;\n const primaryText = slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: name\n },\n elementType: 'span'\n });\n const secondaryText = slot.optional(props.secondaryText, {\n elementType: 'span'\n });\n const tertiaryText = slot.optional(props.tertiaryText, {\n elementType: 'span'\n });\n const quaternaryText = slot.optional(props.quaternaryText, {\n elementType: 'span'\n });\n const numTextLines = [\n primaryText,\n secondaryText,\n tertiaryText,\n quaternaryText\n ].filter(Boolean).length;\n return {\n numTextLines,\n presenceOnly,\n size,\n textAlignment,\n textPosition,\n components: {\n root: 'div',\n avatar: Avatar,\n presence: PresenceBadge,\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n quaternaryText: 'span'\n },\n root: slot.always(getNativeElementProps('div', {\n ...props,\n ref\n }, /* excludedPropNames */ [\n 'name'\n ]), {\n elementType: 'div'\n }),\n avatar: !presenceOnly ? slot.optional(props.avatar, {\n renderByDefault: true,\n defaultProps: {\n name,\n badge: props.presence,\n size: avatarSizes[size]\n },\n elementType: Avatar\n }) : undefined,\n presence: presenceOnly ? slot.optional(props.presence, {\n defaultProps: {\n size: presenceSizes[size]\n },\n elementType: PresenceBadge\n }) : undefined,\n primaryText,\n secondaryText,\n tertiaryText,\n quaternaryText\n };\n};\nconst presenceSizes = {\n 'extra-small': 'tiny',\n small: 'extra-small',\n medium: 'small',\n large: 'medium',\n 'extra-large': 'large',\n huge: 'large'\n};\nconst avatarSizes = {\n 'extra-small': 20,\n small: 28,\n medium: 32,\n large: 36,\n 'extra-large': 40,\n huge: 56\n};\n"],"names":["usePersona_unstable","props","ref","name","presenceOnly","size","textAlignment","textPosition","primaryText","slot","optional","renderByDefault","defaultProps","children","elementType","secondaryText","tertiaryText","quaternaryText","numTextLines","filter","Boolean","length","components","root","avatar","Avatar","presence","PresenceBadge","always","getNativeElementProps","badge","avatarSizes","undefined","presenceSizes","small","medium","large","huge"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;6BACA;gCACqB;4BACd;AASnB,MAAMA,sBAAsB,CAACC,OAAOC,MAAM;IACjD,MAAM,EAAEC,KAAI,EAAGC,cAAc,KAAK,CAAA,EAAGC,MAAM,SAAQ,EAAGC,eAAe,QAAO,EAAG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;QACAO;QACAC;QACAC;IACJ;AACJ;AACA,MAAMgB,gBAAgB;IAClB,eAAe;IACfC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACV;AACA,MAAMN,cAAc;IAChB,eAAe;IACfG,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACV"}
1
+ {"version":3,"sources":["usePersona.js"],"sourcesContent":["import * as React from 'react';\nimport { Avatar } from '@fluentui/react-avatar';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { PresenceBadge } from '@fluentui/react-badge';\n/**\n * Create the state required to render Persona.\n *\n * The returned state can be modified with hooks such as usePersonaStyles_unstable,\n * before being passed to renderPersona_unstable.\n *\n * @param props - props from this instance of Persona\n * @param ref - reference to root HTMLElement of Persona\n */ export const usePersona_unstable = (props, ref)=>{\n const { name, presenceOnly = false, size = 'medium', textAlignment = 'start', textPosition = 'after' } = props;\n const primaryText = slot.optional(props.primaryText, {\n renderByDefault: true,\n defaultProps: {\n children: name\n },\n elementType: 'span'\n });\n const secondaryText = slot.optional(props.secondaryText, {\n elementType: 'span'\n });\n const tertiaryText = slot.optional(props.tertiaryText, {\n elementType: 'span'\n });\n const quaternaryText = slot.optional(props.quaternaryText, {\n elementType: 'span'\n });\n const numTextLines = [\n primaryText,\n secondaryText,\n tertiaryText,\n quaternaryText\n ].filter(Boolean).length;\n return {\n numTextLines,\n presenceOnly,\n size,\n textAlignment,\n textPosition,\n components: {\n root: 'div',\n avatar: Avatar,\n presence: PresenceBadge,\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n quaternaryText: 'span'\n },\n root: slot.always(getNativeElementProps('div', {\n ...props,\n ref\n }, /* excludedPropNames */ [\n 'name'\n ]), {\n elementType: 'div'\n }),\n avatar: !presenceOnly ? slot.optional(props.avatar, {\n renderByDefault: true,\n defaultProps: {\n name,\n badge: props.presence,\n size: avatarSizes[size]\n },\n elementType: Avatar\n }) : undefined,\n presence: presenceOnly ? slot.optional(props.presence, {\n defaultProps: {\n size: presenceSizes[size]\n },\n elementType: PresenceBadge\n }) : undefined,\n primaryText,\n secondaryText,\n tertiaryText,\n quaternaryText\n };\n};\nconst presenceSizes = {\n 'extra-small': 'tiny',\n small: 'extra-small',\n medium: 'small',\n large: 'medium',\n 'extra-large': 'large',\n huge: 'large'\n};\nconst avatarSizes = {\n 'extra-small': 20,\n small: 28,\n medium: 32,\n large: 36,\n 'extra-large': 40,\n huge: 56\n};\n"],"names":["usePersona_unstable","props","ref","name","presenceOnly","size","textAlignment","textPosition","primaryText","slot","optional","renderByDefault","defaultProps","children","elementType","secondaryText","tertiaryText","quaternaryText","numTextLines","filter","Boolean","length","components","root","avatar","Avatar","presence","PresenceBadge","always","getNativeElementProps","badge","avatarSizes","undefined","presenceSizes","small","medium","large","huge"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;6BACA;gCACqB;4BACd;AASnB,MAAMA,sBAAsB,CAACC,OAAOC;IAC3C,MAAM,EAAEC,IAAI,EAAEC,eAAe,KAAK,EAAEC,OAAO,QAAQ,EAAEC,gBAAgB,OAAO,EAAEC,eAAe,OAAO,EAAE,GAAGN;IACzG,MAAMO,cAAcC,oBAAI,CAACC,QAAQ,CAACT,MAAMO,WAAW,EAAE;QACjDG,iBAAiB;QACjBC,cAAc;YACVC,UAAUV;QACd;QACAW,aAAa;IACjB;IACA,MAAMC,gBAAgBN,oBAAI,CAACC,QAAQ,CAACT,MAAMc,aAAa,EAAE;QACrDD,aAAa;IACjB;IACA,MAAME,eAAeP,oBAAI,CAACC,QAAQ,CAACT,MAAMe,YAAY,EAAE;QACnDF,aAAa;IACjB;IACA,MAAMG,iBAAiBR,oBAAI,CAACC,QAAQ,CAACT,MAAMgB,cAAc,EAAE;QACvDH,aAAa;IACjB;IACA,MAAMI,eAAe;QACjBV;QACAO;QACAC;QACAC;KACH,CAACE,MAAM,CAACC,SAASC,MAAM;IACxB,OAAO;QACHH;QACAd;QACAC;QACAC;QACAC;QACAe,YAAY;YACRC,MAAM;YACNC,QAAQC,mBAAM;YACdC,UAAUC,yBAAa;YACvBnB,aAAa;YACbO,eAAe;YACfC,cAAc;YACdC,gBAAgB;QACpB;QACAM,MAAMd,oBAAI,CAACmB,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3C,GAAG5B,KAAK;YACRC;QACJ,GAAG,qBAAqB,GAAG;YACvB;SACH,GAAG;YACAY,aAAa;QACjB;QACAU,QAAQ,CAACpB,eAAeK,oBAAI,CAACC,QAAQ,CAACT,MAAMuB,MAAM,EAAE;YAChDb,iBAAiB;YACjBC,cAAc;gBACVT;gBACA2B,OAAO7B,MAAMyB,QAAQ;gBACrBrB,MAAM0B,WAAW,CAAC1B,KAAK;YAC3B;YACAS,aAAaW,mBAAM;QACvB,KAAKO;QACLN,UAAUtB,eAAeK,oBAAI,CAACC,QAAQ,CAACT,MAAMyB,QAAQ,EAAE;YACnDd,cAAc;gBACVP,MAAM4B,aAAa,CAAC5B,KAAK;YAC7B;YACAS,aAAaa,yBAAa;QAC9B,KAAKK;QACLxB;QACAO;QACAC;QACAC;IACJ;AACJ;AACA,MAAMgB,gBAAgB;IAClB,eAAe;IACfC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACV;AACA,MAAMN,cAAc;IAChB,eAAe;IACfG,OAAO;IACPC,QAAQ;IACRC,OAAO;IACP,eAAe;IACfC,MAAM;AACV"}
@@ -9,8 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- personaClassNames: ()=>personaClassNames,
13
- usePersonaStyles_unstable: ()=>usePersonaStyles_unstable
12
+ personaClassNames: function() {
13
+ return personaClassNames;
14
+ },
15
+ usePersonaStyles_unstable: function() {
16
+ return usePersonaStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const personaClassNames = {
@@ -23,12 +27,12 @@ const personaClassNames = {
23
27
  quaternaryText: 'fui-Persona__quaternaryText'
24
28
  };
25
29
  const avatarSpacing = `--fui-Persona__avatar--spacing`;
26
- const useRootClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rlroi9i", null, [
30
+ const useRootClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rlroi9i", null, [
27
31
  ".rlroi9i{display:inline-grid;grid-auto-rows:max-content;grid-auto-flow:column;justify-items:start;grid-template-columns:max-content [middle] auto;}"
28
32
  ]);
29
33
  /**
30
34
  * Styles for the root slot
31
- */ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
35
+ */ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
32
36
  beforeAfterCenter: {
33
37
  wkccdc: "f1iantul"
34
38
  },
@@ -101,7 +105,7 @@ const useRootClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rlroi9i", n
101
105
  ".f1tuwaia{grid-row-start:quaternary;}"
102
106
  ]
103
107
  });
104
- const useAvatarSpacingStyles = /*#__PURE__*/ (0, _react["__styles"])({
108
+ const useAvatarSpacingStyles = /*#__PURE__*/ (0, _react.__styles)({
105
109
  "extra-small": {
106
110
  Bs1gm4r: "f1e48tse"
107
111
  },
@@ -146,7 +150,7 @@ const useAvatarSpacingStyles = /*#__PURE__*/ (0, _react["__styles"])({
146
150
  ".fbo7acy{margin-bottom:var(--fui-Persona__avatar--spacing);}"
147
151
  ]
148
152
  });
149
- const usePresenceSpacingStyles = /*#__PURE__*/ (0, _react["__styles"])({
153
+ const usePresenceSpacingStyles = /*#__PURE__*/ (0, _react.__styles)({
150
154
  small: {
151
155
  Bs1gm4r: "f1e48tse"
152
156
  }
@@ -156,10 +160,10 @@ const usePresenceSpacingStyles = /*#__PURE__*/ (0, _react["__styles"])({
156
160
  ]
157
161
  });
158
162
  const usePersonaStyles_unstable = (state)=>{
159
- const { presenceOnly , size , textAlignment , textPosition } = state;
163
+ const { presenceOnly, size, textAlignment, textPosition } = state;
160
164
  const alignToPrimary = presenceOnly && textAlignment === 'start' && size !== 'extra-large' && size !== 'huge';
161
165
  const alignBeforeAfterCenter = textPosition !== 'below' && textAlignment === 'center';
162
- const { primaryTextClassName , optionalTextClassName } = useTextClassNames(state, alignToPrimary);
166
+ const { primaryTextClassName, optionalTextClassName } = useTextClassNames(state, alignToPrimary);
163
167
  const rootClassName = useRootClassName();
164
168
  const styles = useStyles();
165
169
  const avatarSpacingStyles = useAvatarSpacingStyles();
@@ -188,13 +192,13 @@ const usePersonaStyles_unstable = (state)=>{
188
192
  }
189
193
  return state;
190
194
  };
191
- const usePrimaryTextBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rvj41k9", null, [
195
+ const usePrimaryTextBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rvj41k9", null, [
192
196
  ".rvj41k9{display:block;color:var(--colorNeutralForeground1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"
193
197
  ]);
194
- const useOptionalTextBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rp1pf9e", null, [
198
+ const useOptionalTextBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rp1pf9e", null, [
195
199
  ".rp1pf9e{display:block;color:var(--colorNeutralForeground2);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);}"
196
200
  ]);
197
- const useTextStyles = /*#__PURE__*/ (0, _react["__styles"])({
201
+ const useTextStyles = /*#__PURE__*/ (0, _react.__styles)({
198
202
  beforeAlignToPrimary: {
199
203
  Bw0ie65: "f1warjpf"
200
204
  },
@@ -235,7 +239,7 @@ const useTextStyles = /*#__PURE__*/ (0, _react["__styles"])({
235
239
  ]
236
240
  });
237
241
  const useTextClassNames = (state, alignToPrimary)=>{
238
- const { presenceOnly , size , textPosition } = state;
242
+ const { presenceOnly, size, textPosition } = state;
239
243
  const primaryTextBaseClassName = usePrimaryTextBaseClassName();
240
244
  const optionalTextBaseClassName = useOptionalTextBaseClassName();
241
245
  const textStyles = useTextStyles();
@@ -1 +1 @@
1
- {"version":3,"sources":["usePersonaStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const personaClassNames = {\n root: 'fui-Persona',\n avatar: 'fui-Persona__avatar',\n presence: 'fui-Persona__presence',\n primaryText: 'fui-Persona__primaryText',\n secondaryText: 'fui-Persona__secondaryText',\n tertiaryText: 'fui-Persona__tertiaryText',\n quaternaryText: 'fui-Persona__quaternaryText'\n};\nconst avatarSpacing = `--fui-Persona__avatar--spacing`;\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"rlroi9i\", null, [\".rlroi9i{display:inline-grid;grid-auto-rows:max-content;grid-auto-flow:column;justify-items:start;grid-template-columns:max-content [middle] auto;}\"]);\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n beforeAfterCenter: {\n wkccdc: \"f1iantul\"\n },\n after: {},\n before: {\n B7hvi0a: \"f1tll2w5\",\n Budl1dq: \"ffvkwdr\"\n },\n below: {\n Bxotwcr: \"f1nkeedh\",\n B7hvi0a: \"f1oiokrs\",\n Budl1dq: \"f1emgwh2\"\n },\n media: {\n Ijaq50: \"f1hek2iy\"\n },\n mediaBeforeAfterCenter: {\n Ijaq50: \"fa4dipu\"\n },\n start: {\n qb2dma: \"f9h729m\"\n },\n center: {\n qb2dma: \"f7nlbp4\"\n },\n afterAlignToPrimary: {\n qb2dma: \"f7nlbp4\",\n Ijaq50: \"f1rnkkuc\",\n Bw0ie65: \"f1warjpf\"\n },\n beforeAlignToPrimary: {\n qb2dma: \"f7nlbp4\",\n Ijaq50: \"f1rnkkuc\",\n Br312pm: \"fwu52yu\"\n },\n secondLineSpacing: {\n B6of3ja: \"f1ryq6si\"\n },\n primary: {\n Ijaq50: \"f1q3ipgb\"\n },\n secondary: {\n Ijaq50: \"f3drtdk\"\n },\n tertiary: {\n Ijaq50: \"fa1o6s1\"\n },\n quaternary: {\n Ijaq50: \"f1tuwaia\"\n }\n}, {\n d: [\".f1iantul{grid-template-rows:1fr [primary] max-content [secondary] max-content [tertiary] max-content [quaternary] max-content 1fr;}\", \".f1tll2w5{justify-items:end;}\", \".ffvkwdr{grid-template-columns:auto [middle] max-content;}\", \".f1nkeedh{grid-auto-flow:unset;}\", \".f1oiokrs{justify-items:center;}\", \".f1emgwh2{grid-template-columns:unset;}\", \".f1hek2iy{grid-row-start:span 5;}\", \".fa4dipu{grid-row-start:span 6;}\", \".f9h729m{align-self:start;}\", \".f7nlbp4{align-self:center;}\", \".f1rnkkuc{grid-row-start:unset;}\", \".f1warjpf{grid-column-end:middle;}\", \".fwu52yu{grid-column-start:middle;}\", \".f1ryq6si{margin-top:-2px;}\", \".f1q3ipgb{grid-row-start:primary;}\", \".f3drtdk{grid-row-start:secondary;}\", \".fa1o6s1{grid-row-start:tertiary;}\", \".f1tuwaia{grid-row-start:quaternary;}\"]\n});\nconst useAvatarSpacingStyles = /*#__PURE__*/__styles({\n \"extra-small\": {\n Bs1gm4r: \"f1e48tse\"\n },\n small: {\n Bs1gm4r: \"f18q9vkd\"\n },\n medium: {\n Bs1gm4r: \"f18q9vkd\"\n },\n large: {\n Bs1gm4r: \"fx34bi6\"\n },\n \"extra-large\": {\n Bs1gm4r: \"fx34bi6\"\n },\n huge: {\n Bs1gm4r: \"f1o96qtm\"\n },\n after: {\n t21cq0: [\"f103ycu4\", \"f1tao51\"]\n },\n below: {\n jrapky: \"fbo7acy\"\n },\n before: {\n Frg6f3: [\"f1tao51\", \"f103ycu4\"]\n }\n}, {\n d: [\".f1e48tse{--fui-Persona__avatar--spacing:var(--spacingHorizontalSNudge);}\", \".f18q9vkd{--fui-Persona__avatar--spacing:var(--spacingHorizontalS);}\", \".fx34bi6{--fui-Persona__avatar--spacing:var(--spacingHorizontalMNudge);}\", \".f1o96qtm{--fui-Persona__avatar--spacing:var(--spacingHorizontalM);}\", \".f103ycu4{margin-right:var(--fui-Persona__avatar--spacing);}\", \".f1tao51{margin-left:var(--fui-Persona__avatar--spacing);}\", \".fbo7acy{margin-bottom:var(--fui-Persona__avatar--spacing);}\"]\n});\nconst usePresenceSpacingStyles = /*#__PURE__*/__styles({\n small: {\n Bs1gm4r: \"f1e48tse\"\n }\n}, {\n d: [\".f1e48tse{--fui-Persona__avatar--spacing:var(--spacingHorizontalSNudge);}\"]\n});\n/**\n * Apply styling to the Persona slots based on the state\n */\nexport const usePersonaStyles_unstable = state => {\n const {\n presenceOnly,\n size,\n textAlignment,\n textPosition\n } = state;\n const alignToPrimary = presenceOnly && textAlignment === 'start' && size !== 'extra-large' && size !== 'huge';\n const alignBeforeAfterCenter = textPosition !== 'below' && textAlignment === 'center';\n const {\n primaryTextClassName,\n optionalTextClassName\n } = useTextClassNames(state, alignToPrimary);\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const avatarSpacingStyles = useAvatarSpacingStyles();\n const presenceSpacingStyles = {\n ...avatarSpacingStyles,\n ...usePresenceSpacingStyles()\n };\n state.root.className = mergeClasses(personaClassNames.root, rootClassName, alignBeforeAfterCenter && styles.beforeAfterCenter, styles[textPosition], state.root.className);\n if (state.avatar) {\n state.avatar.className = mergeClasses(personaClassNames.avatar, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], avatarSpacingStyles[size], avatarSpacingStyles[textPosition], state.avatar.className);\n }\n if (state.presence) {\n state.presence.className = mergeClasses(personaClassNames.presence, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], presenceSpacingStyles[size], presenceSpacingStyles[textPosition], textPosition === 'after' && alignToPrimary && styles.afterAlignToPrimary, textPosition === 'before' && alignToPrimary && styles.beforeAlignToPrimary, state.presence.className);\n }\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(personaClassNames.primaryText, alignBeforeAfterCenter && styles.primary, primaryTextClassName, state.primaryText.className);\n }\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(personaClassNames.secondaryText, alignBeforeAfterCenter && styles.secondary, optionalTextClassName, styles.secondLineSpacing, state.secondaryText.className);\n }\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(personaClassNames.tertiaryText, alignBeforeAfterCenter && styles.tertiary, optionalTextClassName, state.tertiaryText.className);\n }\n if (state.quaternaryText) {\n state.quaternaryText.className = mergeClasses(personaClassNames.quaternaryText, alignBeforeAfterCenter && styles.quaternary, optionalTextClassName, state.quaternaryText.className);\n }\n return state;\n};\nconst usePrimaryTextBaseClassName = /*#__PURE__*/__resetStyles(\"rvj41k9\", null, [\".rvj41k9{display:block;color:var(--colorNeutralForeground1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\nconst useOptionalTextBaseClassName = /*#__PURE__*/__resetStyles(\"rp1pf9e\", null, [\".rp1pf9e{display:block;color:var(--colorNeutralForeground2);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);}\"]);\nconst useTextStyles = /*#__PURE__*/__styles({\n beforeAlignToPrimary: {\n Bw0ie65: \"f1warjpf\"\n },\n afterAlignToPrimary: {\n Br312pm: \"fwu52yu\"\n },\n body1: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n caption1: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fy9rknc\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"fwrc4pm\"\n },\n subtitle2: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n }\n}, {\n d: [\".f1warjpf{grid-column-end:middle;}\", \".fwu52yu{grid-column-start:middle;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\"]\n});\nconst useTextClassNames = (state, alignToPrimary) => {\n const {\n presenceOnly,\n size,\n textPosition\n } = state;\n const primaryTextBaseClassName = usePrimaryTextBaseClassName();\n const optionalTextBaseClassName = useOptionalTextBaseClassName();\n const textStyles = useTextStyles();\n let primaryTextSize;\n let alignToPrimaryClassName;\n if (presenceOnly) {\n if (size === 'extra-small') {\n primaryTextSize = state.numTextLines <= 1 && textStyles.caption1;\n } else if (size === 'extra-large' || size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n }\n if (alignToPrimary) {\n if (textPosition === 'before') {\n alignToPrimaryClassName = textStyles.beforeAlignToPrimary;\n } else if (textPosition === 'after') {\n alignToPrimaryClassName = textStyles.afterAlignToPrimary;\n }\n }\n } else {\n if (size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n } else if (size === 'extra-large') {\n primaryTextSize = textStyles.subtitle2;\n }\n }\n return {\n primaryTextClassName: mergeClasses(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),\n optionalTextClassName: mergeClasses(optionalTextBaseClassName, !presenceOnly && size === 'huge' && textStyles.body1, alignToPrimaryClassName)\n };\n};\n//# sourceMappingURL=usePersonaStyles.styles.js.map"],"names":["personaClassNames","usePersonaStyles_unstable","root","avatar","presence","primaryText","secondaryText","tertiaryText","quaternaryText","avatarSpacing","useRootClassName","__resetStyles","useStyles","__styles","beforeAfterCenter","wkccdc","after","before","B7hvi0a","Budl1dq","below","Bxotwcr","media","Ijaq50","mediaBeforeAfterCenter","start","qb2dma","center","afterAlignToPrimary","Bw0ie65","beforeAlignToPrimary","Br312pm","secondLineSpacing","B6of3ja","primary","secondary","tertiary","quaternary","d","useAvatarSpacingStyles","Bs1gm4r","small","medium","large","huge","t21cq0","jrapky","Frg6f3","usePresenceSpacingStyles","state","presenceOnly","size","textAlignment","textPosition","alignToPrimary","alignBeforeAfterCenter","primaryTextClassName","optionalTextClassName","useTextClassNames","rootClassName","styles","avatarSpacingStyles","presenceSpacingStyles","className","mergeClasses","usePrimaryTextBaseClassName","useOptionalTextBaseClassName","useTextStyles","body1","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","caption1","subtitle2","primaryTextBaseClassName","optionalTextBaseClassName","textStyles","primaryTextSize","alignToPrimaryClassName","numTextLines"],"mappings":";;;;;;;;;;;IAEaA,iBAAiB,MAAjBA;IA6GAC,yBAAyB,MAAzBA;;uBA/GyC;AAE/C,MAAMD,oBAAoB;IAC/BE,MAAM;IACNC,QAAQ;IACRC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,cAAc;IACdC,gBAAgB;AAClB;AACA,MAAMC,gBAAgB,CAAC,8BAA8B,CAAC;AACtD,MAAMC,mBAAmB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,WAAW,IAAI,EAAE;IAAC;CAAsJ;AAC5N;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,mBAAmB;QACjBC,QAAQ;IACV;IACAC,OAAO,CAAC;IACRC,QAAQ;QACNC,SAAS;QACTC,SAAS;IACX;IACAC,OAAO;QACLC,SAAS;QACTH,SAAS;QACTC,SAAS;IACX;IACAG,OAAO;QACLC,QAAQ;IACV;IACAC,wBAAwB;QACtBD,QAAQ;IACV;IACAE,OAAO;QACLC,QAAQ;IACV;IACAC,QAAQ;QACND,QAAQ;IACV;IACAE,qBAAqB;QACnBF,QAAQ;QACRH,QAAQ;QACRM,SAAS;IACX;IACAC,sBAAsB;QACpBJ,QAAQ;QACRH,QAAQ;QACRQ,SAAS;IACX;IACA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C;QAAmD;QAAoD;QAA+C;QAAmD;QAA+C;QAAoD;KAAkD;AAChhB;AACA,MAAMoB,oBAAoB,CAACT,OAAOK,iBAAmB;IACnD,MAAM,EACJJ,aAAY,EACZC,KAAI,EACJE,aAAY,EACb,GAAGJ;IACJ,MAAM0B,2BAA2BV;IACjC,MAAMW,4BAA4BV;IAClC,MAAMW,aAAaV;IACnB,IAAIW;IACJ,IAAIC;IACJ,IAAI7B,cAAc;QAChB,IAAIC,SAAS,eAAe;YAC1B2B,kBAAkB7B,MAAM+B,YAAY,IAAI,KAAKH,WAAWJ,QAAQ;QAClE,OAAO,IAAItB,SAAS,iBAAiBA,SAAS,QAAQ;YACpD2B,kBAAkBD,WAAWH,SAAS;QACxC,CAAC;QACD,IAAIpB,gBAAgB;YAClB,IAAID,iBAAiB,UAAU;gBAC7B0B,0BAA0BF,WAAW/C,oBAAoB;YAC3D,OAAO,IAAIuB,iBAAiB,SAAS;gBACnC0B,0BAA0BF,WAAWjD,mBAAmB;YAC1D,CAAC;QACH,CAAC;IACH,OAAO;QACL,IAAIuB,SAAS,QAAQ;YACnB2B,kBAAkBD,WAAWH,SAAS;QACxC,OAAO,IAAIvB,SAAS,eAAe;YACjC2B,kBAAkBD,WAAWH,SAAS;QACxC,CAAC;IACH,CAAC;IACD,OAAO;QACLlB,sBAAsBQ,IAAAA,mBAAY,EAACW,0BAA0BG,iBAAiBC;QAC9EtB,uBAAuBO,IAAAA,mBAAY,EAACY,2BAA2B,CAAC1B,gBAAgBC,SAAS,UAAU0B,WAAWT,KAAK,EAAEW;IACvH;AACF,GACA,mDAAmD"}
1
+ {"version":3,"sources":["usePersonaStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const personaClassNames = {\n root: 'fui-Persona',\n avatar: 'fui-Persona__avatar',\n presence: 'fui-Persona__presence',\n primaryText: 'fui-Persona__primaryText',\n secondaryText: 'fui-Persona__secondaryText',\n tertiaryText: 'fui-Persona__tertiaryText',\n quaternaryText: 'fui-Persona__quaternaryText'\n};\nconst avatarSpacing = `--fui-Persona__avatar--spacing`;\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"rlroi9i\", null, [\".rlroi9i{display:inline-grid;grid-auto-rows:max-content;grid-auto-flow:column;justify-items:start;grid-template-columns:max-content [middle] auto;}\"]);\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n beforeAfterCenter: {\n wkccdc: \"f1iantul\"\n },\n after: {},\n before: {\n B7hvi0a: \"f1tll2w5\",\n Budl1dq: \"ffvkwdr\"\n },\n below: {\n Bxotwcr: \"f1nkeedh\",\n B7hvi0a: \"f1oiokrs\",\n Budl1dq: \"f1emgwh2\"\n },\n media: {\n Ijaq50: \"f1hek2iy\"\n },\n mediaBeforeAfterCenter: {\n Ijaq50: \"fa4dipu\"\n },\n start: {\n qb2dma: \"f9h729m\"\n },\n center: {\n qb2dma: \"f7nlbp4\"\n },\n afterAlignToPrimary: {\n qb2dma: \"f7nlbp4\",\n Ijaq50: \"f1rnkkuc\",\n Bw0ie65: \"f1warjpf\"\n },\n beforeAlignToPrimary: {\n qb2dma: \"f7nlbp4\",\n Ijaq50: \"f1rnkkuc\",\n Br312pm: \"fwu52yu\"\n },\n secondLineSpacing: {\n B6of3ja: \"f1ryq6si\"\n },\n primary: {\n Ijaq50: \"f1q3ipgb\"\n },\n secondary: {\n Ijaq50: \"f3drtdk\"\n },\n tertiary: {\n Ijaq50: \"fa1o6s1\"\n },\n quaternary: {\n Ijaq50: \"f1tuwaia\"\n }\n}, {\n d: [\".f1iantul{grid-template-rows:1fr [primary] max-content [secondary] max-content [tertiary] max-content [quaternary] max-content 1fr;}\", \".f1tll2w5{justify-items:end;}\", \".ffvkwdr{grid-template-columns:auto [middle] max-content;}\", \".f1nkeedh{grid-auto-flow:unset;}\", \".f1oiokrs{justify-items:center;}\", \".f1emgwh2{grid-template-columns:unset;}\", \".f1hek2iy{grid-row-start:span 5;}\", \".fa4dipu{grid-row-start:span 6;}\", \".f9h729m{align-self:start;}\", \".f7nlbp4{align-self:center;}\", \".f1rnkkuc{grid-row-start:unset;}\", \".f1warjpf{grid-column-end:middle;}\", \".fwu52yu{grid-column-start:middle;}\", \".f1ryq6si{margin-top:-2px;}\", \".f1q3ipgb{grid-row-start:primary;}\", \".f3drtdk{grid-row-start:secondary;}\", \".fa1o6s1{grid-row-start:tertiary;}\", \".f1tuwaia{grid-row-start:quaternary;}\"]\n});\nconst useAvatarSpacingStyles = /*#__PURE__*/__styles({\n \"extra-small\": {\n Bs1gm4r: \"f1e48tse\"\n },\n small: {\n Bs1gm4r: \"f18q9vkd\"\n },\n medium: {\n Bs1gm4r: \"f18q9vkd\"\n },\n large: {\n Bs1gm4r: \"fx34bi6\"\n },\n \"extra-large\": {\n Bs1gm4r: \"fx34bi6\"\n },\n huge: {\n Bs1gm4r: \"f1o96qtm\"\n },\n after: {\n t21cq0: [\"f103ycu4\", \"f1tao51\"]\n },\n below: {\n jrapky: \"fbo7acy\"\n },\n before: {\n Frg6f3: [\"f1tao51\", \"f103ycu4\"]\n }\n}, {\n d: [\".f1e48tse{--fui-Persona__avatar--spacing:var(--spacingHorizontalSNudge);}\", \".f18q9vkd{--fui-Persona__avatar--spacing:var(--spacingHorizontalS);}\", \".fx34bi6{--fui-Persona__avatar--spacing:var(--spacingHorizontalMNudge);}\", \".f1o96qtm{--fui-Persona__avatar--spacing:var(--spacingHorizontalM);}\", \".f103ycu4{margin-right:var(--fui-Persona__avatar--spacing);}\", \".f1tao51{margin-left:var(--fui-Persona__avatar--spacing);}\", \".fbo7acy{margin-bottom:var(--fui-Persona__avatar--spacing);}\"]\n});\nconst usePresenceSpacingStyles = /*#__PURE__*/__styles({\n small: {\n Bs1gm4r: \"f1e48tse\"\n }\n}, {\n d: [\".f1e48tse{--fui-Persona__avatar--spacing:var(--spacingHorizontalSNudge);}\"]\n});\n/**\n * Apply styling to the Persona slots based on the state\n */\nexport const usePersonaStyles_unstable = state => {\n const {\n presenceOnly,\n size,\n textAlignment,\n textPosition\n } = state;\n const alignToPrimary = presenceOnly && textAlignment === 'start' && size !== 'extra-large' && size !== 'huge';\n const alignBeforeAfterCenter = textPosition !== 'below' && textAlignment === 'center';\n const {\n primaryTextClassName,\n optionalTextClassName\n } = useTextClassNames(state, alignToPrimary);\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const avatarSpacingStyles = useAvatarSpacingStyles();\n const presenceSpacingStyles = {\n ...avatarSpacingStyles,\n ...usePresenceSpacingStyles()\n };\n state.root.className = mergeClasses(personaClassNames.root, rootClassName, alignBeforeAfterCenter && styles.beforeAfterCenter, styles[textPosition], state.root.className);\n if (state.avatar) {\n state.avatar.className = mergeClasses(personaClassNames.avatar, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], avatarSpacingStyles[size], avatarSpacingStyles[textPosition], state.avatar.className);\n }\n if (state.presence) {\n state.presence.className = mergeClasses(personaClassNames.presence, textPosition !== 'below' && styles.media, alignBeforeAfterCenter && styles.mediaBeforeAfterCenter, styles[textAlignment], presenceSpacingStyles[size], presenceSpacingStyles[textPosition], textPosition === 'after' && alignToPrimary && styles.afterAlignToPrimary, textPosition === 'before' && alignToPrimary && styles.beforeAlignToPrimary, state.presence.className);\n }\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(personaClassNames.primaryText, alignBeforeAfterCenter && styles.primary, primaryTextClassName, state.primaryText.className);\n }\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(personaClassNames.secondaryText, alignBeforeAfterCenter && styles.secondary, optionalTextClassName, styles.secondLineSpacing, state.secondaryText.className);\n }\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(personaClassNames.tertiaryText, alignBeforeAfterCenter && styles.tertiary, optionalTextClassName, state.tertiaryText.className);\n }\n if (state.quaternaryText) {\n state.quaternaryText.className = mergeClasses(personaClassNames.quaternaryText, alignBeforeAfterCenter && styles.quaternary, optionalTextClassName, state.quaternaryText.className);\n }\n return state;\n};\nconst usePrimaryTextBaseClassName = /*#__PURE__*/__resetStyles(\"rvj41k9\", null, [\".rvj41k9{display:block;color:var(--colorNeutralForeground1);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}\"]);\nconst useOptionalTextBaseClassName = /*#__PURE__*/__resetStyles(\"rp1pf9e\", null, [\".rp1pf9e{display:block;color:var(--colorNeutralForeground2);font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);}\"]);\nconst useTextStyles = /*#__PURE__*/__styles({\n beforeAlignToPrimary: {\n Bw0ie65: \"f1warjpf\"\n },\n afterAlignToPrimary: {\n Br312pm: \"fwu52yu\"\n },\n body1: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\"\n },\n caption1: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fy9rknc\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"fwrc4pm\"\n },\n subtitle2: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"fl43uef\",\n Bg96gwp: \"faaz57k\"\n }\n}, {\n d: [\".f1warjpf{grid-column-end:middle;}\", \".fwu52yu{grid-column-start:middle;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".fl43uef{font-weight:var(--fontWeightSemibold);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\"]\n});\nconst useTextClassNames = (state, alignToPrimary) => {\n const {\n presenceOnly,\n size,\n textPosition\n } = state;\n const primaryTextBaseClassName = usePrimaryTextBaseClassName();\n const optionalTextBaseClassName = useOptionalTextBaseClassName();\n const textStyles = useTextStyles();\n let primaryTextSize;\n let alignToPrimaryClassName;\n if (presenceOnly) {\n if (size === 'extra-small') {\n primaryTextSize = state.numTextLines <= 1 && textStyles.caption1;\n } else if (size === 'extra-large' || size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n }\n if (alignToPrimary) {\n if (textPosition === 'before') {\n alignToPrimaryClassName = textStyles.beforeAlignToPrimary;\n } else if (textPosition === 'after') {\n alignToPrimaryClassName = textStyles.afterAlignToPrimary;\n }\n }\n } else {\n if (size === 'huge') {\n primaryTextSize = textStyles.subtitle2;\n } else if (size === 'extra-large') {\n primaryTextSize = textStyles.subtitle2;\n }\n }\n return {\n primaryTextClassName: mergeClasses(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),\n optionalTextClassName: mergeClasses(optionalTextBaseClassName, !presenceOnly && size === 'huge' && textStyles.body1, alignToPrimaryClassName)\n };\n};\n//# sourceMappingURL=usePersonaStyles.styles.js.map"],"names":["personaClassNames","usePersonaStyles_unstable","root","avatar","presence","primaryText","secondaryText","tertiaryText","quaternaryText","avatarSpacing","useRootClassName","__resetStyles","useStyles","__styles","beforeAfterCenter","wkccdc","after","before","B7hvi0a","Budl1dq","below","Bxotwcr","media","Ijaq50","mediaBeforeAfterCenter","start","qb2dma","center","afterAlignToPrimary","Bw0ie65","beforeAlignToPrimary","Br312pm","secondLineSpacing","B6of3ja","primary","secondary","tertiary","quaternary","d","useAvatarSpacingStyles","Bs1gm4r","small","medium","large","huge","t21cq0","jrapky","Frg6f3","usePresenceSpacingStyles","state","presenceOnly","size","textAlignment","textPosition","alignToPrimary","alignBeforeAfterCenter","primaryTextClassName","optionalTextClassName","useTextClassNames","rootClassName","styles","avatarSpacingStyles","presenceSpacingStyles","className","mergeClasses","usePrimaryTextBaseClassName","useOptionalTextBaseClassName","useTextStyles","body1","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","caption1","subtitle2","primaryTextBaseClassName","optionalTextBaseClassName","textStyles","primaryTextSize","alignToPrimaryClassName","numTextLines"],"mappings":";;;;;;;;;;;IAEaA,iBAAiB;eAAjBA;;IA6GAC,yBAAyB;eAAzBA;;;uBA/GyC;AAE/C,MAAMD,oBAAoB;IAC/BE,MAAM;IACNC,QAAQ;IACRC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,cAAc;IACdC,gBAAgB;AAClB;AACA,MAAMC,gBAAgB,CAAC,8BAA8B,CAAC;AACtD,MAAMC,mBAAmB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,MAAM;IAAC;CAAsJ;AAC5N;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCC,mBAAmB;QACjBC,QAAQ;IACV;IACAC,OAAO,CAAC;IACRC,QAAQ;QACNC,SAAS;QACTC,SAAS;IACX;IACAC,OAAO;QACLC,SAAS;QACTH,SAAS;QACTC,SAAS;IACX;IACAG,OAAO;QACLC,QAAQ;IACV;IACAC,wBAAwB;QACtBD,QAAQ;IACV;IACAE,OAAO;QACLC,QAAQ;IACV;IACAC,QAAQ;QACND,QAAQ;IACV;IACAE,qBAAqB;QACnBF,QAAQ;QACRH,QAAQ;QACRM,SAAS;IACX;IACAC,sBAAsB;QACpBJ,QAAQ;QACRH,QAAQ;QACRQ,SAAS;IACX;IACAC,mBAAmB;QACjBC,SAAS;IACX;IACAC,SAAS;QACPX,QAAQ;IACV;IACAY,WAAW;QACTZ,QAAQ;IACV;IACAa,UAAU;QACRb,QAAQ;IACV;IACAc,YAAY;QACVd,QAAQ;IACV;AACF,GAAG;IACDe,GAAG;QAAC;QAAwI;QAAiC;QAA8D;QAAoC;QAAoC;QAA2C;QAAqC;QAAoC;QAA+B;QAAgC;QAAoC;QAAsC;QAAuC;QAA+B;QAAsC;QAAuC;QAAsC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;QAClE,OAAO,IAAItB,SAAS,iBAAiBA,SAAS,QAAQ;YACpD2B,kBAAkBD,WAAWH,SAAS;QACxC;QACA,IAAIpB,gBAAgB;YAClB,IAAID,iBAAiB,UAAU;gBAC7B0B,0BAA0BF,WAAW/C,oBAAoB;YAC3D,OAAO,IAAIuB,iBAAiB,SAAS;gBACnC0B,0BAA0BF,WAAWjD,mBAAmB;YAC1D;QACF;IACF,OAAO;QACL,IAAIuB,SAAS,QAAQ;YACnB2B,kBAAkBD,WAAWH,SAAS;QACxC,OAAO,IAAIvB,SAAS,eAAe;YACjC2B,kBAAkBD,WAAWH,SAAS;QACxC;IACF;IACA,OAAO;QACLlB,sBAAsBQ,IAAAA,mBAAY,EAACW,0BAA0BG,iBAAiBC;QAC9EtB,uBAAuBO,IAAAA,mBAAY,EAACY,2BAA2B,CAAC1B,gBAAgBC,SAAS,UAAU0B,WAAWT,KAAK,EAAEW;IACvH;AACF,GACA,mDAAmD"}
@@ -9,10 +9,20 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Persona: ()=>_persona.Persona,
13
- personaClassNames: ()=>_persona.personaClassNames,
14
- renderPersona_unstable: ()=>_persona.renderPersona_unstable,
15
- usePersonaStyles_unstable: ()=>_persona.usePersonaStyles_unstable,
16
- usePersona_unstable: ()=>_persona.usePersona_unstable
12
+ Persona: function() {
13
+ return _Persona.Persona;
14
+ },
15
+ personaClassNames: function() {
16
+ return _Persona.personaClassNames;
17
+ },
18
+ renderPersona_unstable: function() {
19
+ return _Persona.renderPersona_unstable;
20
+ },
21
+ usePersonaStyles_unstable: function() {
22
+ return _Persona.usePersonaStyles_unstable;
23
+ },
24
+ usePersona_unstable: function() {
25
+ return _Persona.usePersona_unstable;
26
+ }
17
27
  });
18
- const _persona = require("./Persona");
28
+ const _Persona = require("./Persona");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { Persona, personaClassNames, renderPersona_unstable, usePersonaStyles_unstable, usePersona_unstable } from './Persona';\n"],"names":["Persona","personaClassNames","renderPersona_unstable","usePersonaStyles_unstable","usePersona_unstable"],"mappings":";;;;;;;;;;;IAASA,OAAO,MAAPA,gBAAO;IAAEC,iBAAiB,MAAjBA,0BAAiB;IAAEC,sBAAsB,MAAtBA,+BAAsB;IAAEC,yBAAyB,MAAzBA,kCAAyB;IAAEC,mBAAmB,MAAnBA,4BAAmB;;yBAAQ"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { Persona, personaClassNames, renderPersona_unstable, usePersonaStyles_unstable, usePersona_unstable } from './Persona';\n"],"names":["Persona","personaClassNames","renderPersona_unstable","usePersonaStyles_unstable","usePersona_unstable"],"mappings":";;;;;;;;;;;IAASA,OAAO;eAAPA,gBAAO;;IAAEC,iBAAiB;eAAjBA,0BAAiB;;IAAEC,sBAAsB;eAAtBA,+BAAsB;;IAAEC,yBAAyB;eAAzBA,kCAAyB;;IAAEC,mBAAmB;eAAnBA,4BAAmB;;;yBAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-persona",
3
- "version": "9.2.34",
3
+ "version": "9.2.36",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,20 +33,20 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-avatar": "^9.5.24",
37
- "@fluentui/react-badge": "^9.1.30",
38
- "@fluentui/react-shared-contexts": "^9.7.2",
39
- "@fluentui/react-theme": "^9.1.11",
40
- "@fluentui/react-utilities": "^9.12.0",
41
- "@fluentui/react-jsx-runtime": "^9.0.2",
36
+ "@fluentui/react-avatar": "^9.5.26",
37
+ "@fluentui/react-badge": "^9.1.32",
38
+ "@fluentui/react-shared-contexts": "^9.7.3",
39
+ "@fluentui/react-theme": "^9.1.12",
40
+ "@fluentui/react-utilities": "^9.13.1",
41
+ "@fluentui/react-jsx-runtime": "^9.0.4",
42
42
  "@griffel/react": "^1.5.14",
43
- "@swc/helpers": "^0.4.14"
43
+ "@swc/helpers": "^0.5.1"
44
44
  },
45
45
  "peerDependencies": {
46
- "@types/react": ">=16.8.0 <19.0.0",
47
- "@types/react-dom": ">=16.8.0 <19.0.0",
48
- "react": ">=16.8.0 <19.0.0",
49
- "react-dom": ">=16.8.0 <19.0.0"
46
+ "@types/react": ">=16.14.0 <19.0.0",
47
+ "@types/react-dom": ">=16.14.0 <19.0.0",
48
+ "react": ">=16.14.0 <19.0.0",
49
+ "react-dom": ">=16.14.0 <19.0.0"
50
50
  },
51
51
  "beachball": {
52
52
  "disallowedChangeTypes": [