@fluentui/react-persona 9.2.89 → 9.2.90
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -2
- package/lib/components/Persona/usePersonaStyles.styles.js +2 -0
- package/lib/components/Persona/usePersonaStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Persona/usePersonaStyles.styles.js +1 -0
- package/lib-commonjs/components/Persona/usePersonaStyles.styles.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-persona
|
2
2
|
|
3
|
-
This log was last generated on Mon,
|
3
|
+
This log was last generated on Mon, 01 Jul 2024 20:25:39 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.2.90](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.90)
|
8
|
+
|
9
|
+
Mon, 01 Jul 2024 20:25:39 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.89..@fluentui/react-persona_v9.2.90)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- chore: add eslint react-compiler ([PR #31457](https://github.com/microsoft/fluentui/pull/31457) by seanmonahan@microsoft.com)
|
15
|
+
- Bump @fluentui/react-avatar to v9.6.31 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
16
|
+
- Bump @fluentui/react-badge to v9.2.39 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v9.18.11 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.40 ([PR #31861](https://github.com/microsoft/fluentui/pull/31861) by beachball)
|
19
|
+
|
7
20
|
## [9.2.89](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.89)
|
8
21
|
|
9
|
-
Mon, 17 Jun 2024 07:
|
22
|
+
Mon, 17 Jun 2024 07:34:17 GMT
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.88..@fluentui/react-persona_v9.2.89)
|
11
24
|
|
12
25
|
### Patches
|
@@ -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,O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U,GAAGV,aAAa,CAAC,CAAC;EAClC,IAAIW,eAAe;EACnB,IAAIC,uBAAuB;EAC3B,IAAI5B,YAAY,EAAE;IACd,IAAIC,IAAI,KAAK,aAAa,EAAE;MACxB0B,eAAe,GAAG5B,KAAK,CAAC8B,YAAY,IAAI,CAAC,IAAIH,UAAU,CAACJ,QAAQ;IACpE,CAAC,MAAM,IAAIrB,IAAI,KAAK,aAAa,IAAIA,IAAI,KAAK,MAAM,EAAE;MAClD0B,eAAe,GAAGD,UAAU,CAACH,SAAS;IAC1C;IACA,IAAInB,cAAc,EAAE;MAChB,IAAID,YAAY,KAAK,QAAQ,EAAE;QAC3ByB,uBAAuB,GAAGF,UAAU,CAAC/C,oBAAoB;MAC7D,CAAC,MAAM,IAAIwB,YAAY,KAAK,OAAO,EAAE;QACjCyB,uBAAuB,GAAGF,UAAU,CAACjD,mBAAmB;MAC5D;IACJ;EACJ,CAAC,MAAM;IACH,IAAIwB,IAAI,KAAK,MAAM,EAAE;MACjB0B,eAAe,GAAGD,UAAU,CAACH,SAAS;IAC1C,CAAC,MAAM,IAAItB,IAAI,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","ignoreList":[]}
|
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 'use no memo';\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,GAAG,gCAAgC;AACtD,MAAMC,gBAAgB,gBAAGd,aAAA,yKAMxB,CAAC;AACF;AACA;AACA;AAAI,MAAMe,SAAS,gBAAGd,QAAA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AAInB,cAAc,EAAE;MAChB,IAAID,YAAY,KAAK,QAAQ,EAAE;QAC3ByB,uBAAuB,GAAGF,UAAU,CAAC/C,oBAAoB;MAC7D,CAAC,MAAM,IAAIwB,YAAY,KAAK,OAAO,EAAE;QACjCyB,uBAAuB,GAAGF,UAAU,CAACjD,mBAAmB;MAC5D;IACJ;EACJ,CAAC,MAAM;IACH,IAAIwB,IAAI,KAAK,MAAM,EAAE;MACjB0B,eAAe,GAAGD,UAAU,CAACH,SAAS;IAC1C,CAAC,MAAM,IAAItB,IAAI,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","ignoreList":[]}
|
@@ -160,6 +160,7 @@ const usePresenceSpacingStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
160
160
|
]
|
161
161
|
});
|
162
162
|
const usePersonaStyles_unstable = (state)=>{
|
163
|
+
'use no memo';
|
163
164
|
const { presenceOnly, size, textAlignment, textPosition } = state;
|
164
165
|
const alignToPrimary = presenceOnly && textAlignment === 'start' && size !== 'extra-large' && size !== 'huge';
|
165
166
|
const alignBeforeAfterCenter = textPosition !== 'below' && textAlignment === 'center';
|
@@ -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;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;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WAAWJ,QAAQ;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"}
|
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 'use no memo';\n\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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ACjC2B,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"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-persona",
|
3
|
-
"version": "9.2.
|
3
|
+
"version": "9.2.90",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -32,12 +32,12 @@
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-avatar": "^9.6.
|
36
|
-
"@fluentui/react-badge": "^9.2.
|
35
|
+
"@fluentui/react-avatar": "^9.6.31",
|
36
|
+
"@fluentui/react-badge": "^9.2.39",
|
37
37
|
"@fluentui/react-shared-contexts": "^9.19.0",
|
38
38
|
"@fluentui/react-theme": "^9.1.19",
|
39
|
-
"@fluentui/react-utilities": "^9.18.
|
40
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
39
|
+
"@fluentui/react-utilities": "^9.18.11",
|
40
|
+
"@fluentui/react-jsx-runtime": "^9.0.40",
|
41
41
|
"@griffel/react": "^1.5.22",
|
42
42
|
"@swc/helpers": "^0.5.1"
|
43
43
|
},
|