@sbb-esta/lyne-elements 2.0.3 → 2.2.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 (266) hide show
  1. package/accordion/accordion.d.ts.map +1 -1
  2. package/accordion.js +6 -6
  3. package/action-group.js +3 -3
  4. package/alert/alert.js +8 -8
  5. package/autocomplete/autocomplete-base-element.d.ts +4 -0
  6. package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  7. package/autocomplete-grid/autocomplete-grid-button.js +4 -4
  8. package/autocomplete-grid/autocomplete-grid-cell.js +3 -3
  9. package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
  10. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
  11. package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
  12. package/autocomplete-grid/autocomplete-grid-option.js +10 -10
  13. package/autocomplete-grid/autocomplete-grid-row.js +5 -5
  14. package/autocomplete.js +99 -90
  15. package/breadcrumb/breadcrumb-group.js +5 -5
  16. package/button/accent-button-link.js +9 -9
  17. package/button/accent-button-static.js +6 -6
  18. package/button/accent-button.js +6 -6
  19. package/button/button-link.js +7 -7
  20. package/button/button-static.js +7 -7
  21. package/button/button.js +8 -8
  22. package/button/common.js +15 -15
  23. package/button/mini-button-group.js +8 -8
  24. package/button/secondary-button-link.js +7 -7
  25. package/button/secondary-button-static.js +7 -7
  26. package/button/secondary-button.js +3 -3
  27. package/button/transparent-button-link.js +6 -6
  28. package/button/transparent-button-static.js +5 -5
  29. package/button/transparent-button.js +6 -6
  30. package/card/card-badge.js +11 -11
  31. package/card/card-button.js +5 -5
  32. package/card/card-link.js +7 -7
  33. package/card/card.js +3 -3
  34. package/checkbox/checkbox-panel.js +16 -16
  35. package/checkbox/checkbox.js +15 -15
  36. package/checkbox/common.js +3 -3
  37. package/chip-label.js +3 -3
  38. package/clock.js +10 -10
  39. package/container/container/container.d.ts +1 -1
  40. package/container/container/container.d.ts.map +1 -1
  41. package/container/container.js +23 -23
  42. package/container/sticky-bar/sticky-bar.d.ts +1 -1
  43. package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
  44. package/container/sticky-bar.js +4 -4
  45. package/core/a11y/focus.d.ts.map +1 -1
  46. package/core/a11y.js +8 -8
  47. package/core/base-elements/link-base-element.d.ts +2 -0
  48. package/core/base-elements/link-base-element.d.ts.map +1 -1
  49. package/core/base-elements.js +125 -114
  50. package/core/controllers.js +4 -4
  51. package/core/datetime/date-adapter.d.ts +1 -1
  52. package/core/datetime/date-adapter.d.ts.map +1 -1
  53. package/core/datetime/native-date-adapter.d.ts +1 -1
  54. package/core/datetime/native-date-adapter.d.ts.map +1 -1
  55. package/core/datetime.js +6 -6
  56. package/core/dom/scroll.d.ts +1 -0
  57. package/core/dom/scroll.d.ts.map +1 -1
  58. package/core/dom.js +35 -35
  59. package/core/eventing.js +4 -4
  60. package/core/images.d.ts.map +1 -1
  61. package/core/mixins.js +18 -18
  62. package/core/styles/core.scss +23 -2
  63. package/core/testing.js +14 -14
  64. package/core.css +20 -2
  65. package/custom-elements.json +828 -431
  66. package/datepicker/common/datepicker-association-controllers.d.ts +21 -0
  67. package/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
  68. package/datepicker/common/datepicker-button.d.ts +17 -9
  69. package/datepicker/common/datepicker-button.d.ts.map +1 -1
  70. package/datepicker/common.d.ts +1 -0
  71. package/datepicker/common.d.ts.map +1 -1
  72. package/datepicker/common.js +130 -92
  73. package/datepicker/datepicker/datepicker.d.ts +19 -4
  74. package/datepicker/datepicker/datepicker.d.ts.map +1 -1
  75. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
  76. package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  77. package/datepicker/datepicker-toggle.js +106 -113
  78. package/datepicker/datepicker.js +95 -80
  79. package/development/accordion/accordion.d.ts.map +1 -1
  80. package/development/accordion.js +1 -1
  81. package/development/action-group.js +1 -1
  82. package/development/autocomplete/autocomplete-base-element.d.ts +4 -0
  83. package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
  84. package/development/autocomplete-grid/autocomplete-grid-cell.js +1 -1
  85. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +1 -1
  86. package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
  87. package/development/autocomplete-grid/autocomplete-grid-option.js +3 -3
  88. package/development/autocomplete-grid/autocomplete-grid-row.js +1 -1
  89. package/development/autocomplete.js +37 -8
  90. package/development/breadcrumb/breadcrumb-group.js +3 -3
  91. package/development/button/common.js +69 -70
  92. package/development/calendar.js +1 -1
  93. package/development/card/card-badge.js +1 -1
  94. package/development/card/card.js +1 -1
  95. package/development/chip-label.js +1 -1
  96. package/development/clock.js +1 -1
  97. package/development/container/container/container.d.ts +1 -1
  98. package/development/container/container/container.d.ts.map +1 -1
  99. package/development/container/container.js +18 -2
  100. package/development/container/sticky-bar/sticky-bar.d.ts +1 -1
  101. package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
  102. package/development/container/sticky-bar.js +9 -1
  103. package/development/core/a11y/focus.d.ts.map +1 -1
  104. package/development/core/a11y.js +3 -3
  105. package/development/core/base-elements/link-base-element.d.ts +2 -0
  106. package/development/core/base-elements/link-base-element.d.ts.map +1 -1
  107. package/development/core/base-elements.js +22 -5
  108. package/development/core/controllers.js +1 -1
  109. package/development/core/datetime/date-adapter.d.ts +1 -1
  110. package/development/core/datetime/date-adapter.d.ts.map +1 -1
  111. package/development/core/datetime/native-date-adapter.d.ts +1 -1
  112. package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
  113. package/development/core/datetime.js +1 -1
  114. package/development/core/dom/scroll.d.ts +1 -0
  115. package/development/core/dom/scroll.d.ts.map +1 -1
  116. package/development/core/dom.js +4 -1
  117. package/development/core/images.d.ts.map +1 -1
  118. package/development/core/mixins.js +1 -1
  119. package/development/datepicker/common/datepicker-association-controllers.d.ts +21 -0
  120. package/development/datepicker/common/datepicker-association-controllers.d.ts.map +1 -0
  121. package/development/datepicker/common/datepicker-button.d.ts +17 -9
  122. package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
  123. package/development/datepicker/common.d.ts +1 -0
  124. package/development/datepicker/common.d.ts.map +1 -1
  125. package/development/datepicker/common.js +139 -90
  126. package/development/datepicker/datepicker/datepicker.d.ts +19 -4
  127. package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
  128. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +14 -8
  129. package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
  130. package/development/datepicker/datepicker-toggle.js +76 -73
  131. package/development/datepicker/datepicker.js +55 -37
  132. package/development/dialog/dialog/dialog.d.ts +2 -0
  133. package/development/dialog/dialog/dialog.d.ts.map +1 -1
  134. package/development/dialog/dialog-content.js +1 -1
  135. package/development/dialog/dialog.js +38 -12
  136. package/development/expansion-panel/expansion-panel-content.js +1 -1
  137. package/development/flip-card/flip-card-details.js +1 -1
  138. package/development/flip-card/flip-card-summary.js +1 -1
  139. package/development/icon.js +1 -1
  140. package/development/image.js +2 -2
  141. package/development/lead-container.js +1 -1
  142. package/development/link-list/link-list-anchor.js +1 -1
  143. package/development/link-list/link-list.js +1 -1
  144. package/development/loading-indicator-circle.js +1 -1
  145. package/development/loading-indicator.js +1 -1
  146. package/development/map-container.js +1 -1
  147. package/development/menu/menu/menu.d.ts.map +1 -1
  148. package/development/menu/menu.js +35 -12
  149. package/development/message.js +1 -1
  150. package/development/navigation/navigation/navigation.d.ts.map +1 -1
  151. package/development/navigation/navigation.js +15 -8
  152. package/development/notification.js +1 -1
  153. package/development/option/optgroup.js +1 -1
  154. package/development/option/option/option-base-element.d.ts +3 -2
  155. package/development/option/option/option-base-element.d.ts.map +1 -1
  156. package/development/option/option.js +16 -9
  157. package/development/overlay/overlay-base-element.d.ts.map +1 -1
  158. package/development/overlay/overlay.d.ts.map +1 -1
  159. package/development/overlay.js +29 -13
  160. package/development/paginator/paginator.js +1 -1
  161. package/development/popover/popover/popover.d.ts.map +1 -1
  162. package/development/popover/popover.js +16 -13
  163. package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  164. package/development/radio-button/radio-button-group.js +2 -2
  165. package/development/{sbb-tokens-BdGhUJjM.js → sbb-tokens-CSAKTXUi.js} +15 -15
  166. package/development/screen-reader-only.js +1 -1
  167. package/development/select/select.d.ts +11 -0
  168. package/development/select/select.d.ts.map +1 -1
  169. package/development/select.js +60 -9
  170. package/development/signet.js +1 -1
  171. package/development/stepper/step.js +1 -1
  172. package/development/tabs/tab.js +1 -1
  173. package/development/time-input.js +1 -1
  174. package/development/title/title-base.d.ts.map +1 -1
  175. package/development/title.js +4 -5
  176. package/development/toast/toast.d.ts.map +1 -1
  177. package/development/toast.js +14 -8
  178. package/development/toggle/toggle.js +2 -2
  179. package/development/train/train-blocked-passage.js +1 -1
  180. package/development/train/train-wagon.js +1 -1
  181. package/dialog/dialog/dialog.d.ts +2 -0
  182. package/dialog/dialog/dialog.d.ts.map +1 -1
  183. package/dialog/dialog-content.js +4 -4
  184. package/dialog/dialog-title.js +8 -8
  185. package/dialog/dialog.js +59 -49
  186. package/divider.js +12 -12
  187. package/expansion-panel/expansion-panel-content.js +3 -3
  188. package/file-selector/file-selector-dropzone.js +5 -5
  189. package/file-selector/file-selector.js +6 -6
  190. package/flip-card/flip-card-details.js +7 -7
  191. package/flip-card/flip-card-summary.js +12 -12
  192. package/header/header-button.js +5 -5
  193. package/header/header-link.js +5 -5
  194. package/icon.js +37 -37
  195. package/image.js +16 -16
  196. package/lead-container.js +3 -3
  197. package/link/block-link-button.js +4 -4
  198. package/link/block-link-static.js +9 -9
  199. package/link/block-link.js +4 -4
  200. package/link/common.js +16 -16
  201. package/link/link-button.js +7 -7
  202. package/link/link-static.js +7 -7
  203. package/link/link.js +4 -4
  204. package/link-list/common.js +12 -12
  205. package/link-list/link-list-anchor.js +3 -3
  206. package/link-list/link-list.js +3 -3
  207. package/loading-indicator-circle.js +14 -14
  208. package/loading-indicator.js +3 -3
  209. package/map-container.js +6 -6
  210. package/menu/common.js +7 -7
  211. package/menu/menu/menu.d.ts.map +1 -1
  212. package/menu/menu-button.js +8 -8
  213. package/menu/menu-link.js +6 -6
  214. package/menu/menu.js +64 -42
  215. package/message.js +3 -3
  216. package/navigation/navigation/navigation.d.ts.map +1 -1
  217. package/navigation/navigation-button.js +4 -4
  218. package/navigation/navigation-link.js +7 -7
  219. package/navigation/navigation-list.js +4 -4
  220. package/navigation/navigation-marker.js +3 -3
  221. package/navigation/navigation.js +21 -20
  222. package/notification.js +19 -19
  223. package/option/optgroup.js +14 -14
  224. package/option/option/option-base-element.d.ts +3 -2
  225. package/option/option/option-base-element.d.ts.map +1 -1
  226. package/option/option.js +115 -103
  227. package/overlay/overlay-base-element.d.ts.map +1 -1
  228. package/overlay/overlay.d.ts.map +1 -1
  229. package/overlay.js +87 -84
  230. package/package.json +1 -1
  231. package/paginator/common.js +6 -6
  232. package/paginator/paginator.js +1 -1
  233. package/popover/popover/popover.d.ts.map +1 -1
  234. package/popover/popover.js +73 -73
  235. package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
  236. package/radio-button/radio-button-group.js +1 -1
  237. package/radio-button/radio-button-panel.js +5 -5
  238. package/{sbb-tokens-Dx20OtVg.js → sbb-tokens-BgDF8jIh.js} +14 -14
  239. package/screen-reader-only.js +8 -8
  240. package/select/select.d.ts +11 -0
  241. package/select/select.d.ts.map +1 -1
  242. package/select.js +111 -83
  243. package/signet.js +1 -1
  244. package/slider.js +8 -8
  245. package/standard-theme.css +20 -2
  246. package/status.js +3 -3
  247. package/stepper/step-label.js +4 -4
  248. package/stepper/step.js +3 -3
  249. package/table/table-wrapper.js +4 -4
  250. package/tabs/tab-group.js +24 -24
  251. package/tabs/tab.js +4 -4
  252. package/tag/tag-group.js +7 -7
  253. package/teaser-product/common.js +5 -5
  254. package/teaser-product/teaser-product-static.js +2 -2
  255. package/time-input.js +3 -3
  256. package/timetable-occupancy-icon.js +3 -3
  257. package/timetable-occupancy.js +6 -6
  258. package/title/title-base.d.ts.map +1 -1
  259. package/title.js +41 -42
  260. package/toast/toast.d.ts.map +1 -1
  261. package/toast.js +58 -54
  262. package/toggle/toggle-option.js +11 -11
  263. package/toggle/toggle.js +3 -3
  264. package/toggle-check.js +5 -5
  265. package/train/train-blocked-passage.js +3 -3
  266. package/train/train.js +28 -28
