@momentum-design/components 0.121.4 → 0.121.6

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.
@@ -54,6 +54,14 @@ declare class Accordion extends AccordionButton {
54
54
  leadingControlsSlot: Array<HTMLElement>;
55
55
  /** @internal */
56
56
  trailingControlsSlot: Array<HTMLElement>;
57
+ /**
58
+ * Aria-label attribute for the trigger button when accordion is collapsed.
59
+ */
60
+ openButtonAriaLabel?: string;
61
+ /**
62
+ * Aria-label attribute for the trigger button when accordion is expanded.
63
+ */
64
+ closeButtonAriaLabel?: string;
57
65
  /**
58
66
  * Handles property changes for the accordion.
59
67
  * If the disabled property is updated, applies the same disabled state to all elements in the leading and trailing controls slots.
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { html } from 'lit';
11
- import { queryAssignedElements } from 'lit/decorators.js';
11
+ import { queryAssignedElements, property } from 'lit/decorators.js';
12
12
  import { ifDefined } from 'lit/directives/if-defined.js';
13
13
  import { ROLE } from '../../utils/roles';
14
14
  import AccordionButton from '../accordionbutton/accordionbutton.component';
@@ -108,7 +108,7 @@ class Accordion extends AccordionButton {
108
108
  @click="${this.handleHeaderClick}"
109
109
  aria-controls="${this.bodySectionId}"
110
110
  aria-expanded="${this.expanded}"
111
- title="${ifDefined(this.headerText)}"
111
+ aria-label="${ifDefined(this.expanded ? this.closeButtonAriaLabel : this.openButtonAriaLabel)}"
112
112
  prefix-icon="${this.getArrowIconName()}"
113
113
  variant="${BUTTON_VARIANTS.TERTIARY}"
114
114
  size="${ICON_BUTTON_SIZES[20]}"
@@ -127,4 +127,12 @@ __decorate([
127
127
  queryAssignedElements({ slot: 'trailing-controls' }),
128
128
  __metadata("design:type", Array)
129
129
  ], Accordion.prototype, "trailingControlsSlot", void 0);
130
+ __decorate([
131
+ property({ type: String, attribute: 'open-button-aria-label', reflect: true }),
132
+ __metadata("design:type", String)
133
+ ], Accordion.prototype, "openButtonAriaLabel", void 0);
134
+ __decorate([
135
+ property({ type: String, attribute: 'close-button-aria-label', reflect: true }),
136
+ __metadata("design:type", String)
137
+ ], Accordion.prototype, "closeButtonAriaLabel", void 0);
130
138
  export default Accordion;
@@ -13,11 +13,13 @@ const styles = [
13
13
  :host,
14
14
  :host::part(input-container),
15
15
  :host::part(input-section),
16
- :host::part(input-text) {
16
+ :host::part(input-text),
17
+ ::slotted(input) {
17
18
  width: 100%;
18
19
  }
19
20
 
20
- :host::part(input-text) {
21
+ :host::part(input-text),
22
+ ::slotted(input) {
21
23
  font-family: inherit;
22
24
  }
23
25
 
@@ -55,14 +57,16 @@ const styles = [
55
57
  gap: 0.25rem;
56
58
  }
57
59
 
58
- :host::part(input-text) {
60
+ :host::part(input-text),
61
+ ::slotted(input) {
59
62
  border: none;
60
63
  color: var(--mdc-input-text-color);
61
64
  background-color: inherit;
62
65
  outline: none;
63
66
  }
64
67
 
65
- :host::part(input-text)::selection {
68
+ :host::part(input-text)::selection,
69
+ ::slotted(input)::selection {
66
70
  background-color: var(--mdc-input-selection-background-color);
67
71
  color: var(--mdc-input-selection-text-color);
68
72
  }
@@ -136,11 +136,11 @@ class Password extends Input {
136
136
  }
137
137
  Password.styles = [...Input.styles];
138
138
  __decorate([
139
- property({ type: String, attribute: 'show-button-aria-label' }),
139
+ property({ type: String, attribute: 'show-button-aria-label', reflect: true }),
140
140
  __metadata("design:type", Object)
141
141
  ], Password.prototype, "showButtonAriaLabel", void 0);
142
142
  __decorate([
143
- property({ type: String, attribute: 'hide-button-aria-label' }),
143
+ property({ type: String, attribute: 'hide-button-aria-label', reflect: true }),
144
144
  __metadata("design:type", Object)
145
145
  ], Password.prototype, "hideButtonAriaLabel", void 0);
146
146
  __decorate([
@@ -3,11 +3,16 @@ import type Textarea from './textarea.component';
3
3
  import { AUTO_COMPLETE, WRAP } from './textarea.constants';
4
4
  type WrapType = ValueOf<typeof WRAP>;
5
5
  type AutoCompleteType = ValueOf<typeof AUTO_COMPLETE>;
6
+ type TextareaInputEvent = OverrideEventTarget<InputEvent, Textarea>;
7
+ type TextareaChangeEvent = TypedCustomEvent<Textarea>;
8
+ type TextareaFocusEvent = OverrideEventTarget<FocusEvent, Textarea>;
9
+ type TextareaBlurEvent = OverrideEventTarget<FocusEvent, Textarea>;
10
+ type TextareaLimitExceededEvent = TypedCustomEvent<Textarea>;
6
11
  interface Events {
7
- onInputEvent: OverrideEventTarget<InputEvent, Textarea>;
8
- onChangeEvent: TypedCustomEvent<Textarea>;
9
- onFocusEvent: OverrideEventTarget<FocusEvent, Textarea>;
10
- onBlurEvent: OverrideEventTarget<FocusEvent, Textarea>;
11
- onLimitExceededEvent: TypedCustomEvent<Textarea>;
12
+ onInputEvent: TextareaInputEvent;
13
+ onChangeEvent: TextareaChangeEvent;
14
+ onFocusEvent: TextareaFocusEvent;
15
+ onBlurEvent: TextareaBlurEvent;
16
+ onLimitExceededEvent: TextareaLimitExceededEvent;
12
17
  }
13
- export type { WrapType, AutoCompleteType, Events };
18
+ export type { WrapType, AutoCompleteType, Events, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, };