@fluentui/react-avatar 9.0.0-rc.7 → 9.0.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 (124) hide show
  1. package/CHANGELOG.json +562 -1
  2. package/CHANGELOG.md +136 -2
  3. package/dist/index.d.ts +161 -99
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/AvatarGroupItem.js +2 -0
  6. package/lib/AvatarGroupItem.js.map +1 -0
  7. package/lib/components/Avatar/Avatar.js.map +1 -1
  8. package/lib/components/Avatar/Avatar.types.js.map +1 -1
  9. package/lib/components/Avatar/renderAvatar.js.map +1 -1
  10. package/lib/components/Avatar/useAvatar.js +7 -10
  11. package/lib/components/Avatar/useAvatar.js.map +1 -1
  12. package/lib/components/Avatar/useAvatarStyles.js +74 -70
  13. package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
  14. package/lib/components/AvatarGroup/AvatarGroup.js +2 -1
  15. package/lib/components/AvatarGroup/AvatarGroup.js.map +1 -1
  16. package/lib/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
  17. package/lib/components/AvatarGroup/renderAvatarGroup.js +31 -4
  18. package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  19. package/lib/components/AvatarGroup/useAvatarGroup.js +65 -34
  20. package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  21. package/lib/components/AvatarGroup/useAvatarGroupStyles.js +274 -15
  22. package/lib/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
  23. package/lib/components/AvatarGroupItem/AvatarGroupItem.js +16 -0
  24. package/lib/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -0
  25. package/lib/components/AvatarGroupItem/AvatarGroupItem.types.js +2 -0
  26. package/lib/components/AvatarGroupItem/AvatarGroupItem.types.js.map +1 -0
  27. package/lib/components/AvatarGroupItem/index.js +6 -0
  28. package/lib/components/AvatarGroupItem/index.js.map +1 -0
  29. package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js +17 -0
  30. package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -0
  31. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js +70 -0
  32. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -0
  33. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js +356 -0
  34. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -0
  35. package/lib/contexts/AvatarGroupContext.js +7 -0
  36. package/lib/contexts/AvatarGroupContext.js.map +1 -0
  37. package/lib/contexts/AvatarGroupContext.types.js +2 -0
  38. package/lib/contexts/AvatarGroupContext.types.js.map +1 -0
  39. package/lib/contexts/index.js +2 -0
  40. package/lib/contexts/index.js.map +1 -0
  41. package/lib/index.js +2 -2
  42. package/lib/index.js.map +1 -1
  43. package/lib/utils/getInitials.js +16 -12
  44. package/lib/utils/getInitials.js.map +1 -1
  45. package/lib-commonjs/AvatarGroupItem.js +10 -0
  46. package/lib-commonjs/AvatarGroupItem.js.map +1 -0
  47. package/lib-commonjs/components/Avatar/Avatar.js.map +1 -1
  48. package/lib-commonjs/components/Avatar/renderAvatar.js.map +1 -1
  49. package/lib-commonjs/components/Avatar/useAvatar.js +7 -10
  50. package/lib-commonjs/components/Avatar/useAvatar.js.map +1 -1
  51. package/lib-commonjs/components/Avatar/useAvatarStyles.js +76 -72
  52. package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
  53. package/lib-commonjs/components/AvatarGroup/AvatarGroup.js +2 -1
  54. package/lib-commonjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
  55. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js +34 -4
  56. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  57. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js +69 -37
  58. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  59. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js +278 -15
  60. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
  61. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js +27 -0
  62. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -0
  63. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.types.js +6 -0
  64. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.types.js.map +1 -0
  65. package/lib-commonjs/components/AvatarGroupItem/index.js +18 -0
  66. package/lib-commonjs/components/AvatarGroupItem/index.js.map +1 -0
  67. package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.js +28 -0
  68. package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -0
  69. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js +84 -0
  70. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -0
  71. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js +370 -0
  72. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -0
  73. package/lib-commonjs/contexts/AvatarGroupContext.js +15 -0
  74. package/lib-commonjs/contexts/AvatarGroupContext.js.map +1 -0
  75. package/lib-commonjs/contexts/AvatarGroupContext.types.js +6 -0
  76. package/lib-commonjs/contexts/AvatarGroupContext.types.js.map +1 -0
  77. package/lib-commonjs/contexts/index.js +10 -0
  78. package/lib-commonjs/contexts/index.js.map +1 -0
  79. package/lib-commonjs/index.js +34 -8
  80. package/lib-commonjs/index.js.map +1 -1
  81. package/lib-commonjs/utils/getInitials.js +16 -12
  82. package/lib-commonjs/utils/getInitials.js.map +1 -1
  83. package/lib-commonjs/utils/index.js.map +1 -1
  84. package/package.json +17 -17
  85. package/lib/Avatar.d.ts +0 -1
  86. package/lib/AvatarGroup.d.ts +0 -1
  87. package/lib/components/Avatar/Avatar.d.ts +0 -3
  88. package/lib/components/Avatar/Avatar.types.d.ts +0 -111
  89. package/lib/components/Avatar/index.d.ts +0 -5
  90. package/lib/components/Avatar/renderAvatar.d.ts +0 -2
  91. package/lib/components/Avatar/useAvatar.d.ts +0 -3
  92. package/lib/components/Avatar/useAvatarStyles.d.ts +0 -8
  93. package/lib/components/AvatarGroup/AvatarGroup.d.ts +0 -6
  94. package/lib/components/AvatarGroup/AvatarGroup.strings.d.ts +0 -2
  95. package/lib/components/AvatarGroup/AvatarGroup.strings.js +0 -4
  96. package/lib/components/AvatarGroup/AvatarGroup.strings.js.map +0 -1
  97. package/lib/components/AvatarGroup/AvatarGroup.types.d.ts +0 -61
  98. package/lib/components/AvatarGroup/index.d.ts +0 -5
  99. package/lib/components/AvatarGroup/renderAvatarGroup.d.ts +0 -5
  100. package/lib/components/AvatarGroup/useAvatarGroup.d.ts +0 -12
  101. package/lib/components/AvatarGroup/useAvatarGroupStyles.d.ts +0 -10
  102. package/lib/index.d.ts +0 -5
  103. package/lib/utils/getInitials.d.ts +0 -14
  104. package/lib/utils/index.d.ts +0 -1
  105. package/lib-commonjs/Avatar.d.ts +0 -1
  106. package/lib-commonjs/AvatarGroup.d.ts +0 -1
  107. package/lib-commonjs/components/Avatar/Avatar.d.ts +0 -3
  108. package/lib-commonjs/components/Avatar/Avatar.types.d.ts +0 -111
  109. package/lib-commonjs/components/Avatar/index.d.ts +0 -5
  110. package/lib-commonjs/components/Avatar/renderAvatar.d.ts +0 -2
  111. package/lib-commonjs/components/Avatar/useAvatar.d.ts +0 -3
  112. package/lib-commonjs/components/Avatar/useAvatarStyles.d.ts +0 -8
  113. package/lib-commonjs/components/AvatarGroup/AvatarGroup.d.ts +0 -6
  114. package/lib-commonjs/components/AvatarGroup/AvatarGroup.strings.d.ts +0 -2
  115. package/lib-commonjs/components/AvatarGroup/AvatarGroup.strings.js +0 -10
  116. package/lib-commonjs/components/AvatarGroup/AvatarGroup.strings.js.map +0 -1
  117. package/lib-commonjs/components/AvatarGroup/AvatarGroup.types.d.ts +0 -61
  118. package/lib-commonjs/components/AvatarGroup/index.d.ts +0 -5
  119. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.d.ts +0 -5
  120. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.d.ts +0 -12
  121. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.d.ts +0 -10
  122. package/lib-commonjs/index.d.ts +0 -5
  123. package/lib-commonjs/utils/getInitials.d.ts +0 -14
  124. package/lib-commonjs/utils/index.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,12 +1,146 @@
