@fluentui/react-avatar 9.2.10 → 9.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +72 -1
- package/CHANGELOG.md +18 -2
- package/lib/components/Avatar/Avatar.js.map +1 -1
- package/lib/components/Avatar/renderAvatar.js +10 -5
- package/lib/components/Avatar/renderAvatar.js.map +1 -1
- package/lib/components/Avatar/useAvatar.js +17 -32
- package/lib/components/Avatar/useAvatar.js.map +1 -1
- package/lib/components/Avatar/useAvatarStyles.js +405 -424
- package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
- package/lib/components/AvatarGroup/AvatarGroup.js +0 -1
- package/lib/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/renderAvatarGroup.js +2 -2
- package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroup.js +0 -1
- package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroupStyles.js +10 -13
- package/lib/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
- package/lib/components/AvatarGroupItem/AvatarGroupItem.js +0 -1
- package/lib/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
- package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js +6 -4
- package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -1
- package/lib/components/AvatarGroupItem/useAvatarGroupItem.js +2 -5
- package/lib/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
- package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js +99 -124
- package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -1
- package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js +0 -1
- package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -1
- package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js +10 -6
- package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -1
- package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js +0 -7
- package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -1
- package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -1
- package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js +166 -176
- package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js.map +1 -1
- package/lib/contexts/AvatarContext.js +0 -3
- package/lib/contexts/AvatarContext.js.map +1 -1
- package/lib/contexts/AvatarGroupContext.js +0 -1
- package/lib/contexts/AvatarGroupContext.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/utils/getInitials.js +2 -17
- package/lib/utils/getInitials.js.map +1 -1
- package/lib/utils/partitionAvatarGroupItems.js +0 -3
- package/lib/utils/partitionAvatarGroupItems.js.map +1 -1
- package/lib-commonjs/Avatar.js +0 -2
- package/lib-commonjs/Avatar.js.map +1 -1
- package/lib-commonjs/AvatarGroup.js +0 -2
- package/lib-commonjs/AvatarGroup.js.map +1 -1
- package/lib-commonjs/AvatarGroupItem.js +0 -2
- package/lib-commonjs/AvatarGroupItem.js.map +1 -1
- package/lib-commonjs/AvatarGroupPopover.js +0 -2
- package/lib-commonjs/AvatarGroupPopover.js.map +1 -1
- package/lib-commonjs/components/Avatar/Avatar.js +0 -5
- package/lib-commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib-commonjs/components/Avatar/Avatar.types.js.map +1 -1
- package/lib-commonjs/components/Avatar/index.js +0 -6
- package/lib-commonjs/components/Avatar/index.js.map +1 -1
- package/lib-commonjs/components/Avatar/renderAvatar.js +10 -9
- package/lib-commonjs/components/Avatar/renderAvatar.js.map +1 -1
- package/lib-commonjs/components/Avatar/useAvatar.js +17 -42
- package/lib-commonjs/components/Avatar/useAvatar.js.map +1 -1
- package/lib-commonjs/components/Avatar/useAvatarStyles.js +405 -428
- package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/AvatarGroup.js +0 -7
- package/lib-commonjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/index.js +0 -7
- package/lib-commonjs/components/AvatarGroup/index.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js +2 -7
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js +0 -4
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.js +0 -2
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js +10 -18
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js +0 -6
- package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.types.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupItem/index.js +0 -6
- package/lib-commonjs/components/AvatarGroupItem/index.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.js +6 -8
- package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js +2 -12
- package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js +91 -123
- package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.js +0 -7
- package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.types.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/index.js +0 -6
- package/lib-commonjs/components/AvatarGroupPopover/index.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.js +10 -12
- package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.js +0 -16
- package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js +0 -2
- package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js +166 -183
- package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js.map +1 -1
- package/lib-commonjs/contexts/AvatarContext.js +0 -6
- package/lib-commonjs/contexts/AvatarContext.js.map +1 -1
- package/lib-commonjs/contexts/AvatarGroupContext.js +0 -5
- package/lib-commonjs/contexts/AvatarGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +0 -3
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/index.js +0 -12
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utils/getInitials.js +3 -19
- package/lib-commonjs/utils/getInitials.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -4
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/partitionAvatarGroupItems.js +0 -5
- package/lib-commonjs/utils/partitionAvatarGroupItems.js.map +1 -1
- package/package.json +10 -10
|
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useGroupChildClassName = exports.useAvatarGroupItemStyles_unstable = exports.avatarGroupItemClassNames = void 0;
|
|
7
|
-
|
|
8
7
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
-
|
|
10
8
|
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
11
|
-
|
|
12
9
|
const Avatar_1 = /*#__PURE__*/require("../../Avatar");
|
|
13
|
-
|
|
14
10
|
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
15
|
-
|
|
16
11
|
exports.avatarGroupItemClassNames = {
|
|
17
12
|
root: 'fui-AvatarGroupItem',
|
|
18
13
|
avatar: 'fui-AvatarGroupItem__avatar',
|
|
@@ -22,170 +17,157 @@ const avatarGroupItemDividerWidthVar = '--fuiAvatarGroupItem__divider--width';
|
|
|
22
17
|
/**
|
|
23
18
|
* Styles for the root slot
|
|
24
19
|
*/
|
|
25
|
-
|
|
26
20
|
const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
base: {
|
|
22
|
+
Bt984gj: "f122n59",
|
|
23
|
+
mc9l5x: "ftuwxu6",
|
|
24
|
+
Bnnss6s: "fi64zpg",
|
|
25
|
+
qhf8xq: "f10pi13n"
|
|
32
26
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
overflowItem: {
|
|
28
|
+
z8tnut: "f1ywm7hm",
|
|
29
|
+
z189sj: ["f7x41pl", "fruq291"],
|
|
30
|
+
Byoj8tv: "f14wxoun",
|
|
31
|
+
uwmqm3: ["fruq291", "f7x41pl"]
|
|
38
32
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
nonOverflowItem: {
|
|
34
|
+
Bbmb7ep: ["f8fbkgy", "f1nfllo7"],
|
|
35
|
+
Beyfa6y: ["f1nfllo7", "f8fbkgy"],
|
|
36
|
+
B7oj6ja: ["f1djnp8u", "f1s8kh49"],
|
|
37
|
+
Btl43ni: ["f1s8kh49", "f1djnp8u"]
|
|
44
38
|
}
|
|
45
39
|
}, {
|
|
46
|
-
|
|
40
|
+
d: [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f10pi13n{position:relative;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}"]
|
|
47
41
|
});
|
|
48
42
|
/**
|
|
49
43
|
* Styles for the avatar slot
|
|
50
44
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
53
45
|
const useAvatarStyles = /*#__PURE__*/react_1.__styles({
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
nonOverflowItem: {
|
|
47
|
+
qhf8xq: "f1euv43f"
|
|
56
48
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
pie: {
|
|
50
|
+
Bbmb7ep: ["f1krrbdw", "f1deotkl"],
|
|
51
|
+
Beyfa6y: ["f1deotkl", "f1krrbdw"],
|
|
52
|
+
B7oj6ja: ["f10ostut", "f1ozlkrg"],
|
|
53
|
+
Btl43ni: ["f1ozlkrg", "f10ostut"]
|
|
62
54
|
}
|
|
63
55
|
}, {
|
|
64
|
-
|
|
56
|
+
d: [".f1euv43f{position:absolute;}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}"]
|
|
65
57
|
});
|
|
66
58
|
/**
|
|
67
59
|
* Styles for the label slot
|
|
68
60
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
61
|
const useOverflowLabelStyles = /*#__PURE__*/react_1.__styles({
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
base: {
|
|
63
|
+
Frg6f3: ["foyynoy", "f1vcna3q"],
|
|
64
|
+
sj55zd: "f19n0e5",
|
|
65
|
+
Bahqtrf: "fk6fouc",
|
|
66
|
+
Be2twd7: "fkhj508",
|
|
67
|
+
Bhrd7zp: "figsok6",
|
|
68
|
+
Bg96gwp: "f1i3iumi"
|
|
79
69
|
}
|
|
80
70
|
}, {
|
|
81
|
-
|
|
71
|
+
d: [".foyynoy{margin-left:var(--spacingHorizontalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
|
|
82
72
|
});
|
|
83
73
|
/**
|
|
84
74
|
* Styles for the stack layout
|
|
85
75
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
76
|
const useStackStyles = /*#__PURE__*/react_1.__styles({
|
|
89
|
-
|
|
90
|
-
|
|
77
|
+
thick: {
|
|
78
|
+
E5pizo: "foiuzp5"
|
|
91
79
|
},
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
thicker: {
|
|
81
|
+
E5pizo: "f1x6o7w7"
|
|
94
82
|
},
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
thickest: {
|
|
84
|
+
E5pizo: "f2aml1u"
|
|
97
85
|
},
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
xxs: {
|
|
87
|
+
jhia2w: ["f1cjco14", "f13dxjc9"]
|
|
100
88
|
},
|
|
101
|
-
|
|
102
|
-
|
|
89
|
+
xs: {
|
|
90
|
+
jhia2w: ["f15p6bln", "f1bab3ru"]
|
|
103
91
|
},
|
|
104
|
-
|
|
105
|
-
|
|
92
|
+
s: {
|
|
93
|
+
jhia2w: ["f1v53ncc", "f17pu8r8"]
|
|
106
94
|
},
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
l: {
|
|
96
|
+
jhia2w: ["flv48ch", "fnh1ydj"]
|
|
109
97
|
}
|
|
110
98
|
}, {
|
|
111
|
-
|
|
99
|
+
d: [".foiuzp5{box-shadow:0 0 0 var(--strokeWidthThick) var(--colorNeutralBackground2);}", ".f1x6o7w7{box-shadow:0 0 0 var(--strokeWidthThicker) var(--colorNeutralBackground2);}", ".f2aml1u{box-shadow:0 0 0 var(--strokeWidthThickest) var(--colorNeutralBackground2);}", ".f1cjco14:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalXXS));}", ".f13dxjc9:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalXXS));}", ".f15p6bln:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalXS));}", ".f1bab3ru:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalXS));}", ".f1v53ncc:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalS));}", ".f17pu8r8:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalS));}", ".flv48ch:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalL));}", ".fnh1ydj:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalL));}"]
|
|
112
100
|
});
|
|
113
101
|
/**
|
|
114
102
|
* Styles for the spread layout
|
|
115
103
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
104
|
const useSpreadStyles = /*#__PURE__*/react_1.__styles({
|
|
119
|
-
|
|
120
|
-
|
|
105
|
+
s: {
|
|
106
|
+
jhia2w: ["f7lhxv7", "f6ou2b0"]
|
|
121
107
|
},
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
mNudge: {
|
|
109
|
+
jhia2w: ["f1h0okno", "fnnqava"]
|
|
124
110
|
},
|
|
125
|
-
|
|
126
|
-
|
|
111
|
+
m: {
|
|
112
|
+
jhia2w: ["f1wkt588", "f1maio5g"]
|
|
127
113
|
},
|
|
128
|
-
|
|
129
|
-
|
|
114
|
+
l: {
|
|
115
|
+
jhia2w: ["f1l333zn", "f1r41m4c"]
|
|
130
116
|
},
|
|
131
|
-
|
|
132
|
-
|
|
117
|
+
xl: {
|
|
118
|
+
jhia2w: ["fahr13a", "f2n7rbo"]
|
|
133
119
|
}
|
|
134
120
|
}, {
|
|
135
|
-
|
|
121
|
+
d: [".f7lhxv7:not(:first-child){margin-left:var(--spacingHorizontalS);}", ".f6ou2b0:not(:first-child){margin-right:var(--spacingHorizontalS);}", ".f1h0okno:not(:first-child){margin-left:var(--spacingHorizontalMNudge);}", ".fnnqava:not(:first-child){margin-right:var(--spacingHorizontalMNudge);}", ".f1wkt588:not(:first-child){margin-left:var(--spacingHorizontalM);}", ".f1maio5g:not(:first-child){margin-right:var(--spacingHorizontalM);}", ".f1l333zn:not(:first-child){margin-left:var(--spacingHorizontalL);}", ".f1r41m4c:not(:first-child){margin-right:var(--spacingHorizontalL);}", ".fahr13a:not(:first-child){margin-left:var(--spacingHorizontalXL);}", ".f2n7rbo:not(:first-child){margin-right:var(--spacingHorizontalXL);}"]
|
|
136
122
|
});
|
|
137
123
|
/**
|
|
138
124
|
* Styles for the pie layout
|
|
139
125
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
126
|
const usePieStyles = /*#__PURE__*/react_1.__styles({
|
|
143
|
-
|
|
144
|
-
|
|
127
|
+
base: {
|
|
128
|
+
qhf8xq: "f1euv43f"
|
|
145
129
|
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
130
|
+
slices: {
|
|
131
|
+
B3gf25r: "f16m7w7k",
|
|
132
|
+
Be2twx7: ["f1o4hhgz", "fb4gjrz"],
|
|
133
|
+
Bvaow4n: "f1pgb5nx",
|
|
134
|
+
Gpecfs: ["fugirid", "f4sk99m"],
|
|
135
|
+
bhabj1: "fjreaf3",
|
|
136
|
+
B7rc6i7: ["f1k4vw81", "f1w1xcy7"],
|
|
137
|
+
Bwrfys5: "f1ef8vxk",
|
|
138
|
+
Bwuzm9m: ["f1x2qbfv", "f1xwf4nz"],
|
|
139
|
+
fflka: "ff6xuso",
|
|
140
|
+
do7bja: "fzpvk6c",
|
|
141
|
+
Be8zqhl: "f4onu7f",
|
|
142
|
+
Bij0kh0: ["f1ydfez1", "fjensob"],
|
|
143
|
+
Bwexnyt: "f1yv732j",
|
|
144
|
+
Bhe5x6o: "fchq2fj",
|
|
145
|
+
B3kv7bh: "ff5binh"
|
|
162
146
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
147
|
+
rtlSlices: {
|
|
148
|
+
B3gf25r: "f5vdl61",
|
|
149
|
+
Bvaow4n: "f1bnra92",
|
|
150
|
+
bhabj1: "f4ibo7t",
|
|
151
|
+
Bwrfys5: "f17heuis",
|
|
152
|
+
Bwuzm9m: ["f64f2ud", "f1yjglu3"],
|
|
153
|
+
Be8zqhl: "fa6l61x",
|
|
154
|
+
Bij0kh0: ["f1w2396a", "f14ab3yo"]
|
|
171
155
|
},
|
|
172
|
-
|
|
173
|
-
|
|
156
|
+
thick: {
|
|
157
|
+
uiicq7: "fnyfzln"
|
|
174
158
|
},
|
|
175
|
-
|
|
176
|
-
|
|
159
|
+
thicker: {
|
|
160
|
+
uiicq7: "f1xdzzot"
|
|
177
161
|
},
|
|
178
|
-
|
|
179
|
-
|
|
162
|
+
thickest: {
|
|
163
|
+
uiicq7: "f1auhru5"
|
|
180
164
|
}
|
|
181
165
|
}, {
|
|
182
|
-
|
|
166
|
+
d: [".f1euv43f{position:absolute;}", ".f16m7w7k:nth-of-type(1):nth-last-of-type(2){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f1o4hhgz:nth-of-type(1):nth-last-of-type(2){left:-25%;}", ".fb4gjrz:nth-of-type(1):nth-last-of-type(2){right:-25%;}", ".f1pgb5nx:nth-of-type(2):nth-last-of-type(1){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".fugirid:nth-of-type(2):nth-last-of-type(1){left:25%;}", ".f4sk99m:nth-of-type(2):nth-last-of-type(1){right:25%;}", ".fjreaf3:nth-of-type(1):nth-last-of-type(3){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f1k4vw81:nth-of-type(1):nth-last-of-type(3){left:-25%;}", ".f1w1xcy7:nth-of-type(1):nth-last-of-type(3){right:-25%;}", ".f1ef8vxk:nth-of-type(2):nth-last-of-type(2){-webkit-clip-path:inset(0 0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width));clip-path:inset(0 0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width));}", ".f1x2qbfv:nth-of-type(2):nth-last-of-type(2){left:50%;}", ".f1xwf4nz:nth-of-type(2):nth-last-of-type(2){right:50%;}", ".ff6xuso:nth-of-type(2):nth-last-of-type(2){-webkit-transform:scale(0.5);-moz-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5);}", ".fzpvk6c:nth-of-type(2):nth-last-of-type(2){transform-origin:0 0;}", ".f4onu7f:nth-of-type(3):nth-last-of-type(1){-webkit-clip-path:inset(var(--fuiAvatarGroupItem__divider--width) 0 0 var(--fuiAvatarGroupItem__divider--width));clip-path:inset(var(--fuiAvatarGroupItem__divider--width) 0 0 var(--fuiAvatarGroupItem__divider--width));}", ".f1ydfez1:nth-of-type(3):nth-last-of-type(1){left:50%;}", ".fjensob:nth-of-type(3):nth-last-of-type(1){right:50%;}", ".f1yv732j:nth-of-type(3):nth-last-of-type(1){top:50%;}", ".fchq2fj:nth-of-type(3):nth-last-of-type(1){-webkit-transform:scale(0.5);-moz-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5);}", ".ff5binh:nth-of-type(3):nth-last-of-type(1){transform-origin:0 0;}", ".f5vdl61:nth-of-type(1):nth-last-of-type(2){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".f1bnra92:nth-of-type(2):nth-last-of-type(1){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f4ibo7t:nth-of-type(1):nth-last-of-type(3){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".f17heuis:nth-of-type(2):nth-last-of-type(2){-webkit-clip-path:inset(0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0);clip-path:inset(0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0);}", ".f64f2ud:nth-of-type(2):nth-last-of-type(2){left:0;}", ".f1yjglu3:nth-of-type(2):nth-last-of-type(2){right:0;}", ".fa6l61x:nth-of-type(3):nth-last-of-type(1){-webkit-clip-path:inset(var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0 0);clip-path:inset(var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0 0);}", ".f1w2396a:nth-of-type(3):nth-last-of-type(1){left:0;}", ".f14ab3yo:nth-of-type(3):nth-last-of-type(1){right:0;}", ".fnyfzln{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThick);}", ".f1xdzzot{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThicker);}", ".f1auhru5{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThickest);}"]
|
|
183
167
|
});
|
|
184
168
|
/**
|
|
185
169
|
* Apply styling to the AvatarGroupItem slots based on the state
|
|
186
170
|
*/
|
|
187
|
-
|
|
188
|
-
|
|
189
171
|
const useAvatarGroupItemStyles_unstable = state => {
|
|
190
172
|
const {
|
|
191
173
|
isOverflowItem,
|
|
@@ -202,15 +184,12 @@ const useAvatarGroupItemStyles_unstable = state => {
|
|
|
202
184
|
const sizeStyles = Avatar_1.useSizeStyles();
|
|
203
185
|
const groupChildClassName = exports.useGroupChildClassName(layout, size);
|
|
204
186
|
const rootClasses = [rootStyles.base];
|
|
205
|
-
|
|
206
187
|
if (!isOverflowItem) {
|
|
207
188
|
rootClasses.push(rootStyles.nonOverflowItem);
|
|
208
189
|
rootClasses.push(groupChildClassName);
|
|
209
190
|
rootClasses.push(sizeStyles[size]);
|
|
210
|
-
|
|
211
191
|
if (layout === 'pie') {
|
|
212
192
|
rootClasses.push(pieStyles.base);
|
|
213
|
-
|
|
214
193
|
if (size < 56) {
|
|
215
194
|
rootClasses.push(pieStyles.thick);
|
|
216
195
|
} else if (size < 72) {
|
|
@@ -218,9 +197,7 @@ const useAvatarGroupItemStyles_unstable = state => {
|
|
|
218
197
|
} else {
|
|
219
198
|
rootClasses.push(pieStyles.thickest);
|
|
220
199
|
}
|
|
221
|
-
|
|
222
200
|
rootClasses.push(pieStyles.slices);
|
|
223
|
-
|
|
224
201
|
if (dir === 'rtl') {
|
|
225
202
|
rootClasses.push(pieStyles.rtlSlices);
|
|
226
203
|
}
|
|
@@ -228,28 +205,22 @@ const useAvatarGroupItemStyles_unstable = state => {
|
|
|
228
205
|
} else {
|
|
229
206
|
rootClasses.push(rootStyles.overflowItem);
|
|
230
207
|
}
|
|
231
|
-
|
|
232
208
|
state.root.className = react_1.mergeClasses(exports.avatarGroupItemClassNames.root, ...rootClasses, state.root.className);
|
|
233
209
|
state.avatar.className = react_1.mergeClasses(exports.avatarGroupItemClassNames.avatar, !isOverflowItem && avatarStyles.nonOverflowItem, layout === 'pie' && avatarStyles.pie, state.avatar.className);
|
|
234
|
-
|
|
235
210
|
if (state.overflowLabel) {
|
|
236
211
|
state.overflowLabel.className = react_1.mergeClasses(exports.avatarGroupItemClassNames.overflowLabel, overflowLabelStyles.base, state.overflowLabel.className);
|
|
237
212
|
}
|
|
238
|
-
|
|
239
213
|
return state;
|
|
240
214
|
};
|
|
241
|
-
|
|
242
215
|
exports.useAvatarGroupItemStyles_unstable = useAvatarGroupItemStyles_unstable;
|
|
243
216
|
/**
|
|
244
217
|
* Hook for getting the className for the children of AvatarGroup. This hook will provide the spacing and outlines
|
|
245
218
|
* needed for each layout.
|
|
246
219
|
*/
|
|
247
|
-
|
|
248
220
|
const useGroupChildClassName = (layout, size) => {
|
|
249
221
|
const stackStyles = useStackStyles();
|
|
250
222
|
const spreadStyles = useSpreadStyles();
|
|
251
223
|
const layoutClasses = [];
|
|
252
|
-
|
|
253
224
|
if (size) {
|
|
254
225
|
if (layout === 'stack') {
|
|
255
226
|
if (size < 56) {
|
|
@@ -259,7 +230,6 @@ const useGroupChildClassName = (layout, size) => {
|
|
|
259
230
|
} else {
|
|
260
231
|
layoutClasses.push(stackStyles.thickest);
|
|
261
232
|
}
|
|
262
|
-
|
|
263
233
|
if (size < 24) {
|
|
264
234
|
layoutClasses.push(stackStyles.xxs);
|
|
265
235
|
} else if (size < 48) {
|
|
@@ -281,9 +251,7 @@ const useGroupChildClassName = (layout, size) => {
|
|
|
281
251
|
}
|
|
282
252
|
}
|
|
283
253
|
}
|
|
284
|
-
|
|
285
254
|
return react_1.mergeClasses(...layoutClasses);
|
|
286
255
|
};
|
|
287
|
-
|
|
288
256
|
exports.useGroupChildClassName = useGroupChildClassName;
|
|
289
257
|
//# sourceMappingURL=useAvatarGroupItemStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupItem/useAvatarGroupItemStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,QAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AAMa,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE,qBADuE;EAE7E,MAAM,EAAE,6BAFqE;EAG7E,aAAa,EAAE;AAH8D,CAAlE;AAMb,MAAM,8BAA8B,GAAG,sCAAvC;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;AAeA;;AAEG;;;AACH,MAAM,eAAe,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EA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AAI,GAAG,EAAX,EAAe;QACb,aAAa,CAAC,IAAd,CAAmB,YAAY,CAAC,CAAhC;MACD,CAFD,MAEO,IAAI,IAAI,GAAG,EAAX,EAAe;QACpB,aAAa,CAAC,IAAd,CAAmB,YAAY,CAAC,MAAhC;MACD,CAFM,MAEA,IAAI,IAAI,GAAG,EAAX,EAAe;QACpB,aAAa,CAAC,IAAd,CAAmB,YAAY,CAAC,CAAhC;MACD,CAFM,MAEA;QACL,aAAa,CAAC,IAAd,CAAmB,YAAY,CAAC,EAAhC;MACD;IACF;EACF;;EAED,OAAO,OAAA,CAAA,YAAA,CAAa,GAAG,aAAhB,CAAP;AACD,CAtCM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useSizeStyles } from '../../Avatar';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem.types';\nimport type { AvatarGroupProps } from '../../AvatarGroup';\nimport type { AvatarSizes } from '../../Avatar';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const avatarGroupItemClassNames: SlotClassNames<AvatarGroupItemSlots> = {\n root: 'fui-AvatarGroupItem',\n avatar: 'fui-AvatarGroupItem__avatar',\n overflowLabel: 'fui-AvatarGroupItem__overflowLabel',\n};\n\nconst avatarGroupItemDividerWidthVar = '--fuiAvatarGroupItem__divider--width';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n flexShrink: 0,\n position: 'relative',\n },\n overflowItem: {\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalXS),\n },\n nonOverflowItem: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\n/**\n * Styles for the avatar slot\n */\nconst useAvatarStyles = makeStyles({\n nonOverflowItem: {\n position: 'absolute',\n },\n pie: {\n ...shorthands.borderRadius(0),\n },\n});\n\n/**\n * Styles for the label slot\n */\nconst useOverflowLabelStyles = makeStyles({\n base: {\n marginLeft: tokens.spacingHorizontalS,\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Styles for the stack layout\n */\nconst useStackStyles = makeStyles({\n thick: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorNeutralBackground2}`,\n },\n thicker: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorNeutralBackground2}`,\n },\n thickest: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorNeutralBackground2}`,\n },\n xxs: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalXXS})` } },\n xs: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalXS})` } },\n s: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalS})` } },\n l: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalL})` } },\n});\n\n/**\n * Styles for the spread layout\n */\nconst useSpreadStyles = makeStyles({\n s: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalS } },\n mNudge: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalMNudge } },\n m: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalM } },\n l: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalL } },\n xl: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalXL } },\n});\n\n/**\n * Styles for the pie layout\n */\nconst usePieStyles = makeStyles({\n base: {\n position: 'absolute',\n },\n slices: {\n // Two slices\n // 1st of 2 items\n '&:nth-of-type(1):nth-last-of-type(2)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n left: '-25%',\n },\n // 2nd of 2 items\n '&:nth-of-type(2):nth-last-of-type(1)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n left: '25%',\n },\n\n // Three slices\n // 1st of 3 items\n '&:nth-of-type(1):nth-last-of-type(3)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n left: '-25%',\n },\n // 2nd of 3 items\n '&:nth-of-type(2):nth-last-of-type(2)': {\n // Since the two AvatarGroupItems on the right are scaled by 0.5, the divider width should not be halved.\n clipPath: `inset(0 0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}))`,\n left: '50%',\n transform: 'scale(0.5)',\n transformOrigin: '0 0',\n },\n // 3rd of 3 items\n '&:nth-of-type(3):nth-last-of-type(1)': {\n clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) 0 0 var(${avatarGroupItemDividerWidthVar}))`,\n left: '50%',\n top: '50%',\n transform: 'scale(0.5)',\n transformOrigin: '0 0',\n },\n },\n rtlSlices: {\n // Two slices\n // 1st of 2 items\n '&:nth-of-type(1):nth-last-of-type(2)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n },\n // 2nd of 2 items\n '&:nth-of-type(2):nth-last-of-type(1)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n },\n\n // Three slices\n // 1st of 3 items\n '&:nth-of-type(1):nth-last-of-type(3)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n },\n // 2nd of 3 items\n '&:nth-of-type(2):nth-last-of-type(2)': {\n clipPath: `inset(0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0)`,\n left: '0',\n },\n // 3rd of 3 items\n '&:nth-of-type(3):nth-last-of-type(1)': {\n clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0 0)`,\n left: '0',\n },\n },\n thick: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThick },\n thicker: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThicker },\n thickest: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThickest },\n});\n\n/**\n * Apply styling to the AvatarGroupItem slots based on the state\n */\nexport const useAvatarGroupItemStyles_unstable = (state: AvatarGroupItemState): AvatarGroupItemState => {\n const { isOverflowItem, layout, size } = state;\n const { dir } = useFluent();\n\n const avatarStyles = useAvatarStyles();\n const overflowLabelStyles = useOverflowLabelStyles();\n const pieStyles = usePieStyles();\n const rootStyles = useRootStyles();\n const sizeStyles = useSizeStyles();\n\n const groupChildClassName = useGroupChildClassName(layout, size);\n\n const rootClasses = [rootStyles.base];\n\n if (!isOverflowItem) {\n rootClasses.push(rootStyles.nonOverflowItem);\n rootClasses.push(groupChildClassName);\n rootClasses.push(sizeStyles[size]);\n\n if (layout === 'pie') {\n rootClasses.push(pieStyles.base);\n\n if (size < 56) {\n rootClasses.push(pieStyles.thick);\n } else if (size < 72) {\n rootClasses.push(pieStyles.thicker);\n } else {\n rootClasses.push(pieStyles.thickest);\n }\n\n rootClasses.push(pieStyles.slices);\n\n if (dir === 'rtl') {\n rootClasses.push(pieStyles.rtlSlices);\n }\n }\n } else {\n rootClasses.push(rootStyles.overflowItem);\n }\n\n state.root.className = mergeClasses(avatarGroupItemClassNames.root, ...rootClasses, state.root.className);\n\n state.avatar.className = mergeClasses(\n avatarGroupItemClassNames.avatar,\n !isOverflowItem && avatarStyles.nonOverflowItem,\n layout === 'pie' && avatarStyles.pie,\n state.avatar.className,\n );\n\n if (state.overflowLabel) {\n state.overflowLabel.className = mergeClasses(\n avatarGroupItemClassNames.overflowLabel,\n overflowLabelStyles.base,\n state.overflowLabel.className,\n );\n }\n\n return state;\n};\n\n/**\n * Hook for getting the className for the children of AvatarGroup. This hook will provide the spacing and outlines\n * needed for each layout.\n */\nexport const useGroupChildClassName = (layout: AvatarGroupProps['layout'], size: AvatarSizes): string => {\n const stackStyles = useStackStyles();\n const spreadStyles = useSpreadStyles();\n const layoutClasses = [];\n\n if (size) {\n if (layout === 'stack') {\n if (size < 56) {\n layoutClasses.push(stackStyles.thick);\n } else if (size < 72) {\n layoutClasses.push(stackStyles.thicker);\n } else {\n layoutClasses.push(stackStyles.thickest);\n }\n\n if (size < 24) {\n layoutClasses.push(stackStyles.xxs);\n } else if (size < 48) {\n layoutClasses.push(stackStyles.xs);\n } else if (size < 96) {\n layoutClasses.push(stackStyles.s);\n } else {\n layoutClasses.push(stackStyles.l);\n }\n } else if (layout === 'spread') {\n if (size < 20) {\n layoutClasses.push(spreadStyles.s);\n } else if (size < 32) {\n layoutClasses.push(spreadStyles.mNudge);\n } else if (size < 64) {\n layoutClasses.push(spreadStyles.l);\n } else {\n layoutClasses.push(spreadStyles.xl);\n }\n }\n }\n\n return mergeClasses(...layoutClasses);\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAMaA,iCAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,MAAM,EAAE,6BAA6B;EACrCC,aAAa,EAAE;CAChB;AAED,MAAMC,8BAA8B,GAAG,sCAAsC;AAE7E;;;AAGA,MAAMC,aAAa,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAa9B;AAEF;;;AAGA,MAAMC,eAAe,gBAAGD,gBAAU;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAOhC;AAEF;;;AAGA,MAAME,sBAAsB,gBAAGF,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAMvC;AAEF;;;AAGA,MAA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Aa,CAACb,IAAI,CAACY,YAAY,CAACK,CAAC,CAAC;OACnC,MAAM;QACLJ,aAAa,CAACb,IAAI,CAACY,YAAY,CAACO,EAAE,CAAC;;;;EAKzC,OAAOzC,oBAAY,CAAC,GAAGmC,aAAa,CAAC;AACvC,CAAC;AAtCYzC,8BAAsB","names":["exports","root","avatar","overflowLabel","avatarGroupItemDividerWidthVar","useRootStyles","react_1","useAvatarStyles","useOverflowLabelStyles","useStackStyles","useSpreadStyles","usePieStyles","useAvatarGroupItemStyles_unstable","state","isOverflowItem","layout","size","dir","react_shared_contexts_1","avatarStyles","overflowLabelStyles","pieStyles","rootStyles","sizeStyles","Avatar_1","groupChildClassName","rootClasses","base","push","nonOverflowItem","thick","thicker","thickest","slices","rtlSlices","overflowItem","className","pie","useGroupChildClassName","stackStyles","spreadStyles","layoutClasses","xxs","xs","s","l","mNudge","xl"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupItem/useAvatarGroupItemStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useSizeStyles } from '../../Avatar';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem.types';\nimport type { AvatarGroupProps } from '../../AvatarGroup';\nimport type { AvatarSizes } from '../../Avatar';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const avatarGroupItemClassNames: SlotClassNames<AvatarGroupItemSlots> = {\n root: 'fui-AvatarGroupItem',\n avatar: 'fui-AvatarGroupItem__avatar',\n overflowLabel: 'fui-AvatarGroupItem__overflowLabel',\n};\n\nconst avatarGroupItemDividerWidthVar = '--fuiAvatarGroupItem__divider--width';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n flexShrink: 0,\n position: 'relative',\n },\n overflowItem: {\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalXS),\n },\n nonOverflowItem: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\n/**\n * Styles for the avatar slot\n */\nconst useAvatarStyles = makeStyles({\n nonOverflowItem: {\n position: 'absolute',\n },\n pie: {\n ...shorthands.borderRadius(0),\n },\n});\n\n/**\n * Styles for the label slot\n */\nconst useOverflowLabelStyles = makeStyles({\n base: {\n marginLeft: tokens.spacingHorizontalS,\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Styles for the stack layout\n */\nconst useStackStyles = makeStyles({\n thick: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorNeutralBackground2}`,\n },\n thicker: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorNeutralBackground2}`,\n },\n thickest: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorNeutralBackground2}`,\n },\n xxs: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalXXS})` } },\n xs: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalXS})` } },\n s: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalS})` } },\n l: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalL})` } },\n});\n\n/**\n * Styles for the spread layout\n */\nconst useSpreadStyles = makeStyles({\n s: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalS } },\n mNudge: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalMNudge } },\n m: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalM } },\n l: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalL } },\n xl: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalXL } },\n});\n\n/**\n * Styles for the pie layout\n */\nconst usePieStyles = makeStyles({\n base: {\n position: 'absolute',\n },\n slices: {\n // Two slices\n // 1st of 2 items\n '&:nth-of-type(1):nth-last-of-type(2)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n left: '-25%',\n },\n // 2nd of 2 items\n '&:nth-of-type(2):nth-last-of-type(1)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n left: '25%',\n },\n\n // Three slices\n // 1st of 3 items\n '&:nth-of-type(1):nth-last-of-type(3)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n left: '-25%',\n },\n // 2nd of 3 items\n '&:nth-of-type(2):nth-last-of-type(2)': {\n // Since the two AvatarGroupItems on the right are scaled by 0.5, the divider width should not be halved.\n clipPath: `inset(0 0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}))`,\n left: '50%',\n transform: 'scale(0.5)',\n transformOrigin: '0 0',\n },\n // 3rd of 3 items\n '&:nth-of-type(3):nth-last-of-type(1)': {\n clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) 0 0 var(${avatarGroupItemDividerWidthVar}))`,\n left: '50%',\n top: '50%',\n transform: 'scale(0.5)',\n transformOrigin: '0 0',\n },\n },\n rtlSlices: {\n // Two slices\n // 1st of 2 items\n '&:nth-of-type(1):nth-last-of-type(2)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n },\n // 2nd of 2 items\n '&:nth-of-type(2):nth-last-of-type(1)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n },\n\n // Three slices\n // 1st of 3 items\n '&:nth-of-type(1):nth-last-of-type(3)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n },\n // 2nd of 3 items\n '&:nth-of-type(2):nth-last-of-type(2)': {\n clipPath: `inset(0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0)`,\n left: '0',\n },\n // 3rd of 3 items\n '&:nth-of-type(3):nth-last-of-type(1)': {\n clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0 0)`,\n left: '0',\n },\n },\n thick: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThick },\n thicker: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThicker },\n thickest: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThickest },\n});\n\n/**\n * Apply styling to the AvatarGroupItem slots based on the state\n */\nexport const useAvatarGroupItemStyles_unstable = (state: AvatarGroupItemState): AvatarGroupItemState => {\n const { isOverflowItem, layout, size } = state;\n const { dir } = useFluent();\n\n const avatarStyles = useAvatarStyles();\n const overflowLabelStyles = useOverflowLabelStyles();\n const pieStyles = usePieStyles();\n const rootStyles = useRootStyles();\n const sizeStyles = useSizeStyles();\n\n const groupChildClassName = useGroupChildClassName(layout, size);\n\n const rootClasses = [rootStyles.base];\n\n if (!isOverflowItem) {\n rootClasses.push(rootStyles.nonOverflowItem);\n rootClasses.push(groupChildClassName);\n rootClasses.push(sizeStyles[size]);\n\n if (layout === 'pie') {\n rootClasses.push(pieStyles.base);\n\n if (size < 56) {\n rootClasses.push(pieStyles.thick);\n } else if (size < 72) {\n rootClasses.push(pieStyles.thicker);\n } else {\n rootClasses.push(pieStyles.thickest);\n }\n\n rootClasses.push(pieStyles.slices);\n\n if (dir === 'rtl') {\n rootClasses.push(pieStyles.rtlSlices);\n }\n }\n } else {\n rootClasses.push(rootStyles.overflowItem);\n }\n\n state.root.className = mergeClasses(avatarGroupItemClassNames.root, ...rootClasses, state.root.className);\n\n state.avatar.className = mergeClasses(\n avatarGroupItemClassNames.avatar,\n !isOverflowItem && avatarStyles.nonOverflowItem,\n layout === 'pie' && avatarStyles.pie,\n state.avatar.className,\n );\n\n if (state.overflowLabel) {\n state.overflowLabel.className = mergeClasses(\n avatarGroupItemClassNames.overflowLabel,\n overflowLabelStyles.base,\n state.overflowLabel.className,\n );\n }\n\n return state;\n};\n\n/**\n * Hook for getting the className for the children of AvatarGroup. This hook will provide the spacing and outlines\n * needed for each layout.\n */\nexport const useGroupChildClassName = (layout: AvatarGroupProps['layout'], size: AvatarSizes): string => {\n const stackStyles = useStackStyles();\n const spreadStyles = useSpreadStyles();\n const layoutClasses = [];\n\n if (size) {\n if (layout === 'stack') {\n if (size < 56) {\n layoutClasses.push(stackStyles.thick);\n } else if (size < 72) {\n layoutClasses.push(stackStyles.thicker);\n } else {\n layoutClasses.push(stackStyles.thickest);\n }\n\n if (size < 24) {\n layoutClasses.push(stackStyles.xxs);\n } else if (size < 48) {\n layoutClasses.push(stackStyles.xs);\n } else if (size < 96) {\n layoutClasses.push(stackStyles.s);\n } else {\n layoutClasses.push(stackStyles.l);\n }\n } else if (layout === 'spread') {\n if (size < 20) {\n layoutClasses.push(spreadStyles.s);\n } else if (size < 32) {\n layoutClasses.push(spreadStyles.mNudge);\n } else if (size < 64) {\n layoutClasses.push(spreadStyles.l);\n } else {\n layoutClasses.push(spreadStyles.xl);\n }\n }\n }\n\n return mergeClasses(...layoutClasses);\n};\n"]}
|
|
@@ -4,26 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AvatarGroupPopover = void 0;
|
|
7
|
-
|
|
8
7
|
const renderAvatarGroupPopover_1 = /*#__PURE__*/require("./renderAvatarGroupPopover");
|
|
9
|
-
|
|
10
8
|
const useAvatarGroupPopoverContextValues_1 = /*#__PURE__*/require("./useAvatarGroupPopoverContextValues");
|
|
11
|
-
|
|
12
9
|
const useAvatarGroupPopover_1 = /*#__PURE__*/require("./useAvatarGroupPopover");
|
|
13
|
-
|
|
14
10
|
const useAvatarGroupPopoverStyles_1 = /*#__PURE__*/require("./useAvatarGroupPopoverStyles");
|
|
15
11
|
/**
|
|
16
12
|
* The AvatarGroupPopover component provides a button with a Popover containing the children provided.
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
14
|
const AvatarGroupPopover = props => {
|
|
21
15
|
const state = useAvatarGroupPopover_1.useAvatarGroupPopover_unstable(props);
|
|
22
16
|
const contextValues = useAvatarGroupPopoverContextValues_1.useAvatarGroupPopoverContextValues(state);
|
|
23
17
|
useAvatarGroupPopoverStyles_1.useAvatarGroupPopoverStyles_unstable(state);
|
|
24
18
|
return renderAvatarGroupPopover_1.renderAvatarGroupPopover_unstable(state, contextValues);
|
|
25
19
|
};
|
|
26
|
-
|
|
27
20
|
exports.AvatarGroupPopover = AvatarGroupPopover;
|
|
28
21
|
exports.AvatarGroupPopover.displayName = 'AvatarGroupPopover';
|
|
29
22
|
//# sourceMappingURL=AvatarGroupPopover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AACA;AACA;AACA;AACA;AAGA;;;AAGO,MAAMA,kBAAkB,GAAsCC,KAAK,IAAG;EAC3E,MAAMC,KAAK,GAAGC,sDAA8B,CAACF,KAAK,CAAC;EACnD,MAAMG,aAAa,GAAGC,uEAAkC,CAACH,KAAK,CAAC;EAE/DI,kEAAoC,CAACJ,KAAK,CAAC;EAC3C,OAAOK,4DAAiC,CAACL,KAAK,EAAEE,aAAa,CAAC;AAChE,CAAC;AANYI,0BAAkB;AAQ/BA,0BAAkB,CAACC,WAAW,GAAG,oBAAoB","names":["AvatarGroupPopover","props","state","useAvatarGroupPopover_1","contextValues","useAvatarGroupPopoverContextValues_1","useAvatarGroupPopoverStyles_1","renderAvatarGroupPopover_1","exports","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/AvatarGroupPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAvatarGroupPopover_unstable } from './renderAvatarGroupPopover';\nimport { useAvatarGroupPopoverContextValues } from './useAvatarGroupPopoverContextValues';\nimport { useAvatarGroupPopover_unstable } from './useAvatarGroupPopover';\nimport { useAvatarGroupPopoverStyles_unstable } from './useAvatarGroupPopoverStyles';\nimport type { AvatarGroupPopoverProps } from './AvatarGroupPopover.types';\n\n/**\n * The AvatarGroupPopover component provides a button with a Popover containing the children provided.\n */\nexport const AvatarGroupPopover: React.FC<AvatarGroupPopoverProps> = props => {\n const state = useAvatarGroupPopover_unstable(props);\n const contextValues = useAvatarGroupPopoverContextValues(state);\n\n useAvatarGroupPopoverStyles_unstable(state);\n return renderAvatarGroupPopover_unstable(state, contextValues);\n};\n\nAvatarGroupPopover.displayName = 'AvatarGroupPopover';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
7
|
tslib_1.__exportStar(require("./AvatarGroupPopover"), exports);
|
|
10
|
-
|
|
11
8
|
tslib_1.__exportStar(require("./AvatarGroupPopover.types"), exports);
|
|
12
|
-
|
|
13
9
|
tslib_1.__exportStar(require("./renderAvatarGroupPopover"), exports);
|
|
14
|
-
|
|
15
10
|
tslib_1.__exportStar(require("./useAvatarGroupPopover"), exports);
|
|
16
|
-
|
|
17
11
|
tslib_1.__exportStar(require("./useAvatarGroupPopoverStyles"), exports);
|
|
18
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/index.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/index.ts"],"sourcesContent":["export * from './AvatarGroupPopover';\nexport * from './AvatarGroupPopover.types';\nexport * from './renderAvatarGroupPopover';\nexport * from './useAvatarGroupPopover';\nexport * from './useAvatarGroupPopoverStyles';\n"]}
|
|
@@ -4,35 +4,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderAvatarGroupPopover_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const AvatarGroupContext_1 = /*#__PURE__*/require("../../contexts/AvatarGroupContext");
|
|
11
|
-
|
|
12
9
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
13
|
-
|
|
14
10
|
const react_popover_1 = /*#__PURE__*/require("@fluentui/react-popover");
|
|
15
11
|
/**
|
|
16
12
|
* Render the final JSX of AvatarGroupPopover
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
14
|
const renderAvatarGroupPopover_unstable = (state, contextValues) => {
|
|
21
15
|
const {
|
|
22
16
|
slots,
|
|
23
17
|
slotProps
|
|
24
18
|
} = react_utilities_1.getSlots(state);
|
|
25
|
-
return React.createElement(slots.root, {
|
|
19
|
+
return React.createElement(slots.root, {
|
|
20
|
+
...slotProps.root
|
|
26
21
|
}, React.createElement(react_popover_1.PopoverTrigger, {
|
|
27
22
|
disableButtonEnhancement: true
|
|
28
|
-
}, React.createElement(slots.tooltip, {
|
|
29
|
-
|
|
30
|
-
}
|
|
23
|
+
}, React.createElement(slots.tooltip, {
|
|
24
|
+
...slotProps.tooltip
|
|
25
|
+
}, React.createElement(slots.triggerButton, {
|
|
26
|
+
...slotProps.triggerButton
|
|
27
|
+
}))), React.createElement(slots.popoverSurface, {
|
|
28
|
+
...slotProps.popoverSurface
|
|
31
29
|
}, React.createElement(AvatarGroupContext_1.AvatarGroupProvider, {
|
|
32
30
|
value: contextValues.avatarGroup
|
|
33
|
-
}, React.createElement(slots.content, {
|
|
31
|
+
}, React.createElement(slots.content, {
|
|
32
|
+
...slotProps.content
|
|
34
33
|
}))));
|
|
35
34
|
};
|
|
36
|
-
|
|
37
35
|
exports.renderAvatarGroupPopover_unstable = renderAvatarGroupPopover_unstable;
|
|
38
36
|
//# sourceMappingURL=renderAvatarGroupPopover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAIA;;;AAGO,MAAMA,iCAAiC,GAAG,CAC/CC,KAA8B,EAC9BC,aAAuC,KACrC;EACF,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAA0BJ,KAAK,CAAC;EAErE,OACEK,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAMH,SAAS,CAACG;EAAqB,GAC9CD,oBAACE,8BAAc;IAACC,wBAAwB;EAAA,GACtCH,oBAACH,KAAK,CAACO,OAAO;IAAA,GAAMN,SAAS,CAACM;EAAwB,GACpDJ,oBAACH,KAAK,CAACQ,aAAa;IAAA,GAAKP,SAAS,CAACO;EAAa,EAAI,CACtC,CACD,EACjBL,oBAACH,KAAK,CAACS,cAAc;IAAA,GAAKR,SAAS,CAACQ;EAAc,GAChDN,oBAACO,wCAAmB;IAACC,KAAK,EAAEZ,aAAa,CAACa;EAAW,GACnDT,oBAACH,KAAK,CAACa,OAAO;IAAA,GAAKZ,SAAS,CAACY;EAAO,EAAI,CACpB,CACD,CACZ;AAEjB,CAAC;AApBYC,yCAAiC","names":["renderAvatarGroupPopover_unstable","state","contextValues","slots","slotProps","react_utilities_1","React","root","react_popover_1","disableButtonEnhancement","tooltip","triggerButton","popoverSurface","AvatarGroupContext_1","value","avatarGroup","content","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/renderAvatarGroupPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { AvatarGroupProvider } from '../../contexts/AvatarGroupContext';\nimport { AvatarGroupContextValues } from '../AvatarGroup/AvatarGroup.types';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { PopoverProps, PopoverTrigger } from '@fluentui/react-popover';\nimport { TooltipProps } from '@fluentui/react-tooltip';\nimport type { AvatarGroupPopoverState, AvatarGroupPopoverSlots } from './AvatarGroupPopover.types';\n\n/**\n * Render the final JSX of AvatarGroupPopover\n */\nexport const renderAvatarGroupPopover_unstable = (\n state: AvatarGroupPopoverState,\n contextValues: AvatarGroupContextValues,\n) => {\n const { slots, slotProps } = getSlots<AvatarGroupPopoverSlots>(state);\n\n return (\n <slots.root {...(slotProps.root as PopoverProps)}>\n <PopoverTrigger disableButtonEnhancement>\n <slots.tooltip {...(slotProps.tooltip as TooltipProps)}>\n <slots.triggerButton {...slotProps.triggerButton} />\n </slots.tooltip>\n </PopoverTrigger>\n <slots.popoverSurface {...slotProps.popoverSurface}>\n <AvatarGroupProvider value={contextValues.avatarGroup}>\n <slots.content {...slotProps.content} />\n </AvatarGroupProvider>\n </slots.popoverSurface>\n </slots.root>\n );\n};\n"]}
|