@momentum-design/components 0.28.4 → 0.28.5

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.
@@ -282,7 +282,7 @@ class Input extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
282
282
  return html `
283
283
  <mdc-button
284
284
  part='trailing-button'
285
- class='${!this.value ? 'hidden' : ''}'
285
+ class='own-focus-ring ${!this.value ? 'hidden' : ''}'
286
286
  prefix-icon='${DEFAULTS.CLEAR_BUTTON_ICON}'
287
287
  variant='${DEFAULTS.CLEAR_BUTTON_VARIANT}'
288
288
  size="${DEFAULTS.CLEAR_BUTTON_SIZE}"
@@ -82,7 +82,7 @@ const styles = [css `
82
82
 
83
83
  .prefix-text{
84
84
  color: var(--mdc-input-support-text-color);
85
- white-space: nowrap; // restirct prefix text to be in one line
85
+ white-space: nowrap; // restrict prefix text to be in one line
86
86
  }
87
87
 
88
88
  :host(:not([disabled])) .input-container:hover{
@@ -91,7 +91,7 @@ const styles = [css `
91
91
 
92
92
  :host(:not([disabled])) .input-container:active, :host(:not([disabled])) .input-container:focus-within{
93
93
  background-color: var(--mdc-input-focused-background-color);
94
- border-color: var(--mdc-input-focused-border-color);
94
+ border-color: var(--mdc-input-focused-border-color);
95
95
  }
96
96
 
97
97
  .input::placeholder{
@@ -115,5 +115,5 @@ const styles = [css `
115
115
  opacity: 0;
116
116
  pointer-events: none;
117
117
  }
118
- `, ...hostFocusRingStyles(true)];
118
+ `, ...hostFocusRingStyles(true)];
119
119
  export default styles;
@@ -132,7 +132,11 @@ class Link extends DisabledMixin(IconNameMixin(Component)) {
132
132
  }
133
133
  }
134
134
  render() {
135
- return html `<slot @slotchange=${this.updateTrailingIcon}></slot>`;
135
+ return html `
136
+ <div part='link-container' class='mdc-focus-ring'>
137
+ <slot @slotchange=${this.updateTrailingIcon}></slot>
138
+ </div>
139
+ `;
136
140
  }
137
141
  }
138
142
  Link.styles = [...Component.styles, ...styles];
@@ -15,7 +15,9 @@ const styles = [hostFitContentStyles, css `
15
15
  --mdc-link-inverted-color-hover: var(--mds-color-theme-inverted-text-accent-hover);
16
16
  --mdc-link-inverted-color-normal: var(--mds-color-theme-inverted-text-accent-normal);
17
17
  --mdc-link-text-decoration-disabled: underline;
18
+ }
18
19
 
20
+ :host::part(link-container){
19
21
  border-radius: var(--mdc-link-border-radius);
20
22
  color: var(--mdc-link-color-normal);
21
23
  }
@@ -31,11 +33,11 @@ const styles = [hostFitContentStyles, css `
31
33
  text-underline-position: from-font;
32
34
  }
33
35
 
