@momentum-design/components 0.84.3 → 0.84.5

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 (185) hide show
  1. package/README.md +8 -3
  2. package/dist/browser/index.js +2241 -2299
  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.d.ts +7 -2
  54. package/dist/components/dialog/dialog.component.js +43 -33
  55. package/dist/components/dialog/dialog.constants.d.ts +1 -0
  56. package/dist/components/dialog/dialog.constants.js +1 -0
  57. package/dist/components/dialog/dialog.styles.js +10 -12
  58. package/dist/components/divider/divider.component.js +6 -8
  59. package/dist/components/divider/divider.constants.d.ts +1 -1
  60. package/dist/components/divider/divider.constants.js +1 -1
  61. package/dist/components/divider/divider.styles.js +5 -20
  62. package/dist/components/filterchip/filterchip.styles.js +4 -2
  63. package/dist/components/formfieldgroup/formfieldgroup.component.js +1 -4
  64. package/dist/components/formfieldgroup/formfieldgroup.styles.js +1 -2
  65. package/dist/components/formfieldwrapper/formfieldwrapper.component.js +19 -17
  66. package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +2 -1
  67. package/dist/components/formfieldwrapper/formfieldwrapper.subcomponent.js +4 -4
  68. package/dist/components/icon/icon.component.js +7 -7
  69. package/dist/components/icon/icon.utils.d.ts +1 -1
  70. package/dist/components/icon/icon.utils.js +7 -7
  71. package/dist/components/iconprovider/iconprovider.component.js +7 -7
  72. package/dist/components/input/input.component.d.ts +5 -5
  73. package/dist/components/input/input.component.js +64 -62
  74. package/dist/components/input/input.styles.js +128 -117
  75. package/dist/components/inputchip/inputchip.component.js +14 -19
  76. package/dist/components/inputchip/inputchip.styles.js +5 -3
  77. package/dist/components/link/link.component.d.ts +1 -1
  78. package/dist/components/link/link.component.js +4 -8
  79. package/dist/components/link/link.constants.d.ts +1 -1
  80. package/dist/components/link/link.constants.js +1 -1
  81. package/dist/components/link/link.styles.js +12 -12
  82. package/dist/components/linksimple/linksimple.component.js +2 -4
  83. package/dist/components/linksimple/linksimple.styles.js +59 -57
  84. package/dist/components/list/list.component.js +12 -9
  85. package/dist/components/listitem/listitem.component.js +15 -11
  86. package/dist/components/listitem/listitem.styles.js +11 -6
  87. package/dist/components/marker/marker.component.js +1 -1
  88. package/dist/components/marker/marker.styles.js +2 -2
  89. package/dist/components/menubar/menubar.component.d.ts +19 -19
  90. package/dist/components/menubar/menubar.component.js +19 -19
  91. package/dist/components/menuitem/menuitem.component.js +15 -15
  92. package/dist/components/menuitem/menuitem.styles.js +3 -2
  93. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +1 -1
  94. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +4 -11
  95. package/dist/components/menuitemradio/menuitemradio.component.js +1 -1
  96. package/dist/components/menupopover/menupopover.component.js +11 -11
  97. package/dist/components/menupopover/menupopover.utils.d.ts +1 -1
  98. package/dist/components/menupopover/menupopover.utils.js +3 -8
  99. package/dist/components/navitem/navitem.component.js +11 -19
  100. package/dist/components/navitem/navitem.styles.js +147 -143
  101. package/dist/components/navitemlist/navitemlist.component.js +2 -2
  102. package/dist/components/optgroup/optgroup.component.js +12 -9
  103. package/dist/components/option/option.component.js +11 -11
  104. package/dist/components/option/option.styles.js +1 -1
  105. package/dist/components/popover/popover.component.js +4 -4
  106. package/dist/components/popover/popover.stack.js +1 -1
  107. package/dist/components/popover/popover.styles.js +0 -1
  108. package/dist/components/popover/popover.utils.js +3 -4
  109. package/dist/components/presence/presence.component.d.ts +4 -4
  110. package/dist/components/presence/presence.component.js +4 -4
  111. package/dist/components/progressbar/progressbar.component.js +3 -4
  112. package/dist/components/progressbar/progressbar.styles.js +77 -71
  113. package/dist/components/progressspinner/progressspiner.utils.js +4 -4
  114. package/dist/components/progressspinner/progressspinner.component.js +38 -37
  115. package/dist/components/progressspinner/progressspinner.styles.js +1 -1
  116. package/dist/components/radio/radio.component.d.ts +41 -41
  117. package/dist/components/radio/radio.component.js +84 -83
  118. package/dist/components/radio/radio.styles.js +77 -75
  119. package/dist/components/radiogroup/radiogroup.component.js +1 -1
  120. package/dist/components/screenreaderannouncer/screenreaderannouncer.component.js +2 -2
  121. package/dist/components/screenreaderannouncer/screenreaderannouncer.styles.js +8 -6
  122. package/dist/components/searchfield/searchfield.component.js +23 -17
  123. package/dist/components/searchfield/searchfield.styles.js +11 -13
  124. package/dist/components/select/select.component.js +20 -23
  125. package/dist/components/select/select.styles.js +9 -9
  126. package/dist/components/sidenavigation/sidenavigation.component.d.ts +6 -6
  127. package/dist/components/sidenavigation/sidenavigation.component.js +39 -29
  128. package/dist/components/sidenavigation/sidenavigation.context.js +5 -5
  129. package/dist/components/sidenavigation/sidenavigation.styles.js +53 -53
  130. package/dist/components/skeleton/skeleton.component.js +1 -4
  131. package/dist/components/skeleton/skeleton.constants.d.ts +1 -1
  132. package/dist/components/skeleton/skeleton.constants.js +1 -1
  133. package/dist/components/skeleton/skeleton.styles.js +4 -4
  134. package/dist/components/spinner/spinner.component.d.ts +7 -7
  135. package/dist/components/spinner/spinner.component.js +9 -9
  136. package/dist/components/spinner/spinner.styles.js +58 -53
  137. package/dist/components/staticcheckbox/staticcheckbox.component.js +10 -8
  138. package/dist/components/staticcheckbox/staticcheckbox.styles.js +52 -51
  139. package/dist/components/staticradio/staticradio.component.d.ts +8 -8
  140. package/dist/components/staticradio/staticradio.component.js +10 -11
  141. package/dist/components/staticradio/staticradio.styles.js +77 -75
  142. package/dist/components/statictoggle/statictoggle.component.d.ts +3 -3
  143. package/dist/components/statictoggle/statictoggle.component.js +3 -3
  144. package/dist/components/statictoggle/statictoggle.styles.js +71 -68
  145. package/dist/components/tab/tab.component.d.ts +1 -1
  146. package/dist/components/tab/tab.component.js +2 -2
  147. package/dist/components/tab/tab.styles.js +247 -245
  148. package/dist/components/tablist/tablist.component.js +11 -15
  149. package/dist/components/tablist/tablist.styles.js +27 -25
  150. package/dist/components/tablist/tablist.types.d.ts +1 -1
  151. package/dist/components/tablist/tablist.utils.js +4 -4
  152. package/dist/components/text/fonts.styles.js +49 -49
  153. package/dist/components/text/text.component.js +21 -11
  154. package/dist/components/text/text.types.d.ts +1 -1
  155. package/dist/components/textarea/textarea.component.d.ts +31 -31
  156. package/dist/components/textarea/textarea.component.js +54 -61
  157. package/dist/components/textarea/textarea.styles.js +123 -122
  158. package/dist/components/themeprovider/themeprovider.component.js +1 -1
  159. package/dist/components/themeprovider/themeprovider.styles.js +4 -4
  160. package/dist/components/toggle/toggle.component.d.ts +35 -35
  161. package/dist/components/toggle/toggle.component.js +62 -63
  162. package/dist/components/toggle/toggle.styles.js +77 -69
  163. package/dist/components/toggletip/toggletip.component.d.ts +7 -7
  164. package/dist/components/toggletip/toggletip.component.js +3 -2
  165. package/dist/components/tooltip/tooltip.component.js +1 -1
  166. package/dist/components/tooltip/tooltip.styles.js +0 -1
  167. package/dist/components/virtualizedlist/virtualizedlist.component.js +6 -14
  168. package/dist/components/virtualizedlist/virtualizedlist.helper.test.d.ts +1 -1
  169. package/dist/components/virtualizedlist/virtualizedlist.helper.test.js +14 -11
  170. package/dist/components/virtualizedlist/virtualizedlist.styles.js +4 -4
  171. package/dist/custom-elements.json +239 -228
  172. package/dist/index.js +1 -0
  173. package/dist/models/component/index.d.ts +1 -1
  174. package/dist/models/index.d.ts +2 -2
  175. package/dist/models/index.js +1 -1
  176. package/dist/react/index.d.ts +3 -3
  177. package/dist/react/index.js +3 -3
  178. package/dist/utils/mixins/ButtonComponentMixin.js +10 -10
  179. package/dist/utils/mixins/CardAndDialogFooterMixin.js +21 -22
  180. package/dist/utils/mixins/FocusTrapMixin.js +15 -12
  181. package/dist/utils/mixins/IconNameMixin.d.ts +1 -1
  182. package/dist/utils/mixins/MenuMixin.js +23 -23
  183. package/dist/utils/mixins/PreventScrollMixin.d.ts +1 -1
  184. package/dist/utils/styles/index.js +12 -12
  185. 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);
