@fluentui/react-avatar 9.0.1 → 9.0.4
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 +212 -1
- package/CHANGELOG.md +50 -2
- package/MIGRATION-AvatarGroup.md +35 -0
- package/README-AvatarGroup.md +39 -0
- package/README.md +16 -11
- package/SPEC.md +1 -135
- package/dist/index.d.ts +49 -1
- package/lib/AvatarGroupOverflow.js +2 -0
- package/lib/AvatarGroupOverflow.js.map +1 -0
- package/lib/components/Avatar/useAvatarStyles.js +25 -3
- package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
- package/lib/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
- package/lib/components/AvatarGroup/renderAvatarGroup.js +4 -3
- package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroup.js +10 -11
- package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroupStyles.js +54 -45
- package/lib/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.js +15 -0
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js +2 -0
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/index.js +6 -0
- package/lib/components/AvatarGroupOverflow/index.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js +16 -0
- package/lib/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflow.js +27 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflow.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js +27 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js.map +1 -0
- package/lib/contexts/AvatarGroupContext.js +1 -0
- package/lib/contexts/AvatarGroupContext.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/AvatarGroupOverflow.js +10 -0
- package/lib-commonjs/AvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/Avatar/useAvatarStyles.js +25 -3
- package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js +4 -3
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js +10 -12
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js +54 -45
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.js +26 -0
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js +6 -0
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/index.js +18 -0
- package/lib-commonjs/components/AvatarGroupOverflow/index.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js +27 -0
- package/lib-commonjs/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflow.js +37 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js +37 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js.map +1 -0
- package/lib-commonjs/contexts/AvatarGroupContext.js +1 -0
- package/lib-commonjs/contexts/AvatarGroupContext.js.map +1 -1
- package/lib-commonjs/index.js +4 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +12 -11
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,218 @@
|
|
|
2
2
|
"name": "@fluentui/react-avatar",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 03 Aug 2022 16:00:05 GMT",
|
|
6
|
+
"tag": "@fluentui/react-avatar_v9.0.4",
|
|
7
|
+
"version": "9.0.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-avatar",
|
|
13
|
+
"commit": "d966ea3d9169f2e8d69f0d2a4daf86fe4ca328d6",
|
|
14
|
+
"comment": "disables eslint rule @fluentui/no-context-default-value for local component context"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "lingfangao@hotmail.com",
|
|
18
|
+
"package": "@fluentui/react-avatar",
|
|
19
|
+
"commit": "99cc385631d04a76ee10ebc143cb9fecd99640b6",
|
|
20
|
+
"comment": "chore: Add `prerelease` as disallowed changetype for 9.0.0 packages"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "esteban.230@hotmail.com",
|
|
24
|
+
"package": "@fluentui/react-avatar",
|
|
25
|
+
"commit": "8d120219d3605abf8feff95eaff52ab01851618e",
|
|
26
|
+
"comment": "chore: Creating AvatarGroupOverflow component boilerplate."
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"patch": [
|
|
30
|
+
{
|
|
31
|
+
"author": "sarah.higley@microsoft.com",
|
|
32
|
+
"package": "@fluentui/react-avatar",
|
|
33
|
+
"commit": "c66808887bcd7fd150c22eda462b325075742694",
|
|
34
|
+
"comment": "bugfix: add reduced motion styles for avatar, spinner, switch, and input focus styles"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"author": "miroslav.stastny@microsoft.com",
|
|
38
|
+
"package": "@fluentui/react-avatar",
|
|
39
|
+
"commit": "08563664778fd80284561d3c9d254307a0a32362",
|
|
40
|
+
"comment": "chore: Bump Griffel dependencies"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"author": "beachball",
|
|
44
|
+
"package": "@fluentui/react-avatar",
|
|
45
|
+
"comment": "Bump @fluentui/react-badge to v9.0.4",
|
|
46
|
+
"commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"author": "beachball",
|
|
50
|
+
"package": "@fluentui/react-avatar",
|
|
51
|
+
"comment": "Bump @fluentui/react-popover to v9.0.4",
|
|
52
|
+
"commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"author": "beachball",
|
|
56
|
+
"package": "@fluentui/react-avatar",
|
|
57
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.0",
|
|
58
|
+
"commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"author": "beachball",
|
|
62
|
+
"package": "@fluentui/react-avatar",
|
|
63
|
+
"comment": "Bump @fluentui/react-tooltip to v9.0.4",
|
|
64
|
+
"commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"author": "beachball",
|
|
68
|
+
"package": "@fluentui/react-avatar",
|
|
69
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
|
|
70
|
+
"commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"date": "Thu, 14 Jul 2022 21:21:08 GMT",
|
|
77
|
+
"tag": "@fluentui/react-avatar_v9.0.3",
|
|
78
|
+
"version": "9.0.3",
|
|
79
|
+
"comments": {
|
|
80
|
+
"patch": [
|
|
81
|
+
{
|
|
82
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
83
|
+
"package": "@fluentui/react-avatar",
|
|
84
|
+
"commit": "802bc4e3730a88b0fc61b5bf42ef7fc6b6543fe2",
|
|
85
|
+
"comment": "fix: Fixing bad version bump of @fluentui/react-utilities."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"author": "beachball",
|
|
89
|
+
"package": "@fluentui/react-avatar",
|
|
90
|
+
"comment": "Bump @fluentui/react-badge to v9.0.3",
|
|
91
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"author": "beachball",
|
|
95
|
+
"package": "@fluentui/react-avatar",
|
|
96
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.2",
|
|
97
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"author": "beachball",
|
|
101
|
+
"package": "@fluentui/react-avatar",
|
|
102
|
+
"comment": "Bump @fluentui/react-popover to v9.0.3",
|
|
103
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"author": "beachball",
|
|
107
|
+
"package": "@fluentui/react-avatar",
|
|
108
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.3",
|
|
109
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"author": "beachball",
|
|
113
|
+
"package": "@fluentui/react-avatar",
|
|
114
|
+
"comment": "Bump @fluentui/react-tooltip to v9.0.3",
|
|
115
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"author": "beachball",
|
|
119
|
+
"package": "@fluentui/react-avatar",
|
|
120
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.2",
|
|
121
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"date": "Thu, 14 Jul 2022 17:06:13 GMT",
|
|
128
|
+
"tag": "@fluentui/react-avatar_v9.0.2",
|
|
129
|
+
"version": "9.0.2",
|
|
130
|
+
"comments": {
|
|
131
|
+
"none": [
|
|
132
|
+
{
|
|
133
|
+
"author": "esteban.230@hotmail.com",
|
|
134
|
+
"package": "@fluentui/react-avatar",
|
|
135
|
+
"commit": "157355880d28bb1d72726c96a6395be0a99950f3",
|
|
136
|
+
"comment": "chore: Adding unit tests for AvatarGroup. "
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"author": "esteban.230@hotmail.com",
|
|
140
|
+
"package": "@fluentui/react-avatar",
|
|
141
|
+
"commit": "dad21ca4232d5ef93e166e6f5c6f786d131abe3b",
|
|
142
|
+
"comment": "docs: Adding readme and migration guide for AvatarGroup."
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
146
|
+
"package": "@fluentui/react-avatar",
|
|
147
|
+
"commit": "422636fffd66758c1a6dd617063582d902b61927",
|
|
148
|
+
"comment": "docs: README and Avatar spec cleanup."
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"patch": [
|
|
152
|
+
{
|
|
153
|
+
"author": "ololubek@microsoft.com",
|
|
154
|
+
"package": "@fluentui/react-avatar",
|
|
155
|
+
"commit": "63ab03fa7a9b3d02204147ea5356b8f78751df42",
|
|
156
|
+
"comment": "chore: Update @fluentui/react-icons dependency to v2.0.175"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"author": "esteban.230@hotmail.com",
|
|
160
|
+
"package": "@fluentui/react-avatar",
|
|
161
|
+
"commit": "7a1737f0db893a5c623c30d81745f8e41c9ef79b",
|
|
162
|
+
"comment": "fix: Remove override of role=list in AvatarGroup's PopoverSurface and fix trapFocus when Popover is triggered."
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"author": "esteban.230@hotmail.com",
|
|
166
|
+
"package": "@fluentui/react-avatar",
|
|
167
|
+
"commit": "e1b98936707f64ff4088ceba4577f76085001687",
|
|
168
|
+
"comment": "fix: Fixing focus indicator for pie layouts."
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"author": "beachball",
|
|
172
|
+
"package": "@fluentui/react-avatar",
|
|
173
|
+
"comment": "Bump @fluentui/react-badge to v9.0.2",
|
|
174
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"author": "beachball",
|
|
178
|
+
"package": "@fluentui/react-avatar",
|
|
179
|
+
"comment": "Bump @fluentui/react-context-selector to v9.0.1",
|
|
180
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"author": "beachball",
|
|
184
|
+
"package": "@fluentui/react-avatar",
|
|
185
|
+
"comment": "Bump @fluentui/react-popover to v9.0.2",
|
|
186
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"author": "beachball",
|
|
190
|
+
"package": "@fluentui/react-avatar",
|
|
191
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.2",
|
|
192
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"author": "beachball",
|
|
196
|
+
"package": "@fluentui/react-avatar",
|
|
197
|
+
"comment": "Bump @fluentui/react-tooltip to v9.0.2",
|
|
198
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"author": "beachball",
|
|
202
|
+
"package": "@fluentui/react-avatar",
|
|
203
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.1-0",
|
|
204
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"author": "beachball",
|
|
208
|
+
"package": "@fluentui/react-avatar",
|
|
209
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11",
|
|
210
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"date": "Tue, 28 Jun 2022 17:39:46 GMT",
|
|
6
217
|
"tag": "@fluentui/react-avatar_v9.0.1",
|
|
7
218
|
"version": "9.0.1",
|
|
8
219
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,60 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-avatar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 03 Aug 2022 16:00:05 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.4)
|
|
8
|
+
|
|
9
|
+
Wed, 03 Aug 2022 16:00:05 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.3..@fluentui/react-avatar_v9.0.4)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- bugfix: add reduced motion styles for avatar, spinner, switch, and input focus styles ([PR #23788](https://github.com/microsoft/fluentui/pull/23788) by sarah.higley@microsoft.com)
|
|
15
|
+
- chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-badge to v9.0.4 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
|
|
17
|
+
- Bump @fluentui/react-popover to v9.0.4 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tabster to v9.1.0 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
|
|
19
|
+
- Bump @fluentui/react-tooltip to v9.0.4 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
|
|
20
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
|
|
21
|
+
|
|
22
|
+
## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.3)
|
|
23
|
+
|
|
24
|
+
Thu, 14 Jul 2022 21:21:08 GMT
|
|
25
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.2..@fluentui/react-avatar_v9.0.3)
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
|
|
30
|
+
- Bump @fluentui/react-badge to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
31
|
+
- Bump @fluentui/react-context-selector to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
32
|
+
- Bump @fluentui/react-popover to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
33
|
+
- Bump @fluentui/react-tabster to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
34
|
+
- Bump @fluentui/react-tooltip to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
35
|
+
- Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
|
36
|
+
|
|
37
|
+
## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.2)
|
|
38
|
+
|
|
39
|
+
Thu, 14 Jul 2022 17:06:13 GMT
|
|
40
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.1..@fluentui/react-avatar_v9.0.2)
|
|
41
|
+
|
|
42
|
+
### Patches
|
|
43
|
+
|
|
44
|
+
- chore: Update @fluentui/react-icons dependency to v2.0.175 ([PR #23812](https://github.com/microsoft/fluentui/pull/23812) by ololubek@microsoft.com)
|
|
45
|
+
- fix: Remove override of role=list in AvatarGroup's PopoverSurface and fix trapFocus when Popover is triggered. ([PR #23823](https://github.com/microsoft/fluentui/pull/23823) by esteban.230@hotmail.com)
|
|
46
|
+
- fix: Fixing focus indicator for pie layouts. ([PR #23860](https://github.com/microsoft/fluentui/pull/23860) by esteban.230@hotmail.com)
|
|
47
|
+
- Bump @fluentui/react-badge to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
48
|
+
- Bump @fluentui/react-context-selector to v9.0.1 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
49
|
+
- Bump @fluentui/react-popover to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
50
|
+
- Bump @fluentui/react-tabster to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
51
|
+
- Bump @fluentui/react-tooltip to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
52
|
+
- Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
53
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
|
54
|
+
|
|
7
55
|
## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.1)
|
|
8
56
|
|
|
9
|
-
Tue, 28 Jun 2022 17:
|
|
57
|
+
Tue, 28 Jun 2022 17:39:46 GMT
|
|
10
58
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0..@fluentui/react-avatar_v9.0.1)
|
|
11
59
|
|
|
12
60
|
### Patches
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# AvatarGroup Migration
|
|
2
|
+
|
|
3
|
+
## Migration from v0
|
|
4
|
+
|
|
5
|
+
`v0` does not have a component similar to `AvatarGroup`.
|
|
6
|
+
|
|
7
|
+
## Migration from v8
|
|
8
|
+
|
|
9
|
+
AvatarGroup and Facepile have similar APIs, but the main difference is how they interact with AvatarGroupItem/Persona. AvatarGroup receives AvatarGroupItems as children and places them in their respective place, this means AvatarGroup has no control over AvatarGroupItem. `size` is the only property of AvatarGroupItem that is modified by AvatarGroup to make all AvatarGroupItems the same size. Face adding functionality is not supported.
|
|
10
|
+
|
|
11
|
+
Avatars must not be used inside an AvatarGroup, instead AvatarGroupItems are used since it has extra functionality used only in AvatarGroups. This includes adding a label when the AvatarGroupItem is rendered in the overflow Popover and specific styling for each layout.
|
|
12
|
+
|
|
13
|
+
AvatarGroup has extra functionality that Facepile does not have, this includes:
|
|
14
|
+
- When the AvatarGroupItems are overflowing, a Popover is rendered that contains all the overflowed AvatarGroupItems. The Popover is triggered when the overflow button is clicked.
|
|
15
|
+
- AvatarGroup supports three layouts: `spread` (default), `stack`, and `pie`.
|
|
16
|
+
|
|
17
|
+
## Property mapping
|
|
18
|
+
|
|
19
|
+
| v8 `Facepile` | v9 `AvatarGroup` |
|
|
20
|
+
| ------------------------ | -------------------------------------------------------- |
|
|
21
|
+
| `personas` | `children` |
|
|
22
|
+
| `addButtonProps` | - |
|
|
23
|
+
| `className` | `className` |
|
|
24
|
+
| `getPersonaProps` | `AvatarGroupItem`'s props |
|
|
25
|
+
| `maxDisplayablePersonas` | `maxAvatars` |
|
|
26
|
+
| `onRenderPersona` | Render function for the AvatarGroupItem |
|
|
27
|
+
| `onRenderPersonaCoin` | Render function for the `avatar` slot in AvatarGroupItem |
|
|
28
|
+
| `onRenderPersonaWrapper` | - |
|
|
29
|
+
| `overflowButtonProps` | `overflowButton` slot props |
|
|
30
|
+
| `overflowButtonType` | `overflowIndicator` |
|
|
31
|
+
| `overflowPersonas` | - |
|
|
32
|
+
| `personaSize` | `size` |
|
|
33
|
+
| `showAddButton` | - |
|
|
34
|
+
| `showTooltip` | - |
|
|
35
|
+
| `styles` | (theme) |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# @fluentui/react-avatar
|
|
2
|
+
|
|
3
|
+
**React AvatarGroup component for [Fluent UI](https://dev.microsoft.com/fluentui)**
|
|
4
|
+
|
|
5
|
+
The AvatarGroup component represents a group of multiple people or entities by taking care of the arrangement of individual Avatars in a spread, stack, or pie layout.
|
|
6
|
+
|
|
7
|
+
## STATUS: WIP 🚧
|
|
8
|
+
|
|
9
|
+
These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
To import AvatarGroup and AvatarGroupItem:
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { AvatarGroup, AvatarGroupItem } from '@fluentui/react-avatar';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Once the AvatarGroup component graduates to a production release, the component will be available at:
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import { AvatarGroup, AvatarGroupItem } from '@fluentui/react-components';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Examples
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
<AvatarGroup>
|
|
29
|
+
<AvatarGroupItem name="Katri Athokas" />
|
|
30
|
+
<AvatarGroupItem name="Elvia Atkins" />
|
|
31
|
+
<AvatarGroupItem name="Cameron Evans" />
|
|
32
|
+
<AvatarGroupItem name="Wanda Howard" />
|
|
33
|
+
<AvatarGroupItem name="Mona Kane" />
|
|
34
|
+
<AvatarGroupItem name="Allan Munger" />
|
|
35
|
+
<AvatarGroupItem name="Daisy Phillips" />
|
|
36
|
+
<AvatarGroupItem name="Robert Tolbert" />
|
|
37
|
+
<AvatarGroupItem name="Kevin Sturgis" />
|
|
38
|
+
</AvatarGroup>
|
|
39
|
+
```
|
package/README.md
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
# @fluentui/react-avatar
|
|
2
2
|
|
|
3
|
-
**React Avatar components for [Fluent UI](https://
|
|
3
|
+
**React Avatar components for [Fluent UI](https://react.fluentui.dev/)**
|
|
4
4
|
|
|
5
5
|
The Avatar component represents a person or entity. It displays the person's image, initials, or an icon, and can be either circular or square.
|
|
6
6
|
|
|
7
|
-
## STATUS: WIP 🚧
|
|
8
|
-
|
|
9
|
-
These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
|
|
10
|
-
|
|
11
7
|
## Usage
|
|
12
8
|
|
|
13
9
|
To import Avatar:
|
|
14
10
|
|
|
15
|
-
```js
|
|
16
|
-
import { Avatar } from '@fluentui/react-avatar';
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Once the Avatar component graduates to a production release, the component will be available at:
|
|
20
|
-
|
|
21
11
|
```js
|
|
22
12
|
import { Avatar } from '@fluentui/react-components';
|
|
23
13
|
```
|
|
@@ -42,3 +32,18 @@ With active state indication:
|
|
|
42
32
|
<Avatar name="Daisy Phillips" active={true} activeAppearance="ring-shadow" />
|
|
43
33
|
<Avatar name="Robin Counts" active={false} activeAppearance="ring-shadow" />
|
|
44
34
|
```
|
|
35
|
+
|
|
36
|
+
See [Fluent UI Storybook](https://react.fluentui.dev/) for more detailed usage examples.
|
|
37
|
+
|
|
38
|
+
Alternatively, run Storybook locally with:
|
|
39
|
+
|
|
40
|
+
1. `yarn start`
|
|
41
|
+
2. Select `react-avatar` from the list.
|
|
42
|
+
|
|
43
|
+
### Specification
|
|
44
|
+
|
|
45
|
+
See [SPEC.md](./SPEC.md).
|
|
46
|
+
|
|
47
|
+
### Migration Guide
|
|
48
|
+
|
|
49
|
+
If you're upgrading to Fluent UI v9 see [MIGRATION.md](./MIGRATION.md) for guidance on updating to the latest Avatar implementation.
|
package/SPEC.md
CHANGED
|
@@ -95,141 +95,7 @@ From [Avatar.types.tsx](https://github.com/microsoft/fluentui/blob/master/packag
|
|
|
95
95
|
|
|
96
96
|
### Props
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
export type AvatarSlots = {
|
|
100
|
-
root: Slot<'span'>;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The Avatar's image.
|
|
104
|
-
*
|
|
105
|
-
* Usage e.g.: `image={{ src: '...' }}`
|
|
106
|
-
*/
|
|
107
|
-
image?: Slot<'img'>;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* (optional) Custom initials.
|
|
111
|
-
*
|
|
112
|
-
* It is usually not necessary to specify custom initials; by default they will be derived from the `name` prop,
|
|
113
|
-
* using the `getInitials` function.
|
|
114
|
-
*
|
|
115
|
-
* The initials are displayed when there is no image (including while the image is loading).
|
|
116
|
-
*/
|
|
117
|
-
initials?: Slot<'span'>;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Icon to be displayed when the avatar doesn't have an image or initials.
|
|
121
|
-
*
|
|
122
|
-
* @defaultvalue `PersonRegular` (the default icon's size depends on the Avatar's size)
|
|
123
|
-
*/
|
|
124
|
-
icon?: Slot<'span'>;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Badge to show the avatar's presence status.
|
|
128
|
-
*/
|
|
129
|
-
badge?: Slot<typeof PresenceBadge>;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & {
|
|
133
|
-
/**
|
|
134
|
-
* The name of the person or entity represented by this Avatar. This should always be provided if it is available.
|
|
135
|
-
*
|
|
136
|
-
* The name will be used to determine the initials displayed when there is no icon, as well as provided to
|
|
137
|
-
* accessibility tools.
|
|
138
|
-
*/
|
|
139
|
-
name?: string;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Size of the avatar in pixels.
|
|
143
|
-
*
|
|
144
|
-
* Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and
|
|
145
|
-
* based on design guidelines for the Avatar control.
|
|
146
|
-
*
|
|
147
|
-
* If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
|
|
148
|
-
* to override the rendered size.
|
|
149
|
-
*
|
|
150
|
-
* For example, to set the avatar to 45px in size:
|
|
151
|
-
* `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
|
|
152
|
-
*
|
|
153
|
-
* @defaultvalue 32
|
|
154
|
-
*/
|
|
155
|
-
size?: 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The avatar can have a circular or square shape.
|
|
159
|
-
* @defaultvalue circular
|
|
160
|
-
*/
|
|
161
|
-
shape?: 'circular' | 'square';
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Optional activity indicator
|
|
165
|
-
* * active: the avatar will be decorated according to activeAppearance
|
|
166
|
-
* * inactive: the avatar will be reduced in size and partially transparent
|
|
167
|
-
* * unset: normal display
|
|
168
|
-
*
|
|
169
|
-
* @defaultvalue unset
|
|
170
|
-
*/
|
|
171
|
-
active?: 'active' | 'inactive' | 'unset';
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The appearance when `active="active"`
|
|
175
|
-
*
|
|
176
|
-
* @defaultvalue ring
|
|
177
|
-
*/
|
|
178
|
-
activeAppearance?: 'ring' | 'shadow' | 'ring-shadow';
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* The color when displaying either an icon or initials.
|
|
182
|
-
* * neutral (default): gray
|
|
183
|
-
* * brand: color from the brand palette
|
|
184
|
-
* * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
|
|
185
|
-
* * [AvatarNamedColor]: a specific color from the theme
|
|
186
|
-
*
|
|
187
|
-
* @defaultvalue neutral
|
|
188
|
-
*/
|
|
189
|
-
color?: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Specify a string to be used instead of the name, to determine which color to use when color="colorful".
|
|
193
|
-
* Use this when a name is not available, but there is another unique identifier that can be used instead.
|
|
194
|
-
*/
|
|
195
|
-
idForColor?: string | undefined;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* A specific named color for the Avatar
|
|
200
|
-
*/
|
|
201
|
-
export type AvatarNamedColor =
|
|
202
|
-
| 'darkRed'
|
|
203
|
-
| 'cranberry'
|
|
204
|
-
| 'red'
|
|
205
|
-
| 'pumpkin'
|
|
206
|
-
| 'peach'
|
|
207
|
-
| 'marigold'
|
|
208
|
-
| 'gold'
|
|
209
|
-
| 'brass'
|
|
210
|
-
| 'brown'
|
|
211
|
-
| 'forest'
|
|
212
|
-
| 'seafoam'
|
|
213
|
-
| 'darkGreen'
|
|
214
|
-
| 'lightTeal'
|
|
215
|
-
| 'teal'
|
|
216
|
-
| 'steel'
|
|
217
|
-
| 'blue'
|
|
218
|
-
| 'royalBlue'
|
|
219
|
-
| 'cornflower'
|
|
220
|
-
| 'navy'
|
|
221
|
-
| 'lavender'
|
|
222
|
-
| 'purple'
|
|
223
|
-
| 'grape'
|
|
224
|
-
| 'lilac'
|
|
225
|
-
| 'pink'
|
|
226
|
-
| 'magenta'
|
|
227
|
-
| 'plum'
|
|
228
|
-
| 'beige'
|
|
229
|
-
| 'mink'
|
|
230
|
-
| 'platinum'
|
|
231
|
-
| 'anchor';
|
|
232
|
-
```
|
|
98
|
+
See API at [Avatar.types.ts](./src/components/Avatar/Avatar.types.ts).
|
|
233
99
|
|
|
234
100
|
## Structure
|
|
235
101
|
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,29 @@ export declare type AvatarGroupItemState = ComponentState<AvatarGroupItemSlots>
|
|
|
63
63
|
size: AvatarSizes;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* AvatarGroupOverflow component - TODO: add more docs
|
|
68
|
+
*/
|
|
69
|
+
export declare const AvatarGroupOverflow: ForwardRefComponent<AvatarGroupOverflowProps>;
|
|
70
|
+
|
|
71
|
+
export declare const avatarGroupOverflowClassName = "fui-AvatarGroupOverflow";
|
|
72
|
+
|
|
73
|
+
export declare const avatarGroupOverflowClassNames: SlotClassNames<AvatarGroupOverflowSlots>;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* AvatarGroupOverflow Props
|
|
77
|
+
*/
|
|
78
|
+
export declare type AvatarGroupOverflowProps = ComponentProps<AvatarGroupOverflowSlots> & {};
|
|
79
|
+
|
|
80
|
+
export declare type AvatarGroupOverflowSlots = {
|
|
81
|
+
root: Slot<'div'>;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* State used in rendering AvatarGroupOverflow
|
|
86
|
+
*/
|
|
87
|
+
export declare type AvatarGroupOverflowState = ComponentState<AvatarGroupOverflowSlots>;
|
|
88
|
+
|
|
66
89
|
/**
|
|
67
90
|
* AvatarGroup Props
|
|
68
91
|
*/
|
|
@@ -100,7 +123,11 @@ export declare type AvatarGroupSlots = {
|
|
|
100
123
|
/**
|
|
101
124
|
* List that contains the overflow AvatarGroupItems.
|
|
102
125
|
*/
|
|
103
|
-
overflowContent?: NonNullable<Slot<
|
|
126
|
+
overflowContent?: NonNullable<Slot<'div'>>;
|
|
127
|
+
/**
|
|
128
|
+
* PopoverSurface that contains the overflow content.
|
|
129
|
+
*/
|
|
130
|
+
overflowSurface?: NonNullable<Slot<typeof PopoverSurface>>;
|
|
104
131
|
};
|
|
105
132
|
|
|
106
133
|
/**
|
|
@@ -267,6 +294,11 @@ export declare const renderAvatarGroup_unstable: (state: AvatarGroupState) => JS
|
|
|
267
294
|
*/
|
|
268
295
|
export declare const renderAvatarGroupItem_unstable: (state: AvatarGroupItemState) => JSX.Element;
|
|
269
296
|
|
|
297
|
+
/**
|
|
298
|
+
* Render the final JSX of AvatarGroupOverflow
|
|
299
|
+
*/
|
|
300
|
+
export declare const renderAvatarGroupOverflow_unstable: (state: AvatarGroupOverflowState) => JSX.Element;
|
|
301
|
+
|
|
270
302
|
export declare const useAvatar_unstable: (props: AvatarProps, ref: React_2.Ref<HTMLElement>) => AvatarState;
|
|
271
303
|
|
|
272
304
|
/**
|
|
@@ -296,6 +328,22 @@ export declare const useAvatarGroupItem_unstable: (props: AvatarGroupItemProps,
|
|
|
296
328
|
*/
|
|
297
329
|
export declare const useAvatarGroupItemStyles_unstable: (state: AvatarGroupItemState) => AvatarGroupItemState;
|
|
298
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Create the state required to render AvatarGroupOverflow.
|
|
333
|
+
*
|
|
334
|
+
* The returned state can be modified with hooks such as useAvatarGroupOverflowStyles_unstable,
|
|
335
|
+
* before being passed to renderAvatarGroupOverflow_unstable.
|
|
336
|
+
*
|
|
337
|
+
* @param props - props from this instance of AvatarGroupOverflow
|
|
338
|
+
* @param ref - reference to root HTMLElement of AvatarGroupOverflow
|
|
339
|
+
*/
|
|
340
|
+
export declare const useAvatarGroupOverflow_unstable: (props: AvatarGroupOverflowProps, ref: React_2.Ref<HTMLElement>) => AvatarGroupOverflowState;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Apply styling to the AvatarGroupOverflow slots based on the state
|
|
344
|
+
*/
|
|
345
|
+
export declare const useAvatarGroupOverflowStyles_unstable: (state: AvatarGroupOverflowState) => AvatarGroupOverflowState;
|
|
346
|
+
|
|
299
347
|
/**
|
|
300
348
|
* Apply styling to the AvatarGroup slots based on the state
|
|
301
349
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarGroupOverflow.js","sourceRoot":"../src/","sources":["AvatarGroupOverflow.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC","sourcesContent":["export * from './components/AvatarGroupOverflow/index';\n"]}
|