@momentum-design/components 0.12.2 → 0.12.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,120 @@
1
1
  import { css } from 'lit';
2
- const styles = css `
2
+ import { hostFitContentStyles } from '../../utils/styles';
3
+ const styles = [hostFitContentStyles, css `
3
4
  :host {
4
- display: flex;
5
- justify-content: center;
6
- align-items: center;
5
+ --mdc-avatar-default-background-color: var(--mds-color-theme-avatar-default);
6
+ --mdc-avatar-default-foreground-color: var(--mds-color-theme-common-text-primary-normal);
7
+ --mdc-avatar-loading-indicator-background-color: var(--mds-color-theme-common-text-primary-disabled);
8
+ --mdc-avatar-loading-indicator-foreground-color: var(--mdc-avatar-default-foreground-color);
9
+ --mdc-avatar-loading-overlay-background-color: var(--mds-color-theme-common-overlays-secondary-normal);
10
+ }
11
+ :host([size="xx_large"]) .content {
12
+ width: 7.75rem;
13
+ height: 7.75rem;
14
+ }
15
+ :host([size="x_large"]) .content {
16
+ width: 5.5rem;
17
+ height: 5.5rem;
18
+ }
19
+ :host([size="large"]) .content {
20
+ width: 4.5rem;
21
+ height: 4.5rem;
22
+ }
23
+ :host([size="midsize"]) .content {
24
+ width: 4rem;
25
+ height: 4rem;
26
+ }
27
+ :host([size="small"]) .content {
28
+ width: 3rem;
29
+ height: 3rem;
30
+ }
31
+ :host([size="x_small"]) .content {
32
+ width: 2rem;
33
+ height: 2rem;
34
+ }
35
+ :host([size="xx_small"]) .content {
36
+ width: 1.5rem;
37
+ height: 1.5rem;
38
+ }
39
+ :host([size="xx_large"]) .content > .loading__wrapper > .loader {
40
+ transform: scale(1.5);
41
+ }
42
+ :host([size="x_large"]) .content > .loading__wrapper > .loader {
43
+ transform: scale(1.2);
44
+ }
45
+ :host([size="large"]) .content > .loading__wrapper > .loader,
46
+ :host([size="midsize"]) .content > .loading__wrapper > .loader {
47
+ transform: scale(0.8);
48
+ }
49
+ :host([size="small"]) .content > .loading__wrapper > .loader {
50
+ transform: scale(0.6);
51
+ }
52
+ :host([size="x_small"]) .content > .loading__wrapper > .loader {
53
+ transform: scale(0.4);
54
+ }
55
+ :host([size="xx_small"]) .content > .loading__wrapper > .loader {
56
+ transform: scale(0.3);
57
+ }
58
+ .content {
59
+ width: 2rem;
60
+ height: 2rem;
61
+ background-color: var(--mdc-avatar-default-background-color);
62
+ color: var(--mdc-avatar-default-foreground-color);
7
63
  border-radius: 100vh;
8
64
  position: relative;
9
- width: fit-content;
65
+ display: grid;
66
+ place-items: center;
10
67
  }
