@momentum-design/components 0.80.1 → 0.80.2

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.
Files changed (63) hide show
  1. package/dist/browser/index.js +404 -386
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/checkbox/checkbox.component.d.ts +4 -0
  4. package/dist/components/checkbox/checkbox.component.js +4 -0
  5. package/dist/components/checkbox/index.d.ts +4 -1
  6. package/dist/components/checkbox/index.js +5 -2
  7. package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +5 -0
  8. package/dist/components/formfieldgroup/formfieldgroup.component.js +5 -0
  9. package/dist/components/formfieldgroup/index.d.ts +4 -2
  10. package/dist/components/formfieldgroup/index.js +4 -2
  11. package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +21 -1
  12. package/dist/components/formfieldwrapper/formfieldwrapper.component.js +40 -2
  13. package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +3 -0
  14. package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +3 -0
  15. package/dist/components/formfieldwrapper/index.d.ts +3 -1
  16. package/dist/components/formfieldwrapper/index.js +4 -2
  17. package/dist/components/input/index.d.ts +2 -1
  18. package/dist/components/input/index.js +3 -2
  19. package/dist/components/input/input.component.d.ts +1 -0
  20. package/dist/components/input/input.component.js +1 -0
  21. package/dist/components/input/input.constants.d.ts +1 -1
  22. package/dist/components/popover/popover.component.d.ts +1 -1
  23. package/dist/components/popover/popover.component.js +0 -5
  24. package/dist/components/progressbar/progressbar.component.js +2 -0
  25. package/dist/components/radio/index.d.ts +5 -1
  26. package/dist/components/radio/index.js +5 -1
  27. package/dist/components/radio/radio.component.d.ts +6 -1
  28. package/dist/components/radio/radio.component.js +6 -1
  29. package/dist/components/select/index.d.ts +2 -0
  30. package/dist/components/select/index.js +2 -0
  31. package/dist/components/select/select.component.d.ts +2 -1
  32. package/dist/components/select/select.component.js +7 -6
  33. package/dist/components/textarea/index.d.ts +1 -0
  34. package/dist/components/textarea/index.js +1 -0
  35. package/dist/components/textarea/textarea.component.d.ts +2 -2
  36. package/dist/components/textarea/textarea.component.js +2 -2
  37. package/dist/components/toggle/index.d.ts +3 -0
  38. package/dist/components/toggle/index.js +3 -0
  39. package/dist/components/toggle/toggle.component.d.ts +3 -0
  40. package/dist/components/toggle/toggle.component.js +3 -0
  41. package/dist/components/toggletip/toggletip.component.d.ts +1 -1
  42. package/dist/components/toggletip/toggletip.component.js +5 -12
  43. package/dist/components/toggletip/toggletip.styles.js +2 -2
  44. package/dist/custom-elements.json +5787 -4960
  45. package/dist/react/checkbox/index.d.ts +4 -0
  46. package/dist/react/checkbox/index.js +4 -0
  47. package/dist/react/formfieldgroup/index.d.ts +5 -0
  48. package/dist/react/formfieldgroup/index.js +5 -0
  49. package/dist/react/formfieldwrapper/index.d.ts +5 -1
  50. package/dist/react/formfieldwrapper/index.js +5 -1
  51. package/dist/react/index.d.ts +3 -3
  52. package/dist/react/index.js +3 -3
  53. package/dist/react/input/index.d.ts +1 -0
  54. package/dist/react/input/index.js +1 -0
  55. package/dist/react/radio/index.d.ts +6 -1
  56. package/dist/react/radio/index.js +6 -1
  57. package/dist/react/select/index.d.ts +2 -0
  58. package/dist/react/select/index.js +2 -0
  59. package/dist/react/textarea/index.d.ts +2 -2
  60. package/dist/react/textarea/index.js +2 -2
  61. package/dist/react/toggle/index.d.ts +3 -0
  62. package/dist/react/toggle/index.js +3 -0
  63. package/package.json +1 -1
@@ -10,7 +10,11 @@ declare const Checkbox_base: import("../../utils/mixins/index.types").Constructo
10
10
  *
11
11
  * To create a group of checkboxes, use the FormFieldGroup component.
12
12
  *
13
+ * @dependency mdc-button
13
14
  * @dependency mdc-icon
