@sbb-esta/lyne-elements 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/clock.js +5 -5
  2. package/container/container.js +14 -14
  3. package/core/dom/platform.d.ts +2 -3
  4. package/core/dom/platform.d.ts.map +1 -1
  5. package/core/dom.js +38 -40
  6. package/core/styles/core.scss +6 -0
  7. package/core/styles/mixins/lists.scss +11 -1
  8. package/core/testing/wait-for-image-ready.d.ts.map +1 -1
  9. package/core/testing.js +61 -54
  10. package/core.css +5 -0
  11. package/custom-elements.json +123 -1
  12. package/datepicker/datepicker-toggle.js +3 -3
  13. package/development/clock.js +1 -1
  14. package/development/container/container.js +1 -1
  15. package/development/core/dom/platform.d.ts +2 -3
  16. package/development/core/dom/platform.d.ts.map +1 -1
  17. package/development/core/dom.js +4 -5
  18. package/development/core/testing/wait-for-image-ready.d.ts.map +1 -1
  19. package/development/core/testing.js +16 -2
  20. package/development/datepicker/datepicker-toggle.js +3 -3
  21. package/development/overlay.js +2 -9
  22. package/development/select/select.d.ts +3 -1
  23. package/development/select/select.d.ts.map +1 -1
  24. package/development/select.js +20 -6
  25. package/development/stepper/step-label.js +20 -2
  26. package/development/stepper/stepper/stepper.d.ts +3 -0
  27. package/development/stepper/stepper/stepper.d.ts.map +1 -1
  28. package/development/stepper/stepper.js +16 -1
  29. package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
  30. package/development/toggle/toggle-option.js +2 -1
  31. package/lists.css +9 -1
  32. package/overlay.js +1 -1
  33. package/package.json +1 -1
  34. package/select/select.d.ts +3 -1
  35. package/select/select.d.ts.map +1 -1
  36. package/select.js +61 -50
  37. package/standard-theme.css +14 -1
  38. package/stepper/step-label.js +10 -10
  39. package/stepper/stepper/stepper.d.ts +3 -0
  40. package/stepper/stepper/stepper.d.ts.map +1 -1
  41. package/stepper/stepper.js +34 -25
  42. package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
  43. package/toggle/toggle-option.js +1 -0
package/clock.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { css as p, LitElement as H, isServer as _, html as g } from "lit";
2
- import { property as y, customElement as f } from "lit/decorators.js";
2
+ import { property as y, customElement as z } from "lit/decorators.js";
3
3
  import { ref as r } from "lit/directives/ref.js";
4
- const z = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="#FFF" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
4
+ const f = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="#FFF" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
5
5
  `, S = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path id="mod_clock_svg_hours" d="M55.7 64.5h-6.4l.6-44h5.2z"/></svg>
6
6
  `, w = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M55.1,64.5h-5.2l0.8-58h3.6L55.1,64.5z"/></svg>
