@momentum-design/components 0.84.3 → 0.84.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.
Files changed (182) hide show
  1. package/README.md +8 -3
  2. package/dist/browser/index.js +2233 -2291
  3. package/dist/browser/index.js.map +4 -4
  4. package/dist/components/alertchip/alertchip.component.d.ts +1 -1
  5. package/dist/components/alertchip/alertchip.component.js +2 -2
  6. package/dist/components/alertchip/alertchip.styles.js +22 -23
  7. package/dist/components/alertchip/alertchip.types.d.ts +1 -1
  8. package/dist/components/animation/animation.component.js +1 -1
  9. package/dist/components/animation/animation.styles.js +8 -5
  10. package/dist/components/appheader/appheader.component.js +12 -13
  11. package/dist/components/appheader/appheader.styles.js +0 -1
  12. package/dist/components/avatar/avatar.component.js +3 -16
  13. package/dist/components/avatar/avatar.constants.d.ts +1 -1
  14. package/dist/components/avatar/avatar.constants.js +1 -1
  15. package/dist/components/avatar/avatar.styles.js +129 -122
  16. package/dist/components/avatar/avatar.types.d.ts +1 -1
  17. package/dist/components/avatar/avatar.utils.d.ts +1 -1
  18. package/dist/components/avatar/avatar.utils.js +1 -1
  19. package/dist/components/avatarbutton/avatarbutton.component.d.ts +2 -2
  20. package/dist/components/avatarbutton/avatarbutton.component.js +2 -2
  21. package/dist/components/avatarbutton/avatarbutton.styles.js +34 -30
  22. package/dist/components/badge/badge.styles.js +9 -7
  23. package/dist/components/brandvisual/brandvisual.component.js +4 -4
  24. package/dist/components/bullet/bullet.component.d.ts +1 -1
  25. package/dist/components/bullet/bullet.component.js +2 -2
  26. package/dist/components/bullet/bullet.styles.js +3 -3
  27. package/dist/components/button/button.component.js +10 -4
  28. package/dist/components/button/button.utils.js +1 -1
  29. package/dist/components/buttongroup/buttongroup.component.js +1 -1
  30. package/dist/components/buttongroup/buttongroup.styles.js +68 -68
  31. package/dist/components/buttonlink/buttonlink.component.d.ts +5 -5
  32. package/dist/components/buttonlink/buttonlink.component.js +9 -9
  33. package/dist/components/buttonsimple/buttonsimple.component.js +2 -2
  34. package/dist/components/buttonsimple/buttonsimple.constants.d.ts +1 -1
  35. package/dist/components/buttonsimple/buttonsimple.constants.js +1 -1
  36. package/dist/components/buttonsimple/buttonsimple.styles.js +62 -57
  37. package/dist/components/card/card.component.d.ts +6 -6
  38. package/dist/components/card/card.component.js +15 -16
  39. package/dist/components/card/card.styles.js +24 -22
  40. package/dist/components/cardbutton/cardbutton.component.js +9 -12
  41. package/dist/components/cardbutton/cardbutton.styles.js +1 -1
  42. package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +6 -6
  43. package/dist/components/cardcheckbox/cardcheckbox.component.js +30 -29
  44. package/dist/components/cardcheckbox/cardcheckbox.styles.js +10 -10
  45. package/dist/components/cardradio/cardradio.component.d.ts +12 -12
  46. package/dist/components/cardradio/cardradio.component.js +27 -30
  47. package/dist/components/cardradio/cardradio.styles.js +8 -8
  48. package/dist/components/checkbox/checkbox.component.js +7 -9
  49. package/dist/components/checkbox/checkbox.styles.js +62 -60
  50. package/dist/components/chip/chip.component.d.ts +1 -1
  51. package/dist/components/chip/chip.component.js +6 -11
  52. package/dist/components/chip/chip.styles.js +4 -2
  53. package/dist/components/dialog/dialog.component.js +28 -29
  54. package/dist/components/dialog/dialog.styles.js +10 -12
  55. package/dist/components/divider/divider.component.js +6 -8
  56. package/dist/components/divider/divider.constants.d.ts +1 -1
  57. package/dist/components/divider/divider.constants.js +1 -1
  58. package/dist/components/divider/divider.styles.js +5 -20
  59. package/dist/components/filterchip/filterchip.styles.js +4 -2
  60. package/dist/components/formfieldgroup/formfieldgroup.component.js +1 -4
  61. package/dist/components/formfieldgroup/formfieldgroup.styles.js +1 -2
  62. package/dist/components/formfieldwrapper/formfieldwrapper.component.js +19 -17
  63. package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +2 -1
  64. package/dist/components/formfieldwrapper/formfieldwrapper.subcomponent.js +4 -4
  65. package/dist/components/icon/icon.component.js +7 -7
  66. package/dist/components/icon/icon.utils.d.ts +1 -1
  67. package/dist/components/icon/icon.utils.js +7 -7
  68. package/dist/components/iconprovider/iconprovider.component.js +7 -7
  69. package/dist/components/input/input.component.d.ts +5 -5
  70. package/dist/components/input/input.component.js +64 -62
  71. package/dist/components/input/input.styles.js +128 -117
  72. package/dist/components/inputchip/inputchip.component.js +14 -19
  73. package/dist/components/inputchip/inputchip.styles.js +5 -3
  74. package/dist/components/link/link.component.d.ts +1 -1
  75. package/dist/components/link/link.component.js +4 -8
  76. package/dist/components/link/link.constants.d.ts +1 -1
  77. package/dist/components/link/link.constants.js +1 -1
  78. package/dist/components/link/link.styles.js +12 -12
  79. package/dist/components/linksimple/linksimple.component.js +2 -4
  80. package/dist/components/linksimple/linksimple.styles.js +59 -57
  81. package/dist/components/list/list.component.js +12 -9
  82. package/dist/components/listitem/listitem.component.js +15 -11
  83. package/dist/components/listitem/listitem.styles.js +11 -6
  84. package/dist/components/marker/marker.component.js +1 -1
  85. package/dist/components/marker/marker.styles.js +2 -2
  86. package/dist/components/menubar/menubar.component.d.ts +19 -19
  87. package/dist/components/menubar/menubar.component.js +19 -19
  88. package/dist/components/menuitem/menuitem.component.js +15 -15
  89. package/dist/components/menuitem/menuitem.styles.js +3 -2
  90. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +1 -1
  91. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +4 -11
  92. package/dist/components/menuitemradio/menuitemradio.component.js +1 -1
  93. package/dist/components/menupopover/menupopover.component.js +11 -11
  94. package/dist/components/menupopover/menupopover.utils.d.ts +1 -1
  95. package/dist/components/menupopover/menupopover.utils.js +3 -8
  96. package/dist/components/navitem/navitem.component.js +11 -19
  97. package/dist/components/navitem/navitem.styles.js +147 -143
  98. package/dist/components/navitemlist/navitemlist.component.js +2 -2
  99. package/dist/components/optgroup/optgroup.component.js +12 -9
  100. package/dist/components/option/option.component.js +11 -11
  101. package/dist/components/option/option.styles.js +1 -1
  102. package/dist/components/popover/popover.component.js +4 -4
  103. package/dist/components/popover/popover.stack.js +1 -1
  104. package/dist/components/popover/popover.styles.js +0 -1
  105. package/dist/components/popover/popover.utils.js +3 -4
  106. package/dist/components/presence/presence.component.d.ts +4 -4
  107. package/dist/components/presence/presence.component.js +4 -4
  108. package/dist/components/progressbar/progressbar.component.js +3 -4
  109. package/dist/components/progressbar/progressbar.styles.js +77 -71
  110. package/dist/components/progressspinner/progressspiner.utils.js +4 -4
  111. package/dist/components/progressspinner/progressspinner.component.js +38 -37
  112. package/dist/components/progressspinner/progressspinner.styles.js +1 -1
  113. package/dist/components/radio/radio.component.d.ts +41 -41
  114. package/dist/components/radio/radio.component.js +84 -83
  115. package/dist/components/radio/radio.styles.js +77 -75
  116. package/dist/components/radiogroup/radiogroup.component.js +1 -1
  117. package/dist/components/screenreaderannouncer/screenreaderannouncer.component.js +2 -2
  118. package/dist/components/screenreaderannouncer/screenreaderannouncer.styles.js +8 -6
  119. package/dist/components/searchfield/searchfield.component.js +23 -17
  120. package/dist/components/searchfield/searchfield.styles.js +11 -13
  121. package/dist/components/select/select.component.js +20 -23
  122. package/dist/components/select/select.styles.js +9 -9
  123. package/dist/components/sidenavigation/sidenavigation.component.d.ts +6 -6
  124. package/dist/components/sidenavigation/sidenavigation.component.js +39 -29
  125. package/dist/components/sidenavigation/sidenavigation.context.js +5 -5
  126. package/dist/components/sidenavigation/sidenavigation.styles.js +53 -53
  127. package/dist/components/skeleton/skeleton.component.js +1 -4
  128. package/dist/components/skeleton/skeleton.constants.d.ts +1 -1
  129. package/dist/components/skeleton/skeleton.constants.js +1 -1
  130. package/dist/components/skeleton/skeleton.styles.js +4 -4
  131. package/dist/components/spinner/spinner.component.d.ts +7 -7
  132. package/dist/components/spinner/spinner.component.js +9 -9
  133. package/dist/components/spinner/spinner.styles.js +58 -53
  134. package/dist/components/staticcheckbox/staticcheckbox.component.js +10 -8
  135. package/dist/components/staticcheckbox/staticcheckbox.styles.js +52 -51
  136. package/dist/components/staticradio/staticradio.component.d.ts +8 -8
  137. package/dist/components/staticradio/staticradio.component.js +10 -11
  138. package/dist/components/staticradio/staticradio.styles.js +77 -75
  139. package/dist/components/statictoggle/statictoggle.component.d.ts +3 -3
  140. package/dist/components/statictoggle/statictoggle.component.js +3 -3
  141. package/dist/components/statictoggle/statictoggle.styles.js +71 -68
  142. package/dist/components/tab/tab.component.d.ts +1 -1
  143. package/dist/components/tab/tab.component.js +2 -2
  144. package/dist/components/tab/tab.styles.js +247 -245
  145. package/dist/components/tablist/tablist.component.js +11 -15
  146. package/dist/components/tablist/tablist.styles.js +27 -25
  147. package/dist/components/tablist/tablist.types.d.ts +1 -1
  148. package/dist/components/tablist/tablist.utils.js +4 -4
  149. package/dist/components/text/fonts.styles.js +49 -49
  150. package/dist/components/text/text.component.js +21 -11
  151. package/dist/components/text/text.types.d.ts +1 -1
  152. package/dist/components/textarea/textarea.component.d.ts +31 -31
  153. package/dist/components/textarea/textarea.component.js +54 -61
  154. package/dist/components/textarea/textarea.styles.js +123 -122
  155. package/dist/components/themeprovider/themeprovider.component.js +1 -1
  156. package/dist/components/themeprovider/themeprovider.styles.js +4 -4
  157. package/dist/components/toggle/toggle.component.d.ts +35 -35
  158. package/dist/components/toggle/toggle.component.js +62 -63
  159. package/dist/components/toggle/toggle.styles.js +77 -69
  160. package/dist/components/toggletip/toggletip.component.d.ts +7 -7
  161. package/dist/components/toggletip/toggletip.component.js +3 -2
  162. package/dist/components/tooltip/tooltip.component.js +1 -1
  163. package/dist/components/tooltip/tooltip.styles.js +0 -1
  164. package/dist/components/virtualizedlist/virtualizedlist.component.js +6 -14
  165. package/dist/components/virtualizedlist/virtualizedlist.helper.test.d.ts +1 -1
  166. package/dist/components/virtualizedlist/virtualizedlist.helper.test.js +14 -11
  167. package/dist/components/virtualizedlist/virtualizedlist.styles.js +4 -4
  168. package/dist/custom-elements.json +514 -514
  169. package/dist/index.js +1 -0
  170. package/dist/models/component/index.d.ts +1 -1
  171. package/dist/models/index.d.ts +2 -2
  172. package/dist/models/index.js +1 -1
  173. package/dist/react/index.d.ts +4 -4
  174. package/dist/react/index.js +4 -4
  175. package/dist/utils/mixins/ButtonComponentMixin.js +10 -10
  176. package/dist/utils/mixins/CardAndDialogFooterMixin.js +21 -22
  177. package/dist/utils/mixins/FocusTrapMixin.js +12 -12
  178. package/dist/utils/mixins/IconNameMixin.d.ts +1 -1
  179. package/dist/utils/mixins/MenuMixin.js +23 -23
  180. package/dist/utils/mixins/PreventScrollMixin.d.ts +1 -1
  181. package/dist/utils/styles/index.js +12 -12
  182. package/package.json +1 -1