package/toast.js CHANGED
@@ -4,30 +4,32 @@ var w = (i) => {
4
4
  var $ = (i, o, e) => o.has(i) || w("Cannot " + e);
5
5
  var u = (i, o, e) => ($(i, o, "read from private field"), e ? e.call(i) : o.get(i)), f = (i, o, e) => o.has(i) ? w("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, e), b = (i, o, e, r) => ($(i, o, "write to private field"), r ? r.call(i, e) : o.set(i, e), e);
6
6
  import { __esDecorate as g, __runInitializers as c } from "tslib";
7
- import { css as K, html as D, nothing as L } from "lit";
8
- import { customElement as P, property as _ } from "lit/decorators.js";
7
+ import { css as R, html as D, nothing as L } from "lit";
8
+ import { customElement as K, property as _ } from "lit/decorators.js";
9
9
  import { SbbOpenCloseBaseElement as Y } from "./core/base-elements.js";
10
10
  import { SbbLanguageController as Z } from "./core/controllers.js";
11
- import { slotState as j, forceType as R } from "./core/decorators.js";
12
- import { isFirefox as U, isZeroAnimationDuration as H, isLean as M } from "./core/dom.js";
13
- import { composedPathHasAttribute as F } from "./core/eventing.js";
14
- import { i18nCloseAlert as X } from "./core/i18n.js";
15
- import { SbbHydrationMixin as q } from "./core/mixins.js";
16
- import { SbbIconNameMixin as G } from "./icon.js";
11
+ import { hostAttributes as j, slotState as U, forceType as P } from "./core/decorators.js";
12
+ import { isFirefox as H, isZeroAnimationDuration as M, isLean as F } from "./core/dom.js";
13
+ import { composedPathHasAttribute as X } from "./core/eventing.js";
14
+ import { i18nCloseAlert as q } from "./core/i18n.js";
15
+ import { SbbHydrationMixin as G } from "./core/mixins.js";
16
+ import { SbbIconNameMixin as J } from "./icon.js";
17
17
  import "./button/transparent-button.js";
18
- const J = K`*,:before,:after{box-sizing:border-box}:host{--sbb-toast-max-width: 25rem;--sbb-toast-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-toast-animation-timing-function: ease;--sbb-toast-color: var(--sbb-color-white);--sbb-toast-text-color: var(--sbb-color-milk);--sbb-toast-background-color: var(--sbb-color-midnight);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-toast-margin: var(--sbb-spacing-responsive-s);--sbb-toast-padding-block: var(--sbb-spacing-responsive-xxxs);--sbb-toast-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-toast-border-radius: var(--sbb-border-radius-4x);--sbb-toast-container-display: flex;--sbb-toast-container-position: fixed;--sbb-toast-horizontal-position: initial;--sbb-toast-vertical-position: initial;display:block}:host(:not([data-state])),:host([data-state=closed]){--sbb-toast-container-display: none}:host([position=bottom-left]),:host([position=bottom-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-end}:host([position=bottom-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-end}:host([position=bottom-right]),:host([position=bottom-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-end}:host([position=top-left]),:host([position=top-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-start}:host([position=top-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-start}:host([position=top-right]),:host([position=top-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-start}.sbb-toast__overlay-container{position:var(--sbb-toast-container-position);pointer-events:none;top:0;right:0;bottom:0;left:0;display:var(--sbb-toast-container-display);justify-content:var(--sbb-toast-horizontal-position);align-items:var(--sbb-toast-vertical-position)}.sbb-toast{z-index:var(--sbb-toast-z-index, var(--sbb-overlay-default-z-index));pointer-events:auto;margin:var(--sbb-toast-margin);padding-block:var(--sbb-toast-padding-block);padding-inline:var(--sbb-toast-padding-inline);border-radius:var(--sbb-toast-border-radius);max-width:var(--sbb-toast-max-width);display:flex;color:var(--sbb-toast-color);background-color:var(--sbb-toast-background-color)}:host([data-state=opening]) .sbb-toast{animation-name:open;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}:host([data-state=closing]) .sbb-toast{animation-name:close;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}.sbb-toast__icon{margin-inline-end:var(--sbb-spacing-fixed-2x);line-height:initial}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-toast__icon{display:none}.sbb-toast__content{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text);color:var(--sbb-toast-text-color);flex:1 1 0}.sbb-toast__action{position:relative;min-width:2.5rem}:host(:not([data-slot-names~=action],[dismissible])) .sbb-toast__action{display:none}::slotted([data-sbb-button]),.sbb-toast__action-button{margin-inline:var(--sbb-spacing-fixed-2x);position:absolute;top:-.625rem}::slotted(:is(sbb-link,sbb-link-button,sbb-link-static)){margin-inline-start:var(--sbb-spacing-fixed-4x)}@keyframes open{0%{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}to{visibility:visible;opacity:1;transform:translateY(0)}}@keyframes close{0%{visibility:visible;opacity:1;transform:translateY(0)}to{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}}`, v = /* @__PURE__ */ new Set();
19
- let mt = (() => {
18
+ const Q = R`*,:before,:after{box-sizing:border-box}:host{--sbb-toast-max-width: 25rem;--sbb-toast-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-toast-animation-timing-function: ease;--sbb-toast-color: var(--sbb-color-white);--sbb-toast-text-color: var(--sbb-color-milk);--sbb-toast-background-color: var(--sbb-color-midnight);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-toast-margin: var(--sbb-spacing-responsive-s);--sbb-toast-padding-block: var(--sbb-spacing-responsive-xxxs);--sbb-toast-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-toast-border-radius: var(--sbb-border-radius-4x);--sbb-toast-container-display: none;--sbb-toast-container-position: fixed;--sbb-toast-horizontal-position: initial;--sbb-toast-vertical-position: initial;display:none}:host([data-state]:not([data-state=closed])){--sbb-toast-container-display: flex;display:block}:host([position=bottom-left]),:host([position=bottom-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-end}:host([position=bottom-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-end}:host([position=bottom-right]),:host([position=bottom-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-end}:host([position=top-left]),:host([position=top-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-start}:host([position=top-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-start}:host([position=top-right]),:host([position=top-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-start}.sbb-toast__overlay-container{position:var(--sbb-toast-container-position);pointer-events:none;top:0;right:0;bottom:0;left:0;display:var(--sbb-toast-container-display);justify-content:var(--sbb-toast-horizontal-position);align-items:var(--sbb-toast-vertical-position)}.sbb-toast{z-index:var(--sbb-toast-z-index, var(--sbb-overlay-default-z-index));pointer-events:auto;margin:var(--sbb-toast-margin);padding-block:var(--sbb-toast-padding-block);padding-inline:var(--sbb-toast-padding-inline);border-radius:var(--sbb-toast-border-radius);max-width:var(--sbb-toast-max-width);display:flex;color:var(--sbb-toast-color);background-color:var(--sbb-toast-background-color)}:host([data-state=opening]) .sbb-toast{animation-name:open;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}:host([data-state=closing]) .sbb-toast{animation-name:close;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}.sbb-toast__icon{margin-inline-end:var(--sbb-spacing-fixed-2x);line-height:initial}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-toast__icon{display:none}.sbb-toast__content{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text);color:var(--sbb-toast-text-color);flex:1 1 0}.sbb-toast__action{position:relative;min-width:2.5rem}:host(:not([data-slot-names~=action],[dismissible])) .sbb-toast__action{display:none}::slotted([data-sbb-button]),.sbb-toast__action-button{margin-inline:var(--sbb-spacing-fixed-2x);position:absolute;top:-.625rem}::slotted(:is(sbb-link,sbb-link-button,sbb-link-static)){margin-inline-start:var(--sbb-spacing-fixed-4x)}@keyframes open{0%{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}to{visibility:visible;opacity:1;transform:translateY(0)}}@keyframes close{0%{visibility:visible;opacity:1;transform:translateY(0)}to{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}}`, v = /* @__PURE__ */ new Set();
19
+ let pt = (() => {
20
20
  var d, m, p, h, n;
21
- let i = [P("sbb-toast"), j()], o, e = [], r, x = G(q(Y)), y, k = [], T = [], z, S = [], N = [], C, A = [], E = [], B, O = [], I = [];
21
+ let i = [K("sbb-toast"), j({
22
+ popover: "manual"
23
+ }), U()], o, e = [], r, x = J(G(Y)), y, k = [], T = [], z, S = [], N = [], C, A = [], E = [], B, O = [], I = [];
22
24
  return n = class extends x {
23
25
  constructor() {
24
- var s;
26
+ var t;
25
27
  super();
26
28
  f(this, d);
27
29
  f(this, m);
28
30
  f(this, p);
29
31
  f(this, h);
30
- b(this, d, c(this, k, 6e3)), b(this, m, (c(this, T), c(this, S, "bottom-center"))), b(this, p, (c(this, N), c(this, A, !1))), b(this, h, (c(this, E), c(this, O, "polite"))), this._closeTimeout = c(this, I), this._language = new Z(this), (s = this.addEventListener) == null || s.call(this, "click", (t) => this._onClick(t));
32
+ b(this, d, c(this, k, 6e3)), b(this, m, (c(this, T), c(this, S, "bottom-center"))), b(this, p, (c(this, N), c(this, A, !1))), b(this, h, (c(this, E), c(this, O, "polite"))), this._closeTimeout = c(this, I), this._language = new Z(this), (t = this.addEventListener) == null || t.call(this, "click", (s) => this._onClick(s));
31
33
  }
32
34
  /**
33
35
  * The length of time in milliseconds to wait before automatically dismissing the toast.
@@ -36,22 +38,22 @@ let mt = (() => {
36
38
  get timeout() {
37
39
  return u(this, d);
38
40
  }
39
- set timeout(s) {
40
- b(this, d, s);
41
+ set timeout(t) {
42
+ b(this, d, t);
41
43
  }
42
44
  /** The position where to place the toast. */
43
45
  get position() {
44
46
  return u(this, m);
45
47
  }
46
- set position(s) {
47
- b(this, m, s);
48
+ set position(t) {
49
+ b(this, m, t);
48
50
  }
49
51
  /** Whether the toast has a close button. */
50
52
  get dismissible() {
51
53
  return u(this, p);
52
54
  }
53
- set dismissible(s) {
54
- b(this, p, s);
55
+ set dismissible(t) {
56
+ b(this, p, t);
55
57
  }
56
58
  /**
57
59
  * The ARIA politeness level.
@@ -60,15 +62,15 @@ let mt = (() => {
60
62
  get politeness() {
61
63
  return u(this, h);
62
64
  }
63
- set politeness(s) {
64
- b(this, h, s);
65
+ set politeness(t) {
66
+ b(this, h, t);
65
67
  }
66
68
  /**
67
69
  * Role of the live region. This is only for Firefox as there is a known issue where Firefox +
68
70
  * JAWS does not read out aria-live message.
69
71
  */
70
72
  get _role() {
71
- if (U) {
73
+ if (H) {
72
74
  if (this.politeness === "polite")
73
75
  return "status";
74
76
  if (this.politeness === "assertive")
@@ -80,10 +82,11 @@ let mt = (() => {
80
82
  * If there are other opened toasts in the page, close them first.
81
83
  */
82
84
  open() {
83
- this.state === "closed" && this.willOpen.emit() && (this.state = "opening", this._closeOtherToasts(), this._isZeroAnimationDuration() && this._handleOpening());
85
+ var t;
86
+ this.state === "closed" && this.willOpen.emit() && ((t = this.showPopover) == null || t.call(this), this.state = "opening", this._closeOtherToasts(), this._isZeroAnimationDuration() && this._handleOpening());
84
87
  }
85
88
  _isZeroAnimationDuration() {
86
- return H(this, "--sbb-toast-animation-duration");
89
+ return M(this, "--sbb-toast-animation-duration");
87
90
  }
88
91
  /**
89
92
  * Close the toast.
@@ -92,15 +95,16 @@ let mt = (() => {
92
95
  this.state === "opened" && this.willClose.emit() && (clearTimeout(this._closeTimeout), this.state = "closing", this._isZeroAnimationDuration() && this._handleClosing());
93
96
  }
94
97
  _handleClosing() {
95
- this.state = "closed", this.didClose.emit();
98
+ var t;
99
+ this.state = "closed", (t = this.hidePopover) == null || t.call(this), this.didClose.emit();
96
100
  }
97
101
  _handleOpening() {
98
102
  this.state = "opened", this.didOpen.emit(), this.timeout && (this._closeTimeout = setTimeout(() => this.close(), this.timeout));
99
103
  }
100
104
  // Close the toast on click of any element that has the 'sbb-toast-close' attribute.
101
- _onClick(s) {
102
- const t = F(s, "sbb-toast-close", this);
103
- t && !t.hasAttribute("disabled") && this.close();
105
+ _onClick(t) {
106
+ const s = X(t, "sbb-toast-close", this);
107
+ s && !s.hasAttribute("disabled") && this.close();
104
108
  }
105
109
  connectedCallback() {
106
110
  super.connectedCallback(), v.add(this);
@@ -113,32 +117,32 @@ let mt = (() => {
113
117
  * To address the problem, if there is at least a root text node,
114
118
  * we wrap the whole content in a <span> tag
115
119
  */
116
- _onContentSlotChange(s) {
117
- const t = s.target.assignedNodes();
118
- if (t.some((a) => a.nodeType === Node.TEXT_NODE)) {
120
+ _onContentSlotChange(t) {
121
+ const s = t.target.assignedNodes();
122
+ if (s.some((a) => a.nodeType === Node.TEXT_NODE)) {
119
123
  const a = document.createElement("span");
120
- this.appendChild(a), a.append(...t);
124
+ this.appendChild(a), a.append(...s);
121
125
  }
122
126
  }
123
- _onActionSlotChange(s) {
124
- const t = s.target.assignedNodes();
125
- t.filter((l) => l.nodeName === "SBB-TRANSPARENT-BUTTON" || l.nodeName === "SBB-TRANSPARENT-BUTTON-LINK").forEach((l) => {
126
- l.negative = !0, l.size = M() ? "s" : "m";
127
- }), t.filter((l) => ["SBB-LINK", "SBB-LINK-BUTTON", "SBB-LINK-STATIC"].includes(l.nodeName)).forEach((l) => {
127
+ _onActionSlotChange(t) {
128
+ const s = t.target.assignedNodes();
129
+ s.filter((l) => l.nodeName === "SBB-TRANSPARENT-BUTTON" || l.nodeName === "SBB-TRANSPARENT-BUTTON-LINK").forEach((l) => {
130
+ l.negative = !0, l.size = F() ? "s" : "m";
131
+ }), s.filter((l) => ["SBB-LINK", "SBB-LINK-BUTTON", "SBB-LINK-STATIC"].includes(l.nodeName)).forEach((l) => {
128
132
  l.negative = !0;
129
133
  });
130
134
  }
131
135
  // In rare cases it can be that the animationEnd event is triggered twice.
132
136
  // To avoid entering a corrupt state, exit when state is not expected.
133
- _onToastAnimationEnd(s) {
134
- s.animationName === "open" && this.state === "opening" ? this._handleOpening() : s.animationName === "close" && this.state === "closing" && this._handleClosing();
137
+ _onToastAnimationEnd(t) {
138
+ t.animationName === "open" && this.state === "opening" ? this._handleOpening() : t.animationName === "close" && this.state === "closing" && this._handleClosing();
135
139
  }
136
140
  /**
137
141
  * Since we do not stack toasts, we force the closing on other existing opened ones
138
142
  */
139
143
  _closeOtherToasts() {
140
- v.forEach((s) => {
141
- s.getAttribute("data-state") === "opened" && s.close();
144
+ v.forEach((t) => {
145
+ t.getAttribute("data-state") === "opened" && t.close();
142
146
  });
143
147
  }
144
148
  render() {
@@ -164,7 +168,7 @@ let mt = (() => {
164
168
  icon-name="cross-small"
165
169
  negative
166
170
  size="m"
167
- aria-label=${X[this._language.current]}
171
+ aria-label=${q[this._language.current]}
168
172
  sbb-toast-close
169
173
  ></sbb-transparent-button>` : L}
170
174
  </slot>
@@ -174,18 +178,18 @@ let mt = (() => {
174
178
  `;
175
179
  }
176
180
  }, d = new WeakMap(), m = new WeakMap(), p = new WeakMap(), h = new WeakMap(), r = n, (() => {
177
- const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
178
- y = [R(), _({ type: Number })], z = [_({ reflect: !0 })], C = [R(), _({ type: Boolean, reflect: !0 })], B = [_()], g(n, null, y, { kind: "accessor", name: "timeout", static: !1, private: !1, access: { has: (t) => "timeout" in t, get: (t) => t.timeout, set: (t, a) => {
179
- t.timeout = a;
180
- } }, metadata: s }, k, T), g(n, null, z, { kind: "accessor", name: "position", static: !1, private: !1, access: { has: (t) => "position" in t, get: (t) => t.position, set: (t, a) => {
181
- t.position = a;
182
- } }, metadata: s }, S, N), g(n, null, C, { kind: "accessor", name: "dismissible", static: !1, private: !1, access: { has: (t) => "dismissible" in t, get: (t) => t.dismissible, set: (t, a) => {
183
- t.dismissible = a;
184
- } }, metadata: s }, A, E), g(n, null, B, { kind: "accessor", name: "politeness", static: !1, private: !1, access: { has: (t) => "politeness" in t, get: (t) => t.politeness, set: (t, a) => {
185
- t.politeness = a;
186
- } }, metadata: s }, O, I), g(null, o = { value: r }, i, { kind: "class", name: r.name, metadata: s }, null, e), r = o.value, s && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s });
187
- })(), n.styles = J, c(r, e), r;
181
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
182
+ y = [P(), _({ type: Number })], z = [_({ reflect: !0 })], C = [P(), _({ type: Boolean, reflect: !0 })], B = [_()], g(n, null, y, { kind: "accessor", name: "timeout", static: !1, private: !1, access: { has: (s) => "timeout" in s, get: (s) => s.timeout, set: (s, a) => {
183
+ s.timeout = a;
184
+ } }, metadata: t }, k, T), g(n, null, z, { kind: "accessor", name: "position", static: !1, private: !1, access: { has: (s) => "position" in s, get: (s) => s.position, set: (s, a) => {
185
+ s.position = a;
186
+ } }, metadata: t }, S, N), g(n, null, C, { kind: "accessor", name: "dismissible", static: !1, private: !1, access: { has: (s) => "dismissible" in s, get: (s) => s.dismissible, set: (s, a) => {
187
+ s.dismissible = a;
188
+ } }, metadata: t }, A, E), g(n, null, B, { kind: "accessor", name: "politeness", static: !1, private: !1, access: { has: (s) => "politeness" in s, get: (s) => s.politeness, set: (s, a) => {
189
+ s.politeness = a;
190
+ } }, metadata: t }, O, I), g(null, o = { value: r }, i, { kind: "class", name: r.name, metadata: t }, null, e), r = o.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
191
+ })(), n.styles = Q, c(r, e), r;
188
192
  })();
189
193
  export {
190
- mt as SbbToastElement
194
+ pt as SbbToastElement
191
195
  };
@@ -3,7 +3,7 @@ var I = (i) => {
3
3
  };
4
4
  var O = (i, s, o) => s.has(i) || I("Cannot " + o);
5
5
  var g = (i, s, o) => (O(i, s, "read from private field"), o ? o.call(i) : s.get(i)), u = (i, s, o) => s.has(i) ? I("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, o), c = (i, s, o, l) => (O(i, s, "write to private field"), l ? l.call(i, o) : s.set(i, o), o);
6
- import { __esDecorate as h, __runInitializers as d } from "tslib";
6
+ import { __esDecorate as h, __runInitializers as b } from "tslib";
7
7
  import { css as $, LitElement as T, html as D, nothing as S } from "lit";
8
8
  import { customElement as C, property as p } from "lit/decorators.js";
9
9
  import { hostAttributes as j, slotState as A, forceType as E } from "../core/decorators.js";
@@ -11,17 +11,17 @@ import { setOrRemoveAttribute as L } from "../core/dom.js";
11
11
  import { SbbIconNameMixin as B } from "../icon.js";
12
12
  const P = $`*,:before,:after{box-sizing:border-box}:host{--sbb-toggle-option-cursor: pointer;--sbb-toggle-option-color: var(--sbb-color-anthracite);--sbb-toggle-option-icon-min-size: var(--sbb-size-icon-ui-small);--sbb-toggle-option-border-radius: var(--sbb-border-radius-infinity);--sbb-toggle-option-line-height: calc(1em * var(--sbb-typo-line-height-body-text));display:inline-block;min-width:var(--sbb-toggle-min-width);overflow:hidden;z-index:1}:host(:focus-visible:not([data-focus-origin=mouse],[data-focus-origin=touch])){outline:none!important}:host([checked]){--sbb-toggle-option-color: var(--sbb-color-charcoal)}:host([disabled]){--sbb-toggle-option-cursor: unset;--sbb-toggle-option-color: var(--sbb-color-granite)}input[type=radio]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.sbb-toggle-option{--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;cursor:var(--sbb-toggle-option-cursor);display:flex;justify-content:center;align-items:center;height:var(--sbb-toggle-height);padding-inline:var(--sbb-toggle-padding-inline);border-radius:var(--sbb-toggle-option-border-radius);color:var(--sbb-toggle-option-color)}:host([data-slot-names~=unnamed]:where([data-slot-names~=icon],[icon-name])) .sbb-toggle-option{gap:var(--sbb-spacing-fixed-1x)}.sbb-toggle-option__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(:focus-visible:not([data-focus-origin=mouse],[data-focus-origin=touch])) .sbb-toggle-option__label:before{content:"";position:absolute;pointer-events:none;inset:calc(var(--sbb-focus-outline-offset) * -2);border:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width);border-radius:var(--sbb-toggle-option-border-radius)}sbb-icon,::slotted(sbb-icon){min-width:var(--sbb-toggle-option-icon-min-size);min-height:var(--sbb-toggle-option-icon-min-size)}`;
13
13
  let J = (() => {
14
- var r, b, n;
14
+ var r, d, n;
15
15
  let i = [C("sbb-toggle-option"), j({
16
16
  role: "radio"
17
- }), A()], s, o = [], l, f = B(T), m = [], v, _ = [], k = [], y, x = [], w = [], z;
17
+ }), A()], s, o = [], l, f = B(T), m = [], _, v = [], k = [], y, x = [], w = [], z;
18
18
  return n = class extends f {
19
19
  constructor() {
20
20
  var e, t;
21
21
  super();
22
22
  u(this, r);
23
- u(this, b);
24
- c(this, r, (d(this, m), d(this, _, !1))), c(this, b, (d(this, k), d(this, x, !1))), this._value = (d(this, w), ""), (e = this.addEventListener) == null || e.call(this, "input", () => this._handleInput()), (t = this.addEventListener) == null || t.call(this, "click", () => {
23
+ u(this, d);
24
+ c(this, r, (b(this, m), b(this, v, !1))), c(this, d, (b(this, k), b(this, x, !1))), this._value = (b(this, w), ""), (e = this.addEventListener) == null || e.call(this, "input", () => this._handleInput()), (t = this.addEventListener) == null || t.call(this, "click", () => {
25
25
  var a;
26
26
  return (a = this.shadowRoot.querySelector("label")) == null ? void 0 : a.click();
27
27
  });
@@ -35,10 +35,10 @@ let J = (() => {
35
35
  }
36
36
  /** Whether the toggle option is disabled. */
37
37
  get disabled() {
38
- return g(this, b);
38
+ return g(this, d);
39
39
  }
40
40
  set disabled(e) {
41
- c(this, b, e);
41
+ c(this, d, e);
42
42
  }
43
43
  /** Value of toggle-option. */
44
44
  set value(e) {
@@ -88,16 +88,16 @@ let J = (() => {
88
88
  </label>
89
89
  `;
90
90
  }
91
- }, r = new WeakMap(), b = new WeakMap(), l = n, (() => {
91
+ }, r = new WeakMap(), d = new WeakMap(), l = n, (() => {
92
92
  const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
93
- v = [E(), p({ reflect: !0, type: Boolean })], y = [E(), p({ reflect: !0, type: Boolean })], z = [p()], h(n, null, v, { kind: "accessor", name: "checked", static: !1, private: !1, access: { has: (t) => "checked" in t, get: (t) => t.checked, set: (t, a) => {
93
+ _ = [E(), p({ reflect: !0, type: Boolean })], y = [E(), p({ reflect: !0, type: Boolean })], z = [p()], h(n, null, _, { kind: "accessor", name: "checked", static: !1, private: !1, access: { has: (t) => "checked" in t, get: (t) => t.checked, set: (t, a) => {
94
94
  t.checked = a;
95
- } }, metadata: e }, _, k), h(n, null, y, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (t) => "disabled" in t, get: (t) => t.disabled, set: (t, a) => {
95
+ } }, metadata: e }, v, k), h(n, null, y, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (t) => "disabled" in t, get: (t) => t.disabled, set: (t, a) => {
96
96
  t.disabled = a;
97
97
  } }, metadata: e }, x, w), h(n, null, z, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, set: (t, a) => {
98
98
  t.value = a;
99
99
  } }, metadata: e }, null, m), h(null, s = { value: l }, i, { kind: "class", name: l.name, metadata: e }, null, o), l = s.value, e && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
100
- })(), n.styles = P, d(l, o), l;
100
+ })(), n.styles = P, b(l, o), l;
101
101
  })();
102
102
  export {
103
103
  J as SbbToggleOptionElement
package/toggle/toggle.js CHANGED
@@ -5,7 +5,7 @@ var W = (s, o, l) => o.has(s) || R("Cannot " + l);
5
5
  var p = (s, o, l) => (W(s, o, "read from private field"), l ? l.call(s) : o.get(s)), v = (s, o, l) => o.has(s) ? R("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, l), b = (s, o, l, n) => (W(s, o, "write to private field"), n ? n.call(s, l) : o.set(s, l), l);
6
6
  import { __esDecorate as u, __runInitializers as d } from "tslib";
7
7
  import { ResizeController as B } from "@lit-labs/observers/resize-controller.js";
8
- import { css as U, isServer as K, html as F, LitElement as G } from "lit";
8
+ import { css as U, LitElement as F, isServer as K, html as G } from "lit";
9
9
  import { customElement as H, property as m } from "lit/decorators.js";
10
10
  import { interactivityChecker as N, isArrowKeyPressed as V, getNextElementIndex as J } from "../core/a11y.js";
11
11
  import { hostAttributes as M, forceType as $, handleDistinctChange as Q } from "../core/decorators.js";
@@ -16,7 +16,7 @@ let be = (() => {
16
16
  var c, g, h, r;
17
17
  let s = [H("sbb-toggle"), M({
18
18
  role: "radiogroup"
19
- })], o, l = [], n, w = G, x = [], z, k = [], E = [], P, I = [], C = [], D, S = [], T = [], O;
19
+ })], o, l = [], n, w = F, x = [], z, k = [], E = [], P, I = [], C = [], D, S = [], T = [], O;
20
20
  var f = (r = class extends w {
21
21
  constructor() {
22
22
  var t, e;
@@ -117,7 +117,7 @@ let be = (() => {
117
117
  }
118
118
  }
119
119
  render() {
120
- return F`
120
+ return G`
121
121
  <div class="sbb-toggle">
122
122
  <slot @slotchange=${this._updateToggle}></slot>
123
123
  </div>
package/toggle-check.js CHANGED
@@ -5,7 +5,7 @@ var I = (e, o, c) => o.has(e) || S("Cannot " + c);
5
5
  var h = (e, o, c) => (I(e, o, "read from private field"), c ? c.call(e) : o.get(e)), d = (e, o, c) => o.has(e) ? S("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(e) : o.set(e, c), k = (e, o, c, a) => (I(e, o, "write to private field"), a ? a.call(e, c) : o.set(e, c), c);
6
6
  import { __esDecorate as v, __runInitializers as r } from "tslib";
7
7
  import { css as T, LitElement as C, html as E } from "lit";
8
- import { customElement as D, property as m } from "lit/decorators.js";
8
+ import { customElement as D, property as f } from "lit/decorators.js";
9
9
  import { slotState as U, forceType as j } from "./core/decorators.js";
10
10
  import { isLean as A } from "./core/dom.js";
11
11
  import { SbbFormAssociatedCheckboxMixin as F } from "./core/mixins.js";
@@ -13,8 +13,8 @@ import { SbbIconNameMixin as G } from "./icon.js";
13
13
  const H = T`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;--sbb-toggle-check-checked-color: var(--sbb-color-red);--sbb-toggle-check-background-color: var(--sbb-color-cloud);--sbb-toggle-check-icon-color: var(--sbb-toggle-check-checked-color);--sbb-toggle-check-icon-opacity: 0;--sbb-toggle-check-circle-background-color: var(--sbb-color-white);--sbb-toggle-check-circle-border-color: var(--sbb-color-smoke);--sbb-toggle-check-circle-border-style: solid;--sbb-toggle-check-circle-diameter: 1.75rem;--sbb-toggle-check-overall-height: var(--sbb-toggle-check-circle-diameter);--sbb-toggle-check-circle-transform: translate(0, -50%);--sbb-toggle-check-height: 1.5rem;--sbb-toggle-check-width: calc(2 * var(--sbb-toggle-check-height));--sbb-toggle-check-cursor: pointer;--sbb-toggle-check-flex-direction: row-reverse;--sbb-toggle-check-gap: var(--sbb-spacing-fixed-3x);--sbb-toggle-check-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) )}@media (forced-colors: active){:host{--sbb-toggle-check-background-color: CanvasText;--sbb-toggle-check-circle-background-color: Canvas}}:host([size=m]){--sbb-toggle-check-overall-height: calc(1em * var(--sbb-typo-line-height-body-text))}:host([data-checked]){--sbb-toggle-check-background-color: var(--sbb-toggle-check-checked-color);--sbb-toggle-check-circle-border-color: var(--sbb-toggle-check-background-color);--sbb-toggle-check-icon-opacity: 1;--sbb-toggle-check-circle-transform: translate( calc(100% - 2 * (100% - .5 * var(--sbb-toggle-check-width))), -50% )}@media (forced-colors: active){:host([data-checked]){--sbb-toggle-check-icon-color: Highlight;--sbb-toggle-check-background-color: Highlight}}:host(:disabled){--sbb-toggle-check-background-color: var(--sbb-color-cloud);--sbb-toggle-check-circle-border-color: var(--sbb-color-smoke);--sbb-toggle-check-circle-border-style: dashed;--sbb-toggle-check-circle-background-color: var(--sbb-color-milk);--sbb-toggle-check-icon-color: var(--sbb-color-granite);--sbb-toggle-check-cursor: default}@media (forced-colors: active){:host(:disabled){--sbb-toggle-check-icon-color: GrayText;--sbb-toggle-check-background-color: GrayText;--sbb-toggle-check-circle-border-style: solid}}:host([data-checked]:disabled){--sbb-toggle-check-circle-background-color: var(--sbb-color-white)}:host([label-position=before]){--sbb-toggle-check-flex-direction: row}.sbb-toggle-check{position:relative;display:flex;color:var(--sbb-color-charcoal);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;cursor:var(--sbb-toggle-check-cursor)}.sbb-toggle-check:before{content:"​";-webkit-user-select:none;user-select:none;width:0;height:0}:host(:focus-visible:not([data-focus-origin=mouse],[data-focus-origin=touch])) .sbb-toggle-check{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width);border-radius:calc(var(--sbb-border-radius-4x) - var(--sbb-focus-outline-offset))}.sbb-toggle-check__container{--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);display:flex;flex-direction:var(--sbb-toggle-check-flex-direction);gap:var(--sbb-toggle-check-gap);align-items:start;width:100%}:host([size=m]) .sbb-toggle-check__container{--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([size=xs]) .sbb-toggle-check__container{--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)}.sbb-toggle-check__label{flex-grow:1;padding-block-start:calc((var(--sbb-toggle-check-circle-diameter) - var(--sbb-typo-line-height-body-text) * 1em) / 2)}:host(:not([data-slot-names~=unnamed])) .sbb-toggle-check__label{display:none}.sbb-toggle-check__track{display:inline-block;position:relative;min-width:var(--sbb-toggle-check-width);height:var(--sbb-toggle-check-height);border-radius:var(--sbb-border-radius-infinity);background-color:var(--sbb-toggle-check-background-color);margin-block:calc((var(--sbb-toggle-check-overall-height) - var(--sbb-toggle-check-height)) / 2)}.sbb-toggle-check__circle{box-shadow:var(--sbb-shadow-elevation-level-5-shadow-2-offset-x) var(--sbb-shadow-elevation-level-5-shadow-2-offset-y) var(--sbb-shadow-elevation-level-5-shadow-2-blur) var(--sbb-shadow-elevation-level-5-shadow-2-spread) var(--sbb-shadow-elevation-level-5-hard-2-color),var(--sbb-shadow-elevation-level-5-shadow-1-offset-x) var(--sbb-shadow-elevation-level-5-shadow-1-offset-y) var(--sbb-shadow-elevation-level-5-shadow-1-blur) var(--sbb-shadow-elevation-level-5-shadow-1-spread) var(--sbb-shadow-elevation-level-5-hard-1-color);position:absolute;top:50%;transform:translateY(-50%);width:var(--sbb-toggle-check-circle-diameter);height:var(--sbb-toggle-check-circle-diameter);border:var(--sbb-border-width-1x) var(--sbb-toggle-check-circle-border-style) var(--sbb-toggle-check-circle-border-color);border-radius:50%;background-color:var(--sbb-toggle-check-circle-background-color);color:var(--sbb-toggle-check-icon-color);will-change:transform;transform:var(--sbb-toggle-check-circle-transform);transition:transform ease var(--sbb-toggle-check-animation-duration)}.sbb-toggle-check__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--sbb-size-icon-ui-small);height:var(--sbb-size-icon-ui-small);opacity:var(--sbb-toggle-check-icon-opacity);transition:opacity ease var(--sbb-toggle-check-animation-duration)}`;
14
14
  let Q = (() => {
15
15
  var i, b, n, l;
16
- let e = [D("sbb-toggle-check"), U()], o, c = [], a, f = F(G(C)), u, p = [], _ = [], y, x = [], w = [], z, N = [], P = [];
17
- return l = class extends f {
16
+ let e = [D("sbb-toggle-check"), U()], o, c = [], a, m = F(G(C)), u, p = [], _ = [], y, x = [], w = [], z, N = [], P = [];
17
+ return l = class extends m {
18
18
  constructor() {
19
19
  super(...arguments);
20
20
  d(this, i, r(this, p, A() ? "xs" : "s"));
@@ -66,8 +66,8 @@ let Q = (() => {
66
66
  `;
67
67
  }
68
68
  }, i = new WeakMap(), b = new WeakMap(), n = new WeakMap(), a = l, (() => {
69
- const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(f[Symbol.metadata] ?? null) : void 0;
70
- u = [m({ reflect: !0 })], y = [j(), m({ attribute: "icon-name" })], z = [m({ attribute: "label-position", reflect: !0 })], v(l, null, u, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, g) => {
69
+ const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
70
+ u = [f({ reflect: !0 })], y = [j(), f({ attribute: "icon-name" })], z = [f({ attribute: "label-position", reflect: !0 })], v(l, null, u, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, g) => {
71
71
  t.size = g;
72
72
  } }, metadata: s }, p, _), v(l, null, y, { kind: "accessor", name: "iconName", static: !1, private: !1, access: { has: (t) => "iconName" in t, get: (t) => t.iconName, set: (t, g) => {
73
73
  t.iconName = g;
@@ -1,13 +1,13 @@
1
1
  import { __esDecorate as i, __runInitializers as n } from "tslib";
2
- import { css as l, html as c, LitElement as d } from "lit";
2
+ import { css as l, LitElement as c, html as d } from "lit";
3
3
  import { customElement as p } from "lit/decorators.js";
4
4
  const g = l`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-train-blocked-passage-height: var(--sbb-train-formation-wagon-height);--sbb-train-blocked-passage-background-color: var(--sbb-color-red125);--sbb-train-blocked-passage-bar-color: var(--sbb-color-white);--sbb-train-blocked-passage-icon-dimension: 1rem;--sbb-train-blocked-passage-icon-bar-width: .625rem;--sbb-train-blocked-passage-icon-bar-height: .25rem;--sbb-train-blocked-passage-icon-bar-border-radius: .0625rem}@media (forced-colors: active){:host{--sbb-train-blocked-passage-background-color: CanvasText;--sbb-train-blocked-passage-bar-color: Canvas}}.sbb-train-blocked-passage:before{content:"";display:var(--sbb-train-formation-wagon-label-display, block);height:calc(var(--sbb-font-size-text-xxs) * var(--sbb-typo-line-height-body-text))}.sbb-train-blocked-passage__wrapper{width:var(--sbb-train-blocked-passage-icon-dimension);display:flex;justify-content:center;flex-direction:column;height:var(--sbb-train-blocked-passage-height)}.sbb-train-blocked-passage__icon{width:100%;height:var(--sbb-train-blocked-passage-icon-dimension);border-radius:50%;background-color:var(--sbb-train-blocked-passage-background-color);position:relative;flex-direction:column;display:flex;align-items:center}.sbb-train-blocked-passage__icon:before{content:"";width:var(--sbb-train-blocked-passage-icon-bar-width);height:var(--sbb-train-blocked-passage-icon-bar-height);border-radius:var(--sbb-train-blocked-passage-icon-bar-border-radius);background-color:var(--sbb-train-blocked-passage-bar-color);margin:auto 0}`;
5
5
  let u = (() => {
6
6
  var e;
7
- let o = [p("sbb-train-blocked-passage")], r, t = [], a, b = d;
7
+ let o = [p("sbb-train-blocked-passage")], r, t = [], a, b = c;
8
8
  return e = class extends b {
9
9
  render() {
10
- return c`
10
+ return d`
11
11
  <span class="sbb-train-blocked-passage">
12
12
  <span class="sbb-train-blocked-passage__wrapper">
13
13
  <span class="sbb-train-blocked-passage__icon"></span>
package/train/train.js CHANGED
@@ -1,8 +1,8 @@
1
- var G = (e) => {
2
- throw TypeError(e);
1
+ var G = (i) => {
2
+ throw TypeError(i);
3
3
  };
4
- var P = (e, a, s) => a.has(e) || G("Cannot " + s);
5
- var m = (e, a, s) => (P(e, a, "read from private field"), s ? s.call(e) : a.get(e)), g = (e, a, s) => a.has(e) ? G("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, s), n = (e, a, s, o) => (P(e, a, "write to private field"), o ? o.call(e, s) : a.set(e, s), s);
4
+ var P = (i, a, s) => a.has(i) || G("Cannot " + s);
5
+ var m = (i, a, s) => (P(i, a, "read from private field"), s ? s.call(i) : a.get(i)), g = (i, a, s) => a.has(i) ? G("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(i) : a.set(i, s), n = (i, a, s, o) => (P(i, a, "write to private field"), o ? o.call(i, s) : a.set(i, s), s);
6
6
  import { __runInitializers as l, __esDecorate as f } from "tslib";
7
7
  import { css as q, LitElement as B, nothing as y } from "lit";
8
8
  import { customElement as F, property as L } from "lit/decorators.js";
@@ -16,7 +16,7 @@ import "../icon.js";
16
16
  const X = q`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-train-direction-label-spacing: var(--sbb-spacing-fixed-1x)}.sbb-train{--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);display:flex;flex-direction:column;gap:var(--sbb-train-formation-vertical-gap);position:relative}.sbb-train:before{content:"";display:var(--sbb-train-formation-reserve-spacing-display, none);height:max(var(--sbb-size-icon-ui-small),1em * var(--sbb-typo-line-height-body-text))}.sbb-train__wagons{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;gap:var(--sbb-train-formation-wagon-gap)}.sbb-train__direction-heading{display:flex;position:absolute;width:100%}.sbb-train__direction-sticky-wrapper{position:sticky;inset-inline-start:0;display:inline-flex;align-items:center;gap:var(--sbb-train-direction-label-spacing);max-width:100%}.sbb-train__direction-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.sbb-train__direction-label-sr{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
17
17
  let bt = (() => {
18
18
  var b, d, h, _, p, r;
19
- let e = [F("sbb-train")], a, s = [], o, w = V(B), z, S = [], $ = [], k, E = [], C = [], I, T = [], D = [], A, j = [], N = [], M, O = [], U = [];
19
+ let i = [F("sbb-train")], a, s = [], o, w = V(B), z, S = [], $ = [], k, E = [], C = [], I, T = [], D = [], A, j = [], N = [], M, O = [], U = [];
20
20
  var v = (r = class extends w {
21
21
  constructor() {
22
22
  super(...arguments);
@@ -37,54 +37,54 @@ let bt = (() => {
37
37
  get directionLabel() {
38
38
  return m(this, b);
39
39
  }
40
- set directionLabel(i) {
41
- n(this, b, i);
40
+ set directionLabel(e) {
41
+ n(this, b, e);
42
42
  }
43
43
  /** Heading level of the direction label, used for screen readers. */
44
44
  get directionLabelLevel() {
45
45
  return m(this, d);
46
46
  }
47
- set directionLabelLevel(i) {
48
- n(this, d, i);
47
+ set directionLabelLevel(e) {
48
+ n(this, d, e);
49
49
  }
50
50
  /** Label for the destination station of the train. */
51
51
  get station() {
52
52
  return m(this, h);
53
53
  }
54
- set station(i) {
55
- n(this, h, i);
54
+ set station(e) {
55
+ n(this, h, e);
56
56
  }
57
57
  /** Accessibility label for additional information regarding the leaving direction of the train. */
58
58
  get accessibilityLabel() {
59
59
  return m(this, _);
60
60
  }
61
- set accessibilityLabel(i) {
62
- n(this, _, i);
61
+ set accessibilityLabel(e) {
62
+ n(this, _, e);
63
63
  }
64
64
  /** Controls the direction indicator to show the arrow left or right. Default is left. */
65
65
  get direction() {
66
66
  return m(this, p);
67
67
  }
68
- set direction(i) {
69
- n(this, p, i);
68
+ set direction(e) {
69
+ n(this, p, e);
70
70
  }
71
71
  /**
72
72
  * Create the aria-label text out of the direction label, station and the accessibility label.
73
73
  */
74
74
  _getDirectionAriaLabel() {
75
- const i = [Q[this._language.current]];
76
- return this.directionLabel && this.station && i.push(`${this.directionLabel} ${this.station}`), this.accessibilityLabel && i.push(this.accessibilityLabel), `${i.join(", ")}.`;
75
+ const e = [Q[this._language.current]];
76
+ return this.directionLabel && this.station && e.push(`${this.directionLabel} ${this.station}`), this.accessibilityLabel && e.push(this.accessibilityLabel), `${e.join(", ")}.`;
77
77
  }
78
- willUpdate(i) {
79
- super.willUpdate(i), i.has("listChildren") && this._trainSlotChange.emit();
78
+ willUpdate(e) {
79
+ super.willUpdate(e), e.has("listChildren") && this._trainSlotChange.emit();
80
80
  }
81
81
  render() {
82
- const i = `h${this.directionLabelLevel}`;
82
+ const e = `h${this.directionLabelLevel}`;
83
83
  return u`
84
84
  <div class="sbb-train">
85
- <${W(i)} class="sbb-train__direction-label-sr">
85
+ <${W(e)} class="sbb-train__direction-label-sr">
86
86
  ${this._getDirectionAriaLabel()}
87
- </${W(i)}>
87
+ </${W(e)}>
88
88
  ${this.directionLabel ? u`<div class="sbb-train__direction-heading" aria-hidden="true">
89
89
  <span class="sbb-train__direction-sticky-wrapper">
90
90
  ${this.direction === "left" ? u`<sbb-icon name="chevron-small-left-small"></sbb-icon>` : y}
@@ -104,18 +104,18 @@ let bt = (() => {
104
104
  `;
105
105
  }
106
106
  }, b = new WeakMap(), d = new WeakMap(), h = new WeakMap(), _ = new WeakMap(), p = new WeakMap(), o = r, (() => {
107
- const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(w[Symbol.metadata] ?? null) : void 0;
107
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(w[Symbol.metadata] ?? null) : void 0;
108
108
  z = [x(), L({ attribute: "direction-label", reflect: !0, converter: J })], k = [L({ attribute: "direction-label-level" })], I = [x(), L()], A = [x(), L({ attribute: "accessibility-label" })], M = [L({ reflect: !0 })], f(r, null, z, { kind: "accessor", name: "directionLabel", static: !1, private: !1, access: { has: (t) => "directionLabel" in t, get: (t) => t.directionLabel, set: (t, c) => {
109
109
  t.directionLabel = c;
110
- } }, metadata: i }, S, $), f(r, null, k, { kind: "accessor", name: "directionLabelLevel", static: !1, private: !1, access: { has: (t) => "directionLabelLevel" in t, get: (t) => t.directionLabelLevel, set: (t, c) => {
110
+ } }, metadata: e }, S, $), f(r, null, k, { kind: "accessor", name: "directionLabelLevel", static: !1, private: !1, access: { has: (t) => "directionLabelLevel" in t, get: (t) => t.directionLabelLevel, set: (t, c) => {
111
111
  t.directionLabelLevel = c;
112
- } }, metadata: i }, E, C), f(r, null, I, { kind: "accessor", name: "station", static: !1, private: !1, access: { has: (t) => "station" in t, get: (t) => t.station, set: (t, c) => {
112
+ } }, metadata: e }, E, C), f(r, null, I, { kind: "accessor", name: "station", static: !1, private: !1, access: { has: (t) => "station" in t, get: (t) => t.station, set: (t, c) => {
113
113
  t.station = c;
114
- } }, metadata: i }, T, D), f(r, null, A, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (t) => "accessibilityLabel" in t, get: (t) => t.accessibilityLabel, set: (t, c) => {
114
+ } }, metadata: e }, T, D), f(r, null, A, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (t) => "accessibilityLabel" in t, get: (t) => t.accessibilityLabel, set: (t, c) => {
115
115
  t.accessibilityLabel = c;
116
- } }, metadata: i }, j, N), f(r, null, M, { kind: "accessor", name: "direction", static: !1, private: !1, access: { has: (t) => "direction" in t, get: (t) => t.direction, set: (t, c) => {
116
+ } }, metadata: e }, j, N), f(r, null, M, { kind: "accessor", name: "direction", static: !1, private: !1, access: { has: (t) => "direction" in t, get: (t) => t.direction, set: (t, c) => {
117
117
  t.direction = c;
118
- } }, metadata: i }, O, U), f(null, a = { value: o }, e, { kind: "class", name: o.name, metadata: i }, null, s), v = o = a.value, i && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
118
+ } }, metadata: e }, O, U), f(null, a = { value: o }, i, { kind: "class", name: o.name, metadata: e }, null, s), v = o = a.value, e && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
119
119
  })(), r.styles = X, r.events = {
120
120
  trainSlotChange: "trainSlotChange"
121
121
  }, l(o, s), r);