7
7
  `, L = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M57.8,21.3c0-2.9-2.4-5.2-5.2-5.2s-5.3,2.3-5.3,5.2c0,2.7,2,4.8,4.5,5.2V69h1.5V26.5C55.8,26.2,57.8,24,57.8,21.3z"/></svg>
8
- `, C = p`*,:before,:after{box-sizing:border-box}:host{--sbb-clock-hours-animation-start-angle: 0deg;--sbb-clock-seconds-animation-start-angle: 0deg;--sbb-clock-hours-animation-duration: 0s;--sbb-clock-seconds-animation-duration: 0s;--sbb-clock-animation-play-state: paused;--sbb-clock-seconds-hand-color: var(--sbb-color-red);display:block}.sbb-clock{position:relative;width:100%;height:100%;aspect-ratio:1/1;overflow:hidden;contain:content}.sbb-clock__face,.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:center center;transform:rotate(0);transform-style:preserve-3d;backface-visibility:hidden}.sbb-clock__hand-minutes{transition:transform .2s cubic-bezier(.4,2.08,.55,.44)}@supports not (aspect-ratio: 1/1){.sbb-clock__hand-minutes{transform-origin:50% 49.625%}}.sbb-clock__hand-hours{animation-name:rotate;animation-duration:43200s;animation-iteration-count:infinite;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state)}.sbb-clock__hand-hours--initial-hour{animation-name:hand-hours-animation-initial-hour;animation-duration:var(--sbb-clock-hours-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}.sbb-clock__hand-minutes--no-transition{transition:none}.sbb-clock__hand-seconds{animation-name:hand-seconds-animation;animation-duration:60s;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:infinite;fill:var(--sbb-clock-seconds-hand-color)}.sbb-clock__hand-seconds--initial-minute{animation-name:hand-seconds-animation-initial-minute;animation-duration:var(--sbb-clock-seconds-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}:host(:not([data-initialized])) :is(.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds){display:none}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes hand-hours-animation-initial-hour{0%{transform:rotate(var(--sbb-clock-hours-animation-start-angle))}to{transform:rotate(360deg)}}@keyframes hand-seconds-animation{0%{transform:rotate(0)}97.5%,to{transform:rotate(360deg)}}@keyframes hand-seconds-animation-initial-minute{0%{transform:rotate(var(--sbb-clock-seconds-animation-start-angle))}97.5%,to{transform:rotate(360deg)}}`;
8
+ `, C = p`*,:before,:after{box-sizing:border-box}:host{--sbb-clock-hours-animation-start-angle: 0deg;--sbb-clock-seconds-animation-start-angle: 0deg;--sbb-clock-hours-animation-duration: 0s;--sbb-clock-seconds-animation-duration: 0s;--sbb-clock-animation-play-state: paused;--sbb-clock-seconds-hand-color: var(--sbb-color-red);display:block}.sbb-clock{position:relative;width:100%;height:100%;aspect-ratio:1/1;overflow:hidden;contain:content}.sbb-clock__face,.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds{position:absolute;top:0;right:0;bottom:0;left:0;transform-origin:center center;transform:rotate(0);transform-style:preserve-3d;backface-visibility:hidden}.sbb-clock__hand-minutes{transition:transform var(--sbb-disable-animation-zero-time, .2s) cubic-bezier(.4,2.08,.55,.44)}@supports not (aspect-ratio: 1/1){.sbb-clock__hand-minutes{transform-origin:50% 49.625%}}.sbb-clock__hand-hours{animation-name:rotate;animation-duration:43200s;animation-iteration-count:infinite;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state)}.sbb-clock__hand-hours--initial-hour{animation-name:hand-hours-animation-initial-hour;animation-duration:var(--sbb-clock-hours-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}.sbb-clock__hand-minutes--no-transition{transition:none}.sbb-clock__hand-seconds{animation-name:hand-seconds-animation;animation-duration:60s;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:infinite;fill:var(--sbb-clock-seconds-hand-color)}.sbb-clock__hand-seconds--initial-minute{animation-name:hand-seconds-animation-initial-minute;animation-duration:var(--sbb-clock-seconds-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}:host(:not([data-initialized])) :is(.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds){display:none}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes hand-hours-animation-initial-hour{0%{transform:rotate(var(--sbb-clock-hours-animation-start-angle))}to{transform:rotate(360deg)}}@keyframes hand-seconds-animation{0%{transform:rotate(0)}97.5%,to{transform:rotate(360deg)}}@keyframes hand-seconds-animation-initial-minute{0%{transform:rotate(var(--sbb-clock-seconds-animation-start-angle))}97.5%,to{transform:rotate(360deg)}}`;
9
9
  var E = Object.defineProperty, A = Object.getOwnPropertyDescriptor, k = (t, n, o, s) => {
10
10
  for (var i = s > 1 ? void 0 : s ? A(n, o) : n, e = t.length - 1, a; e >= 0; e--)
11
11
  (a = t[e]) && (i = (s ? a(n, o, i) : a(i)) || i);
@@ -124,7 +124,7 @@ let c = class extends H {
124
124
  render() {
125
125
  return g`
126
126
  <div class="sbb-clock">
127
- <span class="sbb-clock__face" .innerHTML=${z}></span>
127
+ <span class="sbb-clock__face" .innerHTML=${f}></span>
128
128
  <span
129
129
  class="sbb-clock__hand-hours"
130
130
  .innerHTML=${S}
@@ -155,7 +155,7 @@ k([
155
155
  y()
156
156
  ], c.prototype, "now", 2);
157
157
  c = k([
158
- f("sbb-clock")
158
+ z("sbb-clock")
159
159
  ], c);
160
160
  export {
161
161
  c as SbbClockElement
@@ -1,19 +1,19 @@
1
1
  import { css as l, LitElement as c, html as p } from "lit";
2
2
  import { property as d, customElement as g } from "lit/decorators.js";
3
3
  import { slotState as m } from "../core/decorators.js";
4
- const u = l`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:block}:host([color=white]){--sbb-container-background-color: var(--sbb-color-white)}:host([color=milk]){--sbb-container-background-color: var(--sbb-color-milk)}:host([data-slot-names~=image]){--sbb-container-background-color: transparent;--sbb-container-padding: var(--sbb-spacing-responsive-xxl)}:host([background-expanded]:not([expanded])){background-color:var(--sbb-container-background-color)}:host([data-slot-names~=image][background-expanded]){position:relative}.sbb-container{background-color:var(--sbb-container-background-color);padding:var(--sbb-container-padding)}.sbb-container:after,.sbb-container:before{content:" ";display:block;visibility:hidden;height:0;overflow:hidden}:host([color=transparent]) .sbb-container{background-color:transparent}:host(:not([expanded])) .sbb-container{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([expanded])) .sbb-container{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([expanded]) .sbb-container{padding-inline:var(--sbb-spacing-responsive-xxs)}:host([data-slot-names~=image]:not([background-expanded])) .sbb-container{position:relative}.sbb-container__content{position:relative}::slotted([slot=image]){--sbb-image-border-radius: 0;position:absolute;top:0;right:0;bottom:0;left:0}@media (min-width: 90rem){:host(:not([expanded],[background-expanded])) ::slotted([slot=image]){--sbb-image-border-radius: var(--sbb-border-radius-4x);border-radius:var(--sbb-border-radius-4x)}}::slotted(img[slot=image]){object-fit:cover;height:100%;width:100%}`;
5
- var h = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (a, e, t, n) => {
6
- for (var o = n > 1 ? void 0 : n ? v(e, t) : e, i = a.length - 1, b; i >= 0; i--)
7
- (b = a[i]) && (o = (n ? b(e, t, o) : b(o)) || o);
4
+ const u = l`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:block}:host([color=white]){--sbb-container-background-color: var(--sbb-color-white)}:host([color=milk]){--sbb-container-background-color: var(--sbb-color-milk)}:host([data-slot-names~=image]){--sbb-container-background-color: transparent;--sbb-container-padding: var(--sbb-spacing-responsive-xxl)}:host([background-expanded]:not([expanded])){background-color:var(--sbb-container-background-color)}:host([data-slot-names~=image][background-expanded]){position:relative}.sbb-container{background-color:var(--sbb-container-background-color);padding:var(--sbb-container-padding)}.sbb-container:after,.sbb-container:before{content:" ";display:block;visibility:hidden;height:0;overflow:hidden}:host([color=transparent]) .sbb-container{background-color:transparent}:host(:not([expanded])) .sbb-container{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([expanded])) .sbb-container{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([expanded]) .sbb-container{padding-inline:var(--sbb-spacing-responsive-xxs)}:host([data-slot-names~=image]:not([background-expanded])) .sbb-container{position:relative}:host([data-slot-names~=image]) .sbb-container__content{position:relative}::slotted([slot=image]){--sbb-image-border-radius: 0;position:absolute;top:0;right:0;bottom:0;left:0}@media (min-width: 90rem){:host(:not([expanded],[background-expanded])) ::slotted([slot=image]){--sbb-image-border-radius: var(--sbb-border-radius-4x);border-radius:var(--sbb-border-radius-4x)}}::slotted(img[slot=image]){object-fit:cover;height:100%;width:100%}`;
5
+ var h = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (r, e, t, n) => {
6
+ for (var o = n > 1 ? void 0 : n ? v(e, t) : e, i = r.length - 1, b; i >= 0; i--)
7
+ (b = r[i]) && (o = (n ? b(e, t, o) : b(o)) || o);
8
8
  return n && o && h(e, t, o), o;
9
9
  };
10
- let r = class extends c {
10
+ let a = class extends c {
11
11
  constructor() {
12
12
  super(...arguments), this.expanded = !1, this.backgroundExpanded = !1, this.color = "white";
13
13
  }
14
- willUpdate(a) {
14
+ willUpdate(r) {
15
15
  var e, t;
16
- super.willUpdate(a), a.has("expanded") && ((t = (e = this.querySelector) == null ? void 0 : e.call(this, "sbb-sticky-bar")) == null || t.toggleAttribute("data-expanded", this.expanded));
16
+ super.willUpdate(r), r.has("expanded") && ((t = (e = this.querySelector) == null ? void 0 : e.call(this, "sbb-sticky-bar")) == null || t.toggleAttribute("data-expanded", this.expanded));
17
17
  }
18
18
  render() {
19
19
  return p`
@@ -27,20 +27,20 @@ let r = class extends c {
27
27
  `;
28
28
  }
29
29
  };
30
- r.styles = u;
30
+ a.styles = u;
31
31
  s([
32
32
  d({ type: Boolean, reflect: !0 })
33
- ], r.prototype, "expanded", 2);
33
+ ], a.prototype, "expanded", 2);
34
34
  s([
35
35
  d({ type: Boolean, reflect: !0, attribute: "background-expanded" })
36
- ], r.prototype, "backgroundExpanded", 2);
36
+ ], a.prototype, "backgroundExpanded", 2);
37
37
  s([
38
38
  d({ reflect: !0 })
39
- ], r.prototype, "color", 2);
40
- r = s([
39
+ ], a.prototype, "color", 2);
40
+ a = s([
41
41
  g("sbb-container"),
42
42
  m()
43
- ], r);
43
+ ], a);
44
44
  export {
45
- r as SbbContainerElement
45
+ a as SbbContainerElement
46
46
  };