@@ -1,71 +1,73 @@
1
1
  import { css } from 'lit';
2
2
  import { hostFocusRingStyles } from '../../utils/styles';
3
- const styles = [css `
4
- :host {
5
- --mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
6
- --mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);
7
- --mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);
8
- --mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);
9
- --mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
10
-
11
- flex-direction: row;
12
- align-items: flex-start;
13
- }
14
- .mdc-label, .input {
15
- cursor: pointer;
16
- }
3
+ const styles = [
4
+ css `
5
+ :host {
6
+ --mdc-checkbox-background-color-hover: var(--mds-color-theme-control-inactive-hover);
7
+ --mdc-checkbox-pressed-icon-color: var(--mds-color-theme-control-inactive-pressed);
8
+ --mdc-checkbox-checked-pressed-icon-color: var(--mds-color-theme-control-active-pressed);
9
+ --mdc-checkbox-checked-background-color-hover: var(--mds-color-theme-control-active-hover);
10
+ --mdc-checkbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
17
11
 
18
- :host([disabled]) .mdc-label,
19
- :host([disabled]) .input {
20
- cursor: default;
21
- }
12
+ flex-direction: row;
13
+ align-items: flex-start;
14
+ }
15
+ .mdc-label,
16
+ .input {
17
+ cursor: pointer;
18
+ }
22
19
 
23
- :host(:hover) mdc-staticcheckbox{
24
- background: var(--mdc-checkbox-background-color-hover);
25
- }
26
- :host(:active) mdc-staticcheckbox{
27
- background: var(--mdc-checkbox-pressed-icon-color);
28
- }
20
+ :host([disabled]) .mdc-label,
21
+ :host([disabled]) .input {
22
+ cursor: default;
23
+ }
29
24
 
30
- :host([checked]:hover)::part(icon-container),
31
- :host([indeterminate]:hover)::part(icon-container) {
32
- background: var(--mdc-checkbox-checked-background-color-hover);
33
- }
34
- :host([checked]:active)::part(icon-container),
35
- :host([indeterminate]:active)::part(icon-container) {
36
- background: var(--mdc-checkbox-checked-pressed-icon-color);
37
- }
25
+ :host(:hover) mdc-staticcheckbox {
26
+ background: var(--mdc-checkbox-background-color-hover);
27
+ }
28
+ :host(:active) mdc-staticcheckbox {
29
+ background: var(--mdc-checkbox-pressed-icon-color);
30
+ }
38
31
 
39
- :host([disabled]) mdc-staticcheckbox {
40
- background: unset;
41
- }
32
+ :host([checked]:hover)::part(icon-container),
33
+ :host([indeterminate]:hover)::part(icon-container) {
34
+ background: var(--mdc-checkbox-checked-background-color-hover);
35
+ }
36
+ :host([checked]:active)::part(icon-container),
37
+ :host([indeterminate]:active)::part(icon-container) {
38
+ background: var(--mdc-checkbox-checked-pressed-icon-color);
39
+ }
42
40
 
43
- :host([disabled][checked])::part(icon-container),
44
- :host([disabled][indeterminate])::part(icon-container) {
45
- background-color: var(--mdc-checkbox-disabled-checked-icon-color);
46
- }
41
+ :host([disabled]) mdc-staticcheckbox {
42
+ background: unset;
43
+ }
47
44
 
48
- .input {
49
- margin: 0;
50
- padding: 0;
51
- position: absolute;
52
- opacity: 0.1%;
53
- overflow: visible;
54
- z-index: 1;
55
- }
45
+ :host([disabled][checked])::part(icon-container),
46
+ :host([disabled][indeterminate])::part(icon-container) {
47
+ background-color: var(--mdc-checkbox-disabled-checked-icon-color);
48
+ }
56
49
 
57
- .input {
58
- width: 1rem;
59
- height: 1rem;
60
- border-radius: 0.125rem;
61
- }
62
-
63
- .text-container {
64
- display: flex;
65
- flex-direction: column;
66
- gap: 0.25rem;
67
- }
68
-
50
+ .input {
51
+ margin: 0;
52
+ padding: 0;
53
+ position: absolute;
54
+ opacity: 0.1%;
55
+ overflow: visible;
56
+ z-index: 1;
57
+ }
69
58
 
70
- `, ...hostFocusRingStyles(true)];
59
+ .input {
60
+ width: 1rem;
61
+ height: 1rem;
62
+ border-radius: 0.125rem;
63
+ }
64
+
65
+ .text-container {
66
+ display: flex;
67
+ flex-direction: column;
68
+ gap: 0.25rem;
69
+ }
70
+ `,
71
+ ...hostFocusRingStyles(true),
72
+ ];
71
73
  export default styles;