11
- img {
68
+ .photo {
12
69
  border-radius: 100vh;
13
- height: inherit;
14
- width: inherit;
70
+ height: 100%;
71
+ width: 100%;
15
72
  object-fit: cover;
73
+ overflow: hidden;
74
+ }
75
+ .presence {
76
+ position: absolute;
77
+ bottom: 0;
78
+ right: 0;
79
+ }
80
+ .loading__wrapper {
81
+ position: absolute;
82
+ border-radius: 100vh;
83
+ width: 100%;
84
+ height: 100%;
85
+ background-color: var(--mdc-avatar-loading-overlay-background-color);
86
+ display: grid;
87
+ place-items: center;
88
+ }
89
+ .loader {
90
+ position: absolute;
91
+ width: 1rem;
92
+ transform: scale(0.4);
93
+ aspect-ratio: 1;
94
+ border-radius: 100vh;
95
+ animation: loading-key 1s infinite linear alternate;
96
+ }
97
+ @keyframes loading-key {
98
+ 0% {
99
+ box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color),
100
+ -1.25rem 0 var(--mdc-avatar-loading-indicator-background-color);
101
+ background: var(--mdc-avatar-loading-indicator-foreground-color);
102
+ }
103
+ 33% {
104
+ box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color),
105
+ -1.25rem 0 var(--mdc-avatar-loading-indicator-background-color);
106
+ background: var(--mdc-avatar-loading-indicator-background-color);
107
+ }
108
+ 66% {
109
+ box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-background-color),
110
+ -1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color);
111
+ background: var(--mdc-avatar-loading-indicator-background-color);
112
+ }
113
+ 100%{
114
+ box-shadow: 1.25rem 0 var(--mdc-avatar-loading-indicator-background-color),
115
+ -1.25rem 0 var(--mdc-avatar-loading-indicator-foreground-color);
116
+ background: var(--mdc-avatar-loading-indicator-foreground-color);
117
+ }
16
118
  }
17
- `;
18
- export default [styles];
119
+ `];
120
+ export default styles;
@@ -1 +1,5 @@
1
- export type AvatarType = 'photo' | 'text' | 'icon' | 'multiuser';
1
+ import { AVATAR_TYPE } from './avatar.constants';
2
+ import { SIZE as AVATAR_SIZE } from '../presence/presence.constants';
3
+ import type { ValueOf } from '../../utils/types';
4
+ export type AvatarType = ValueOf<typeof AVATAR_TYPE>;
5
+ export type AvatarSize = ValueOf<typeof AVATAR_SIZE>;
@@ -0,0 +1,5 @@
1
+ import type { TextType } from '../text/text.types';
2
+ import type { AvatarSize } from './avatar.types';
3
+ declare const getAvatarIconSize: (size: AvatarSize) => number;
4
+ declare const getAvatarTextFontSize: (size: AvatarSize) => TextType;
5
+ export { getAvatarIconSize, getAvatarTextFontSize, };
@@ -0,0 +1,27 @@
1
+ import { SIZE as AVATAR_SIZE } from '../presence/presence.constants';
2
+ import { TYPE as FONT_TYPE } from '../text/text.constants';
3
+ const getAvatarIconSize = (size) => {
4
+ const avatarIconSizeMap = {
5
+ [AVATAR_SIZE.XX_LARGE]: 4.75,
6
+ [AVATAR_SIZE.X_LARGE]: 3,
7
+ [AVATAR_SIZE.LARGE]: 2.5,
8
+ [AVATAR_SIZE.MIDSIZE]: 2.25,
9
+ [AVATAR_SIZE.SMALL]: 1.75,
10
+ [AVATAR_SIZE.X_SMALL]: 1.25,
11
+ [AVATAR_SIZE.XX_SMALL]: 1,
12
+ };
13
+ return avatarIconSizeMap[size] || 1.25; // default size of icon
14
+ };
15
+ const getAvatarTextFontSize = (size) => {
16
+ const avatarTextFontSizeMap = {
17
+ [AVATAR_SIZE.XX_LARGE]: FONT_TYPE.HEADING_XLARGE_MEDIUM,
18
+ [AVATAR_SIZE.X_LARGE]: FONT_TYPE.HEADING_LARGE_MEDIUM,
19
+ [AVATAR_SIZE.LARGE]: FONT_TYPE.HEADING_MIDSIZE_MEDIUM,
20
+ [AVATAR_SIZE.MIDSIZE]: FONT_TYPE.HEADING_SMALL_MEDIUM,
21
+ [AVATAR_SIZE.SMALL]: FONT_TYPE.HEADING_SMALL_MEDIUM,
22
+ [AVATAR_SIZE.XX_SMALL]: FONT_TYPE.BODY_SMALL_MEDIUM,
23
+ [AVATAR_SIZE.X_SMALL]: FONT_TYPE.BODY_MIDSIZE_MEDIUM,
24
+ };
25
+ return avatarTextFontSizeMap[size] || FONT_TYPE.BODY_MIDSIZE_MEDIUM; // default size of text font
26
+ };
27
+ export { getAvatarIconSize, getAvatarTextFontSize, };
@@ -1,4 +1,7 @@
1
1
  import Avatar from './avatar.component';
