@fluentui/react-persona 9.2.8 → 9.2.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +111 -1
- package/CHANGELOG.md +32 -2
- package/lib/components/Persona/Persona.js +3 -6
- package/lib/components/Persona/Persona.js.map +1 -1
- package/lib/components/Persona/index.js +1 -1
- package/lib/components/Persona/index.js.map +1 -1
- package/lib/components/Persona/renderPersona.js +5 -5
- package/lib/components/Persona/renderPersona.js.map +1 -1
- package/lib/components/Persona/{usePersonaStyles.js → usePersonaStyles.styles.js} +1 -1
- package/lib/components/Persona/usePersonaStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Persona/Persona.js +3 -4
- package/lib-commonjs/components/Persona/Persona.js.map +1 -1
- package/lib-commonjs/components/Persona/index.js +1 -1
- package/lib-commonjs/components/Persona/index.js.map +1 -1
- package/lib-commonjs/components/Persona/renderPersona.js +5 -6
- package/lib-commonjs/components/Persona/renderPersona.js.map +1 -1
- package/lib-commonjs/components/Persona/{usePersonaStyles.js → usePersonaStyles.styles.js} +2 -2
- package/lib-commonjs/components/Persona/usePersonaStyles.styles.js.map +1 -0
- package/package.json +8 -7
- package/.swcrc +0 -30
- package/lib/components/Persona/usePersonaStyles.js.map +0 -1
- package/lib-commonjs/components/Persona/usePersonaStyles.js.map +0 -1
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,117 @@
|
|
2
2
|
"name": "@fluentui/react-persona",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Fri, 12 May 2023 20:21:59 GMT",
|
6
|
+
"tag": "@fluentui/react-persona_v9.2.10",
|
7
|
+
"version": "9.2.10",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "olfedias@microsoft.com",
|
12
|
+
"package": "@fluentui/react-persona",
|
13
|
+
"commit": "c28decb23d191a0daaaf6d5d1832429715102129",
|
14
|
+
"comment": "chore: exclude .swcrc from being published"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "gcox@microsoft.com",
|
18
|
+
"package": "@fluentui/react-persona",
|
19
|
+
"commit": "ee977e20d359922798949a4f18af7a036ca36ca3",
|
20
|
+
"comment": "Update to use single hook selector"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "olfedias@microsoft.com",
|
24
|
+
"package": "@fluentui/react-persona",
|
25
|
+
"commit": "871192b67e1bc8a68da1b4c55b4e0ee2aed0b604",
|
26
|
+
"comment": "chore: move makeStyles() calls to .styles.ts files"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-persona",
|
31
|
+
"comment": "Bump @fluentui/react-avatar to v9.5.0",
|
32
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-persona",
|
37
|
+
"comment": "Bump @fluentui/react-badge to v9.1.11",
|
38
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-persona",
|
43
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.4.0",
|
44
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"author": "beachball",
|
48
|
+
"package": "@fluentui/react-persona",
|
49
|
+
"comment": "Bump @fluentui/react-theme to v9.1.8",
|
50
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"author": "beachball",
|
54
|
+
"package": "@fluentui/react-persona",
|
55
|
+
"comment": "Bump @fluentui/react-utilities to v9.8.1",
|
56
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"author": "beachball",
|
60
|
+
"package": "@fluentui/react-persona",
|
61
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3",
|
62
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"author": "beachball",
|
66
|
+
"package": "@fluentui/react-persona",
|
67
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21",
|
68
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
69
|
+
}
|
70
|
+
],
|
71
|
+
"none": [
|
72
|
+
{
|
73
|
+
"author": "martinhochel@microsoft.com",
|
74
|
+
"package": "@fluentui/react-persona",
|
75
|
+
"commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
|
76
|
+
"comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
|
77
|
+
}
|
78
|
+
]
|
79
|
+
}
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"date": "Mon, 24 Apr 2023 08:12:39 GMT",
|
83
|
+
"tag": "@fluentui/react-persona_v9.2.9",
|
84
|
+
"version": "9.2.9",
|
85
|
+
"comments": {
|
86
|
+
"patch": [
|
87
|
+
{
|
88
|
+
"author": "bernardo.sunderhus@gmail.com",
|
89
|
+
"package": "@fluentui/react-persona",
|
90
|
+
"commit": "4f02d916ac12350bd7323d02961fde2de7658658",
|
91
|
+
"comment": "chore: adopt custom JSX pragma"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"author": "beachball",
|
95
|
+
"package": "@fluentui/react-persona",
|
96
|
+
"comment": "Bump @fluentui/react-avatar to v9.4.10",
|
97
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"author": "beachball",
|
101
|
+
"package": "@fluentui/react-persona",
|
102
|
+
"comment": "Bump @fluentui/react-badge to v9.1.10",
|
103
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"author": "beachball",
|
107
|
+
"package": "@fluentui/react-persona",
|
108
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2",
|
109
|
+
"commit": "505433ac64f144c9cca456097413d6af4582e5ee"
|
110
|
+
}
|
111
|
+
]
|
112
|
+
}
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"date": "Mon, 17 Apr 2023 17:54:02 GMT",
|
6
116
|
"tag": "@fluentui/react-persona_v9.2.8",
|
7
117
|
"version": "9.2.8",
|
8
118
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,42 @@
|
|
1
1
|
# Change Log - @fluentui/react-persona
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 12 May 2023 20:21:59 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.2.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.10)
|
8
|
+
|
9
|
+
Fri, 12 May 2023 20:21:59 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.9..@fluentui/react-persona_v9.2.10)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
|
15
|
+
- Update to use single hook selector ([PR #27491](https://github.com/microsoft/fluentui/pull/27491) by gcox@microsoft.com)
|
16
|
+
- chore: move makeStyles() calls to .styles.ts files ([PR #27710](https://github.com/microsoft/fluentui/pull/27710) by olfedias@microsoft.com)
|
17
|
+
- Bump @fluentui/react-avatar to v9.5.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
18
|
+
- Bump @fluentui/react-badge to v9.1.11 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.4.0 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
20
|
+
- Bump @fluentui/react-theme to v9.1.8 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
21
|
+
- Bump @fluentui/react-utilities to v9.8.1 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
22
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
23
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.21 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
24
|
+
|
25
|
+
## [9.2.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.9)
|
26
|
+
|
27
|
+
Mon, 24 Apr 2023 08:12:39 GMT
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.8..@fluentui/react-persona_v9.2.9)
|
29
|
+
|
30
|
+
### Patches
|
31
|
+
|
32
|
+
- chore: adopt custom JSX pragma ([PR #27619](https://github.com/microsoft/fluentui/pull/27619) by bernardo.sunderhus@gmail.com)
|
33
|
+
- Bump @fluentui/react-avatar to v9.4.10 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
34
|
+
- Bump @fluentui/react-badge to v9.1.10 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
35
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.2 ([commit](https://github.com/microsoft/fluentui/commit/505433ac64f144c9cca456097413d6af4582e5ee) by beachball)
|
36
|
+
|
7
37
|
## [9.2.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-persona_v9.2.8)
|
8
38
|
|
9
|
-
Mon, 17 Apr 2023 17:
|
39
|
+
Mon, 17 Apr 2023 17:54:02 GMT
|
10
40
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-persona_v9.2.7..@fluentui/react-persona_v9.2.8)
|
11
41
|
|
12
42
|
### Patches
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { renderPersona_unstable } from './renderPersona';
|
3
3
|
import { usePersona_unstable } from './usePersona';
|
4
|
-
import { usePersonaStyles_unstable } from './usePersonaStyles';
|
5
|
-
import {
|
4
|
+
import { usePersonaStyles_unstable } from './usePersonaStyles.styles';
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
6
6
|
/**
|
7
7
|
* A Persona is a visual representation of a person or status that showcases an Avatar, PresenceBadge,
|
8
8
|
* or an Avatar with a PresenceBadge.
|
@@ -10,10 +10,7 @@ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
|
|
10
10
|
export const Persona = /*#__PURE__*/React.forwardRef((props, ref) => {
|
11
11
|
const state = usePersona_unstable(props, ref);
|
12
12
|
usePersonaStyles_unstable(state);
|
13
|
-
|
14
|
-
usePersonaStyles_unstable: useCustomStyles
|
15
|
-
} = useCustomStyleHooks_unstable();
|
16
|
-
useCustomStyles(state);
|
13
|
+
useCustomStyleHook_unstable('usePersonaStyles_unstable')(state);
|
17
14
|
return renderPersona_unstable(state);
|
18
15
|
});
|
19
16
|
Persona.displayName = 'Persona';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","renderPersona_unstable","usePersona_unstable","usePersonaStyles_unstable","
|
1
|
+
{"version":3,"names":["React","renderPersona_unstable","usePersona_unstable","usePersonaStyles_unstable","useCustomStyleHook_unstable","Persona","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/Persona/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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,sBAAsB,QAAQ;AACvC,SAASC,mBAAmB,QAAQ;AACpC,SAASC,yBAAyB,QAAQ;AAG1C,SAASC,2BAA2B,QAAQ;AAE5C;;;;AAIA,OAAO,MAAMC,OAAA,gBAA6CL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACzF,MAAMC,KAAA,GAAQP,mBAAA,CAAoBK,KAAA,EAAOC,GAAA;EAEzCL,yBAAA,CAA0BM,KAAA;EAE1BL,2BAAA,CAA4B,6BAA6BK,KAAA;EAEzD,OAAOR,sBAAA,CAAuBQ,KAAA;AAChC;AAEAJ,OAAA,CAAQK,WAAW,GAAG"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/Persona/index.ts"],"sourcesContent":["export * from './Persona';\nexport * from './Persona.types';\nexport * from './renderPersona';\nexport * from './usePersona';\nexport * from './usePersonaStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/Persona/index.ts"],"sourcesContent":["export * from './Persona';\nexport * from './Persona.types';\nexport * from './renderPersona';\nexport * from './usePersona';\nexport * from './usePersonaStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import {
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
|
2
|
+
import { getSlotsNext } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
4
|
* Render the final JSX of Persona
|
5
5
|
*/
|
@@ -11,8 +11,8 @@ export const renderPersona_unstable = state => {
|
|
11
11
|
const {
|
12
12
|
slots,
|
13
13
|
slotProps
|
14
|
-
} =
|
15
|
-
const coin = presenceOnly ? slots.presence && /*#__PURE__*/
|
16
|
-
return /*#__PURE__*/
|
14
|
+
} = getSlotsNext(state);
|
15
|
+
const coin = presenceOnly ? slots.presence && /*#__PURE__*/createElement(slots.presence, slotProps.presence) : slots.avatar && /*#__PURE__*/createElement(slots.avatar, slotProps.avatar);
|
16
|
+
return /*#__PURE__*/createElement(slots.root, slotProps.root, (textPosition === 'after' || textPosition === 'below') && coin, slots.primaryText && /*#__PURE__*/createElement(slots.primaryText, slotProps.primaryText), slots.secondaryText && /*#__PURE__*/createElement(slots.secondaryText, slotProps.secondaryText), slots.tertiaryText && /*#__PURE__*/createElement(slots.tertiaryText, slotProps.tertiaryText), slots.quaternaryText && /*#__PURE__*/createElement(slots.quaternaryText, slotProps.quaternaryText), textPosition === 'before' && coin);
|
17
17
|
};
|
18
18
|
//# sourceMappingURL=renderPersona.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["createElement","getSlotsNext","renderPersona_unstable","state","presenceOnly","textPosition","slots","slotProps","coin","presence","avatar","root","primaryText","secondaryText","tertiaryText","quaternaryText"],"sources":["../../../src/components/Persona/renderPersona.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } 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 const { slots, slotProps } = getSlotsNext<PersonaSlots>(state);\n\n const coin = presenceOnly\n ? slots.presence && <slots.presence {...slotProps.presence} />\n : slots.avatar && <slots.avatar {...slotProps.avatar} />;\n\n return (\n <slots.root {...slotProps.root}>\n {(textPosition === 'after' || textPosition === 'below') && coin}\n {slots.primaryText && <slots.primaryText {...slotProps.primaryText} />}\n {slots.secondaryText && <slots.secondaryText {...slotProps.secondaryText} />}\n {slots.tertiaryText && <slots.tertiaryText {...slotProps.tertiaryText} />}\n {slots.quaternaryText && <slots.quaternaryText {...slotProps.quaternaryText} />}\n {textPosition === 'before' && coin}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAE9B,SAASC,YAAY,QAAQ;AAG7B;;;AAGA,OAAO,MAAMC,sBAAA,GAA0BC,KAAA,IAAwB;EAC7D,MAAM;IAAEC,YAAA;IAAcC;EAAY,CAAE,GAAGF,KAAA;EACvC,MAAM;IAAEG,KAAA;IAAOC;EAAS,CAAE,GAAGN,YAAA,CAA2BE,KAAA;EAExD,MAAMK,IAAA,GAAOJ,YAAA,GACTE,KAAA,CAAMG,QAAQ,iBAAIT,aAfxB,CAeyBM,KAAA,CAAMG,QAAQ,EAAKF,SAAA,CAAUE,QAAQ,IACxDH,KAAA,CAAMI,MAAM,iBAAIV,aAhBtB,CAgBuBM,KAAA,CAAMI,MAAM,EAAKH,SAAA,CAAUG,MAAM,CAAI;EAE1D,oBACEV,aAnBJ,CAmBKM,KAAA,CAAMK,IAAI,EAAKJ,SAAA,CAAUI,IAAI,EAC3B,CAACN,YAAA,KAAiB,WAAWA,YAAA,KAAiB,OAAM,KAAMG,IAAA,EAC1DF,KAAA,CAAMM,WAAW,iBAAIZ,aArB5B,CAqB6BM,KAAA,CAAMM,WAAW,EAAKL,SAAA,CAAUK,WAAW,GACjEN,KAAA,CAAMO,aAAa,iBAAIb,aAtB9B,CAsB+BM,KAAA,CAAMO,aAAa,EAAKN,SAAA,CAAUM,aAAa,GACvEP,KAAA,CAAMQ,YAAY,iBAAId,aAvB7B,CAuB8BM,KAAA,CAAMQ,YAAY,EAAKP,SAAA,CAAUO,YAAY,GACpER,KAAA,CAAMS,cAAc,iBAAIf,aAxB/B,CAwBgCM,KAAA,CAAMS,cAAc,EAAKR,SAAA,CAAUQ,cAAc,GAC1EV,YAAA,KAAiB,YAAYG,IAAA;AAGpC"}
|
@@ -216,4 +216,4 @@ const useTextClassNames = (state, alignToPrimary) => {
|
|
216
216
|
optionalTextClassName: mergeClasses(optionalTextBaseClassName, !presenceOnly && size === 'huge' && textStyles.body1, alignToPrimaryClassName)
|
217
217
|
};
|
218
218
|
};
|
219
|
-
//# sourceMappingURL=usePersonaStyles.js.map
|
219
|
+
//# sourceMappingURL=usePersonaStyles.styles.js.map
|
@@ -0,0 +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":["../../../src/components/Persona/usePersonaStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { PersonaSlots, PersonaState } from './Persona.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const personaClassNames: SlotClassNames<PersonaSlots> = {\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};\n\nconst avatarSpacing = `--fui-Persona__avatar--spacing`;\n\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/**\n * Styles for the root slot\n */\nconst 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:\n '1fr [primary] max-content [secondary] max-content [tertiary] max-content [quaternary] max-content 1fr',\n },\n\n after: {\n // Intentionally empty\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\n media: {\n gridRowStart: 'span 5',\n },\n\n mediaBeforeAfterCenter: {\n gridRowStart: 'span 6',\n },\n\n start: {\n alignSelf: 'start',\n },\n center: {\n alignSelf: 'center',\n },\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\n secondLineSpacing: {\n marginTop: '-2px',\n },\n\n primary: { gridRowStart: 'primary' },\n secondary: { gridRowStart: 'secondary' },\n tertiary: { gridRowStart: 'tertiary' },\n quaternary: { 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});\n\nconst usePresenceSpacingStyles = makeStyles({\n small: {\n [avatarSpacing]: tokens.spacingHorizontalSNudge,\n },\n});\n\n/**\n * Apply styling to the Persona slots based on the state\n */\nexport const usePersonaStyles_unstable = (state: PersonaState): PersonaState => {\n const { presenceOnly, size, textAlignment, textPosition } = state;\n\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\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const avatarSpacingStyles = useAvatarSpacingStyles();\n const presenceSpacingStyles = { ...avatarSpacingStyles, ...usePresenceSpacingStyles() };\n\n state.root.className = mergeClasses(\n personaClassNames.root,\n rootClassName,\n alignBeforeAfterCenter && styles.beforeAfterCenter,\n styles[textPosition],\n state.root.className,\n );\n\n if (state.avatar) {\n state.avatar.className = mergeClasses(\n personaClassNames.avatar,\n textPosition !== 'below' && styles.media,\n alignBeforeAfterCenter && styles.mediaBeforeAfterCenter,\n styles[textAlignment],\n avatarSpacingStyles[size],\n avatarSpacingStyles[textPosition],\n state.avatar.className,\n );\n }\n\n if (state.presence) {\n state.presence.className = mergeClasses(\n personaClassNames.presence,\n textPosition !== 'below' && styles.media,\n alignBeforeAfterCenter && styles.mediaBeforeAfterCenter,\n styles[textAlignment],\n presenceSpacingStyles[size],\n presenceSpacingStyles[textPosition],\n textPosition === 'after' && alignToPrimary && styles.afterAlignToPrimary,\n textPosition === 'before' && alignToPrimary && styles.beforeAlignToPrimary,\n state.presence.className,\n );\n }\n\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n personaClassNames.primaryText,\n alignBeforeAfterCenter && styles.primary,\n primaryTextClassName,\n state.primaryText.className,\n );\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n personaClassNames.secondaryText,\n alignBeforeAfterCenter && styles.secondary,\n optionalTextClassName,\n styles.secondLineSpacing,\n state.secondaryText.className,\n );\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n personaClassNames.tertiaryText,\n alignBeforeAfterCenter && styles.tertiary,\n optionalTextClassName,\n state.tertiaryText.className,\n );\n }\n\n if (state.quaternaryText) {\n state.quaternaryText.className = mergeClasses(\n personaClassNames.quaternaryText,\n alignBeforeAfterCenter && styles.quaternary,\n optionalTextClassName,\n state.quaternaryText.className,\n );\n }\n\n return state;\n};\n\nconst usePrimaryTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1,\n});\n\nconst useOptionalTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n});\n\nconst useTextStyles = makeStyles({\n beforeAlignToPrimary: {\n gridColumnEnd: 'middle',\n },\n afterAlignToPrimary: {\n gridColumnStart: 'middle',\n },\n\n body1: typographyStyles.body1,\n caption1: typographyStyles.caption1,\n subtitle2: typographyStyles.subtitle2,\n});\n\nconst useTextClassNames = (\n state: PersonaState,\n alignToPrimary: boolean,\n): {\n primaryTextClassName: string;\n optionalTextClassName: string;\n} => {\n const { presenceOnly, size, textPosition } = state;\n const primaryTextBaseClassName = usePrimaryTextBaseClassName();\n const optionalTextBaseClassName = useOptionalTextBaseClassName();\n const textStyles = useTextStyles();\n\n let primaryTextSize;\n let alignToPrimaryClassName;\n\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\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\n return {\n primaryTextClassName: mergeClasses(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),\n optionalTextClassName: mergeClasses(\n optionalTextBaseClassName,\n !presenceOnly && size === 'huge' && textStyles.body1,\n alignToPrimaryClassName,\n ),\n };\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ;AAC1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAIzC,OAAO,MAAMC,iBAAA,GAAkD;EAC7DC,IAAA,EAAM;EACNC,MAAA,EAAQ;EACRC,QAAA,EAAU;EACVC,WAAA,EAAa;EACbC,aAAA,EAAe;EACfC,YAAA,EAAc;EACdC,cAAA,EAAgB;AAClB;AAEA,MAAMC,aAAA,GAAiB,gCAA+B;AAEtD,MAAMC,gBAAA,gBAAmBd,aAAA,0KAMzB;AAEA;;;AAGA,MAAMe,SAAA,gBAAYd,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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AAA;IAC9ErB,qBAAA,EAAuB1D,YAAA,CACrB4E,yBAAA,EACA,CAACzB,YAAA,IAAgBC,IAAA,KAAS,UAAUyB,UAAA,CAAWT,KAAK,EACpDW,uBAAA;EAEJ;AACF"}
|
@@ -10,13 +10,12 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
11
|
const _renderPersona = require("./renderPersona");
|
12
12
|
const _usePersona = require("./usePersona");
|
13
|
-
const
|
13
|
+
const _usePersonaStylesStyles = require("./usePersonaStyles.styles");
|
14
14
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
15
15
|
const Persona = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
16
16
|
const state = (0, _usePersona.usePersona_unstable)(props, ref);
|
17
|
-
(0,
|
18
|
-
|
19
|
-
useCustomStyles(state);
|
17
|
+
(0, _usePersonaStylesStyles.usePersonaStyles_unstable)(state);
|
18
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('usePersonaStyles_unstable')(state);
|
20
19
|
return (0, _renderPersona.renderPersona_unstable)(state);
|
21
20
|
});
|
22
21
|
Persona.displayName = 'Persona'; //# sourceMappingURL=Persona.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Persona/Persona.js"],"sourcesContent":["import * as React from 'react';\nimport { renderPersona_unstable } from './renderPersona';\nimport { usePersona_unstable } from './usePersona';\nimport { usePersonaStyles_unstable } from './usePersonaStyles';\nimport {
|
1
|
+
{"version":3,"sources":["../../../lib/components/Persona/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 */\nexport 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//# sourceMappingURL=Persona.js.map"],"names":["Persona","React","forwardRef","props","ref","state","usePersona_unstable","usePersonaStyles_unstable","useCustomStyleHook_unstable","renderPersona_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;+BACgB;4BACH;wCACM;qCACE;AAKrC,MAAMA,UAAU,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACnE,MAAMC,QAAQC,IAAAA,+BAAmB,EAACH,OAAOC;IACzCG,IAAAA,iDAAyB,EAACF;IAC1BG,IAAAA,gDAA2B,EAAC,6BAA6BH;IACzD,OAAOI,IAAAA,qCAAsB,EAACJ;AAChC;AACAL,QAAQU,WAAW,GAAG,WACtB,mCAAmC"}
|
@@ -7,7 +7,7 @@ _exportStar(require("./Persona"), exports);
|
|
7
7
|
_exportStar(require("./Persona.types"), exports);
|
8
8
|
_exportStar(require("./renderPersona"), exports);
|
9
9
|
_exportStar(require("./usePersona"), exports);
|
10
|
-
_exportStar(require("./usePersonaStyles"), exports);
|
10
|
+
_exportStar(require("./usePersonaStyles.styles"), exports);
|
11
11
|
//# sourceMappingURL=index.js.map
|
12
12
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Persona/index.js"],"sourcesContent":["export * from './Persona';\nexport * from './Persona.types';\nexport * from './renderPersona';\nexport * from './usePersona';\nexport * from './usePersonaStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
1
|
+
{"version":3,"sources":["../../../lib/components/Persona/index.js"],"sourcesContent":["export * from './Persona';\nexport * from './Persona.types';\nexport * from './renderPersona';\nexport * from './usePersona';\nexport * from './usePersonaStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";
|
1
|
+
/** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
@@ -6,14 +6,13 @@ Object.defineProperty(exports, "renderPersona_unstable", {
|
|
6
6
|
enumerable: true,
|
7
7
|
get: ()=>renderPersona_unstable
|
8
8
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
9
|
+
const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
11
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
12
11
|
const renderPersona_unstable = (state)=>{
|
13
12
|
const { presenceOnly , textPosition } = state;
|
14
|
-
const { slots , slotProps } = (0, _reactUtilities.
|
15
|
-
const coin = presenceOnly ? slots.presence && /*#__PURE__*/
|
16
|
-
return /*#__PURE__*/
|
13
|
+
const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
|
14
|
+
const coin = presenceOnly ? slots.presence && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.presence, slotProps.presence) : slots.avatar && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.avatar, slotProps.avatar);
|
15
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, (textPosition === 'after' || textPosition === 'below') && coin, slots.primaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.primaryText, slotProps.primaryText), slots.secondaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.secondaryText, slotProps.secondaryText), slots.tertiaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.tertiaryText, slotProps.tertiaryText), slots.quaternaryText && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.quaternaryText, slotProps.quaternaryText), textPosition === 'before' && coin);
|
17
16
|
}; //# sourceMappingURL=renderPersona.js.map
|
18
17
|
|
19
18
|
//# sourceMappingURL=renderPersona.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Persona/renderPersona.js"],"sourcesContent":["import
|
1
|
+
{"version":3,"sources":["../../../lib/components/Persona/renderPersona.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Persona\n */\nexport const renderPersona_unstable = state => {\n const {\n presenceOnly,\n textPosition\n } = state;\n const {\n slots,\n slotProps\n } = getSlotsNext(state);\n const coin = presenceOnly ? slots.presence && /*#__PURE__*/createElement(slots.presence, slotProps.presence) : slots.avatar && /*#__PURE__*/createElement(slots.avatar, slotProps.avatar);\n return /*#__PURE__*/createElement(slots.root, slotProps.root, (textPosition === 'after' || textPosition === 'below') && coin, slots.primaryText && /*#__PURE__*/createElement(slots.primaryText, slotProps.primaryText), slots.secondaryText && /*#__PURE__*/createElement(slots.secondaryText, slotProps.secondaryText), slots.tertiaryText && /*#__PURE__*/createElement(slots.tertiaryText, slotProps.tertiaryText), slots.quaternaryText && /*#__PURE__*/createElement(slots.quaternaryText, slotProps.quaternaryText), textPosition === 'before' && coin);\n};\n//# sourceMappingURL=renderPersona.js.map"],"names":["renderPersona_unstable","state","presenceOnly","textPosition","slots","slotProps","getSlotsNext","coin","presence","createElement","avatar","root","primaryText","secondaryText","tertiaryText","quaternaryText"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKrCA;;aAAAA;;iCALqE;gCACrD;AAItB,MAAMA,yBAAyBC,CAAAA,QAAS;IAC7C,MAAM,EACJC,aAAY,EACZC,aAAY,EACb,GAAGF;IACJ,MAAM,EACJG,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,4BAAY,EAACL;IACjB,MAAMM,OAAOL,eAAeE,MAAMI,QAAQ,IAAI,WAAW,GAAEC,IAAAA,8BAAa,EAACL,MAAMI,QAAQ,EAAEH,UAAUG,QAAQ,IAAIJ,MAAMM,MAAM,IAAI,WAAW,GAAED,IAAAA,8BAAa,EAACL,MAAMM,MAAM,EAAEL,UAAUK,MAAM,CAAC;IACzL,OAAO,WAAW,GAAED,IAAAA,8BAAa,EAACL,MAAMO,IAAI,EAAEN,UAAUM,IAAI,EAAE,AAACR,CAAAA,iBAAiB,WAAWA,iBAAiB,OAAM,KAAMI,MAAMH,MAAMQ,WAAW,IAAI,WAAW,GAAEH,IAAAA,8BAAa,EAACL,MAAMQ,WAAW,EAAEP,UAAUO,WAAW,GAAGR,MAAMS,aAAa,IAAI,WAAW,GAAEJ,IAAAA,8BAAa,EAACL,MAAMS,aAAa,EAAER,UAAUQ,aAAa,GAAGT,MAAMU,YAAY,IAAI,WAAW,GAAEL,IAAAA,8BAAa,EAACL,MAAMU,YAAY,EAAET,UAAUS,YAAY,GAAGV,MAAMW,cAAc,IAAI,WAAW,GAAEN,IAAAA,8BAAa,EAACL,MAAMW,cAAc,EAAEV,UAAUU,cAAc,GAAGZ,iBAAiB,YAAYI;AAC3hB,GACA,yCAAyC"}
|
@@ -265,6 +265,6 @@ const useTextClassNames = (state, alignToPrimary)=>{
|
|
265
265
|
primaryTextClassName: (0, _react.mergeClasses)(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),
|
266
266
|
optionalTextClassName: (0, _react.mergeClasses)(optionalTextBaseClassName, !presenceOnly && size === 'huge' && textStyles.body1, alignToPrimaryClassName)
|
267
267
|
};
|
268
|
-
}; //# sourceMappingURL=usePersonaStyles.js.map
|
268
|
+
}; //# sourceMappingURL=usePersonaStyles.styles.js.map
|
269
269
|
|
270
|
-
//# sourceMappingURL=usePersonaStyles.js.map
|
270
|
+
//# sourceMappingURL=usePersonaStyles.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Persona/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{-webkit-align-self:start;-ms-flex-item-align:start;align-self:start;}\", \".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;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;QACR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AAC;QAAsC;QAAuC;QAAgD;QAA+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"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-persona",
|
3
|
-
"version": "9.2.
|
3
|
+
"version": "9.2.10",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -27,16 +27,17 @@
|
|
27
27
|
"devDependencies": {
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
29
29
|
"@fluentui/react-conformance": "*",
|
30
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
30
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.21",
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@fluentui/react-avatar": "^9.
|
36
|
-
"@fluentui/react-badge": "^9.1.
|
37
|
-
"@fluentui/react-shared-contexts": "^9.
|
38
|
-
"@fluentui/react-theme": "^9.1.
|
39
|
-
"@fluentui/react-utilities": "^9.8.
|
35
|
+
"@fluentui/react-avatar": "^9.5.0",
|
36
|
+
"@fluentui/react-badge": "^9.1.11",
|
37
|
+
"@fluentui/react-shared-contexts": "^9.4.0",
|
38
|
+
"@fluentui/react-theme": "^9.1.8",
|
39
|
+
"@fluentui/react-utilities": "^9.8.1",
|
40
|
+
"@fluentui/react-jsx-runtime": "9.0.0-alpha.3",
|
40
41
|
"@griffel/react": "^1.5.2",
|
41
42
|
"@swc/helpers": "^0.4.14"
|
42
43
|
},
|
package/.swcrc
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
-
"exclude": [
|
4
|
-
"/testing",
|
5
|
-
"/**/*.cy.ts",
|
6
|
-
"/**/*.cy.tsx",
|
7
|
-
"/**/*.spec.ts",
|
8
|
-
"/**/*.spec.tsx",
|
9
|
-
"/**/*.test.ts",
|
10
|
-
"/**/*.test.tsx"
|
11
|
-
],
|
12
|
-
"jsc": {
|
13
|
-
"parser": {
|
14
|
-
"syntax": "typescript",
|
15
|
-
"tsx": true,
|
16
|
-
"decorators": false,
|
17
|
-
"dynamicImport": false
|
18
|
-
},
|
19
|
-
"externalHelpers": true,
|
20
|
-
"transform": {
|
21
|
-
"react": {
|
22
|
-
"runtime": "classic",
|
23
|
-
"useSpread": true
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"target": "es2019"
|
27
|
-
},
|
28
|
-
"minify": false,
|
29
|
-
"sourceMaps": true
|
30
|
-
}
|
@@ -1 +0,0 @@
|
|
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":["../../../src/components/Persona/usePersonaStyles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { PersonaSlots, PersonaState } from './Persona.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const personaClassNames: SlotClassNames<PersonaSlots> = {\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};\n\nconst avatarSpacing = `--fui-Persona__avatar--spacing`;\n\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/**\n * Styles for the root slot\n */\nconst 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:\n '1fr [primary] max-content [secondary] max-content [tertiary] max-content [quaternary] max-content 1fr',\n },\n\n after: {\n // Intentionally empty\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\n media: {\n gridRowStart: 'span 5',\n },\n\n mediaBeforeAfterCenter: {\n gridRowStart: 'span 6',\n },\n\n start: {\n alignSelf: 'start',\n },\n center: {\n alignSelf: 'center',\n },\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\n secondLineSpacing: {\n marginTop: '-2px',\n },\n\n primary: { gridRowStart: 'primary' },\n secondary: { gridRowStart: 'secondary' },\n tertiary: { gridRowStart: 'tertiary' },\n quaternary: { 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});\n\nconst usePresenceSpacingStyles = makeStyles({\n small: {\n [avatarSpacing]: tokens.spacingHorizontalSNudge,\n },\n});\n\n/**\n * Apply styling to the Persona slots based on the state\n */\nexport const usePersonaStyles_unstable = (state: PersonaState): PersonaState => {\n const { presenceOnly, size, textAlignment, textPosition } = state;\n\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\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const avatarSpacingStyles = useAvatarSpacingStyles();\n const presenceSpacingStyles = { ...avatarSpacingStyles, ...usePresenceSpacingStyles() };\n\n state.root.className = mergeClasses(\n personaClassNames.root,\n rootClassName,\n alignBeforeAfterCenter && styles.beforeAfterCenter,\n styles[textPosition],\n state.root.className,\n );\n\n if (state.avatar) {\n state.avatar.className = mergeClasses(\n personaClassNames.avatar,\n textPosition !== 'below' && styles.media,\n alignBeforeAfterCenter && styles.mediaBeforeAfterCenter,\n styles[textAlignment],\n avatarSpacingStyles[size],\n avatarSpacingStyles[textPosition],\n state.avatar.className,\n );\n }\n\n if (state.presence) {\n state.presence.className = mergeClasses(\n personaClassNames.presence,\n textPosition !== 'below' && styles.media,\n alignBeforeAfterCenter && styles.mediaBeforeAfterCenter,\n styles[textAlignment],\n presenceSpacingStyles[size],\n presenceSpacingStyles[textPosition],\n textPosition === 'after' && alignToPrimary && styles.afterAlignToPrimary,\n textPosition === 'before' && alignToPrimary && styles.beforeAlignToPrimary,\n state.presence.className,\n );\n }\n\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n personaClassNames.primaryText,\n alignBeforeAfterCenter && styles.primary,\n primaryTextClassName,\n state.primaryText.className,\n );\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n personaClassNames.secondaryText,\n alignBeforeAfterCenter && styles.secondary,\n optionalTextClassName,\n styles.secondLineSpacing,\n state.secondaryText.className,\n );\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n personaClassNames.tertiaryText,\n alignBeforeAfterCenter && styles.tertiary,\n optionalTextClassName,\n state.tertiaryText.className,\n );\n }\n\n if (state.quaternaryText) {\n state.quaternaryText.className = mergeClasses(\n personaClassNames.quaternaryText,\n alignBeforeAfterCenter && styles.quaternary,\n optionalTextClassName,\n state.quaternaryText.className,\n );\n }\n\n return state;\n};\n\nconst usePrimaryTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1,\n});\n\nconst useOptionalTextBaseClassName = makeResetStyles({\n display: 'block',\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n});\n\nconst useTextStyles = makeStyles({\n beforeAlignToPrimary: {\n gridColumnEnd: 'middle',\n },\n afterAlignToPrimary: {\n gridColumnStart: 'middle',\n },\n\n body1: typographyStyles.body1,\n caption1: typographyStyles.caption1,\n subtitle2: typographyStyles.subtitle2,\n});\n\nconst useTextClassNames = (\n state: PersonaState,\n alignToPrimary: boolean,\n): {\n primaryTextClassName: string;\n optionalTextClassName: string;\n} => {\n const { presenceOnly, size, textPosition } = state;\n const primaryTextBaseClassName = usePrimaryTextBaseClassName();\n const optionalTextBaseClassName = useOptionalTextBaseClassName();\n const textStyles = useTextStyles();\n\n let primaryTextSize;\n let alignToPrimaryClassName;\n\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\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\n return {\n primaryTextClassName: mergeClasses(primaryTextBaseClassName, primaryTextSize, alignToPrimaryClassName),\n optionalTextClassName: mergeClasses(\n optionalTextBaseClassName,\n !presenceOnly && size === 'huge' && textStyles.body1,\n alignToPrimaryClassName,\n ),\n };\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ;AAC1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ;AAIzC,OAAO,MAAMC,iBAAA,GAAkD;EAC7DC,IAAA,EAAM;EACNC,MAAA,EAAQ;EACRC,QAAA,EAAU;EACVC,WAAA,EAAa;EACbC,aAAA,EAAe;EACfC,YAAA,EAAc;EACdC,cAAA,EAAgB;AAClB;AAEA,MAAMC,aAAA,GAAiB,gCAA+B;AAEtD,MAAMC,gBAAA,gBAAmBd,aAAA,0KAMzB;AAEA;;;AAGA,MAAMe,SAAA,gBAAYd,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;IAAAM,OAAA;EAAA;EAAAC,oBAAA;IAAAJ,MAAA;IAAAH,MAAA;IAAAQ,OAAA;EAAA;EAAAC,iBAAA;IAAAC,OAAA;EAAA;EAAAC,OAAA;IAAAX,MAAA;EAAA;EAAAY,SAAA;IAAAZ,MAAA;EAAA;EAAAa,QAAA;IAAAb,MAAA;EAAA;EAAAc,UAAA;IAAAd,MAAA;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H,MAAM;IAAEJ,YAAA;IAAcC,IAAA;IAAME;EAAY,CAAE,GAAGJ,KAAA;EAC7C,MAAMyB,wBAAA,GAA2BV,2BAAA;EACjC,MAAMW,yBAAA,GAA4BV,4BAAA;EAClC,MAAMW,UAAA,GAAaV,aAAA;EAEnB,IAAIW,eAAA;EACJ,IAAIC,uBAAA;EAEJ,IAAI5B,YAAA,EAAc;IAChB,IAAIC,IAAA,KAAS,eAAe;MAC1B0B,eAAA,GAAkB5B,KAAA,CAAM8B,YAAY,IAAI,KAAKH,UAAA,CAAWJ,QAAQ;IAClE,OAAO,IAAIrB,IAAA,KAAS,iBAAiBA,IAAA,KAAS,QAAQ;MACpD0B,eAAA,GAAkBD,UAAA,CAAWH,SAAS;IACxC;IAEA,IAAInB,cAAA,EAAgB;MAClB,IAAID,YAAA,KAAiB,UAAU;QAC7ByB,uBAAA,GAA0BF,UAAA,CAAW/C,oBAAoB;MAC3D,OAAO,IAAIwB,YAAA,KAAiB,SAAS;QACnCyB,uBAAA,GAA0BF,UAAA,CAAWjD,mBAAmB;MAC1D;IACF;EACF,OAAO;IACL,IAAIwB,IAAA,KAAS,QAAQ;MACnB0B,eAAA,GAAkBD,UAAA,CAAWH,SAAS;IACxC,OAAO,IAAItB,IAAA,KAAS,eAAe;MACjC0B,eAAA,GAAkBD,UAAA,CAAWH,SAAS;IACxC;EACF;EAEA,OAAO;IACLjB,oBAAA,EAAsBzD,YAAA,CAAa2E,wBAAA,EAA0BG,eAAA,EAAiBC,uBAAA;IAC9ErB,qBAAA,EAAuB1D,YAAA,CACrB4E,yBAAA,EACA,CAACzB,YAAA,IAAgBC,IAAA,KAAS,UAAUyB,UAAA,CAAWT,KAAK,EACpDW,uBAAA;EAEJ;AACF"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Persona/usePersonaStyles.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{-webkit-align-self:start;-ms-flex-item-align:start;align-self:start;}\", \".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;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.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;IACAC,mBAAmB;QACjBC,SAAS;IACX;IACAC,SAAS;QACPX,QAAQ;IACV;IACAY,WAAW;QACTZ,QAAQ;IACV;IACAa,UAAU;QACRb,QAAQ;IACV;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