@@ -1,6 +1,6 @@
1
1
  import { CSSResult } from 'lit';
2
- import type { ColorType } from './chip.types';
3
2
  import Buttonsimple from '../buttonsimple/buttonsimple.component';
3
+ import type { ColorType } from './chip.types';
4
4
  declare const Chip_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/IconNameMixin").IconNameMixinInterface> & typeof Buttonsimple;
5
5
  /**
6
6
  * mdc-chip is an interactive element that can be used to represent a chip. It supports a leading icon along with label.
@@ -9,11 +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 styles from './chip.styles';
13
12
  import { IconNameMixin } from '../../utils/mixins/IconNameMixin';
14
13
  import { Component } from '../../models';
15
- import { DEFAULTS } from './chip.constants';
16
14
  import Buttonsimple from '../buttonsimple/buttonsimple.component';
15
+ import { DEFAULTS } from './chip.constants';
16
+ import styles from './chip.styles';
17
17
  /**
18
18
  * mdc-chip is an interactive element that can be used to represent a chip. It supports a leading icon along with label.
19
19
  * Consumers can wrap this component around a tooltip to provide additional context.
@@ -75,18 +75,13 @@ class Chip extends IconNameMixin(Buttonsimple) {
75
75
  renderIcon() {
76
76
  if (!this.iconName)
77
77
  return nothing;
78
- return html `
79
- <mdc-icon
80
- name="${this.iconName}"
81
- length-unit="rem"
82
- size="1"></mdc-icon>
83
- `;
78
+ return html ` <mdc-icon name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
84
79
  }
85
80
  render() {
86
81
  return html `
87
- ${this.renderIcon()}
88
- <mdc-text type="${DEFAULTS.TEXT_TYPE}" tagname="${DEFAULTS.TAG_NAME}">${this.label}</mdc-text>
89
- `;
82
+ ${this.renderIcon()}
83
+ <mdc-text type="${DEFAULTS.TEXT_TYPE}" tagname="${DEFAULTS.TAG_NAME}">${this.label}</mdc-text>
84
+ `;
90
85
  }
91
86
  }
92
87
  Chip.styles = [...Component.styles, ...styles];
@@ -9,7 +9,7 @@ const styles = css `
9
9
  border: 1px solid;
10
10
  cursor: pointer;
11
11
  white-space: nowrap;
12
-
12
+
13
13
  --mdc-chip-color: var(--mds-color-theme-text-primary-normal);
14
14
  --mdc-chip-border-color: var(--mds-color-theme-outline-button-normal);
15
15
  --mdc-chip-background-color: var(--mds-color-theme-background-label-default-normal);
@@ -144,7 +144,9 @@ const styles = css `
144
144
  --mdc-chip-background-color: var(--mds-color-theme-background-label-violet-active);
145
145
  }
146
146
 
147
- :host([disabled]), :host([disabled]:hover), :host([disabled]:active) {
147
+ :host([disabled]),
148
+ :host([disabled]:hover),
149
+ :host([disabled]:active) {
148
150
  --mdc-chip-border-color: var(--mds-color-theme-outline-primary-disabled);
149
151
  --mdc-chip-background-color: var(--mds-color-theme-background-primary-disabled);
150
152
  --mdc-chip-color: var(--mds-color-theme-text-primary-disabled);
@@ -10,15 +10,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  import { html, nothing } from 'lit';
11
11
  import { ifDefined } from 'lit/directives/if-defined.js';
12
12
  import { property } from 'lit/decorators.js';
13
- import styles from './dialog.styles';
14
13
  import { Component } from '../../models';
15
14
  import { FocusTrapMixin } from '../../utils/mixins/FocusTrapMixin';
16
15
  import { PreventScrollMixin } from '../../utils/mixins/PreventScrollMixin';
17
- import { DEFAULTS } from './dialog.constants';
18
16
  import { TYPE, VALID_TEXT_TAGS } from '../text/text.constants';
19
- import { DialogEventManager } from './dialog.events';
20
17
  import { BUTTON_VARIANTS, ICON_BUTTON_SIZES } from '../button/button.constants';
21
18
  import { CardAndDialogFooterMixin } from '../../utils/mixins/CardAndDialogFooterMixin';
19
+ import { DEFAULTS } from './dialog.constants';
20
+ import { DialogEventManager } from './dialog.events';
21
+ import styles from './dialog.styles';
22
22
  /**
23
23
  * Dialog component is a modal dialog that can be used to display information or prompt the user for input.
24
24
  * It can be used to create custom dialogs where content for the body and footer actions is provided by the consumer.
@@ -221,12 +221,12 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
221
221
  if (changedProperties.has('variant')) {
222
222
  this.updateFooterButtonColors(this.variant);
223
223
  }
224
- if (changedProperties.has('ariaLabel')
225
- || changedProperties.has('ariaLabelledBy')
226
- || changedProperties.has('ariaDescribedBy')
227
- || changedProperties.has('ariaDescription')
228
- || changedProperties.has('headerText')
229
- || changedProperties.has('descriptionText')) {
224
+ if (changedProperties.has('ariaLabel') ||
225
+ changedProperties.has('ariaLabelledBy') ||
226
+ changedProperties.has('ariaDescribedBy') ||
227
+ changedProperties.has('ariaDescription') ||
228
+ changedProperties.has('headerText') ||
229
+ changedProperties.has('descriptionText')) {
230
230
  this.setupAriaLabelledDescribedBy();
231
231
  }
232
232
  if (changedProperties.has('focusTrap')) {
@@ -364,28 +364,27 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
364
364
  render() {
365
365
  return html `
366
366
  ${this.headerText
367
- ? html `
368
- <div part="header-section">
369
- <div part="header">
370
- <slot name="header-prefix"></slot>
371
- <mdc-text
372
- part="header-text"
373
- tagname="${VALID_TEXT_TAGS[this.headerTagName.toUpperCase()]}"
374
- type="${TYPE.BODY_LARGE_BOLD}"
375
- >
376
- ${this.headerText}
377
- </mdc-text>
378
- </div>
379
- ${this.descriptionText
367
+ ? html ` <div part="header-section">
368
+ <div part="header">
369
+ <slot name="header-prefix"></slot>
370
+ <mdc-text
371
+ part="header-text"
372
+ tagname="${VALID_TEXT_TAGS[this.headerTagName.toUpperCase()]}"
373
+ type="${TYPE.BODY_LARGE_BOLD}"
374
+ >
375
+ ${this.headerText}
376
+ </mdc-text>
377
+ </div>
378
+ ${this.descriptionText
380
379
  ? html `<mdc-text
381
- part="description-text"
382
- tagname="${VALID_TEXT_TAGS[this.descriptionTagName.toUpperCase()]}"
383
- type="${TYPE.BODY_MIDSIZE_REGULAR}"
384
- >
385
- ${this.descriptionText}
386
- </mdc-text>`
380
+ part="description-text"
381
+ tagname="${VALID_TEXT_TAGS[this.descriptionTagName.toUpperCase()]}"
382
+ type="${TYPE.BODY_MIDSIZE_REGULAR}"
383
+ >
384
+ ${this.descriptionText}
385
+ </mdc-text>`
387
386
  : nothing}
388
- </div>`
387
+ </div>`
389
388
  : nothing}
390
389
  <mdc-button
391
390
  part="dialog-close-btn"
@@ -7,7 +7,7 @@ const styles = css `
7
7
  --mdc-dialog-description-text-color: var(--mds-color-theme-text-secondary-normal);
8
8
  --mdc-dialog-elevation-3: var(--mds-elevation-3);
9
9
  --mdc-dialog-width: 27rem; /* Default to small */