34
- :host(:hover) {
36
+ :host(:hover)::part(link-container) {
35
37
  color: var(--mdc-link-color-hover);
36
38
  }
37
39
 
38
- :host(:active) {
40
+ :host(:active)::part(link-container) {
39
41
  color: var(--mdc-link-color-active);
40
42
  }
41
43
 
@@ -43,19 +45,19 @@ const styles = [hostFitContentStyles, css `
43
45
  display: inline-flex;
44
46
  }
45
47
 
46
- :host([inverted]) {
48
+ :host([inverted])::part(link-container) {
47
49
  color: var(--mdc-link-inverted-color-normal);
48
50
  }
49
51
 
50
- :host([inverted]:hover) {
52
+ :host([inverted]:hover)::part(link-container) {
51
53
  color: var(--mdc-link-inverted-color-hover);
52
54
  }
53
55
 
54
- :host([inverted]:active) {
56
+ :host([inverted]:active)::part(link-container) {
55
57
  color: var(--mdc-link-inverted-color-active);
56
58
  }
57
59
 
58
- :host([size="large"]) {
60
+ :host([size="large"])::part(link-container) {
59
61
  font-size: var(--mds-font-apps-body-large-regular-font-size);
60
62
  font-weight: var(--mds-font-apps-body-large-regular-font-weight);
61
63
  line-height: var(--mds-font-apps-body-large-regular-line-height);
@@ -63,7 +65,7 @@ const styles = [hostFitContentStyles, css `
63
65
  text-transform: var(--mds-font-apps-body-large-regular-text-case);
64
66
  }
65
67
 
66
- :host([size="midsize"]) {
68
+ :host([size="midsize"])::part(link-container) {
67
69
  font-size: var(--mds-font-apps-body-midsize-regular-font-size);
68
70
  font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
69
71
  line-height: var(--mds-font-apps-body-midsize-regular-line-height);
@@ -71,7 +73,7 @@ const styles = [hostFitContentStyles, css `
71
73
  text-transform: var(--mds-font-apps-body-midsize-regular-text-case);
72
74
  }
73
75
 
74
- :host([size="small"]) {
76
+ :host([size="small"])::part(link-container) {
75
77
  font-size: var(--mds-font-apps-body-small-regular-font-size);
76
78
  font-weight: var(--mds-font-apps-body-small-regular-font-weight);
77
79
  line-height: var(--mds-font-apps-body-small-regular-line-height);
@@ -79,7 +81,9 @@ const styles = [hostFitContentStyles, css `
79
81
  text-transform: var(--mds-font-apps-body-small-regular-text-case);
80
82
  }
81
83
 
82
- :host([size="large"]:hover), :host([size="large"]:active), :host([size="large"][inline]) {
84
+ :host([size="large"]:hover)::part(link-container),
85
+ :host([size="large"]:active)::part(link-container),
86
+ :host([size="large"][inline])::part(link-container) {
83
87
  font-size: var(--mds-font-apps-body-large-regular-underline-font-size);
84
88
  font-weight: var(--mds-font-apps-body-large-regular-underline-font-weight);
85
89
  line-height: var(--mds-font-apps-body-large-regular-underline-line-height);
@@ -87,7 +91,9 @@ const styles = [hostFitContentStyles, css `
87
91
  text-transform: var(--mds-font-apps-body-large-regular-underline-text-case);
88
92
  }
89
93
 
90
- :host([size="midsize"]:hover), :host([size="midsize"]:active), :host([size="midsize"][inline]) {
94
+ :host([size="midsize"]:hover)::part(link-container),
95
+ :host([size="midsize"]:active)::part(link-container),
96
+ :host([size="midsize"][inline])::part(link-container) {
91
97
  font-size: var(--mds-font-apps-body-midsize-regular-underline-font-size);
92
98
  font-weight: var(--mds-font-apps-body-midsize-regular-underline-font-weight);
93
99
  line-height: var(--mds-font-apps-body-midsize-regular-underline-line-height);
@@ -95,7 +101,9 @@ const styles = [hostFitContentStyles, css `
95
101
  text-transform: var(--mds-font-apps-body-midsize-regular-underline-text-case);
96
102
  }
97
103
 
98
- :host([size="small"]:hover), :host([size="small"]:active), :host([size="small"][inline]) {
104
+ :host([size="small"]:hover)::part(link-container),
105
+ :host([size="small"]:active)::part(link-container),
106
+ :host([size="small"][inline])::part(link-container) {
99
107
  font-size: var(--mds-font-apps-body-small-regular-underline-font-size);
100
108
  font-weight: var(--mds-font-apps-body-small-regular-underline-font-weight);
101
109
  line-height: var(--mds-font-apps-body-small-regular-underline-line-height);
@@ -103,17 +111,17 @@ const styles = [hostFitContentStyles, css `
103
111
  text-transform: var(--mds-font-apps-body-small-regular-underline-text-case);
104
112
  }
105
113
 
106
- :host([disabled]) {
114
+ :host([disabled])::part(link-container) {
107
115
  color: var(--mdc-link-color-disabled);
108
116
  pointer-events: none;
109
117
  }
110
118
 
111
- :host([inverted][disabled]) {
119
+ :host([inverted][disabled])::part(link-container) {
112
120
  color: var(--mdc-link-inverted-color-disabled);
113
121
  }
114
- `, ...hostFocusRingStyles(),
122
+ `, ...hostFocusRingStyles(true),
115
123
  css `
116
- :host(:active) {
124
+ :host(:active)::part(link-container) {
117
125
  box-shadow: none;
118
126
  }
119
127
  `];