@sbb-esta/lyne-elements 3.7.0 → 3.9.0

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 (414) hide show
  1. package/alert/alert/alert.component.d.ts +2 -0
  2. package/alert/alert/alert.component.d.ts.map +1 -1
  3. package/alert/alert/alert.component.js +44 -39
  4. package/autocomplete/autocomplete-base-element.js +20 -20
  5. package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +14 -14
  6. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
  7. package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +9 -9
  8. package/badge.css +2 -2
  9. package/breadcrumb/breadcrumb/breadcrumb.component.js +12 -12
  10. package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +15 -15
  11. package/button/common.js +1 -1
  12. package/button/mini-button/mini-button.component.js +7 -7
  13. package/button/mini-button-group/mini-button-group.component.js +21 -21
  14. package/button.js +1 -1
  15. package/calendar/calendar.component.js +36 -36
  16. package/card/card/card.component.js +10 -10
  17. package/card/card-badge/card-badge.component.js +15 -15
  18. package/carousel/carousel/carousel.component.d.ts +1 -0
  19. package/carousel/carousel/carousel.component.d.ts.map +1 -1
  20. package/carousel/carousel/carousel.component.js +37 -33
  21. package/carousel/carousel-list/carousel-list.component.d.ts +2 -2
  22. package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
  23. package/carousel/carousel-list/carousel-list.component.js +32 -29
  24. package/checkbox/common.js +1 -1
  25. package/checkbox-common-gjHkSAmN.js +5 -0
  26. package/checkbox.js +1 -1
  27. package/chip/chip/chip.component.js +23 -23
  28. package/chip-label/chip-label.component.js +22 -22
  29. package/clock/clock.component.js +29 -29
  30. package/container/container/container.component.js +21 -21
  31. package/container/sticky-bar/sticky-bar.component.js +13 -13
  32. package/core/base-elements/open-close-base-element.d.ts +2 -0
  33. package/core/base-elements/open-close-base-element.d.ts.map +1 -1
  34. package/core/base-elements/open-close-base-element.js +4 -0
  35. package/core/config/config.d.ts +6 -0
  36. package/core/config/config.d.ts.map +1 -1
  37. package/core/controllers/escapable-overlay-controller.js +3 -3
  38. package/core/controllers/inert-controller.d.ts +8 -1
  39. package/core/controllers/inert-controller.d.ts.map +1 -1
  40. package/core/controllers/inert-controller.js +25 -13
  41. package/core/controllers/media-matchers-controller.d.ts +29 -0
  42. package/core/controllers/media-matchers-controller.d.ts.map +1 -1
  43. package/core/controllers/media-matchers-controller.js +73 -23
  44. package/core/controllers.js +16 -14
  45. package/core/dom/contains-pierce-shadow-dom.d.ts +3 -0
  46. package/core/dom/contains-pierce-shadow-dom.d.ts.map +1 -0
  47. package/core/dom/contains-pierce-shadow-dom.js +12 -0
  48. package/core/dom/queue-dom-content-loaded.d.ts +5 -0
  49. package/core/dom/queue-dom-content-loaded.d.ts.map +1 -0
  50. package/core/dom/queue-dom-content-loaded.js +7 -0
  51. package/core/dom/set-or-remove-attribute.d.ts +14 -0
  52. package/core/dom/set-or-remove-attribute.d.ts.map +1 -1
  53. package/core/dom/set-or-remove-attribute.js +11 -3
  54. package/core/dom.d.ts +2 -0
  55. package/core/dom.d.ts.map +1 -1
  56. package/core/dom.js +28 -22
  57. package/core/images.d.ts +4 -0
  58. package/core/images.d.ts.map +1 -1
  59. package/core/images.js +12 -12
  60. package/core/mixins.js +10 -10
  61. package/core/overlay/overlay-outside-pointer-event-listener.d.ts +26 -0
  62. package/core/overlay/overlay-outside-pointer-event-listener.d.ts.map +1 -0
  63. package/core/overlay/overlay-outside-pointer-event-listener.js +37 -0
  64. package/core/overlay/position.d.ts +20 -0
  65. package/core/overlay/position.d.ts.map +1 -1
  66. package/core/overlay/position.js +34 -23
  67. package/core/overlay.d.ts +1 -0
  68. package/core/overlay.d.ts.map +1 -1
  69. package/core/overlay.js +15 -11
  70. package/core/styles/core.scss +46 -12
  71. package/core/styles/mixins/badge.scss +2 -2
  72. package/core/styles/mixins/buttons.scss +14 -14
  73. package/core/styles/mixins/card.scss +9 -6
  74. package/core/styles/mixins/chip.scss +8 -8
  75. package/core/styles/mixins/image.scss +3 -0
  76. package/core/styles/mixins/link.scss +12 -7
  77. package/core/styles/mixins/lists.scss +6 -4
  78. package/core/styles/mixins/overlay.scss +6 -3
  79. package/core/styles/mixins/panel.scss +3 -3
  80. package/core/styles/mixins/pearl-chain-bullet.scss +9 -5
  81. package/core/styles/mixins/scrollbar.scss +12 -6
  82. package/core/styles/mixins/shadows.scss +32 -64
  83. package/core/styles/mixins/table.scss +13 -10
  84. package/core/styles/mixins/timetable-form.scss +3 -3
  85. package/core/styles/mixins/typo.scss +4 -4
  86. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +49 -1
  87. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +203 -5
  88. package/core/styles/off-brand-theme.scss +3 -0
  89. package/core/styles/safety-theme.scss +3 -0
  90. package/core/styles/standard-theme.scss +3 -14
  91. package/core/styles/theme.scss +18 -0
  92. package/core.css +259 -21
  93. package/custom-elements.json +2117 -366
  94. package/date-input/date-input.component.js +1 -1
  95. package/datepicker/datepicker-next-day/datepicker-next-day.component.js +4 -4
  96. package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +6 -6
  97. package/datepicker/datepicker-toggle/datepicker-toggle.component.js +7 -7
  98. package/development/alert/alert/alert.component.d.ts +2 -0
  99. package/development/alert/alert/alert.component.d.ts.map +1 -1
  100. package/development/alert/alert/alert.component.js +22 -8
  101. package/development/autocomplete/autocomplete-base-element.js +23 -11
  102. package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +15 -14
  103. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +5 -4
  104. package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +19 -11
  105. package/development/breadcrumb/breadcrumb/breadcrumb.component.js +4 -1
  106. package/development/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +16 -8
  107. package/development/button/common.js +1 -1
  108. package/development/button/mini-button/mini-button.component.js +15 -14
  109. package/development/button/mini-button-group/mini-button-group.component.js +4 -4
  110. package/development/button.js +1 -1
  111. package/development/calendar/calendar.component.js +21 -11
  112. package/development/card/card/card.component.js +11 -6
  113. package/development/card/card-badge/card-badge.component.js +10 -9
  114. package/development/carousel/carousel/carousel.component.d.ts +1 -0
  115. package/development/carousel/carousel/carousel.component.d.ts.map +1 -1
  116. package/development/carousel/carousel/carousel.component.js +14 -4
  117. package/development/carousel/carousel-list/carousel-list.component.d.ts +2 -2
  118. package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
  119. package/development/carousel/carousel-list/carousel-list.component.js +29 -21
  120. package/development/checkbox/common.js +1 -1
  121. package/development/{checkbox-common-aMPOsPVA.js → checkbox-common-Dy_ofVhp.js} +4 -3
  122. package/development/checkbox.js +1 -1
  123. package/development/chip/chip/chip.component.js +15 -14
  124. package/development/chip-label/chip-label.component.js +12 -15
  125. package/development/clock/clock.component.js +11 -3
  126. package/development/container/container/container.component.js +6 -6
  127. package/development/container/sticky-bar/sticky-bar.component.js +6 -6
  128. package/development/core/base-elements/open-close-base-element.d.ts +2 -0
  129. package/development/core/base-elements/open-close-base-element.d.ts.map +1 -1
  130. package/development/core/base-elements/open-close-base-element.js +5 -1
  131. package/development/core/config/config.d.ts +6 -0
  132. package/development/core/config/config.d.ts.map +1 -1
  133. package/development/core/config/config.js +1 -1
  134. package/development/core/controllers/escapable-overlay-controller.js +2 -2
  135. package/development/core/controllers/inert-controller.d.ts +8 -1
  136. package/development/core/controllers/inert-controller.d.ts.map +1 -1
  137. package/development/core/controllers/inert-controller.js +49 -30
  138. package/development/core/controllers/media-matchers-controller.d.ts +29 -0
  139. package/development/core/controllers/media-matchers-controller.d.ts.map +1 -1
  140. package/development/core/controllers/media-matchers-controller.js +74 -1
  141. package/development/core/controllers.js +3 -1
  142. package/development/core/dom/contains-pierce-shadow-dom.d.ts +3 -0
  143. package/development/core/dom/contains-pierce-shadow-dom.d.ts.map +1 -0
  144. package/development/core/dom/contains-pierce-shadow-dom.js +14 -0
  145. package/development/core/dom/queue-dom-content-loaded.d.ts +5 -0
  146. package/development/core/dom/queue-dom-content-loaded.d.ts.map +1 -0
  147. package/development/core/dom/queue-dom-content-loaded.js +12 -0
  148. package/development/core/dom/set-or-remove-attribute.d.ts +14 -0
  149. package/development/core/dom/set-or-remove-attribute.d.ts.map +1 -1
  150. package/development/core/dom/set-or-remove-attribute.js +9 -1
  151. package/development/core/dom.d.ts +2 -0
  152. package/development/core/dom.d.ts.map +1 -1
  153. package/development/core/dom.js +8 -2
  154. package/development/core/images.d.ts +4 -0
  155. package/development/core/images.d.ts.map +1 -1
  156. package/development/core/images.js +11 -11
  157. package/development/core/mixins.js +7 -6
  158. package/development/core/overlay/overlay-outside-pointer-event-listener.d.ts +26 -0
  159. package/development/core/overlay/overlay-outside-pointer-event-listener.d.ts.map +1 -0
  160. package/development/core/overlay/overlay-outside-pointer-event-listener.js +61 -0
  161. package/development/core/overlay/position.d.ts +20 -0
  162. package/development/core/overlay/position.d.ts.map +1 -1
  163. package/development/core/overlay/position.js +41 -1
  164. package/development/core/overlay.d.ts +1 -0
  165. package/development/core/overlay.d.ts.map +1 -1
  166. package/development/core/overlay.js +6 -2
  167. package/development/date-input/date-input.component.js +2 -2
  168. package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +15 -14
  169. package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +15 -14
  170. package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +15 -14
  171. package/development/dialog/dialog/dialog.component.d.ts +1 -0
  172. package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
  173. package/development/dialog/dialog/dialog.component.js +28 -14
  174. package/development/dialog/dialog-actions/dialog-actions.component.js +1 -1
  175. package/development/dialog/dialog-title/dialog-title.component.js +1 -1
  176. package/development/divider/divider.component.js +2 -2
  177. package/development/expansion-panel/expansion-panel/expansion-panel.component.js +6 -6
  178. package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +6 -2
  179. package/development/file-selector/common.js +1 -1
  180. package/development/{file-selector-common-CRnQigIZ.js → file-selector-common-CRNAWFM_.js} +8 -5
  181. package/development/file-selector.js +1 -1
  182. package/development/flip-card/flip-card/flip-card.component.js +8 -3
  183. package/development/footer/footer.component.js +5 -4
  184. package/development/form-error/form-error.component.js +2 -2
  185. package/development/form-field/form-field/form-field.component.js +36 -22
  186. package/development/form-field/form-field-clear/form-field-clear.component.js +15 -14
  187. package/development/header/common/header-action-common.js +4 -4
  188. package/development/header/header/header.component.js +2 -2
  189. package/development/header/header-environment/header-environment.component.js +1 -1
  190. package/development/{icon-sidebar-button-common-CA_8TnFu.js → icon-sidebar-button-common-BGrKtvyM.js} +3 -2
  191. package/development/journey-header/journey-header.component.js +1 -1
  192. package/development/lead-container/lead-container.component.js +4 -2
  193. package/development/link/common/block-link-common.js +17 -5
  194. package/development/link/common/inline-link-common.js +9 -3
  195. package/development/link-list/link-list-anchor/link-list-anchor.component.js +11 -9
  196. package/development/loading-indicator/loading-indicator.component.js +1 -1
  197. package/development/loading-indicator-circle/loading-indicator-circle.component.js +2 -2
  198. package/development/logo/logo.component.js +3 -2
  199. package/development/map-container/map-container.component.js +14 -6
  200. package/development/menu/common/menu-action-common.d.ts.map +1 -1
  201. package/development/menu/common/menu-action-common.js +23 -5
  202. package/development/menu/menu/menu.component.d.ts +23 -10
  203. package/development/menu/menu/menu.component.d.ts.map +1 -1
  204. package/development/menu/menu/menu.component.js +237 -72
  205. package/development/message/message.component.js +3 -1
  206. package/development/navigation/common/navigation-action-common.js +4 -4
  207. package/development/navigation/navigation/navigation.component.js +21 -19
  208. package/development/navigation/navigation-list/navigation-list.component.js +1 -1
  209. package/development/navigation/navigation-marker/navigation-marker.component.js +1 -1
  210. package/development/navigation/navigation-section/navigation-section.component.js +3 -3
  211. package/development/notification/notification.component.js +38 -18
  212. package/development/option/optgroup/optgroup-base-element.js +3 -2
  213. package/development/option/option/option.component.js +16 -12
  214. package/development/option/option-hint/option-hint.component.js +3 -2
  215. package/development/overlay/overlay.component.d.ts.map +1 -1
  216. package/development/overlay/overlay.component.js +28 -22
  217. package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
  218. package/development/paginator/paginator/paginator.component.js +18 -17
  219. package/development/popover/popover/popover.component.js +8 -6
  220. package/development/popover/popover-trigger/popover-trigger.component.js +20 -17
  221. package/development/radio-button/common.js +1 -1
  222. package/development/radio-button/radio-button/radio-button.component.js +3 -3
  223. package/development/radio-button/radio-button-panel/radio-button-panel.component.js +3 -3
  224. package/development/{radio-button-common-454JtP9b.js → radio-button-common-CgM3kQSW.js} +9 -8
  225. package/development/radio-button.js +1 -1
  226. package/development/sbb-tokens-CVLcOi-S.js +1 -1
  227. package/development/select/select.component.js +31 -13
  228. package/development/selection-action-panel/selection-action-panel.component.js +9 -5
  229. package/development/selection-expansion-panel/selection-expansion-panel.component.js +10 -6
  230. package/development/sidebar/common.js +1 -1
  231. package/development/sidebar/icon-sidebar/icon-sidebar.component.js +2 -2
  232. package/development/sidebar/sidebar/sidebar.component.js +14 -6
  233. package/development/sidebar.js +1 -1
  234. package/development/signet/signet.component.js +2 -2
  235. package/development/skiplink-list/skiplink-list.component.d.ts +3 -1
  236. package/development/skiplink-list/skiplink-list.component.d.ts.map +1 -1
  237. package/development/skiplink-list/skiplink-list.component.js +26 -9
  238. package/development/slider/slider.component.js +15 -9
  239. package/development/status/status.component.js +7 -7
  240. package/development/stepper/step/step.component.js +1 -3
  241. package/development/stepper/step-label/step-label.component.js +7 -6
  242. package/development/stepper/stepper/stepper.component.js +5 -5
  243. package/development/tabs/tab/tab.component.d.ts +10 -4
  244. package/development/tabs/tab/tab.component.d.ts.map +1 -1
  245. package/development/tabs/tab/tab.component.js +15 -16
  246. package/development/tabs/tab-group/tab-group.component.d.ts +15 -14
  247. package/development/tabs/tab-group/tab-group.component.d.ts.map +1 -1
  248. package/development/tabs/tab-group/tab-group.component.js +46 -175
  249. package/development/tabs/tab-label/tab-label.component.d.ts +21 -2
  250. package/development/tabs/tab-label/tab-label.component.d.ts.map +1 -1
  251. package/development/tabs/tab-label/tab-label.component.js +97 -19
  252. package/development/tag/tag/tag.component.js +15 -9
  253. package/development/teaser/teaser.component.js +3 -2
  254. package/development/teaser-hero/teaser-hero.component.js +3 -3
  255. package/development/teaser-product/common.js +1 -1
  256. package/development/{teaser-product-common-D6fa6x3w.js → teaser-product-common-DvlBRkE_.js} +14 -6
  257. package/development/teaser-product.js +1 -1
  258. package/development/time-input/time-input.component.js +2 -2
  259. package/development/timetable-form/timetable-form/timetable-form.component.js +1 -1
  260. package/development/timetable-form/timetable-form-details/timetable-form-details.component.js +1 -1
  261. package/development/timetable-form/timetable-form-field/timetable-form-field.component.js +3 -3
  262. package/development/timetable-occupancy/timetable-occupancy.component.js +2 -2
  263. package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts +1 -0
  264. package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
  265. package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +4 -3
  266. package/development/title/title-base.js +2 -5
  267. package/development/title/title.component.js +1 -1
  268. package/development/toast/toast.component.d.ts +3 -1
  269. package/development/toast/toast.component.d.ts.map +1 -1
  270. package/development/toast/toast.component.js +31 -15
  271. package/development/toggle/toggle/toggle.component.js +8 -4
  272. package/development/toggle/toggle-option/toggle-option.component.js +5 -3
  273. package/development/toggle-check/toggle-check.component.js +13 -14
  274. package/development/tooltip/tooltip.component.d.ts +89 -0
  275. package/development/tooltip/tooltip.component.d.ts.map +1 -0
  276. package/development/tooltip/tooltip.component.js +473 -0
  277. package/development/tooltip.d.ts +5 -0
  278. package/development/tooltip.d.ts.map +1 -0
  279. package/development/tooltip.js +5 -0
  280. package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
  281. package/development/train/train-formation/train-formation.component.js +16 -4
  282. package/development/train/train-wagon/train-wagon.component.js +3 -12
  283. package/development/{transparent-button-COe-YB_U.js → transparent-button-DdSaBp_-.js} +141 -86
  284. package/development/visual-checkbox/visual-checkbox.component.js +12 -12
  285. package/dialog/dialog/dialog.component.d.ts +1 -0
  286. package/dialog/dialog/dialog.component.d.ts.map +1 -1
  287. package/dialog/dialog/dialog.component.js +37 -36
  288. package/dialog/dialog-actions/dialog-actions.component.js +6 -6
  289. package/dialog/dialog-title/dialog-title.component.js +4 -4
  290. package/divider/divider.component.js +16 -16
  291. package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
  292. package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +3 -3
  293. package/file-selector/common.js +1 -1
  294. package/file-selector-common-D88J9PEh.js +5 -0
  295. package/file-selector.js +1 -1
  296. package/flip-card/flip-card/flip-card.component.js +14 -14
  297. package/footer/footer.component.js +18 -18
  298. package/form-error/form-error.component.js +4 -4
  299. package/form-field/form-field/form-field.component.js +1 -1
  300. package/form-field/form-field-clear/form-field-clear.component.js +9 -9
  301. package/header/common/header-action-common.js +1 -1
  302. package/header/header/header.component.js +19 -19
  303. package/header/header-environment/header-environment.component.js +1 -1
  304. package/icon-sidebar-button-common-BeRXvifI.js +7 -0
  305. package/index.d.ts +2 -0
  306. package/index.js +2 -0
  307. package/journey-header/journey-header.component.js +1 -1
  308. package/lead-container/lead-container.component.js +5 -5
  309. package/link/common/block-link-common.js +23 -23
  310. package/link/common/inline-link-common.js +7 -7
  311. package/link-list/link-list-anchor/link-list-anchor.component.js +11 -11
  312. package/lists.css +5 -3
  313. package/loading-indicator/loading-indicator.component.js +1 -1
  314. package/loading-indicator-circle/loading-indicator-circle.component.js +13 -13
  315. package/logo/logo.component.js +9 -9
  316. package/map-container/map-container.component.js +15 -15
  317. package/menu/common/menu-action-common.d.ts.map +1 -1
  318. package/menu/common/menu-action-common.js +15 -12
  319. package/menu/menu/menu.component.d.ts +23 -10
  320. package/menu/menu/menu.component.d.ts.map +1 -1
  321. package/menu/menu/menu.component.js +156 -85
  322. package/message/message.component.js +9 -9
  323. package/navigation/common/navigation-action-common.js +6 -6
  324. package/navigation/navigation/navigation.component.js +19 -19
  325. package/navigation/navigation-list/navigation-list.component.js +1 -1
  326. package/navigation/navigation-marker/navigation-marker.component.js +1 -1
  327. package/navigation/navigation-section/navigation-section.component.js +1 -1
  328. package/notification/notification.component.js +8 -8
  329. package/off-brand-theme.css +3023 -0
  330. package/option/optgroup/optgroup-base-element.js +1 -1
  331. package/option/option/option.component.js +3 -3
  332. package/option/option-hint/option-hint.component.js +8 -8
  333. package/overlay/overlay.component.d.ts.map +1 -1
  334. package/overlay/overlay.component.js +47 -48
  335. package/package.json +14 -1
  336. package/paginator/compact-paginator/compact-paginator.component.js +4 -4
  337. package/paginator/paginator/paginator.component.js +10 -10
  338. package/popover/popover/popover.component.js +9 -9
  339. package/popover/popover-trigger/popover-trigger.component.js +5 -5
  340. package/radio-button/common.js +1 -1
  341. package/radio-button/radio-button/radio-button.component.js +13 -13
  342. package/radio-button/radio-button-panel/radio-button-panel.component.js +2 -2
  343. package/radio-button-common-Nm9ULjVb.js +5 -0
  344. package/radio-button.js +1 -1
  345. package/safety-theme.css +3023 -0
  346. package/scrollbar.css +52 -20
  347. package/select/select.component.js +45 -45
  348. package/selection-action-panel/selection-action-panel.component.js +6 -6
  349. package/selection-expansion-panel/selection-expansion-panel.component.js +11 -11
  350. package/sidebar/common.js +1 -1
  351. package/sidebar/icon-sidebar/icon-sidebar.component.js +12 -12
  352. package/sidebar/sidebar/sidebar.component.js +29 -29
  353. package/sidebar.js +1 -1
  354. package/signet/signet.component.js +1 -1
  355. package/skiplink-list/skiplink-list.component.d.ts +3 -1
  356. package/skiplink-list/skiplink-list.component.d.ts.map +1 -1
  357. package/skiplink-list/skiplink-list.component.js +37 -30
  358. package/slider/slider.component.js +16 -16
  359. package/standard-theme.css +340 -58
  360. package/status/status.component.js +13 -13
  361. package/stepper/step/step.component.js +5 -5
  362. package/stepper/step-label/step-label.component.js +1 -1
  363. package/stepper/stepper/stepper.component.js +7 -7
  364. package/table.css +15 -9
  365. package/tabs/tab/tab.component.d.ts +10 -4
  366. package/tabs/tab/tab.component.d.ts.map +1 -1
  367. package/tabs/tab/tab.component.js +22 -24
  368. package/tabs/tab-group/tab-group.component.d.ts +15 -14
  369. package/tabs/tab-group/tab-group.component.d.ts.map +1 -1
  370. package/tabs/tab-group/tab-group.component.js +68 -122
  371. package/tabs/tab-label/tab-label.component.d.ts +21 -2
  372. package/tabs/tab-label/tab-label.component.d.ts.map +1 -1
  373. package/tabs/tab-label/tab-label.component.js +88 -46
  374. package/tag/tag/tag.component.js +14 -14
  375. package/teaser/teaser.component.js +1 -1
  376. package/teaser-hero/teaser-hero.component.js +12 -12
  377. package/teaser-product/common.js +1 -1
  378. package/teaser-product-common-DIra6aVg.js +5 -0
  379. package/teaser-product.js +1 -1
  380. package/time-input/time-input.component.js +1 -1
  381. package/timetable-form/timetable-form/timetable-form.component.js +6 -6
  382. package/timetable-form/timetable-form-details/timetable-form-details.component.js +4 -4
  383. package/timetable-form/timetable-form-field/timetable-form-field.component.js +5 -5
  384. package/timetable-form.css +3 -3
  385. package/timetable-occupancy/timetable-occupancy.component.js +7 -7
  386. package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts +1 -0
  387. package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
  388. package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +23 -23
  389. package/title/title-base.js +1 -1
  390. package/title/title.component.js +1 -1
  391. package/toast/toast.component.d.ts +3 -1
  392. package/toast/toast.component.d.ts.map +1 -1
  393. package/toast/toast.component.js +67 -59
  394. package/toggle/toggle/toggle.component.js +1 -1
  395. package/toggle/toggle-option/toggle-option.component.js +5 -5
  396. package/toggle-check/toggle-check.component.js +16 -16
  397. package/tooltip/tooltip.component.d.ts +89 -0
  398. package/tooltip/tooltip.component.d.ts.map +1 -0
  399. package/tooltip/tooltip.component.js +220 -0
  400. package/tooltip.d.ts +5 -0
  401. package/tooltip.d.ts.map +1 -0
  402. package/tooltip.js +4 -0
  403. package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
  404. package/train/train-formation/train-formation.component.js +16 -16
  405. package/train/train-wagon/train-wagon.component.js +1 -1
  406. package/transparent-button-Bg9fU_iZ.js +9 -0
  407. package/typography.css +1 -0
  408. package/visual-checkbox/visual-checkbox.component.js +14 -14
  409. package/checkbox-common-CDzcyq8p.js +0 -5
  410. package/file-selector-common-OHK9hu3a.js +0 -5
  411. package/icon-sidebar-button-common-CM-ueEhH.js +0 -7
  412. package/radio-button-common-CUppr5FI.js +0 -5
  413. package/teaser-product-common-C8oSkIxy.js +0 -5
  414. package/transparent-button-xudJxob_.js +0 -9