@@ -15,10 +15,9 @@ export declare const isAndroid: boolean;
15
15
  /** Whether the current browser is Safari. */
16
16
  export declare const isSafari: boolean;
17
17
  /**
18
- * Note: `userAgentData` is still experimental. If possible, avoid to use it.
19
- * https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData
18
+ * We just check for the blink engine.
20
19
  */
21
- export declare const isChromium: any;
20
+ export declare const isChromium: boolean;
22
21
  /** Whether the application is being rendered in a Next.js environment. */
23
22
  export declare const isNextjs: () => boolean;
24
23
  //# sourceMappingURL=platform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/platform.ts"],"names":[],"mappings":"AAmBA,qDAAqD;AACrD,eAAO,MAAM,MAAM,SAAmD,CAAC;AAEvE,iEAAiE;AACjE,eAAO,MAAM,SAAS,SAA2D,CAAC;AAGlF,qDAAqD;AACrD,eAAO,MAAM,OAAO,SAKR,CAAC;AAIb,sDAAsD;AACtD,eAAO,MAAM,QAAQ,SACuE,CAAC;AAE7F,iDAAiD;AACjD,eAAO,MAAM,KAAK,SACoE,CAAC;AAMvF,8CAA8C;AAC9C,eAAO,MAAM,SAAS,SAAgE,CAAC;AAEvF,+CAA+C;AAE/C,eAAO,MAAM,SAAS,SAAkE,CAAC;AAKzF,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,SAA+D,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,UAAU,KAEkE,CAAC;AAE1F,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,QAAO,OAAmD,CAAC"}
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/dom/platform.ts"],"names":[],"mappings":"AAmBA,qDAAqD;AACrD,eAAO,MAAM,MAAM,SAAmD,CAAC;AAEvE,iEAAiE;AACjE,eAAO,MAAM,SAAS,SAA2D,CAAC;AAGlF,qDAAqD;AACrD,eAAO,MAAM,OAAO,SAKR,CAAC;AAIb,sDAAsD;AACtD,eAAO,MAAM,QAAQ,SACuE,CAAC;AAE7F,iDAAiD;AACjD,eAAO,MAAM,KAAK,SACoE,CAAC;AAMvF,8CAA8C;AAC9C,eAAO,MAAM,SAAS,SAAgE,CAAC;AAEvF,+CAA+C;AAE/C,eAAO,MAAM,SAAS,SAAkE,CAAC;AAKzF,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,SAA+D,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,CAAC;AAElC,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,QAAO,OAAmD,CAAC"}
package/core/dom.js CHANGED
@@ -1,20 +1,20 @@
1
1
  import { isServer as e } from "lit";
