@sbb-esta/lyne-elements 2.2.0 → 2.3.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 (184) hide show
  1. package/accordion.js +6 -6
  2. package/alert/alert-group.js +4 -4
  3. package/alert/alert.js +9 -9
  4. package/autocomplete-grid/autocomplete-grid-button.js +4 -4
  5. package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
  6. package/autocomplete-grid/autocomplete-grid-row.js +4 -4
  7. package/autocomplete.js +1 -1
  8. package/badge.css +31 -0
  9. package/breadcrumb/breadcrumb-group.js +4 -4
  10. package/breadcrumb/breadcrumb.js +19 -19
  11. package/button/accent-button-link.js +9 -9
  12. package/button/accent-button-static.js +6 -6
  13. package/button/accent-button.js +6 -6
  14. package/button/button-link.js +7 -7
  15. package/button/button-static.js +7 -7
  16. package/button/button.js +8 -8
  17. package/button/common.js +1 -1
  18. package/button/mini-button-group.js +8 -8
  19. package/button/secondary-button-link.js +7 -7
  20. package/button/secondary-button-static.js +7 -7
  21. package/button/secondary-button.js +3 -3
  22. package/button/transparent-button-link.js +6 -6
  23. package/button/transparent-button-static.js +5 -5
  24. package/button/transparent-button.js +6 -6
  25. package/calendar.js +1 -1
  26. package/card/card-badge.js +9 -9
  27. package/card/card-button.js +5 -5
  28. package/card/card-link.js +7 -7
  29. package/card/card.js +1 -1
  30. package/checkbox/checkbox-panel.js +16 -16
  31. package/checkbox/checkbox.js +15 -15
  32. package/checkbox/common.js +3 -3
  33. package/clock.js +8 -8
  34. package/container/container.js +4 -4
  35. package/core/base-elements.js +10 -10
  36. package/core/controllers.js +4 -4
  37. package/core/datetime.js +6 -6
  38. package/core/eventing.js +4 -4
  39. package/core/i18n/i18n.d.ts +2 -0
  40. package/core/i18n/i18n.d.ts.map +1 -1
  41. package/core/i18n.js +43 -31
  42. package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
  43. package/core/mixins/form-associated-mixin.d.ts +3 -0
  44. package/core/mixins/form-associated-mixin.d.ts.map +1 -1
  45. package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  46. package/core/mixins.js +342 -248
  47. package/core/styles/badge.scss +3 -0
  48. package/core/styles/mixins/badge.scss +26 -1
  49. package/core/styles/mixins/font-face.scss +12 -12
  50. package/core/styles/mixins/link.scss +32 -8
  51. package/core/styles/standard-theme.scss +1 -0
  52. package/core/testing.js +14 -14
  53. package/core.css +3 -3
  54. package/custom-elements.json +7323 -169
  55. package/datepicker/datepicker-toggle.js +14 -14
  56. package/development/alert/alert-group.js +1 -1
  57. package/development/alert/alert.js +1 -1
  58. package/development/autocomplete.js +1 -1
  59. package/development/breadcrumb/breadcrumb.js +5 -2
  60. package/development/button/common.js +18 -14
  61. package/development/calendar.js +1 -1
  62. package/development/card/card.js +1 -1
  63. package/development/checkbox/checkbox-panel.js +1 -1
  64. package/development/core/i18n/i18n.d.ts +2 -0
  65. package/development/core/i18n/i18n.d.ts.map +1 -1
  66. package/development/core/i18n.js +15 -1
  67. package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
  68. package/development/core/mixins/form-associated-mixin.d.ts +3 -0
  69. package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
  70. package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
  71. package/development/core/mixins.js +159 -22
  72. package/development/datepicker/datepicker-toggle.js +1 -1
  73. package/development/dialog/dialog-title.js +1 -1
  74. package/development/expansion-panel/expansion-panel-header.js +1 -1
  75. package/development/expansion-panel/expansion-panel.js +1 -1
  76. package/development/file-selector/common.js +1 -1
  77. package/development/footer.js +1 -1
  78. package/development/form-field/form-field/form-field.d.ts.map +1 -1
  79. package/development/form-field/form-field.js +5 -2
  80. package/development/image.js +1 -1
  81. package/development/journey-header.js +1 -1
  82. package/development/link/common.js +19 -7
  83. package/development/link-list/common.js +1 -1
  84. package/development/map-container.js +1 -1
  85. package/development/menu/common/menu-action-common.d.ts +3 -0
  86. package/development/menu/common/menu-action-common.d.ts.map +1 -1
  87. package/development/menu/common.js +35 -12
  88. package/development/navigation/navigation-section.js +1 -1
  89. package/development/notification.js +1 -1
  90. package/development/overlay.js +1 -1
  91. package/development/radio-button/radio-button-panel.js +1 -1
  92. package/development/select/select.d.ts +4 -1
  93. package/development/select/select.d.ts.map +1 -1
  94. package/development/select.js +22 -4
  95. package/development/skiplink-list.js +1 -1
  96. package/development/slider.js +1 -1
  97. package/development/tabs/tab-label.js +1 -1
  98. package/development/timetable-occupancy.js +1 -1
  99. package/development/toast.js +1 -1
  100. package/development/toggle/toggle/toggle.d.ts +25 -6
  101. package/development/toggle/toggle/toggle.d.ts.map +1 -1
  102. package/development/toggle/toggle-option/toggle-option.d.ts +2 -6
  103. package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
  104. package/development/toggle/toggle-option.js +21 -39
  105. package/development/toggle/toggle.js +57 -39
  106. package/development/train/train-formation.js +1 -1
  107. package/development/train/train.js +1 -1
  108. package/development/visual-checkbox.js +1 -1
  109. package/dialog/dialog-content.js +3 -3
  110. package/dialog/dialog-title.js +8 -8
  111. package/divider.js +12 -12
  112. package/expansion-panel/expansion-panel-header.js +1 -1
  113. package/expansion-panel/expansion-panel.js +1 -1
  114. package/file-selector/common.js +9 -9
  115. package/file-selector/file-selector-dropzone.js +5 -5
  116. package/file-selector/file-selector.js +6 -6
  117. package/flip-card/flip-card-details.js +4 -4
  118. package/flip-card/flip-card-summary.js +9 -9
  119. package/font-characters-extension.css +3 -3
  120. package/footer.js +4 -4
  121. package/form-field/form-field/form-field.d.ts.map +1 -1
  122. package/form-field/form-field.js +7 -5
  123. package/header/header-button.js +5 -5
  124. package/header/header-link.js +5 -5
  125. package/icon.js +36 -36
  126. package/image.js +1 -1
  127. package/journey-header.js +5 -5
  128. package/link/block-link-button.js +4 -4
  129. package/link/block-link-static.js +9 -9
  130. package/link/block-link.js +4 -4
  131. package/link/common.js +28 -28
  132. package/link/link-button.js +7 -7
  133. package/link/link-static.js +7 -7
  134. package/link/link.js +4 -4
  135. package/link-list/common.js +15 -15
  136. package/loading-indicator-circle.js +11 -11
  137. package/map-container.js +5 -5
  138. package/menu/common/menu-action-common.d.ts +3 -0
  139. package/menu/common/menu-action-common.d.ts.map +1 -1
  140. package/menu/common.js +34 -30
  141. package/menu/menu-button.js +8 -8
  142. package/menu/menu-link.js +6 -6
  143. package/menu/menu.js +7 -7
  144. package/navigation/navigation-button.js +4 -4
  145. package/navigation/navigation-link.js +7 -7
  146. package/navigation/navigation-list.js +4 -4
  147. package/navigation/navigation-marker.js +3 -3
  148. package/navigation/navigation-section.js +1 -1
  149. package/notification.js +18 -18
  150. package/option/optgroup.js +11 -11
  151. package/overlay.js +14 -14
  152. package/package.json +6 -2
  153. package/paginator/common.js +6 -6
  154. package/popover/popover.js +13 -13
  155. package/radio-button/radio-button-panel.js +6 -6
  156. package/screen-reader-only.js +5 -5
  157. package/select/select.d.ts +4 -1
  158. package/select/select.d.ts.map +1 -1
  159. package/select.js +35 -28
  160. package/skiplink-list.js +3 -3
  161. package/slider.js +13 -13
  162. package/standard-theme.css +35 -3
  163. package/status.js +3 -3
  164. package/stepper/step-label.js +4 -4
  165. package/table/table-wrapper.js +4 -4
  166. package/tabs/tab-group.js +24 -24
  167. package/tabs/tab-label.js +1 -1
  168. package/tabs/tab.js +4 -4
  169. package/tag/tag-group.js +7 -7
  170. package/teaser-product/common.js +5 -5
  171. package/teaser-product/teaser-product-static.js +2 -2
  172. package/timetable-occupancy-icon.js +3 -3
  173. package/timetable-occupancy.js +6 -6
  174. package/toast.js +5 -5
  175. package/toggle/toggle/toggle.d.ts +25 -6
  176. package/toggle/toggle/toggle.d.ts.map +1 -1
  177. package/toggle/toggle-option/toggle-option.d.ts +2 -6
  178. package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
  179. package/toggle/toggle-option.js +44 -52
  180. package/toggle/toggle.js +103 -83
  181. package/toggle-check.js +5 -5
  182. package/train/train-formation.js +1 -1
  183. package/train/train.js +29 -29
  184. package/visual-checkbox.js +1 -1
