@fluentui/react-avatar 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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 (151) hide show
  1. package/CHANGELOG.md +58 -14
  2. package/dist/index.d.cts +0 -3
  3. package/dist/index.d.ts +0 -3
  4. package/lib/components/Avatar/Avatar.js.map +1 -1
  5. package/lib/components/Avatar/Avatar.module.css +587 -0
  6. package/lib/components/Avatar/Avatar.types.js.map +1 -1
  7. package/lib/components/Avatar/index.js.map +1 -1
  8. package/lib/components/Avatar/renderAvatar.js +2 -2
  9. package/lib/components/Avatar/renderAvatar.js.map +1 -1
  10. package/lib/components/Avatar/useAvatar.js +1 -1
  11. package/lib/components/Avatar/useAvatar.js.map +1 -1
  12. package/lib/components/Avatar/useAvatarStyles.styles.css.js +56 -0
  13. package/lib/components/Avatar/useAvatarStyles.styles.css.js.map +1 -0
  14. package/lib/components/Avatar/useAvatarStyles.styles.raw.css.js +56 -0
  15. package/lib/components/Avatar/useAvatarStyles.styles.raw.css.js.map +1 -0
  16. package/lib/components/Avatar/useAvatarStyles.styles.raw.js.map +1 -1
  17. package/lib/components/AvatarGroup/AvatarGroup.js.map +1 -1
  18. package/lib/components/AvatarGroup/AvatarGroup.module.css +143 -0
  19. package/lib/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
  20. package/lib/components/AvatarGroup/index.js.map +1 -1
  21. package/lib/components/AvatarGroup/renderAvatarGroup.js +2 -2
  22. package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  23. package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  24. package/lib/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -1
  25. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.css.js +9 -0
  26. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.css.js.map +1 -0
  27. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.raw.css.js +9 -0
  28. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.raw.css.js.map +1 -0
  29. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.raw.js.map +1 -1
  30. package/lib/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
  31. package/lib/components/AvatarGroupItem/AvatarGroupItem.module.css +80 -0
  32. package/lib/components/AvatarGroupItem/AvatarGroupItem.types.js.map +1 -1
  33. package/lib/components/AvatarGroupItem/index.js.map +1 -1
  34. package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js +2 -2
  35. package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -1
  36. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
  37. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.css.js +24 -0
  38. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.css.js.map +1 -0
  39. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.css.js +24 -0
  40. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.css.js.map +1 -0
  41. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.js.map +1 -1
  42. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -1
  43. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.module.css +156 -0
  44. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.types.js.map +1 -1
  45. package/lib/components/AvatarGroupPopover/index.js.map +1 -1
  46. package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js +2 -2
  47. package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -1
  48. package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -1
  49. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -1
  50. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.css.js +22 -0
  51. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.css.js.map +1 -0
  52. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.css.js +22 -0
  53. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.css.js.map +1 -0
  54. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.js.map +1 -1
  55. package/lib/contexts/AvatarContext.js.map +1 -1
  56. package/lib/contexts/AvatarGroupContext.js.map +1 -1
  57. package/lib/contexts/index.js.map +1 -1
  58. package/lib/utils/getInitials.js +4 -7
  59. package/lib/utils/getInitials.js.map +1 -1
  60. package/lib/utils/index.js.map +1 -1
  61. package/lib/utils/partitionAvatarGroupItems.js +1 -1
  62. package/lib/utils/partitionAvatarGroupItems.js.map +1 -1
  63. package/lib-commonjs/Avatar.cjs +9 -9
  64. package/lib-commonjs/Avatar.cjs.map +1 -1
  65. package/lib-commonjs/AvatarGroup.cjs +9 -9
  66. package/lib-commonjs/AvatarGroup.cjs.map +1 -1
  67. package/lib-commonjs/AvatarGroupItem.cjs +8 -8
  68. package/lib-commonjs/AvatarGroupPopover.cjs +8 -8
  69. package/lib-commonjs/components/Avatar/Avatar.cjs.map +1 -1
  70. package/lib-commonjs/components/Avatar/Avatar.module.css +587 -0
  71. package/lib-commonjs/components/Avatar/Avatar.types.cjs.map +1 -1
  72. package/lib-commonjs/components/Avatar/index.cjs +9 -9
  73. package/lib-commonjs/components/Avatar/index.cjs.map +1 -1
  74. package/lib-commonjs/components/Avatar/renderAvatar.cjs.map +1 -1
  75. package/lib-commonjs/components/Avatar/useAvatar.cjs +5 -5
  76. package/lib-commonjs/components/Avatar/useAvatar.cjs.map +1 -1
  77. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.cjs +4 -4
  78. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.cjs.map +1 -1
  79. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.css.cjs +81 -0
  80. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.css.cjs.map +1 -0
  81. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.raw.cjs +4 -4
  82. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.raw.cjs.map +1 -1
  83. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.raw.css.cjs +81 -0
  84. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.raw.css.cjs.map +1 -0
  85. package/lib-commonjs/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
  86. package/lib-commonjs/components/AvatarGroup/AvatarGroup.module.css +143 -0
  87. package/lib-commonjs/components/AvatarGroup/AvatarGroup.types.cjs.map +1 -1
  88. package/lib-commonjs/components/AvatarGroup/index.cjs +9 -9
  89. package/lib-commonjs/components/AvatarGroup/index.cjs.map +1 -1
  90. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.cjs.map +1 -1
  91. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.cjs +4 -4
  92. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.cjs.map +1 -1
  93. package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.cjs.map +1 -1
  94. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.cjs +3 -3
  95. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.cjs.map +1 -1
  96. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.css.cjs +28 -0
  97. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.css.cjs.map +1 -0
  98. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.raw.cjs +3 -3
  99. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.raw.cjs.map +1 -1
  100. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.raw.css.cjs +28 -0
  101. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.raw.css.cjs.map +1 -0
  102. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.cjs.map +1 -1
  103. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.module.css +80 -0
  104. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.types.cjs.map +1 -1
  105. package/lib-commonjs/components/AvatarGroupItem/index.cjs +8 -8
  106. package/lib-commonjs/components/AvatarGroupItem/index.cjs.map +1 -1
  107. package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.cjs.map +1 -1
  108. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.cjs +3 -3
  109. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.cjs.map +1 -1
  110. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.cjs +4 -4
  111. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.cjs.map +1 -1
  112. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.css.cjs +46 -0
  113. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.css.cjs.map +1 -0
  114. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.cjs +4 -4
  115. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.cjs.map +1 -1
  116. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.css.cjs +46 -0
  117. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.css.cjs.map +1 -0
  118. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.cjs.map +1 -1
  119. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.module.css +156 -0
  120. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.types.cjs.map +1 -1
  121. package/lib-commonjs/components/AvatarGroupPopover/index.cjs +8 -8
  122. package/lib-commonjs/components/AvatarGroupPopover/index.cjs.map +1 -1
  123. package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.cjs.map +1 -1
  124. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.cjs +3 -3
  125. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.cjs.map +1 -1
  126. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.cjs.map +1 -1
  127. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.cjs +3 -3
  128. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.cjs.map +1 -1
  129. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.css.cjs +41 -0
  130. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.css.cjs.map +1 -0
  131. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.cjs +3 -3
  132. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.cjs.map +1 -1
  133. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.css.cjs +41 -0
  134. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.css.cjs.map +1 -0
  135. package/lib-commonjs/contexts/AvatarContext.cjs +3 -3
  136. package/lib-commonjs/contexts/AvatarContext.cjs.map +1 -1
  137. package/lib-commonjs/contexts/AvatarGroupContext.cjs +4 -4
  138. package/lib-commonjs/contexts/AvatarGroupContext.cjs.map +1 -1
  139. package/lib-commonjs/contexts/index.cjs +6 -6
  140. package/lib-commonjs/contexts/index.cjs.map +1 -1
  141. package/lib-commonjs/index.cjs +33 -33
  142. package/lib-commonjs/index.cjs.map +1 -1
  143. package/lib-commonjs/utils/getInitials.cjs +6 -9
  144. package/lib-commonjs/utils/getInitials.cjs.map +1 -1
  145. package/lib-commonjs/utils/index.cjs +3 -3
  146. package/lib-commonjs/utils/index.cjs.map +1 -1
  147. package/lib-commonjs/utils/partitionAvatarGroupItems.cjs +1 -1
  148. package/lib-commonjs/utils/partitionAvatarGroupItems.cjs.map +1 -1
  149. package/package.json +17 -17
  150. package/dist/metadata/api/api-root.json +0 -1
  151. package/dist/metadata/index.json +0 -1
