@momentum-design/components 0.120.30 → 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.
@@ -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
- <div part="content" aria-hidden="true">
296
- ${this.getPhotoPlaceHolderContent(type)} ${this.getTemplateBasedOnType(type)} ${this.getLoadingContent()}
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'])::part(content) {
13
+ :host([size='124']) {
14
14
  width: 7.75rem;
15
15
  height: 7.75rem;
16
16
  }
17
- :host([size='88'])::part(content) {
17
+ :host([size='88']) {
18
18
  width: 5.5rem;
19
19
  height: 5.5rem;
20
20
  }
21
- :host([size='72'])::part(content) {
21
+ :host([size='72']) {
22
22
  width: 4.5rem;
23
23
  height: 4.5rem;
24
24
  }
25
- :host([size='64'])::part(content) {
25
+ :host([size='64']) {
26
26
  width: 4rem;
27
27
  height: 4rem;
28
28
  }
29
- :host([size='48'])::part(content) {
29
+ :host([size='48']) {
30
30
  width: 3rem;
31
31
  height: 3rem;
32
32
  }
33
- :host([size='32'])::part(content) {
33
+ :host([size='32']) {
34
34
  width: 2rem;
35
35
  height: 2rem;
36
36
  }
37
- :host([size='24'])::part(content) {
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::part(content) {
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::part(content) {
156
+ :host {
157
157
  outline: 0.125rem solid;
158
158
  }
159
159
  }