@fluentui/react-avatar 9.0.4 → 9.1.0

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.
Files changed (131) hide show
  1. package/CHANGELOG.json +181 -6
  2. package/CHANGELOG.md +40 -7
  3. package/README-AvatarGroup.md +63 -39
  4. package/SPEC-AvatarGroup.md +103 -85
  5. package/dist/index.d.ts +97 -64
  6. package/lib/AvatarGroupPopover.js +2 -0
  7. package/lib/AvatarGroupPopover.js.map +1 -0
  8. package/lib/components/Avatar/useAvatar.js +3 -7
  9. package/lib/components/Avatar/useAvatar.js.map +1 -1
  10. package/lib/components/Avatar/useAvatarStyles.js +2 -2
  11. package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
  12. package/lib/components/AvatarGroup/AvatarGroup.js +4 -2
  13. package/lib/components/AvatarGroup/AvatarGroup.js.map +1 -1
  14. package/lib/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
  15. package/lib/components/AvatarGroup/index.js +1 -0
  16. package/lib/components/AvatarGroup/index.js.map +1 -1
  17. package/lib/components/AvatarGroup/renderAvatarGroup.js +5 -31
  18. package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  19. package/lib/components/AvatarGroup/useAvatarGroup.js +4 -62
  20. package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  21. package/lib/components/AvatarGroup/useAvatarGroupContextValues.js +14 -0
  22. package/lib/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -0
  23. package/lib/components/AvatarGroup/useAvatarGroupStyles.js +5 -268
  24. package/lib/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
  25. package/lib/components/AvatarGroupItem/AvatarGroupItem.js +1 -1
  26. package/lib/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
  27. package/lib/components/AvatarGroupItem/AvatarGroupItem.types.js.map +1 -1
  28. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js +10 -11
  29. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
  30. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js +51 -59
  31. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -1
  32. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js +16 -0
  33. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -0
  34. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.types.js +2 -0
  35. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.types.js.map +1 -0
  36. package/lib/components/AvatarGroupPopover/index.js +6 -0
  37. package/lib/components/AvatarGroupPopover/index.js.map +1 -0
  38. package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js +23 -0
  39. package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -0
  40. package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js +102 -0
  41. package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -0
  42. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js +10 -0
  43. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -0
  44. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js +307 -0
  45. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js.map +1 -0
  46. package/lib/contexts/AvatarGroupContext.js +7 -4
  47. package/lib/contexts/AvatarGroupContext.js.map +1 -1
  48. package/lib/index.js +4 -3
  49. package/lib/index.js.map +1 -1
  50. package/lib/utils/index.js +1 -0
  51. package/lib/utils/index.js.map +1 -1
  52. package/lib/utils/partitionAvatarGroupItems.js +30 -0
  53. package/lib/utils/partitionAvatarGroupItems.js.map +1 -0
  54. package/lib-commonjs/{AvatarGroupOverflow.js → AvatarGroupPopover.js} +2 -2
  55. package/lib-commonjs/AvatarGroupPopover.js.map +1 -0
  56. package/lib-commonjs/components/Avatar/useAvatar.js +2 -7
  57. package/lib-commonjs/components/Avatar/useAvatar.js.map +1 -1
  58. package/lib-commonjs/components/Avatar/useAvatarStyles.js +2 -2
  59. package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
  60. package/lib-commonjs/components/AvatarGroup/AvatarGroup.js +5 -2
  61. package/lib-commonjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
  62. package/lib-commonjs/components/AvatarGroup/index.js +2 -0
  63. package/lib-commonjs/components/AvatarGroup/index.js.map +1 -1
  64. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js +4 -32
  65. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  66. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js +3 -64
  67. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  68. package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.js +23 -0
  69. package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -0
  70. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js +3 -268
  71. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
  72. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js +2 -2
  73. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
  74. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js +8 -9
  75. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
  76. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js +52 -60
  77. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -1
  78. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.js +29 -0
  79. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -0
  80. package/lib-commonjs/{contexts/AvatarGroupContext.types.js → components/AvatarGroupPopover/AvatarGroupPopover.types.js} +1 -1
  81. package/lib-commonjs/{contexts/AvatarGroupContext.types.js.map → components/AvatarGroupPopover/AvatarGroupPopover.types.js.map} +0 -0
  82. package/lib-commonjs/components/AvatarGroupPopover/index.js +18 -0
  83. package/lib-commonjs/components/AvatarGroupPopover/index.js.map +1 -0
  84. package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.js +36 -0
  85. package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -0
  86. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.js +118 -0
  87. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -0
  88. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js +19 -0
  89. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -0
  90. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js +321 -0
  91. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js.map +1 -0
  92. package/lib-commonjs/contexts/AvatarGroupContext.js +10 -4
  93. package/lib-commonjs/contexts/AvatarGroupContext.js.map +1 -1
  94. package/lib-commonjs/index.js +60 -4
  95. package/lib-commonjs/index.js.map +1 -1
  96. package/lib-commonjs/utils/index.js +10 -1
  97. package/lib-commonjs/utils/index.js.map +1 -1
  98. package/lib-commonjs/utils/partitionAvatarGroupItems.js +39 -0
  99. package/lib-commonjs/utils/partitionAvatarGroupItems.js.map +1 -0
  100. package/package.json +14 -12
  101. package/MIGRATION-AvatarGroup.md +0 -35
  102. package/dist/tsdoc-metadata.json +0 -11
  103. package/lib/AvatarGroupOverflow.js +0 -2
  104. package/lib/AvatarGroupOverflow.js.map +0 -1
  105. package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.js +0 -15
  106. package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.js.map +0 -1
  107. package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js +0 -2
  108. package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js.map +0 -1
  109. package/lib/components/AvatarGroupOverflow/index.js +0 -6
  110. package/lib/components/AvatarGroupOverflow/index.js.map +0 -1
  111. package/lib/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js +0 -16
  112. package/lib/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js.map +0 -1
  113. package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflow.js +0 -27
  114. package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflow.js.map +0 -1
  115. package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js +0 -27
  116. package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js.map +0 -1
  117. package/lib/contexts/AvatarGroupContext.types.js +0 -2
  118. package/lib/contexts/AvatarGroupContext.types.js.map +0 -1
  119. package/lib-commonjs/AvatarGroupOverflow.js.map +0 -1
  120. package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.js +0 -26
  121. package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.js.map +0 -1
  122. package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js +0 -6
  123. package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js.map +0 -1
  124. package/lib-commonjs/components/AvatarGroupOverflow/index.js +0 -18
  125. package/lib-commonjs/components/AvatarGroupOverflow/index.js.map +0 -1
  126. package/lib-commonjs/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js +0 -27
  127. package/lib-commonjs/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js.map +0 -1
  128. package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflow.js +0 -37
  129. package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflow.js.map +0 -1
  130. package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js +0 -37
  131. package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,182 @@