10
-
10
+
11
11
  background-color: var(--mdc-dialog-primary-background-color);
12
12
  border: 0.0625rem solid var(--mdc-dialog-border-color);
13
13
  border-radius: 0.5rem;
@@ -21,17 +21,15 @@ const styles = css `
21
21
  position: absolute;
22
22
  right: 50%;
23
23
  bottom: 50%;
24
- transform: translate(50%,50%);
24
+ transform: translate(50%, 50%);
25
25
  }
26
26
 
27
-
28
- :host([variant='promotional']){
27
+ :host([variant='promotional']) {
29
28
  --mdc-dialog-border-color: var(--mds-color-theme-outline-promotion-normal);
30
29
  }
31
-
30
+
32
31
  :host([visible]) {
33
32
  display: flex;
34
-
35
33
  }
36
34
 
37
35
  :host([size='medium']) {
@@ -46,7 +44,7 @@ const styles = css `
46
44
  width: var(--mdc-dialog-width);
47
45
  max-width: 100%;
48
46
  }
49
-
47
+
50
48
  :host::part(header-section),
51
49
  :host::part(body),
52
50
  :host::part(footer) {
@@ -64,18 +62,18 @@ const styles = css `
64
62
  display: flex;
65
63
  align-items: center;
66
64
  gap: 0.25rem;
67
- width: 100%
65
+ width: 100%;
68
66
  }
69
67
 
70
68
  :host::part(header-text) {
71
69
  width: calc(100% - 2rem);
72
70
  color: var(--mdc-dialog-header-text-color);
73
71
  }
74
-
72
+
75
73
  :host::part(description-text) {
76
74
  color: var(--mdc-dialog-description-text-color);
77
75
  }
78
-
76
+
79
77
  :host::part(body) {
80
78
  flex-direction: column;
81
79
  justify-content: center;
@@ -97,12 +95,12 @@ const styles = css `
97
95
  right: 1rem;
98
96
  cursor: pointer;
99
97
  }