@@ -142,8 +142,13 @@ declare class Dialog extends Dialog_base {
142
142
  */
143
143
  disableAriaHasPopup: boolean;
144
144
  /**
145
- * For now FocusTrap is always true as the dialog is a modal component only.
146
- * This means it will always trap focus within the dialog when it is open.
145
+ * Determines whether the focus trap is enabled.
146
+ * If true, focus will be restricted to the content within this component.
147
+ *
148
+ * NOTE: this should only be disabled in rare cases! By default a Modal Dialog
149
+ * should trap focus always.
150
+ *
151
+ * @default true
147
152
  */
148
153
  focusTrap: boolean;
149
154
  /**
@@ -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.
@@ -147,10 +147,15 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
147
147
  */
148
148
  this.disableAriaHasPopup = DEFAULTS.DISABLE_ARIA_HAS_POPUP;
149
149
  /**
150
- * For now FocusTrap is always true as the dialog is a modal component only.
151
- * This means it will always trap focus within the dialog when it is open.
150
+ * Determines whether the focus trap is enabled.
151
+ * If true, focus will be restricted to the content within this component.
152
+ *
153
+ * NOTE: this should only be disabled in rare cases! By default a Modal Dialog
154
+ * should trap focus always.
155
+ *
156
+ * @default true
152
157
  */
153
- this.focusTrap = true;
158
+ this.focusTrap = DEFAULTS.FOCUS_TRAP;
154
159
  /**
155
160
  * For now preventScroll is always true as the dialog is a modal component only.
156
161
  * This means scroll will be prevented when the dialog is open.
@@ -221,12 +226,12 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
221
226
  if (changedProperties.has('variant')) {
222
227
  this.updateFooterButtonColors(this.variant);
223
228
  }
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')) {
229
+ if (changedProperties.has('ariaLabel') ||
230
+ changedProperties.has('ariaLabelledBy') ||
231
+ changedProperties.has('ariaDescribedBy') ||
232
+ changedProperties.has('ariaDescription') ||
233
+ changedProperties.has('headerText') ||
234
+ changedProperties.has('descriptionText')) {
230
235
  this.setupAriaLabelledDescribedBy();
231
236
  }
232
237
  if (changedProperties.has('focusTrap')) {
@@ -328,7 +333,9 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
328
333
  this.createBackdrop();
329
334
  this.activatePreventScroll();
330
335
  await this.updateComplete;
331
- (_a = this.activateFocusTrap) === null || _a === void 0 ? void 0 : _a.call(this);
336
+ if (this.focusTrap) {
337
+ (_a = this.activateFocusTrap) === null || _a === void 0 ? void 0 : _a.call(this);
338
+ }
332
339
  (_b = this.setInitialFocus) === null || _b === void 0 ? void 0 : _b.call(this);
333
340
  // Set aria-expanded attribute on the trigger element to true if it exists
334
341
  (_c = this.triggerElement) === null || _c === void 0 ? void 0 : _c.setAttribute('aria-expanded', 'true');
@@ -364,28 +371,27 @@ class Dialog extends PreventScrollMixin(FocusTrapMixin(CardAndDialogFooterMixin(
364
371
  render() {
365
372
  return html `
366
373
  ${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
374
+ ? html ` <div part="header-section">
375
+ <div part="header">
376
+ <slot name="header-prefix"></slot>
377
+ <mdc-text
378
+ part="header-text"
379
+ tagname="${VALID_TEXT_TAGS[this.headerTagName.toUpperCase()]}"
380
+ type="${TYPE.BODY_LARGE_BOLD}"
381
+ >
382
+ ${this.headerText}
383
+ </mdc-text>
384
+ </div>
385
+ ${this.descriptionText
380
386
  ? 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>`
387
+ part="description-text"
388
+ tagname="${VALID_TEXT_TAGS[this.descriptionTagName.toUpperCase()]}"
389
+ type="${TYPE.BODY_MIDSIZE_REGULAR}"
390
+ >
391
+ ${this.descriptionText}
392
+ </mdc-text>`
387
393
  : nothing}
388
- </div>`
394
+ </div>`
389
395
  : nothing}
390
396
  <mdc-button
391
397
  part="dialog-close-btn"
@@ -471,4 +477,8 @@ __decorate([
471
477
  property({ type: Boolean, reflect: true, attribute: 'disable-aria-haspopup' }),
472
478
  __metadata("design:type", Boolean)
473
479
  ], Dialog.prototype, "disableAriaHasPopup", void 0);
480
+ __decorate([
481
+ property({ type: Boolean, reflect: true, attribute: 'focus-trap' }),
482
+ __metadata("design:type", Boolean)
483
+ ], Dialog.prototype, "focusTrap", void 0);
474
484
  export default Dialog;
@@ -13,6 +13,7 @@ declare const DEFAULTS: {
13
13
  readonly CANCEL_ICON: "cancel-bold";
14
14
  readonly VARIANT: "default";
15
15
  readonly DISABLE_ARIA_HAS_POPUP: false;
16
+ readonly FOCUS_TRAP: true;
16
17
  };
17
18
  declare const DIALOG_SIZE: readonly ["small", "medium", "large"];
18
19
  declare const DIALOG_ROLE: readonly ["dialog", "alertdialog"];
@@ -14,6 +14,7 @@ const DEFAULTS = {
14
14
  CANCEL_ICON: 'cancel-bold',
15
15
  VARIANT: DIALOG_VARIANT.DEFAULT,
16
16
  DISABLE_ARIA_HAS_POPUP: false,
17
+ FOCUS_TRAP: true,
17
18
  };
18
19
  const DIALOG_SIZE = ['small', 'medium', 'large'];
19
20
  const DIALOG_ROLE = ['dialog', 'alertdialog'];
@@ -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);