15
+ * @dependency mdc-staticcheckbox
16
+ * @dependency mdc-text
17
+ * @dependency mdc-toggletip
14
18
  *
15
19
  * @tagname mdc-checkbox
16
20
  *
@@ -23,7 +23,11 @@ import styles from './checkbox.styles';
23
23
  *
24
24
  * To create a group of checkboxes, use the FormFieldGroup component.
25
25
  *
26
+ * @dependency mdc-button
26
27
  * @dependency mdc-icon
28
+ * @dependency mdc-staticcheckbox
29
+ * @dependency mdc-text
30
+ * @dependency mdc-toggletip
27
31
  *
28
32
  * @tagname mdc-checkbox
29
33
  *
@@ -1,6 +1,9 @@
1
- import Checkbox from './checkbox.component';
1
+ import '../button';
2
2
  import '../icon';
3
3
  import '../staticcheckbox';
4
+ import '../text';
5
+ import '../toggletip';
6
+ import Checkbox from './checkbox.component';
4
7
  declare global {
5
8
  interface HTMLElementTagNameMap {
6
9
  ['mdc-checkbox']: Checkbox;
@@ -1,6 +1,9 @@
1
- import Checkbox from './checkbox.component';
2
- import { TAG_NAME } from './checkbox.constants';
1
+ import '../button';
3
2
  import '../icon';
4
3
  import '../staticcheckbox';
4
+ import '../text';
5
+ import '../toggletip';
6
+ import Checkbox from './checkbox.component';
7
+ import { TAG_NAME } from './checkbox.constants';
5
8
  Checkbox.register(TAG_NAME);
6
9
  export default Checkbox;
@@ -19,6 +19,11 @@ declare const FormfieldGroup_base: import("../../utils/mixins/index.types").Cons
19
19
  *
20
20
  * @tagname mdc-formfieldgroup
21
21
  *
22
+ * @dependency mdc-button
23
+ * @dependency mdc-icon
24
+ * @dependency mdc-text
25
+ * @dependency mdc-toggletip
26
+ *
22
27
  * @slot default - This is a default slot for checkbox or toggle components.
23
28
  */
24
29
  declare class FormfieldGroup extends FormfieldGroup_base {
@@ -23,6 +23,11 @@ import styles from './formfieldgroup.styles';
23
23
  *
24
24
  * @tagname mdc-formfieldgroup
25
25
  *
26
+ * @dependency mdc-button
27
+ * @dependency mdc-icon
28
+ * @dependency mdc-text
29
+ * @dependency mdc-toggletip
30
+ *
26
31
  * @slot default - This is a default slot for checkbox or toggle components.
27
32
  */
28
33
  class FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {
@@ -1,6 +1,8 @@
1
- import FormfieldGroup from './formfieldgroup.component';
2
- import '../text';
1
+ import '../button';
3
2
  import '../icon';
3
+ import '../text';
4
+ import '../toggletip';
5
+ import FormfieldGroup from './formfieldgroup.component';
4
6
  declare global {
5
7
  interface HTMLElementTagNameMap {
6
8
  ['mdc-formfieldgroup']: FormfieldGroup;
@@ -1,6 +1,8 @@
1
+ import '../button';
2
+ import '../icon';
3
+ import '../text';
4
+ import '../toggletip';
1
5
  import FormfieldGroup from './formfieldgroup.component';
2
6
  import { TAG_NAME } from './formfieldgroup.constants';
3
- import '../text';
4
- import '../icon';
5
7
  FormfieldGroup.register(TAG_NAME);
6
8
  export default FormfieldGroup;
@@ -1,5 +1,6 @@
1
1
  import { CSSResult, nothing } from 'lit';
2
2
  import { Component } from '../../models';
3
+ import type { PopoverPlacement } from '../popover/popover.types';
3
4
  import type { ValidationType } from './formfieldwrapper.types';
4
5
  declare const FormfieldWrapper_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DisabledMixin").DisabledMixinInterface> & typeof Component;
5
6
  /**
@@ -9,7 +10,11 @@ declare const FormfieldWrapper_base: import("../../utils/mixins/index.types").Co
9
10
  *
10
11
  * @tagname mdc-formfieldwrapper
11
12
  *
12
- * @slot label-info - slot to add the label info icon
13
+ * @dependency mdc-text
14
+ * @dependency mdc-icon
15
+ * @dependency mdc-button
16
+ * @dependency mdc-toggletip
17
+ *
13
18
  *
14
19
  */
15
20
  declare class FormfieldWrapper extends FormfieldWrapper_base {
@@ -36,6 +41,21 @@ declare class FormfieldWrapper extends FormfieldWrapper_base {
36
41
  * The help text that is displayed below the input field.
37
42
  */
38
43
  helpText?: string;
44
+ /**
45
+ * The toggletip text that is displayed when the label is hovered.
46
+ * It is used to provide additional information about the label.
47
+ */
48
+ toggletipText?: string;
49
+ /**
50
+ * The placement of the toggletip that is displayed when the info icon is hovered.
51
+ * @default 'top'
52
+ */
53
+ toggletipPlacement: PopoverPlacement;
54
+ /**
55
+ * Aria label for the info icon that is displayed next to the label when `toggletipText` is set.
56
+ * This is used for accessibility purposes to provide a description of the icon.
57
+ */
58
+ infoIconAriaLabel?: string;
39
59
  /** @internal */
40
60
  protected shouldRenderLabel: Boolean;
41
61
  /**
@@ -9,9 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { html, nothing } from 'lit';
11
11
  import { property } from 'lit/decorators.js';
12
+ import { ifDefined } from 'lit/directives/if-defined.js';
12
13
  import { Component } from '../../models';
13
14
  import { DisabledMixin } from '../../utils/mixins/DisabledMixin';
14
15
  import { DEFAULTS, MDC_TEXT_OPTIONS } from './formfieldwrapper.constants';
16
+ import { BUTTON_VARIANTS } from '../button/button.constants';
15
17
  import styles from './formfieldwrapper.styles';
16
18
  import { getHelperIcon } from './formfieldwrapper.utils';
17
19
  /**
@@ -21,7 +23,11 @@ import { getHelperIcon } from './formfieldwrapper.utils';
21
23
  *
22
24
  * @tagname mdc-formfieldwrapper
23
25
  *
24
- * @slot label-info - slot to add the label info icon
26
+ * @dependency mdc-text
27
+ * @dependency mdc-icon
28
+ * @dependency mdc-button
29
+ * @dependency mdc-toggletip
30
+ *
25
31
  *
26
32
  */
27
33
  class FormfieldWrapper extends DisabledMixin(Component) {
@@ -42,6 +48,11 @@ class FormfieldWrapper extends DisabledMixin(Component) {
42
48
  * The type of help text. It can be 'default', 'error', 'warning', 'success', 'priority'.
43
49
  */
44
50
  this.helpTextType = DEFAULTS.VALIDATION;
51
+ /**
52
+ * The placement of the toggletip that is displayed when the info icon is hovered.
53
+ * @default 'top'
54
+ */
55
+ this.toggletipPlacement = DEFAULTS.TOGGLETIP_PLACEMENT;
45
56
  /** @internal */
46
57
  this.shouldRenderLabel = true;
47
58
  }
@@ -109,7 +120,22 @@ class FormfieldWrapper extends DisabledMixin(Component) {
109
120
  return html `<div class="mdc-label-text" part="label-text">
110
121
  <slot name="label">${this.renderLabelElement()}</slot>
111
122
  ${this.required ? html `<span part="required-indicator">*</span>` : nothing}
112
- <slot name="label-info"></slot>
123
+ ${this.toggletipText ? html `
124
+ <mdc-button
125
+ part="info-icon-btn"
126
+ prefix-icon="${DEFAULTS.INFO_ICON}"
127
+ size="${DEFAULTS.ICON_SIZE}"
128
+ variant="${BUTTON_VARIANTS.TERTIARY}"
129
+ aria-label="${ifDefined(this.infoIconAriaLabel)}"
130
+ id="info-icon-id"></mdc-button>
131
+ <mdc-toggletip
132
+ part="label-toggletip"
133
+ triggerid="info-icon-id"
134
+ id="label-toggletip-id"
135
+ placement="${this.toggletipPlacement}"
136
+ show-arrow
137
+ >${this.toggletipText}</mdc-toggletip
138
+ >` : nothing}
113
139
  </div>`;
114
140
  }
115
141
  /**
@@ -147,4 +173,16 @@ __decorate([
147
173
  property({ type: String, reflect: true, attribute: 'help-text' }),
148
174
  __metadata("design:type", String)
149
175
  ], FormfieldWrapper.prototype, "helpText", void 0);
176
+ __decorate([
177
+ property({ type: String, reflect: true, attribute: 'toggletip-text' }),
178
+ __metadata("design:type", String)
179
+ ], FormfieldWrapper.prototype, "toggletipText", void 0);
180
+ __decorate([
181
+ property({ type: String, reflect: true, attribute: 'toggletip-placement' }),
182
+ __metadata("design:type", String)
183
+ ], FormfieldWrapper.prototype, "toggletipPlacement", void 0);
184
+ __decorate([
185
+ property({ type: String, reflect: true, attribute: 'info-icon-aria-label' }),
186
+ __metadata("design:type", String)
187
+ ], FormfieldWrapper.prototype, "infoIconAriaLabel", void 0);
150
188
  export default FormfieldWrapper;
@@ -10,6 +10,9 @@ declare const DEFAULTS: {
10
10
  readonly VALIDATION: "default";
11
11
  readonly HELPER_TEXT_ID: "helper-text-id";
12
12
  readonly HEADING_ID: "heading-id";
13
+ readonly ICON_SIZE: 20;
14
+ readonly INFO_ICON: "info-badge-filled";
15
+ readonly TOGGLETIP_PLACEMENT: "top";
13
16
  };
14
17
  declare const MDC_TEXT_OPTIONS: {
15
18
  TAGNAME: "span";
@@ -12,6 +12,9 @@ const DEFAULTS = {
12
12
  VALIDATION: VALIDATION.DEFAULT,
13
13
  HELPER_TEXT_ID: 'helper-text-id',
14
14
  HEADING_ID: 'heading-id',
15
+ ICON_SIZE: 20,
16
+ INFO_ICON: 'info-badge-filled',
17
+ TOGGLETIP_PLACEMENT: 'top',
15
18
  };
16
19
  const MDC_TEXT_OPTIONS = {
17
20
  TAGNAME: VALID_TEXT_TAGS.SPAN,
@@ -1,6 +1,8 @@
1
- import FormfieldWrapper from './formfieldwrapper.component';
1
+ import '../button';
2
2
  import '../icon';
3
3
  import '../text';
4
+ import '../toggletip';
5
+ import FormfieldWrapper from './formfieldwrapper.component';
4
6
  declare global {
5
7
  interface HTMLElementTagNameMap {
6
8
  ['mdc-formfieldwrapper']: FormfieldWrapper;
@@ -1,6 +1,8 @@
1
- import FormfieldWrapper from './formfieldwrapper.component';
2
- import { TAG_NAME } from './formfieldwrapper.constants';
1
+ import '../button';
3
2
  import '../icon';
4
3
  import '../text';
4
+ import '../toggletip';
5
+ import FormfieldWrapper from './formfieldwrapper.component';
6
+ import { TAG_NAME } from './formfieldwrapper.constants';
5
7
  FormfieldWrapper.register(TAG_NAME);
6
8
  export default FormfieldWrapper;
@@ -1,7 +1,8 @@
1
- import Input from './input.component';
2
1
  import '../button';
3
2
  import '../icon';
4
3
  import '../text';
4
+ import '../toggletip';
5
+ import Input from './input.component';
5
6
  declare global {
6
7
  interface HTMLElementTagNameMap {
7
8
  ['mdc-input']: Input;
@@ -1,7 +1,8 @@
1
- import Input from './input.component';
2
- import { TAG_NAME } from './input.constants';
3
1
  import '../button';
4
2
  import '../icon';
5
3
  import '../text';
4
+ import '../toggletip';
5
+ import Input from './input.component';
6
+ import { TAG_NAME } from './input.constants';
6
7
  Input.register(TAG_NAME);
7
8
  export default Input;
@@ -26,6 +26,7 @@ declare const Input_base: import("../../utils/mixins/index.types").Constructor<i
26
26
  * @dependency mdc-icon
27
27
  * @dependency mdc-text
28
28
  * @dependency mdc-button
29
+ * @dependency mdc-toggletip
29
30
  *
30
31
  * @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
31
32
  * @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
@@ -38,6 +38,7 @@ import { FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';
38
38
  * @dependency mdc-icon
39
39
  * @dependency mdc-text
40
40
  * @dependency mdc-button
41
+ * @dependency mdc-toggletip
41
42
  *
42
43
  * @cssproperty --mdc-input-disabled-border-color - Border color for the input container when disabled
43
44
  * @cssproperty --mdc-input-disabled-text-color - Text color for the input field when disabled
@@ -23,7 +23,7 @@ declare const DEFAULTS: {
23
23
  VALIDATION: "default";
24
24
  ICON_SIZE_VALUE: number;
25
25
  ICON_SIZE_UNIT: string;
26
- CLEAR_BUTTON_ICON: string;
26
+ CLEAR_BUTTON_ICON: "cancel-bold";
27
27
  CLEAR_BUTTON_VARIANT: "tertiary";
28
28
  CLEAR_BUTTON_SIZE: 20;
29
29
  PREFIX_TEXT_TYPE: "body-midsize-regular";
@@ -163,7 +163,7 @@ declare class Popover extends Popover_base {
163
163
  * Element ID that the popover append to.
164
164
  * @default ''
165
165
  */
166
- appendTo: string;
166
+ appendTo?: string;
167
167
  /**
168
168
  * aria-label attribute to be set for close button accessibility.
169
169
  * @default null
@@ -177,11 +177,6 @@ class Popover extends FocusTrapMixin(Component) {
177
177
  * @default 1000
178
178
  */
179
179
  this.zIndex = DEFAULTS.Z_INDEX;
180
- /**
181
- * Element ID that the popover append to.
182
- * @default ''
183
- */
184
- this.appendTo = '';
185
180
  /**
186
181
  * aria-label attribute to be set for close button accessibility.
187
182
  * @default null
@@ -95,6 +95,8 @@ class Progressbar extends DataAriaLabelMixin(FormfieldWrapper) {
95
95
  super.connectedCallback();
96
96
  this.id = `mdc-progressbar-${uuidv4()}`;
97
97
  this.disabled = undefined;
98
+ this.toggletipText = undefined;
99
+ this.toggletipPlacement = undefined;
98
100
  }
99
101
  /**
100
102
  * Ensures that the value is clamped between 0 and 100
@@ -1,5 +1,9 @@
1
- import Radio from './radio.component';
1
+ import '../button';
2
+ import '../icon';
2
3
  import '../staticradio';
4
+ import '../text';
5
+ import '../tooltip';
6
+ import Radio from './radio.component';
3
7
  declare global {
4
8
  interface HTMLElementTagNameMap {
5
9
  ['mdc-radio']: Radio;
@@ -1,5 +1,9 @@
1
+ import '../button';
2
+ import '../icon';
3
+ import '../staticradio';
4
+ import '../text';
5
+ import '../tooltip';
1
6
  import Radio from './radio.component';
2
7
  import { TAG_NAME } from './radio.constants';
3
- import '../staticradio';
4
8
  Radio.register(TAG_NAME);
5
9
  export default Radio;
@@ -7,7 +7,12 @@ declare const Radio_base: import("../../utils/mixins/index.types").Constructor<i
7
7
  * These are often used in forms, settings, and selection in lists.
8
8
  *
9
9
  * A radio component contains an optional label, optional info icon and an optional helper text.
10
- * @dependency mdc-formfieldwrapper
10
+ *
11
+ * @dependency mdc-button
12
+ * @dependency mdc-icon
13
+ * @dependency mdc-text
14
+ * @dependency mdc-staticradio
15
+ * @dependency mdc-toggletip
11
16
  *
12
17
  * @tagname mdc-radio
13
18
  *
@@ -21,7 +21,12 @@ import { DEFAULTS as FORMFIELD_DEFAULTS } from '../formfieldwrapper/formfieldwra
21
21
  * These are often used in forms, settings, and selection in lists.
22
22
  *
23
23
  * A radio component contains an optional label, optional info icon and an optional helper text.
24
- * @dependency mdc-formfieldwrapper
24
+ *
25
+ * @dependency mdc-button
26
+ * @dependency mdc-icon
27
+ * @dependency mdc-text
28
+ * @dependency mdc-staticradio
29
+ * @dependency mdc-toggletip
25
30
  *
26
31
  * @tagname mdc-radio
27
32
  *
@@ -1,6 +1,8 @@
1
+ import '../button';
1
2
  import '../icon';
2
3
  import '../popover';
3
4
  import '../text';
5
+ import '../toggletip';
4
6
  import Select from './select.component';
5
7
  declare global {
6
8
  interface HTMLElementTagNameMap {
@@ -1,6 +1,8 @@
1
+ import '../button';
1
2
  import '../icon';
2
3
  import '../popover';
3
4
  import '../text';
5
+ import '../toggletip';
4
6
  import Select from './select.component';
5
7
  import { TAG_NAME } from './select.constants';
6
8
  Select.register(TAG_NAME);
@@ -10,9 +10,11 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
10
10
  * The component ensures accessibility and usability while handling various use cases,
11
11
  * including long text truncation with tooltip support.
12
12
  *
13
+ * @dependency mdc-button
13
14
  * @dependency mdc-icon
14
15
  * @dependency mdc-popover
15
16
  * @dependency mdc-text
17
+ * @dependency mdc-toggletip
16
18
  *
17
19
  * @tagname mdc-select
18
20
  *
@@ -61,7 +63,6 @@ declare class Select extends Select_base implements AssociatedFormControl {
61
63
  */
62
64
  inputElement: HTMLInputElement;
63
65
  connectedCallback(): void;
64
- disconnectedCallback(): void;
65
66
  /**
66
67
  * A helper function which returns a flattened array of all valid options from the assigned slot.
67
68
  * It takes care of the edge cases where the option is either a direct child or a
@@ -26,9 +26,11 @@ import styles from './select.styles';
26
26
  * The component ensures accessibility and usability while handling various use cases,
27
27
  * including long text truncation with tooltip support.
28
28
  *
29
+ * @dependency mdc-button
29
30
  * @dependency mdc-icon
30
31
  * @dependency mdc-popover
31
32
  * @dependency mdc-text
33
+ * @dependency mdc-toggletip
32
34
  *
33
35
  * @tagname mdc-select
34
36
  *
@@ -68,11 +70,6 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
68
70
  super.connectedCallback();
69
71
  // select will only contain name and value will be defined in the options.
70
72
  this.value = undefined;
71
- this.addEventListener('keydown', this.handleKeydown);
72
- }
73
- disconnectedCallback() {
74
- super.disconnectedCallback();
75
- this.removeEventListener('keydown', this.handleKeydown);
76
73
  }
77
74
  /**
78
75
  * A helper function which returns a flattened array of all valid options from the assigned slot.
@@ -94,6 +91,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
94
91
  handlePopoverOpen() {
95
92
  this.displayPopover = true;
96
93
  this.baseIconName = ARROW_ICON.ARROW_UP;
94
+ this.updateActivedescendant();
97
95
  }
98
96
  handlePopoverClose() {
99
97
  this.displayPopover = false;
@@ -343,7 +341,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
343
341
  updateActivedescendant(target) {
344
342
  var _a, _b;
345
343
  const currentIndex = this.getAllValidOptions().findIndex((option) => option === target);
346
- this.activeDescendant = (_b = (_a = this.getAllValidOptions()[currentIndex]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : '';
344
+ this.activeDescendant = ((_a = this.getAllValidOptions()[currentIndex]) === null || _a === void 0 ? void 0 : _a.id) || ((_b = this.getAllValidOptions()[0]) === null || _b === void 0 ? void 0 : _b.id);
347
345
  }
348
346
  resetActivedescendant() {
349
347
  this.activeDescendant = '';
@@ -452,6 +450,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
452
450
  <mdc-popover
453
451
  id="options-popover"
454
452
  triggerid="select-base-triggerid"
453
+ @keydown="${this.handleKeydown}"
455
454
  interactive
456
455
  ?visible="${this.displayPopover}"
457
456
  hide-on-outside-click
@@ -482,6 +481,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
482
481
  <div
483
482
  id="select-base-triggerid"
484
483
  part="base-container"
484
+ @keydown="${this.handleKeydown}"
485
485
  tabindex="${this.disabled ? '-1' : '0'}"
486
486
  class="${this.disabled ? '' : 'mdc-focus-ring'}"
487
487
  role="combobox"
@@ -490,6 +490,7 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
490
490
  aria-label="${(_a = this.dataAriaLabel) !== null && _a !== void 0 ? _a : ''}"
491
491
  aria-labelledby="${this.label ? FORMFIELD_DEFAULTS.HEADING_ID : ''}"
492
492
  aria-expanded="${this.displayPopover ? 'true' : 'false'}"
493
+ aria-controls="options-popover"
493
494
  >
494
495
  ${this.selectedIcon
495
496
  ? html `<mdc-icon length-unit="rem" size="1" name="${this.selectedIcon}" part="selected-icon"></mdc-icon>`
@@ -2,6 +2,7 @@ import Textarea from './textarea.component';
2
2
  import '../button';
3
3
  import '../icon';
4
4
  import '../text';
5
+ import '../toggletip';
5
6
  declare global {
6
7
  interface HTMLElementTagNameMap {
7
8
  ['mdc-textarea']: Textarea;
@@ -3,5 +3,6 @@ import { TAG_NAME } from './textarea.constants';
3
3
  import '../button';
4
4
  import '../icon';
5
5
  import '../text';
6
+ import '../toggletip';
6
7
  Textarea.register(TAG_NAME);
7
8
  export default Textarea;
@@ -32,10 +32,10 @@ declare const Textarea_base: import("../../utils/mixins/index.types").Constructo
32
32
  * @event limitexceeded - (React: onLimitExceeded) This event is dispatched once when the character limit
33
33
  * exceeds or restored.
34
34
  *
35
- *
35
+ * @dependency mdc-button
36
36
  * @dependency mdc-icon
37
37
  * @dependency mdc-text
38
- * @dependency mdc-button
38
+ * @dependency mdc-toggletip
39
39
  *
40
40
  * @cssproperty --mdc-textarea-disabled-border-color - Border color for the textarea container when disabled
41
41
  * @cssproperty --mdc-textarea-disabled-text-color - Text color for the textarea field when disabled
@@ -46,10 +46,10 @@ import { FormInternalsMixin } from '../../utils/mixins/FormInternalsMixin';
46
46
  * @event limitexceeded - (React: onLimitExceeded) This event is dispatched once when the character limit
47
47
  * exceeds or restored.
48
48
  *
49
- *
49
+ * @dependency mdc-button
50
50
  * @dependency mdc-icon
51
51
  * @dependency mdc-text
52
- * @dependency mdc-button
52
+ * @dependency mdc-toggletip
53
53
  *
54
54
  * @cssproperty --mdc-textarea-disabled-border-color - Border color for the textarea container when disabled
55
55
  * @cssproperty --mdc-textarea-disabled-text-color - Text color for the textarea field when disabled
@@ -1,5 +1,8 @@
1
+ import '../button';
1
2
  import '../icon';
2
3
  import '../statictoggle';
4
+ import '../text';
5
+ import '../toggletip';
3
6
  import Toggle from './toggle.component';
4
7
  declare global {
5
8
  interface HTMLElementTagNameMap {
@@ -1,5 +1,8 @@
1
+ import '../button';
1
2
  import '../icon';
2
3
  import '../statictoggle';
4
+ import '../text';
5
+ import '../toggletip';
3
6
  import Toggle from './toggle.component';
4
7
  import { TAG_NAME } from './toggle.constants';
5
8
  Toggle.register(TAG_NAME);
@@ -13,8 +13,11 @@ declare const Toggle_base: import("../../utils/mixins/index.types").Constructor<
13
13
  *
14
14
  * Note: It internally renders a checkbox styled as a toggle switch.
15
15
  *
16
+ * @dependency mdc-button
16
17
  * @dependency mdc-icon
17
18
  * @dependency mdc-statictoggle
19
+ * @dependency mdc-text
20
+ * @dependency mdc-toggletip
18
21
  *
19
22
  * @tagname mdc-toggle
20
23
  *
@@ -26,8 +26,11 @@ import styles from './toggle.styles';
26
26
  *
27
27
  * Note: It internally renders a checkbox styled as a toggle switch.
28
28
  *
29
+ * @dependency mdc-button
29
30
  * @dependency mdc-icon
30
31
  * @dependency mdc-statictoggle
32
+ * @dependency mdc-text
33
+ * @dependency mdc-toggletip
31
34
  *
32
35
  * @tagname mdc-toggle
33
36
  *
@@ -47,7 +47,7 @@ declare class ToggleTip extends Popover {
47
47
  *
48
48
  * Please refer to the `mdc-screenreaderannouncer` component for more details.
49
49
  */
50
- screenreaderAnnouncerIdentity: string;
50
+ screenreaderAnnouncerIdentity?: string;
51
51
  connectedCallback(): void;
52
52
  /**
53
53
  * @returns The text content of all the nodes in the default slot, joined by a space.