1
1
  # Change Log - @fluentui/react-avatar
2
2
 
3
- This log was last generated on Wed, 04 May 2022 13:24:05 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 28 Jun 2022 15:09:26 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0)
8
+
9
+ Tue, 28 Jun 2022 15:09:26 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.13..@fluentui/react-avatar_v9.0.0)
11
+
12
+ ### Patches
13
+
14
+ - feat: Initial 9.0.0 release ([PR #23733](https://github.com/microsoft/fluentui/pull/23733) by lingfangao@hotmail.com)
15
+ - Bump @fluentui/react-badge to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
16
+ - Bump @fluentui/react-context-selector to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
17
+ - Bump @fluentui/react-popover to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
20
+ - Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
21
+ - Bump @fluentui/react-tooltip to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
22
+ - Bump @fluentui/react-utilities to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
23
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
24
+
25
+ ### Changes
26
+
27
+ - fix: Fix wrong border radius for outline in webkit browsers. ([PR #23576](https://github.com/microsoft/fluentui/pull/23576) by esteban.230@hotmail.com)
28
+ - Adding AvatarGroupItem implementation and AvatarGroup context. ([PR #23310](https://github.com/microsoft/fluentui/pull/23310) by esteban.230@hotmail.com)
29
+ - chore: Using ::before and ::after instead of :before and :after. ([PR #23469](https://github.com/microsoft/fluentui/pull/23469) by Humberto.Morimoto@microsoft.com)
30
+ - chore: Update @fluentui/react-icons to latest version ([PR #23459](https://github.com/microsoft/fluentui/pull/23459) by olfedias@microsoft.com)
31
+ - docs: Adding AvatarGroup stories. ([PR #23493](https://github.com/microsoft/fluentui/pull/23493) by esteban.230@hotmail.com)
32
+ - Bump Griffel dependencies ([PR #23688](https://github.com/microsoft/fluentui/pull/23688) by lingfangao@hotmail.com)
33
+ - PresenceBadge accessibility: fix placement of aria-label, sort out Avatar usage and examples ([PR #23256](https://github.com/microsoft/fluentui/pull/23256) by sarah.higley@microsoft.com)
34
+ - Adding layout styles to AvatarGroupItem. ([PR #23468](https://github.com/microsoft/fluentui/pull/23468) by esteban.230@hotmail.com)
35
+ - chore: Adding scheduler as a peer dependency since this package has a dependency on @fluentui/react-context-selector. ([PR #23681](https://github.com/microsoft/fluentui/pull/23681) by Humberto.Morimoto@microsoft.com)
36
+ - Adding layout styles and overflow button styles to AvatarGroup. ([PR #23437](https://github.com/microsoft/fluentui/pull/23437) by esteban.230@hotmail.com)
37
+ - fix: Fixing focus indicator and adding a focus ring to root for the pie layout. ([PR #23528](https://github.com/microsoft/fluentui/pull/23528) by esteban.230@hotmail.com)
38
+ - Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
39
+ - chore: Added warning for AvatarGroup to check if children are of type AvatarGroupItem and for AvatarGroupItem to check if it's being used inside an AvatarGroup. ([PR #23498](https://github.com/microsoft/fluentui/pull/23498) by esteban.230@hotmail.com)
40
+
41
+ ## [9.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.13)
42
+
43
+ Thu, 23 Jun 2022 14:25:31 GMT
44
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.12..@fluentui/react-avatar_v9.0.0-rc.13)
45
+
46
+ ### Changes
47
+
48
+ - Bump @fluentui/react-badge to v9.0.0-rc.13 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
49
+ - Bump @fluentui/react-button to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
50
+ - Bump @fluentui/react-popover to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
51
+ - Bump @fluentui/react-tooltip to v9.0.0-rc.14 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
52
+ - Bump @fluentui/react-theme to v9.0.0-rc.10 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
53
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.11 ([PR #23608](https://github.com/microsoft/fluentui/pull/23608) by beachball)
54
+
55
+ ## [9.0.0-rc.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.12)
56
+
57
+ Tue, 31 May 2022 21:28:35 GMT
58
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.11..@fluentui/react-avatar_v9.0.0-rc.12)
59
+
60
+ ### Changes
61
+
62
+ - chore: Update Griffel to latest version ([PR #23275](https://github.com/microsoft/fluentui/pull/23275) by olfedias@microsoft.com)
63
+ - updates import to react-shared-components ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by bernardo.sunderhus@gmail.com)
64
+ - Creating AvatarGroupItem component. ([PR #23287](https://github.com/microsoft/fluentui/pull/23287) by esteban.230@hotmail.com)
65
+ - Adding .beta to AvatarGroup stories so it's not shown in the docsite. ([PR #23216](https://github.com/microsoft/fluentui/pull/23216) by esteban.230@hotmail.com)
66
+ - Bump @fluentui/react-badge to v9.0.0-rc.12 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
67
+ - Bump @fluentui/react-button to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
68
+ - Bump @fluentui/react-popover to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
69
+ - Bump @fluentui/react-tooltip to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
70
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
71
+ - Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
72
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
73
+
74
+ ## [9.0.0-rc.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.11)
75
+
76
+ Thu, 26 May 2022 21:01:22 GMT
77
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.10..@fluentui/react-avatar_v9.0.0-rc.11)
78
+
79
+ ### Changes
80
+
81
+ - fix react-avatar: use initials as a fallback label even when no id is manually defined ([PR #23258](https://github.com/microsoft/fluentui/pull/23258) by sarah.higley@microsoft.com)
82
+ - Bump @fluentui/react-badge to v9.0.0-rc.11 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
83
+ - Bump @fluentui/react-button to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
84
+ - Bump @fluentui/react-popover to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
85
+ - Bump @fluentui/react-tooltip to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
86
+
87
+ ## [9.0.0-rc.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.10)
88
+
89
+ Mon, 23 May 2022 18:56:40 GMT
90
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.9..@fluentui/react-avatar_v9.0.0-rc.10)
91
+
92
+ ### Changes
93
+
94
+ - BREAKING: update string unions to use spinal-case ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by seanmonahan@microsoft.com)
95
+ - Removing <componentName>ClassName exports. ([PR #23092](https://github.com/microsoft/fluentui/pull/23092) by esteban.230@hotmail.com)
96
+ - Bump @fluentui/react-badge to v9.0.0-rc.10 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
97
+ - Bump @fluentui/react-button to v9.0.0-rc.11 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
98
+ - Bump @fluentui/react-popover to v9.0.0-rc.11 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
99
+ - Bump @fluentui/react-tooltip to v9.0.0-rc.11 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
100
+ - Bump @fluentui/react-theme to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
101
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.9 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
102
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.7 ([PR #23146](https://github.com/microsoft/fluentui/pull/23146) by beachball)
103
+
104
+ ## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.9)
105
+
106
+ Mon, 23 May 2022 12:14:00 GMT
107
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.8..@fluentui/react-avatar_v9.0.0-rc.9)
108
+
109
+ ### Changes
110
+
111
+ - Add support for size={16} to Avatar ([PR #23003](https://github.com/microsoft/fluentui/pull/23003) by behowell@microsoft.com)
112
+ - chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
113
+ - chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
114
+ - Moving Avatar stories to stories folder. ([PR #23047](https://github.com/microsoft/fluentui/pull/23047) by esteban.230@hotmail.com)
115
+ - Bump @fluentui/react-badge to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
116
+ - Bump @fluentui/react-button to v9.0.0-rc.10 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
117
+ - Bump @fluentui/react-popover to v9.0.0-rc.10 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
118
+ - Bump @fluentui/react-tooltip to v9.0.0-rc.10 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
119
+ - Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
120
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
121
+ - Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
122
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
123
+
124
+ ## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.8)
125
+
126
+ Thu, 05 May 2022 18:26:29 GMT
127
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.7..@fluentui/react-avatar_v9.0.0-rc.8)
128
+
129
+ ### Changes
130
+
131
+ - feat: ship rolluped only dts ([PR #22823](https://github.com/microsoft/fluentui/pull/22823) by martinhochel@microsoft.com)
132
+ - Bump @fluentui/react-badge to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
133
+ - Bump @fluentui/react-button to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
134
+ - Bump @fluentui/react-popover to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
135
+ - Bump @fluentui/react-tooltip to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
136
+ - Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
137
+ - Bump @fluentui/react-shared-contexts to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
138
+ - Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
139
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
140
+
7
141
  ## [9.0.0-rc.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-rc.7)
8
142
 
9
- Wed, 04 May 2022 13:24:05 GMT
143
+ Wed, 04 May 2022 13:26:37 GMT
10
144
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-rc.6..@fluentui/react-avatar_v9.0.0-rc.7)
11
145
 
12
146
  ### Changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { Button } from '@fluentui/react-button';
1
+ /// <reference types="react" />
2
+
2
3
  import type { ComponentProps } from '@fluentui/react-utilities';
3
4
  import type { ComponentState } from '@fluentui/react-utilities';
4
5
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
@@ -11,154 +12,187 @@ import { TooltipProps } from '@fluentui/react-tooltip';
11
12
 
12
13
  export declare const Avatar: ForwardRefComponent<AvatarProps>;
13
14
 
15
+ export declare const avatarClassNames: SlotClassNames<AvatarSlots>;
16
+
14
17
  /**
15
- * @deprecated Use `avatarClassNames.root` instead.
18
+ * The AvatarGroup component represents a group of multiple people or entities by taking care of the arrangement
19
+ * of individual Avatars in a spread, stack, or pie layout.
16
20
  */
17
- export declare const avatarClassName = "fui-Avatar";
21
+ export declare const AvatarGroup: ForwardRefComponent<AvatarGroupProps>;
18
22
 
19
- export declare const avatarClassNames: SlotClassNames<AvatarSlots>;
23
+ export declare const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots>;
20
24
 
21
- declare type AvatarCommons = {
22
- /**
23
- * The name of the person or entity represented by this Avatar. This should always be provided if it is available.
24
- *
25
- * The name will be used to determine the initials displayed when there is no icon, as well as provided to
26
- * accessibility tools.
27
- */
28
- name?: string;
29
- /**
30
- * Size of the avatar in pixels.
31
- *
32
- * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and
33
- * based on design guidelines for the Avatar control.
34
- *
35
- * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
36
- * to override the rendered size.
37
- *
38
- * For example, to set the avatar to 45px in size:
39
- * `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
40
- *
41
- * @defaultvalue 32
42
- */
43
- size: AvatarSizes;
44
- /**
45
- * The avatar can have a circular or square shape.
46
- * @defaultvalue circular
47
- */
48
- shape: 'circular' | 'square';
25
+ /**
26
+ * The AvatarGroupItem component represents a single person or entity.
27
+ * AvatarGroupItem should only be used in an AvatarGroup component.
28
+ */
29
+ export declare const AvatarGroupItem: ForwardRefComponent<AvatarGroupItemProps>;
30
+
31
+ export declare const avatarGroupItemClassNames: SlotClassNames<AvatarGroupItemSlots>;
32
+
33
+ /**
34
+ * AvatarGroupItem Props
35
+ */
36
+ export declare type AvatarGroupItemProps = Omit<ComponentProps<Partial<AvatarGroupItemSlots>, 'avatar'>, 'size' | 'shape'>;
37
+
38
+ export declare type AvatarGroupItemSlots = {
39
+ root: NonNullable<Slot<'div'>>;
49
40
  /**
50
- * Optional activity indicator
51
- * * active: the avatar will be decorated according to activeAppearance
52
- * * inactive: the avatar will be reduced in size and partially transparent
53
- * * unset: normal display
54
- *
55
- * @defaultvalue unset
41
+ * Avatar that represents a person or entity.
56
42
  */
57
- active: 'active' | 'inactive' | 'unset';
43
+ avatar: NonNullable<Slot<typeof Avatar>>;
58
44
  /**
59
- * The appearance when `active="active"`
60
- *
61
- * @defaultvalue ring
45
+ * Label used for the name of the AvatarGroupItem when rendered as an overflow item.
46
+ * The content of the label, by default, is the `name` prop from the `avatar` slot.
62
47
  */
63
- activeAppearance: 'ring' | 'shadow' | 'ring-shadow';
48
+ overflowLabel: NonNullable<Slot<'span'>>;
49
+ };
50
+
51
+ /**
52
+ * State used in rendering AvatarGroupItem
53
+ */
54
+ export declare type AvatarGroupItemState = ComponentState<AvatarGroupItemSlots> & {
64
55
  /**
65
- * The color when displaying either an icon or initials.
66
- * * neutral (default): gray
67
- * * brand: color from the brand palette
68
- * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
69
- * * [AvatarNamedColor]: a specific color from the theme
56
+ * Whether the Avatar is an overflow item.
70
57
  *
71
- * @defaultvalue neutral
72
- */
73
- color: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
74
- /**
75
- * Specify a string to be used instead of the name, to determine which color to use when color="colorful".
76
- * Use this when a name is not available, but there is another unique identifier that can be used instead.
58
+ * @default false
77
59
  */
78
- idForColor: string | undefined;
60
+ isOverflowItem?: boolean;
61
+ nonOverflowAvatarsCount: number;
62
+ layout: AvatarGroupProps['layout'];
63
+ size: AvatarSizes;
79
64
  };
80
65
 
81
66
  /**
82
- * AvatarGroup component - TODO: add more docs
67
+ * AvatarGroup Props
83
68
  */
84
- export declare const AvatarGroup: ForwardRefComponent<AvatarGroupProps>;
85
-
86
- export declare const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots>;
87
-
88
- declare type AvatarGroupCommons = {
69
+ export declare type AvatarGroupProps = ComponentProps<AvatarGroupSlots> & {
89
70
  /**
90
71
  * Layout the Avatars should be displayed as.
91
72
  * @default spread
92
73
  */
93
- layout: 'spread' | 'stack' | 'pie';
74
+ layout?: 'spread' | 'stack' | 'pie';
94
75
  /**
95
76
  * Maximum number of Avatars to be displayed before overflowing.
96
- * NOTE: if pie layout is used, `maxAvatars` will be ignored.
77
+ * Note: if pie layout is used, `maxAvatars` will be ignored.
97
78
  * @default 5
98
79
  */
99
- maxAvatars: number;
100
- /**
101
- * Size of the avatars.
102
- * @default 32
103
- */
104
- size: AvatarSizes;
80
+ maxAvatars?: number;
105
81
  /**
106
82
  * Whether the overflow indicator should render an icon instead of the number of overflowed avatars.
107
- * @default false
83
+ * Note: The overflowIndicator will default to `icon` when the size is less than 24.
84
+ * @default count
108
85
  */
109
- overflowIndicator: 'number-overflowed' | 'icon';
86
+ overflowIndicator?: 'count' | 'icon';
110
87
  /**
111
- * Strings for localizing text in the tooltip.
88
+ * Size of the avatars.
89
+ * @default 32
112
90
  */
113
- strings?: AvatarGroupStrings;
91
+ size?: AvatarSizes;
114
92
  };
115
93
 
116
- /**
117
- * AvatarGroup Props
118
- */
119
- export declare type AvatarGroupProps = ComponentProps<AvatarGroupSlots> & Partial<AvatarGroupCommons>;
120
-
121
94
  export declare type AvatarGroupSlots = {
122
- root: Slot<'div'>;
95
+ root: NonNullable<Slot<'div'>>;
123
96
  /**
124
97
  * Popover trigger slot that can be used to change the overflow indicator.
125
98
  */
126
- popoverTrigger?: Slot<typeof Button>;
99
+ overflowButton?: NonNullable<Slot<'button'>>;
127
100
  /**
128
- * Popover surface that will be displayed when the popover is triggered.
101
+ * List that contains the overflow AvatarGroupItems.
129
102
  */
130
- popoverSurface?: Slot<typeof PopoverSurface>;
103
+ overflowContent?: NonNullable<Slot<typeof PopoverSurface>>;
131
104
  };
132
105
 
133
106
  /**
134
107
  * State used in rendering AvatarGroup
135
108
  */
136
- export declare type AvatarGroupState = ComponentState<AvatarGroupSlots> & AvatarGroupCommons & {
137
- tooltipContent: TooltipProps['content'];
138
- };
139
-
140
- declare type AvatarGroupStrings = {
109
+ export declare type AvatarGroupState = ComponentState<AvatarGroupSlots> & Required<Pick<AvatarGroupProps, 'layout' | 'size' | 'overflowIndicator'>> & {
110
+ /**
111
+ * Whether there are more Avatars than `maxAvatars`.
112
+ * @default false
113
+ */
114
+ hasOverflow: boolean;
141
115
  /**
142
- * Text applied to the overflow indicator's tooltip.
143
- * Can include the token "\{numOverflowedAvatars\}" which will be replaced with the number of overflowed avatars.
116
+ * Tooltip content for the overflow indicator.
144
117
  */
145
- tooltipContent: string;
118
+ tooltipContent: TooltipProps['content'];
119
+ nonOverflowAvatarsCount: number;
146
120
  };
147
121
 
148
122
  /**
149
123
  * A specific named color for the Avatar
150
124
  */
151
- export declare type AvatarNamedColor = 'darkRed' | 'cranberry' | 'red' | 'pumpkin' | 'peach' | 'marigold' | 'gold' | 'brass' | 'brown' | 'forest' | 'seafoam' | 'darkGreen' | 'lightTeal' | 'teal' | 'steel' | 'blue' | 'royalBlue' | 'cornflower' | 'navy' | 'lavender' | 'purple' | 'grape' | 'lilac' | 'pink' | 'magenta' | 'plum' | 'beige' | 'mink' | 'platinum' | 'anchor';
125
+ export declare type AvatarNamedColor = 'dark-red' | 'cranberry' | 'red' | 'pumpkin' | 'peach' | 'marigold' | 'gold' | 'brass' | 'brown' | 'forest' | 'seafoam' | 'dark-green' | 'light-teal' | 'teal' | 'steel' | 'blue' | 'royal-blue' | 'cornflower' | 'navy' | 'lavender' | 'purple' | 'grape' | 'lilac' | 'pink' | 'magenta' | 'plum' | 'beige' | 'mink' | 'platinum' | 'anchor';
152
126
 
153
127
  /**
154
128
  * Properties for Avatar
155
129
  */
156
- export declare type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & Partial<AvatarCommons>;
130
+ export declare type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & {
131
+ /**
132
+ * Optional activity indicator
133
+ * * active: the avatar will be decorated according to activeAppearance
134
+ * * inactive: the avatar will be reduced in size and partially transparent
135
+ * * unset: normal display
136
+ *
137
+ * @default unset
138
+ */
139
+ active?: 'active' | 'inactive' | 'unset';
140
+ /**
141
+ * The appearance when `active="active"`
142
+ *
143
+ * @default ring
144
+ */
145
+ activeAppearance?: 'ring' | 'shadow' | 'ring-shadow';
146
+ /**
147
+ * The color when displaying either an icon or initials.
148
+ * * neutral (default): gray
149
+ * * brand: color from the brand palette
150
+ * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
151
+ * * [AvatarNamedColor]: a specific color from the theme
152
+ *
153
+ * @default neutral
154
+ */
155
+ color?: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
156
+ /**
157
+ * Specify a string to be used instead of the name, to determine which color to use when color="colorful".
158
+ * Use this when a name is not available, but there is another unique identifier that can be used instead.
159
+ */
160
+ idForColor?: string | undefined;
161
+ /**
162
+ * The name of the person or entity represented by this Avatar. This should always be provided if it is available.
163
+ *
164
+ * The name will be used to determine the initials displayed when there is no icon, as well as provided to
165
+ * accessibility tools.
166
+ */
167
+ name?: string;
168
+ /**
169
+ * The avatar can have a circular or square shape.
170
+ * @default circular
171
+ */
172
+ shape?: 'circular' | 'square';
173
+ /**
174
+ * Size of the avatar in pixels.
175
+ *
176
+ * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and
177
+ * based on design guidelines for the Avatar control.
178
+ *
179
+ * Note: At size 16, if initials are displayed, only the first initial will be rendered.
180
+ *
181
+ * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
182
+ * to override the rendered size.
183
+ *
184
+ * For example, to set the avatar to 45px in size:
185
+ * `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
186
+ *
187
+ * @default 32
188
+ */
189
+ size?: AvatarSizes;
190
+ };
157
191
 
158
192
  /**
159
193
  * Sizes that can be used for the Avatar
160
194
  */
161
- export declare type AvatarSizes = 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;
195
+ export declare type AvatarSizes = 16 | 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;
162
196
 
163
197
  export declare type AvatarSlots = {
164
198
  root: Slot<'span'>;
@@ -180,7 +214,7 @@ export declare type AvatarSlots = {
180
214
  /**
181
215
  * Icon to be displayed when the avatar doesn't have an image or initials.
182
216
  *
183
- * @defaultvalue `PersonRegular` (the default icon's size depends on the Avatar's size)
217
+ * @default `PersonRegular` (the default icon's size depends on the Avatar's size)
184
218
  */
185
219
  icon?: Slot<'span'>;
186
220
  /**
@@ -192,11 +226,11 @@ export declare type AvatarSlots = {
192
226
  /**
193
227
  * State used in rendering Avatar
194
228
  */
195
- export declare type AvatarState = ComponentState<AvatarSlots> & AvatarCommons & {
229
+ export declare type AvatarState = ComponentState<AvatarSlots> & Required<Pick<AvatarProps, 'active' | 'activeAppearance' | 'shape' | 'size'>> & {
196
230
  /**
197
- * The Avatar's color, with `'colorful'` resolved to a named color
231
+ * The Avatar's color, it matches props.color but with `'colorful'` resolved to a named color
198
232
  */
199
- color: Exclude<AvatarCommons['color'], 'colorful'>;
233
+ color: NonNullable<Exclude<AvatarProps['color'], 'colorful'>>;
200
234
  };
201
235
 
202
236
  /**
@@ -207,12 +241,19 @@ export declare type AvatarState = ComponentState<AvatarSlots> & AvatarCommons &
207
241
  *
208
242
  * @param displayName - The full name of the person or entity
209
243
  * @param isRtl - Whether the display is in RTL
210
- * @param allowPhoneInitials - Should initials be generated from phone numbers (default false)
244
+ * @param options - Extra options to control the behavior of getInitials
211
245
  *
212
246
  * @returns The 1 or 2 character initials based on the name. Or an empty string if no initials
213
247
  * could be derived from the name.
248
+ *
249
+ * @internal
214
250
  */
215
- export declare function getInitials(displayName: string | undefined | null, isRtl: boolean, allowPhoneInitials?: boolean): string;
251
+ export declare function getInitials(displayName: string | undefined | null, isRtl: boolean, options?: {
252
+ /** Should initials be generated from phone numbers (default false) */
253
+ allowPhoneInitials?: boolean;
254
+ /** Returns only the first initial */
255
+ firstInitialOnly?: boolean;
256
+ }): string;
216
257
 
217
258
  export declare const renderAvatar_unstable: (state: AvatarState) => JSX.Element;
218
259
 
@@ -221,6 +262,11 @@ export declare const renderAvatar_unstable: (state: AvatarState) => JSX.Element;
221
262
  */
222
263
  export declare const renderAvatarGroup_unstable: (state: AvatarGroupState) => JSX.Element;
223
264
 
265
+ /**
266
+ * Render the final JSX of AvatarGroupItem
267
+ */
268
+ export declare const renderAvatarGroupItem_unstable: (state: AvatarGroupItemState) => JSX.Element;
269
+
224
270
  export declare const useAvatar_unstable: (props: AvatarProps, ref: React_2.Ref<HTMLElement>) => AvatarState;
225
271
 
226
272
  /**
@@ -234,6 +280,22 @@ export declare const useAvatar_unstable: (props: AvatarProps, ref: React_2.Ref<H
234
280
  */
235
281
  export declare const useAvatarGroup_unstable: (props: AvatarGroupProps, ref: React_2.Ref<HTMLElement>) => AvatarGroupState;
236
282
 
283
+ /**
284
+ * Create the state required to render AvatarGroupItem.
285
+ *
286
+ * The returned state can be modified with hooks such as useAvatarGroupItemStyles_unstable,
287
+ * before being passed to renderAvatarGroupItem_unstable.
288
+ *
289
+ * @param props - props from this instance of AvatarGroupItem
290
+ * @param ref - reference to root HTMLElement of AvatarGroupItem
291
+ */
292
+ export declare const useAvatarGroupItem_unstable: (props: AvatarGroupItemProps, ref: React_2.Ref<HTMLElement>) => AvatarGroupItemState;
293
+
294
+ /**
295
+ * Apply styling to the AvatarGroupItem slots based on the state
296
+ */
297
+ export declare const useAvatarGroupItemStyles_unstable: (state: AvatarGroupItemState) => AvatarGroupItemState;
298
+
237
299
  /**
238
300
  * Apply styling to the AvatarGroup slots based on the state
239
301
  */
File without changes
@@ -0,0 +1,2 @@
1
+ export * from './components/AvatarGroupItem/index';
2
+ //# sourceMappingURL=AvatarGroupItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarGroupItem.js","sourceRoot":"../src/","sources":["AvatarGroupItem.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/AvatarGroupItem/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AAEA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CANuD,CAAjD;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { renderAvatar_unstable } from './renderAvatar';\nimport { useAvatar_unstable } from './useAvatar';\nimport { useAvatarStyles_unstable } from './useAvatarStyles';\nimport type { AvatarProps } from './Avatar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\nexport const Avatar: ForwardRefComponent<AvatarProps> = React.forwardRef((props, ref) => {\n const state = useAvatar_unstable(props, ref);\n\n useAvatarStyles_unstable(state);\n\n return renderAvatar_unstable(state);\n});\n\nAvatar.displayName = 'Avatar';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtF,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;EAEA,wBAAwB,CAAC,KAAD,CAAxB;EAEA,OAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CANuD,CAAjD;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { renderAvatar_unstable } from './renderAvatar';\nimport { useAvatar_unstable } from './useAvatar';\nimport { useAvatarStyles_unstable } from './useAvatarStyles';\nimport type { AvatarProps } from './Avatar.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\nexport const Avatar: ForwardRefComponent<AvatarProps> = React.forwardRef((props, ref) => {\n const state = useAvatar_unstable(props, ref);\n\n useAvatarStyles_unstable(state);\n\n return renderAvatar_unstable(state);\n});\n\nAvatar.displayName = 'Avatar';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.types.js","sourceRoot":"../src/","sources":["components/Avatar/Avatar.types.ts"],"names":[],"mappings":"","sourcesContent":["import { PresenceBadge } from '@fluentui/react-badge';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type AvatarSlots = {\n root: Slot<'span'>;\n\n /**\n * The Avatar's image.\n *\n * Usage e.g.: `image={{ src: '...' }}`\n */\n image?: Slot<'img'>;\n\n /**\n * (optional) Custom initials.\n *\n * It is usually not necessary to specify custom initials; by default they will be derived from the `name` prop,\n * using the `getInitials` function.\n *\n * The initials are displayed when there is no image (including while the image is loading).\n */\n initials?: Slot<'span'>;\n\n /**\n * Icon to be displayed when the avatar doesn't have an image or initials.\n *\n * @defaultvalue `PersonRegular` (the default icon's size depends on the Avatar's size)\n */\n icon?: Slot<'span'>;\n\n /**\n * Badge to show the avatar's presence status.\n */\n badge?: Slot<typeof PresenceBadge>;\n};\n\ntype AvatarCommons = {\n /**\n * The name of the person or entity represented by this Avatar. This should always be provided if it is available.\n *\n * The name will be used to determine the initials displayed when there is no icon, as well as provided to\n * accessibility tools.\n */\n name?: string;\n\n /**\n * Size of the avatar in pixels.\n *\n * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and\n * based on design guidelines for the Avatar control.\n *\n * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`\n * to override the rendered size.\n *\n * For example, to set the avatar to 45px in size:\n * `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`\n *\n * @defaultvalue 32\n */\n size: AvatarSizes;\n\n /**\n * The avatar can have a circular or square shape.\n * @defaultvalue circular\n */\n shape: 'circular' | 'square';\n\n /**\n * Optional activity indicator\n * * active: the avatar will be decorated according to activeAppearance\n * * inactive: the avatar will be reduced in size and partially transparent\n * * unset: normal display\n *\n * @defaultvalue unset\n */\n active: 'active' | 'inactive' | 'unset';\n\n /**\n * The appearance when `active=\"active\"`\n *\n * @defaultvalue ring\n */\n activeAppearance: 'ring' | 'shadow' | 'ring-shadow';\n\n /**\n * The color when displaying either an icon or initials.\n * * neutral (default): gray\n * * brand: color from the brand palette\n * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)\n * * [AvatarNamedColor]: a specific color from the theme\n *\n * @defaultvalue neutral\n */\n color: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;\n\n /**\n * Specify a string to be used instead of the name, to determine which color to use when color=\"colorful\".\n * Use this when a name is not available, but there is another unique identifier that can be used instead.\n */\n idForColor: string | undefined;\n};\n\n/**\n * A specific named color for the Avatar\n */\nexport type AvatarNamedColor =\n | 'darkRed'\n | 'cranberry'\n | 'red'\n | 'pumpkin'\n | 'peach'\n | 'marigold'\n | 'gold'\n | 'brass'\n | 'brown'\n | 'forest'\n | 'seafoam'\n | 'darkGreen'\n | 'lightTeal'\n | 'teal'\n | 'steel'\n | 'blue'\n | 'royalBlue'\n | 'cornflower'\n | 'navy'\n | 'lavender'\n | 'purple'\n | 'grape'\n | 'lilac'\n | 'pink'\n | 'magenta'\n | 'plum'\n | 'beige'\n | 'mink'\n | 'platinum'\n | 'anchor';\n\n/**\n * Sizes that can be used for the Avatar\n */\nexport type AvatarSizes = 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;\n\n/**\n * Properties for Avatar\n */\nexport type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & Partial<AvatarCommons>;\n\n/**\n * State used in rendering Avatar\n */\nexport type AvatarState = ComponentState<AvatarSlots> &\n AvatarCommons & {\n /**\n * The Avatar's color, with `'colorful'` resolved to a named color\n */\n color: Exclude<AvatarCommons['color'], 'colorful'>;\n };\n"]}
1
+ {"version":3,"file":"Avatar.types.js","sourceRoot":"../src/","sources":["components/Avatar/Avatar.types.ts"],"names":[],"mappings":"","sourcesContent":["import { PresenceBadge } from '@fluentui/react-badge';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type AvatarSlots = {\n root: Slot<'span'>;\n\n /**\n * The Avatar's image.\n *\n * Usage e.g.: `image={{ src: '...' }}`\n */\n image?: Slot<'img'>;\n\n /**\n * (optional) Custom initials.\n *\n * It is usually not necessary to specify custom initials; by default they will be derived from the `name` prop,\n * using the `getInitials` function.\n *\n * The initials are displayed when there is no image (including while the image is loading).\n */\n initials?: Slot<'span'>;\n\n /**\n * Icon to be displayed when the avatar doesn't have an image or initials.\n *\n * @default `PersonRegular` (the default icon's size depends on the Avatar's size)\n */\n icon?: Slot<'span'>;\n\n /**\n * Badge to show the avatar's presence status.\n */\n badge?: Slot<typeof PresenceBadge>;\n};\n\n/**\n * A specific named color for the Avatar\n */\nexport type AvatarNamedColor =\n | 'dark-red'\n | 'cranberry'\n | 'red'\n | 'pumpkin'\n | 'peach'\n | 'marigold'\n | 'gold'\n | 'brass'\n | 'brown'\n | 'forest'\n | 'seafoam'\n | 'dark-green'\n | 'light-teal'\n | 'teal'\n | 'steel'\n | 'blue'\n | 'royal-blue'\n | 'cornflower'\n | 'navy'\n | 'lavender'\n | 'purple'\n | 'grape'\n | 'lilac'\n | 'pink'\n | 'magenta'\n | 'plum'\n | 'beige'\n | 'mink'\n | 'platinum'\n | 'anchor';\n\n/**\n * Sizes that can be used for the Avatar\n */\nexport type AvatarSizes = 16 | 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;\n\n/**\n * Properties for Avatar\n */\nexport type AvatarProps = Omit<ComponentProps<AvatarSlots>, 'color'> & {\n /**\n * Optional activity indicator\n * * active: the avatar will be decorated according to activeAppearance\n * * inactive: the avatar will be reduced in size and partially transparent\n * * unset: normal display\n *\n * @default unset\n */\n active?: 'active' | 'inactive' | 'unset';\n\n /**\n * The appearance when `active=\"active\"`\n *\n * @default ring\n */\n activeAppearance?: 'ring' | 'shadow' | 'ring-shadow';\n\n /**\n * The color when displaying either an icon or initials.\n * * neutral (default): gray\n * * brand: color from the brand palette\n * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)\n * * [AvatarNamedColor]: a specific color from the theme\n *\n * @default neutral\n */\n color?: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;\n\n /**\n * Specify a string to be used instead of the name, to determine which color to use when color=\"colorful\".\n * Use this when a name is not available, but there is another unique identifier that can be used instead.\n */\n idForColor?: string | undefined;\n\n /**\n * The name of the person or entity represented by this Avatar. This should always be provided if it is available.\n *\n * The name will be used to determine the initials displayed when there is no icon, as well as provided to\n * accessibility tools.\n */\n name?: string;\n\n /**\n * The avatar can have a circular or square shape.\n * @default circular\n */\n shape?: 'circular' | 'square';\n\n /**\n * Size of the avatar in pixels.\n *\n * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`) and\n * based on design guidelines for the Avatar control.\n *\n * Note: At size 16, if initials are displayed, only the first initial will be rendered.\n *\n * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`\n * to override the rendered size.\n *\n * For example, to set the avatar to 45px in size:\n * `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`\n *\n * @default 32\n */\n size?: AvatarSizes;\n};\n\n/**\n * State used in rendering Avatar\n */\nexport type AvatarState = ComponentState<AvatarSlots> &\n Required<Pick<AvatarProps, 'active' | 'activeAppearance' | 'shape' | 'size'>> & {\n /**\n * The Avatar's color, it matches props.color but with `'colorful'` resolved to a named color\n */\n color: NonNullable<Exclude<AvatarProps['color'], 'colorful'>>;\n };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Avatar/renderAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;AAC1D,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;AAAf,GAAf,CADrB,EAEG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,EAGG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAHlB,EAIG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CAJlB,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { AvatarSlots, AvatarState } from './Avatar.types';\n\nexport const renderAvatar_unstable = (state: AvatarState) => {\n const { slots, slotProps } = getSlots<AvatarSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.initials && <slots.initials {...slotProps.initials} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slots.image && <slots.image {...slotProps.image} />}\n {slots.badge && <slots.badge {...slotProps.badge} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Avatar/renderAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;EAC1D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAc,KAAd,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;EAAf,CAAf,CADrB,EAEG,KAAK,CAAC,IAAN,iBAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAFjB,EAGG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAHlB,EAIG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAJlB,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { AvatarSlots, AvatarState } from './Avatar.types';\n\nexport const renderAvatar_unstable = (state: AvatarState) => {\n const { slots, slotProps } = getSlots<AvatarSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.initials && <slots.initials {...slotProps.initials} />}\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {slots.image && <slots.image {...slotProps.image} />}\n {slots.badge && <slots.badge {...slotProps.badge} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}