@momentum-design/components 0.142.2 → 0.142.4
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.
|
@@ -276,6 +276,9 @@ class Select extends ListNavigationMixin(KeyToActionMixin(CaptureDestroyEventFor
|
|
|
276
276
|
break;
|
|
277
277
|
}
|
|
278
278
|
case 'unselected': {
|
|
279
|
+
if (option !== this.selectedOption) {
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
279
282
|
// when unselected, check if there is any other option is a selected option,
|
|
280
283
|
// if there is no selected option, then reset it to placeholder or first option
|
|
281
284
|
if (firstSelectedOption) {
|
|
@@ -2,6 +2,8 @@ import { css } from 'lit';
|
|
|
2
2
|
const styles = css `
|
|
3
3
|
:host {
|
|
4
4
|
--mdc-tooltip-max-width: 400px;
|
|
5
|
+
--mdc-popover-max-width: var(--mdc-tooltip-max-width);
|
|
6
|
+
--mdc-popover-width: max-content;
|
|
5
7
|
--mdc-tooltip-padding: 0.75rem;
|
|
6
8
|
--mdc-tooltip-text-color: var(--mds-color-theme-text-primary-normal);
|
|
7
9
|
--mdc-tooltip-text-color-contrast: var(--mds-color-theme-inverted-text-primary-normal);
|
|
@@ -10,9 +12,8 @@ const styles = css `
|
|
|
10
12
|
:host::part(popover-content) {
|
|
11
13
|
padding: var(--mdc-tooltip-padding);
|
|
12
14
|
color: var(--mdc-tooltip-text-color);
|
|
13
|
-
min-width: fit-content;
|
|
14
15
|
max-width: var(--mdc-tooltip-max-width);
|
|
15
|
-
|
|
16
|
+
min-width: fit-content;
|
|
16
17
|
font-size: var(--mds-font-apps-body-midsize-regular-font-size);
|
|
17
18
|
font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
|
|
18
19
|
line-height: var(--mds-font-apps-body-midsize-regular-line-height);
|