2
+ import '../icon';
3
+ import '../presence';
4
+ import '../text';
2
5
  declare global {
3
6
  interface HTMLElementTagNameMap {
4
7
  ['mdc-avatar']: Avatar;
@@ -1,4 +1,7 @@
1
1
  import Avatar from './avatar.component';
2
2
  import { TAG_NAME } from './avatar.constants';
3
+ import '../icon';
4
+ import '../presence';
5
+ import '../text';
3
6
  Avatar.register(TAG_NAME);
4
7
  export default Avatar;
@@ -8,89 +8,156 @@
8
8
  "declarations": [
9
9
  {
10
10
  "kind": "class",
11
- "description": "",
11
+ "description": "The `mdc-avatar` component is used to represent a person or a space.\nAn avatar can be an icon, initials, counter and photo.\n\nTo set the photo of an avatar,\nyou need to set \"src\" attribute.\n\nWhile the avatar image is loading, as a placeholder,\nwe will show the initials text.\nIf the initials are not specified then,\nwe will show `user-regular` icon as a placeholder.\n\nBy default, if there are no attributes specified,\nthen the default avatar will be an icon with `user-regular` name.\n\nThe avatar component is non clickable and non interactive/focusable component.\nIf the avatar is typing, then the loading indicator will be displayed.",
12
12
  "name": "Avatar",
13
- "slots": [
13
+ "cssProperties": [
14
14
  {
15
- "description": "This is a default/unnamed slot",
16
- "name": ""
15
+ "description": "Allows customization of the default background color.",
16
+ "name": "--mdc-avatar-default-background-color"
17
+ },
18
+ {
19
+ "description": "Allows customization of the default foreground color.",
20
+ "name": "--mdc-avatar-default-foreground-color"
21
+ },
22
+ {
23
+ "description": "Allows customization of the loading indicator background color.",
24
+ "name": "--mdc-avatar-loading-indicator-background-color"
25
+ },
26
+ {
27
+ "description": "Allows customization of the loading indicator foreground color.",
28
+ "name": "--mdc-avatar-loading-indicator-foreground-color"
29
+ },
30
+ {
31
+ "description": "Allows customization of the loading overlay background color.",
32
+ "name": "--mdc-avatar-loading-overlay-background-color"
17
33
  }
18
34
  ],
19
35
  "members": [
20
36
  {
21
37
  "kind": "field",
22
- "name": "type",
38
+ "name": "src",
23
39
  "type": {
24
- "text": "AvatarType | undefined"
40
+ "text": "string | undefined"
25
41
  },
26
- "attribute": "type",
27
- "reflects": true
42
+ "description": "The src is the url which will be used to display the avatar.\nWhen the src is loading, we will display the initials as a placeholder.",
43
+ "attribute": "src"
28
44
  },
29
45
  {
30
46
  "kind": "field",
31
- "name": "alt",
47
+ "name": "initials",
32
48
  "type": {
33
49
  "text": "string | undefined"
34
50
  },
35
- "attribute": "alt"
51
+ "description": "The initials to be displayed for the avatar.",
52
+ "attribute": "initials"
36
53
  },
37
54
  {
38
55
  "kind": "field",
39
- "name": "src",
56
+ "name": "presence",
40
57
  "type": {
41
- "text": "string | undefined"
58
+ "text": "PresenceType | undefined"
42
59
  },
43
- "attribute": "src"
60
+ "description": "The presence is the status which can be used to display the\nactivity state of a user or a space within an avatar component.\n\nAcceptable values include:\n- `active`\n- `away`\n- `away-calling`\n- `busy`\n- `dnd`\n- `meeting`\n- `on-call`\n- `on-device`\n- `on-mobile`\n- `pause`\n- `pto`\n- `presenting`\n- `quiet`\n- `scheduled`",
61
+ "attribute": "presence"
44
62
  },
45
63
  {
46
64
  "kind": "field",
47
65
  "name": "size",
48
66
  "type": {
49
- "text": "number | undefined"
67
+ "text": "AvatarSize"
50
68
  },
51
- "description": "Scale of the avatar",
52
- "attribute": "size"
69
+ "description": "Acceptable values include:\n- xx_small\n- x_small\n- small\n- midsize\n- large\n- x_large\n- xx_large",
70
+ "default": "x_small",
71
+ "attribute": "size",
72
+ "reflects": true
53
73
  },
54
74
  {
55
- "kind": "method",
56
- "name": "updateSize",
57
- "privacy": "private",
58
- "description": "Updates the size by setting the width and height"
75
+ "kind": "field",
76
+ "name": "iconName",
77
+ "type": {
78
+ "text": "IconNames | undefined"
79
+ },
80
+ "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
81
+ "attribute": "icon-name"
59
82
  },
60
83
  {
61
- "kind": "method",
62
- "name": "photoTemplate"
84
+ "kind": "field",
85
+ "name": "counter",
86
+ "type": {
87
+ "text": "number | undefined"
88
+ },
89
+ "description": "The counter is the number which can be displayed on the avatar.\nThe maximum number is 99 and if the give number is greater than 99,\nthen the avatar will be displayed as `99+`.\nIf the given number is a negative number,\nthen the avatar will be displayed as `0`.",
90
+ "attribute": "counter"
91
+ },
92
+ {
93
+ "kind": "field",
94
+ "name": "isTyping",
95
+ "type": {
96
+ "text": "boolean"
97
+ },
98
+ "default": "false",
99
+ "description": "Represents the typing indicator when the user is typing.",
100
+ "attribute": "is-typing"
63
101
  }
64
102
  ],
65
103
  "attributes": [
66
104
  {
67
- "name": "type",
105
+ "name": "src",
68
106
  "type": {
69
- "text": "AvatarType | undefined"
107
+ "text": "string | undefined"
70
108
  },
71
- "fieldName": "type"
109
+ "description": "The src is the url which will be used to display the avatar.\nWhen the src is loading, we will display the initials as a placeholder.",
110
+ "fieldName": "src"
72
111
  },
73
112
  {
74
- "name": "alt",
113
+ "name": "initials",
75
114
  "type": {
76
115
  "text": "string | undefined"
77
116
  },
78
- "fieldName": "alt"
117
+ "description": "The initials to be displayed for the avatar.",
118
+ "fieldName": "initials"
79
119
  },
80
120
  {
81
- "name": "src",
121
+ "name": "presence",
82
122
  "type": {
83
- "text": "string | undefined"
123
+ "text": "PresenceType | undefined"
84
124
  },
85
- "fieldName": "src"
125
+ "description": "The presence is the status which can be used to display the\nactivity state of a user or a space within an avatar component.\n\nAcceptable values include:\n- `active`\n- `away`\n- `away-calling`\n- `busy`\n- `dnd`\n- `meeting`\n- `on-call`\n- `on-device`\n- `on-mobile`\n- `pause`\n- `pto`\n- `presenting`\n- `quiet`\n- `scheduled`",
126
+ "fieldName": "presence"
86
127
  },
87
128
  {
88
129
  "name": "size",
89
130
  "type": {
90
- "text": "number | undefined"
131
+ "text": "AvatarSize"
91
132
  },
92
- "description": "Scale of the avatar",
133
+ "description": "Acceptable values include:\n- xx_small\n- x_small\n- small\n- midsize\n- large\n- x_large\n- xx_large",
134
+ "default": "x_small",
93
135
  "fieldName": "size"
136
+ },
137
+ {
138
+ "name": "icon-name",
139
+ "type": {
140
+ "text": "IconNames | undefined"
141
+ },
142
+ "description": "Name of the icon to be displayed inside the Avatar.\nMust be a valid icon name.",
143
+ "fieldName": "iconName"
144
+ },
145
+ {
146
+ "name": "counter",
147
+ "type": {
148
+ "text": "number | undefined"
149
+ },
150
+ "description": "The counter is the number which can be displayed on the avatar.\nThe maximum number is 99 and if the give number is greater than 99,\nthen the avatar will be displayed as `99+`.\nIf the given number is a negative number,\nthen the avatar will be displayed as `0`.",
151
+ "fieldName": "counter"
152
+ },
153
+ {
154
+ "name": "is-typing",
155
+ "type": {
156
+ "text": "boolean"
157
+ },
158
+ "default": "false",
159
+ "description": "Represents the typing indicator when the user is typing.",
160
+ "fieldName": "isTyping"
94
161
  }
95
162
  ],
96
163
  "superclass": {
@@ -98,8 +165,7 @@
98
165
  "module": "/src/models"
99
166
  },
100
167
  "tagName": "mdc-avatar",
101
- "summary": "This is MyElement",
102
- "jsDoc": "/**\n * @slot - This is a default/unnamed slot\n *\n * @summary This is MyElement\n *\n * @tagname mdc-avatar\n */",
168
+ "jsDoc": "/**\n * The `mdc-avatar` component is used to represent a person or a space.\n * An avatar can be an icon, initials, counter and photo.\n *\n * To set the photo of an avatar,\n * you need to set \"src\" attribute.\n *\n * While the avatar image is loading, as a placeholder,\n * we will show the initials text.\n * If the initials are not specified then,\n * we will show `user-regular` icon as a placeholder.\n *\n * By default, if there are no attributes specified,\n * then the default avatar will be an icon with `user-regular` name.\n *\n * The avatar component is non clickable and non interactive/focusable component.\n * If the avatar is typing, then the loading indicator will be displayed.\n *\n * @dependency mdc-icon\n * @dependency mdc-presence\n * @dependency mdc-text\n *\n * @tagname mdc-avatar\n *\n * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.\n * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.\n * @cssproperty --mdc-avatar-loading-indicator-background-color -\n * Allows customization of the loading indicator background color.\n * @cssproperty --mdc-avatar-loading-indicator-foreground-color -\n * Allows customization of the loading indicator foreground color.\n * @cssproperty --mdc-avatar-loading-overlay-background-color -\n * Allows customization of the loading overlay background color.\n */",
103
169
  "customElement": true
104
170
  }
105
171
  ],
@@ -114,6 +180,77 @@
114
180
  }
115
181
  ]
116
182
  },