@@ -1,5 +1,5 @@
1
1
  import { __esDecorate as h, __runInitializers as x } from "tslib";
2
- import { css as m, html as l, nothing as g } from "lit";
2
+ import { css as m, nothing as g, html as l } from "lit";
3
3
  import { customElement as u } from "lit/decorators.js";
4
4
  import { SbbButtonBaseElement as v } from "../core/base-elements.js";
5
5
  import { SbbSlotStateController as f, SbbMediaMatcherController as _, SbbMediaQueryHover as d } from "../core/controllers.js";
@@ -6,7 +6,7 @@ var m = (s, i, o) => (U(s, i, "read from private field"), o ? o.call(s) : i.get(
6
6
  import { __esDecorate as b, __runInitializers as l } from "tslib";
7
7
  import { css as B, LitElement as G } from "lit";
8
8
  import { customElement as j, property as u } from "lit/decorators.js";
9
- import { html as M, unsafeStatic as Z } from "lit/static-html.js";
9
+ import { unsafeStatic as Z, html as M } from "lit/static-html.js";
10
10
  import { forceType as P } from "../core/decorators.js";
11
11
  import { isLean as q, isZeroAnimationDuration as F } from "../core/dom.js";
12
12
  import { EventEmitter as g } from "../core/eventing.js";
@@ -7,7 +7,7 @@ import { __runInitializers as n, __esDecorate as c } from "tslib";
7
7
  import { nothing as x, css as O } from "lit";
8
8
  import { property as b } from "lit/decorators.js";
9
9
  import { ref as V } from "lit/directives/ref.js";
10
- import { html as v, unsafeStatic as y } from "lit/static-html.js";
10
+ import { unsafeStatic as v, html as y } from "lit/static-html.js";
11
11
  import { sbbInputModalityDetector as W } from "../core/a11y.js";
12
12
  import { SbbLanguageController as H } from "../core/controllers.js";
13
13
  import { forceType as z } from "../core/decorators.js";
@@ -135,10 +135,10 @@ const ge = (s) => (() => {
135
135
  }
136
136
  _renderFileList() {
137
137
  const t = this.files.length > 1 ? { WRAPPER: "ul", ELEMENT: "li" } : { WRAPPER: "div", ELEMENT: "span" };
138
- return v`
139
- <${y(t.WRAPPER)} class='sbb-file-selector__file-list'>
140
- ${this.files.map((e) => v`
141
- <${y(t.ELEMENT)} class='sbb-file-selector__file'>
138
+ return y`
139
+ <${v(t.WRAPPER)} class='sbb-file-selector__file-list'>
140
+ ${this.files.map((e) => y`
141
+ <${v(t.ELEMENT)} class='sbb-file-selector__file'>
142
142
  <span class='sbb-file-selector__file-details'>
143
143
  <span class='sbb-file-selector__file-name'>${e.name}</span>
144
144
  <span class='sbb-file-selector__file-size'>${this._formatFileSize(e.size)}</span>
@@ -149,15 +149,15 @@ const ge = (s) => (() => {
149
149
  @click='${() => this._removeFile(e)}'
150
150
  aria-label='${`${X[this.language.current]} - ${e.name}`}'
151
151
  ></sbb-secondary-button>
152
- </${y(t.ELEMENT)}>`)}
153
- </${y(t.WRAPPER)}>
152
+ </${v(t.ELEMENT)}>`)}
153
+ </${v(t.WRAPPER)}>
154
154
  `;
155
155
  }
156
156
  render() {
157
157
  const t = this.accessibilityLabel ? `${Y[this.language.current]} - ${this.accessibilityLabel}` : void 0;
158
- return v`
158
+ return y`
159
159
  <div class="sbb-file-selector">
160
- ${this.renderTemplate(v`<input
160
+ ${this.renderTemplate(y`<input
161
161
  class="sbb-file-selector__visually-hidden"
162
162
  type="file"
163
163
  ?disabled="${this.disabled || this.formDisabled}"
@@ -2,8 +2,8 @@ var p = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
4
  var m = (e, i, s) => i.has(e) || p("Cannot " + s);
5
- var g = (e, i, s) => (m(e, i, "read from private field"), s ? s.call(e) : i.get(e)), u = (e, i, s) => i.has(e) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, s), n = (e, i, s, r) => (m(e, i, "write to private field"), r ? r.call(e, s) : i.set(e, s), s);
6
- import { __runInitializers as b, __esDecorate as _ } from "tslib";
5
+ var g = (e, i, s) => (m(e, i, "read from private field"), s ? s.call(e) : i.get(e)), _ = (e, i, s) => i.has(e) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(e) : i.set(e, s), n = (e, i, s, r) => (m(e, i, "write to private field"), r ? r.call(e, s) : i.set(e, s), s);
6
+ import { __runInitializers as b, __esDecorate as u } from "tslib";
7
7
  import { css as y, LitElement as z } from "lit";
8
8
  import { customElement as x, property as S } from "lit/decorators.js";
9
9
  import { ref as D } from "lit/directives/ref.js";
@@ -21,7 +21,7 @@ let Q = (() => {
21
21
  return a = class extends c {
22
22
  constructor() {
23
23
  super(...arguments);
24
- u(this, l);
24
+ _(this, l);
25
25
  n(this, l, b(this, f, "")), this._counter = (b(this, h), 0);
26
26
  }
27
27
  /** The title displayed in `dropzone` variant. */
@@ -85,9 +85,9 @@ let Q = (() => {
85
85
  }
86
86
  }, l = new WeakMap(), r = a, (() => {
87
87
  const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
88
- d = [E(), S({ attribute: "title-content" })], _(a, null, d, { kind: "accessor", name: "titleContent", static: !1, private: !1, access: { has: (o) => "titleContent" in o, get: (o) => o.titleContent, set: (o, v) => {
88
+ d = [E(), S({ attribute: "title-content" })], u(a, null, d, { kind: "accessor", name: "titleContent", static: !1, private: !1, access: { has: (o) => "titleContent" in o, get: (o) => o.titleContent, set: (o, v) => {
89
89
  o.titleContent = v;
90
- } }, metadata: t }, f, h), _(null, i = { value: r }, e, { kind: "class", name: r.name, metadata: t }, null, s), r = i.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
90
+ } }, metadata: t }, f, h), u(null, i = { value: r }, e, { kind: "class", name: r.name, metadata: t }, null, s), r = i.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
91
91
  })(), a.styles = [T, w], a.events = {
92
92
  fileChangedEvent: "fileChanged"
93
93
  }, b(r, s), r;
@@ -1,4 +1,4 @@
1
- import { __esDecorate as n, __runInitializers as m } from "tslib";
1
+ import { __esDecorate as m, __runInitializers as n } from "tslib";
2
2
  import { LitElement as c } from "lit";
3
3
  import { customElement as b } from "lit/decorators.js";
4
4
  import { ref as u } from "lit/directives/ref.js";
@@ -11,7 +11,7 @@ import "../button/secondary-button-static.js";
11
11
  import "../icon.js";
12
12
  let j = (() => {
13
13
  var e;
14
- let s = [b("sbb-file-selector"), f()], i, a = [], t, r = S(c);
14
+ let o = [b("sbb-file-selector"), f()], i, a = [], t, r = S(c);
15
15
  return e = class extends r {
16
16
  renderTemplate(l) {
17
17
  return d`
@@ -21,8 +21,8 @@ let j = (() => {
21
21
  size=${this.size}
22
22
  icon-name="folder-open-small"
23
23
  ?disabled=${this.disabled || this.formDisabled}
24
- ${u((o) => {
25
- this.loadButton = o;
24
+ ${u((s) => {
25
+ this.loadButton = s;
26
26
  })}
27
27
  >
28
28
  ${p[this.language.current]}
@@ -34,10 +34,10 @@ let j = (() => {
34
34
  }
35
35
  }, t = e, (() => {
36
36
  const l = typeof Symbol == "function" && Symbol.metadata ? Object.create(r[Symbol.metadata] ?? null) : void 0;
37
- n(null, i = { value: t }, s, { kind: "class", name: t.name, metadata: l }, null, a), t = i.value, l && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: l });
37
+ m(null, i = { value: t }, o, { kind: "class", name: t.name, metadata: l }, null, a), t = i.value, l && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: l });
38
38
  })(), e.styles = h, e.events = {
39
39
  fileChangedEvent: "fileChanged"
40
- }, m(t, a), t;
40
+ }, n(t, a), t;
41
41
  })();
42
42
  export {
43
43
  j as SbbFileSelectorElement
@@ -22,8 +22,8 @@ let E = (() => {
22
22
  }
23
23
  _checkForSlottedActions() {
24
24
  var o;
25
- const e = "data-card-focusable";
26
- Array.from(((o = this.querySelectorAll) == null ? void 0 : o.call(this, v)) ?? []).filter((s) => !s.hasAttribute(e)).forEach((s) => s.setAttribute(e, ""));
25
+ const s = "data-card-focusable";
26
+ Array.from(((o = this.querySelectorAll) == null ? void 0 : o.call(this, v)) ?? []).filter((e) => !e.hasAttribute(s)).forEach((e) => e.setAttribute(s, ""));
27
27
  }
28
28
  render() {
29
29
  return m`
@@ -35,8 +35,8 @@ let E = (() => {
35
35
  `;
36
36
  }
37
37
  }, t = a, (() => {
38
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(l[Symbol.metadata] ?? null) : void 0;
39
- n(null, i = { value: t }, d, { kind: "class", name: t.name, metadata: e }, null, r), t = i.value, e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
38
+ const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(l[Symbol.metadata] ?? null) : void 0;
39
+ n(null, i = { value: t }, d, { kind: "class", name: t.name, metadata: s }, null, r), t = i.value, s && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s });
40
40
  })(), a.styles = h, b(t, r), t;
41
41
  })();
42
42
  export {
@@ -9,26 +9,26 @@ import { customElement as x, property as S } from "lit/decorators.js";
9
9
  import { hostAttributes as z } from "../core/decorators.js";
10
10
  const E = w`*,:before,:after{box-sizing:border-box}:host{--sbb-flip-card-summary-opacity: 1;--sbb-flip-card-summary-pointer-events: all;display:contents}.sbb-flip-card-summary{display:grid;min-height:var(--sbb-flip-card-min-height);pointer-events:var(--sbb-flip-card-summary-pointer-events);opacity:var(--sbb-flip-card-summary-opacity);border-radius:var(--sbb-flip-card-border-radius);overflow:hidden;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);width:100%;height:100%;transition:all var(--sbb-flip-card-summary-transition-duration) ease-out;transition-delay:var(--sbb-flip-card-summary-transition-delay)}@media (min-width: 37.5rem){:host([image-alignment=after]) .sbb-flip-card-summary{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}}@media (min-width: 52.5rem){:host([image-alignment=after]) .sbb-flip-card-summary{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr}}::slotted(sbb-title){padding-inline:var(--sbb-spacing-responsive-s);padding-block:var(--sbb-spacing-responsive-s) var(--sbb-spacing-responsive-xs);margin:0;grid-area:1/1/2/2}@media (min-width: 37.5rem){:host([image-alignment=after]) ::slotted(sbb-title){grid-area:1/1/2/3}}@media (min-width: 52.5rem){:host([image-alignment=after]) ::slotted(sbb-title){grid-area:1/1/2/2}}::slotted(*:not([slot=image])){transform:translateY(var(--sbb-flip-card-translate-title-y-hover, 0rem));transition:transform var(--sbb-disable-animation-duration, var(--sbb-animation-duration-2x)) var(--sbb-animation-easing)}.sbb-flip-card-summary--image-wrapper{grid-area:2/1/3/2}@media (min-width: 37.5rem){:host([image-alignment=after]) .sbb-flip-card-summary--image-wrapper{grid-area:1/3/2/4}}@media (min-width: 52.5rem){:host([image-alignment=after]) .sbb-flip-card-summary--image-wrapper{grid-area:1/2/2/3}}::slotted([slot=image]){width:100%;height:100%}`;
11
11
  let C = (() => {
12
- var n, s;
12
+ var l, s;
13
13
  let a = [x("sbb-flip-card-summary"), z({
14
14
  slot: "summary"
15
15
  })], e, t = [], i, d = _, b, g = [], p = [];
16
16
  return s = class extends d {
17
17
  constructor() {
18
18
  super(...arguments);
19
- h(this, n, o(this, g, "after"));
19
+ h(this, l, o(this, g, "after"));
20
20
  o(this, p);
21
21
  }
22
22
  /** The position where to render the image. */
23
23
  get imageAlignment() {
24
- return f(this, n);
24
+ return f(this, l);
25
25
  }
26
26
  set imageAlignment(r) {
27
- y(this, n, r);
27
+ y(this, l, r);
28
28
  }
29
29
  willUpdate(r) {
30
- var m, l;
31
- super.willUpdate(r), r.has("imageAlignment") && ((l = (m = this.closest) == null ? void 0 : m.call(this, "sbb-flip-card")) == null || l.setAttribute("data-image-alignment", this.imageAlignment));
30
+ var m, n;
31
+ super.willUpdate(r), r.has("imageAlignment") && ((n = (m = this.closest) == null ? void 0 : m.call(this, "sbb-flip-card")) == null || n.setAttribute("data-image-alignment", this.imageAlignment));
32
32
  }
33
33
  render() {
34
34
  return A`
@@ -40,10 +40,10 @@ let C = (() => {
40
40
  </div>
41
41
  `;
42
42
  }
43
- }, n = new WeakMap(), i = s, (() => {
43
+ }, l = new WeakMap(), i = s, (() => {
44
44
  const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(d[Symbol.metadata] ?? null) : void 0;
45
- b = [S({ attribute: "image-alignment", reflect: !0 })], v(s, null, b, { kind: "accessor", name: "imageAlignment", static: !1, private: !1, access: { has: (m) => "imageAlignment" in m, get: (m) => m.imageAlignment, set: (m, l) => {
46
- m.imageAlignment = l;
45
+ b = [S({ attribute: "image-alignment", reflect: !0 })], v(s, null, b, { kind: "accessor", name: "imageAlignment", static: !1, private: !1, access: { has: (m) => "imageAlignment" in m, get: (m) => m.imageAlignment, set: (m, n) => {
46
+ m.imageAlignment = n;
47
47
  } }, metadata: r }, g, p), v(null, e = { value: i }, a, { kind: "class", name: i.name, metadata: r }, null, t), i = e.value, r && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r });
48
48
  })(), s.styles = E, o(i, t), i;
49
49
  })();
@@ -1,18 +1,18 @@
1
1
  @font-face {
2
2
  font-family: SBB;
3
- src: url("https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Roman.woff2") format("woff2"), url("https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Roman.woff") format("woff");
3
+ src: url("https://cdn.app.sbb.ch/fonts/v1_8_1_full/SBBWeb-Roman.woff2") format("woff2"), url("https://cdn.app.sbb.ch/fonts/v1_8_1_full/SBBWeb-Roman.woff") format("woff");
4
4
  font-display: fallback;
5
5
  font-weight: 400;
6
6
  }
7
7
  @font-face {
8
8
  font-family: SBB;
9
- src: url("https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Bold.woff2") format("woff2"), url("https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Bold.woff") format("woff");
9
+ src: url("https://cdn.app.sbb.ch/fonts/v1_8_1_full/SBBWeb-Bold.woff2") format("woff2"), url("https://cdn.app.sbb.ch/fonts/v1_8_1_full/SBBWeb-Bold.woff") format("woff");
10
10
  font-display: swap;
11
11
  font-weight: 700;
12
12
  }
13
13
  @font-face {
14
14
  font-family: SBB;
15
- src: url("https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Light.woff2") format("woff2"), url("https://cdn.app.sbb.ch/fonts/v1/SBBWeb-Light.woff") format("woff");
15
+ src: url("https://cdn.app.sbb.ch/fonts/v1_8_1_full/SBBWeb-Light.woff2") format("woff2"), url("https://cdn.app.sbb.ch/fonts/v1_8_1_full/SBBWeb-Light.woff") format("woff");
16
16
  font-display: swap;
17
17
  font-weight: 300;
18
18
  }
package/footer.js CHANGED
@@ -6,7 +6,7 @@ var h = (i, s, a) => (D(i, s, "read from private field"), a ? a.call(i) : s.get(
6
6
  import { __esDecorate as u, __runInitializers as r } from "tslib";
7
7
  import { css as O, LitElement as B, nothing as C } from "lit";
8
8
  import { customElement as F, property as f } from "lit/decorators.js";
9
- import { html as A, unsafeStatic as M } from "lit/static-html.js";
9
+ import { unsafeStatic as A, html as M } from "lit/static-html.js";
10
10
  import { forceType as N } from "./core/decorators.js";
11
11
  import { SbbNegativeMixin as G } from "./core/mixins.js";
12
12
  const P = O`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-footer-gap-horizontal: var(--sbb-grid-base-gutter-responsive);--sbb-footer-gap-vertical: var(--sbb-spacing-responsive-l);--sbb-footer-background-color: var(--sbb-color-milk);--sbb-footer-clock-width: 4.75rem;--sbb-footer-color: var(--sbb-color-granite);--sbb-link-text-decoration: none}@media (min-width: 37.5rem){:host{--sbb-footer-clock-width: 7rem}}:host([negative]){--sbb-footer-background-color: var(--sbb-color-charcoal);--sbb-footer-color: var(--sbb-color-white);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark)}.sbb-footer{--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);color:var(--sbb-footer-color);padding-block:var(--sbb-spacing-responsive-l);background-color:var(--sbb-footer-background-color)}@media (forced-colors: active){.sbb-footer{border-block-start:var(--sbb-border-width-1x) solid CanvasText}}:host(:not([expanded])) .sbb-footer-wrapper{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([expanded])) .sbb-footer-wrapper{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([expanded]) .sbb-footer-wrapper{padding-inline:var(--sbb-spacing-responsive-xxs)}.sbb-footer__title{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}::slotted(.sbb-link-list-button-group){display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-6x);align-items:flex-start}:host([variant=clock-columns]) slot{display:grid;grid-template-columns:auto;grid-template-rows:auto;column-gap:var(--sbb-footer-gap-horizontal)}@media (min-width: 37.5rem){:host([variant=clock-columns]) slot{grid-template-columns:calc(50% - var(--sbb-footer-gap-horizontal) / 2)}}@media (min-width: 80rem){:host([variant=clock-columns]) slot{max-width:var(--sbb-footer-content-max-width);margin-inline:auto;grid-template-columns:repeat(4,1fr)}}:host([variant=clock-columns]) ::slotted(*:not(:last-child,sbb-divider)){margin-block-end:var(--sbb-footer-gap-vertical)}:host([variant=clock-columns]) ::slotted(sbb-clock){width:var(--sbb-footer-clock-width);grid-row:1}@media (min-width: 37.5rem){:host([variant=clock-columns]) ::slotted(sbb-clock){align-self:start;grid-row:2}}@media (min-width: 80rem){:host([variant=clock-columns]) ::slotted(sbb-clock){grid-row:1;grid-column:4/5;justify-self:end}}:host([variant=clock-columns]) ::slotted(sbb-divider){margin-block:calc(var(--sbb-spacing-responsive-xl) - var(--sbb-footer-gap-vertical)) var(--sbb-spacing-responsive-s)}@media (min-width: 37.5rem){:host([variant=clock-columns]) ::slotted(sbb-divider){grid-row:3;grid-column:1/4;width:100%}}@media (min-width: 80rem){:host([variant=clock-columns]) ::slotted(sbb-divider){grid-row:2}}@media (min-width: 37.5rem){:host([variant=clock-columns]) ::slotted(:nth-child(-n+2)){grid-row:1}:host([variant=clock-columns]) ::slotted(:nth-child(3)),:host([variant=clock-columns]) ::slotted(:nth-child(4)){grid-row:2}:host([variant=clock-columns]) ::slotted(*:last-child){grid-row:4}}@media (min-width: 64rem){:host([variant=clock-columns]) ::slotted(*:last-child){grid-column:1/4}}@media (min-width: 80rem){:host([variant=clock-columns]) ::slotted(:nth-child(-n+4)){grid-row:1}:host([variant=clock-columns]) ::slotted(*:last-child){grid-row:3}:host([variant=clock-columns]) ::slotted(sbb-divider),:host([variant=clock-columns]) ::slotted(*:last-child){grid-column:1/5}}`;
@@ -58,9 +58,9 @@ let W = (() => {
58
58
  p(this, m, e);
59
59
  }
60
60
  render() {
61
- const e = `h${this.accessibilityTitleLevel}`, t = A`<${M(e)} class="sbb-footer__title"
62
- >${this.accessibilityTitle}</${M(e)}>`;
63
- return A`
61
+ const e = `h${this.accessibilityTitleLevel}`, t = M`<${A(e)} class="sbb-footer__title"
62
+ >${this.accessibilityTitle}</${A(e)}>`;
63
+ return M`
64
64
  <footer class="sbb-footer">
65
65
  <div class="sbb-footer-wrapper">
66
66
  ${this.accessibilityTitle ? t : C}
@@ -1 +1 @@
1
- {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../../src/elements/form-field/form-field/form-field.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAcb,OAAO,eAAe,CAAC;;AAOvB;;;;;;;;GAQG;AACH,qBAGM,mBAAoB,SAAQ,wBAA+C;IAC/E,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,OAAO,CAAC,QAAQ,CAAC,6BAA6B,CAAmC;IAEjF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAItC;IAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAA2C;IAElF,OAAO,CAAC,QAAQ,CAAC,oCAAoC,CAKnD;IAEF,OAAO,CAAC,QAAQ,CAAC,iC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IAiB7B,qFAAqF;IAC9E,KAAK,IAAI,IAAI;IAIpB,4FAA4F;IACrF,KAAK,IAAI,IAAI;IAQpB,OAAO,CAAC,aAAa;cAMF,MAAM,IAAI,cAAc;CAmC5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,gBAAgB,EAAE,mBAAmB,CAAC;KACvC;CACF"}
@@ -4,7 +4,7 @@ var ae = (o) => {
4
4
  var be = (o, a, b) => a.has(o) || ae("Cannot " + b);
5
5
  var n = (o, a, b) => (be(o, a, "read from private field"), b ? b.call(o) : a.get(o)), d = (o, a, b) => a.has(o) ? ae("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(o) : a.set(o, b), i = (o, a, b, f) => (be(o, a, "write to private field"), f ? f.call(o, b) : a.set(o, b), b);
6
6
  import { __runInitializers as s, __esDecorate as c } from "tslib";
7
- import { css as fe, LitElement as pe, isServer as he, html as E, nothing as ne } from "lit";
7
+ import { css as fe, LitElement as pe, isServer as he, nothing as ne, html as E } from "lit";
8
8
  import { customElement as me, property as h, state as L } from "lit/decorators.js";
9
9
  import { sbbInputModalityDetector as ue } from "../core/a11y.js";
10
10
  import { SbbLanguageController as _e } from "../core/controllers.js";
@@ -18,7 +18,7 @@ let de = 0, Ae = 0;
18
18
  const S = /* @__PURE__ */ new WeakMap();
19
19
  let Me = (() => {
20
20
  var m, u, _, g, v, x, y, w, k, z, l;
21
- let o = [me("sbb-form-field"), ge()], a, b = [], f, C = ke(ze(pe)), N, O = [], T = [], D, F = [], U = [], $, B = [], M = [], V, j = [], H = [], P, R = [], q = [], G, W = [], Y = [], J, K = [], Q = [], X, Z = [], ee = [], te, re = [], ie = [], se, oe = [], le = [];
21
+ let o = [me("sbb-form-field"), ge()], a, b = [], f, C = ke(ze(pe)), N, O = [], D = [], T, F = [], U = [], $, B = [], M = [], V, j = [], H = [], P, R = [], q = [], G, W = [], Y = [], J, K = [], Q = [], X, Z = [], ee = [], te, re = [], ie = [], se, oe = [], le = [];
22
22
  return l = class extends C {
23
23
  constructor() {
24
24
  super(...arguments);
@@ -49,7 +49,7 @@ let Me = (() => {
49
49
  "tel",
50
50
  "text",
51
51
  "url"
52
- ], i(this, m, s(this, O, "none")), i(this, u, (s(this, T), s(this, F, !1))), i(this, _, (s(this, U), s(this, B, ve() ? "s" : "m"))), i(this, g, (s(this, M), s(this, j, !1))), i(this, v, (s(this, H), s(this, R, "default"))), i(this, x, (s(this, q), s(this, W, !1))), i(this, y, (s(this, Y), s(this, K, !1))), i(this, w, (s(this, Q), s(this, Z, []))), this._originalInputAriaDescribedby = s(this, ee), i(this, k, s(this, re, void 0)), i(this, z, (s(this, ie), s(this, oe, void 0))), this._language = (s(this, le), new _e(this)), this._formFieldAttributeObserver = he ? null : new MutationObserver((e) => {
52
+ ], i(this, m, s(this, O, "none")), i(this, u, (s(this, D), s(this, F, !1))), i(this, _, (s(this, U), s(this, B, ve() ? "s" : "m"))), i(this, g, (s(this, M), s(this, j, !1))), i(this, v, (s(this, H), s(this, R, "default"))), i(this, x, (s(this, q), s(this, W, !1))), i(this, y, (s(this, Y), s(this, K, !1))), i(this, w, (s(this, Q), s(this, Z, []))), this._originalInputAriaDescribedby = s(this, ee), i(this, k, s(this, re, void 0)), i(this, z, (s(this, ie), s(this, oe, void 0))), this._language = (s(this, le), new _e(this)), this._formFieldAttributeObserver = he ? null : new MutationObserver((e) => {
53
53
  e.some((t) => t.type === "attributes") && this._readInputState();
54
54
  }), this._inputAbortController = new AbortController();
55
55
  }
@@ -189,6 +189,8 @@ let Me = (() => {
189
189
  signal: this._inputAbortController.signal
190
190
  }), this._input.addEventListener("blur", () => this._checkAndUpdateInputEmpty(), {
191
191
  signal: this._inputAbortController.signal
192
+ }), this._input.addEventListener("invalid", (r) => r.preventDefault(), {
193
+ signal: this._inputAbortController.signal
192
194
  });
193
195
  let e = this._input;
194
196
  if (this._input.localName === "input")
@@ -322,9 +324,9 @@ let Me = (() => {
322
324
  }
323
325
  }, m = new WeakMap(), u = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), v = new WeakMap(), x = new WeakMap(), y = new WeakMap(), w = new WeakMap(), k = new WeakMap(), z = new WeakMap(), f = l, (() => {
324
326
  const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(C[Symbol.metadata] ?? null) : void 0;
325
- N = [h({ attribute: "error-space", reflect: !0 })], D = [A(), h({ type: Boolean })], $ = [h({ reflect: !0 })], V = [A(), h({ reflect: !0, type: Boolean })], P = [h({ reflect: !0 })], G = [A(), h({ attribute: "hidden-label", reflect: !0, type: Boolean })], J = [A(), h({ attribute: "floating-label", reflect: !0, type: Boolean })], X = [L()], te = [L()], se = [L()], c(l, null, N, { kind: "accessor", name: "errorSpace", static: !1, private: !1, access: { has: (t) => "errorSpace" in t, get: (t) => t.errorSpace, set: (t, r) => {
327
+ N = [h({ attribute: "error-space", reflect: !0 })], T = [A(), h({ type: Boolean })], $ = [h({ reflect: !0 })], V = [A(), h({ reflect: !0, type: Boolean })], P = [h({ reflect: !0 })], G = [A(), h({ attribute: "hidden-label", reflect: !0, type: Boolean })], J = [A(), h({ attribute: "floating-label", reflect: !0, type: Boolean })], X = [L()], te = [L()], se = [L()], c(l, null, N, { kind: "accessor", name: "errorSpace", static: !1, private: !1, access: { has: (t) => "errorSpace" in t, get: (t) => t.errorSpace, set: (t, r) => {
326
328
  t.errorSpace = r;
327
- } }, metadata: e }, O, T), c(l, null, D, { kind: "accessor", name: "optional", static: !1, private: !1, access: { has: (t) => "optional" in t, get: (t) => t.optional, set: (t, r) => {
329
+ } }, metadata: e }, O, D), c(l, null, T, { kind: "accessor", name: "optional", static: !1, private: !1, access: { has: (t) => "optional" in t, get: (t) => t.optional, set: (t, r) => {
328
330
  t.optional = r;
329
331
  } }, metadata: e }, F, U), c(l, null, $, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, r) => {
330
332
  t.size = r;
@@ -1,14 +1,14 @@
1
- import { __esDecorate as s, __runInitializers as m } from "tslib";
1
+ import { __esDecorate as m, __runInitializers as n } from "tslib";
2
2
  import { customElement as i } from "lit/decorators.js";
3
3
  import { SbbButtonBaseElement as c } from "../core/base-elements.js";
4
4
  import { SbbHeaderActionCommonElementMixin as u } from "./common.js";
5
5
  let p = (() => {
6
6
  var t;
7
- let o = [i("sbb-header-button")], l, r = [], e, n = u(c);
8
- return t = class extends n {
7
+ let s = [i("sbb-header-button")], l, r = [], e, o = u(c);
8
+ return t = class extends o {
9
9
  }, e = t, (() => {
10
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(n[Symbol.metadata] ?? null) : void 0;
11
- s(null, l = { value: e }, o, { kind: "class", name: e.name, metadata: a }, null, r), e = l.value, a && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), m(e, r);
10
+ const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;
11
+ m(null, l = { value: e }, s, { kind: "class", name: e.name, metadata: a }, null, r), e = l.value, a && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), n(e, r);
12
12
  })(), e;
13
13
  })();
14
14
  export {
@@ -1,14 +1,14 @@
1
- import { __esDecorate as s, __runInitializers as m } from "tslib";
1
+ import { __esDecorate as m, __runInitializers as n } from "tslib";
2
2
  import { customElement as o } from "lit/decorators.js";
3
3
  import { SbbLinkBaseElement as c } from "../core/base-elements.js";
4
4
  import { SbbHeaderActionCommonElementMixin as b } from "./common.js";
5
5
  let p = (() => {
6
6
  var t;
7
- let i = [o("sbb-header-link")], l, r = [], e, n = b(c);
8
- return t = class extends n {
7
+ let s = [o("sbb-header-link")], l, r = [], e, i = b(c);
8
+ return t = class extends i {
9
9
  }, e = t, (() => {
10
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(n[Symbol.metadata] ?? null) : void 0;
11
- s(null, l = { value: e }, i, { kind: "class", name: e.name, metadata: a }, null, r), e = l.value, a && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), m(e, r);
10
+ const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(i[Symbol.metadata] ?? null) : void 0;
11
+ m(null, l = { value: e }, s, { kind: "class", name: e.name, metadata: a }, null, r), e = l.value, a && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), n(e, r);
12
12
  })(), e;
13
13
  })();
14
14
  export {
package/icon.js CHANGED
@@ -32,15 +32,15 @@ const R = (t) => typeof t == "string", q = (t) => {
32
32
  const c = a.firstElementChild;
33
33
  return c && c.nodeName.toLowerCase() === "svg" && (i && !c.classList.contains("color-immutable") && c.classList.add("color-immutable"), e === !1 || q(c)) ? a.innerHTML : "";
34
34
  }, U = "https://icons.app.sbb.ch/", X = (/* @__PURE__ */ new Map()).set("default", `${U}icons/`).set("picto", `${U}picto/`), j = /* @__PURE__ */ new Map(), Y = (t, e, i) => {
35
- var m;
36
- const a = Q().icon ?? {}, c = ((m = a.namespaces) == null ? void 0 : m.get(t)) ?? X.get(t);
35
+ var u;
36
+ const a = Q().icon ?? {}, c = ((u = a.namespaces) == null ? void 0 : u.get(t)) ?? X.get(t);
37
37
  if (c == null)
38
38
  throw Error(`Unable to find the namespace "${t}". Please register your custom namespace.`);
39
39
  const l = `${c}${e}.svg`;
40
- let u = j.get(l);
41
- if (!u)
40
+ let m = j.get(l);
41
+ if (!m)
42
42
  if (typeof fetch < "u" && !P)
43
- u = (a.interceptor ?? ((h) => h.request()))({
43
+ m = (a.interceptor ?? ((h) => h.request()))({
44
44
  namespace: t,
45
45
  name: e,
46
46
  url: l,
@@ -51,24 +51,24 @@ const R = (t) => typeof t == "string", q = (t) => {
51
51
  }).catch((h) => {
52
52
  throw Error(h);
53
53
  })
54
- }), j.set(l, u);
54
+ }), j.set(l, m);
55
55
  else
56
56
  return Promise.resolve("");
57
- return u;
57
+ return m;
58
58
  }, Z = B`*,:before,:after{box-sizing:border-box}:host{display:inline-block;line-height:0;-webkit-tap-highlight-color:transparent}:host([data-empty]){--sbb-icon-default-dimension: 0}:host([data-empty][data-namespace=default][name$=-small]){--sbb-icon-default-dimension: var(--sbb-size-icon-ui-small)}:host([data-empty][data-namespace=default][name$=-medium]){--sbb-icon-default-dimension: var(--sbb-size-icon-ui-medium)}:host([data-empty][data-namespace=default][name$=-large]){--sbb-icon-default-dimension: var(--sbb-size-icon-ui-large)}svg{width:var(--sbb-icon-svg-width, var(--sbb-icon-default-dimension));height:var(--sbb-icon-svg-height, var(--sbb-icon-default-dimension));stroke:var(--sbb-icon-svg-stroke-color);stroke-width:var(--sbb-icon-svg-stroke-width)}svg:not(.color-immutable) [fill]:not([fill=none]){fill:currentcolor}svg:not(.color-immutable) [stroke]:not([stroke=none]){stroke:currentcolor}svg:not(.color-immutable)>:where(path,polygon,polyline):where(:not([stroke]):not([fill])),svg:not(.color-immutable) :where(:not([stroke]):not([fill])) :where(path,polygon,polyline):where(:not([stroke]):not([fill])){fill:currentcolor}`, k = "default";
59
59
  let tt = (() => {
60
60
  var z, A, r, s;
61
61
  let t = [G({
62
62
  "data-namespace": k,
63
63
  "data-empty": ""
64
- })], e, i = [], a, c = F, l, u = [], m = [], w, h = [], g = [], b, f = [], p = [];
64
+ })], e, i = [], a, c = F, l, m = [], u = [], w, h = [], g = [], b, p = [], f = [];
65
65
  return s = class extends c {
66
66
  constructor() {
67
67
  super(...arguments);
68
- N(this, z, d(this, u, k));
69
- N(this, A, (d(this, m), d(this, h, null)));
70
- N(this, r, (d(this, g), d(this, f, !1)));
71
- d(this, p);
68
+ N(this, z, d(this, m, k));
69
+ N(this, A, (d(this, u), d(this, h, null)));
70
+ N(this, r, (d(this, g), d(this, p, !1)));
71
+ d(this, f);
72
72
  }
73
73
  get _svgNamespace() {
74
74
  return I(this, z);
@@ -142,21 +142,21 @@ let tt = (() => {
142
142
  const o = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
143
143
  l = [x()], w = [x()], b = [E(), L({ attribute: "no-sanitize", type: Boolean })], v(s, null, l, { kind: "accessor", name: "_svgNamespace", static: !1, private: !1, access: { has: (n) => "_svgNamespace" in n, get: (n) => n._svgNamespace, set: (n, S) => {
144
144
  n._svgNamespace = S;
145
- } }, metadata: o }, u, m), v(s, null, w, { kind: "accessor", name: "_svgIcon", static: !1, private: !1, access: { has: (n) => "_svgIcon" in n, get: (n) => n._svgIcon, set: (n, S) => {
145
+ } }, metadata: o }, m, u), v(s, null, w, { kind: "accessor", name: "_svgIcon", static: !1, private: !1, access: { has: (n) => "_svgIcon" in n, get: (n) => n._svgIcon, set: (n, S) => {
146
146
  n._svgIcon = S;
147
147
  } }, metadata: o }, h, g), v(s, null, b, { kind: "accessor", name: "noSanitize", static: !1, private: !1, access: { has: (n) => "noSanitize" in n, get: (n) => n.noSanitize, set: (n, S) => {
148
148
  n.noSanitize = S;
149
- } }, metadata: o }, f, p), v(null, e = { value: a }, t, { kind: "class", name: a.name, metadata: o }, null, i), a = e.value, o && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: o });
149
+ } }, metadata: o }, p, f), v(null, e = { value: a }, t, { kind: "class", name: a.name, metadata: o }, null, i), a = e.value, o && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: o });
150
150
  })(), s.styles = Z, d(a, i), a;
151
151
  })(), ct = (() => {
152
- var b, f, p;
153
- let t = [V("sbb-icon")], e, i = [], a, c = tt, l, u = [], m = [], w, h = [], g = [];
154
- return p = class extends c {
152
+ var b, p, f;
153
+ let t = [V("sbb-icon")], e, i = [], a, c = tt, l, m = [], u = [], w, h = [], g = [];
154
+ return f = class extends c {
155
155
  constructor() {
156
156
  super(...arguments);
157
157
  N(this, b);
158
- N(this, f);
159
- _(this, b, d(this, u, "")), this._defaultAriaLabel = (d(this, m), ""), _(this, f, d(this, h, !1)), d(this, g);
158
+ N(this, p);
159
+ _(this, b, d(this, m, "")), this._defaultAriaLabel = (d(this, u), ""), _(this, p, d(this, h, !1)), d(this, g);
160
160
  }
161
161
  /**
162
162
  * We need to additionally observe the svgicon attribute
@@ -183,10 +183,10 @@ let tt = (() => {
183
183
  * components) we need to check whether the attribute svgicon is used.
184
184
  */
185
185
  get _sbbAngularCompatibility() {
186
- return I(this, f);
186
+ return I(this, p);
187
187
  }
188
188
  set _sbbAngularCompatibility(r) {
189
- _(this, f, r);
189
+ _(this, p, r);
190
190
  }
191
191
  async fetchSvgIcon(r, s) {
192
192
  return this.getAttribute("aria-label") === this._defaultAriaLabel && this.removeAttribute("aria-label"), this._defaultAriaLabel = `Icon ${s.replace(/-/g, " ")}`, this.getAttribute("aria-hidden") === "false" && !this.hasAttribute("aria-label") && s && this.setAttribute("aria-label", this._defaultAriaLabel), super.fetchSvgIcon(r, s);
@@ -203,22 +203,22 @@ let tt = (() => {
203
203
  render() {
204
204
  return this._sbbAngularCompatibility ? C`<slot></slot>` : super.render();
205
205
  }
206
- }, b = new WeakMap(), f = new WeakMap(), a = p, (() => {
206
+ }, b = new WeakMap(), p = new WeakMap(), a = f, (() => {
207
207
  const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
208
- l = [E(), L({ reflect: !0, converter: D })], w = [x()], v(p, null, l, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (s) => "name" in s, get: (s) => s.name, set: (s, y) => {
208
+ l = [E(), L({ reflect: !0, converter: D })], w = [x()], v(f, null, l, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (s) => "name" in s, get: (s) => s.name, set: (s, y) => {
209
209
  s.name = y;
210
- } }, metadata: r }, u, m), v(p, null, w, { kind: "accessor", name: "_sbbAngularCompatibility", static: !1, private: !1, access: { has: (s) => "_sbbAngularCompatibility" in s, get: (s) => s._sbbAngularCompatibility, set: (s, y) => {
210
+ } }, metadata: r }, m, u), v(f, null, w, { kind: "accessor", name: "_sbbAngularCompatibility", static: !1, private: !1, access: { has: (s) => "_sbbAngularCompatibility" in s, get: (s) => s._sbbAngularCompatibility, set: (s, y) => {
211
211
  s._sbbAngularCompatibility = y;
212
212
  } }, metadata: r }, h, g), v(null, e = { value: a }, t, { kind: "class", name: a.name, metadata: r }, null, i), a = e.value, r && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r }), d(a, i);
213
213
  })(), a;
214
214
  })();
215
- const ut = (t) => (() => {
216
- var u, m;
215
+ const mt = (t) => (() => {
216
+ var m, u;
217
217
  let i = t, a, c = [], l = [];
218
- return m = class extends i {
218
+ return u = class extends i {
219
219
  constructor() {
220
220
  super(...arguments);
221
- N(this, u, d(this, c, ""));
221
+ N(this, m, d(this, c, ""));
222
222
  d(this, l);
223
223
  }
224
224
  /**
@@ -227,10 +227,10 @@ const ut = (t) => (() => {
227
227
  * https://icons.app.sbb.ch.
228
228
  */
229
229
  get iconName() {
230
- return I(this, u);
230
+ return I(this, m);
231
231
  }
232
232
  set iconName(g) {
233
- _(this, u, g);
233
+ _(this, m, g);
234
234
  }
235
235
  renderIconSlot(g) {
236
236
  return C`
@@ -239,17 +239,17 @@ const ut = (t) => (() => {
239
239
  </slot>
240
240
  `;
241
241
  }
242
- }, u = new WeakMap(), (() => {
242
+ }, m = new WeakMap(), (() => {
243
243
  const g = typeof Symbol == "function" && Symbol.metadata ? Object.create(i[Symbol.metadata] ?? null) : void 0;
244
- a = [E(), L({ attribute: "icon-name", reflect: !0, converter: D })], v(m, null, a, { kind: "accessor", name: "iconName", static: !1, private: !1, access: { has: (b) => "iconName" in b, get: (b) => b.iconName, set: (b, f) => {
245
- b.iconName = f;
246
- } }, metadata: g }, c, l), g && Object.defineProperty(m, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: g });
247
- })(), m;
244
+ a = [E(), L({ attribute: "icon-name", reflect: !0, converter: D })], v(u, null, a, { kind: "accessor", name: "iconName", static: !1, private: !1, access: { has: (b) => "iconName" in b, get: (b) => b.iconName, set: (b, p) => {
245
+ b.iconName = p;
246
+ } }, metadata: g }, c, l), g && Object.defineProperty(u, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: g });
247
+ })(), u;
248
248
  })();
249
249
  export {
250
250
  tt as SbbIconBase,
251
251
  ct as SbbIconElement,
252
- ut as SbbIconNameMixin,
252
+ mt as SbbIconNameMixin,
253
253
  Y as getSvgContent,
254
254
  q as isValid,
255
255
  W as validateContent
package/image.js CHANGED
@@ -5,7 +5,7 @@ var ke = (r, o, l) => o.has(r) || _e("Cannot " + l);
5
5
  var h = (r, o, l) => (ke(r, o, "read from private field"), l ? l.call(r) : o.get(r)), u = (r, o, l) => o.has(r) ? _e("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(r) : o.set(r, l), s = (r, o, l, d) => (ke(r, o, "write to private field"), d ? d.call(r, l) : o.set(r, l), l);
6
6
  import { __esDecorate as p, __runInitializers as a } from "tslib";
7
7
  import { S as Se, a as ye, b as ze, c as ve, d as xe, e as Me, f as $e, g as we, h as Le, i as Ie, j as Ce, k as Fe, l as De, m as Be, n as Ee } from "./sbb-tokens-BgDF8jIh.js";
8
- import { css as Qe, LitElement as qe, html as Q, nothing as F } from "lit";
8
+ import { css as Qe, LitElement as qe, nothing as F, html as Q } from "lit";
9
9
  import { customElement as Oe, property as g, eventOptions as Te } from "lit/decorators.js";
10
10
  import { forceType as b } from "./core/decorators.js";
11
11
  const Xe = Qe`*,:before,:after{box-sizing:border-box}:host{--sbb-image-aspect-ratio: 16 / 9;--sbb-image-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-image-object-fit: cover;display:block;border-radius:var(--sbb-border-radius-4x);overflow:hidden}.sbb-image__img{opacity:.000001}:host([data-loaded]) .sbb-image__img{opacity:.999999}:host(:not([skip-lqip])) .sbb-image__img{position:absolute;top:0;right:0;bottom:0;left:0}:host([data-loaded]) .sbb-image__blurred{opacity:0}picture{display:contents}:is(.sbb-image__img,.sbb-image__blurred){width:100%;height:100%;object-fit:var(--sbb-image-object-fit);object-position:var(--sbb-image-object-position);transition:opacity var(--sbb-image-animation-duration) var(--sbb-animation-easing)}.sbb-image__wrapper{display:flex;position:relative;width:100%;height:100%;aspect-ratio:var(--sbb-image-aspect-ratio)}`, Ye = (r) => {
package/journey-header.js CHANGED
@@ -4,7 +4,7 @@ var O = (i) => {
4
4
  var B = (i, s, r) => s.has(i) || O("Cannot " + r);
5
5
  var g = (i, s, r) => (B(i, s, "read from private field"), r ? r.call(i) : s.get(i)), p = (i, s, r) => s.has(i) ? O("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, r), n = (i, s, r, l) => (B(i, s, "write to private field"), l ? l.call(i, r) : s.set(i, r), r);
6
6
  import { __runInitializers as o, __esDecorate as _ } from "tslib";
7
- import { css as J, LitElement as P, html as F, nothing as H } from "lit";
7
+ import { css as J, LitElement as P, nothing as F, html as H } from "lit";
8
8
  import { customElement as R, property as f } from "lit/decorators.js";
9
9
  import { SbbLanguageController as q } from "./core/controllers.js";
10
10
  import { forceType as v } from "./core/decorators.js";
@@ -72,9 +72,9 @@ let de = (() => {
72
72
  }
73
73
  render() {
74
74
  const t = this.roundTrip ? "arrows-long-right-left-small" : "arrow-long-right-small";
75
- return F`
75
+ return H`
76
76
  <sbb-title
77
- level=${this.level || H}
77
+ level=${this.level || F}
78
78
  ?negative=${this.negative}
79
79
  visual-level=${W.get(this.size)}
80
80
  >
@@ -91,9 +91,9 @@ let de = (() => {
91
91
  &nbsp;${K[this._language.current]}&nbsp;
92
92
  </sbb-screen-reader-only>
93
93
  ${this.destination}
94
- ${this.roundTrip ? F` <sbb-screen-reader-only>
94
+ ${this.roundTrip ? H` <sbb-screen-reader-only>
95
95
  ${Q(this.origin)[this._language.current]}
96
- </sbb-screen-reader-only>` : H}
96
+ </sbb-screen-reader-only>` : F}
97
97
  </span>
98
98
  </span>
99
99
  </sbb-title>
@@ -5,11 +5,11 @@ import { SbbDisabledTabIndexActionMixin as c } from "../core/mixins.js";
5
5
  import { SbbBlockLinkCommonElementMixin as u } from "./common.js";
6
6
  let k = (() => {
7
7
  var e;
8
- let i = [s("sbb-block-link-button")], l, n = [], t, o = u(c(b));
9
- return e = class extends o {
8
+ let n = [s("sbb-block-link-button")], l, o = [], t, i = u(c(b));
9
+ return e = class extends i {
10
10
  }, t = e, (() => {
11
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;
12
- r(null, l = { value: t }, i, { kind: "class", name: t.name, metadata: a }, null, n), t = l.value, a && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), m(t, n);
11
+ const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(i[Symbol.metadata] ?? null) : void 0;
12
+ r(null, l = { value: t }, n, { kind: "class", name: t.name, metadata: a }, null, o), t = l.value, a && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a }), m(t, o);
13
13
  })(), t;
14
14
  })();
15
15
  export {