@fluentui/react-avatar 9.0.0-alpha.80 → 9.0.0-alpha.84

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 (66) hide show
  1. package/CHANGELOG.json +149 -1
  2. package/CHANGELOG.md +50 -2
  3. package/SPEC.md +72 -71
  4. package/dist/react-avatar.d.ts +24 -9
  5. package/lib/Avatar.js.map +1 -1
  6. package/lib/common/isConformant.js.map +1 -1
  7. package/lib/components/Avatar/Avatar.d.ts +14 -2
  8. package/lib/components/Avatar/Avatar.js.map +1 -1
  9. package/lib/components/Avatar/Avatar.types.d.ts +6 -5
  10. package/lib/components/Avatar/Avatar.types.js.map +1 -1
  11. package/lib/components/Avatar/index.js.map +1 -1
  12. package/lib/components/Avatar/renderAvatar.js.map +1 -1
  13. package/lib/components/Avatar/useAvatar.js +1 -0
  14. package/lib/components/Avatar/useAvatar.js.map +1 -1
  15. package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
  16. package/lib/index.js.map +1 -1
  17. package/lib/utils/getInitials.js.map +1 -1
  18. package/lib/utils/index.js.map +1 -1
  19. package/lib-commonjs/Avatar.js.map +1 -1
  20. package/lib-commonjs/common/isConformant.js.map +1 -1
  21. package/lib-commonjs/components/Avatar/Avatar.d.ts +14 -2
  22. package/lib-commonjs/components/Avatar/Avatar.js.map +1 -1
  23. package/lib-commonjs/components/Avatar/Avatar.types.d.ts +6 -5
  24. package/lib-commonjs/components/Avatar/Avatar.types.js.map +1 -1
  25. package/lib-commonjs/components/Avatar/index.js.map +1 -1
  26. package/lib-commonjs/components/Avatar/renderAvatar.js.map +1 -1
  27. package/lib-commonjs/components/Avatar/useAvatar.js +1 -0
  28. package/lib-commonjs/components/Avatar/useAvatar.js.map +1 -1
  29. package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
  30. package/lib-commonjs/index.js.map +1 -1
  31. package/lib-commonjs/utils/getInitials.js.map +1 -1
  32. package/lib-commonjs/utils/index.js.map +1 -1
  33. package/package.json +11 -11
  34. package/lib-amd/Avatar.d.ts +0 -1
  35. package/lib-amd/Avatar.js +0 -6
  36. package/lib-amd/Avatar.js.map +0 -1
  37. package/lib-amd/common/isConformant.d.ts +0 -4
  38. package/lib-amd/common/isConformant.js +0 -16
  39. package/lib-amd/common/isConformant.js.map +0 -1
  40. package/lib-amd/components/Avatar/Avatar.d.ts +0 -3
  41. package/lib-amd/components/Avatar/Avatar.js +0 -12
  42. package/lib-amd/components/Avatar/Avatar.js.map +0 -1
  43. package/lib-amd/components/Avatar/Avatar.types.d.ts +0 -108
  44. package/lib-amd/components/Avatar/Avatar.types.js +0 -5
  45. package/lib-amd/components/Avatar/Avatar.types.js.map +0 -1
  46. package/lib-amd/components/Avatar/index.d.ts +0 -5
  47. package/lib-amd/components/Avatar/index.js +0 -10
  48. package/lib-amd/components/Avatar/index.js.map +0 -1
  49. package/lib-amd/components/Avatar/renderAvatar.d.ts +0 -2
  50. package/lib-amd/components/Avatar/renderAvatar.js +0 -15
  51. package/lib-amd/components/Avatar/renderAvatar.js.map +0 -1
  52. package/lib-amd/components/Avatar/useAvatar.d.ts +0 -7
  53. package/lib-amd/components/Avatar/useAvatar.js +0 -141
  54. package/lib-amd/components/Avatar/useAvatar.js.map +0 -1
  55. package/lib-amd/components/Avatar/useAvatarStyles.d.ts +0 -2
  56. package/lib-amd/components/Avatar/useAvatarStyles.js +0 -416
  57. package/lib-amd/components/Avatar/useAvatarStyles.js.map +0 -1
  58. package/lib-amd/index.d.ts +0 -1
  59. package/lib-amd/index.js +0 -6
  60. package/lib-amd/index.js.map +0 -1
  61. package/lib-amd/utils/getInitials.d.ts +0 -9
  62. package/lib-amd/utils/getInitials.js +0 -79
  63. package/lib-amd/utils/getInitials.js.map +0 -1
  64. package/lib-amd/utils/index.d.ts +0 -1
  65. package/lib-amd/utils/index.js +0 -7
  66. package/lib-amd/utils/index.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,155 @@
2
2
  "name": "@fluentui/react-avatar",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 16 Sep 2021 07:35:43 GMT",
