@momentum-design/components 0.127.1 → 0.127.3

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.
@@ -4,7 +4,7 @@ import type { IconNames } from '../icon/icon.types';
4
4
  /**
5
5
  * `mdc-menusection` is a container element used to group a set of menu items.
6
6
  *
7
- * This component supports a mix of `menuitem`, `menuitemcheckbox`, and `menuitemradio` components.
7
+ * This component supports a mix of `menuitem`, `menuitemcheckbox`, and `menuitemradio` components. MenuSection can not be nested.
8
8
  *
9
9
  * - If multiple `menuitemradio` components are slotted into the section, the group enforces a single-selection rule:
10
10
  * only one radio item can be selected at a time.
@@ -19,7 +19,7 @@ import { DEFAULTS } from './menusection.constants';
19
19
  /**
20
20
  * `mdc-menusection` is a container element used to group a set of menu items.
21
21
  *
22
- * This component supports a mix of `menuitem`, `menuitemcheckbox`, and `menuitemradio` components.
22
+ * This component supports a mix of `menuitem`, `menuitemcheckbox`, and `menuitemradio` components. MenuSection can not be nested.
23
23
  *
24
24
  * - If multiple `menuitemradio` components are slotted into the section, the group enforces a single-selection rule:
25
25
  * only one radio item can be selected at a time.
@@ -276,7 +276,7 @@ class Select extends ListNavigationMixin(CaptureDestroyEventForChildElement(Auto
276
276
  // when selected, check if there is any other option is a selected option,
277
277
  // first preference should always be given to the `selected` attribute.
278
278
  // if there is no selected option, then reset it to placeholder or first option
279
- if (firstSelectedOption) {
279
+ if (firstSelectedOption && firstSelectedOption !== this.selectedOption) {
280
280
  this.setSelectedOption(firstSelectedOption);
281
281
  }
282
282
  else {
@@ -663,13 +663,13 @@ class Select extends ListNavigationMixin(CaptureDestroyEventForChildElement(Auto
663
663
  >
664
664
  ${(_f = (_e = this.selectedOption) === null || _e === void 0 ? void 0 : _e.label) !== null && _f !== void 0 ? _f : this.placeholder}
665
665
  </mdc-text>
666
- </div>
667
- <div part="icon-container">
668
- <mdc-icon
669
- size="1"
670
- length-unit="rem"
671
- name="${this.displayPopover ? ARROW_ICON.ARROW_UP : ARROW_ICON.ARROW_DOWN}"
672
- ></mdc-icon>
666
+ <div part="icon-container">
667
+ <mdc-icon
668
+ size="1"
669
+ length-unit="rem"
670
+ name="${this.displayPopover ? ARROW_ICON.ARROW_UP : ARROW_ICON.ARROW_DOWN}"
671
+ ></mdc-icon>
672
+ </div>
673
673
  </div>
674
674
  <input
675
675
  id="${this.inputId}"