@sbb-esta/lyne-elements 2.0.0 → 2.0.2
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.
- package/accordion/accordion.d.ts +1 -2
- package/accordion/accordion.d.ts.map +1 -1
- package/accordion.js +39 -44
- package/alert/alert-group/alert-group.d.ts +1 -2
- package/alert/alert-group/alert-group.d.ts.map +1 -1
- package/alert/alert-group.js +29 -34
- package/autocomplete/autocomplete-base-element.d.ts +1 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete.d.ts +1 -1
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid.js +18 -22
- package/autocomplete.js +17 -18
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts +1 -2
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/breadcrumb/breadcrumb-group.js +26 -30
- package/button/common.js +4 -4
- package/calendar/calendar.d.ts +3 -3
- package/calendar/calendar.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +34 -36
- package/core/base-elements/button-base-element.d.ts +1 -1
- package/core/base-elements/button-base-element.d.ts.map +1 -1
- package/core/base-elements.js +1 -1
- package/core/controllers/connected-abort-controller.d.ts +4 -0
- package/core/controllers/connected-abort-controller.d.ts.map +1 -1
- package/core/eventing/forward-event.d.ts +7 -1
- package/core/eventing/forward-event.d.ts.map +1 -1
- package/core/eventing.js +14 -12
- package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-mixin.d.ts +1 -1
- package/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-radio-button-mixin.d.ts +1 -0
- package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/core/mixins.js +28 -34
- package/core/styles/core.scss +34 -31
- package/core/styles/mixins/buttons.scss +1 -1
- package/core/styles/mixins/lists.scss +100 -35
- package/core.css +17 -15
- package/custom-elements.json +243 -377
- package/datepicker/common/datepicker-button.d.ts +1 -1
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.js +24 -24
- package/datepicker/datepicker/datepicker.d.ts +1 -1
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +1 -2
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +76 -75
- package/datepicker/datepicker.js +58 -60
- package/development/accordion/accordion.d.ts +1 -2
- package/development/accordion/accordion.d.ts.map +1 -1
- package/development/accordion.js +16 -23
- package/development/alert/alert-group/alert-group.d.ts +1 -2
- package/development/alert/alert-group/alert-group.d.ts.map +1 -1
- package/development/alert/alert-group.js +12 -17
- package/development/autocomplete/autocomplete-base-element.d.ts +1 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.d.ts +1 -1
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid.js +9 -12
- package/development/autocomplete.js +12 -12
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts +1 -2
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/development/breadcrumb/breadcrumb-group.js +13 -17
- package/development/button/common.js +20 -6
- package/development/calendar/calendar.d.ts +3 -3
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +10 -15
- package/development/core/base-elements/button-base-element.d.ts +1 -1
- package/development/core/base-elements/button-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +2 -2
- package/development/core/controllers/connected-abort-controller.d.ts +4 -0
- package/development/core/controllers/connected-abort-controller.d.ts.map +1 -1
- package/development/core/controllers.js +1 -1
- package/development/core/eventing/forward-event.d.ts +7 -1
- package/development/core/eventing/forward-event.d.ts.map +1 -1
- package/development/core/eventing.js +5 -3
- package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-mixin.d.ts +1 -1
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts +1 -0
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +9 -18
- package/development/datepicker/common/datepicker-button.d.ts +1 -1
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.js +6 -7
- package/development/datepicker/datepicker/datepicker.d.ts +1 -1
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +1 -2
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +14 -14
- package/development/datepicker/datepicker.js +8 -11
- package/development/dialog/dialog/dialog.d.ts +1 -1
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog-content/dialog-content.d.ts.map +1 -1
- package/development/dialog/dialog-content.js +3 -2
- package/development/dialog/dialog.js +7 -13
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts +1 -1
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +1 -2
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-header.js +7 -11
- package/development/expansion-panel/expansion-panel.js +5 -7
- package/development/file-selector/common.js +3 -3
- package/development/flip-card/flip-card/flip-card.d.ts +1 -2
- package/development/flip-card/flip-card/flip-card.d.ts.map +1 -1
- package/development/flip-card/flip-card.js +12 -15
- package/development/footer/footer.d.ts +1 -1
- package/development/footer.js +2 -2
- package/development/form-field/form-field-clear/form-field-clear.d.ts +1 -1
- package/development/form-field/form-field-clear/form-field-clear.d.ts.map +1 -1
- package/development/form-field/form-field-clear.js +5 -6
- package/development/image/image.d.ts +2 -2
- package/development/image.js +1 -1
- package/development/map-container/map-container.d.ts.map +1 -1
- package/development/map-container.js +3 -2
- package/development/menu/menu/menu.d.ts +2 -1
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +20 -13
- package/development/message.js +5 -2
- package/development/navigation/common/navigation-action-common.d.ts +1 -1
- package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/development/navigation/common.js +11 -13
- package/development/navigation/navigation/navigation.d.ts +0 -1
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation-section/navigation-section.d.ts +1 -0
- package/development/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/development/navigation/navigation-section.js +5 -6
- package/development/navigation/navigation.js +9 -10
- package/development/notification.js +2 -2
- package/development/option/option/option-base-element.d.ts +1 -1
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option.js +17 -21
- package/development/overlay/overlay-base-element.d.ts +1 -0
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay.js +4 -4
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +6 -3
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/development/radio-button/common.js +11 -11
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +3 -3
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +5 -9
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +2 -2
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/development/radio-button/radio-button-panel.js +1 -1
- package/development/select/select.d.ts +5 -2
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +59 -34
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts +1 -1
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +6 -8
- package/development/slider/slider.d.ts +1 -2
- package/development/slider/slider.d.ts.map +1 -1
- package/development/slider.js +6 -8
- package/development/stepper/step/step.d.ts +5 -5
- package/development/stepper/step/step.d.ts.map +1 -1
- package/development/stepper/step-label/step-label.d.ts +1 -1
- package/development/stepper/step-label/step-label.d.ts.map +1 -1
- package/development/stepper/step-label.js +12 -14
- package/development/stepper/step.js +8 -10
- package/development/stepper/stepper/stepper.d.ts +9 -8
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +28 -27
- package/development/tabs/tab-group/tab-group.d.ts +1 -2
- package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/development/tabs/tab-group.js +9 -14
- package/development/tag/tag/tag.d.ts +1 -1
- package/development/tag/tag/tag.d.ts.map +1 -1
- package/development/tag/tag-group/tag-group.d.ts +1 -1
- package/development/tag/tag-group/tag-group.d.ts.map +1 -1
- package/development/tag/tag-group.js +1 -1
- package/development/tag/tag.js +5 -6
- package/development/teaser-hero.js +6 -2
- package/development/teaser.js +4 -3
- package/development/time-input/time-input.d.ts +1 -1
- package/development/time-input/time-input.d.ts.map +1 -1
- package/development/time-input.js +6 -4
- package/development/toast/toast.d.ts +1 -1
- package/development/toast/toast.d.ts.map +1 -1
- package/development/toast.js +6 -7
- package/development/toggle/toggle/toggle.d.ts +1 -1
- package/development/toggle/toggle/toggle.d.ts.map +1 -1
- package/development/toggle/toggle-option/toggle-option.d.ts +1 -1
- package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/development/toggle/toggle-option.js +9 -13
- package/development/toggle/toggle.js +6 -8
- package/development/train/train-formation/train-formation.d.ts +1 -2
- package/development/train/train-formation/train-formation.d.ts.map +1 -1
- package/development/train/train-formation.js +8 -12
- package/dialog/dialog/dialog.d.ts +1 -1
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog-content/dialog-content.d.ts.map +1 -1
- package/dialog/dialog-content.js +8 -7
- package/dialog/dialog.js +36 -42
- package/expansion-panel/expansion-panel/expansion-panel.d.ts +1 -1
- package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +1 -2
- package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-header.js +29 -33
- package/expansion-panel/expansion-panel.js +58 -60
- package/file-selector/common.js +5 -5
- package/flip-card/flip-card/flip-card.d.ts +1 -2
- package/flip-card/flip-card/flip-card.d.ts.map +1 -1
- package/flip-card/flip-card.js +34 -36
- package/footer/footer.d.ts +1 -1
- package/footer.js +1 -1
- package/form-field/form-field-clear/form-field-clear.d.ts +1 -1
- package/form-field/form-field-clear/form-field-clear.d.ts.map +1 -1
- package/form-field/form-field-clear.js +10 -11
- package/image/image.d.ts +2 -2
- package/lists.css +46 -62
- package/map-container/map-container.d.ts.map +1 -1
- package/map-container.js +22 -21
- package/menu/menu/menu.d.ts +2 -1
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu.js +84 -77
- package/message.js +15 -15
- package/navigation/common/navigation-action-common.d.ts +1 -1
- package/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/navigation/common.js +24 -26
- package/navigation/navigation/navigation.d.ts +0 -1
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-section/navigation-section.d.ts +1 -0
- package/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/navigation/navigation-section.js +35 -36
- package/navigation/navigation.js +64 -65
- package/notification.js +1 -1
- package/option/option/option-base-element.d.ts +1 -1
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option.js +125 -125
- package/overlay/overlay-base-element.d.ts +1 -0
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay.js +35 -35
- package/package.json +1 -1
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover.js +6 -3
- package/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/radio-button/common.js +13 -14
- package/radio-button/radio-button-group/radio-button-group.d.ts +3 -3
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +20 -24
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +2 -2
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/select/select.d.ts +5 -2
- package/select/select.d.ts.map +1 -1
- package/select.js +96 -84
- package/selection-expansion-panel/selection-expansion-panel.d.ts +1 -1
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +17 -18
- package/slider/slider.d.ts +1 -2
- package/slider/slider.d.ts.map +1 -1
- package/slider.js +23 -25
- package/standard-theme.css +63 -77
- package/stepper/step/step.d.ts +5 -5
- package/stepper/step/step.d.ts.map +1 -1
- package/stepper/step-label/step-label.d.ts +1 -1
- package/stepper/step-label/step-label.d.ts.map +1 -1
- package/stepper/step-label.js +16 -18
- package/stepper/step.js +22 -24
- package/stepper/stepper/stepper.d.ts +9 -8
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +57 -58
- package/tabs/tab-group/tab-group.d.ts +1 -2
- package/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/tabs/tab-group.js +83 -88
- package/tag/tag/tag.d.ts +1 -1
- package/tag/tag/tag.d.ts.map +1 -1
- package/tag/tag-group/tag-group.d.ts +1 -1
- package/tag/tag-group/tag-group.d.ts.map +1 -1
- package/tag/tag.js +30 -30
- package/teaser-hero.js +19 -19
- package/teaser.js +6 -6
- package/time-input/time-input.d.ts +1 -1
- package/time-input/time-input.d.ts.map +1 -1
- package/time-input.js +7 -5
- package/toast/toast.d.ts +1 -1
- package/toast/toast.d.ts.map +1 -1
- package/toast.js +32 -33
- package/toggle/toggle/toggle.d.ts +1 -1
- package/toggle/toggle/toggle.d.ts.map +1 -1
- package/toggle/toggle-option/toggle-option.d.ts +1 -1
- package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/toggle/toggle-option.js +31 -35
- package/toggle/toggle.js +31 -33
- package/train/train-formation/train-formation.d.ts +1 -2
- package/train/train-formation/train-formation.d.ts.map +1 -1
- package/train/train-formation.js +35 -39
package/core/mixins.js
CHANGED
|
@@ -5,9 +5,9 @@ var M = (o, b, d) => b.has(o) || D("Cannot " + d);
|
|
|
5
5
|
var x = (o, b, d) => (M(o, b, "read from private field"), d ? d.call(o) : b.get(o)), S = (o, b, d) => b.has(o) ? D("Cannot add the same private member more than once") : b instanceof WeakSet ? b.add(o) : b.set(o, d), _ = (o, b, d, n) => (M(o, b, "write to private field"), n ? n.call(o, d) : b.set(o, d), d);
|
|
6
6
|
import { __esDecorate as g, __runInitializers as m } from "tslib";
|
|
7
7
|
import { property as k, state as q } from "lit/decorators.js";
|
|
8
|
-
import { forceType as C, getOverride as
|
|
9
|
-
import { defaultConverter as O, html as R, nothing as E, css as
|
|
10
|
-
import { preventScrollOnSpacebarPress as
|
|
8
|
+
import { forceType as C, getOverride as N, hostAttributes as j } from "./decorators.js";
|
|
9
|
+
import { defaultConverter as O, html as R, nothing as E, css as V } from "lit";
|
|
10
|
+
import { preventScrollOnSpacebarPress as $, EventEmitter as G } from "./eventing.js";
|
|
11
11
|
import { interactivityChecker as P, isArrowKeyPressed as T, getNextElementIndex as H } from "./a11y.js";
|
|
12
12
|
import { SbbConnectedAbortController as K } from "./controllers.js";
|
|
13
13
|
import "../screen-reader-only.js";
|
|
@@ -36,7 +36,7 @@ const I = (o) => (() => {
|
|
|
36
36
|
}
|
|
37
37
|
}, r = new WeakMap(), (() => {
|
|
38
38
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(d[Symbol.metadata] ?? null) : void 0;
|
|
39
|
-
n = [C(), k({ reflect: !0, type: Boolean }),
|
|
39
|
+
n = [C(), k({ reflect: !0, type: Boolean }), N((t, a) => a || t.isDisabledExternally())], g(s, null, n, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (t) => "disabled" in t, get: (t) => t.disabled, set: (t, a) => {
|
|
40
40
|
t.disabled = a;
|
|
41
41
|
} }, metadata: e }, u, l), e && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
42
42
|
})(), s;
|
|
@@ -69,7 +69,7 @@ const I = (o) => (() => {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
return b;
|
|
72
|
-
},
|
|
72
|
+
}, L = (o) => (() => {
|
|
73
73
|
var h, e;
|
|
74
74
|
let d = o, n = [], u, l, r, s = [], f = [];
|
|
75
75
|
return e = class extends d {
|
|
@@ -183,7 +183,7 @@ const I = (o) => (() => {
|
|
|
183
183
|
c.formDisabled = p;
|
|
184
184
|
} }, metadata: i }, s, f), i && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
|
|
185
185
|
})(), e.formAssociated = !0, e;
|
|
186
|
-
})(),
|
|
186
|
+
})(), U = (o) => (() => {
|
|
187
187
|
var l;
|
|
188
188
|
let d = o, n = [], u;
|
|
189
189
|
return l = class extends d {
|
|
@@ -215,9 +215,9 @@ const I = (o) => (() => {
|
|
|
215
215
|
})(), l;
|
|
216
216
|
})(), le = (o) => (() => {
|
|
217
217
|
var h;
|
|
218
|
-
let d = [
|
|
218
|
+
let d = [j({
|
|
219
219
|
tabindex: "0"
|
|
220
|
-
})], n, u = [], l, r = I(
|
|
220
|
+
})], n, u = [], l, r = I(U(L(o))), s = [], f;
|
|
221
221
|
return h = class extends r {
|
|
222
222
|
/** Whether the checkbox is checked. */
|
|
223
223
|
set checked(t) {
|
|
@@ -235,18 +235,13 @@ const I = (o) => (() => {
|
|
|
235
235
|
return "checkbox";
|
|
236
236
|
}
|
|
237
237
|
constructor() {
|
|
238
|
-
|
|
239
|
-
|
|
238
|
+
var t, a, i;
|
|
239
|
+
super(), this._attributeMutationBlocked = (m(this, s), !1), this._checked = !1, this._handleKeyboardInteraction = (c) => {
|
|
240
|
+
c.key === " " && this._handleUserInteraction();
|
|
240
241
|
}, this._handleUserInteraction = () => {
|
|
241
|
-
var
|
|
242
|
-
this.disabled || ((
|
|
243
|
-
}, this.internals.role = "checkbox";
|
|
244
|
-
}
|
|
245
|
-
connectedCallback() {
|
|
246
|
-
super.connectedCallback(), this.addEventListener("click", this._handleUserInteraction), this.addEventListener("keydown", A), this.addEventListener("keyup", this._handleKeyboardInteraction);
|
|
247
|
-
}
|
|
248
|
-
disconnectedCallback() {
|
|
249
|
-
super.disconnectedCallback(), this.removeEventListener("click", this._handleUserInteraction), this.removeEventListener("keydown", A), this.removeEventListener("keyup", this._handleKeyboardInteraction);
|
|
242
|
+
var c;
|
|
243
|
+
this.disabled || ((c = this.withUserInteraction) == null || c.call(this), this.checked = !this.checked, this._attributeMutationBlocked = !0, this.dispatchEvent(new InputEvent("input", { composed: !0, bubbles: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
244
|
+
}, this.internals.role = "checkbox", (t = this.addEventListener) == null || t.call(this, "click", this._handleUserInteraction), (a = this.addEventListener) == null || a.call(this, "keydown", $), (i = this.addEventListener) == null || i.call(this, "keyup", this._handleKeyboardInteraction);
|
|
250
245
|
}
|
|
251
246
|
attributeChangedCallback(t, a, i) {
|
|
252
247
|
(t !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(t, a, i);
|
|
@@ -290,14 +285,15 @@ const I = (o) => (() => {
|
|
|
290
285
|
a.checked = i;
|
|
291
286
|
} }, metadata: t }, null, s), g(null, n = { value: l }, d, { kind: "class", name: l.name, metadata: t }, null, u), l = n.value, t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t }), m(l, u);
|
|
292
287
|
})(), l;
|
|
293
|
-
})(),
|
|
288
|
+
})(), A = /* @__PURE__ */ new WeakMap(), oe = (o) => (() => {
|
|
294
289
|
var r, s;
|
|
295
|
-
let d = I(
|
|
290
|
+
let d = I(U(L(o))), n, u = [], l = [];
|
|
296
291
|
return s = class extends d {
|
|
297
292
|
constructor() {
|
|
293
|
+
var e;
|
|
298
294
|
super();
|
|
299
295
|
S(this, r);
|
|
300
|
-
_(this, r, m(this, u, !1)), this.abort = (m(this, l), new K(this)), this._didLoad = !1, this.internals.role = "radio";
|
|
296
|
+
_(this, r, m(this, u, !1)), this.abort = (m(this, l), new K(this)), this._didLoad = !1, this.internals.role = "radio", (e = this.addEventListener) == null || e.call(this, "keydown", (t) => this._handleArrowKeyDown(t));
|
|
301
297
|
}
|
|
302
298
|
/**
|
|
303
299
|
* Whether the radio button is checked.
|
|
@@ -316,9 +312,7 @@ const I = (o) => (() => {
|
|
|
316
312
|
return "radio";
|
|
317
313
|
}
|
|
318
314
|
connectedCallback() {
|
|
319
|
-
super.connectedCallback(), this._connectToRegistry()
|
|
320
|
-
signal: this.abort.signal
|
|
321
|
-
});
|
|
315
|
+
super.connectedCallback(), this._connectToRegistry();
|
|
322
316
|
}
|
|
323
317
|
disconnectedCallback() {
|
|
324
318
|
super.disconnectedCallback(), this._disconnectFromRegistry();
|
|
@@ -383,7 +377,7 @@ const I = (o) => (() => {
|
|
|
383
377
|
if (!this.name)
|
|
384
378
|
return;
|
|
385
379
|
const e = this.form ?? this.getRootNode();
|
|
386
|
-
this._radioButtonGroupsMap =
|
|
380
|
+
this._radioButtonGroupsMap = A.get(e), this._radioButtonGroupsMap || (this._radioButtonGroupsMap = /* @__PURE__ */ new Map(), A.set(e, this._radioButtonGroupsMap)), this.associatedRadioButtons = this._radioButtonGroupsMap.get(this.name), this.associatedRadioButtons || (this.associatedRadioButtons = /* @__PURE__ */ new Set(), this._radioButtonGroupsMap.set(this.name, this.associatedRadioButtons));
|
|
387
381
|
const t = Array.from(this.associatedRadioButtons);
|
|
388
382
|
this.associatedRadioButtons.clear();
|
|
389
383
|
const a = t.findIndex((i) => this.compareDocumentPosition(i) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
@@ -456,7 +450,7 @@ const I = (o) => (() => {
|
|
|
456
450
|
}
|
|
457
451
|
}
|
|
458
452
|
return b;
|
|
459
|
-
},
|
|
453
|
+
}, z = "data-ssr-child-count", F = "li", de = (o) => (() => {
|
|
460
454
|
var r, s;
|
|
461
455
|
let d = X(o), n, u = [], l = [];
|
|
462
456
|
return s = class extends d {
|
|
@@ -465,7 +459,7 @@ const I = (o) => (() => {
|
|
|
465
459
|
S(this, r);
|
|
466
460
|
_(this, r, m(this, u, [])), this._handleSlotchange = (m(this, l), () => {
|
|
467
461
|
const e = Array.from(this.children ?? []).filter((t) => this.listChildLocalNames.includes(t.localName));
|
|
468
|
-
e.length === this.listChildren.length && this.listChildren.every((t, a) => e[a] === t) || (this.listChildren.filter((t) => !e.includes(t)).forEach((t) => t.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((t, a) => t.setAttribute("slot", `${
|
|
462
|
+
e.length === this.listChildren.length && this.listChildren.every((t, a) => e[a] === t) || (this.listChildren.filter((t) => !e.includes(t)).forEach((t) => t.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((t, a) => t.setAttribute("slot", `${F}-${a}`)), this.removeAttribute(z));
|
|
469
463
|
});
|
|
470
464
|
}
|
|
471
465
|
/**
|
|
@@ -527,10 +521,10 @@ const I = (o) => (() => {
|
|
|
527
521
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
528
522
|
*/
|
|
529
523
|
listSlotEntries(e) {
|
|
530
|
-
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(
|
|
524
|
+
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(z) ?? 0) })).map((a, i) => {
|
|
531
525
|
var c;
|
|
532
526
|
return {
|
|
533
|
-
name: `${
|
|
527
|
+
name: `${F}-${i}`,
|
|
534
528
|
ariaHidden: ((c = e == null ? void 0 : e.localNameVisualOnly) == null ? void 0 : c.includes(a.localName)) ?? !1
|
|
535
529
|
};
|
|
536
530
|
});
|
|
@@ -636,20 +630,20 @@ const I = (o) => (() => {
|
|
|
636
630
|
}
|
|
637
631
|
}
|
|
638
632
|
return b;
|
|
639
|
-
}, he =
|
|
633
|
+
}, he = V`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-milk) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media (forced-colors: active){.sbb-selection-panel:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
|
|
640
634
|
export {
|
|
641
635
|
W as SbbDisabledInteractiveMixin,
|
|
642
636
|
I as SbbDisabledMixin,
|
|
643
637
|
ne as SbbDisabledTabIndexActionMixin,
|
|
644
638
|
le as SbbFormAssociatedCheckboxMixin,
|
|
645
|
-
|
|
639
|
+
L as SbbFormAssociatedMixin,
|
|
646
640
|
oe as SbbFormAssociatedRadioButtonMixin,
|
|
647
641
|
X as SbbHydrationMixin,
|
|
648
642
|
de as SbbNamedSlotListMixin,
|
|
649
643
|
ce as SbbNegativeMixin,
|
|
650
644
|
ue as SbbPanelMixin,
|
|
651
|
-
|
|
645
|
+
U as SbbRequiredMixin,
|
|
652
646
|
be as SbbUpdateSchedulerMixin,
|
|
653
647
|
he as panelCommonStyle,
|
|
654
|
-
|
|
648
|
+
A as radioButtonRegistry
|
|
655
649
|
};
|
package/core/styles/core.scss
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
// Core variables, are always needed
|
|
14
14
|
:root {
|
|
15
|
-
// Grab
|
|
15
|
+
// Grab CSS vars defined by `@sbb-esta/lyne-design-tokens` package
|
|
16
16
|
@include sbb-css-tokens.lyne-design-tokens-css-variables;
|
|
17
17
|
|
|
18
18
|
& {
|
|
@@ -160,10 +160,10 @@ img {
|
|
|
160
160
|
object-position: var(--sbb-image-object-position);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
// TODO: Move back to the sbb-container components when the global
|
|
163
|
+
// TODO: Move back to the sbb-container components when the global CSS refactoring happens
|
|
164
164
|
sbb-container {
|
|
165
|
-
[slot='image']:is(sbb-image, img),
|
|
166
|
-
[slot='image'] :is(sbb-image, img) {
|
|
165
|
+
> [slot='image']:is(sbb-image, img),
|
|
166
|
+
> [slot='image'] :is(sbb-image, img) {
|
|
167
167
|
--sbb-image-object-fit: cover;
|
|
168
168
|
|
|
169
169
|
border-radius: var(--sbb-container-background-border-radius);
|
|
@@ -172,10 +172,10 @@ sbb-container {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
// TODO: Move back to the sbb-flip-card-summary components when the global
|
|
175
|
+
// TODO: Move back to the sbb-flip-card-summary components when the global CSS refactoring happens
|
|
176
176
|
sbb-flip-card-summary {
|
|
177
|
-
[slot='image']:is(sbb-image, img),
|
|
178
|
-
[slot='image'] :is(sbb-image, img) {
|
|
177
|
+
> [slot='image']:is(sbb-image, img),
|
|
178
|
+
> [slot='image'] :is(sbb-image, img) {
|
|
179
179
|
--sbb-image-aspect-ratio: auto;
|
|
180
180
|
--sbb-image-object-fit: cover;
|
|
181
181
|
|
|
@@ -185,10 +185,10 @@ sbb-flip-card-summary {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
// TODO: Move back to the sbb-lead-container components when the global
|
|
188
|
+
// TODO: Move back to the sbb-lead-container components when the global CSS refactoring happens
|
|
189
189
|
sbb-lead-container {
|
|
190
|
-
[slot='image']:is(sbb-image, img, picture),
|
|
191
|
-
[slot='image'] :is(sbb-image, img, picture) {
|
|
190
|
+
> [slot='image']:is(sbb-image, img, picture),
|
|
191
|
+
> [slot='image'] :is(sbb-image, img, picture) {
|
|
192
192
|
--sbb-image-aspect-ratio: var(--sbb-lead-container-image-ratio);
|
|
193
193
|
--sbb-image-object-fit: cover;
|
|
194
194
|
|
|
@@ -196,9 +196,17 @@ sbb-lead-container {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
+
// TODO: Move back to the sbb-message components when the global CSS refactoring happens
|
|
200
|
+
sbb-message {
|
|
201
|
+
> [slot='image']:is(sbb-image, img),
|
|
202
|
+
> [slot='image'] :is(sbb-image, img) {
|
|
203
|
+
border-radius: var(--sbb-message-image-border-radius);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
199
207
|
// Target the slotted `sbb-image` which are generally wrapped by a <figure> (therefore are not reachable with the :slotted)
|
|
200
208
|
// Apply the brightness effect on mouse hover
|
|
201
|
-
// TODO: Move back to the teaser components when the global
|
|
209
|
+
// TODO: Move back to the teaser components when the global CSS refactoring happens
|
|
202
210
|
:is(sbb-teaser, sbb-teaser-hero, sbb-teaser-product) {
|
|
203
211
|
--sbb-teaser-image-brightness-hover: var(--sbb-hover-image-brightness);
|
|
204
212
|
--sbb-teaser-image-animation-duration: var(
|
|
@@ -213,8 +221,7 @@ sbb-lead-container {
|
|
|
213
221
|
}
|
|
214
222
|
}
|
|
215
223
|
|
|
216
|
-
|
|
217
|
-
[slot='image'] :is(sbb-image, img) {
|
|
224
|
+
:is(sbb-image, img) {
|
|
218
225
|
will-change: filter;
|
|
219
226
|
filter: brightness(var(--sbb-teaser-image-brightness, 1));
|
|
220
227
|
transition: filter var(--sbb-teaser-image-animation-duration)
|
|
@@ -222,7 +229,7 @@ sbb-lead-container {
|
|
|
222
229
|
}
|
|
223
230
|
}
|
|
224
231
|
|
|
225
|
-
// TODO: Move back to the teaser components when the global
|
|
232
|
+
// TODO: Move back to the teaser components when the global CSS refactoring happens
|
|
226
233
|
:is(sbb-teaser-product, sbb-teaser-product-static) {
|
|
227
234
|
:is(sbb-image, img) {
|
|
228
235
|
border-radius: 0; // Reset sbb-image border radius in order to control it from teaser product.
|
|
@@ -236,22 +243,17 @@ sbb-lead-container {
|
|
|
236
243
|
}
|
|
237
244
|
}
|
|
238
245
|
|
|
239
|
-
// TODO: Move back to the teaser components when the global
|
|
240
|
-
:is(sbb-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
transition-property: filter, scale;
|
|
244
|
-
will-change: filter, scale;
|
|
245
|
-
scale: var(--sbb-teaser-scale, 1);
|
|
246
|
-
}
|
|
246
|
+
// TODO: Move back to the teaser components when the global CSS refactoring happens
|
|
247
|
+
sbb-teaser :is(sbb-image, img) {
|
|
248
|
+
--sbb-image-object-fit: cover;
|
|
249
|
+
--sbb-image-aspect-ratio: 4 / 3;
|
|
247
250
|
|
|
248
|
-
:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
251
|
+
transition-property: filter, scale;
|
|
252
|
+
will-change: filter, scale;
|
|
253
|
+
scale: var(--sbb-teaser-scale, 1);
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
// TODO: Move back to the teaser-hero components when the global
|
|
256
|
+
// TODO: Move back to the teaser-hero components when the global CSS refactoring happens
|
|
255
257
|
:is(sbb-teaser-hero) {
|
|
256
258
|
:is(sbb-image, img) {
|
|
257
259
|
--sbb-image-aspect-ratio: 1 / 1;
|
|
@@ -264,22 +266,23 @@ sbb-lead-container {
|
|
|
264
266
|
}
|
|
265
267
|
|
|
266
268
|
img {
|
|
267
|
-
width: 100%;
|
|
268
269
|
display: block;
|
|
270
|
+
align-self: stretch;
|
|
271
|
+
width: 100%;
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
|
|
272
|
-
// TODO: move to train formation after
|
|
275
|
+
// TODO: move to train formation after CSS refactoring
|
|
273
276
|
sbb-train-formation:has(sbb-train[direction-label]) {
|
|
274
277
|
--sbb-train-formation-reserve-spacing-display: block;
|
|
275
278
|
}
|
|
276
279
|
|
|
277
|
-
// TODO: move to train formation after
|
|
280
|
+
// TODO: move to train formation after CSS refactoring
|
|
278
281
|
sbb-train-formation:has(sbb-train-wagon[sector]) {
|
|
279
282
|
--sbb-train-formation-show-sectors-gap: 1;
|
|
280
283
|
}
|
|
281
284
|
|
|
282
|
-
// TODO: move to train formation after
|
|
285
|
+
// TODO: move to train formation after CSS refactoring
|
|
283
286
|
sbb-train-formation:not(:has(sbb-train-wagon[label])) {
|
|
284
287
|
--sbb-train-formation-wagon-label-display: none;
|
|
285
288
|
}
|
|
@@ -101,7 +101,7 @@ $active: ':active, [data-active]';
|
|
|
101
101
|
height: fit-content;
|
|
102
102
|
|
|
103
103
|
// Use !important here to not interfere with Firefox focus ring definition
|
|
104
|
-
// which appears in normalize
|
|
104
|
+
// which appears in normalize CSS of several frameworks.
|
|
105
105
|
outline: none !important;
|
|
106
106
|
|
|
107
107
|
@include icon-button-variables;
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// @deprecated Will be removed with next major version
|
|
99
100
|
@mixin base-marker-list(
|
|
100
101
|
$dimensions,
|
|
101
102
|
$padding-inline,
|
|
@@ -159,49 +160,84 @@
|
|
|
159
160
|
}
|
|
160
161
|
|
|
161
162
|
@mixin icon-list {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
--sbb-icon-list-marker-icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="%23000" fill-rule="evenodd" d="M3 12a9 9 0 0 1 9-9 9 9 0 0 1 9 9 9 9 0 0 1-9 9 9 9 0 0 1-9-9m9-10C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m-1.104 13.305 5-6.5-.792-.61-4.69 6.096-2.102-1.681-.624.78 2.5 2 .398.319z" clip-rule="evenodd"></path></svg>');
|
|
164
|
+
--sbb-icon-list-marker-icon-color: currentcolor;
|
|
165
|
+
--sbb-icon-list-vertical-gap: var(--sbb-spacing-fixed-2x);
|
|
166
|
+
--sbb-icon-list-dimensions: var(--sbb-size-icon-ui-small);
|
|
167
|
+
--sbb-icon-list-to-text-gap: var(--sbb-spacing-fixed-2x);
|
|
168
|
+
|
|
169
|
+
// Additional space from overall li padding to the text because text
|
|
170
|
+
// has to be centered to marker number.
|
|
171
|
+
--sbb-icon-list-text-to-marker-block-offset: calc(
|
|
172
|
+
0.5 *
|
|
173
|
+
(
|
|
174
|
+
var(--sbb-icon-list-dimensions) - var(--sbb-typo-line-height-body-text) *
|
|
175
|
+
var(--sbb-text-font-size)
|
|
176
|
+
)
|
|
168
177
|
);
|
|
169
178
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
--sbb-icon-list-vertical-gap: var(--sbb-spacing-fixed-2x);
|
|
174
|
-
--sbb-icon-list-dimensions: var(--sbb-size-icon-ui-small);
|
|
175
|
-
--sbb-icon-list-to-text-gap: var(--sbb-spacing-fixed-2x);
|
|
176
|
-
}
|
|
179
|
+
list-style: none;
|
|
180
|
+
margin: 0;
|
|
181
|
+
padding: 0;
|
|
177
182
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
184
|
+
> li {
|
|
185
|
+
position: relative;
|
|
186
|
+
padding-inline: calc(var(--sbb-icon-list-dimensions) + var(--sbb-icon-list-to-text-gap)) 0;
|
|
187
|
+
min-height: var(--sbb-icon-list-dimensions);
|
|
188
|
+
|
|
189
|
+
+ li {
|
|
190
|
+
margin-block-start: var(--sbb-icon-list-vertical-gap);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
p {
|
|
194
|
+
margin-block: 0;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// P has to be redefined to be more specific
|
|
198
|
+
> * + p {
|
|
199
|
+
margin-block-start: var(--sbb-spacing-responsive-xxxs);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&::before {
|
|
203
|
+
content: '';
|
|
204
|
+
position: absolute;
|
|
205
|
+
width: var(--sbb-icon-list-dimensions);
|
|
206
|
+
height: var(--sbb-icon-list-dimensions);
|
|
207
|
+
margin-block-start: calc(-1 * var(--sbb-icon-list-text-to-marker-block-offset));
|
|
208
|
+
inset-inline-start: 0;
|
|
209
|
+
background-color: var(--sbb-icon-list-marker-icon-color);
|
|
210
|
+
mask-image: var(--sbb-icon-list-marker-icon);
|
|
211
|
+
mask-repeat: no-repeat;
|
|
212
|
+
mask-position: center;
|
|
213
|
+
mask-size: 100%;
|
|
214
|
+
}
|
|
185
215
|
}
|
|
186
216
|
}
|
|
187
217
|
|
|
188
218
|
@mixin step-list {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
219
|
+
--sbb-step-list-dimensions: #{functions.px-to-rem-build(34)};
|
|
220
|
+
--sbb-step-list-padding-inline: var(--sbb-spacing-responsive-xxs);
|
|
221
|
+
--sbb-step-list-to-text-gap: var(--sbb-spacing-responsive-xxxs);
|
|
222
|
+
--sbb-step-list-padding-block: var(--sbb-spacing-fixed-3x);
|
|
223
|
+
--sbb-step-list-vertical-gap: var(--sbb-spacing-fixed-1x);
|
|
224
|
+
--sbb-step-list-border-radius: var(--sbb-border-radius-4x);
|
|
225
|
+
|
|
226
|
+
// Additional space from overall li padding to the text because text
|
|
227
|
+
// has to be centered to marker number.
|
|
228
|
+
--sbb-step-list-text-to-marker-block-offset: calc(
|
|
229
|
+
0.5 *
|
|
230
|
+
(
|
|
231
|
+
var(--sbb-step-list-dimensions) - var(--sbb-typo-line-height-body-text) *
|
|
232
|
+
var(--sbb-text-font-size)
|
|
233
|
+
)
|
|
195
234
|
);
|
|
196
235
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
counter-reset: steps;
|
|
203
|
-
color: var(--sbb-color-iron);
|
|
204
|
-
}
|
|
236
|
+
list-style: none;
|
|
237
|
+
margin: 0;
|
|
238
|
+
padding: 0;
|
|
239
|
+
counter-reset: steps;
|
|
240
|
+
color: var(--sbb-color-iron);
|
|
205
241
|
|
|
206
242
|
&:where(.sbb-text-s) {
|
|
207
243
|
--sbb-step-list-padding-block: var(--sbb-spacing-fixed-4x);
|
|
@@ -211,7 +247,15 @@
|
|
|
211
247
|
--sbb-step-list-padding-block: var(--sbb-spacing-fixed-5x);
|
|
212
248
|
}
|
|
213
249
|
|
|
250
|
+
&:where(.sbb-text-xl) {
|
|
251
|
+
@include mediaqueries.mq($from: medium) {
|
|
252
|
+
--sbb-step-list-dimensions: #{functions.px-to-rem-build(41)};
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
214
257
|
> li {
|
|
258
|
+
position: relative;
|
|
215
259
|
counter-increment: steps;
|
|
216
260
|
background-color: var(--sbb-color-milk);
|
|
217
261
|
padding-block: calc(
|
|
@@ -226,12 +270,33 @@
|
|
|
226
270
|
min-height: calc(var(--sbb-step-list-dimensions) + 2 * var(--sbb-step-list-padding-block));
|
|
227
271
|
|
|
228
272
|
&::before {
|
|
273
|
+
@include typo.text-xxs--bold;
|
|
274
|
+
|
|
229
275
|
content: counter(steps);
|
|
276
|
+
position: absolute;
|
|
230
277
|
display: flex;
|
|
231
278
|
align-items: center;
|
|
232
279
|
justify-content: center;
|
|
233
|
-
|
|
280
|
+
height: var(--sbb-step-list-dimensions);
|
|
281
|
+
width: var(--sbb-step-list-dimensions);
|
|
282
|
+
margin-block-start: calc(-1 * var(--sbb-step-list-text-to-marker-block-offset));
|
|
283
|
+
inset-inline-start: var(--sbb-step-list-padding-inline);
|
|
234
284
|
color: var(--sbb-color-charcoal);
|
|
285
|
+
border: var(--sbb-border-width-1x) solid var(--sbb-color-cement);
|
|
286
|
+
border-radius: 50%;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
+ li {
|
|
290
|
+
margin-block-start: var(--sbb-step-list-vertical-gap);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
p {
|
|
294
|
+
margin-block: 0;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// P has to be redefined to be more specific
|
|
298
|
+
> * + p {
|
|
299
|
+
margin-block-start: var(--sbb-spacing-responsive-xxxs);
|
|
235
300
|
}
|
|
236
301
|
|
|
237
302
|
&:first-of-type {
|
package/core.css
CHANGED
|
@@ -1304,16 +1304,16 @@ img {
|
|
|
1304
1304
|
object-position: var(--sbb-image-object-position);
|
|
1305
1305
|
}
|
|
1306
1306
|
|
|
1307
|
-
sbb-container [slot=image]:is(sbb-image, img),
|
|
1308
|
-
sbb-container [slot=image] :is(sbb-image, img) {
|
|
1307
|
+
sbb-container > [slot=image]:is(sbb-image, img),
|
|
1308
|
+
sbb-container > [slot=image] :is(sbb-image, img) {
|
|
1309
1309
|
--sbb-image-object-fit: cover;
|
|
1310
1310
|
border-radius: var(--sbb-container-background-border-radius);
|
|
1311
1311
|
height: 100%;
|
|
1312
1312
|
position: absolute;
|
|
1313
1313
|
}
|
|
1314
1314
|
|
|
1315
|
-
sbb-flip-card-summary [slot=image]:is(sbb-image, img),
|
|
1316
|
-
sbb-flip-card-summary [slot=image] :is(sbb-image, img) {
|
|
1315
|
+
sbb-flip-card-summary > [slot=image]:is(sbb-image, img),
|
|
1316
|
+
sbb-flip-card-summary > [slot=image] :is(sbb-image, img) {
|
|
1317
1317
|
--sbb-image-aspect-ratio: auto;
|
|
1318
1318
|
--sbb-image-object-fit: cover;
|
|
1319
1319
|
border-radius: 0;
|
|
@@ -1321,13 +1321,18 @@ sbb-flip-card-summary [slot=image] :is(sbb-image, img) {
|
|
|
1321
1321
|
height: 100%;
|
|
1322
1322
|
}
|
|
1323
1323
|
|
|
1324
|
-
sbb-lead-container [slot=image]:is(sbb-image, img, picture),
|
|
1325
|
-
sbb-lead-container [slot=image] :is(sbb-image, img, picture) {
|
|
1324
|
+
sbb-lead-container > [slot=image]:is(sbb-image, img, picture),
|
|
1325
|
+
sbb-lead-container > [slot=image] :is(sbb-image, img, picture) {
|
|
1326
1326
|
--sbb-image-aspect-ratio: var(--sbb-lead-container-image-ratio);
|
|
1327
1327
|
--sbb-image-object-fit: cover;
|
|
1328
1328
|
border-radius: var(--sbb-lead-container-image-border-radius);
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
|
+
sbb-message > [slot=image]:is(sbb-image, img),
|
|
1332
|
+
sbb-message > [slot=image] :is(sbb-image, img) {
|
|
1333
|
+
border-radius: var(--sbb-message-image-border-radius);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1331
1336
|
:is(sbb-teaser, sbb-teaser-hero, sbb-teaser-product) {
|
|
1332
1337
|
--sbb-teaser-image-brightness-hover: var(--sbb-hover-image-brightness);
|
|
1333
1338
|
--sbb-teaser-image-animation-duration: var(
|
|
@@ -1341,8 +1346,7 @@ sbb-lead-container [slot=image] :is(sbb-image, img, picture) {
|
|
|
1341
1346
|
--sbb-teaser-image-brightness: var(--sbb-teaser-image-brightness-hover);
|
|
1342
1347
|
}
|
|
1343
1348
|
}
|
|
1344
|
-
:is(sbb-teaser, sbb-teaser-hero, sbb-teaser-product)
|
|
1345
|
-
:is(sbb-teaser, sbb-teaser-hero, sbb-teaser-product) [slot=image] :is(sbb-image, img) {
|
|
1349
|
+
:is(sbb-teaser, sbb-teaser-hero, sbb-teaser-product) :is(sbb-image, img) {
|
|
1346
1350
|
will-change: filter;
|
|
1347
1351
|
filter: brightness(var(--sbb-teaser-image-brightness, 1));
|
|
1348
1352
|
transition: filter var(--sbb-teaser-image-animation-duration) var(--sbb-teaser-image-animation-easing);
|
|
@@ -1357,16 +1361,13 @@ sbb-lead-container [slot=image] :is(sbb-image, img, picture) {
|
|
|
1357
1361
|
place-self: stretch;
|
|
1358
1362
|
}
|
|
1359
1363
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1364
|
+
sbb-teaser :is(sbb-image, img) {
|
|
1365
|
+
--sbb-image-object-fit: cover;
|
|
1366
|
+
--sbb-image-aspect-ratio: 4 / 3;
|
|
1362
1367
|
transition-property: filter, scale;
|
|
1363
1368
|
will-change: filter, scale;
|
|
1364
1369
|
scale: var(--sbb-teaser-scale, 1);
|
|
1365
1370
|
}
|
|
1366
|
-
:is(sbb-teaser) :is(sbb-image, img) {
|
|
1367
|
-
--sbb-image-object-fit: cover;
|
|
1368
|
-
--sbb-image-aspect-ratio: 4 / 3;
|
|
1369
|
-
}
|
|
1370
1371
|
|
|
1371
1372
|
:is(sbb-teaser-hero) :is(sbb-image, img) {
|
|
1372
1373
|
--sbb-image-aspect-ratio: 1 / 1;
|
|
@@ -1378,8 +1379,9 @@ sbb-lead-container [slot=image] :is(sbb-image, img, picture) {
|
|
|
1378
1379
|
}
|
|
1379
1380
|
}
|
|
1380
1381
|
:is(sbb-teaser-hero) img {
|
|
1381
|
-
width: 100%;
|
|
1382
1382
|
display: block;
|
|
1383
|
+
align-self: stretch;
|
|
1384
|
+
width: 100%;
|
|
1383
1385
|
}
|
|
1384
1386
|
|
|
1385
1387
|
sbb-train-formation:has(sbb-train[direction-label]) {
|