5
+ "date": "Wed, 22 Sep 2021 10:08:31 GMT",
6
+ "tag": "@fluentui/react-avatar_v9.0.0-alpha.84",
7
+ "version": "9.0.0-alpha.84",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "ololubek@microsoft.com",
12
+ "package": "@fluentui/react-avatar",
13
+ "comment": "update react-icons dependency",
14
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-avatar",
19
+ "comment": "Bump @fluentui/react-badge to v9.0.0-alpha.84",
20
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-avatar",
25
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.70",
26
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-avatar",
31
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-alpha.50",
32
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-avatar",
37
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.52",
38
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-avatar",
43
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.45",
44
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-avatar",
49
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.14",
50
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
51
+ }
52
+ ],
53
+ "none": [
54
+ {
55
+ "author": "lingfangao@hotmail.com",
56
+ "package": "@fluentui/react-avatar",
57
+ "comment": "chore(Avatar): typing workaround for presence badge",
58
+ "commit": "bc3f1ec72fc7784a558b0dd6598ee0662f4649c1"
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ {
64
+ "date": "Tue, 21 Sep 2021 07:42:34 GMT",
65
+ "tag": "@fluentui/react-avatar_v9.0.0-alpha.83",
66
+ "version": "9.0.0-alpha.83",
67
+ "comments": {
68
+ "prerelease": [
69
+ {
70
+ "author": "gcox@microsoft.com",
71
+ "package": "@fluentui/react-avatar",
72
+ "comment": "Updating to types over interfaces",
73
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
74
+ },
75
+ {
76
+ "author": "beachball",
77
+ "package": "@fluentui/react-avatar",
78
+ "comment": "Bump @fluentui/react-badge to v9.0.0-alpha.83",
79
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
80
+ },
81
+ {
82
+ "author": "beachball",
83
+ "package": "@fluentui/react-avatar",
84
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-alpha.69",
85
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
86
+ },
87
+ {
88
+ "author": "beachball",
89
+ "package": "@fluentui/react-avatar",
90
+ "comment": "Bump @fluentui/react-theme to v9.0.0-alpha.23",
91
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
92
+ },
93
+ {
94
+ "author": "beachball",
95
+ "package": "@fluentui/react-avatar",
96
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-alpha.51",
97
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
98
+ },
99
+ {
100
+ "author": "beachball",
101
+ "package": "@fluentui/react-avatar",
102
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.44",
103
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
104
+ },
105
+ {
106
+ "author": "beachball",
107
+ "package": "@fluentui/react-avatar",
108
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.13",
109
+ "commit": "363765ba3d08d2facbb97fb80ab54ff27ac714fd"
110
+ }
111
+ ]
112
+ }
113
+ },
114
+ {
115
+ "date": "Mon, 20 Sep 2021 07:36:26 GMT",
116
+ "tag": "@fluentui/react-avatar_v9.0.0-alpha.82",
117
+ "version": "9.0.0-alpha.82",
118
+ "comments": {
119
+ "none": [
120
+ {
121
+ "author": "lingfangao@hotmail.com",
122
+ "package": "@fluentui/react-avatar",
123
+ "comment": "chore: use versioon eslint-plugin and react-conformance in dev dependencies",
124
+ "commit": "b8a304770f77c0353553a152dad34421070400a6"
125
+ }
126
+ ],
127
+ "prerelease": [
128
+ {
129
+ "author": "lingfangao@hotmail.com",
130
+ "package": "@fluentui/react-avatar",
131
+ "commit": "b8a304770f77c0353553a152dad34421070400a6",
132
+ "comment": "Bump @fluentui/react-avatar to v9.0.0-alpha.82"
133
+ }
134
+ ]
135
+ }
136
+ },
137
+ {
138
+ "date": "Fri, 17 Sep 2021 07:35:26 GMT",
139
+ "tag": "@fluentui/react-avatar_v9.0.0-alpha.81",
140
+ "version": "9.0.0-alpha.81",
141
+ "comments": {
142
+ "prerelease": [
143
+ {
144
+ "author": "Humberto.Morimoto@microsoft.com",
145
+ "package": "@fluentui/react-avatar",
146
+ "commit": "90d71a0914acbb73a0365d60a85237e3d58ef575",
147
+ "comment": "Bump @fluentui/react-avatar to v9.0.0-alpha.81"
148
+ }
149
+ ]
150
+ }
151
+ },
152
+ {
153
+ "date": "Thu, 16 Sep 2021 07:38:39 GMT",
6
154
  "tag": "@fluentui/react-avatar_v9.0.0-alpha.80",
7
155
  "version": "9.0.0-alpha.80",
8
156
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,60 @@
1
1
  # Change Log - @fluentui/react-avatar
2
2
 
3
- This log was last generated on Thu, 16 Sep 2021 07:35:43 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 22 Sep 2021 10:08:31 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-alpha.84](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-alpha.84)
8
+
9
+ Wed, 22 Sep 2021 10:08:31 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-alpha.83..@fluentui/react-avatar_v9.0.0-alpha.84)
11
+
12
+ ### Changes
13
+
14
+ - update react-icons dependency ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by ololubek@microsoft.com)
15
+ - Bump @fluentui/react-badge to v9.0.0-alpha.84 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
16
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.70 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
17
+ - Bump @fluentui/react-utilities to v9.0.0-alpha.50 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
18
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.52 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
19
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.45 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
20
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.14 ([commit](https://github.com/microsoft/fluentui/commit/bc3f1ec72fc7784a558b0dd6598ee0662f4649c1) by beachball)
21
+
22
+ ## [9.0.0-alpha.83](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-alpha.83)
23
+
24
+ Tue, 21 Sep 2021 07:42:34 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-alpha.82..@fluentui/react-avatar_v9.0.0-alpha.83)
26
+
27
+ ### Changes
28
+
29
+ - Updating to types over interfaces ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by gcox@microsoft.com)
30
+ - Bump @fluentui/react-badge to v9.0.0-alpha.83 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
31
+ - Bump @fluentui/react-make-styles to v9.0.0-alpha.69 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
32
+ - Bump @fluentui/react-theme to v9.0.0-alpha.23 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
33
+ - Bump @fluentui/babel-make-styles to v9.0.0-alpha.51 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
34
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-alpha.44 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
35
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-alpha.13 ([PR #19865](https://github.com/microsoft/fluentui/pull/19865) by beachball)
36
+
37
+ ## [9.0.0-alpha.82](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-alpha.82)
38
+
39
+ Mon, 20 Sep 2021 07:36:26 GMT
40
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-alpha.81..@fluentui/react-avatar_v9.0.0-alpha.82)
41
+
42
+ ### Changes
43
+
44
+ - Bump @fluentui/react-avatar to v9.0.0-alpha.82 ([PR #19844](https://github.com/microsoft/fluentui/pull/19844) by lingfangao@hotmail.com)
45
+
46
+ ## [9.0.0-alpha.81](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-alpha.81)
47
+
48
+ Fri, 17 Sep 2021 07:35:26 GMT
49
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-alpha.80..@fluentui/react-avatar_v9.0.0-alpha.81)
50
+
51
+ ### Changes
52
+
53
+ - Bump @fluentui/react-avatar to v9.0.0-alpha.81 ([PR #19840](https://github.com/microsoft/fluentui/pull/19840) by Humberto.Morimoto@microsoft.com)
54
+
7
55
  ## [9.0.0-alpha.80](https://github.com/microsoft/fluentui/tree/@fluentui/react-avatar_v9.0.0-alpha.80)
8
56
 
9
- Thu, 16 Sep 2021 07:35:43 GMT
57
+ Thu, 16 Sep 2021 07:38:39 GMT
10
58
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-avatar_v9.0.0-alpha.79..@fluentui/react-avatar_v9.0.0-alpha.80)
11
59
 
12
60
  ### Changes
package/SPEC.md CHANGED
@@ -112,77 +112,78 @@ From [Avatar.types.tsx](https://github.com/microsoft/fluentui/blob/master/packag
112
112
  ### Props
113
113
 
114
114
  ```ts
115
- export interface AvatarProps extends ComponentProps, React.HTMLAttributes<HTMLElement> {
116
- /** The Avatar's image. */
117
- image?: ShorthandProps<ImageProps>;
118
-
119
- /** The label shown when there's no image or icon. Defaults to the initials derived from `name` using `getInitials` */
120
- label?: ShorthandProps<React.HTMLAttributes<HTMLSpanElement>>;
121
-
122
- /** Icon displayed when there's no image. */
123
- icon?: ShorthandProps<React.HTMLAttributes<HTMLSpanElement>>;
124
-
125
- /** Badge to show the avatar's status. */
126
- badge?: ShorthandProps<BadgeProps>;
127
-
128
- /** The name used for displaying the initials of the avatar if the image is not provided. */
129
- name?: string;
130
-
131
- /** Custom method for generating the initials from the name property, which is shown if no image is provided. */
132
- getInitials?: (name: string, isRtl: boolean) => string;
133
-
134
- /**
135
- * Size of the avatar in pixels.
136
- *
137
- * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`).
138
- *
139
- * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
140
- * to override the rendered size.
141
- *
142
- * For example, to set the avatar to 45px in size:
143
- * `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
144
- *
145
- * @defaultvalue 32
146
- */
147
- size?: AvatarSizeValue;
148
-
149
- /** The avatar can have a square shape. */
150
- square?: boolean;
151
-
152
- /**
153
- * Optional activity indicator
154
- * * active: the avatar will be decorated according to activeDisplay
155
- * * inactive: the avatar will be reduced in size and partially transparent
156
- * * unset: normal display
157
- *
158
- * @defaultvalue unset
159
- */
160
- active?: 'active' | 'inactive' | 'unset';
161
-
162
- /**
163
- * The type of visual treatment to use when `active="active"`
164
- *
165
- * @defaultvalue ring
166
- */
167
- activeDisplay?: 'ring' | 'shadow' | 'glow' | 'ring-shadow' | 'ring-glow';
168
-
169
- /**
170
- * The color when displaying either an icon or initials.
171
- * * neutral (default): gray
172
- * * brand: color from the brand palette
173
- * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
174
- * * [AvatarNamedColor]: a specific color from the theme
175
- *
176
- * @defaultvalue neutral
177
- */
178
- color?: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
179
-
180
- /**
181
- * Specify a string to be used instead of the name, to determine which color to use when color="colorful".
182
- * Use this when a name is not available, but there is another unique identifier that can be used instead.
183
- */
184
- idForColor?: string;
185
- }
115
+ export type AvatarProps = ComponentProps &
116
+ React.HTMLAttributes<HTMLElement> & {
117
+ /** The Avatar's image. */
118
+ image?: ShorthandProps<ImageProps>;
119
+
120
+ /** The label shown when there's no image or icon. Defaults to the initials derived from `name` using `getInitials` */
121
+ label?: ShorthandProps<React.HTMLAttributes<HTMLSpanElement>>;
122
+
123
+ /** Icon displayed when there's no image. */
124
+ icon?: ShorthandProps<React.HTMLAttributes<HTMLSpanElement>>;
125
+
126
+ /** Badge to show the avatar's status. */
127
+ badge?: ShorthandProps<BadgeProps>;
128
+
129
+ /** The name used for displaying the initials of the avatar if the image is not provided. */
130
+ name?: string;
131
+
132
+ /** Custom method for generating the initials from the name property, which is shown if no image is provided. */
133
+ getInitials?: (name: string, isRtl: boolean) => string;
134
+
135
+ /**
136
+ * Size of the avatar in pixels.
137
+ *
138
+ * Size is restricted to a limited set of supported values recommended for most uses (see `AvatarSizeValue`).
139
+ *
140
+ * If a non-supported size is neeeded, set `size` to the next-smaller supported size, and set `width` and `height`
141
+ * to override the rendered size.
142
+ *
143
+ * For example, to set the avatar to 45px in size:
144
+ * `<Avatar size={40} style={{ width: '45px', height: '45px' }} />`
145
+ *
146
+ * @defaultvalue 32
147
+ */
148
+ size?: AvatarSizeValue;
149
+
150
+ /** The avatar can have a square shape. */
151
+ square?: boolean;
152
+
153
+ /**
154
+ * Optional activity indicator
155
+ * * active: the avatar will be decorated according to activeDisplay
156
+ * * inactive: the avatar will be reduced in size and partially transparent
157
+ * * unset: normal display
158
+ *
159
+ * @defaultvalue unset
160
+ */
161
+ active?: 'active' | 'inactive' | 'unset';
162
+
163
+ /**
164
+ * The type of visual treatment to use when `active="active"`
165
+ *
166
+ * @defaultvalue ring
167
+ */
168
+ activeDisplay?: 'ring' | 'shadow' | 'glow' | 'ring-shadow' | 'ring-glow';
169
+
170
+ /**
171
+ * The color when displaying either an icon or initials.
172
+ * * neutral (default): gray
173
+ * * brand: color from the brand palette
174
+ * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
175
+ * * [AvatarNamedColor]: a specific color from the theme
176
+ *
177
+ * @defaultvalue neutral
178
+ */
179
+ color?: 'neutral' | 'brand' | 'colorful' | AvatarNamedColor;
180
+
181
+ /**
182
+ * Specify a string to be used instead of the name, to determine which color to use when color="colorful".
183
+ * Use this when a name is not available, but there is another unique identifier that can be used instead.
184
+ */
185
+ idForColor?: string;
186
+ };
186
187
 
187
188
  /**
188
189
  * Sizes for the Avatar
@@ -1,11 +1,25 @@
1
- import type { ComponentPropsCompat } from '@fluentui/react-utilities';
1
+ import { ComponentPropsCompat } from '@fluentui/react-utilities';
2
2
  import type { ComponentStateCompat } from '@fluentui/react-utilities';
3
- import type { PresenceBadgeProps } from '@fluentui/react-badge';
3
+ import { ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
4
+ import { PresenceBadgeProps } from '@fluentui/react-badge';
4
5
  import type { PresenceBadgeStatus } from '@fluentui/react-badge';
5
6
  import * as React_2 from 'react';
6
- import type { ShorthandPropsCompat } from '@fluentui/react-utilities';
7
+ import { ShorthandPropsCompat } from '@fluentui/react-utilities';
7
8
 
8
- export declare const Avatar: React_2.ForwardRefExoticComponent<AvatarProps & React_2.RefAttributes<HTMLElement>>;
9
+ export declare const Avatar: React_2.ForwardRefExoticComponent<ComponentPropsCompat & React_2.HTMLAttributes<HTMLElement> & {
10
+ image?: ShorthandPropsCompat<React_2.ImgHTMLAttributes<HTMLImageElement>>;
11
+ label?: ShorthandPropsCompat<React_2.HTMLAttributes<HTMLElement>>;
12
+ icon?: ShorthandPropsCompat<React_2.HTMLAttributes<HTMLElement>>;
13
+ badge?: number | React_2.ReactElement<any, string | ((props: any) => React_2.ReactElement<any, string | any | (new (props: any) => React_2.Component<any, any, any>)> | null) | (new (props: any) => React_2.Component<any, any, any>)> | React_2.ReactNodeArray | React_2.ReactPortal | "available" | "away" | "busy" | "doNotDisturb" | "offline" | "outOfOffice" | ObjectShorthandPropsCompat<PresenceBadgeProps> | null | undefined;
14
+ name?: string | undefined;
15
+ getInitials?: ((name: string, isRtl: boolean) => string) | undefined;
16
+ size?: 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128 | undefined;
17
+ square?: boolean | undefined;
18
+ active?: "unset" | "active" | "inactive" | undefined;
19
+ activeDisplay?: "ring" | "ring-shadow" | "ring-glow" | "shadow" | "glow" | undefined;
20
+ color?: "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" | "neutral" | "brand" | "colorful" | undefined;
21
+ idForColor?: string | undefined;
22
+ } & React_2.RefAttributes<HTMLElement>>;
9
23
 
10
24
  /**
11
25
  * Names of AvatarProps that have a default value in useAvatar
@@ -17,7 +31,7 @@ export declare type AvatarDefaultedProps = 'size' | 'color' | 'activeDisplay' |
17
31
  */
18
32
  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';
19
33
 
20
- export declare interface AvatarProps extends ComponentPropsCompat, React_2.HTMLAttributes<HTMLElement> {
34
+ export declare type AvatarProps = ComponentPropsCompat & React_2.HTMLAttributes<HTMLElement> & {
21
35
  /**
22
36
  * The Avatar's image.
23
37
  */
@@ -82,7 +96,8 @@ export declare interface AvatarProps extends ComponentPropsCompat, React_2.HTMLA
82
96
  * The color when displaying either an icon or initials.
83
97
  * * neutral (default): gray
84
98
  * * brand: color from the brand palette
85
- * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
99
+ * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name
100
+ * (or idForColor if provided)
86
101
  * * [AvatarNamedColor]: a specific color from the theme
87
102
  *
88
103
  * @defaultvalue neutral
@@ -93,7 +108,7 @@ export declare interface AvatarProps extends ComponentPropsCompat, React_2.HTMLA
93
108
  * Use this when a name is not available, but there is another unique identifier that can be used instead.
94
109
  */
95
110
  idForColor?: string;
96
- }
111
+ };
97
112
 
98
113
  /**
99
114
  * Names of the shorthand properties in AvatarProps
@@ -112,7 +127,7 @@ export declare const avatarShorthandPropsCompat: AvatarShorthandPropsCompat[];
112
127
  */
113
128
  export declare type AvatarSizeValue = 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;
114
129
 
115
- export declare interface AvatarState extends ComponentStateCompat<AvatarProps, AvatarShorthandPropsCompat, AvatarDefaultedProps> {
130
+ export declare type AvatarState = ComponentStateCompat<AvatarProps, AvatarShorthandPropsCompat, AvatarDefaultedProps> & {
116
131
  /**
117
132
  * Ref to the root element
118
133
  */
@@ -121,7 +136,7 @@ export declare interface AvatarState extends ComponentStateCompat<AvatarProps, A
121
136
  * True if the avatar has no label/initials and should render an icon
122
137
  */
123
138
  showIcon?: boolean;
124
- }
139
+ };
125
140
 
126
141
  export declare const renderAvatar: (state: AvatarState) => JSX.Element;
127
142
 
package/lib/Avatar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"../src/","sources":["Avatar.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Avatar/index';\n"]}
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../src/Avatar.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AACA,OAAO,eAAP,MAA4B,yCAA5B;AAGA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,aAAa,EAAE,CAAC,cAAD,CAH4C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n disabledTests: ['has-docblock'],\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AACA,OAAO,eAAP,MAA4B,yCAA5B;AAGA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,aAAa,EAAE,CAAC,cAAD,CAH4C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
@@ -1,3 +1,15 @@
1
1
  import * as React from 'react';
2
- import type { AvatarProps } from './Avatar.types';
3
- export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLElement>>;
2
+ export declare const Avatar: React.ForwardRefExoticComponent<import("@fluentui/react-utilities").ComponentPropsCompat & React.HTMLAttributes<HTMLElement> & {
3
+ image?: import("@fluentui/react-utilities").ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;
4
+ label?: import("@fluentui/react-utilities").ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
5
+ icon?: import("@fluentui/react-utilities").ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
6
+ badge?: number | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | "available" | "away" | "busy" | "doNotDisturb" | "offline" | "outOfOffice" | import("@fluentui/react-utilities").ObjectShorthandPropsCompat<import("@fluentui/react-badge").PresenceBadgeProps> | null | undefined;
7
+ name?: string | undefined;
8
+ getInitials?: ((name: string, isRtl: boolean) => string) | undefined;
9
+ size?: 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128 | undefined;
10
+ square?: boolean | undefined;
11
+ active?: "unset" | "active" | "inactive" | undefined;
12
+ activeDisplay?: "ring" | "ring-shadow" | "ring-glow" | "shadow" | "glow" | undefined;
13
+ color?: "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" | "neutral" | "brand" | "colorful" | undefined;
14
+ idForColor?: string | undefined;
15
+ } & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,SAAT,QAA0B,aAA1B;AACA,SAAS,eAAT,QAAgC,mBAAhC;AAGA,OAAO,IAAM,MAAM,gBAAG,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAqB,GAArB,EAAgD;AACrF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAAvB;AAEA,EAAA,eAAe,CAAC,KAAD,CAAf;AAEA,SAAO,YAAY,CAAC,KAAD,CAAnB;AACD,CANqB,CAAf;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { renderAvatar } from './renderAvatar';\nimport { useAvatar } from './useAvatar';\nimport { useAvatarStyles } from './useAvatarStyles';\nimport type { AvatarProps } from './Avatar.types';\n\nexport const Avatar = React.forwardRef((props: AvatarProps, ref: React.Ref<HTMLElement>) => {\n const state = useAvatar(props, ref);\n\n useAvatarStyles(state);\n\n return renderAvatar(state);\n});\n\nAvatar.displayName = 'Avatar';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,SAAT,QAA0B,aAA1B;AACA,SAAS,eAAT,QAAgC,mBAAhC;AAGA,OAAO,IAAM,MAAM,gBAAG,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAqB,GAArB,EAAgD;AACrF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAAvB;AAEA,EAAA,eAAe,CAAC,KAAD,CAAf;AAEA,SAAO,YAAY,CAAC,KAAD,CAAnB;AACD,CANqB,CAAf;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
3
3
  import type { PresenceBadgeProps, PresenceBadgeStatus } from '@fluentui/react-badge';
4
- export interface AvatarProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {
4
+ export declare type AvatarProps = ComponentPropsCompat & React.HTMLAttributes<HTMLElement> & {
5
5
  /**
6
6
  * The Avatar's image.
7
7
  */
@@ -66,7 +66,8 @@ export interface AvatarProps extends ComponentPropsCompat, React.HTMLAttributes<
66
66
  * The color when displaying either an icon or initials.
67
67
  * * neutral (default): gray
68
68
  * * brand: color from the brand palette
69
- * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or idForColor if provided)
69
+ * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name
70
+ * (or idForColor if provided)
70
71
  * * [AvatarNamedColor]: a specific color from the theme
71
72
  *
72
73
  * @defaultvalue neutral
@@ -77,7 +78,7 @@ export interface AvatarProps extends ComponentPropsCompat, React.HTMLAttributes<
77
78
  * Use this when a name is not available, but there is another unique identifier that can be used instead.
78
79
  */
79
80
  idForColor?: string;
80
- }
81
+ };
81
82
  /**
82
83
  * Sizes for the Avatar
83
84
  *
@@ -96,7 +97,7 @@ export declare type AvatarShorthandPropsCompat = 'label' | 'image' | 'badge' | '
96
97
  * Names of AvatarProps that have a default value in useAvatar
97
98
  */
98
99
  export declare type AvatarDefaultedProps = 'size' | 'color' | 'activeDisplay' | 'getInitials' | 'label' | 'icon';
99
- export interface AvatarState extends ComponentStateCompat<AvatarProps, AvatarShorthandPropsCompat, AvatarDefaultedProps> {
100
+ export declare type AvatarState = ComponentStateCompat<AvatarProps, AvatarShorthandPropsCompat, AvatarDefaultedProps> & {
100
101
  /**
101
102
  * Ref to the root element
102
103
  */
@@ -105,4 +106,4 @@ export interface AvatarState extends ComponentStateCompat<AvatarProps, AvatarSho
105
106
  * True if the avatar has no label/initials and should render an icon
106
107
  */
107
108
  showIcon?: boolean;
108
- }
109
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.types.js","sourceRoot":"../src/","sources":["components/Avatar/Avatar.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';\nimport type { PresenceBadgeProps, PresenceBadgeStatus } from '@fluentui/react-badge';\n\nexport interface AvatarProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {\n /**\n * The Avatar's image.\n */\n image?: ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;\n\n /**\n * The label shown when there's no image. Defaults to the initials derived from `name` using `getInitials`.\n */\n label?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Icon to be displayed when the avatar doesn't have an image or name (or if getInitials returns an empty string).\n *\n * @defaultvalue `Person20Regular` (the default icon's size depends on the Avatar's size)\n */\n icon?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Badge to show the avatar's presence status.\n * Can either be a string indicating the status (\"busy\", \"away\", etc.), or a PresenceBadgeProps object.\n */\n badge?: PresenceBadgeStatus | Exclude<ShorthandPropsCompat<PresenceBadgeProps>, string>;\n\n /**\n * The name used for displaying the initials of the avatar if the image is not provided\n */\n name?: string;\n\n /**\n * Custom method for generating the initials from the name property, which is shown if no image is provided.\n */\n getInitials?: (name: string, isRtl: boolean) => 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`).\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?: AvatarSizeValue;\n\n /**\n * The avatar can have a square shape.\n */\n square?: boolean;\n\n /**\n * Optional activity indicator\n * * active: the avatar will be decorated according to activeDisplay\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 type of visual treatment to use when `active=\"active\"`\n *\n * @defaultvalue ring\n */\n activeDisplay?: 'ring' | 'shadow' | 'glow' | 'ring-shadow' | 'ring-glow';\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;\n}\n\n/**\n * Sizes for the Avatar\n *\n * This is a restricted list based on design guidelines for the Avatar control.\n */\nexport type AvatarSizeValue = 20 | 24 | 28 | 32 | 36 | 40 | 48 | 56 | 64 | 72 | 96 | 120 | 128;\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 * Names of the shorthand properties in AvatarProps\n */\nexport type AvatarShorthandPropsCompat = 'label' | 'image' | 'badge' | 'icon';\n\n/**\n * Names of AvatarProps that have a default value in useAvatar\n */\nexport type AvatarDefaultedProps = 'size' | 'color' | 'activeDisplay' | 'getInitials' | 'label' | 'icon';\n\nexport interface AvatarState\n extends ComponentStateCompat<AvatarProps, AvatarShorthandPropsCompat, AvatarDefaultedProps> {\n /**\n * Ref to the root element\n */\n ref: React.Ref<HTMLElement>;\n\n /**\n * True if the avatar has no label/initials and should render an icon\n */\n showIcon?: boolean;\n}\n"]}
1
+ {"version":3,"file":"Avatar.types.js","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './Avatar.types';\nexport * from './Avatar';\nexport * from './renderAvatar';\nexport * from './useAvatar';\nexport * from './useAvatarStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Avatar/renderAvatar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,0BAAT,QAA2C,aAA3C;AAGA,OAAO,IAAM,YAAY,GAAG,UAAC,KAAD,EAAmB;AACvC,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,EAAQ,0BAAR,CAArC;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CADF,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFrB,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CAJF,CADF;AAQD,CAVM","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { avatarShorthandPropsCompat } from './useAvatar';\nimport type { AvatarState } from './Avatar.types';\n\nexport const renderAvatar = (state: AvatarState) => {\n const { slots, slotProps } = getSlotsCompat(state, avatarShorthandPropsCompat);\n return (\n <slots.root {...slotProps.root}>\n <slots.label {...slotProps.label} />\n {state.showIcon && <slots.icon {...slotProps.icon} />}\n <slots.image {...slotProps.image} />\n <slots.badge {...slotProps.badge} />\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Avatar/renderAvatar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,0BAAT,QAA2C,aAA3C;AAGA,OAAO,IAAM,YAAY,GAAG,UAAC,KAAD,EAAmB;AACvC,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,EAAQ,0BAAR,CAArC;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CADF,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAFrB,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CAHF,eAIE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,KAAf,CAAZ,CAJF,CADF;AAQD,CAVM","sourceRoot":""}
@@ -105,6 +105,7 @@ var resolveAvatarShorthandPropsCompat = function (props) {
105
105
  }
106
106
 
107
107
  if (typeof badge === 'string') {
108
+ // TODO separate as an components https://github.com/microsoft/fluentui/pull/19763
108
109
  badge = {
109
110
  as: PresenceBadge,
110
111
  status: badge
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Avatar/useAvatar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,2BAAtD;AACA,SAAS,WAAT,QAA4B,mBAA5B;AACA,SACE,eADF,EAEE,eAFF,EAGE,eAHF,EAIE,eAJF,EAKE,eALF,EAME,eANF,QAOO,uBAPP;AAQA,SAAS,aAAT,QAA8B,uBAA9B;AAGA;;AAEG;;AACH,OAAO,IAAM,0BAA0B,GAAiC,CAAC,OAAD,EAAU,OAAV,EAAmB,OAAnB,EAA4B,MAA5B,CAAjE;AAEP,IAAM,UAAU,gBAAG,cAAc,CAAc;AAAE,EAAA,SAAS,EAAE;AAAb,CAAd,CAAjC;AAEA,OAAO,IAAM,SAAS,GAAG,UAAC,KAAD,EAAqB,GAArB,EAAkD,YAAlD,EAA4E;AACnG,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,EAAE,EAAE,MADN;AAEE,IAAA,KAAK,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN,KAFT;AAGE,IAAA,IAAI,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN,KAHR;AAIE,IAAA,IAAI,EAAE,EAJR;AAKE,IAAA,KAAK,EAAE,SALT;AAME,IAAA,aAAa,EAAE,MANjB;AAOE,IAAA,WAAW,EAAA,WAPb;AAQE,IAAA,GAAG,EAAA;AARL,GADsB,EAWtB,YAAY,IAAI,iCAAiC,CAA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AI,CAA9C,EAAiD,GAAG,EAApD,EAAwD;AACtD,QAAM,EAAE,GAAG,GAAG,CAAC,UAAJ,CAAe,GAAf,CAAX;AACA,QAAM,KAAK,GAAG,GAAG,GAAG,CAApB;AACA,IAAA,QAAQ,IAAI,CAAC,EAAE,IAAI,KAAP,KAAiB,EAAE,IAAK,IAAI,KAA5B,CAAZ,CAHsD,CAGL;AAClD;;AAED,SAAO,QAAP;AACD,CATD","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport { getInitials } from '../../utils/index';\nimport {\n Person16Regular,\n Person20Regular,\n Person24Regular,\n Person28Regular,\n Person32Regular,\n Person48Regular,\n} from '@fluentui/react-icons';\nimport { PresenceBadge } from '@fluentui/react-badge';\nimport type { AvatarProps, AvatarState, AvatarNamedColor, AvatarShorthandPropsCompat } from './Avatar.types';\n\n/**\n * Names of the shorthand properties in AvatarProps\n */\nexport const avatarShorthandPropsCompat: AvatarShorthandPropsCompat[] = ['label', 'image', 'badge', 'icon'];\n\nconst mergeProps = makeMergeProps<AvatarState>({ deepMerge: avatarShorthandPropsCompat });\n\nexport const useAvatar = (props: AvatarProps, ref: React.Ref<HTMLElement>, defaultProps?: AvatarProps): AvatarState => {\n const state = mergeProps(\n {\n as: 'span',\n label: { as: 'span' },\n icon: { as: 'span' },\n size: 32,\n color: 'neutral',\n activeDisplay: 'ring',\n getInitials,\n ref,\n },\n defaultProps && resolveAvatarShorthandPropsCompat(defaultProps),\n resolveAvatarShorthandPropsCompat(props),\n );\n\n const { size, badge, label, icon } = state;\n\n // If a label was not provided, use the initials and fall back to the icon if initials aren't available\n if (!label.children) {\n const initials = state.getInitials(state.name || '', /*isRtl: */ false);\n if (initials) {\n label.children = initials;\n } else {\n state.showIcon = true;\n if (!icon.children) {\n if (size <= 24) {\n icon.children = <Person16Regular />;\n } else if (size <= 40) {\n icon.children = <Person20Regular />;\n } else if (size <= 48) {\n icon.children = <Person24Regular />;\n } else if (size <= 56) {\n icon.children = <Person28Regular />;\n } else if (size <= 72) {\n icon.children = <Person32Regular />;\n } else {\n icon.children = <Person48Regular />;\n }\n }\n }\n }\n\n // Provide a default badge size based on the avatar size\n if (badge && badge.size === undefined) {\n if (size >= 96) {\n badge.size = 'larger';\n } else if (size >= 64) {\n badge.size = 'large';\n } else if (size >= 56) {\n badge.size = 'medium';\n } else if (size >= 40) {\n badge.size = 'small';\n } else if (size >= 28) {\n badge.size = 'smaller';\n } else {\n badge.size = 'smallest';\n }\n }\n\n if (state.color === 'colorful') {\n const value = state.idForColor || state.name;\n if (value) {\n state.color = avatarColors[getHashCode(value) % avatarColors.length];\n }\n }\n\n return state;\n};\n\n/**\n * Avatar treats shorthand for the image and badge props differently. Rather than the string being\n * the child of those slots, they translate to the image's src and the badge's status prop.\n */\nconst resolveAvatarShorthandPropsCompat = (props: AvatarProps) => {\n let { image, badge } = props;\n\n if (typeof image === 'string') {\n image = { as: 'img', src: image, children: null };\n }\n\n if (typeof badge === 'string') {\n badge = { as: PresenceBadge, status: badge };\n }\n\n if (image !== props.image || badge !== props.badge) {\n props = { ...props, image, badge };\n }\n\n return resolveShorthandProps(props, avatarShorthandPropsCompat);\n};\n\nconst avatarColors: 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\nconst getHashCode = (str: string): number => {\n let hashCode = 0;\n for (let len: number = str.length - 1; len >= 0; len--) {\n const ch = str.charCodeAt(len);\n const shift = len % 8;\n hashCode ^= (ch << shift) + (ch >> (8 - shift)); // eslint-disable-line no-bitwise\n }\n\n return hashCode;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