@@ -0,0 +1,587 @@
1
+ @layer fluentui {
2
+ /* ---- Root base (32px default, circular) ---- */
3
+ .root {
4
+ display: inline-block;
5
+ flex-shrink: 0;
6
+ position: relative;
7
+ vertical-align: middle;
8
+ border-radius: var(--borderRadiusCircular);
9
+ font-family: var(--fontFamilyBase);
10
+ font-weight: var(--fontWeightSemibold);
11
+ /* Default text size (sizes 32–40): caption1Strong base is fontSizeBase300 */
12
+ font-size: var(--fontSizeBase300);
13
+ width: 32px;
14
+ height: 32px;
15
+ /* Default icon size for sizes 28–40 */
16
+ & :global(.fui-Avatar__icon) {
17
+ font-size: 20px;
18
+ }
19
+ }
20
+
21
+ /* ::before = ring, ::after = shadow. Hidden by default (no content). */
22
+ .root::before,
23
+ .root::after {
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ bottom: 0;
28
+ right: 0;
29
+ z-index: -1;
30
+ margin: calc(-2 * var(--fui-Avatar-ringWidth, 0px));
31
+ border-radius: inherit;
32
+ transition-property: margin, opacity;
33
+ transition-timing-function: var(--curveEasyEaseMax), var(--curveLinear);
34
+ transition-duration: var(--durationUltraSlow), var(--durationSlower);
35
+ }
36
+
37
+ @media screen and (prefers-reduced-motion: reduce) {
38
+ .root::before,
39
+ .root::after {
40
+ transition-duration: 0.01ms;
41
+ }
42
+ }
43
+
44
+ .root::before {
45
+ border-style: solid;
46
+ border-width: var(--fui-Avatar-ringWidth, 0px);
47
+ }
48
+
49
+ /* ---- Image slot ---- */
50
+ .image {
51
+ position: absolute;
52
+ top: 0;
53
+ left: 0;
54
+ width: 100%;
55
+ height: 100%;
56
+ border-radius: inherit;
57
+ object-fit: cover;
58
+ vertical-align: top;
59
+ }
60
+
61
+ /* ---- Icon and initials slots share the same base layout ---- */
62
+ .iconInitials {
63
+ position: absolute;
64
+ box-sizing: border-box;
65
+ top: 0;
66
+ left: 0;
67
+ width: 100%;
68
+ height: 100%;
69
+ line-height: 1;
70
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ text-align: center;
75
+ user-select: none;
76
+ border-radius: inherit;
77
+ }
78
+
79
+ /* ---- Badge slot (bottom-right corner) ---- */
80
+ .badge {
81
+ position: absolute;
82
+ bottom: 0;
83
+ inset-inline-end: 0;
84
+ }
85
+
86
+ /* Root modifier when badge is present */
87
+ .badgeAlign {
88
+ --fui-Avatar-badgeAlign: right;
89
+ }
90
+ .badgeAlign:dir(rtl) {
91
+ --fui-Avatar-badgeAlign: left;
92
+ }
93
+
94
+ /* Badge cutout mask */
95
+ .badgeCutout {
96
+ mask-image: radial-gradient(
97
+ circle at bottom var(--fui-Avatar-badgeRadius) var(--fui-Avatar-badgeAlign, right) var(--fui-Avatar-badgeRadius),
98
+ transparent calc(var(--fui-Avatar-badgeRadius) + var(--fui-Avatar-badgeGap) - 0.25px),
99
+ white calc(var(--fui-Avatar-badgeRadius) + var(--fui-Avatar-badgeGap) + 0.25px)
100
+ );
101
+ }
102
+
103
+ /* Ring ::before cutout when badge is also present */
104
+ .ringBadgeCutout::before {
105
+ mask-image: radial-gradient(
106
+ circle at bottom calc(var(--fui-Avatar-badgeRadius) + 2 * var(--fui-Avatar-ringWidth, 0px))
107
+ var(--fui-Avatar-badgeAlign, right) calc(var(--fui-Avatar-badgeRadius) + 2 * var(--fui-Avatar-ringWidth, 0px)),
108
+ transparent calc(var(--fui-Avatar-badgeRadius) + var(--fui-Avatar-badgeGap) - 0.25px),
109
+ white calc(var(--fui-Avatar-badgeRadius) + var(--fui-Avatar-badgeGap) + 0.25px)
110
+ );
111
+ }
112
+
113
+ /* ---- Sizes with embedded font-size and icon-size ---- */
114
+ /* Each size class sets width/height, and overrides font-size + icon font-size where they
115
+ differ from the .root defaults (fontSizeBase300, icon 20px). */
116
+
117
+ .size16 {
118
+ width: 16px;
119
+ height: 16px;
120
+ font-size: var(--fontSizeBase100);
121
+ & :global(.fui-Avatar__icon) {
122
+ font-size: 12px;
123
+ }
124
+ }
125
+ .size20 {
126
+ width: 20px;
127
+ height: 20px;
128
+ font-size: var(--fontSizeBase100);
129
+ & :global(.fui-Avatar__icon) {
130
+ font-size: 16px;
131
+ }
132
+ }
133
+ .size24 {
134
+ width: 24px;
135
+ height: 24px;
136
+ font-size: var(--fontSizeBase100);
137
+ & :global(.fui-Avatar__icon) {
138
+ font-size: 16px;
139
+ }
140
+ }
141
+ .size28 {
142
+ width: 28px;
143
+ height: 28px;
144
+ font-size: var(--fontSizeBase200);
145
+ /* icon stays 20px (inherited from .root default) */
146
+ }
147
+ /* size32: .root default (no class applied) */
148
+ .size36 {
149
+ width: 36px;
150
+ height: 36px; /* font/icon: .root defaults */
151
+ }
152
+ .size40 {
153
+ width: 40px;
154
+ height: 40px; /* font/icon: .root defaults */
155
+ }
156
+ .size48 {
157
+ width: 48px;
158
+ height: 48px;
159
+ font-size: var(--fontSizeBase400);
160
+ & :global(.fui-Avatar__icon) {
161
+ font-size: 24px;
162
+ }
163
+ }
164
+ .size56 {
165
+ width: 56px;
166
+ height: 56px;
167
+ font-size: var(--fontSizeBase400);
168
+ & :global(.fui-Avatar__icon) {
169
+ font-size: 28px;
170
+ }
171
+ }
172
+ .size64 {
173
+ width: 64px;
174
+ height: 64px;
175
+ font-size: var(--fontSizeBase500);
176
+ & :global(.fui-Avatar__icon) {
177
+ font-size: 32px;
178
+ }
179
+ }
180
+ .size72 {
181
+ width: 72px;
182
+ height: 72px;
183
+ font-size: var(--fontSizeBase500);
184
+ & :global(.fui-Avatar__icon) {
185
+ font-size: 32px;
186
+ }
187
+ }
188
+ .size96 {
189
+ width: 96px;
190
+ height: 96px;
191
+ font-size: var(--fontSizeBase500);
192
+ & :global(.fui-Avatar__icon) {
193
+ font-size: 48px;
194
+ }
195
+ }
196
+ .size120 {
197
+ width: 120px;
198
+ height: 120px;
199
+ font-size: var(--fontSizeBase600);
200
+ & :global(.fui-Avatar__icon) {
201
+ font-size: 48px;
202
+ }
203
+ }
204
+ .size128 {
205
+ width: 128px;
206
+ height: 128px;
207
+ font-size: var(--fontSizeBase600);
208
+ & :global(.fui-Avatar__icon) {
209
+ font-size: 48px;
210
+ }
211
+ }
212
+
213
+ .size32 {
214
+ width: 32px;
215
+ height: 32px;
216
+ }
217
+
218
+ /* ---- Square shape: border-radius per size group ---- */
219
+ /* :where() keeps specificity at (0,1,0) — same as a single class */
220
+ .square:where(.size16, .size20, .size24) {
221
+ border-radius: var(--borderRadiusSmall);
222
+ }
223
+ .square:where(.size28, .size32, .size36, .size40, .size48) {
224
+ border-radius: var(--borderRadiusMedium);
225
+ }
226
+ .square:where(.size56, .size64, .size72) {
227
+ border-radius: var(--borderRadiusLarge);
228
+ }
229
+ .square:where(.size96, .size120, .size128) {
230
+ border-radius: var(--borderRadiusXLarge);
231
+ }
232
+ /* size32 has no class, so we need to handle it: .square without a size class = size32 */
233
+ .square:not(
234
+ :is(
235
+ .size16,
236
+ .size20,
237
+ .size24,
238
+ .size28,
239
+ .size36,
240
+ .size40,
241
+ .size48,
242
+ .size56,
243
+ .size64,
244
+ .size72,
245
+ .size96,
246
+ .size120,
247
+ .size128
248
+ )
249
+ ) {
250
+ border-radius: var(--borderRadiusMedium);
251
+ }
252
+
253
+ /* ---- Badge size: CSS vars for mask calculations ---- */
254
+ .tiny {
255
+ --fui-Avatar-badgeRadius: 3px;
256
+ --fui-Avatar-badgeGap: var(--strokeWidthThin);
257
+ }
258
+ .extra-small {
259
+ --fui-Avatar-badgeRadius: 5px;
260
+ --fui-Avatar-badgeGap: var(--strokeWidthThin);
261
+ }
262
+ .small {
263
+ --fui-Avatar-badgeRadius: 6px;
264
+ --fui-Avatar-badgeGap: var(--strokeWidthThin);
265
+ }
266
+ .medium {
267
+ --fui-Avatar-badgeRadius: 8px;
268
+ --fui-Avatar-badgeGap: var(--strokeWidthThin);
269
+ }
270
+ .large {
271
+ --fui-Avatar-badgeRadius: 10px;
272
+ --fui-Avatar-badgeGap: var(--strokeWidthThick);
273
+ }
274
+ .extra-large {
275
+ --fui-Avatar-badgeRadius: 14px;
276
+ --fui-Avatar-badgeGap: var(--strokeWidthThick);
277
+ }
278
+
279
+ /* ---- Ring (::before): activate + thickness from size ---- */
280
+ .ring::before {
281
+ content: '';
282
+ }
283
+
284
+ /* Ring thickness: controlled by --fui-Avatar-ringWidth, selected by size group */
285
+ .ring:where(.size16, .size20, .size24, .size28, .size36, .size40, .size48),
286
+ .ring:not(
287
+ :is(.size16, .size20, .size24, .size28, .size36, .size40, .size56, .size64, .size72, .size96, .size120, .size128)
288
+ ) {
289
+ --fui-Avatar-ringWidth: var(--strokeWidthThick); /* sizes ≤ 48 */
290
+ }
291
+ .ring:where(.size56, .size64) {
292
+ --fui-Avatar-ringWidth: var(--strokeWidthThicker);
293
+ }
294
+ .ring:where(.size72, .size96, .size120, .size128) {
295
+ --fui-Avatar-ringWidth: var(--strokeWidthThickest);
296
+ }
297
+
298
+ /* Ring border colors (one per palette color) */
299
+ .ring:where(.neutral, .brand)::before {
300
+ border-color: var(--colorBrandStroke1);
301
+ }
302
+ .ring:where(.dark-red)::before {
303
+ border-color: var(--colorPaletteDarkRedBorderActive);
304
+ }
305
+ .ring:where(.cranberry)::before {
306
+ border-color: var(--colorPaletteCranberryBorderActive);
307
+ }
308
+ .ring:where(.red)::before {
309
+ border-color: var(--colorPaletteRedBorderActive);
310
+ }
311
+ .ring:where(.pumpkin)::before {
312
+ border-color: var(--colorPalettePumpkinBorderActive);
313
+ }
314
+ .ring:where(.peach)::before {
315
+ border-color: var(--colorPalettePeachBorderActive);
316
+ }
317
+ .ring:where(.marigold)::before {
318
+ border-color: var(--colorPaletteMarigoldBorderActive);
319
+ }
320
+ .ring:where(.gold)::before {
321
+ border-color: var(--colorPaletteGoldBorderActive);
322
+ }
323
+ .ring:where(.brass)::before {
324
+ border-color: var(--colorPaletteBrassBorderActive);
325
+ }
326
+ .ring:where(.brown)::before {
327
+ border-color: var(--colorPaletteBrownBorderActive);
328
+ }
329
+ .ring:where(.forest)::before {
330
+ border-color: var(--colorPaletteForestBorderActive);
331
+ }
332
+ .ring:where(.seafoam)::before {
333
+ border-color: var(--colorPaletteSeafoamBorderActive);
334
+ }
335
+ .ring:where(.dark-green)::before {
336
+ border-color: var(--colorPaletteDarkGreenBorderActive);
337
+ }
338
+ .ring:where(.light-teal)::before {
339
+ border-color: var(--colorPaletteLightTealBorderActive);
340
+ }
341
+ .ring:where(.teal)::before {
342
+ border-color: var(--colorPaletteTealBorderActive);
343
+ }
344
+ .ring:where(.steel)::before {
345
+ border-color: var(--colorPaletteSteelBorderActive);
346
+ }
347
+ .ring:where(.blue)::before {
348
+ border-color: var(--colorPaletteBlueBorderActive);
349
+ }
350
+ .ring:where(.royal-blue)::before {
351
+ border-color: var(--colorPaletteRoyalBlueBorderActive);
352
+ }
353
+ .ring:where(.cornflower)::before {
354
+ border-color: var(--colorPaletteCornflowerBorderActive);
355
+ }
356
+ .ring:where(.navy)::before {
357
+ border-color: var(--colorPaletteNavyBorderActive);
358
+ }
359
+ .ring:where(.lavender)::before {
360
+ border-color: var(--colorPaletteLavenderBorderActive);
361
+ }
362
+ .ring:where(.purple)::before {
363
+ border-color: var(--colorPalettePurpleBorderActive);
364
+ }
365
+ .ring:where(.grape)::before {
366
+ border-color: var(--colorPaletteGrapeBorderActive);
367
+ }
368
+ .ring:where(.lilac)::before {
369
+ border-color: var(--colorPaletteLilacBorderActive);
370
+ }
371
+ .ring:where(.pink)::before {
372
+ border-color: var(--colorPalettePinkBorderActive);
373
+ }
374
+ .ring:where(.magenta)::before {
375
+ border-color: var(--colorPaletteMagentaBorderActive);
376
+ }
377
+ .ring:where(.plum)::before {
378
+ border-color: var(--colorPalettePlumBorderActive);
379
+ }
380
+ .ring:where(.beige)::before {
381
+ border-color: var(--colorPaletteBeigeBorderActive);
382
+ }
383
+ .ring:where(.mink)::before {
384
+ border-color: var(--colorPaletteMinkBorderActive);
385
+ }
386
+ .ring:where(.platinum)::before {
387
+ border-color: var(--colorPalettePlatinumBorderActive);
388
+ }
389
+ .ring:where(.anchor)::before {
390
+ border-color: var(--colorPaletteAnchorBorderActive);
391
+ }
392
+
393
+ /* ---- Shadow (::after): activate + depth from size ---- */
394
+ .shadow::after {
395
+ content: '';
396
+ }
397
+
398
+ .shadow:where(.size16, .size20, .size24, .size28)::after {
399
+ box-shadow: var(--shadow4);
400
+ }
401
+ .shadow:where(.size36, .size40, .size48)::after {
402
+ box-shadow: var(--shadow8);
403
+ }
404
+ .shadow:where(.size56, .size64)::after {
405
+ box-shadow: var(--shadow16);
406
+ }
407
+ .shadow:where(.size72, .size96, .size120, .size128)::after {
408
+ box-shadow: var(--shadow28);
409
+ }
410
+ /* size32 (no class): shadow8 range (29–48) */
411
+ .shadow:not(
412
+ :is(
413
+ .size16,
414
+ .size20,
415
+ .size24,
416
+ .size28,
417
+ .size36,
418
+ .size40,
419
+ .size48,
420
+ .size56,
421
+ .size64,
422
+ .size72,
423
+ .size96,
424
+ .size120,
425
+ .size128
426
+ )
427
+ )::after {
428
+ box-shadow: var(--shadow8);
429
+ }
430
+
431
+ /* ---- Active / inactive transition ---- */
432
+ .activeOrInactive {
433
+ transform: perspective(1px);
434
+ transition-property: transform, opacity;
435
+ transition-duration: var(--durationUltraSlow), var(--durationFaster);
436
+ transition-timing-function: var(--curveEasyEaseMax), var(--curveLinear);
437
+ }
438
+
439
+ @media screen and (prefers-reduced-motion: reduce) {
440
+ .activeOrInactive {
441
+ transition-duration: 0.01ms;
442
+ }
443
+ }
444
+
445
+ .inactive {
446
+ opacity: 0.8;
447
+ transform: scale(0.875);
448
+ transition-timing-function: var(--curveDecelerateMin), var(--curveLinear);
449
+ }
450
+
451
+ .inactive::before,
452
+ .inactive::after {
453
+ margin: 0;
454
+ opacity: 0;
455
+ transition-timing-function: var(--curveDecelerateMin), var(--curveLinear);
456
+ }
457
+
458
+ /* Keep root color qualifiers specificity-neutral and target only its own slots. */
459
+ :where(.neutral) > .iconInitials {
460
+ color: var(--colorNeutralForeground3);
461
+ background-color: var(--colorNeutralBackground6);
462
+ }
463
+ :where(.brand) > .iconInitials {
464
+ color: var(--colorNeutralForegroundStaticInverted);
465
+ background-color: var(--colorBrandBackgroundStatic);
466
+ }
467
+ :where(.dark-red) > .iconInitials {
468
+ color: var(--colorPaletteDarkRedForeground2);
469
+ background-color: var(--colorPaletteDarkRedBackground2);
470
+ }
471
+ :where(.cranberry) > .iconInitials {
472
+ color: var(--colorPaletteCranberryForeground2);
473
+ background-color: var(--colorPaletteCranberryBackground2);
474
+ }
475
+ :where(.red) > .iconInitials {
476
+ color: var(--colorPaletteRedForeground2);
477
+ background-color: var(--colorPaletteRedBackground2);
478
+ }
479
+ :where(.pumpkin) > .iconInitials {
480
+ color: var(--colorPalettePumpkinForeground2);
481
+ background-color: var(--colorPalettePumpkinBackground2);
482
+ }
483
+ :where(.peach) > .iconInitials {
484
+ color: var(--colorPalettePeachForeground2);
485
+ background-color: var(--colorPalettePeachBackground2);
486
+ }
487
+ :where(.marigold) > .iconInitials {
488
+ color: var(--colorPaletteMarigoldForeground2);
489
+ background-color: var(--colorPaletteMarigoldBackground2);
490
+ }
491
+ :where(.gold) > .iconInitials {
492
+ color: var(--colorPaletteGoldForeground2);
493
+ background-color: var(--colorPaletteGoldBackground2);
494
+ }
495
+ :where(.brass) > .iconInitials {
496
+ color: var(--colorPaletteBrassForeground2);
497
+ background-color: var(--colorPaletteBrassBackground2);
498
+ }
499
+ :where(.brown) > .iconInitials {
500
+ color: var(--colorPaletteBrownForeground2);
501
+ background-color: var(--colorPaletteBrownBackground2);
502
+ }
503
+ :where(.forest) > .iconInitials {
504
+ color: var(--colorPaletteForestForeground2);
505
+ background-color: var(--colorPaletteForestBackground2);
506
+ }
507
+ :where(.seafoam) > .iconInitials {
508
+ color: var(--colorPaletteSeafoamForeground2);
509
+ background-color: var(--colorPaletteSeafoamBackground2);
510
+ }
511
+ :where(.dark-green) > .iconInitials {
512
+ color: var(--colorPaletteDarkGreenForeground2);
513
+ background-color: var(--colorPaletteDarkGreenBackground2);
514
+ }
515
+ :where(.light-teal) > .iconInitials {
516
+ color: var(--colorPaletteLightTealForeground2);
517
+ background-color: var(--colorPaletteLightTealBackground2);
518
+ }
519
+ :where(.teal) > .iconInitials {
520
+ color: var(--colorPaletteTealForeground2);
521
+ background-color: var(--colorPaletteTealBackground2);
522
+ }
523
+ :where(.steel) > .iconInitials {
524
+ color: var(--colorPaletteSteelForeground2);
525
+ background-color: var(--colorPaletteSteelBackground2);
526
+ }
527
+ :where(.blue) > .iconInitials {
528
+ color: var(--colorPaletteBlueForeground2);
529
+ background-color: var(--colorPaletteBlueBackground2);
530
+ }
531
+ :where(.royal-blue) > .iconInitials {
532
+ color: var(--colorPaletteRoyalBlueForeground2);
533
+ background-color: var(--colorPaletteRoyalBlueBackground2);
534
+ }
535
+ :where(.cornflower) > .iconInitials {
536
+ color: var(--colorPaletteCornflowerForeground2);
537
+ background-color: var(--colorPaletteCornflowerBackground2);
538
+ }
539
+ :where(.navy) > .iconInitials {
540
+ color: var(--colorPaletteNavyForeground2);
541
+ background-color: var(--colorPaletteNavyBackground2);
542
+ }
543
+ :where(.lavender) > .iconInitials {
544
+ color: var(--colorPaletteLavenderForeground2);
545
+ background-color: var(--colorPaletteLavenderBackground2);
546
+ }
547
+ :where(.purple) > .iconInitials {
548
+ color: var(--colorPalettePurpleForeground2);
549
+ background-color: var(--colorPalettePurpleBackground2);
550
+ }
551
+ :where(.grape) > .iconInitials {
552
+ color: var(--colorPaletteGrapeForeground2);
553
+ background-color: var(--colorPaletteGrapeBackground2);
554
+ }
555
+ :where(.lilac) > .iconInitials {
556
+ color: var(--colorPaletteLilacForeground2);
557
+ background-color: var(--colorPaletteLilacBackground2);
558
+ }
559
+ :where(.pink) > .iconInitials {
560
+ color: var(--colorPalettePinkForeground2);
561
+ background-color: var(--colorPalettePinkBackground2);
562
+ }
563
+ :where(.magenta) > .iconInitials {
564
+ color: var(--colorPaletteMagentaForeground2);
565
+ background-color: var(--colorPaletteMagentaBackground2);
566
+ }
567
+ :where(.plum) > .iconInitials {
568
+ color: var(--colorPalettePlumForeground2);
569
+ background-color: var(--colorPalettePlumBackground2);
570
+ }
571
+ :where(.beige) > .iconInitials {
572
+ color: var(--colorPaletteBeigeForeground2);
573
+ background-color: var(--colorPaletteBeigeBackground2);
574
+ }
575
+ :where(.mink) > .iconInitials {
576
+ color: var(--colorPaletteMinkForeground2);
577
+ background-color: var(--colorPaletteMinkBackground2);
578
+ }
579
+ :where(.platinum) > .iconInitials {
580
+ color: var(--colorPalettePlatinumForeground2);
581
+ background-color: var(--colorPalettePlatinumBackground2);
582
+ }
583
+ :where(.anchor) > .iconInitials {
584
+ color: var(--colorPaletteAnchorForeground2);
585
+ background-color: var(--colorPaletteAnchorBackground2);
586
+ }
587
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Avatar/Avatar.types.ts"],"sourcesContent":["import type { PresenceBadge, PresenceBadgeBaseProps } from '@fluentui/react-badge';\nimport type { ComponentProps, ComponentState, JSXElement, Slot } from '@fluentui/react-utilities';\n\n/**\n * Sizes for the avatar\n * @deprecated use AvatarSize instead\n */\nexport type AvatarSizes = AvatarSize;\n/**\n * Sizes for the avatar\n */\nexport type AvatarSize = 16 | 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;\n\n/**\n * Shape of the avatar\n */\nexport type AvatarShape = 'circular' | 'square';\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\nexport type AvatarBaseSlots = Omit<AvatarSlots, 'badge'> & {\n /**\n * Badge to show the avatar's presence status.\n */\n badge?: Slot<PresenceBadgeBaseProps>;\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 * 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 is used to determine the initials displayed when there is no image. It is also 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?: AvatarShape;\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 needed, 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?: AvatarSize;\n};\n\nexport type AvatarBaseProps = ComponentProps<AvatarBaseSlots> & Pick<AvatarProps, 'active' | 'name'>;\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 /**\n * Hidden span to render the active state label for the purposes of including in the aria-labelledby, if needed.\n */\n activeAriaLabelElement?: JSXElement;\n };\n\nexport type AvatarBaseState = ComponentState<AvatarBaseSlots> & Pick<AvatarState, 'active' | 'activeAriaLabelElement'>;\n"],"names":[],"mappings":"AAsLA,WAAuH"}
1
+ {"version":3,"sources":["../../../src/components/Avatar/Avatar.types.ts"],"sourcesContent":["import type { PresenceBadge, PresenceBadgeBaseProps } from '@fluentui/react-badge';\nimport type { ComponentProps, ComponentState, JSXElement, Slot } from '@fluentui/react-utilities';\n\n/**\n * Sizes for the avatar\n * @deprecated use AvatarSize instead\n */\nexport type AvatarSizes = AvatarSize;\n/**\n * Sizes for the avatar\n */\nexport type AvatarSize = 16 | 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;\n\n/**\n * Shape of the avatar\n */\nexport type AvatarShape = 'circular' | 'square';\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\nexport type AvatarBaseSlots = Omit<AvatarSlots, 'badge'> & {\n /**\n * Badge to show the avatar's presence status.\n */\n badge?: Slot<PresenceBadgeBaseProps>;\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 * 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 is used to determine the initials displayed when there is no image. It is also 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?: AvatarShape;\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 needed, 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?: AvatarSize;\n};\n\nexport type AvatarBaseProps = ComponentProps<AvatarBaseSlots> & Pick<AvatarProps, 'active' | 'name'>;\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 /**\n * Hidden span to render the active state label for the purposes of including in the aria-labelledby, if needed.\n */\n activeAriaLabelElement?: JSXElement;\n };\n\nexport type AvatarBaseState = ComponentState<AvatarBaseSlots> & Pick<AvatarState, 'active' | 'activeAriaLabelElement'>;\n"],"names":[],"mappings":"AAsLA,WAAuH"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Avatar/index.ts"],"sourcesContent":["export type {\n AvatarNamedColor,\n AvatarBaseProps,\n AvatarProps,\n AvatarShape,\n AvatarSize,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n AvatarSizes,\n AvatarBaseSlots,\n AvatarSlots,\n AvatarBaseState,\n AvatarState,\n} from './Avatar.types';\nexport { Avatar } from './Avatar';\nexport { renderAvatar_unstable } from './renderAvatar';\nexport { DEFAULT_STRINGS, useAvatar_unstable, useAvatarBase_unstable } from './useAvatar';\nexport { avatarClassNames, useAvatarStyles_unstable, useSizeStyles } from './useAvatarStyles.styles';\n"],"names":["Avatar","renderAvatar_unstable","DEFAULT_STRINGS","useAvatar_unstable","useAvatarBase_unstable","avatarClassNames","useAvatarStyles_unstable","useSizeStyles"],"mappings":"AAaA,SAASA,MAAM,QAAQ,cAAW;AAClC,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,eAAe,EAAEC,kBAAkB,EAAEC,sBAAsB,QAAQ,iBAAc;AAC1F,SAASC,gBAAgB,EAAEC,wBAAwB,EAAEC,aAAa,QAAQ,8BAA2B"}
1
+ {"version":3,"sources":["../../../src/components/Avatar/index.ts"],"sourcesContent":["export type {\n AvatarNamedColor,\n AvatarBaseProps,\n AvatarProps,\n AvatarShape,\n AvatarSize,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n AvatarSizes,\n AvatarBaseSlots,\n AvatarSlots,\n AvatarBaseState,\n AvatarState,\n} from './Avatar.types';\nexport { Avatar } from './Avatar';\nexport { renderAvatar_unstable } from './renderAvatar';\nexport { DEFAULT_STRINGS, useAvatar_unstable, useAvatarBase_unstable } from './useAvatar';\nexport { avatarClassNames, useAvatarStyles_unstable, useSizeStyles } from './useAvatarStyles.styles';\n"],"names":["Avatar","renderAvatar_unstable","DEFAULT_STRINGS","useAvatar_unstable","useAvatarBase_unstable","avatarClassNames","useAvatarStyles_unstable","useSizeStyles"],"mappings":"AAaA,SAASA,MAAM,QAAQ,cAAW;AAClC,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,eAAe,EAAEC,kBAAkB,EAAEC,sBAAsB,QAAQ,iBAAc;AAC1F,SAASC,gBAAgB,EAAEC,wBAAwB,EAAEC,aAAa,QAAQ,8BAA2B"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  export const renderAvatar_unstable = (state)=>{
4
4
  assertSlots(state);
5
5
  return /*#__PURE__*/ _jsxs(state.root, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Avatar/renderAvatar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { AvatarBaseSlots, AvatarBaseState } from './Avatar.types';\n\nexport const renderAvatar_unstable = (state: AvatarBaseState): JSXElement => {\n assertSlots<AvatarBaseSlots>(state);\n\n return (\n <state.root>\n {state.initials && <state.initials />}\n {state.icon && <state.icon />}\n {state.image && <state.image />}\n {state.badge && <state.badge />}\n {state.activeAriaLabelElement}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAvatar_unstable","state","root","initials","icon","image","badge","activeAriaLabelElement"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAKxD,OAAO,MAAMC,wBAAwB,CAACC;IACpCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,QAAQ,kBAAI,KAACF,MAAME,QAAQ;YACjCF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;YACzBH,MAAMI,KAAK,kBAAI,KAACJ,MAAMI,KAAK;YAC3BJ,MAAMK,KAAK,kBAAI,KAACL,MAAMK,KAAK;YAC3BL,MAAMM,sBAAsB;;;AAGnC,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Avatar/renderAvatar.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nimport type { AvatarBaseSlots, AvatarBaseState } from './Avatar.types';\n\nexport const renderAvatar_unstable = (state: AvatarBaseState): JSXElement => {\n assertSlots<AvatarBaseSlots>(state);\n\n return (\n <state.root>\n {state.initials && <state.initials />}\n {state.icon && <state.icon />}\n {state.image && <state.image />}\n {state.badge && <state.badge />}\n {state.activeAriaLabelElement}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAvatar_unstable","state","root","initials","icon","image","badge","activeAriaLabelElement"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAKxD,OAAO,MAAMC,wBAAwB,CAACC;IACpCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,QAAQ,kBAAI,KAACF,MAAME,QAAQ;YACjCF,MAAMG,IAAI,kBAAI,KAACH,MAAMG,IAAI;YACzBH,MAAMI,KAAK,kBAAI,KAACJ,MAAMI,KAAK;YAC3BJ,MAAMK,KAAK,kBAAI,KAACL,MAAMK,KAAK;YAC3BL,MAAMM,sBAAsB;;;AAGnC,EAAE"}
@@ -11,11 +11,11 @@ export const DEFAULT_STRINGS = {
11
11
  inactive: 'inactive'
12
12
  };
13
13
  export const useAvatar_unstable = (props, ref)=>{
14
+ var _ref;
14
15
  const { dir } = useFluent();
15
16
  const { shape: contextShape, size: contextSize } = useAvatarContext();
16
17
  const { size = contextSize !== null && contextSize !== void 0 ? contextSize : 32, shape = contextShape !== null && contextShape !== void 0 ? contextShape : 'circular', activeAppearance = 'ring', idForColor, color: propColor = 'neutral', ...rest } = props;
17
18
  const state = useAvatarBase_unstable(rest, ref);
18
- var _ref;
19
19
  // Resolve 'colorful' to a specific color name
20
20
  const color = propColor === 'colorful' ? avatarColors[getHashCode((_ref = idForColor !== null && idForColor !== void 0 ? idForColor : props.name) !== null && _ref !== void 0 ? _ref : '') % avatarColors.length] : propColor;
21
21
  if (state.initials) {