@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,248 +1,250 @@
1
1
  import { css } from 'lit';
2
2
  import { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';
3
- const styles = [hostFitContentStyles, css `
4
-
5
- :host {
6
- --mdc-tab-content-gap: 0.5rem;
7
- --mdc-tab-height: 2rem;
8
-
9
- --mdc-tab-glass-active-background-color-disabled: var(--mds-color-theme-button-primary-disabled);
10
- --mdc-tab-glass-active-background-color-hover: var(--mds-color-theme-button-primary-hover);
11
- --mdc-tab-glass-active-background-color-normal: var(--mds-color-theme-button-primary-normal);
12
- --mdc-tab-glass-active-background-color-pressed: var(--mds-color-theme-button-primary-pressed);
13
-
14
- --mdc-tab-glass-active-color: var(--mds-color-theme-inverted-text-primary-normal);
15
- --mdc-tab-glass-active-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);
16
-
17
- --mdc-tab-glass-border-radius: 0.5rem;
18
-
19
- --mdc-tab-glass-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
20
- --mdc-tab-glass-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);
21
- --mdc-tab-glass-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);
22
- --mdc-tab-glass-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
23
-
24
- --mdc-tab-glass-inactive-color: var(--mds-color-theme-text-secondary-normal);
25
- --mdc-tab-glass-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);
26
-
27
- --mdc-tab-line-active-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
28
- --mdc-tab-line-active-background-color-hover: var(--mds-color-theme-button-secondary-hover);
29
- --mdc-tab-line-active-background-color-normal: var(--mds-color-theme-button-secondary-normal);
30
- --mdc-tab-line-active-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
31
-
32
- --mdc-tab-line-active-color: var(--mds-color-theme-text-primary-normal);
33
- --mdc-tab-line-active-color-disabled: var(--mds-color-theme-text-primary-disabled);
34
-
35
- --mdc-tab-line-active-indicator-color: var(--mds-color-theme-outline-input-active);
36
- --mdc-tab-line-active-indicator-color-disabled: var(--mds-color-theme-outline-primary-disabled);
37
- --mdc-tab-line-active-indicator-height: 0.125rem;
38
- --mdc-tab-line-active-indicator-width: 100%;
39
-
40
- --mdc-tab-line-border-bottom-left-radius: 0;
41
- --mdc-tab-line-border-bottom-right-radius: 0;
42
- --mdc-tab-line-border-top-left-radius: 0.25rem;
43
- --mdc-tab-line-border-top-right-radius: 0.25rem;
44
-
45
- --mdc-tab-line-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
46
- --mdc-tab-line-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);
47
- --mdc-tab-line-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);
48
- --mdc-tab-line-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
49
-
50
- --mdc-tab-line-inactive-color: var(--mds-color-theme-text-secondary-normal);
51
- --mdc-tab-line-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);
52
-
53
- --mdc-tab-padding-left: 0.75rem;
54
- --mdc-tab-padding-right: 0.75rem;
55
-
56
- --mdc-tab-pill-active-background-color-disabled: var(--mds-color-theme-button-secondary-active-normal);
57
- --mdc-tab-pill-active-background-color-hover: var(--mds-color-theme-button-secondary-active-hover);
58
- --mdc-tab-pill-active-background-color-normal: var(--mds-color-theme-button-secondary-active-normal);
59
- --mdc-tab-pill-active-background-color-pressed: var(--mds-color-theme-button-secondary-active-pressed);
60
-
61
- --mdc-tab-pill-active-color: var(--mds-color-theme-text-primary-normal);
62
- --mdc-tab-pill-active-color-disabled: var(--mds-color-theme-text-primary-disabled);
63
-
64
- --mdc-tab-pill-border-radius: 0.5rem;
65
-
66
- --mdc-tab-pill-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
67
- --mdc-tab-pill-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);
68
- --mdc-tab-pill-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);
69
- --mdc-tab-pill-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
70
-
71
- --mdc-tab-pill-inactive-color: var(--mds-color-theme-text-secondary-normal);
72
- --mdc-tab-pill-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);
73
-
74
- flex-direction: column;
75
- flex-shrink: 0;
76
- height: var(--mdc-tab-height);
77
- padding-left: var(--mdc-tab-padding-left);
78
- padding-right: var(--mdc-tab-padding-right);
79
- position: relative;
80
- border: none;
81
- }
82
-
83
- :host::part(container) {
84
- align-items: center;
85
- display: flex;
86
- flex-direction: row;
87
- gap: var(--mdc-tab-content-gap);
88
- justify-content: center;
89
- width: fit-content;
90
- }
91
-
92
- :host::part(text) {
93
- display: flex;
94
- flex-direction: column;
95
- }
96
-
97
- :host mdc-text::after {
98
- content: attr(data-text);
99
- height: 0;
100
- visibility: hidden;
101
- overflow: hidden;
102
- user-select: none;
103
- pointer-events: none;
104
- /* body-midsize-bold font styling */
105
- font-size: var(--mds-font-apps-body-midsize-bold-font-size);
106
- font-weight: var(--mds-font-apps-body-midsize-bold-font-weight);
107
- line-height: var(--mds-font-apps-body-midsize-bold-line-height);
108
- text-decoration: var(--mds-font-apps-body-midsize-bold-text-decoration);
109
- text-transform: var(--mds-font-apps-body-midsize-bold-text-case);
110
- }
111
-
112
- :host::part(indicator) {
113
- width: var(--mdc-tab-line-active-indicator-width);
114
- height: var(--mdc-tab-line-active-indicator-height);
115
- bottom: 0;
116
- position: absolute;
117
- visibility: hidden;
118
- }
119
-
120
- :host([disabled]) {
121
- cursor: default;
122
- }
123
-
124
- :host([variant="glass"]) {
125
- background-color: var(--mdc-tab-glass-inactive-background-color-normal);
126
- border-radius: var(--mdc-tab-glass-border-radius);
127
- color: var(--mdc-tab-glass-inactive-color);
128
- }
129
-
130
- :host([variant="glass"]:hover) {
131
- background-color: var(--mdc-tab-glass-inactive-background-color-hover);
132
- }
133
-
134
- :host([variant="glass"]:active) {
135
- background-color: var(--mdc-tab-glass-inactive-background-color-pressed);
136
- }
137
-
138
- :host([variant="glass"][disabled]) {
139
- background-color: var(--mdc-tab-glass-inactive-background-color-disabled);
140
- color: var(--mdc-tab-glass-inactive-color-disabled);
141
- }
142
-
143
- :host([variant="glass"][active]) {
144
- background-color: var(--mdc-tab-glass-active-background-color-normal);
145
- color: var(--mdc-tab-glass-active-color);
146
- }
147
-
148
- :host([variant="glass"][active]:hover) {
149
- background-color: var(--mdc-tab-glass-active-background-color-hover);
150
- }
151
-
152
- :host([variant="glass"][active]:active) {
153
- background-color: var(--mdc-tab-glass-active-background-color-pressed);
154
- }
155
-
156
- :host([variant="glass"][active][disabled]) {
157
- background-color: var(--mdc-tab-glass-active-background-color-disabled);
158
- color: var(--mdc-tab-glass-active-color-disabled);
159
- }
160
-
161
- :host([variant="line"]) {
162
- background-color: var(--mdc-tab-line-inactive-background-color-normal);
163
- border-top-left-radius: var(--mdc-tab-line-border-top-left-radius);
164
- border-top-right-radius: var(--mdc-tab-line-border-top-right-radius);
165
- border-bottom-left-radius: var(--mdc-tab-line-border-bottom-left-radius);
166
- border-bottom-right-radius: var(--mdc-tab-line-border-bottom-right-radius);
167
- color: var(--mdc-tab-line-inactive-color);
168
- }
169
-
170
- :host([variant="line"]:hover) {
171
- background-color: var(--mdc-tab-line-inactive-background-color-hover);
172
- }
173
-
174
- :host([variant="line"]:active) {
175
- background-color: var(--mdc-tab-line-inactive-background-color-pressed);
176
- }
177
-
178
- :host([variant="line"][disabled]) {
179
- background-color: var(--mdc-tab-line-inactive-background-color-disabled);
180
- color: var(--mdc-tab-line-inactive-color-disabled);
181
- }
182
-
183
- :host([variant="line"][active]) {
184
- background-color: var(--mdc-tab-line-active-background-color-normal);
185
- color: var(--mdc-tab-line-active-color);
186
- }
187
-
188
- :host([variant="line"][active])::part(indicator) {
189
- background-color:var(--mdc-tab-line-active-indicator-color);
190
- visibility: visible;
191
- }
192
-
193
- :host([variant="line"][active]:hover) {
194
- background-color: var(--mdc-tab-line-active-background-color-hover);
195
- }
196
-
197
- :host([variant="line"][active]:active) {
198
- background-color: var(--mdc-tab-line-active-background-color-pressed);
199
- }
200
-
201
- :host([variant="line"][active][disabled]) {
202
- background-color: var(--mdc-tab-line-active-background-color-disabled);
203
- color: var(--mdc-tab-line-active-color-disabled);
204
- }
205
-
206
- :host([variant="line"][active][disabled])::part(indicator) {
207
- background-color:var(--mdc-tab-line-active-indicator-color-disabled);
208
- }
209
-
210
- :host([variant="pill"]) {
211
- background-color: var(--mdc-tab-pill-inactive-background-color-normal);
212
- border-radius: var(--mdc-tab-pill-border-radius);
213
- color: var(--mdc-tab-pill-inactive-color);
214
- }
215
-
216
- :host([variant="pill"]:hover) {
217
- background-color: var(--mdc-tab-pill-inactive-background-color-hover);
218
- }
219
-
220
- :host([variant="pill"]:active) {
221
- background-color: var(--mdc-tab-pill-inactive-background-color-pressed);
222
- }
223
-
224
- :host([variant="pill"][disabled]) {
225
- background-color: var(--mdc-tab-pill-inactive-background-color-disabled);
226
- color: var(--mdc-tab-pill-inactive-color-disabled);
227
- }
228
-
229
- :host([variant="pill"][active]) {
230
- background-color: var(--mdc-tab-pill-active-background-color-normal);
231
- color: var(--mdc-tab-pill-active-color);
232
- }
233
-
234
- :host([variant="pill"][active]:hover) {
235
- background-color: var(--mdc-tab-pill-active-background-color-hover);
236
- }
237
-
238
- :host([variant="pill"][active]:active) {
239
- background-color: var(--mdc-tab-pill-active-background-color-pressed);
240
- }
241
-
242
- :host([variant="pill"][active][disabled]) {
243
- background-color: var(--mdc-tab-pill-active-background-color-disabled);
244
- color: var(--mdc-tab-pill-active-color-disabled);
245
- }
246
-
247
- `, ...hostFocusRingStyles()];
3
+ const styles = [
4
+ hostFitContentStyles,
5
+ css `
6
+ :host {
7
+ --mdc-tab-content-gap: 0.5rem;
8
+ --mdc-tab-height: 2rem;
9
+
10
+ --mdc-tab-glass-active-background-color-disabled: var(--mds-color-theme-button-primary-disabled);
11
+ --mdc-tab-glass-active-background-color-hover: var(--mds-color-theme-button-primary-hover);
12
+ --mdc-tab-glass-active-background-color-normal: var(--mds-color-theme-button-primary-normal);
13
+ --mdc-tab-glass-active-background-color-pressed: var(--mds-color-theme-button-primary-pressed);
14
+
15
+ --mdc-tab-glass-active-color: var(--mds-color-theme-inverted-text-primary-normal);
16
+ --mdc-tab-glass-active-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);
17
+
18
+ --mdc-tab-glass-border-radius: 0.5rem;
19
+
20
+ --mdc-tab-glass-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
21
+ --mdc-tab-glass-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);
22
+ --mdc-tab-glass-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);
23
+ --mdc-tab-glass-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
24
+
25
+ --mdc-tab-glass-inactive-color: var(--mds-color-theme-text-secondary-normal);
26
+ --mdc-tab-glass-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);
27
+
28
+ --mdc-tab-line-active-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
29
+ --mdc-tab-line-active-background-color-hover: var(--mds-color-theme-button-secondary-hover);
30
+ --mdc-tab-line-active-background-color-normal: var(--mds-color-theme-button-secondary-normal);
31
+ --mdc-tab-line-active-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
32
+
33
+ --mdc-tab-line-active-color: var(--mds-color-theme-text-primary-normal);
34
+ --mdc-tab-line-active-color-disabled: var(--mds-color-theme-text-primary-disabled);
35
+
36
+ --mdc-tab-line-active-indicator-color: var(--mds-color-theme-outline-input-active);
37
+ --mdc-tab-line-active-indicator-color-disabled: var(--mds-color-theme-outline-primary-disabled);
38
+ --mdc-tab-line-active-indicator-height: 0.125rem;
39
+ --mdc-tab-line-active-indicator-width: 100%;
40
+
41
+ --mdc-tab-line-border-bottom-left-radius: 0;
42
+ --mdc-tab-line-border-bottom-right-radius: 0;
43
+ --mdc-tab-line-border-top-left-radius: 0.25rem;
44
+ --mdc-tab-line-border-top-right-radius: 0.25rem;
45
+
46
+ --mdc-tab-line-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
47
+ --mdc-tab-line-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);
48
+ --mdc-tab-line-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);
49
+ --mdc-tab-line-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
50
+
51
+ --mdc-tab-line-inactive-color: var(--mds-color-theme-text-secondary-normal);
52
+ --mdc-tab-line-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);
53
+
54
+ --mdc-tab-padding-left: 0.75rem;
55
+ --mdc-tab-padding-right: 0.75rem;
56
+
57
+ --mdc-tab-pill-active-background-color-disabled: var(--mds-color-theme-button-secondary-active-normal);
58
+ --mdc-tab-pill-active-background-color-hover: var(--mds-color-theme-button-secondary-active-hover);
59
+ --mdc-tab-pill-active-background-color-normal: var(--mds-color-theme-button-secondary-active-normal);
60
+ --mdc-tab-pill-active-background-color-pressed: var(--mds-color-theme-button-secondary-active-pressed);
61
+
62
+ --mdc-tab-pill-active-color: var(--mds-color-theme-text-primary-normal);
63
+ --mdc-tab-pill-active-color-disabled: var(--mds-color-theme-text-primary-disabled);
64
+
65
+ --mdc-tab-pill-border-radius: 0.5rem;
66
+
67
+ --mdc-tab-pill-inactive-background-color-disabled: var(--mds-color-theme-button-secondary-disabled);
68
+ --mdc-tab-pill-inactive-background-color-hover: var(--mds-color-theme-button-secondary-hover);
69
+ --mdc-tab-pill-inactive-background-color-normal: var(--mds-color-theme-button-secondary-normal);
70
+ --mdc-tab-pill-inactive-background-color-pressed: var(--mds-color-theme-button-secondary-pressed);
71
+
72
+ --mdc-tab-pill-inactive-color: var(--mds-color-theme-text-secondary-normal);
73
+ --mdc-tab-pill-inactive-color-disabled: var(--mds-color-theme-text-primary-disabled);
74
+
75
+ flex-direction: column;
76
+ flex-shrink: 0;
77
+ height: var(--mdc-tab-height);
78
+ padding-left: var(--mdc-tab-padding-left);
79
+ padding-right: var(--mdc-tab-padding-right);
80
+ position: relative;
81
+ border: none;
82
+ }
83
+
84
+ :host::part(container) {
85
+ align-items: center;
86
+ display: flex;
87
+ flex-direction: row;
88
+ gap: var(--mdc-tab-content-gap);
89
+ justify-content: center;
90
+ width: fit-content;
91
+ }
92
+
93
+ :host::part(text) {
94
+ display: flex;
95
+ flex-direction: column;
96
+ }
97
+
98
+ :host mdc-text::after {
99
+ content: attr(data-text);
100
+ height: 0;
101
+ visibility: hidden;
102
+ overflow: hidden;
103
+ user-select: none;
104
+ pointer-events: none;
105
+ /* body-midsize-bold font styling */
106
+ font-size: var(--mds-font-apps-body-midsize-bold-font-size);
107
+ font-weight: var(--mds-font-apps-body-midsize-bold-font-weight);
108
+ line-height: var(--mds-font-apps-body-midsize-bold-line-height);
109
+ text-decoration: var(--mds-font-apps-body-midsize-bold-text-decoration);
110
+ text-transform: var(--mds-font-apps-body-midsize-bold-text-case);
111
+ }
112
+
113
+ :host::part(indicator) {
114
+ width: var(--mdc-tab-line-active-indicator-width);
115
+ height: var(--mdc-tab-line-active-indicator-height);
116
+ bottom: 0;
117
+ position: absolute;
118
+ visibility: hidden;
119
+ }
120
+
121
+ :host([disabled]) {
122
+ cursor: default;
123
+ }
124
+
125
+ :host([variant='glass']) {
126
+ background-color: var(--mdc-tab-glass-inactive-background-color-normal);
127
+ border-radius: var(--mdc-tab-glass-border-radius);
128
+ color: var(--mdc-tab-glass-inactive-color);
129
+ }
130
+
131
+ :host([variant='glass']:hover) {
132
+ background-color: var(--mdc-tab-glass-inactive-background-color-hover);
133
+ }
134
+
135
+ :host([variant='glass']:active) {
136
+ background-color: var(--mdc-tab-glass-inactive-background-color-pressed);
137
+ }
138
+
139
+ :host([variant='glass'][disabled]) {
140
+ background-color: var(--mdc-tab-glass-inactive-background-color-disabled);
141
+ color: var(--mdc-tab-glass-inactive-color-disabled);
142
+ }
143
+
144
+ :host([variant='glass'][active]) {
145
+ background-color: var(--mdc-tab-glass-active-background-color-normal);
146
+ color: var(--mdc-tab-glass-active-color);
147
+ }
148
+
149
+ :host([variant='glass'][active]:hover) {
150
+ background-color: var(--mdc-tab-glass-active-background-color-hover);
151
+ }
152
+
153
+ :host([variant='glass'][active]:active) {
154
+ background-color: var(--mdc-tab-glass-active-background-color-pressed);
155
+ }
156
+
157
+ :host([variant='glass'][active][disabled]) {
158
+ background-color: var(--mdc-tab-glass-active-background-color-disabled);
159
+ color: var(--mdc-tab-glass-active-color-disabled);
160
+ }
161
+
162
+ :host([variant='line']) {
163
+ background-color: var(--mdc-tab-line-inactive-background-color-normal);
164
+ border-top-left-radius: var(--mdc-tab-line-border-top-left-radius);
165
+ border-top-right-radius: var(--mdc-tab-line-border-top-right-radius);
166
+ border-bottom-left-radius: var(--mdc-tab-line-border-bottom-left-radius);
167
+ border-bottom-right-radius: var(--mdc-tab-line-border-bottom-right-radius);
168
+ color: var(--mdc-tab-line-inactive-color);
169
+ }
170
+
171
+ :host([variant='line']:hover) {
172
+ background-color: var(--mdc-tab-line-inactive-background-color-hover);
173
+ }
174
+
175
+ :host([variant='line']:active) {
176
+ background-color: var(--mdc-tab-line-inactive-background-color-pressed);
177
+ }
178
+
179
+ :host([variant='line'][disabled]) {
180
+ background-color: var(--mdc-tab-line-inactive-background-color-disabled);
181
+ color: var(--mdc-tab-line-inactive-color-disabled);
182
+ }
183
+
184
+ :host([variant='line'][active]) {
185
+ background-color: var(--mdc-tab-line-active-background-color-normal);
186
+ color: var(--mdc-tab-line-active-color);
187
+ }
188
+
189
+ :host([variant='line'][active])::part(indicator) {
190
+ background-color: var(--mdc-tab-line-active-indicator-color);
191
+ visibility: visible;
192
+ }
193
+
194
+ :host([variant='line'][active]:hover) {
195
+ background-color: var(--mdc-tab-line-active-background-color-hover);
196
+ }
197
+
198
+ :host([variant='line'][active]:active) {
199
+ background-color: var(--mdc-tab-line-active-background-color-pressed);
200
+ }
201
+
202
+ :host([variant='line'][active][disabled]) {
203
+ background-color: var(--mdc-tab-line-active-background-color-disabled);
204
+ color: var(--mdc-tab-line-active-color-disabled);
205
+ }
206
+
207
+ :host([variant='line'][active][disabled])::part(indicator) {
208
+ background-color: var(--mdc-tab-line-active-indicator-color-disabled);
209
+ }
210
+
211
+ :host([variant='pill']) {
212
+ background-color: var(--mdc-tab-pill-inactive-background-color-normal);
213
+ border-radius: var(--mdc-tab-pill-border-radius);
214
+ color: var(--mdc-tab-pill-inactive-color);
215
+ }
216
+
217
+ :host([variant='pill']:hover) {
218
+ background-color: var(--mdc-tab-pill-inactive-background-color-hover);
219
+ }
220
+
221
+ :host([variant='pill']:active) {
222
+ background-color: var(--mdc-tab-pill-inactive-background-color-pressed);
223
+ }
224
+
225
+ :host([variant='pill'][disabled]) {
226
+ background-color: var(--mdc-tab-pill-inactive-background-color-disabled);
227
+ color: var(--mdc-tab-pill-inactive-color-disabled);
228
+ }
229
+
230
+ :host([variant='pill'][active]) {
231
+ background-color: var(--mdc-tab-pill-active-background-color-normal);
232
+ color: var(--mdc-tab-pill-active-color);
233
+ }
234
+
235
+ :host([variant='pill'][active]:hover) {
236
+ background-color: var(--mdc-tab-pill-active-background-color-hover);
237
+ }
238
+
239
+ :host([variant='pill'][active]:active) {
240
+ background-color: var(--mdc-tab-pill-active-background-color-pressed);
241
+ }
242
+
243
+ :host([variant='pill'][active][disabled]) {
244
+ background-color: var(--mdc-tab-pill-active-background-color-disabled);
245
+ color: var(--mdc-tab-pill-active-color-disabled);
246
+ }
247
+ `,
248
+ ...hostFocusRingStyles(),
249
+ ];
248
250
  export default styles;
@@ -10,13 +10,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  import { html, nothing } from 'lit';
11
11
  import { property, query, queryAssignedElements, state } from 'lit/decorators.js';
12
12
  import { ifDefined } from 'lit/directives/if-defined.js';
13
- import styles from './tablist.styles';
14
13
  import { Component } from '../../models';
15
- import { ARROW_BUTTON_DIRECTION, KEYCODES } from './tablist.constants';
16
14
  import Tab from '../tab/tab.component';
17
15
  import Button from '../button/button.component';
18
- import { getFirstTab, getLastTab, getNextTab, getPreviousTab, findTab, getActiveTab } from './tablist.utils';
19
16
  import { ROLE } from '../../utils/roles';
17
+ import styles from './tablist.styles';
18
+ import { ARROW_BUTTON_DIRECTION, KEYCODES } from './tablist.constants';
19
+ import { getFirstTab, getLastTab, getNextTab, getPreviousTab, findTab, getActiveTab } from './tablist.utils';
20
20
  /**
21
21
  * Tab list organizes tabs into a container.
22
22
  *
@@ -162,7 +162,7 @@ class TabList extends Component {
162
162
  */
163
163
  this.resetTabIndexAndSetNewTabIndex = (newTab) => {
164
164
  var _a;
165
- (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
165
+ (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.forEach(tab => {
166
166
  tab.setAttribute('tabindex', tab === newTab ? '0' : '-1');
167
167
  });
168
168
  };
@@ -175,7 +175,7 @@ class TabList extends Component {
175
175
  */
176
176
  this.setActiveTab = (newTab) => {
177
177
  var _a;
178
- (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
178
+ (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.forEach(tab => {
179
179
  if (tab === newTab) {
180
180
  tab.setAttribute('active', '');
181
181
  }
@@ -258,8 +258,8 @@ class TabList extends Component {
258
258
  if (!this.showBackwardArrowButton && !this.showForwardArrowButton) {
259
259
  (_a = getActiveTab(this.tabs || [])) === null || _a === void 0 ? void 0 : _a.focus();
260
260
  }
261
- else if ((this.showBackwardArrowButton && !this.showForwardArrowButton)
262
- || (this.showForwardArrowButton && !this.showBackwardArrowButton)) {
261
+ else if ((this.showBackwardArrowButton && !this.showForwardArrowButton) ||
262
+ (this.showForwardArrowButton && !this.showBackwardArrowButton)) {
263
263
  (_b = this.notFocusedArrowButton) === null || _b === void 0 ? void 0 : _b.focus();
264
264
  }
265
265
  };
@@ -340,8 +340,8 @@ class TabList extends Component {
340
340
  const forwardMultiplier = !this.isRtl() ? 1 : -1;
341
341
  const backwardMultiplier = !this.isRtl() ? -1 : 1;
342
342
  (_a = this.tabsContainer) === null || _a === void 0 ? void 0 : _a.scrollBy({
343
- left: this.tabsContainer.clientWidth
344
- * (direction === ARROW_BUTTON_DIRECTION.FORWARD ? forwardMultiplier : backwardMultiplier),
343
+ left: this.tabsContainer.clientWidth *
344
+ (direction === ARROW_BUTTON_DIRECTION.FORWARD ? forwardMultiplier : backwardMultiplier),
345
345
  // @ts-ignore : https://github.com/Microsoft/TypeScript/issues/28755
346
346
  behavior: 'instant',
347
347
  });
@@ -373,7 +373,7 @@ class TabList extends Component {
373
373
  }
374
374
  return;
375
375
  }
376
- const tabIds = this.tabs.map((tab) => tab.tabId);
376
+ const tabIds = this.tabs.map(tab => tab.tabId);
377
377
  if (new Set(tabIds).size !== this.tabs.length) {
378
378
  if (this.onerror) {
379
379
  this.onerror('The tabs inside the tab list must have unique tab ids');
@@ -442,11 +442,7 @@ class TabList extends Component {
442
442
  ></mdc-button>`
443
443
  : nothing}`;
444
444
  return html ` ${arrowButton('backward')}
445
- <div
446
- class="container"
447
- role="${ROLE.TABLIST}"
448
- tabindex="-1"
449
- aria-label="${ifDefined(this.dataAriaLabel)}">
445
+ <div class="container" role="${ROLE.TABLIST}" tabindex="-1" aria-label="${ifDefined(this.dataAriaLabel)}">
450
446
  <slot></slot>
451
447
  </div>
452
448
  ${arrowButton(ARROW_BUTTON_DIRECTION.FORWARD)}`;
@@ -1,35 +1,37 @@
1
1
  import { css } from 'lit';
2
2
  import { baseHostStyleVariables } from '../../utils/styles';
3
- const styles = [baseHostStyleVariables,
3
+ const styles = [
4
+ baseHostStyleVariables,
4
5
  css `
5
- :host {
6
- --mdc-tablist-focus-ring-outer-width: var(--mdc-focus-ring-outer-width);
7
- --mdc-tablist-gap: 0.5rem;
8
- --mdc-tablist-width: 100%;
9
- --mdc-tablist-arrow-button-margin: 0.75rem;
6
+ :host {
7
+ --mdc-tablist-focus-ring-outer-width: var(--mdc-focus-ring-outer-width);
8
+ --mdc-tablist-gap: 0.5rem;
9
+ --mdc-tablist-width: 100%;
10
+ --mdc-tablist-arrow-button-margin: 0.75rem;
10
11
 
11
- width: var(--mdc-tablist-width);
12
- display: flex;
13
- align-items: center;
12
+ width: var(--mdc-tablist-width);
13
+ display: flex;
14
+ align-items: center;
14
15
 
15
- ::slotted(mdc-tab) {
16
- width: initial;
16
+ ::slotted(mdc-tab) {
17
+ width: initial;
18
+ }
17
19
  }
18
- }
19
20
 
20
- :host .container {
21
- display: flex;
22
- overflow-x: hidden;
23
- gap: var(--mdc-tablist-gap);
24
- padding: var(--mdc-tablist-focus-ring-outer-width);
25
- }
21
+ :host .container {
22
+ display: flex;
23
+ overflow-x: hidden;
24
+ gap: var(--mdc-tablist-gap);
25
+ padding: var(--mdc-tablist-focus-ring-outer-width);
26
+ }
26
27
 
27
- :host mdc-button[prefix-icon="arrow-left-regular"] {
28
- margin-right: var(--mdc-tablist-arrow-button-margin);
29
- }
28
+ :host mdc-button[prefix-icon='arrow-left-regular'] {
29
+ margin-right: var(--mdc-tablist-arrow-button-margin);
30
+ }
30
31
 
31
- :host mdc-button[prefix-icon="arrow-right-regular"] {
32
- margin-left: var(--mdc-tablist-arrow-button-margin);
33
- }
34
- `];
32
+ :host mdc-button[prefix-icon='arrow-right-regular'] {
33
+ margin-left: var(--mdc-tablist-arrow-button-margin);
34
+ }
35
+ `,
36
+ ];
35
37
  export default [...styles];