2
2
  "name": "@fluentui/react-avatar",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 03 Aug 2022 16:00:05 GMT",
5
+ "date": "Thu, 15 Sep 2022 09:45:10 GMT",
6
+ "tag": "@fluentui/react-avatar_v9.1.0",
7
+ "version": "9.1.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "esteban.230@hotmail.com",
12
+ "package": "@fluentui/react-avatar",
13
+ "commit": "5baea110a12d6c161c36b19b5b6768eeaa8370de",
14
+ "comment": "chore: Change content to render as ul and list item to render as li."
15
+ },
16
+ {
17
+ "author": "esteban.230@hotmail.com",
18
+ "package": "@fluentui/react-avatar",
19
+ "commit": "abc61d6bf47190f96b5e32ed3b7df4b77614caaf",
20
+ "comment": "chore: Cleaning up use of AvatarGroup context."
21
+ },
22
+ {
23
+ "author": "behowell@microsoft.com",
24
+ "package": "@fluentui/react-avatar",
25
+ "commit": "e598325b985cad3e5057f00893e0176416edd292",
26
+ "comment": "refactor: Replace useMergedEventCallbacks utility with mergeCallbacks"
27
+ },
28
+ {
29
+ "author": "esteban.230@hotmail.com",
30
+ "package": "@fluentui/react-avatar",
31
+ "commit": "4de0899dd07982aabdc611b1837bf9acfca44efc",
32
+ "comment": "fix: Making PopoverSurface focusable, moving Overflow aria-label to PopoverSurface, and moving content styles to PopoverSurface."
33
+ },
34
+ {
35
+ "author": "esteban.230@hotmail.com",
36
+ "package": "@fluentui/react-avatar",
37
+ "commit": "a66448342c1f3e6a6911404486aef904529988c4",
38
+ "comment": "fix: Set aria-hidden to AvatarGroupItem's label."
39
+ },
40
+ {
41
+ "author": "olfedias@microsoft.com",
42
+ "package": "@fluentui/react-avatar",
43
+ "commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
44
+ "comment": "chore: Update Griffel to latest version"
45
+ },
46
+ {
47
+ "author": "miroslav.stastny@microsoft.com",
48
+ "package": "@fluentui/react-avatar",
49
+ "commit": "0137f992b99b3b8ec927be8f7aef751d27cd5830",
50
+ "comment": "fix: Rename colorNeutralForegroundInvertedStatic token to colorNeutralForegroundStaticInverted"
51
+ },
52
+ {
53
+ "author": "esteban.230@hotmail.com",
54
+ "package": "@fluentui/react-avatar",
55
+ "commit": "1542e766427a7f0b1ee122d507b7f50ebcb51a3c",
56
+ "comment": "chore: Update tests and add e2e tests."
57
+ },
58
+ {
59
+ "author": "seanmonahan@microsoft.com",
60
+ "package": "@fluentui/react-avatar",
61
+ "commit": "1d0a72865a151962362aa3e5054ac9bf8178f09c",
62
+ "comment": "fix: update color tokens"
63
+ },
64
+ {
65
+ "author": "lingfangao@hotmail.com",
66
+ "package": "@fluentui/react-avatar",
67
+ "commit": "a606fbedcf7d618d1a48706a5e15c26c4cd85ba6",
68
+ "comment": "chore: fix no-context-default-value lint violations for cxe"
69
+ }
70
+ ],
71
+ "none": [
72
+ {
73
+ "author": "esteban.230@hotmail.com",
74
+ "package": "@fluentui/react-avatar",
75
+ "commit": "c5249ee380c5e17651b5122a716fcf5e4c477ad1",
76
+ "comment": "docs: Updating AvatarGroup's migration guide."
77
+ },
78
+ {
79
+ "author": "martinhochel@microsoft.com",
80
+ "package": "@fluentui/react-avatar",
81
+ "commit": "ba9444d594f3a960cc590eae5237c08bf7c5a07f",
82
+ "comment": "chore: consume cypress.config from it's package boundary"
83
+ },
84
+ {
85
+ "author": "martinhochel@microsoft.com",
86
+ "package": "@fluentui/react-avatar",
87
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
88
+ "comment": "chore: update package scaffold"
89
+ },
90
+ {
91
+ "author": "esteban.230@hotmail.com",
92
+ "package": "@fluentui/react-avatar",
93
+ "commit": "ab54d44126b26316d662551bbdd93bf5b044b022",
94
+ "comment": "docs: Update spec to match implementation, add best practices, and update README."
95
+ },
96
+ {
97
+ "author": "martinhochel@microsoft.com",
98
+ "package": "@fluentui/react-avatar",
99
+ "commit": "16aa65dcae8f75c6a221225fd0eb43800650ac66",
100
+ "comment": "docs: re-generate api.md files"
101
+ }
102
+ ],
103
+ "minor": [
104
+ {
105
+ "author": "esteban.230@hotmail.com",
106
+ "package": "@fluentui/react-avatar",
107
+ "commit": "66762e1ca870a21db46b72c9b0848c5b107b8e09",
108
+ "comment": "feat: Adding functionality to AvatarGroupOverflow and updating AvatarGroup to use AvatarGroupOverflow."
109
+ },
110
+ {
111
+ "author": "esteban.230@hotmail.com",
112
+ "package": "@fluentui/react-avatar",
113
+ "commit": "84e2b1a8b1e8d2e9008297b6c35c76231ae3a31c",
114
+ "comment": "chore: Renaming AvatarGroupOverflow to AvatarGroupPopover."
115
+ },
116
+ {
117
+ "author": "esteban.230@hotmail.com",
118
+ "package": "@fluentui/react-avatar",
119
+ "commit": "27a3480f5361aa5d99f8978817d8395d9037e3b7",
120
+ "comment": "feat: Add pie layout implementation."
121
+ },
122
+ {
123
+ "author": "beachball",
124
+ "package": "@fluentui/react-avatar",
125
+ "comment": "Bump @fluentui/react-badge to v9.0.5",
126
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
127
+ },
128
+ {
129
+ "author": "beachball",
130
+ "package": "@fluentui/react-avatar",
131
+ "comment": "Bump @fluentui/react-context-selector to v9.0.3",
132
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
133
+ },
134
+ {
135
+ "author": "beachball",
136
+ "package": "@fluentui/react-avatar",
137
+ "comment": "Bump @fluentui/react-popover to v9.1.0",
138
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
139
+ },
140
+ {
141
+ "author": "beachball",
142
+ "package": "@fluentui/react-avatar",
143
+ "comment": "Bump @fluentui/react-shared-contexts to v9.0.1",
144
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
145
+ },
146
+ {
147
+ "author": "beachball",
148
+ "package": "@fluentui/react-avatar",
149
+ "comment": "Bump @fluentui/react-tabster to v9.1.1",
150
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
151
+ },
152
+ {
153
+ "author": "beachball",
154
+ "package": "@fluentui/react-avatar",
155
+ "comment": "Bump @fluentui/react-theme to v9.1.0",
156
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
157
+ },
158
+ {
159
+ "author": "beachball",
160
+ "package": "@fluentui/react-avatar",
161
+ "comment": "Bump @fluentui/react-tooltip to v9.0.5",
162
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
163
+ },
164
+ {
165
+ "author": "beachball",
166
+ "package": "@fluentui/react-avatar",
167
+ "comment": "Bump @fluentui/react-utilities to v9.1.0",
168
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
169
+ },
170
+ {
171
+ "author": "beachball",
172
+ "package": "@fluentui/react-avatar",
173
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
174
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
175
+ }
176
+ ]
177
+ }
178
+ },
179
+ {
180
+ "date": "Wed, 03 Aug 2022 16:03:37 GMT",
6
181
  "tag": "@fluentui/react-avatar_v9.0.4",
7
182
  "version": "9.0.4",
8
183
  "comments": {
@@ -43,31 +218,31 @@
43
218
  "author": "beachball",
44
219
  "package": "@fluentui/react-avatar",
45
220
  "comment": "Bump @fluentui/react-badge to v9.0.4",
46
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
221
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
47
222
  },
48
223
  {
49
224
  "author": "beachball",
50
225
  "package": "@fluentui/react-avatar",
51
226
  "comment": "Bump @fluentui/react-popover to v9.0.4",
52
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
227
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
53
228
  },
54
229
  {
55
230
  "author": "beachball",
56
231
  "package": "@fluentui/react-avatar",
57
232
  "comment": "Bump @fluentui/react-tabster to v9.1.0",
58
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
233
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
59
234
  },
60
235
  {
61
236
  "author": "beachball",
62
237
  "package": "@fluentui/react-avatar",
63
238
  "comment": "Bump @fluentui/react-tooltip to v9.0.4",
64
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
239
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
65
240
  },
66
241
  {
67
242
  "author": "beachball",
68
243
  "package": "@fluentui/react-avatar",
69
244
  "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
70
- "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
245
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
71
246
  }
72
247
  ]
