@momentum-design/components 0.52.0 → 0.52.1

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.
@@ -183,7 +183,6 @@ declare class Select extends Select_base implements AssociatedFormControl {
183
183
  * The popover acts as a dropdown list with options, allowing user interaction.
184
184
  */
185
185
  private getPopoverContent;
186
- private shouldFocusSelect;
187
186
  updated(changedProperties: PropertyValues): void;
188
187
  render(): TemplateResult<1>;
189
188
  static styles: Array<CSSResult>;
@@ -458,12 +458,6 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
458
458
  </mdc-popover>
459
459
  `;
460
460
  }
461
- shouldFocusSelect() {
462
- if (this.disabled || this.readonly) {
463
- return false;
464
- }
465
- return true;
466
- }
467
461
  updated(changedProperties) {
468
462
  super.updated(changedProperties);
469
463
  if (changedProperties.has('disabled') || changedProperties.has('readonly')) {
@@ -479,8 +473,8 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
479
473
  <div
480
474
  id="select-base-triggerid"
481
475
  part="base-container"
482
- tabindex="${this.shouldFocusSelect() ? '0' : '-1'}"
483
- class="${this.shouldFocusSelect() ? 'mdc-focus-ring' : ''}"
476
+ tabindex="${this.disabled ? '-1' : '0'}"
477
+ class="${this.disabled ? '' : 'mdc-focus-ring'}"
484
478
  >
485
479
  <mdc-text
486
480
  part="base-text ${this.selectedValueText ? 'selected' : ''}"
@@ -6,7 +6,8 @@ const styles = css `
6
6
  --mdc-select-icon-border-color: var(--mds-color-theme-outline-input-normal);
7
7
  --mdc-select-base-text-color: var(--mds-color-theme-text-secondary-normal);
8
8
  --mdc-select-selected-text-color: var(--mds-color-theme-text-primary-normal);
9
- --mdc-select-disabled-color: var(--mds-color-theme-outline-primary-disabled);
9
+ --mdc-select-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
10
+ --mdc-select-disabled-background-color: var(--mds-color-theme-background-input-disabled);
10
11
  --mdc-select-disabled-text-color: var(--mds-color-theme-text-primary-disabled);
11
12
  --mdc-select-error-border-color: var(--mds-color-theme-text-error-normal);
12
13
  --mdc-select-warning-border-color: var(--mds-color-theme-text-warning-normal);
@@ -78,7 +79,8 @@ const styles = css `
78
79
  :host([help-text-type="success"][readonly])::part(base-container),
79
80
  :host([help-text-type="error"][readonly])::part(base-container),
80
81
  :host([help-text-type="warning"][readonly])::part(base-container) {
81
- border-color: var(--mdc-select-disabled-color);
82
+ border-color: var(--mdc-select-disabled-border-color);
83
+ background: var(--mdc-select-disabled-background-color);
82
84
  }
83
85
  :host([disabled]:hover)::part(base-container),
84
86
  :host([readonly]:hover)::part(base-container) {
@@ -1,7 +1,10 @@
1
+ import type { ValueOf } from '../../utils/types';
2
+ import { ARROW_ICON } from './select.constants';
1
3
  interface Events {
2
4
  onClickEvent: MouseEvent;
3
5
  onChangeEvent: Event;
4
6
  onKeyDownEvent: KeyboardEvent;
5
7
  onFocusEvent: FocusEvent;
6
8
  }
7
- export type { Events };
9
+ type ArrowIcon = ValueOf<typeof ARROW_ICON>;
10
+ export type { Events, ArrowIcon };
@@ -15516,16 +15516,6 @@
15516
15516
  },
15517
15517
  "description": "Generates the content for the popover associated with the select component.\nIf the component is disabled or readonly, returns `nothing`.\nOtherwise, returns a `TemplateResult` that renders a popover with various configurations\nsuch as visibility, interaction, and event handlers.\nThe popover acts as a dropdown list with options, allowing user interaction."
15518
15518
  },
15519
- {
15520
- "kind": "method",
15521
- "name": "shouldFocusSelect",
15522
- "privacy": "private",
15523
- "return": {
15524
- "type": {
15525
- "text": "boolean"
15526
- }
15527
- }
15528
- },
15529
15519
  {
15530
15520
  "kind": "field",
15531
15521
  "name": "name",
package/package.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "lit": "^3.2.0",
40
40
  "uuid": "^11.0.5"
41
41
  },
42
- "version": "0.52.0"
42
+ "version": "0.52.1"
43
43
  }