183
+ {
184
+ "kind": "javascript-module",
185
+ "path": "components/bullet/bullet.component.js",
186
+ "declarations": [
187
+ {
188
+ "kind": "class",
189
+ "description": "Bullet component, which is a visual marker\nand be used to organize and present items in a list format.",
190
+ "name": "Bullet",
191
+ "cssProperties": [
192
+ {
193
+ "description": "background color of the bullet",
194
+ "name": "--mdc-bullet-background-color"
195
+ },
196
+ {
197
+ "description": "small size value of the bullet",
198
+ "name": "--mdc-bullet-size-small"
199
+ },
200
+ {
201
+ "description": "medium size value of the bullet",
202
+ "name": "--mdc-bullet-size-medium"
203
+ },
204
+ {
205
+ "description": "large size value of the bullet",
206
+ "name": "--mdc-bullet-size-large"
207
+ }
208
+ ],
209
+ "members": [
210
+ {
211
+ "kind": "field",
212
+ "name": "size",
213
+ "type": {
214
+ "text": "Size"
215
+ },
216
+ "privacy": "public",
217
+ "description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
218
+ "default": "small",
219
+ "attribute": "size",
220
+ "reflects": true
221
+ }
222
+ ],
223
+ "attributes": [
224
+ {
225
+ "name": "size",
226
+ "type": {
227
+ "text": "Size"
228
+ },
229
+ "description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
230
+ "default": "small",
231
+ "fieldName": "size"
232
+ }
233
+ ],
234
+ "superclass": {
235
+ "name": "Component",
236
+ "module": "/src/models"
237
+ },
238
+ "tagName": "mdc-bullet",
239
+ "jsDoc": "/**\n * Bullet component, which is a visual marker\n * and be used to organize and present items in a list format.\n *\n * @tagname mdc-bullet\n *\n * @cssproperty --mdc-bullet-background-color - background color of the bullet\n * @cssproperty --mdc-bullet-size-small - small size value of the bullet\n * @cssproperty --mdc-bullet-size-medium - medium size value of the bullet\n * @cssproperty --mdc-bullet-size-large - large size value of the bullet\n*/",
240
+ "customElement": true
241
+ }
242
+ ],
243
+ "exports": [
244
+ {
245
+ "kind": "js",
246
+ "name": "default",
247
+ "declaration": {
248
+ "name": "Bullet",
249
+ "module": "components/bullet/bullet.component.js"
250
+ }
251
+ }
252
+ ]
253
+ },
117
254
  {
118
255
  "kind": "javascript-module",
119
256
  "path": "components/badge/badge.component.js",
@@ -375,77 +512,6 @@
375
512
  }