@@ -1,51 +1,38 @@
1
- var g = (s) => {
2
- throw TypeError(s);
1
+ var v = (i) => {
2
+ throw TypeError(i);
3
3
  };
4
- var x = (s, a, n) => a.has(s) || g("Cannot " + n);
5
- var A = (s, a, n) => (x(s, a, "read from private field"), n ? n.call(s) : a.get(s)), T = (s, a, n) => a.has(s) ? g("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, n), d = (s, a, n, r) => (x(s, a, "write to private field"), r ? r.call(s, n) : a.set(s, n), n);
6
- import { __esDecorate as u, __runInitializers as b } from "tslib";
7
- import { MutationController as z } from "@lit-labs/observers/mutation-controller.js";
8
- import { ResizeController as y } from "@lit-labs/observers/resize-controller.js";
9
- import { css as E, LitElement as G, html as C } from "lit";
10
- import { customElement as w, property as I } from "lit/decorators.js";
11
- import { ref as k } from "lit/directives/ref.js";
12
- import { isArrowKeyPressed as R, getNextElementIndex as O } from "../../core/a11y.js";
4
+ var y = (i, a, s) => a.has(i) || v("Cannot " + s);
5
+ var x = (i, a, s) => (y(i, a, "read from private field"), s ? s.call(i) : a.get(i)), z = (i, a, s) => a.has(i) ? v("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(i) : a.set(i, s), d = (i, a, s, l) => (y(i, a, "write to private field"), l ? l.call(i, s) : a.set(i, s), s);
6
+ import { __esDecorate as h, __runInitializers as c } from "tslib";
7
+ import { ResizeController as E } from "@lit-labs/observers/resize-controller.js";
8
+ import { css as C, LitElement as k, html as w } from "lit";
9
+ import { customElement as R, property as S } from "lit/decorators.js";
10
+ import { ref as T } from "lit/directives/ref.js";
11
+ import { isArrowKeyPressed as G, getNextElementIndex as L } from "../../core/a11y.js";
13
12
  import { forceType as $ } from "../../core/decorators.js";
14
13
  import { isLean as D } from "../../core/dom.js";
15
- import { throttle as N } from "../../core/eventing.js";
16
- import { SbbHydrationMixin as K } from "../../core/mixins.js";
17
- import { SbbTabElement as M } from "../tab.js";
18
- const P = E`*,:before,:after{box-sizing:border-box}:host{--sbb-tab-group-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );display:block}.tab-group{display:flex;flex-wrap:wrap}.tab-content{margin-block-start:var(--sbb-spacing-responsive-m);transition:height var(--sbb-tab-group-animation-duration) var(--sbb-animation-easing)}.tab-content ::slotted(sbb-tab){visibility:hidden;opacity:0;height:0;overflow:hidden}.tab-content ::slotted(sbb-tab[active]){visibility:visible;opacity:1;height:fit-content;overflow:unset;transition-duration:var(--sbb-tab-group-animation-duration);transition-delay:var(--sbb-tab-group-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:opacity,visibility}.tab-content ::slotted(sbb-tab:focus-visible){outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}`, j = {
19
- attributeFilter: ["active", "disabled"]
20
- };
21
- let H = 0, it = (() => {
22
- var c, o;
23
- let s = [w("sbb-tab-group")], a, n = [], r, h = K(G), f = [], m, _, v = [], p = [];
24
- return o = class extends h {
14
+ import { throttle as O } from "../../core/eventing.js";
15
+ import { SbbHydrationMixin as A } from "../../core/mixins.js";
16
+ const K = C`*,:before,:after{box-sizing:border-box}:host{--sbb-tab-group-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );display:block}.sbb-tab-group{display:flex;flex-wrap:wrap}.sbb-tab-group-content{margin-block-start:var(--sbb-spacing-responsive-m);transition:height var(--sbb-tab-group-animation-duration) var(--sbb-animation-easing)}.sbb-tab-group-content ::slotted(sbb-tab){visibility:hidden;opacity:0;height:0;overflow:hidden}.sbb-tab-group-content ::slotted(sbb-tab[data-active]){visibility:visible;opacity:1;height:fit-content;overflow:unset;transition-duration:var(--sbb-tab-group-animation-duration);transition-delay:var(--sbb-tab-group-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:opacity,visibility}.sbb-tab-group-content ::slotted(sbb-tab:focus-visible){outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}`;
17
+ let V = (() => {
18
+ var r, o;
19
+ let i = [R("sbb-tab-group")], a, s = [], l, u = A(k), m = [], f, p, _ = [], g = [];
20
+ return o = class extends u {
25
21
  constructor() {
26
22
  super();
27
- T(this, c);
28
- this._tabs = (b(this, f), []), this._tabAttributeObserver = new z(this, {
29
- target: null,
30
- config: j,
31
- callback: (t) => this._onTabAttributesChange(t)
32
- }), this._tabGroupResizeObserver = new y(this, {
23
+ z(this, r);
24
+ this._tabGroupElement = c(this, m), this._tabGroupResizeObserver = new E(this, {
33
25
  target: null,
34
26
  skipInitial: !0,
35
27
  callback: (t) => this._onTabGroupElementResize(t)
36
- }), this._tabContentResizeObserver = new y(this, {
28
+ }), this._tabContentResizeObserver = new E(this, {
37
29
  target: null,
38
30
  skipInitial: !0,
39
31
  callback: (t) => this._onTabContentElementResize(t)
40
- }), this._size = D() ? "s" : "l", d(this, c, b(this, v, 0)), this._onContentSlotChange = (b(this, p), () => {
41
- this._tabContentElement = this.shadowRoot.querySelector("div.tab-content");
42
- const t = this._getTabs().filter((e) => !this._tabs.includes(e));
43
- t.length && (t.forEach((e) => this._configure(e)), this._tabs = this._tabs.concat(t), t.find((e) => e.active)?.tabGroupActions?.select());
44
- }), this._onTabsSlotChange = () => {
45
- const t = this._getTabs();
46
- t.length < this._tabs.length && (this._tabs.filter((i) => !t.includes(i)).forEach((i) => {
47
- i.tab?.remove();
48
- }), this._tabs = t), this._tabs.forEach((e) => e.setAttribute("data-size", this.size));
32
+ }), this._size = D() ? "s" : "l", d(this, r, c(this, _, 0)), this._onContentSlotChange = (c(this, g), () => {
33
+ this.labels.forEach((t) => t.linkToTab()), this.labels.find((t) => t.active)?.activate();
34
+ }), this._onLabelSlotChange = () => {
35
+ this._updateSize(), this.labels.forEach((t) => t.linkToTab());
49
36
  }, this.addEventListener?.("keydown", (t) => this._handleKeyDown(t));
50
37
  }
51
38
  /**
@@ -63,144 +50,103 @@ let H = 0, it = (() => {
63
50
  * the tab group, the first enabled tab will be selected.
64
51
  */
65
52
  get initialSelectedIndex() {
66
- return A(this, c);
53
+ return x(this, r);
67
54
  }
68
55
  set initialSelectedIndex(t) {
69
- d(this, c, t);
56
+ d(this, r, t);
57
+ }
58
+ /** Gets the slotted `sbb-tab-label`s. */
59
+ get labels() {
60
+ return Array.from(this.children ?? []).filter((t) => /^sbb-tab-label$/u.test(t.localName));
70
61
  }
71
62
  firstUpdated(t) {
72
- super.firstUpdated(t), this._tabs = this._getTabs(), this._tabs.forEach((e) => this._configure(e)), this._initSelection(), this._tabGroupResizeObserver.observe(this._tabGroupElement);
63
+ super.firstUpdated(t), this.labels.forEach((e) => e.linkToTab()), this._initSelection(), this._tabGroupResizeObserver.observe(this._tabGroupElement), this._tabContentResizeObserver.observe(this._tabContentElement);
73
64
  }
74
65
  /**
75
66
  * Disables a tab by index.
76
67
  * @param tabIndex The index of the tab you want to disable.
77
68
  */
78
69
  disableTab(t) {
79
- this._tabs[t]?.tabGroupActions?.disable();
70
+ this.labels[t] && (this.labels[t].disabled = !0);
80
71
  }
81
72
  /**
82
73
  * Enables a tab by index.
83
74
  * @param tabIndex The index of the tab you want to enable.
84
75
  */
85
76
  enableTab(t) {
86
- this._tabs[t]?.tabGroupActions?.enable();
77
+ this.labels[t] && (this.labels[t].disabled = !1);
87
78
  }
88
79
  /**
89
80
  * Activates a tab by index.
90
81
  * @param tabIndex The index of the tab you want to activate.
91
82
  */
92
83
  activateTab(t) {
93
- this._tabs[t]?.tabGroupActions?.select();
94
- }
95
- _getTabs() {
96
- return Array.from(this.children ?? []).filter((t) => /^sbb-tab-label$/u.test(t.localName));
84
+ this.labels[t]?.activate();
97
85
  }
98
86
  _enabledTabs() {
99
- return this._tabs.filter((t) => !t.hasAttribute("disabled"));
87
+ return this.labels.filter((t) => (customElements.upgrade(t), !t.disabled));
100
88
  }
101
89
  _updateSize() {
102
- for (const t of this._tabs)
103
- t.setAttribute("data-size", this.size);
104
- }
105
- _assignId() {
106
- return `sbb-tab-panel-${++H}`;
90
+ this.labels.forEach((t) => t.setAttribute("data-size", this.size));
107
91
  }
108
92
  _initSelection() {
109
- this.initialSelectedIndex >= 0 && this.initialSelectedIndex < this._tabs.length && !this._tabs[this.initialSelectedIndex].disabled ? this._tabs[this.initialSelectedIndex].tabGroupActions?.select() : this._enabledTabs()[0]?.tabGroupActions?.select();
110
- }
111
- _onTabAttributesChange(t) {
112
- for (const e of t) {
113
- if (e.type !== "attributes")
114
- return;
115
- const i = e.target;
116
- e.attributeName === "disabled" && (i.hasAttribute("disabled") && i !== this._selectedTab ? i.tabGroupActions?.disable() : i.disabled && i.tabGroupActions?.enable()), e.attributeName === "active" && (i.hasAttribute("active") && !i.disabled ? i.tabGroupActions?.select() : i === this._selectedTab && i.toggleAttribute("active", !0));
93
+ const t = this.labels[this.initialSelectedIndex];
94
+ if (t && (customElements.upgrade(t), this.initialSelectedIndex >= 0 && this.initialSelectedIndex < this.labels.length && !t.disabled)) {
95
+ t.activate();
96
+ return;
117
97
  }
98
+ this._enabledTabs()[0]?.activate();
118
99
  }
119
100
  _onTabGroupElementResize(t) {
120
101
  for (const e of t) {
121
- const i = e.target.firstElementChild.assignedElements();
122
- for (const l of i)
123
- l.toggleAttribute("data-has-divider", l === i[0] || l.offsetLeft === i[0].offsetLeft), this.style.setProperty("--sbb-tab-group-width", `${this._tabGroupElement.clientWidth}px`);
102
+ const n = e.target.firstElementChild.assignedElements();
103
+ for (const b of n)
104
+ b.toggleAttribute("data-has-divider", b === n[0] || b.offsetLeft === n[0].offsetLeft), this.style.setProperty("--sbb-tab-group-width", `${this._tabGroupElement.clientWidth}px`);
124
105
  }
125
106
  }
126
107
  _onTabContentElementResize(t) {
127
108
  if (this._tabContentElement)
128
109
  for (const e of t) {
129
- const i = Math.floor(e.contentRect.height);
130
- this._tabContentElement.style.height = `${i}px`;
131
- }
132
- }
133
- _configure(t) {
134
- t.tabGroupActions = {
135
- activate: () => {
136
- t.toggleAttribute("active", !0), t.active = !0, t.tabIndex = 0, t.setAttribute("aria-selected", "true"), t.tab?.toggleAttribute("active", !0);
137
- },
138
- deactivate: () => {
139
- t.removeAttribute("active"), t.active = !1, t.tabIndex = -1, t.setAttribute("aria-selected", "false"), t.tab?.removeAttribute("active");
140
- },
141
- disable: () => {
142
- t.disabled || (t.hasAttribute("disabled") || t.toggleAttribute("disabled", !0), t.disabled = !0, t.tabIndex = -1, t.setAttribute("aria-selected", "false"), t.tab?.removeAttribute("active"), t.active && (t.removeAttribute("active"), t.active = !1, this._enabledTabs()[0]?.tabGroupActions?.select()));
143
- },
144
- enable: () => {
145
- t.disabled && (t.removeAttribute("disabled"), t.disabled = !1);
146
- },
147
- select: () => {
148
- if (t !== this._selectedTab && !t.disabled) {
149
- const e = this._selectedTab;
150
- e && (e.tabGroupActions?.deactivate(), this._tabContentResizeObserver.unobserve(e.tab)), t.tabGroupActions?.activate(), this._selectedTab = t, this._tabContentResizeObserver.observe(t.tab);
151
- const i = this._tabs;
152
- this.dispatchEvent(new CustomEvent("tabchange", {
153
- bubbles: !0,
154
- composed: !0,
155
- detail: {
156
- activeIndex: i.findIndex((l) => l === t),
157
- activeTabLabel: t,
158
- activeTab: t.tab,
159
- previousIndex: i.findIndex((l) => l === e),
160
- previousTabLabel: e,
161
- previousTab: e?.tab
162
- }
163
- }));
164
- }
110
+ const n = Math.floor(e.contentRect.height);
111
+ this._tabContentElement.style.height = `${n}px`;
165
112
  }
166
- }, t.nextElementSibling?.localName === "sbb-tab" && (t.tab = t.nextElementSibling, t.tab.id = this._assignId(), t.tab instanceof M && (t.tab.tabIndex = 0, t.tab.configure())), t.tabIndex = -1, t.disabled = t.hasAttribute("disabled"), t.active = t.hasAttribute("active") && !t.disabled, t.setAttribute("aria-selected", String(t.active)), t.addEventListener("click", () => {
167
- t.tabGroupActions?.select();
168
- }), t.tab && (t.setAttribute("aria-controls", t.tab.id), t.tab.toggleAttribute("active", t.active)), this._tabAttributeObserver.observe(t), t.slot = "tab-bar";
169
113
  }
170
114
  _handleKeyDown(t) {
171
115
  const e = this._enabledTabs();
172
116
  if (!(!e || // don't trap nested handling
173
- t.target !== this && t.target.parentElement !== this) && R(t)) {
174
- const i = e.findIndex((S) => S.active), l = O(t, i, e.length);
175
- e[l]?.tabGroupActions?.select(), e[l]?.focus(), t.preventDefault();
117
+ t.target !== this && t.target.parentElement !== this) && G(t)) {
118
+ const n = e.findIndex((I) => I.active), b = L(t, n, e.length);
119
+ e[b]?.activate(), e[b]?.focus(), t.preventDefault();
176
120
  }
177
121
  }
178
122
  render() {
179
- return C`
123
+ return w`
180
124
  <div
181
- class="tab-group"
125
+ class="sbb-tab-group"
182
126
  role="tablist"
183
- ${k((t) => this._tabGroupElement = t)}
127
+ ${T((t) => this._tabGroupElement = t)}
184
128
  >
185
- <slot name="tab-bar" @slotchange=${this._onTabsSlotChange}></slot>
129
+ <slot name="tab-bar" @slotchange=${this._onLabelSlotChange}></slot>
186
130
  </div>
187
-
188
- <div class="tab-content">
189
- <slot @slotchange=${N(this._onContentSlotChange, 150)}></slot>
131
+ <div
132
+ class="sbb-tab-group-content"
133
+ ${T((t) => this._tabContentElement = t)}
134
+ >
135
+ <slot @slotchange=${O(this._onContentSlotChange, 150)}></slot>
190
136
  </div>
191
137
  `;
192
138
  }
193
- }, c = new WeakMap(), r = o, (() => {
194
- const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
195
- m = [I()], _ = [$(), I({ attribute: "initial-selected-index", type: Number })], u(o, null, m, { kind: "setter", name: "size", static: !1, private: !1, access: { has: (e) => "size" in e, set: (e, i) => {
196
- e.size = i;
197
- } }, metadata: t }, null, f), u(o, null, _, { kind: "accessor", name: "initialSelectedIndex", static: !1, private: !1, access: { has: (e) => "initialSelectedIndex" in e, get: (e) => e.initialSelectedIndex, set: (e, i) => {
198
- e.initialSelectedIndex = i;
199
- } }, metadata: t }, v, p), u(null, a = { value: r }, s, { kind: "class", name: r.name, metadata: t }, null, n), r = a.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
200
- })(), o.styles = P, o.events = {
139
+ }, r = new WeakMap(), l = o, (() => {
140
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
141
+ f = [S()], p = [$(), S({ attribute: "initial-selected-index", type: Number })], h(o, null, f, { kind: "setter", name: "size", static: !1, private: !1, access: { has: (e) => "size" in e, set: (e, n) => {
142
+ e.size = n;
143
+ } }, metadata: t }, null, m), h(o, null, p, { kind: "accessor", name: "initialSelectedIndex", static: !1, private: !1, access: { has: (e) => "initialSelectedIndex" in e, get: (e) => e.initialSelectedIndex, set: (e, n) => {
144
+ e.initialSelectedIndex = n;
145
+ } }, metadata: t }, _, g), h(null, a = { value: l }, i, { kind: "class", name: l.name, metadata: t }, null, s), l = a.value, t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
146
+ })(), o.styles = K, o.events = {
201
147
  tabchange: "tabchange"
202
- }, b(r, n), r;
148
+ }, c(l, s), l;
203
149
  })();
204
150
  export {
205
- it as SbbTabGroupElement
151
+ V as SbbTabGroupElement
206
152
  };
@@ -1,5 +1,7 @@
1
- import { CSSResultGroup, TemplateResult, LitElement } from 'lit';
1
+ import { CSSResultGroup, PropertyValues, TemplateResult, LitElement } from 'lit';
2
2
  import { SbbTitleLevel } from '../../title.js';
3
+ import { SbbTabElement } from '../tab/tab.component.js';
4
+ import { SbbTabGroupElement } from '../tab-group.js';
3
5
  declare const SbbTabLabelElement_base: import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbDisabledMixinType> & import('../../core/mixins.js').AbstractConstructor<import('../../icon.js').SbbIconNameMixinType> & import('../../core/mixins.js').AbstractConstructor<import('../../core/mixins.js').SbbElementInternalsMixinType> & typeof LitElement & import('../../core/mixins.js').SbbElementInternalsConstructor;
4
6
  /**
5
7
  * Combined with a `sbb-tab-group`, it displays a tab's title.
@@ -11,15 +13,32 @@ declare const SbbTabLabelElement_base: import('../../core/mixins.js').AbstractCo
11
13
  export declare class SbbTabLabelElement extends SbbTabLabelElement_base {
12
14
  static role: string;
13
15
  static styles: CSSResultGroup;
16
+ /** Whether the tab is selected. */
17
+ private _selected;
14
18
  /**
15
19
  * The level will correspond to the heading tag generated in the title.
16
20
  * Use this property to generate the appropriate header tag, taking SEO into consideration.
17
21
  */
18
22
  accessor level: SbbTitleLevel;
19
- /** Active tab state */
23
+ /** Active tab state. */
20
24
  accessor active: boolean;
21
25
  /** Amount displayed inside the tab. */
22
26
  accessor amount: string;
27
+ /** Get the `sbb-tab` related to the `sbb-tab-label`. */
28
+ get tab(): SbbTabElement | null;
29
+ /** Get the parent `sbb-tab-group`. */
30
+ get group(): SbbTabGroupElement | null;
31
+ constructor();
32
+ connectedCallback(): void;
33
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
34
+ /** Deactivate the tab. */
35
+ deactivate(): void;
36
+ /** Select the tab, deactivating the current selected one, and dispatch the tabchange event. */
37
+ activate(): void;
38
+ /**
39
+ * @internal
40
+ */
41
+ protected linkToTab(): void;
23
42
  protected render(): TemplateResult;
24
43
  }
25
44
  declare global {
@@ -1 +1 @@
1
- {"version":3,"file":"tab-label.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/tabs/tab-label/tab-label.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;;AAIpD;;;;;;GAMG;AACH,qBAGM,kBAAmB,SAAQ,uBAEhC;IACC,OAAuB,IAAI,SAAS;IACpC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;OAGG;IACH,SAA4B,KAAK,EAAE,aAAa,CAAO;IAEvD,uBAAuB;IACvB,SAEgB,MAAM,EAAE,OAAO,CAAS;IAExC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,MAAM,CAAM;cAEjB,MAAM,IAAI,cAAc;CAoB5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,kBAAkB,CAAC;KACrC;CACF"}
1
+ {"version":3,"file":"tab-label.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/tabs/tab-label/tab-label.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAOjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAA6B,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;;AAIrF;;;;;;GAMG;AACH,qBAGM,kBAAmB,SAAQ,uBAEhC;IACC,OAAuB,IAAI,SAAS;IACpC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,mCAAmC;IACnC,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;OAGG;IACH,SAA4B,KAAK,EAAE,aAAa,CAAO;IAEvD,wBAAwB;IACxB,SAEgB,MAAM,EAAE,OAAO,CAAS;IAExC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,MAAM,CAAM;IAEpC,wDAAwD;IACxD,IAAW,GAAG,IAAI,aAAa,GAAG,IAAI,CAIrC;IAED,sCAAsC;IACtC,IAAW,KAAK,IAAI,kBAAkB,GAAG,IAAI,CAE5C;;IAQe,iBAAiB,IAAI,IAAI;cAMtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAuB5E,0BAA0B;IACnB,UAAU,IAAI,IAAI;IAMzB,+FAA+F;IACxF,QAAQ,IAAI,IAAI;IAiCvB;;OAEG;IACH,SAAS,CAAC,SAAS,IAAI,IAAI;cAYR,MAAM,IAAI,cAAc;CAoB5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,kBAAkB,CAAC;KACrC;CACF"}
@@ -1,56 +1,98 @@
1
- var I = (t) => {
2
- throw TypeError(t);
1
+ var E = (a) => {
2
+ throw TypeError(a);
3
3
  };
4
- var B = (t, e, s) => e.has(t) || I("Cannot " + s);
5
- var m = (t, e, s) => (B(t, e, "read from private field"), s ? s.call(t) : e.get(t)), d = (t, e, s) => e.has(t) ? I("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), f = (t, e, s, l) => (B(t, e, "write to private field"), l ? l.call(t, s) : e.set(t, s), s);
6
- import { __esDecorate as h, __runInitializers as i } from "tslib";
7
- import { css as D, LitElement as G } from "lit";
8
- import { customElement as M, property as u } from "lit/decorators.js";
9
- import { unsafeStatic as E, html as N } from "lit/static-html.js";
10
- import { slotState as j, forceType as $, omitEmptyConverter as A } from "../../core/decorators.js";
11
- import { SbbDisabledMixin as L, SbbElementInternalsMixin as O } from "../../core/mixins.js";
12
- import { SbbIconNameMixin as C } from "../../icon.js";
13
- const P = D`*,:before,:after{box-sizing:border-box}:host{--sbb-tab-label-height: var(--sbb-size-element-m);--sbb-tab-label-color: var(--sbb-color-granite);--sbb-tab-label-icon-color: var(--sbb-color-black);--sbb-tab-label-background-color: var(--sbb-color-white);--sbb-tab-label-cursor: pointer;--sbb-tab-label-pointer-events: unset;--sbb-tab-label-inset: 0;--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xs);--sbb-tab-label-marker-transform: scale(0);--sbb-tab-label-text-decoration: none;--sbb-tab-label-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tab-label-animation-easing: var(--sbb-animation-easing);--sbb-tab-label-amount-color: var(--sbb-color-metal);display:inline-block;max-width:100%;pointer-events:var(--sbb-tab-label-pointer-events);-webkit-tap-highlight-color:transparent;outline:none!important}@media (forced-colors: active){:host{--sbb-tab-label-color: ButtonText;--sbb-tab-label-icon-color: ButtonText;--sbb-tab-label-amount-color: ButtonText}}:host([data-size=s]){--sbb-tab-label-height: var(--sbb-size-element-xs);--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xxxs)}:host([disabled]){--sbb-tab-label-icon-color: var(--sbb-color-granite);--sbb-tab-label-background-color: var(--sbb-color-milk);--sbb-tab-label-cursor: unset;--sbb-tab-label-pointer-events: none;--sbb-tab-label-text-decoration: line-through}@media (forced-colors: active){:host([disabled]){--sbb-tab-label-color: GrayText;--sbb-tab-label-icon-color: GrayText;--sbb-tab-label-amount-color: GrayText}}:host([active]:not([disabled])){--sbb-tab-label-color: var(--sbb-color-charcoal);--sbb-tab-label-icon-color: var(--sbb-tab-label-color);--sbb-tab-label-background-color: var(--sbb-color-black);--sbb-tab-label-cursor: unset;--sbb-tab-label-pointer-events: none;--sbb-tab-label-marker-transform: scale(1)}@media (forced-colors: active){:host([active]:not([disabled])){--sbb-tab-label-color: ButtonText;--sbb-tab-label-icon-color: ButtonText;--sbb-tab-label-amount-color: ButtonText}}@media (any-hover: hover){:host(:hover:not([disabled])){--sbb-tab-label-marker-transform: scale(1)}}:host(:is([data-active],:active)){--sbb-tab-label-color: var(--sbb-color-charcoal)}.sbb-tab-label__wrapper{position:relative}:host(:focus-visible) .sbb-tab-label__wrapper:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);content:"";position:absolute;display:block;inset:0;z-index:1;border-radius:calc(var(--sbb-border-radius-2x) - var(--sbb-focus-outline-offset))}.sbb-tab-label{position:relative;margin:0;min-height:var(--sbb-tab-label-height);display:flex;align-items:center;padding-inline:var(--sbb-tab-label-inline-padding);gap:var(--sbb-spacing-fixed-2x);-webkit-user-select:none;user-select:none;cursor:var(--sbb-tab-label-cursor);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);color:var(--sbb-tab-label-icon-color)}:host([data-has-divider]) .sbb-tab-label:after{content:"";position:absolute;inset-inline-start:0;inset-block-end:0;width:var(--sbb-tab-group-width);height:var(--sbb-border-width-1x);background-color:var(--sbb-color-cloud)}.sbb-tab-label:before{position:absolute;content:"";inset-inline:0;inset-block-end:0;height:var(--sbb-border-width-3x);background-color:var(--sbb-tab-label-color);transform:var(--sbb-tab-label-marker-transform);transition-duration:var(--sbb-tab-label-animation-duration);transition-timing-function:var(--sbb-tab-label-animation-easing);transition-property:transform,background-color;z-index:1}.sbb-tab-label__icon,.sbb-tab-label__text,.sbb-tab-label__amount{text-decoration:var(--sbb-tab-label-text-decoration)}.sbb-tab-label__icon{display:flex;flex-shrink:0;color:var(--sbb-tab-label-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing)}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-tab-label__icon{display:none}.sbb-tab-label__text{color:var(--sbb-tab-label-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host([data-size=s]) .sbb-tab-label__text{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host([data-size=xl]) .sbb-tab-label__text{--sbb-text-font-size: var(--sbb-font-size-text-xl);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host(:not([data-slot-names~=unnamed])) .sbb-tab-label__text{display:none}.sbb-tab-label__amount{display:flex;color:var(--sbb-tab-label-amount-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}:host(:not([data-slot-names~=amount],[amount])) .sbb-tab-label__amount{display:none}:host([data-size=s]) .sbb-tab-label__amount{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}:host([data-size=xl]) .sbb-tab-label__amount{--sbb-text-font-size: var(--sbb-font-size-text-xl);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}`;
14
- let W = (() => {
15
- var n, r, c, o;
16
- let t = [M("sbb-tab-label"), j()], e, s = [], l, p = L(C(O(G))), x, g = [], _ = [], y, z = [], w = [], k, T = [], S = [];
17
- return o = class extends p {
4
+ var S = (a, b, s) => b.has(a) || E("Cannot " + s);
5
+ var h = (a, b, s) => (S(a, b, "read from private field"), s ? s.call(a) : b.get(a)), m = (a, b, s) => b.has(a) ? E("Cannot add the same private member more than once") : b instanceof WeakSet ? b.add(a) : b.set(a, s), n = (a, b, s, o) => (S(a, b, "write to private field"), o ? o.call(a, s) : b.set(a, s), s);
6
+ import { __esDecorate as u, __runInitializers as r } from "tslib";
7
+ import { css as B, LitElement as C } from "lit";
8
+ import { customElement as A, property as f } from "lit/decorators.js";
9
+ import { unsafeStatic as L, html as D } from "lit/static-html.js";
10
+ import { slotState as M, forceType as $, omitEmptyConverter as N } from "../../core/decorators.js";
11
+ import { SbbDisabledMixin as G, SbbElementInternalsMixin as j } from "../../core/mixins.js";
12
+ import { SbbIconNameMixin as O } from "../../icon.js";
13
+ const U = B`*,:before,:after{box-sizing:border-box}:host{--sbb-tab-label-height: var(--sbb-size-element-m);--sbb-tab-label-color: var(--sbb-color-granite);--sbb-tab-label-color: light-dark(var(--sbb-color-granite), var(--sbb-color-graphite));--sbb-tab-label-line-color: var(--sbb-border-color-4-inverted);--sbb-tab-label-cursor: pointer;--sbb-tab-label-pointer-events: unset;--sbb-tab-label-inset: 0;--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xs);--sbb-tab-label-marker-transform: scale(0);--sbb-tab-label-text-decoration: none;--sbb-tab-label-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tab-label-animation-easing: var(--sbb-animation-easing);--sbb-tab-label-amount-color: var(--sbb-color-metal);--sbb-tab-label-amount-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));display:inline-block;max-width:100%;pointer-events:var(--sbb-tab-label-pointer-events);-webkit-tap-highlight-color:transparent;outline:none!important}@media (forced-colors: active){:host{--sbb-tab-label-color: ButtonText;--sbb-tab-label-amount-color: ButtonText}}:host([data-size=s]){--sbb-tab-label-height: var(--sbb-size-element-xs);--sbb-tab-label-inline-padding: var(--sbb-spacing-responsive-xxxs)}:host([disabled]){--sbb-tab-label-cursor: unset;--sbb-tab-label-pointer-events: none;--sbb-tab-label-text-decoration: line-through}@media (forced-colors: active){:host([disabled]){--sbb-tab-label-color: GrayText;--sbb-tab-label-amount-color: GrayText}}:host([active]:not([disabled])){--sbb-tab-label-color: var(--sbb-color-3);--sbb-tab-label-cursor: unset;--sbb-tab-label-pointer-events: none;--sbb-tab-label-marker-transform: scale(1)}@media (forced-colors: active){:host([active]:not([disabled])){--sbb-tab-label-color: ButtonText;--sbb-tab-label-amount-color: ButtonText}}@media (any-hover: hover){:host(:hover:not([disabled])){--sbb-tab-label-marker-transform: scale(1)}}:host(:is([data-active],:active)){--sbb-tab-label-color: var(--sbb-color-3)}.sbb-tab-label__wrapper{position:relative}:host(:focus-visible) .sbb-tab-label__wrapper:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);content:"";position:absolute;display:block;inset:0;z-index:1;border-radius:calc(var(--sbb-border-radius-2x) - var(--sbb-focus-outline-offset))}.sbb-tab-label{position:relative;margin:0;min-height:var(--sbb-tab-label-height);display:flex;align-items:center;padding-inline:var(--sbb-tab-label-inline-padding);gap:var(--sbb-spacing-fixed-2x);-webkit-user-select:none;user-select:none;cursor:var(--sbb-tab-label-cursor);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing)}:host([data-has-divider]) .sbb-tab-label:after{content:"";position:absolute;inset-inline-start:0;inset-block-end:0;width:var(--sbb-tab-group-width);height:var(--sbb-border-width-1x);background-color:var(--sbb-tab-label-line-color)}.sbb-tab-label:before{position:absolute;content:"";inset-inline:0;inset-block-end:0;height:var(--sbb-border-width-3x);background-color:var(--sbb-tab-label-color);transform:var(--sbb-tab-label-marker-transform);transition-duration:var(--sbb-tab-label-animation-duration);transition-timing-function:var(--sbb-tab-label-animation-easing);transition-property:transform,background-color;z-index:1}.sbb-tab-label__icon,.sbb-tab-label__text,.sbb-tab-label__amount{text-decoration:var(--sbb-tab-label-text-decoration)}.sbb-tab-label__icon{display:flex;flex-shrink:0;color:var(--sbb-tab-label-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing)}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-tab-label__icon{display:none}.sbb-tab-label__text{color:var(--sbb-tab-label-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host([data-size=s]) .sbb-tab-label__text{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host([data-size=xl]) .sbb-tab-label__text{--sbb-text-font-size: var(--sbb-font-size-text-xl);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host(:not([data-slot-names~=unnamed])) .sbb-tab-label__text{display:none}.sbb-tab-label__amount{display:flex;color:var(--sbb-tab-label-amount-color);transition:color var(--sbb-tab-label-animation-duration) var(--sbb-tab-label-animation-easing);--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}:host(:not([data-slot-names~=amount],[amount])) .sbb-tab-label__amount{display:none}:host([data-size=s]) .sbb-tab-label__amount{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}:host([data-size=xl]) .sbb-tab-label__amount{--sbb-text-font-size: var(--sbb-font-size-text-xl);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}`;
14
+ let X = (() => {
15
+ var c, v, d, i;
16
+ let a = [A("sbb-tab-label"), M()], b, s = [], o, p = G(O(j(C))), g, x = [], _ = [], y, z = [], w = [], k, T = [], I = [];
17
+ return i = class extends p {
18
18
  constructor() {
19
- super(...arguments);
20
- d(this, n, i(this, g, "1"));
21
- d(this, r, (i(this, _), i(this, z, !1)));
22
- d(this, c, (i(this, w), i(this, T, "")));
23
- i(this, S);
19
+ super();
20
+ m(this, c);
21
+ m(this, v);
22
+ m(this, d);
23
+ this._selected = !1, n(this, c, r(this, x, "1")), n(this, v, (r(this, _), r(this, z, !1))), n(this, d, (r(this, w), r(this, T, ""))), r(this, I), this.addEventListener("click", () => this.activate());
24
24
  }
25
25
  /**
26
26
  * The level will correspond to the heading tag generated in the title.
27
27
  * Use this property to generate the appropriate header tag, taking SEO into consideration.
28
28
  */
29
29
  get level() {
30
- return m(this, n);
30
+ return h(this, c);
31
31
  }
32
- set level(b) {
33
- f(this, n, b);
32
+ set level(t) {
33
+ n(this, c, t);
34
34
  }
35
- /** Active tab state */
35
+ /** Active tab state. */
36
36
  get active() {
37
- return m(this, r);
37
+ return h(this, v);
38
38
  }
39
- set active(b) {
40
- f(this, r, b);
39
+ set active(t) {
40
+ n(this, v, t);
41
41
  }
42
42
  /** Amount displayed inside the tab. */
43
43
  get amount() {
44
- return m(this, c);
44
+ return h(this, d);
45
45
  }
46
- set amount(b) {
47
- f(this, c, b);
46
+ set amount(t) {
47
+ n(this, d, t);
48
+ }
49
+ /** Get the `sbb-tab` related to the `sbb-tab-label`. */
50
+ get tab() {
51
+ return this.nextElementSibling?.localName === "sbb-tab" ? this.nextElementSibling : null;
52
+ }
53
+ /** Get the parent `sbb-tab-group`. */
54
+ get group() {
55
+ return this.closest("sbb-tab-group");
56
+ }
57
+ connectedCallback() {
58
+ super.connectedCallback(), this.slot = "tab-bar", this.tabIndex = this.active ? 0 : -1;
59
+ }
60
+ willUpdate(t) {
61
+ super.willUpdate(t), t.has("active") && (this.internals.ariaSelected = `${this.active}`, this.tab?.toggleAttribute("data-active", this.active), this.active && !this.disabled ? this.activate() : this.deactivate()), t.has("disabled") && this.disabled && (this.tabIndex = -1, this.active && (this.deactivate(), this.group?.activateTab(0)));
62
+ }
63
+ /** Deactivate the tab. */
64
+ deactivate() {
65
+ this.active = !1, this._selected = !1, this.tabIndex = -1;
66
+ }
67
+ /** Select the tab, deactivating the current selected one, and dispatch the tabchange event. */
68
+ activate() {
69
+ if (this.disabled)
70
+ return;
71
+ const t = this.group?.labels || [], e = t.find((l) => l._selected);
72
+ e !== this && (e?.deactivate(), this.active = !0, this._selected = !0, this.tabIndex = 0, this.tab?.dispatchEvent(new Event("active", { bubbles: !0, composed: !0 })), this.group?.dispatchEvent(new CustomEvent("tabchange", {
73
+ bubbles: !0,
74
+ composed: !0,
75
+ detail: {
76
+ activeIndex: t.findIndex((l) => l === this),
77
+ activeTabLabel: this,
78
+ activeTab: this.tab,
79
+ previousIndex: t.findIndex((l) => l === e),
80
+ previousTabLabel: e,
81
+ previousTab: e?.tab
82
+ }
83
+ })));
84
+ }
85
+ /**
86
+ * @internal
87
+ */
88
+ linkToTab() {
89
+ this.tab && (this.internals.ariaControlsElements = [this.tab]);
48
90
  }
49
91
  render() {
50
- const b = `h${Number(this.level) < 7 ? this.level : "1"}`;
51
- return N`
92
+ const t = `h${Number(this.level) < 7 ? this.level : "1"}`;
93
+ return D`
52
94
  <div class="sbb-tab-label__wrapper">
53
- <${E(b)} class="sbb-tab-label">
95
+ <${L(t)} class="sbb-tab-label">
54
96
  <span class="sbb-tab-label__icon">
55
97
  ${this.renderIconSlot()}
56
98
  </span>
@@ -60,21 +102,21 @@ let W = (() => {
60
102
  <span class="sbb-tab-label__amount">
61
103
  <slot name="amount">${this.amount}</slot>
62
104
  </span>
63
- </${E(b)}>
105
+ </${L(t)}>
64
106
  </div>
65
107
  `;
66
108
  }
67
- }, n = new WeakMap(), r = new WeakMap(), c = new WeakMap(), l = o, (() => {
68
- const b = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
69
- x = [u()], y = [$(), u({ reflect: !0, type: Boolean })], k = [$(), u({ reflect: !0, converter: A })], h(o, null, x, { kind: "accessor", name: "level", static: !1, private: !1, access: { has: (a) => "level" in a, get: (a) => a.level, set: (a, v) => {
70
- a.level = v;
71
- } }, metadata: b }, g, _), h(o, null, y, { kind: "accessor", name: "active", static: !1, private: !1, access: { has: (a) => "active" in a, get: (a) => a.active, set: (a, v) => {
72
- a.active = v;
73
- } }, metadata: b }, z, w), h(o, null, k, { kind: "accessor", name: "amount", static: !1, private: !1, access: { has: (a) => "amount" in a, get: (a) => a.amount, set: (a, v) => {
74
- a.amount = v;
75
- } }, metadata: b }, T, S), h(null, e = { value: l }, t, { kind: "class", name: l.name, metadata: b }, null, s), l = e.value, b && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: b });
76
- })(), o.role = "tab", o.styles = P, i(l, s), l;
109
+ }, c = new WeakMap(), v = new WeakMap(), d = new WeakMap(), o = i, (() => {
110
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
111
+ g = [f()], y = [$(), f({ reflect: !0, type: Boolean })], k = [$(), f({ reflect: !0, converter: N })], u(i, null, g, { kind: "accessor", name: "level", static: !1, private: !1, access: { has: (e) => "level" in e, get: (e) => e.level, set: (e, l) => {
112
+ e.level = l;
113
+ } }, metadata: t }, x, _), u(i, null, y, { kind: "accessor", name: "active", static: !1, private: !1, access: { has: (e) => "active" in e, get: (e) => e.active, set: (e, l) => {
114
+ e.active = l;
115
+ } }, metadata: t }, z, w), u(i, null, k, { kind: "accessor", name: "amount", static: !1, private: !1, access: { has: (e) => "amount" in e, get: (e) => e.amount, set: (e, l) => {
116
+ e.amount = l;
117
+ } }, metadata: t }, T, I), u(null, b = { value: o }, a, { kind: "class", name: o.name, metadata: t }, null, s), o = b.value, t && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
118
+ })(), i.role = "tab", i.styles = U, r(o, s), o;
77
119
  })();
78
120
  export {
79
- W as SbbTabLabelElement
121
+ X as SbbTabLabelElement
80
122
  };
@@ -1,8 +1,8 @@
1
1
  var D = (a) => {
2
2
  throw TypeError(a);
3
3
  };
4
- var G = (a, s, i) => s.has(a) || D("Cannot " + i);
5
- var u = (a, s, i) => (G(a, s, "read from private field"), i ? i.call(a) : s.get(a)), v = (a, s, i) => s.has(a) ? D("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, i), n = (a, s, i, b) => (G(a, s, "write to private field"), b ? b.call(a, i) : s.set(a, i), i);
4
+ var G = (a, s, r) => s.has(a) || D("Cannot " + r);
5
+ var u = (a, s, r) => (G(a, s, "read from private field"), r ? r.call(a) : s.get(a)), v = (a, s, r) => s.has(a) ? D("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, r), n = (a, s, r, b) => (G(a, s, "write to private field"), b ? b.call(a, r) : s.set(a, r), r);
6
6
  import { __esDecorate as m, __runInitializers as l } from "tslib";
7
7
  import { css as V, html as $ } from "lit";
8
8
  import { customElement as A, property as f } from "lit/decorators.js";
@@ -11,11 +11,11 @@ import { slotState as L, forceType as F, omitEmptyConverter as O, getOverride as
11
11
  import { isLean as M } from "../../core/dom.js";
12
12
  import { SbbDisabledTabIndexActionMixin as R } from "../../core/mixins.js";
13
13
  import { SbbIconNameMixin as U } from "../../icon.js";
14
- const Y = V`*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;max-width:100%;--sbb-tag-border-radius: var(--sbb-border-radius-infinity);--sbb-tag-background-color: var(--sbb-color-white);--sbb-tag-border-color: var(--sbb-color-cloud);--sbb-tag-border-style: solid;--sbb-tag-border-width: var(--sbb-border-width-1x);--sbb-tag-text-color: var(--sbb-color-charcoal);--sbb-tag-amount-color: var(--sbb-color-metal);--sbb-tag-height: var(--sbb-size-element-xs);--sbb-tag-inset: 0;--sbb-tag-cursor: pointer;--sbb-tag-content-shift: translateY(0);--sbb-tag-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tag-animation-easing: var(--sbb-animation-easing);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-5x);--sbb-tag-gap: var(--sbb-spacing-fixed-2x)}@media (forced-colors: active){:host{--sbb-tag-background-color: Canvas !important;--sbb-tag-text-color: ButtonText;--sbb-tag-amount-color: ButtonText;--sbb-tag-border-color: CanvasText;--sbb-tag-border-width: var(--sbb-border-width-2x)}}:host([data-checked]){--sbb-tag-border-color: var(--sbb-color-charcoal);--sbb-tag-border-width: var(--sbb-border-width-2x)}@media (forced-colors: active){:host([data-checked]){--sbb-tag-border-color: Highlight !important}}:host(:is(:disabled,[disabled-interactive])){--sbb-tag-text-color: var(--sbb-color-granite);--sbb-tag-amount-color: var(--sbb-tag-text-color);--sbb-tag-background-color: var(--sbb-color-milk);--sbb-tag-border-color: var(--sbb-color-cement);--sbb-tag-border-style: dashed;--sbb-tag-cursor: unset;--sbb-tag-pointer-events: none}@media (forced-colors: active){:host(:is(:disabled,[disabled-interactive])){--sbb-tag-text-color: GrayText;--sbb-tag-amount-color: GrayText;--sbb-tag-border-color: GrayText}}:host([data-checked]:is(:disabled,[disabled-interactive])){--sbb-tag-border-color: var(--sbb-color-metal)}@media (any-hover: hover){:host(:hover:not(:disabled,[disabled-interactive],:active,[data-active])){--sbb-tag-background-color: var(--sbb-color-milk);--sbb-tag-inset: calc(var(--sbb-border-width-2x) * -1);--sbb-tag-content-shift: translateY(calc(var(--sbb-border-width-1x) * -1))}}@media (any-hover: hover) and (forced-colors: active){:host(:hover:not(:disabled,[disabled-interactive],:active,[data-active])){--sbb-tag-border-color: Highlight}}:host(:is(:active,[data-active]):not(:disabled,[disabled-interactive])){--sbb-tag-background-color: var(--sbb-color-milk);--sbb-tag-border-color: var(--sbb-color-iron);--sbb-tag-border-width: var(--sbb-border-width-2x);--sbb-tag-text-color: var(--sbb-color-iron)}@media (forced-colors: active){:host(:is(:active,[data-active]):not(:disabled,[disabled-interactive])){--sbb-tag-border-color: Highlight;--sbb-tag-text-color: ButtonText}}:host([size=s]){--sbb-tag-height: var(--sbb-size-element-xxxs);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-3x)}.sbb-tag{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700;position:relative;display:flex;align-items:center;height:var(--sbb-tag-height);max-width:100%;gap:var(--sbb-tag-gap);padding-inline:var(--sbb-tag-padding-inline);cursor:var(--sbb-tag-cursor);border-radius:var(--sbb-tag-border-radius);color:var(--sbb-tag-text-color);transition:color var(--sbb-tag-animation-duration) var(--sbb-tag-animation-easing);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;pointer-events:var(--sbb-tag-pointer-events, unset)}.sbb-tag:before{content:"";position:absolute;inset:var(--sbb-tag-inset);background-color:var(--sbb-tag-background-color);border:var(--sbb-tag-border-width) var(--sbb-tag-border-style) var(--sbb-tag-border-color);border-radius:var(--sbb-tag-border-radius);transition-duration:var(--sbb-tag-animation-duration);transition-timing-function:var(--sbb-tag-animation-easing);transition-property:inset,background-color,border-color,box-shadow}:host(:focus-visible) .sbb-tag:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-tag__icon{display:flex;align-items:center;height:calc(var(--sbb-typo-line-height-body-text) * 1em);flex-shrink:0}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-tag__icon{display:none}.sbb-tag__text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sbb-tag__amount{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-tag-amount-color)}:host(:not([data-slot-names~=amount],[amount])) .sbb-tag__amount{display:none}.sbb-tag--shift{transition:transform var(--sbb-tag-animation-duration) var(--sbb-tag-animation-easing);transform:var(--sbb-tag-content-shift);will-change:transform}`;
14
+ const Y = V`*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;max-width:100%;--sbb-tag-border-radius: var(--sbb-border-radius-infinity);--sbb-tag-background-color: var(--sbb-background-color-1);--sbb-tag-border-color: var(--sbb-border-color-4-inverted);--sbb-tag-border-style: solid;--sbb-tag-border-width: var(--sbb-border-width-1x);--sbb-tag-text-color: var(--sbb-color-2);--sbb-tag-amount-color: var(--sbb-color-metal);--sbb-tag-amount-color: light-dark(var(--sbb-color-metal), var(--sbb-color-smoke));--sbb-tag-height: var(--sbb-size-element-xs);--sbb-tag-inset: 0;--sbb-tag-cursor: pointer;--sbb-tag-content-shift: translateY(0);--sbb-tag-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-tag-animation-easing: var(--sbb-animation-easing);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-5x);--sbb-tag-gap: var(--sbb-spacing-fixed-2x)}@media (forced-colors: active){:host{--sbb-tag-background-color: Canvas !important;--sbb-tag-text-color: ButtonText;--sbb-tag-amount-color: ButtonText;--sbb-tag-border-color: CanvasText;--sbb-tag-border-width: var(--sbb-border-width-2x)}}:host([data-checked]){--sbb-tag-border-color: var(--sbb-border-color-3);--sbb-tag-border-width: var(--sbb-border-width-2x)}@media (forced-colors: active){:host([data-checked]){--sbb-tag-border-color: Highlight !important}}:host(:is(:disabled,[disabled-interactive])){--sbb-tag-text-color: var(--sbb-color-granite);--sbb-tag-text-color: light-dark(var(--sbb-color-granite), var(--sbb-color-aluminium));--sbb-tag-amount-color: var(--sbb-tag-text-color);--sbb-tag-background-color: var(--sbb-background-color-3);--sbb-tag-border-color: var(--sbb-color-cement);--sbb-tag-border-color: light-dark(var(--sbb-color-cement), var(--sbb-color-smoke));--sbb-tag-border-style: dashed;--sbb-tag-cursor: unset;--sbb-tag-pointer-events: none}@media (forced-colors: active){:host(:is(:disabled,[disabled-interactive])){--sbb-tag-text-color: GrayText;--sbb-tag-amount-color: GrayText;--sbb-tag-border-color: GrayText}}:host([data-checked]:is(:disabled,[disabled-interactive])){--sbb-tag-border-color: var(--sbb-color-metal);--sbb-tag-border-color: light-dark(var(--sbb-color-metal), var(--sbb-color-cement));--sbb-tag-border-style: dashed}@media (any-hover: hover){:host(:hover:not(:disabled,[disabled-interactive],:active,[data-active])){--sbb-tag-background-color: var(--sbb-background-color-3);--sbb-tag-inset: calc(var(--sbb-border-width-2x) * -1);--sbb-tag-content-shift: translateY(calc(var(--sbb-border-width-1x) * -1))}}@media (any-hover: hover) and (forced-colors: active){:host(:hover:not(:disabled,[disabled-interactive],:active,[data-active])){--sbb-tag-border-color: Highlight}}:host(:is(:active,[data-active]):not(:disabled,[disabled-interactive])){--sbb-tag-background-color: var(--sbb-background-color-3);--sbb-tag-border-color: var(--sbb-color-iron);--sbb-tag-border-color: light-dark(var(--sbb-color-iron), var(--sbb-color-storm));--sbb-tag-border-width: var(--sbb-border-width-2x);--sbb-tag-text-color: var(--sbb-color-4)}@media (forced-colors: active){:host(:is(:active,[data-active]):not(:disabled,[disabled-interactive])){--sbb-tag-border-color: Highlight;--sbb-tag-text-color: ButtonText}}:host([size=s]){--sbb-tag-height: var(--sbb-size-element-xxxs);--sbb-tag-padding-inline: var(--sbb-spacing-fixed-3x)}.sbb-tag{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700;position:relative;display:flex;align-items:center;height:var(--sbb-tag-height);max-width:100%;gap:var(--sbb-tag-gap);padding-inline:var(--sbb-tag-padding-inline);cursor:var(--sbb-tag-cursor);border-radius:var(--sbb-tag-border-radius);color:var(--sbb-tag-text-color);transition:color var(--sbb-tag-animation-duration) var(--sbb-tag-animation-easing);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;pointer-events:var(--sbb-tag-pointer-events, unset)}.sbb-tag:before{content:"";position:absolute;inset:var(--sbb-tag-inset);background-color:var(--sbb-tag-background-color);border:var(--sbb-tag-border-width) var(--sbb-tag-border-style) var(--sbb-tag-border-color);border-radius:var(--sbb-tag-border-radius);transition-duration:var(--sbb-tag-animation-duration);transition-timing-function:var(--sbb-tag-animation-easing);transition-property:inset,background-color,border-color,box-shadow}:host(:focus-visible) .sbb-tag:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-tag__icon{display:flex;align-items:center;height:calc(var(--sbb-typo-line-height-body-text) * 1em);flex-shrink:0}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-tag__icon{display:none}.sbb-tag__text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sbb-tag__amount{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-tag-amount-color)}:host(:not([data-slot-names~=amount],[amount])) .sbb-tag__amount{display:none}.sbb-tag--shift{transition:transform var(--sbb-tag-animation-duration) var(--sbb-tag-animation-easing);transform:var(--sbb-tag-content-shift);will-change:transform}`;
15
15
  let et = (() => {
16
- var c, d, h, g, r;
17
- let a = [A("sbb-tag"), L()], s, i = [], b, p = U(R(H)), x, _ = [], k = [], y, z = [], w = [], E, S = [], C = [], T, I = [], B = [];
18
- return r = class extends p {
16
+ var c, d, h, g, i;
17
+ let a = [A("sbb-tag"), L()], s, r = [], b, p = U(R(H)), x, _ = [], k = [], y, z = [], w = [], E, S = [], C = [], T, I = [], B = [];
18
+ return i = class extends p {
19
19
  constructor() {
20
20
  super();
21
21
  v(this, c);
@@ -105,22 +105,22 @@ let et = (() => {
105
105
  </span>
106
106
  `;
107
107
  }
108
- }, c = new WeakMap(), d = new WeakMap(), h = new WeakMap(), g = new WeakMap(), b = r, (() => {
108
+ }, c = new WeakMap(), d = new WeakMap(), h = new WeakMap(), g = new WeakMap(), b = i, (() => {
109
109
  const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
110
- x = [f()], y = [F(), f({ reflect: !0, converter: O })], E = [F(), f({ reflect: !1, type: Boolean })], T = [f({ reflect: !0 }), j((t, o) => t._group?.size ?? o)], m(r, null, x, { kind: "accessor", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, get: (t) => t.value, set: (t, o) => {
110
+ x = [f()], y = [F(), f({ reflect: !0, converter: O })], E = [F(), f({ reflect: !1, type: Boolean })], T = [f({ reflect: !0 }), j((t, o) => t._group?.size ?? o)], m(i, null, x, { kind: "accessor", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, get: (t) => t.value, set: (t, o) => {
111
111
  t.value = o;
112
- } }, metadata: e }, _, k), m(r, null, y, { kind: "accessor", name: "amount", static: !1, private: !1, access: { has: (t) => "amount" in t, get: (t) => t.amount, set: (t, o) => {
112
+ } }, metadata: e }, _, k), m(i, null, y, { kind: "accessor", name: "amount", static: !1, private: !1, access: { has: (t) => "amount" in t, get: (t) => t.amount, set: (t, o) => {
113
113
  t.amount = o;
114
- } }, metadata: e }, z, w), m(r, null, E, { kind: "accessor", name: "checked", static: !1, private: !1, access: { has: (t) => "checked" in t, get: (t) => t.checked, set: (t, o) => {
114
+ } }, metadata: e }, z, w), m(i, null, E, { kind: "accessor", name: "checked", static: !1, private: !1, access: { has: (t) => "checked" in t, get: (t) => t.checked, set: (t, o) => {
115
115
  t.checked = o;
116
- } }, metadata: e }, S, C), m(r, null, T, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, o) => {
116
+ } }, metadata: e }, S, C), m(i, null, T, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, o) => {
117
117
  t.size = o;
118
- } }, metadata: e }, I, B), m(null, s = { value: b }, a, { kind: "class", name: b.name, metadata: e }, null, i), b = s.value, e && Object.defineProperty(b, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
119
- })(), r.styles = Y, r.events = {
118
+ } }, metadata: e }, I, B), m(null, s = { value: b }, a, { kind: "class", name: b.name, metadata: e }, null, r), b = s.value, e && Object.defineProperty(b, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
119
+ })(), i.styles = Y, i.events = {
120
120
  input: "input",
121
121
  didChange: "didChange",
122
122
  change: "change"
123
- }, l(b, i), b;
123
+ }, l(b, r), b;
124
124
  })();
125
125
  export {
126
126
  et as SbbTagElement