100
-
98
+
101
99
  :host(:dir(rtl))::part(dialog-close-btn) {
102
100
  right: auto;
103
101
  left: 1rem;
104
102
  }
105
-
103
+
106
104
  mdc-text::part(text) {
107
105
  margin: 0;
108
106
  }
@@ -126,9 +126,7 @@ class Divider extends Component {
126
126
  * @param arrowDirection - The arrowDirection to set.
127
127
  */
128
128
  ensureValidDirections() {
129
- const defaultDirection = this.orientation === DIVIDER_ORIENTATION.HORIZONTAL
130
- ? DIRECTIONS.NEGATIVE
131
- : DIRECTIONS.POSITIVE;
129
+ const defaultDirection = this.orientation === DIVIDER_ORIENTATION.HORIZONTAL ? DIRECTIONS.NEGATIVE : DIRECTIONS.POSITIVE;
132
130
  if (!Object.values(DIRECTIONS).includes(this.buttonPosition)) {
133
131
  this.buttonPosition = defaultDirection;
134
132
  }
@@ -174,9 +172,9 @@ class Divider extends Component {
174
172
  if (changedProperties.has('variant')) {
175
173
  this.setVariant(this.variant);
176
174
  }
177
- if (changedProperties.has('orientation')
178
- || changedProperties.has('arrowDirection')
179
- || changedProperties.has('buttonPosition')) {
175
+ if (changedProperties.has('orientation') ||
176
+ changedProperties.has('arrowDirection') ||
177
+ changedProperties.has('buttonPosition')) {
180
178
  this.setGrabberButton();
181
179
  }
182
180
  }
@@ -190,8 +188,8 @@ class Divider extends Component {
190
188
  const assignedElements = (slot === null || slot === void 0 ? void 0 : slot.assignedElements({ flatten: true })) || [];
191
189
  if (assignedElements.length > 1)
192
190
  return;
193
- const hasTextChild = assignedElements.some((el) => el.tagName === TEXT_TAG.toUpperCase());
194
- const hasButtonChild = assignedElements.some((el) => el.tagName === BUTTON_TAG.toUpperCase());
191
+ const hasTextChild = assignedElements.some(el => el.tagName === TEXT_TAG.toUpperCase());
192
+ const hasButtonChild = assignedElements.some(el => el.tagName === BUTTON_TAG.toUpperCase());
195
193
  if (hasTextChild && !hasButtonChild) {
196
194
  this.setAttribute('data-type', 'mdc-text-divider');
197
195
  }
@@ -29,4 +29,4 @@ declare const DEFAULTS: {
29
29
  readonly ARROW_DIRECTION: "negative";
30
30
  readonly BUTTON_DIRECTION: "negative";
31
31
  };
32
- export { TAG_NAME, DEFAULTS, DIVIDER_VARIANT, DIVIDER_ORIENTATION, DIRECTIONS, BUTTON_TAG, TEXT_TAG, ARROW_ICONS, };
32
+ export { TAG_NAME, DEFAULTS, DIVIDER_VARIANT, DIVIDER_ORIENTATION, DIRECTIONS, BUTTON_TAG, TEXT_TAG, ARROW_ICONS };
@@ -30,4 +30,4 @@ const DEFAULTS = {
30
30
  ARROW_DIRECTION: DIRECTIONS.NEGATIVE,
31
31
  BUTTON_DIRECTION: DIRECTIONS.NEGATIVE,
32
32
  };
33
- export { TAG_NAME, DEFAULTS, DIVIDER_VARIANT, DIVIDER_ORIENTATION, DIRECTIONS, BUTTON_TAG, TEXT_TAG, ARROW_ICONS, };
33
+ export { TAG_NAME, DEFAULTS, DIVIDER_VARIANT, DIVIDER_ORIENTATION, DIRECTIONS, BUTTON_TAG, TEXT_TAG, ARROW_ICONS };
@@ -110,19 +110,13 @@ const styles = [
110
110
  :host([orientation='vertical']) ::slotted(mdc-button) {
111
111
  width: 1.25rem;
112
112
  height: 2.5rem;
113
- border-radius: 0
114
- var(--mdc-divider-grabber-button-border-radius)
115
- var(--mdc-divider-grabber-button-border-radius)
116
- 0;
113
+ border-radius: 0 var(--mdc-divider-grabber-button-border-radius) var(--mdc-divider-grabber-button-border-radius) 0;
117
114
  }
118
115
 
119
116
  :host([orientation='horizontal']) ::slotted(mdc-button) {
120
117
  height: 1.25rem;
121
118
  width: 2.5rem;
122
- border-radius: 0
123
- 0
124
- var(--mdc-divider-grabber-button-border-radius)
125
- var(--mdc-divider-grabber-button-border-radius);
119
+ border-radius: 0 0 var(--mdc-divider-grabber-button-border-radius) var(--mdc-divider-grabber-button-border-radius);
126
120
  }
127
121
 
128
122
  :host([orientation='horizontal'][button-position='positive']),
@@ -136,10 +130,7 @@ const styles = [
136
130
  }
137
131
 
138
132
  :host([orientation='horizontal'][button-position='positive']) ::slotted(mdc-button) {
139
- border-radius: var(--mdc-divider-grabber-button-border-radius)
140
- var(--mdc-divider-grabber-button-border-radius)
141
- 0
142
- 0;
133
+ border-radius: var(--mdc-divider-grabber-button-border-radius) var(--mdc-divider-grabber-button-border-radius) 0 0;
143
134
  margin: 0;
144
135
  margin-bottom: var(--mdc-divider-width);
145
136
  border-bottom: 0;
@@ -153,10 +144,7 @@ const styles = [
153
144
 
154
145
  :host([orientation='vertical'][button-position='negative']:dir(ltr)) ::slotted(mdc-button),
155
146
  :host([orientation='vertical'][button-position='negative']:dir(rtl)) ::slotted(mdc-button) {
156
- border-radius: var(--mdc-divider-grabber-button-border-radius)
157
- 0
158
- 0
159
- var(--mdc-divider-grabber-button-border-radius);
147
+ border-radius: var(--mdc-divider-grabber-button-border-radius) 0 0 var(--mdc-divider-grabber-button-border-radius);
160
148
  margin: 0;
161
149
  margin-right: var(--mdc-divider-width);
162
150
  border-right: 0;
@@ -170,10 +158,7 @@ const styles = [
170
158
  }
171
159
 
172
160
  :host([orientation='vertical'][button-position='positive']:dir(rtl)) ::slotted(mdc-button) {
173
- border-radius: 0
174
- var(--mdc-divider-grabber-button-border-radius)
175
- var(--mdc-divider-grabber-button-border-radius)
176
- 0;
161
+ border-radius: 0 var(--mdc-divider-grabber-button-border-radius) var(--mdc-divider-grabber-button-border-radius) 0;
177
162
  transform: rotate(180deg);
178
163
  margin: 0;
179
164
  margin-right: var(--mdc-divider-width);
@@ -1,6 +1,6 @@
1
1
  import { css } from 'lit';
2
2
  const styles = css `
3
- :host([selected]){
3
+ :host([selected]) {
4
4
  border: 2px solid;
5
5
  --mdc-chip-background-color: var(--mds-color-theme-background-label-default-active);
6
6
  }
@@ -13,7 +13,9 @@ const styles = css `
13
13
  --mdc-chip-background-color: var(--mds-color-theme-background-label-default-active);
14
14
  }
15
15
 
16
- :host([disabled]), :host([disabled]:hover), :host([disabled]:active) {
16
+ :host([disabled]),
17
+ :host([disabled]:hover),
18
+ :host([disabled]:active) {
17
19
  --mdc-chip-border-color: var(--mds-color-theme-outline-primary-disabled);
18
20
  --mdc-chip-background-color: var(--mds-color-theme-background-primary-disabled);
19
21
  --mdc-chip-color: var(--mds-color-theme-text-primary-disabled);
@@ -56,10 +56,7 @@ class FormfieldGroup extends DataAriaLabelMixin(FormfieldWrapper) {
56
56
  aria-describedby="${ifDefined(this.helpText ? FORMFIELD_DEFAULTS.HELPER_TEXT_ID : '')}"
57
57
  aria-label="${(_a = this.dataAriaLabel) !== null && _a !== void 0 ? _a : ''}"
58
58
  >
59
- <div part="group-header">
60
- ${this.renderLabel()}
61
- ${this.renderHelperText()}
62
- </div>
59
+ <div part="group-header">${this.renderLabel()} ${this.renderHelperText()}</div>
63
60
  <slot></slot>
64
61
  </div>
65
62
  `;
@@ -1,6 +1,5 @@
1
1
  import { css } from 'lit';
2
2
  const styles = css `
3
-
4
3
  :host::part(container) {
5
4
  display: flex;
6
5
  flex-direction: column;
@@ -13,7 +12,7 @@ const styles = css `
13
12
  gap: 0.25rem;
14
13
  }
15
14
 
16
- :host::part(label-text){
15
+ :host::part(label-text) {
17
16
  font-weight: bold;
18
17
  }
19
18
  `;
@@ -12,8 +12,8 @@ import { property } from 'lit/decorators.js';
12
12
  import { ifDefined } from 'lit/directives/if-defined.js';
13
13
  import { Component } from '../../models';
14
14
  import { DisabledMixin } from '../../utils/mixins/DisabledMixin';
15
- import { DEFAULTS, MDC_TEXT_OPTIONS } from './formfieldwrapper.constants';
16
15
  import { BUTTON_VARIANTS } from '../button/button.constants';
16
+ import { DEFAULTS, MDC_TEXT_OPTIONS } from './formfieldwrapper.constants';
17
17
  import styles from './formfieldwrapper.styles';
18
18
  import { getHelperIcon } from './formfieldwrapper.utils';
19
19
  /**
@@ -120,22 +120,24 @@ class FormfieldWrapper extends DisabledMixin(Component) {
120
120
  return html `<div class="mdc-label-text" part="label-text">
121
121
  <slot name="label">${this.renderLabelElement()}</slot>
122
122
  ${this.required ? html `<span part="required-indicator">*</span>` : nothing}
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}
123
+ ${this.toggletipText
124
+ ? html ` <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"
131
+ ></mdc-button>
132
+ <mdc-toggletip
133
+ part="label-toggletip"
134
+ triggerid="info-icon-id"
135
+ id="label-toggletip-id"
136
+ placement="${this.toggletipPlacement}"
137
+ show-arrow
138
+ >${this.toggletipText}</mdc-toggletip
139
+ >`
140
+ : nothing}
139
141
  </div>`;
140
142
  }
141
143
  /**
@@ -30,7 +30,8 @@ const styles = [
30
30
  width: 100%;
31
31
  }
32
32
 
33
- .mdc-label, .mdc-help-text{
33
+ .mdc-label,
34
+ .mdc-help-text {
34
35
  font-size: var(--mds-font-apps-body-midsize-regular-font-size);
35
36
  font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
36
37
  line-height: var(--mds-font-apps-body-midsize-regular-line-height);
@@ -6,10 +6,10 @@ import FormfieldWrapper from './formfieldwrapper.component';
6
6
  class SubComponentFormFieldWrapper extends FormfieldWrapper {
7
7
  render() {
8
8
  return html `
9
- ${this.renderLabel()}
10
- <slot></slot>
11
- ${this.renderHelperText()}
12
- `;
9
+ ${this.renderLabel()}
10
+ <slot></slot>
11
+ ${this.renderHelperText()}
12
+ `;
13
13
  }
14
14
  }
15
15
  SubComponentFormFieldWrapper.register('mdc-subcomponent-formfieldwrapper');
@@ -9,10 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { html } from 'lit';
11
11
  import { property, state } from 'lit/decorators.js';
12
- import styles from './icon.styles';
13
12
  import { Component } from '../../models';
14
13
  import providerUtils from '../../utils/provider';
15
14
  import IconProvider from '../iconprovider/iconprovider.component';
15
+ import styles from './icon.styles';
16
16
  import { svgFetch } from './icon.utils';
17
17
  import { DEFAULTS } from './icon.constants';
18
18
  /**
@@ -124,22 +124,22 @@ class Icon extends Component {
124
124
  cacheStrategy,
125
125
  renewSignal,
126
126
  })
127
- .then((iconData) => {
127
+ .then(iconData => {
128
128
  // parse the fetched icon string to an html element and set the attributes
129
129
  const iconElement = this.prepareIconElement(iconData);
130
130
  this.handleIconLoadedSuccess(iconElement);
131
131
  })
132
- .catch((error) => {
132
+ .catch(error => {
133
133
  this.handleIconLoadedFailure(error);
134
134
  });
135
135
  }
136
136
  if (iconSet === 'momentum-icons' && this.name) {
137
137
  // dynamic import of the lit template from the momentum icons package
138
138
  return import(`@momentum-design/icons/dist/ts/${this.name}.ts`)
139
- .then((module) => {
139
+ .then(module => {
140
140
  this.handleIconLoadedSuccess(module.default());
141
141
  })
142
- .catch((error) => {
142
+ .catch(error => {
143
143
  this.handleIconLoadedFailure(error);
144
144
  });
145
145
  }
@@ -196,14 +196,14 @@ class Icon extends Component {
196
196
  super.updated(changedProperties);
197
197
  if (changedProperties.has('name')) {
198
198
  // fetch icon data if name changes:
199
- this.getIconData().catch((err) => {
199
+ this.getIconData().catch(err => {
200
200
  if (err.name !== 'AbortError' && this.onerror) {
201
201
  this.onerror(err);
202
202
  }
203
203
  });
204
204
  }
205
205
  if (changedProperties.has('ariaLabel') || changedProperties.has('ariaLabelledBy')) {
206
- this.role = (this.ariaLabel || this.ariaLabelledBy) ? 'img' : null;
206
+ this.role = this.ariaLabel || this.ariaLabelledBy ? 'img' : null;
207
207
  }
208
208
  if (changedProperties.has('size') || changedProperties.has('lengthUnit')) {
209
209
  this.updateSize();