73
248
  }
package/CHANGELOG.md CHANGED
@@ -1,23 +1,56 @@
1
1
  # Change Log - @fluentui/react-avatar
2
2
 
3
- This log was last generated on Wed, 03 Aug 2022 16:00:05 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 15 Sep 2022 09:45:10 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.1.0)
8
+
9
+ Thu, 15 Sep 2022 09:45:10 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.4..@fluentui/react-avatar_v9.1.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: Adding functionality to AvatarGroupOverflow and updating AvatarGroup to use AvatarGroupOverflow. ([PR #24115](https://github.com/microsoft/fluentui/pull/24115) by esteban.230@hotmail.com)
15
+ - chore: Renaming AvatarGroupOverflow to AvatarGroupPopover. ([PR #24338](https://github.com/microsoft/fluentui/pull/24338) by esteban.230@hotmail.com)
16
+ - feat: Add pie layout implementation. ([PR #24241](https://github.com/microsoft/fluentui/pull/24241) by esteban.230@hotmail.com)
17
+ - Bump @fluentui/react-badge to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
18
+ - Bump @fluentui/react-context-selector to v9.0.3 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
19
+ - Bump @fluentui/react-popover to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
20
+ - Bump @fluentui/react-shared-contexts to v9.0.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
21
+ - Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
22
+ - Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
23
+ - Bump @fluentui/react-tooltip to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
24
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
25
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
26
+
27
+ ### Patches
28
+
29
+ - chore: Change content to render as ul and list item to render as li. ([PR #24347](https://github.com/microsoft/fluentui/pull/24347) by esteban.230@hotmail.com)
30
+ - chore: Cleaning up use of AvatarGroup context. ([PR #24459](https://github.com/microsoft/fluentui/pull/24459) by esteban.230@hotmail.com)
31
+ - refactor: Replace useMergedEventCallbacks utility with mergeCallbacks ([PR #24152](https://github.com/microsoft/fluentui/pull/24152) by behowell@microsoft.com)
32
+ - fix: Making PopoverSurface focusable, moving Overflow aria-label to PopoverSurface, and moving content styles to PopoverSurface. ([PR #24417](https://github.com/microsoft/fluentui/pull/24417) by esteban.230@hotmail.com)
33
+ - fix: Set aria-hidden to AvatarGroupItem's label. ([PR #24359](https://github.com/microsoft/fluentui/pull/24359) by esteban.230@hotmail.com)
34
+ - chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
35
+ - fix: Rename colorNeutralForegroundInvertedStatic token to colorNeutralForegroundStaticInverted ([PR #24611](https://github.com/microsoft/fluentui/pull/24611) by miroslav.stastny@microsoft.com)
36
+ - chore: Update tests and add e2e tests. ([PR #24348](https://github.com/microsoft/fluentui/pull/24348) by esteban.230@hotmail.com)
37
+ - fix: update color tokens ([PR #24027](https://github.com/microsoft/fluentui/pull/24027) by seanmonahan@microsoft.com)
38
+ - chore: fix no-context-default-value lint violations for cxe ([PR #24277](https://github.com/microsoft/fluentui/pull/24277) by lingfangao@hotmail.com)
39
+
7
40
  ## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.4)
8
41
 
9
- Wed, 03 Aug 2022 16:00:05 GMT
42
+ Wed, 03 Aug 2022 16:03:37 GMT
10
43
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.3..@fluentui/react-avatar_v9.0.4)
11
44
 
12
45
  ### Patches
13
46
 
14
47
  - 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
48
  - 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)
49
+ - Bump @fluentui/react-badge to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
50
+ - Bump @fluentui/react-popover to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
51
+ - Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
52
+ - Bump @fluentui/react-tooltip to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
53
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
21
54
 
22
55
  ## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.3)
23
56
 
@@ -1,39 +1,63 @@
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
- ```
1
+ # @fluentui/react-avatar
2
+
3
+ **React AvatarGroup component for [Fluent UI](https://react.fluentui.dev)**
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, AvatarGroupItem, AvatarGroupPopover, and partitionAvatarGroupItems:
14
+
15
+ ```js
16
+ import { AvatarGroup, AvatarGroupItem, AvatarGroupPopover, partitionAvatarGroupItems } 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 {
23
+ AvatarGroup,
24
+ AvatarGroupItem,
25
+ AvatarGroupPopover,
26
+ partitionAvatarGroupItems,
27
+ } from '@fluentui/react-components';
28
+ ```
29
+
30
+ ### Examples
31
+
32
+ ```jsx
33
+ const names = [
34
+ 'Johnie McConnell',
35
+ 'Allan Munger',
36
+ 'Erik Nason',
37
+ 'Kristin Patterson',
38
+ 'Daisy Phillips',
39
+ 'Carole Poland',
40
+ 'Carlos Slattery',
41
+ 'Robert Tolbert',
42
+ 'Kevin Sturgis',
43
+ 'Charlotte Waltson',
44
+ 'Elliot Woodward',
45
+ ];
46
+
47
+ const AvatarGroup = () => {
48
+ const { inlineItems, overflowItems } = partitionAvatarGroupItems({ items: names });
49
+
50
+ return (
51
+ <AvatarGroup {...props}>
52
+ {inlineItems.map(name => (
53
+ <AvatarGroupItem name={name} key={name} />
54
+ ))}
55
+ <AvatarGroupPopover>
56
+ {overflowItems.map(name => (
57
+ <AvatarGroupItem name={name} key={name} />
58
+ ))}
59
+ </AvatarGroupPopover>
60
+ </AvatarGroup>
61
+ );
62
+ };
63
+ ```
@@ -28,16 +28,33 @@ There's only one existent component similar to AvatarGroup in v8 `Facepile`. v0
28
28
  ## Sample Code
29
29
 
30
30
  ```jsx
31
- import { AvatarGroup, Avatar } from '@fluentui/react-avatar';
31
+ const names = [
32
+ 'Johnie McConnell',
33
+ 'Allan Munger',
34
+ 'Erik Nason',
35
+ 'Kristin Patterson',
36
+ 'Daisy Phillips',
37
+ 'Carole Poland',
38
+ 'Carlos Slattery',
39
+ 'Robert Tolbert',
40
+ 'Kevin Sturgis',
41
+ 'Charlotte Waltson',
42
+ 'Elliot Woodward',
43
+ ];
44
+
45
+ const AvatarGroup = () => {
46
+ const { inlineItems, overflowItems } = partitionAvatarGroupItems({ items: names });
32
47
 
33
- const App = () => {
34
48
  return (
35
- <AvatarGroup layout="spread" size={32}>
36
- <Avatar color="colorful" name="Katri Athokas" />
37
- <Avatar color="colorful" name="Elvia Atkins" />
38
- <Avatar color="colorful" name="Cameron Evans" />
39
- <Avatar color="colorful" name="Wanda Howard" />
40
- <Avatar color="colorful" name="Mona Kane" />
49
+ <AvatarGroup {...props}>
50
+ {inlineItems.map(name => (
51
+ <AvatarGroupItem name={name} key={name} />
52
+ ))}
53
+ <AvatarGroupPopover>
54
+ {overflowItems.map(name => (
55
+ <AvatarGroupItem name={name} key={name} />
56
+ ))}
57
+ </AvatarGroupPopover>
41
58
  </AvatarGroup>
42
59
  );
43
60
  };
@@ -49,79 +66,77 @@ There are three layout variants in AvatarGroup:
49
66
 
50
67
  - Spread layout (Default): Avatars are spaced evenly.
51
68
  - Stack layout: Avatars are overlapped evenly.
52
- - Pie layout: For the pie layout there can be a minimum of two Avatars and a maximum of three. This layout does not overflow and provides a popover for more details.
53
-
54
- - If the size of the avatar group is `36` or smaller then only the first letter of the initials will be displayed.
55
- - `maxAvatars` will be ignored when using this layout.
56
-
57
- - The `spread` and `stack` layouts have a maximum of 5 avatars before overflowing by default, which can be overridden via the `maxAvatars` prop.
69
+ - Pie layout: Avatars are "cut" in a pie design. When there are two Avatars inline, the Avatars will be cut in half and placed side by side. When there are three Avatars inline, the first Avatar will be cut in half and other two will be downscaled by 50%.
70
+ - The pie layout must have 3 or less Avatars inline and all Avatars must repeat in the `AvatarGroupPopover`. This is handled by `partitionAvatarGroupItems`.
71
+ - If `partitionAvatarGroupItems` is used, the `spread` and `stack` layouts will have a maximum of 5 avatars before overflowing by default. This can be overridden via the `maxAvatars` option in `partitionAvatarGroupItems`.
58
72
 
59
73
  ## API
60
74
 
61
- See [AvatarGroup.types.ts](./src/components/AvatarGroup/AvatarGroup.types.ts) for more details.
75
+ See [AvatarGroup.types.ts](./src/components/AvatarGroup/AvatarGroup.types.ts), [AvatarGroupPopover.types.ts](./src/components/AvatarGroupPopover/AvatarGroupPopover.types.ts) and [AvatarGroupItem.types.ts](./src/components/AvatarGroupItem/AvatarGroupItem.types.ts) for more details.
62
76
 
63
77
  - `size`: Group size will override the children's current size. This is to ensure that the `AvatarGroup`'s spacing is correct because it changes depending on the group size.
64
- - `popoverSurface`: All Avatars in `popoverSurface` will have a size of 24 and will be encased in a div to apply stylings.
65
- - Avatar `color`: AvatarGroup's colors will follow the order below, but they can be overriden by providing a color specific color on a given avatar.
78
+ - `AvatarGroupPopover`: All Avatars in `AvatarGroupPopover` will have a size of 24 and have a wrapper to apply stylings.
79
+ - AvatarGroupItem `color`: Can be overridden by providing a specific color on a given avatar.
66
80
 
67
81
  #### Color override example:
68
82
 
69
- In this example, the first Avatar will have a `darkRed` color, while all the other avatars will follow the default color order.
83
+ In this example, the first AvatarGroupItem will have a `darkRed` color, while all the other Avatars have their color assigned by Avatar.
70
84
 
71
85
  ```jsx
72
86
  <AvatarGroup>
73
- <Avatar color="darkRed" name="Katri Athokas" />
74
- <Avatar name="Elvia Atkins" />
75
- <Avatar name="Cameron Evans" />
76
- <Avatar name="Wanda Howard" />
77
- <Avatar name="Mona Kane" />
87
+ <AvatarGroupItem color="darkRed" name="Katri Athokas" />
88
+ <AvatarGroupItem name="Elvia Atkins" />
89
+ <AvatarGroupItem name="Cameron Evans" />
90
+ <AvatarGroupItem name="Wanda Howard" />
91
+ <AvatarGroupItem name="Mona Kane" />
78
92
  </AvatarGroup>
79
93
  ```
80
94
 
81
- #### Color order:
82
-
83
- | | | |
84
- | --------------------- | ------------------ | --------------------- |
85
- | Avatar 1: Red | Avatar 2: Blue | Avatar 3: Purple |
86
- | Avatar 4: Forest | Avatar 5: Pink | Avatar 6: Lavender |
87
- | Avatar 7: Teal | Avatar 8: Gold | Avatar 9: Cranberry |
88
- | Avatar 10: Cornflower | Avatar 11: Lilac | Avatar 12: Anchor |
89
- | Avatar 13: Dark Green | Avatar 14: Pumpkin | Avatar 15: Dark Red |
90
- | Avatar 16: Mink | Avatar 17: Grape | Avatar 18: Platinum |
91
- | Avatar 19: Royal Blue | Avatar 20: Brown | Avatar 21: Peach |
92
- | Avatar 22: Steel | Avatar 23: Navy | Avatar 24: Seafoam |
93
- | Avatar 25: Magenta | Avatar 26: Beige | Avatar 27: Light Teal |
94
- | Avatar 28: Gold | Avatar 29: Plum | Avatar 30: Marigold |
95
-
96
95
  ## Structure
97
96
 
98
97
  - _**Public**_
99
98
 
100
99
  ```jsx
101
100
  <AvatarGroup layout="spread" size={32}>
102
- <Avatar name="Katri Athokas" />
103
- <Avatar name="Elvia Atkins" />
104
- <Avatar name="Cameron Evans" />
105
- <Avatar name="Wanda Howard" />
106
- <Avatar name="Mona Kane" />
101
+ <AvatarGroupItem name="Katri Athokas" />
102
+ <AvatarGroupItem name="Elvia Atkins" />
103
+ <AvatarGroupItem name="Cameron Evans" />
104
+ <AvatarGroupItem name="Wanda Howard" />
105
+ <AvatarGroupPopover>
106
+ <AvatarGroupItem name="Mona Kane" />
107
+ <AvatarGroupItem name="Kristin Patterson" />
108
+ <AvatarGroupItem name="Elliot Woodward" />
109
+ <AvatarGroupItem name="Charlotte Waltson" />
110
+ </AvatarGroupPopover>
107
111
  </AvatarGroup>
108
112
  ```
109
113
 
110
114
  - _**Internal**_
111
115
 
112
116
  ```jsx
117
+ // AvatarGroup
118
+ <AvatarGroupProvider value={contextValues.avatarGroup}>
119
+ <slots.root {...slotProps.root} />
120
+ </AvatarGroupProvider>
121
+
122
+ // AvatarGroupPopover
123
+ <slots.root {...(slotProps.root as PopoverProps)}>
124
+ <PopoverTrigger>
125
+ <slots.tooltip {...(slotProps.tooltip as TooltipProps)}>
126
+ <slots.triggerButton {...slotProps.triggerButton} />
127
+ </slots.tooltip>
128
+ </PopoverTrigger>
129
+ <slots.popoverSurface {...slotProps.popoverSurface}>
130
+ <AvatarGroupProvider value={contextValues.avatarGroup}>
131
+ <slots.content {...slotProps.content} />
132
+ </AvatarGroupProvider>
133
+ </slots.popoverSurface>
134
+ </slots.root>
135
+
136
+ // AvatarGroupItem
113
137
  <slots.root {...slotProps.root}>
114
- {state.root.children}
115
- {slots.popoverSurface && slots.popoverTrigger && slotProps.popoverSurface.children && (
116
- <Popover trapFocus size="small">
117
- <PopoverTrigger>
118
- <Tooltip content={state.tooltipContent} relationship="description" appearance="inverted">
119
- <slots.popoverTrigger {...slotProps.popoverTrigger} />
120
- </Tooltip>
121
- </PopoverTrigger>
122
- <slots.popoverSurface {...slotProps.popoverSurface} />
123
- </Popover>
124
- )}
138
+ <slots.avatar {...slotProps.avatar} />
139
+ {state.isOverflowItem && <slots.overflowLabel {...slotProps.overflowLabel} />}
125
140
  </slots.root>
126
141
  ```
127
142
 
@@ -129,46 +144,49 @@ In this example, the first Avatar will have a `darkRed` color, while all the oth
129
144
 
130
145
  ```html
131
146
  <div className="fui-AvatarGroup" role="group">
132
- <Avatar />
133
- <Avatar />
134
- <Avatar />
135
- <Avatar />
136
- <button>+1</button>
137
- </div>
138
-
139
- // on document.body
140
- <div class="fui-AvatarGroup__popoverSurface" role="complementary">
141
- <div class="fui-AvatarGroup__popoverSurfaceItem">
147
+ <div class="fui-AvatarGroupItem">
142
148
  <Avatar />
143
- <label />
144
149
  </div>
145
- <!-- ... -->
146
- <div class="fui-AvatarGroup__popoverSurfaceItem">
150
+ <div class="fui-AvatarGroupItem">
147
151
  <Avatar />
148
- <label />
149
152
  </div>
153
+ <button>+1</button>
154
+ </div>
155
+
156
+ // on document.body
157
+ <div class="fui-AvatarGroupPopover" role="dialog" aria-label="Overflow">
158
+ <ul>
159
+ <li class="fui-AvatarGroupItem">
160
+ <Avatar />
161
+ <label />
162
+ </li>
163
+ <li class="fui-AvatarGroupItem">
164
+ <Avatar />
165
+ <label />
166
+ </li>
167
+ </ul>
150
168
  </div>
151
169
  ```
152
170
 
153
171
  ## Migration
154
172
 
155
- See [MIGRATION-AvatarGroup.md](MIGRATION-AvatarGroup.md) for details.
173
+ See [v8 to v9 migration guide](https://react.fluentui.dev/?path=/docs/concepts-upgrading-from-v8-components-avatargroup-upgrade--page) for details.
156
174
 
157
175
  ## Behaviors
158
176
 
159
177
  _Explain how the component will behave in use, including:_
160
178
 
161
- - _Component States_
162
- - Overflowed state: When there are more Avatars than the `maxAvatars`, an overflow indicator will be rendered that can be clicked to look at the rest of the avatars.
163
- - `Pie` layout: since `maxAvatars` is ignored, the overflow indicator will be rendered strictly when there's more than three avatars.
164
- - _Interaction_
165
- - _Keyboard_: Overflow indicator can be interacted with the keyboard and when enter is pressed a popover that traps focus will be rendered.
166
- - _Cursor_ and _Touch_: When overflow indicator is clicked, the popover is displayed with the avatars that overflow. When the overflow indicator is hovered, a tooltip will read the number of people overflowed (`{numOverflowAvatars} more people` by default).
179
+ - _AvatarGroupPopover Component States_
180
+
181
+ - _Keyboard_: `triggerButton` can be interacted with the keyboard and when enter is pressed a popover that traps focus on the PopoverSurface will be rendered.
182
+ - _Cursor_ and _Touch_: When overflow indicator is clicked, the popover is displayed with the avatars that overflow. When the overflow indicator is hovered, a tooltip will read `View more people.`.
183
+ - _Screen readers_:
184
+ - When the `triggerButton` is focused, its content will be read.
185
+
186
+ - _AvatarGroupItem Component States_
167
187
  - _Screen readers_:
168
- - `Avatar`: logic is handled by `Avatar` component.
169
- - `AvatarGroup`:
170
- - When a label is used alongside `AvatarGroup` and focused, all Avatars are read. If the overflow indicator is rendered, the popover localized text is read.
171
- - Avatars can be focused and the name will be read. To get to the Avatars in the overflow menu, the Popover must be triggered, which will in turn set focus on it and let the user traverse through the set of overflowed Avatars.
188
+ - When AvatarGroupItem is rendered inline, logic is handled by `Avatar` component.
189
+ - When AvatarGroupItem is rendered inside AvatarGroupPopover, the label is disabled via `aria-label` and `Avatar` will handle the screen reader.
172
190
 
173
191
  ## Accessibility
174
192
 
@@ -176,10 +194,10 @@ Base accessibility information is included in the design document. After the spe
176
194
 
177
195
  - There's no native element for this component.
178
196
 
179
- - `AvatarGroup` will have a role of `group` and slots will be handled by their respective slot type.
180
- - Only the overflow indicator will be focusable by the keyboard. After the overflow indicator is pressed, the popover will handle focus using the `trapFocus` prop.
197
+ - `AvatarGroup` will have a role of `group`.
198
+ - Only the `popoverTrigger` will be focusable by the keyboard.
181
199
  - There are no live-regions in `AvatarGroup`.
182
- - A Tooltip will appear when the overflow indicator is hovered or focused.
183
- - Screen reader: when overflow indicator is rendered and focused, screen reader will read the content of the tooltip.
184
- - Tooltip cannot be focused itself.
185
- - Focus will only be trapped when the overflow indicator is triggered.
200
+ - A Tooltip will appear when the `popoverTrigger` is hovered or focused.
201
+ - Focus will only be trapped when the `popoverTrigger` is triggered.
202
+ - The label rendered along with the Avatar inside AvatarGroupPopover is disabled via `aria-label`.
203
+ - A `<ul>` with role list is rendered inside the PopoverSurface.