@momentum-design/components 0.120.29 → 0.120.31
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.
- package/dist/browser/index.js +12 -14
- package/dist/browser/index.js.map +2 -2
- package/dist/components/avatar/avatar.component.d.ts +1 -1
- package/dist/components/avatar/avatar.component.js +6 -5
- package/dist/components/avatar/avatar.styles.js +9 -9
- package/dist/custom-elements.json +370 -374
- package/dist/react/avatar/index.d.ts +0 -1
- package/dist/react/avatar/index.js +0 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/package.json +1 -1
|
@@ -37,7 +37,6 @@ declare const Avatar_base: import("../../utils/mixins/index.types").Constructor<
|
|
|
37
37
|
* @cssproperty --mdc-avatar-loading-overlay-background-color -
|
|
38
38
|
* Allows customization of the loading overlay background color.
|
|
39
39
|
*
|
|
40
|
-
* @csspart content - The main content of the avatar.
|
|
41
40
|
* @csspart photo - The photo of the avatar.
|
|
42
41
|
* @csspart presence - The presence indicator of the avatar.
|
|
43
42
|
* @csspart loading-wrapper - The wrapper for the loading indicator.
|
|
@@ -48,6 +47,7 @@ declare class Avatar extends Avatar_base {
|
|
|
48
47
|
* @internal
|
|
49
48
|
*/
|
|
50
49
|
private isPhotoLoaded;
|
|
50
|
+
connectedCallback(): void;
|
|
51
51
|
/**
|
|
52
52
|
* @internal
|
|
53
53
|
* The avatar presence will be hidden if the avatar type is COUNTER.
|
|
@@ -51,7 +51,6 @@ import { getAvatarIconSize, getAvatarTextFontSize, getPresenceSize } from './ava
|
|
|
51
51
|
* @cssproperty --mdc-avatar-loading-overlay-background-color -
|
|
52
52
|
* Allows customization of the loading overlay background color.
|
|
53
53
|
*
|
|
54
|
-
* @csspart content - The main content of the avatar.
|
|
55
54
|
* @csspart photo - The photo of the avatar.
|
|
56
55
|
* @csspart presence - The presence indicator of the avatar.
|
|
57
56
|
* @csspart loading-wrapper - The wrapper for the loading indicator.
|
|
@@ -65,6 +64,10 @@ class Avatar extends AvatarComponentMixin(IconNameMixin(Component)) {
|
|
|
65
64
|
*/
|
|
66
65
|
this.isPhotoLoaded = false;
|
|
67
66
|
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
super.connectedCallback();
|
|
69
|
+
this.setAttribute('aria-hidden', 'true');
|
|
70
|
+
}
|
|
68
71
|
/**
|
|
69
72
|
* @internal
|
|
70
73
|
* The avatar presence will be hidden if the avatar type is COUNTER.
|
|
@@ -292,10 +295,8 @@ class Avatar extends AvatarComponentMixin(IconNameMixin(Component)) {
|
|
|
292
295
|
render() {
|
|
293
296
|
const type = this.getTypeBasedOnInputs();
|
|
294
297
|
return html `
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
${this.getPresenceTemplateBasedOnType(type)}
|
|
298
|
-
</div>
|
|
298
|
+
${this.getPhotoPlaceHolderContent(type)} ${this.getTemplateBasedOnType(type)} ${this.getLoadingContent()}
|
|
299
|
+
${this.getPresenceTemplateBasedOnType(type)}
|
|
299
300
|
`;
|
|
300
301
|
}
|
|
301
302
|
}
|
|
@@ -10,31 +10,31 @@ const styles = [
|
|
|
10
10
|
--mdc-avatar-loading-indicator-foreground-color: var(--mdc-avatar-default-foreground-color);
|
|
11
11
|
--mdc-avatar-loading-overlay-background-color: var(--mds-color-theme-common-overlays-secondary-normal);
|
|
12
12
|
}
|
|
13
|
-
:host([size='124'])
|
|
13
|
+
:host([size='124']) {
|
|
14
14
|
width: 7.75rem;
|
|
15
15
|
height: 7.75rem;
|
|
16
16
|
}
|
|
17
|
-
:host([size='88'])
|
|
17
|
+
:host([size='88']) {
|
|
18
18
|
width: 5.5rem;
|
|
19
19
|
height: 5.5rem;
|
|
20
20
|
}
|
|
21
|
-
:host([size='72'])
|
|
21
|
+
:host([size='72']) {
|
|
22
22
|
width: 4.5rem;
|
|
23
23
|
height: 4.5rem;
|
|
24
24
|
}
|
|
25
|
-
:host([size='64'])
|
|
25
|
+
:host([size='64']) {
|
|
26
26
|
width: 4rem;
|
|
27
27
|
height: 4rem;
|
|
28
28
|
}
|
|
29
|
-
:host([size='48'])
|
|
29
|
+
:host([size='48']) {
|
|
30
30
|
width: 3rem;
|
|
31
31
|
height: 3rem;
|
|
32
32
|
}
|
|
33
|
-
:host([size='32'])
|
|
33
|
+
:host([size='32']) {
|
|
34
34
|
width: 2rem;
|
|
35
35
|
height: 2rem;
|
|
36
36
|
}
|
|
37
|
-
:host([size='24'])
|
|
37
|
+
:host([size='24']) {
|
|
38
38
|
width: 1.5rem;
|
|
39
39
|
height: 1.5rem;
|
|
40
40
|
}
|
|
@@ -57,7 +57,7 @@ const styles = [
|
|
|
57
57
|
:host([size='24'])::part(loader) {
|
|
58
58
|
transform: scale(0.3);
|
|
59
59
|
}
|
|
60
|
-
:host
|
|
60
|
+
:host {
|
|
61
61
|
width: 2rem;
|
|
62
62
|
height: 2rem;
|
|
63
63
|
background-color: var(--mdc-avatar-default-background-color);
|
|
@@ -153,7 +153,7 @@ const styles = [
|
|
|
153
153
|
|
|
154
154
|
/* High Contrast Mode */
|
|
155
155
|
@media (forced-colors: active) {
|
|
156
|
-
:host
|
|
156
|
+
:host {
|
|
157
157
|
outline: 0.125rem solid;
|
|
158
158
|
}
|
|
159
159
|
}
|