376
513
  ]
377
514
  },
378
- {
379
- "kind": "javascript-module",
380
- "path": "components/bullet/bullet.component.js",
381
- "declarations": [
382
- {
383
- "kind": "class",
384
- "description": "Bullet component, which is a visual marker\nand be used to organize and present items in a list format.",
385
- "name": "Bullet",
386
- "cssProperties": [
387
- {
388
- "description": "background color of the bullet",
389
- "name": "--mdc-bullet-background-color"
390
- },
391
- {
392
- "description": "small size value of the bullet",
393
- "name": "--mdc-bullet-size-small"
394
- },
395
- {
396
- "description": "medium size value of the bullet",
397
- "name": "--mdc-bullet-size-medium"
398
- },
399
- {
400
- "description": "large size value of the bullet",
401
- "name": "--mdc-bullet-size-large"
402
- }
403
- ],
404
- "members": [
405
- {
406
- "kind": "field",
407
- "name": "size",
408
- "type": {
409
- "text": "Size"
410
- },
411
- "privacy": "public",
412
- "description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
413
- "default": "small",
414
- "attribute": "size",
415
- "reflects": true
416
- }
417
- ],
418
- "attributes": [
419
- {
420
- "name": "size",
421
- "type": {
422
- "text": "Size"
423
- },
424
- "description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
425
- "default": "small",
426
- "fieldName": "size"
427
- }
428
- ],
429
- "superclass": {
430
- "name": "Component",
431
- "module": "/src/models"
432
- },
433
- "tagName": "mdc-bullet",
434
- "jsDoc": "/**\n * Bullet component, which is a visual marker\n * and be used to organize and present items in a list format.\n *\n * @tagname mdc-bullet\n *\n * @cssproperty --mdc-bullet-background-color - background color of the bullet\n * @cssproperty --mdc-bullet-size-small - small size value of the bullet\n * @cssproperty --mdc-bullet-size-medium - medium size value of the bullet\n * @cssproperty --mdc-bullet-size-large - large size value of the bullet\n*/",
435
- "customElement": true
436
- }
437
- ],
438
- "exports": [
439
- {
440
- "kind": "js",
441
- "name": "default",
442
- "declaration": {
443
- "name": "Bullet",
444
- "module": "components/bullet/bullet.component.js"
445
- }
446
- }
447
- ]
448
- },
449
515
  {
450
516
  "kind": "javascript-module",
451
517
  "path": "components/button/button.component.js",
@@ -1,10 +1,36 @@
1
1
  import Component from '../../components/avatar';
2
2
  /**
3
- * @slot - This is a default/unnamed slot
3
+ * The `mdc-avatar` component is used to represent a person or a space.
4
+ * An avatar can be an icon, initials, counter and photo.
4
5
  *
5
- * @summary This is MyElement
6
+ * To set the photo of an avatar,
7
+ * you need to set "src" attribute.
8
+ *
9
+ * While the avatar image is loading, as a placeholder,
10
+ * we will show the initials text.
11
+ * If the initials are not specified then,
12
+ * we will show `user-regular` icon as a placeholder.
13
+ *
14
+ * By default, if there are no attributes specified,
15
+ * then the default avatar will be an icon with `user-regular` name.
16
+ *
17
+ * The avatar component is non clickable and non interactive/focusable component.
18
+ * If the avatar is typing, then the loading indicator will be displayed.
19
+ *
20
+ * @dependency mdc-icon
21
+ * @dependency mdc-presence
22
+ * @dependency mdc-text
6
23
  *
7
24
  * @tagname mdc-avatar
25
+ *
26
+ * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.
27
+ * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.
28
+ * @cssproperty --mdc-avatar-loading-indicator-background-color -
29
+ * Allows customization of the loading indicator background color.
30
+ * @cssproperty --mdc-avatar-loading-indicator-foreground-color -
31
+ * Allows customization of the loading indicator foreground color.
32
+ * @cssproperty --mdc-avatar-loading-overlay-background-color -
33
+ * Allows customization of the loading overlay background color.
8
34
  */
9
35
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
10
36
  export default reactWrapper;
@@ -3,11 +3,37 @@ import { createComponent } from '@lit/react';
3
3
  import Component from '../../components/avatar';
4
4
  import { TAG_NAME } from '../../components/avatar/avatar.constants';
5
5
  /**
6
- * @slot - This is a default/unnamed slot
6
+ * The `mdc-avatar` component is used to represent a person or a space.
7
+ * An avatar can be an icon, initials, counter and photo.
7
8
  *
8
- * @summary This is MyElement
9
+ * To set the photo of an avatar,
10
+ * you need to set "src" attribute.
11
+ *
12
+ * While the avatar image is loading, as a placeholder,
13
+ * we will show the initials text.
14
+ * If the initials are not specified then,
15
+ * we will show `user-regular` icon as a placeholder.
16
+ *
17
+ * By default, if there are no attributes specified,
18
+ * then the default avatar will be an icon with `user-regular` name.
19
+ *
20
+ * The avatar component is non clickable and non interactive/focusable component.
21
+ * If the avatar is typing, then the loading indicator will be displayed.
22
+ *
23
+ * @dependency mdc-icon
24
+ * @dependency mdc-presence
25
+ * @dependency mdc-text
9
26
  *
10
27
  * @tagname mdc-avatar
28
+ *
29
+ * @cssproperty --mdc-avatar-default-background-color - Allows customization of the default background color.
30
+ * @cssproperty --mdc-avatar-default-foreground-color - Allows customization of the default foreground color.
31
+ * @cssproperty --mdc-avatar-loading-indicator-background-color -
32
+ * Allows customization of the loading indicator background color.
33
+ * @cssproperty --mdc-avatar-loading-indicator-foreground-color -
34
+ * Allows customization of the loading indicator foreground color.
35
+ * @cssproperty --mdc-avatar-loading-overlay-background-color -
36
+ * Allows customization of the loading overlay background color.
11
37
  */
12
38
  const reactWrapper = createComponent({
13
39
  tagName: TAG_NAME,
@@ -1,6 +1,6 @@
1
1
  export { default as Avatar } from './avatar';
2
- export { default as Badge } from './badge';
3
2
  export { default as Bullet } from './bullet';
3
+ export { default as Badge } from './badge';
4
4
  export { default as Button } from './button';
5
5
  export { default as Icon } from './icon';
6
6
  export { default as IconProvider } from './iconprovider';
@@ -1,6 +1,6 @@
1
1
  export { default as Avatar } from './avatar';
2
- export { default as Badge } from './badge';
3
2
  export { default as Bullet } from './bullet';
3
+ export { default as Badge } from './badge';
4
4
  export { default as Button } from './button';
5
5
  export { default as Icon } from './icon';
6
6
  export { default as IconProvider } from './iconprovider';
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "@momentum-design/tokens": "*",
36
36
  "lit": "^3.2.0"
37
37
  },
38
- "version": "0.12.2"
38
+ "version": "0.12.4"
39
39
  }