2
- const E = ["zero", "micro", "small", "medium", "wide", "large", "ultra"];
3
- function S(t, n, o) {
2
+ const v = ["zero", "micro", "small", "medium", "wide", "large", "ultra"];
3
+ function E(t, n, o) {
4
4
  if (e)
5
5
  return !1;
6
- const i = getComputedStyle(document.documentElement), r = t ? i.getPropertyValue(`--sbb-breakpoint-${t}-min`) : "", s = n ? `${parseFloat(
6
+ const i = getComputedStyle(document.documentElement), s = t ? i.getPropertyValue(`--sbb-breakpoint-${t}-min`) : "", r = n ? `${parseFloat(
7
7
  i.getPropertyValue(
8
8
  `--sbb-breakpoint-${n}-${o != null && o.includeMaxBreakpoint ? "max" : "min"}`
9
9
  )
10
- ) - (o != null && o.includeMaxBreakpoint ? 0 : 0.0625)}rem` : "", f = r && `(min-width: ${r})`, g = s && `(max-width: ${s})`, y = r && s && " and ";
11
- return window.matchMedia(`${f}${y}${g}`).matches;
10
+ ) - (o != null && o.includeMaxBreakpoint ? 0 : 0.0625)}rem` : "", m = s && `(min-width: ${s})`, f = r && `(max-width: ${r})`, y = s && r && " and ";
11
+ return window.matchMedia(`${m}${y}${f}`).matches;
12
12
  }
13
- function h(t) {
13
+ function g(t) {
14
14
  return e ? null : typeof t == "string" ? document.getElementById(t) : t instanceof window.Element ? t : null;
15
15
  }
16
- const p = () => !e && document.documentElement.getAttribute("dir") || "ltr";
17
- function x(t, n) {
16
+ const A = () => !e && document.documentElement.getAttribute("dir") || "ltr";
17
+ function S(t, n) {
18
18
  if (e)
19
19
  return null;
20
20
  for (n = n.parentElement ?? n.getRootNode().host; n && n !== document && n !== window; ) {
@@ -25,16 +25,16 @@ function x(t, n) {
25
25
  }
26
26
  return null;
27
27
  }
28
- const k = "a,button,sbb-teaser-hero,sbb-teaser";
29
- function I(t, n) {
28
+ const p = "a,button,sbb-teaser-hero,sbb-teaser";
29
+ function x(t, n) {
30
30
  var o;
31
31
  if (!n) {
32
32
  const i = (o = t.closest) == null ? void 0 : o.call(t, "sbb-form-field");
33
33
  return i == null ? void 0 : i.querySelector("input");
34
34
  }
35
- return h(n);
35
+ return g(n);
36
36
  }
37
- function $(t, n, o) {
37
+ function k(t, n, o) {
38
38
  o ? t.setAttribute(n, o) : t.removeAttribute(n);
39
39
  }
40
40
  let a;
@@ -43,26 +43,24 @@ try {
43
43
  } catch {
44
44
  a = !1;
45
45
  }
46
- const m = !e && /(edge)/i.test(navigator.userAgent), c = !e && /(msie|trident)/i.test(navigator.userAgent), w = !e && !!(window.chrome || a) && typeof CSS < "u" && !m && !c, v = !e && /AppleWebKit/i.test(navigator.userAgent) && !w && !m && !c, M = !e && /iPad|iPhone|iPod/.test(navigator.userAgent) && !("MSStream" in window), _ = !e && /(firefox|minefield)/i.test(navigator.userAgent), W = !e && /android/i.test(navigator.userAgent) && !c, B = !e && /safari/i.test(navigator.userAgent) && v;
47
- var l, b;
48
- const C = !e && ((b = (l = navigator.userAgentData) == null ? void 0 : l.brands) == null ? void 0 : b.some((t) => t.brand == "Chromium")), N = () => !!globalThis.next;
49
- function u() {
46
+ const u = !e && /(edge)/i.test(navigator.userAgent), c = !e && /(msie|trident)/i.test(navigator.userAgent), b = !e && !!(window.chrome || a) && typeof CSS < "u" && !u && !c, h = !e && /AppleWebKit/i.test(navigator.userAgent) && !b && !u && !c, I = !e && /iPad|iPhone|iPod/.test(navigator.userAgent) && !("MSStream" in window), $ = !e && /(firefox|minefield)/i.test(navigator.userAgent), M = !e && /android/i.test(navigator.userAgent) && !c, _ = !e && /safari/i.test(navigator.userAgent) && h, W = b, B = () => !!globalThis.next;
47
+ function l() {
50
48
  return document.body.hasAttribute("data-sbb-scroll-disabled");
51
49
  }
52
- class P {
50
+ class N {
53
51
  disableScroll() {
54
- if (u())
52
+ if (l())
55
53
  return;
56
54
  this._position = document.body.style.position, this._overflow = document.body.style.overflow, this._marginInlineEnd = document.body.style.marginInlineEnd;
57
55
  const n = window.innerWidth - document.documentElement.clientWidth;
58
56
  document.body.style.overflow = "hidden", document.body.style.position = "relative", document.body.style.marginInlineEnd = `${n}px`, document.body.style.setProperty("--sbb-scrollbar-width", `${n}px`), document.body.toggleAttribute("data-sbb-scroll-disabled", !0);
59
57
  }
60
58
  enableScroll() {
61
- u() && (document.body.style.position = this._position || "", document.body.style.overflow = this._overflow || "", document.body.style.marginInlineEnd = this._marginInlineEnd || "", document.body.style.setProperty("--sbb-scrollbar-width", "0"), document.body.removeAttribute("data-sbb-scroll-disabled"));
59
+ l() && (document.body.style.position = this._position || "", document.body.style.overflow = this._overflow || "", document.body.style.marginInlineEnd = this._marginInlineEnd || "", document.body.style.setProperty("--sbb-scrollbar-width", "0"), document.body.removeAttribute("data-sbb-scroll-disabled"));
62
60
  }
63
61
  }
64
62
  const d = /* @__PURE__ */ new Map();
65
- function R(t) {
63
+ function P(t) {
66
64
  if (d.has(t.constructor))
67
65
  return d.get(t.constructor);
68
66
  const n = (
@@ -75,25 +73,25 @@ function R(t) {
75
73
  throw new Error(`Given element ${t.constructor.name} has not been registered yet.`);
76
74
  }
77
75
  export {
78
- k as ACTION_ELEMENTS,
79
- P as SbbScrollHandler,
80
- E as breakpoints,
81
- I as findInput,
82
- h as findReferencedElement,
83
- p as getDocumentWritingMode,
84
- R as getLocalName,
85
- x as hostContext,
86
- W as isAndroid,
87
- w as isBlink,
88
- S as isBreakpoint,
89
- C as isChromium,
90
- m as isEdge,
91
- _ as isFirefox,
92
- M as isIOS,
93
- N as isNextjs,
94
- B as isSafari,
76
+ p as ACTION_ELEMENTS,
77
+ N as SbbScrollHandler,
78
+ v as breakpoints,
79
+ x as findInput,
80
+ g as findReferencedElement,
81
+ A as getDocumentWritingMode,
82
+ P as getLocalName,
83
+ S as hostContext,
84
+ M as isAndroid,
85
+ b as isBlink,
86
+ E as isBreakpoint,
87
+ W as isChromium,
88
+ u as isEdge,
89
+ $ as isFirefox,
90
+ I as isIOS,
91
+ B as isNextjs,
92
+ _ as isSafari,
95
93
  c as isTrident,
96
- v as isWebkit,
97
- u as pageScrollDisabled,
98
- $ as setOrRemoveAttribute
94
+ h as isWebkit,
95
+ l as pageScrollDisabled,
96
+ k as setOrRemoveAttribute
99
97
  };
@@ -27,6 +27,7 @@
27
27
 
28
28
  // Time Input
29
29
  --sbb-time-input-max-width: #{functions.px-to-rem-build(58)};
30
+ --sbb-time-input-s-max-width: #{functions.px-to-rem-build(51)};
30
31
 
31
32
  // Overlay
32
33
  --sbb-overlay-default-z-index: 1000;
@@ -41,6 +42,7 @@
41
42
 
42
43
  // Time Input
43
44
  --sbb-time-input-max-width: #{functions.px-to-rem-build(65)};
45
+ --sbb-time-input-s-max-width: #{functions.px-to-rem-build(58)};
44
46
  }
45
47
  }
46
48
  }
@@ -123,4 +125,8 @@ sbb-title + p {
123
125
 
124
126
  input[data-sbb-time-input] {
125
127
  max-width: var(--sbb-time-input-max-width);
128
+
129
+ sbb-form-field[size='s'] & {
130
+ max-width: var(--sbb-time-input-s-max-width);
131
+ }
126
132
  }
@@ -81,6 +81,7 @@
81
81
  --sbb-step-list-padding-block: var(--sbb-spacing-fixed-3x);
82
82
  --sbb-step-list-padding-inline: var(--sbb-spacing-responsive-xxs);
83
83
  --sbb-step-list-marker-to-text-gap: var(--sbb-spacing-responsive-xxxs);
84
+ --sbb-step-list-border-radius: var(--sbb-border-radius-4x);
84
85
 
85
86
  // Additional space from overall li padding to the text because text
86
87
  // has to be centered to marker number.
@@ -117,7 +118,6 @@
117
118
  position: relative;
118
119
  counter-increment: steps;
119
120
  background-color: var(--sbb-color-milk);
120
- border-radius: var(--sbb-border-radius-4x);
121
121
  padding-block: calc(
122
122
  var(--sbb-step-list-padding-block) + var(--sbb-step-list-text-to-marker-block-offset)
123
123
  )
@@ -131,6 +131,16 @@
131
131
  var(--sbb-step-list-marker-dimensions) + 2 * var(--sbb-step-list-padding-block)
132
132
  );
133
133
 
134
+ &:first-of-type {
135
+ border-start-start-radius: var(--sbb-step-list-border-radius);
136
+ border-start-end-radius: var(--sbb-step-list-border-radius);
137
+ }
138
+
139
+ &:last-of-type {
140
+ border-end-start-radius: var(--sbb-step-list-border-radius);
141
+ border-end-end-radius: var(--sbb-step-list-border-radius);
142
+ }
143
+
134
144
  &::before {
135
145
  @include typo.text-xxs--bold;
136
146
 
@@ -1 +1 @@
1
- {"version":3,"file":"wait-for-image-ready.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/testing/wait-for-image-ready.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,gBAAgB,GAAG,eAAe,EAC3C,qBAAqB,SAAW,GAC/B,OAAO,CAAC,IAAI,CAAC,CAcf"}
1
+ {"version":3,"file":"wait-for-image-ready.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/testing/wait-for-image-ready.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,gBAAgB,GAAG,eAAe,EAC3C,qBAAqB,SAAW,GAC/B,OAAO,CAAC,IAAI,CAAC,CAkCf"}
package/core/testing.js CHANGED
@@ -1,6 +1,7 @@
1
- class u {
2
- constructor(e, n = null) {
3
- this._event = e, this._target = n, this._count = 0, this._events = [], this._target || (this._target = document), this._listenForEvent();
1
+ import { isSafari as a } from "./dom.js";
2
+ class d {
3
+ constructor(t, n = null) {
4
+ this._event = t, this._target = n, this._count = 0, this._events = [], this._target || (this._target = document), this._listenForEvent();
4
5
  }
5
6
  get count() {
6
7
  return this._count;
@@ -15,75 +16,81 @@ class u {
15
16
  return this.events.length ? this.events[this.events.length - 1] : null;
16
17
  }
17
18
  _listenForEvent() {
18
- var e;
19
- (e = this._target) == null || e.addEventListener(this._event, (n) => {
19
+ var t;
20
+ (t = this._target) == null || t.addEventListener(this._event, (n) => {
20
21
  this._events.push(n), this._count++;
21
22
  });
22
23
  }
23
24
  }
24
- const m = (t, e, n) => {
25
- if (t)
26
- return Mocha.describe(e, n);
27
- }, h = (t, e, n) => {
28
- if (t)
29
- return Mocha.test(e, n);
25
+ const h = (e, t, n) => {
26
+ if (e)
27
+ return Mocha.describe(t, n);
28
+ }, g = (e, t, n) => {
29
+ if (e)
30
+ return Mocha.test(t, n);
30
31
  };
31
- function d(t) {
32
- window.scrollTo(t), document.dispatchEvent(new Event("scroll"));
32
+ function v(e) {
33
+ window.scrollTo(e), document.dispatchEvent(new Event("scroll"));
33
34
  }
34
- async function v(t, e = 30, n = 2 * 1e3) {
35
- const r = /* @__PURE__ */ new Date();
36
- let o = 0;
37
- function i() {
38
- return o++, t();
35
+ async function f(e, t = 30, n = 2 * 1e3) {
36
+ const i = /* @__PURE__ */ new Date();
37
+ let r = 0;
38
+ function o() {
39
+ return r++, e();
39
40
  }
40
- for (; !await i() && r.getTime() + n >= (/* @__PURE__ */ new Date()).getTime(); )
41
- await new Promise((s) => setTimeout(s, e));
42
- return r.getTime() + n < (/* @__PURE__ */ new Date()).getTime() ? Promise.reject(
43
- `waitForCondition timeout: ${t.toString()}, attempts: ${o}, start: ${r.getTime()}, end: ${(/* @__PURE__ */ new Date()).getTime()}`
41
+ for (; !await o() && i.getTime() + n >= (/* @__PURE__ */ new Date()).getTime(); )
42
+ await new Promise((s) => setTimeout(s, t));
43
+ return i.getTime() + n < (/* @__PURE__ */ new Date()).getTime() ? Promise.reject(
44
+ `waitForCondition timeout: ${e.toString()}, attempts: ${r}, start: ${i.getTime()}, end: ${(/* @__PURE__ */ new Date()).getTime()}`
44
45
  ) : Promise.resolve(!0);
45
46
  }
46
- function g(t, e, n = 1e3) {
47
- return new Promise((r, o) => {
48
- const i = AbortSignal.timeout(n), s = () => o(`Timeout of ${n} reached`);
49
- i.addEventListener("abort", s), t.addEventListener(
50
- e,
47
+ function w(e, t, n = 1e3) {
48
+ return new Promise((i, r) => {
49
+ const o = AbortSignal.timeout(n), s = () => r(`Timeout of ${n} reached`);
50
+ o.addEventListener("abort", s), e.addEventListener(
51
+ t,
51
52
  () => {
52
- i.removeEventListener("abort", s), r();
53
+ o.removeEventListener("abort", s), i();
53
54
  },
54
- { passive: !0, signal: i }
55
+ { passive: !0, signal: o }
55
56
  );
56
57
  });
57
58
  }
58
- async function w(t, e = 2 * 1e3) {
59
- t.complete || await new Promise((n, r) => {
60
- const o = setTimeout(() => r("image loading timeout"), e);
61
- t.addEventListener("load", () => {
62
- clearTimeout(o), n();
63
- }), t.addEventListener("error", () => {
64
- clearTimeout(o), r("image error");
59
+ async function E(e, t = 2 * 1e3) {
60
+ var i;
61
+ const n = e.localName === "sbb-image" ? ((i = e.shadowRoot) == null ? void 0 : i.querySelector(".sbb-image__img")) ?? null : e;
62
+ if (!n)
63
+ throw new Error("img tag not found");
64
+ e.complete ? await n.decode() : await new Promise((r, o) => {
65
+ const s = setTimeout(() => o("image loading timeout"), t);
66
+ e.addEventListener("load", () => {
67
+ clearTimeout(s), n.decode().then(() => {
68
+ a && e.localName === "sbb-image" ? setTimeout(r, 100) : r();
69
+ });
70
+ }), e.addEventListener("error", () => {
71
+ clearTimeout(s), o("image error");
65
72
  });
66
73
  });
67
74
  }
68
- const a = (t) => !!t.updateComplete, c = Promise.resolve(), l = async (t) => {
69
- var r, o;
70
- const e = await t;
71
- (o = (r = e.parentElement ?? e).querySelectorAll) == null || o.call(r, "[defer-hydration]").forEach((i) => i.removeAttribute("defer-hydration"));
72
- const n = [e, ...e.querySelectorAll("*")].filter(a).map((i) => [
73
- i.updateComplete,
74
- i.hydrationComplete ?? c,
75
- l(i.renderRoot)
75
+ const c = (e) => !!e.updateComplete, l = Promise.resolve(), u = async (e) => {
76
+ var i, r;
77
+ const t = await e;
78
+ (r = (i = t.parentElement ?? t).querySelectorAll) == null || r.call(i, "[defer-hydration]").forEach((o) => o.removeAttribute("defer-hydration"));
79
+ const n = [t, ...t.querySelectorAll("*")].filter(c).map((o) => [
80
+ o.updateComplete,
81
+ o.hydrationComplete ?? l,
82
+ u(o.renderRoot)
76
83
  ]).flat(1 / 0);
77
- return await Promise.all(n), e;
84
+ return await Promise.all(n), t;
78
85
  };
79
86
  export {
80
- u as EventSpy,
81
- m as describeIf,
82
- a as isReactiveElement,
83
- d as mockScrollTo,
84
- h as testIf,
85
- v as waitForCondition,
86
- g as waitForEvent,
87
- w as waitForImageReady,
88
- l as waitForLitRender
87
+ d as EventSpy,
88
+ h as describeIf,
89
+ c as isReactiveElement,
90
+ v as mockScrollTo,
91
+ g as testIf,
92
+ f as waitForCondition,
93
+ w as waitForEvent,
94
+ E as waitForImageReady,
95
+ u as waitForLitRender
89
96
  };
package/core.css CHANGED
@@ -1117,6 +1117,7 @@
1117
1117
  --sbb-train-formation-wagon-gap: var(--sbb-spacing-fixed-1x);
1118
1118
  --sbb-header-height: var(--sbb-spacing-fixed-14x);
1119
1119
  --sbb-time-input-max-width: 3.625rem;
1120
+ --sbb-time-input-s-max-width: 3.1875rem;
1120
1121
  --sbb-overlay-default-z-index: 1000;
1121
1122
  --sbb-border-radius-infinity: 10000000em;
1122
1123
  }
@@ -1124,6 +1125,7 @@
1124
1125
  :root {
1125
1126
  --sbb-header-height: var(--sbb-spacing-fixed-24x);
1126
1127
  --sbb-time-input-max-width: 4.0625rem;
1128
+ --sbb-time-input-s-max-width: 3.625rem;
1127
1129
  }
1128
1130
  }
1129
1131
 
@@ -1281,4 +1283,7 @@ sbb-title + p {
1281
1283
 
1282
1284
  input[data-sbb-time-input] {
1283
1285
  max-width: var(--sbb-time-input-max-width);
1286
+ }
1287
+ sbb-form-field[size=s] input[data-sbb-time-input] {
1288
+ max-width: var(--sbb-time-input-s-max-width);
1284
1289
  }