@sbb-esta/lyne-elements 1.14.0 → 1.15.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.
- 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 +6 -6
- package/autocomplete.js +20 -19
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar.js +175 -178
- package/checkbox/checkbox-panel/checkbox-panel.d.ts +1 -1
- package/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/checkbox/checkbox-panel.js +5 -5
- package/checkbox/common.js +1 -1
- package/clock/clock.d.ts +1 -1
- package/clock/clock.d.ts.map +1 -1
- package/clock.js +2 -2
- package/container/sticky-bar/sticky-bar.d.ts +29 -2
- package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/container/sticky-bar.js +69 -31
- package/core/controllers/media-matchers-controller.d.ts +32 -0
- package/core/controllers/media-matchers-controller.d.ts.map +1 -0
- package/core/controllers.d.ts +1 -0
- package/core/controllers.d.ts.map +1 -1
- package/core/controllers.js +75 -33
- package/core/dom/breakpoint.d.ts +2 -1
- package/core/dom/breakpoint.d.ts.map +1 -1
- package/core/dom.js +7 -7
- package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/core/mixins.js +8 -1
- package/core/styles/core/mediaqueries.scss +1 -2
- package/core/styles/mixins/buttons.scss +5 -5
- package/core/testing/event-spy.d.ts +6 -4
- package/core/testing/event-spy.d.ts.map +1 -1
- package/core/testing.js +82 -55
- package/custom-elements.json +650 -74
- package/datepicker/datepicker/datepicker.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 +4 -3
- package/development/autocomplete.js +4 -3
- package/development/calendar/calendar.d.ts +1 -1
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +40 -44
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts +1 -1
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/development/checkbox/checkbox-panel.js +2 -2
- package/development/checkbox/common.js +2 -2
- package/development/clock/clock.d.ts +1 -1
- package/development/clock/clock.d.ts.map +1 -1
- package/development/clock.js +3 -3
- package/development/container/sticky-bar/sticky-bar.d.ts +29 -2
- package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/development/container/sticky-bar.js +149 -36
- package/development/core/controllers/media-matchers-controller.d.ts +32 -0
- package/development/core/controllers/media-matchers-controller.d.ts.map +1 -0
- package/development/core/controllers.d.ts +1 -0
- package/development/core/controllers.d.ts.map +1 -1
- package/development/core/controllers.js +65 -1
- package/development/core/dom/breakpoint.d.ts +2 -1
- package/development/core/dom/breakpoint.d.ts.map +1 -1
- package/development/core/dom.js +2 -2
- package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +9 -2
- package/development/core/testing/event-spy.d.ts +6 -4
- package/development/core/testing/event-spy.d.ts.map +1 -1
- package/development/core/testing.js +35 -1
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker.js +1 -1
- package/development/dialog/dialog.js +2 -2
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +3 -1
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-header.js +8 -4
- package/development/file-selector/file-selector.d.ts +5 -0
- package/development/file-selector/file-selector.d.ts.map +1 -1
- package/development/file-selector.js +8 -1
- package/development/flip-card/flip-card/flip-card.d.ts +4 -0
- package/development/flip-card/flip-card/flip-card.d.ts.map +1 -1
- package/development/flip-card/flip-card-details.js +4 -6
- package/development/flip-card/flip-card-summary/flip-card-summary.d.ts +1 -1
- package/development/flip-card/flip-card-summary/flip-card-summary.d.ts.map +1 -1
- package/development/flip-card/flip-card-summary.js +9 -10
- package/development/flip-card/flip-card.js +26 -2
- package/development/form-field/form-field.js +5 -3
- package/development/icon/icon.d.ts +1 -1
- package/development/icon.js +1 -1
- package/development/image/image.d.ts.map +1 -1
- package/development/image.js +3 -19
- package/development/map-container.js +3 -2
- package/development/menu/menu/menu.d.ts +1 -0
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +15 -11
- package/development/navigation/navigation-section.js +4 -14
- package/development/navigation/navigation.js +2 -7
- package/development/notification.js +3 -2
- package/development/paginator/paginator/paginator.d.ts +1 -5
- package/development/paginator/paginator/paginator.d.ts.map +1 -1
- package/development/paginator/paginator.js +19 -27
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +9 -16
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +1 -1
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/development/radio-button/radio-button-panel.js +2 -2
- package/development/sbb-tokens-BdGhUJjM.js +33 -0
- package/development/select/select.d.ts +6 -5
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +23 -14
- package/development/slider/slider.d.ts +5 -0
- package/development/slider/slider.d.ts.map +1 -1
- package/development/slider.js +8 -1
- package/development/table/table-wrapper/table-wrapper.d.ts +1 -1
- package/development/table/table-wrapper/table-wrapper.d.ts.map +1 -1
- package/development/table/table-wrapper.js +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.d.ts +2 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.d.ts.map +1 -1
- package/development/timetable-occupancy-icon.js +11 -9
- package/development/toggle-check/toggle-check.d.ts +1 -1
- package/development/toggle-check/toggle-check.d.ts.map +1 -1
- package/development/toggle-check.js +2 -2
- package/dialog/dialog.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +3 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-header.js +26 -24
- package/file-selector/file-selector.d.ts +5 -0
- package/file-selector/file-selector.d.ts.map +1 -1
- package/file-selector.js +7 -0
- package/flip-card/flip-card/flip-card.d.ts +4 -0
- package/flip-card/flip-card/flip-card.d.ts.map +1 -1
- package/flip-card/flip-card-details.js +6 -6
- package/flip-card/flip-card-summary/flip-card-summary.d.ts +1 -1
- package/flip-card/flip-card-summary/flip-card-summary.d.ts.map +1 -1
- package/flip-card/flip-card-summary.js +8 -8
- package/flip-card/flip-card.js +56 -42
- package/icon/icon.d.ts +1 -1
- package/image/image.d.ts.map +1 -1
- package/image.js +46 -45
- package/map-container.js +7 -7
- package/menu/menu/menu.d.ts +1 -0
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu.js +45 -41
- package/navigation/navigation-section.js +7 -7
- package/navigation/navigation.js +8 -8
- package/package.json +2 -2
- package/paginator/paginator/paginator.d.ts +1 -5
- package/paginator/paginator/paginator.d.ts.map +1 -1
- package/paginator/paginator.js +50 -52
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover.js +42 -46
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +1 -1
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/radio-button/radio-button-panel.js +7 -7
- package/sbb-tokens-Dx20OtVg.js +18 -0
- package/select/select.d.ts +6 -5
- package/select/select.d.ts.map +1 -1
- package/select.js +55 -53
- package/slider/slider.d.ts +5 -0
- package/slider/slider.d.ts.map +1 -1
- package/slider.js +12 -5
- package/table/table-wrapper/table-wrapper.d.ts +1 -1
- package/table/table-wrapper/table-wrapper.d.ts.map +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.d.ts +2 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.d.ts.map +1 -1
- package/timetable-occupancy-icon.js +45 -44
- package/toggle-check/toggle-check.d.ts +1 -1
- package/toggle-check/toggle-check.d.ts.map +1 -1
- package/toggle-check.js +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var p = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var p = (a) => {
|
|
2
|
+
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var u = (
|
|
5
|
-
var f = (
|
|
4
|
+
var u = (a, e, t) => e.has(a) || p("Cannot " + t);
|
|
5
|
+
var f = (a, e, t) => (u(a, e, "read from private field"), t ? t.call(a) : e.get(a)), h = (a, e, t) => e.has(a) ? p("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), y = (a, e, t, i) => (u(a, e, "write to private field"), i ? i.call(a, t) : e.set(a, t), t);
|
|
6
6
|
import { __esDecorate as v, __runInitializers as o } from "tslib";
|
|
7
7
|
import { css as w, html as _, LitElement as A } from "lit";
|
|
8
8
|
import { customElement as x, property as S } from "lit/decorators.js";
|
|
9
9
|
import { hostAttributes as z } from "../core/decorators.js";
|
|
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;
|
|
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-zero-time, 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(img){object-fit:cover;width:100%;height:100%}::slotted(sbb-image){--sbb-image-border-radius: 0;--sbb-image-aspect-ratio: auto;width:100%;height:100%}`;
|
|
11
11
|
let C = (() => {
|
|
12
12
|
var l, s;
|
|
13
|
-
let
|
|
13
|
+
let a = [x("sbb-flip-card-summary"), z({
|
|
14
14
|
slot: "summary"
|
|
15
|
-
})],
|
|
15
|
+
})], e, t = [], i, d = A, b, g = [], c = [];
|
|
16
16
|
return s = class extends d {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
@@ -44,7 +44,7 @@ let C = (() => {
|
|
|
44
44
|
const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(d[Symbol.metadata] ?? null) : void 0;
|
|
45
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
46
|
m.imageAlignment = n;
|
|
47
|
-
} }, metadata: r }, g, c), v(null,
|
|
47
|
+
} }, metadata: r }, g, c), 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
|
})();
|
|
50
50
|
export {
|
package/flip-card/flip-card.js
CHANGED
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
var
|
|
1
|
+
var C = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var m = (e, a, s) => (
|
|
6
|
-
import { __runInitializers as c, __esDecorate as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
4
|
+
var k = (e, a, s) => a.has(e) || C("Cannot " + s);
|
|
5
|
+
var m = (e, a, s) => (k(e, a, "read from private field"), s ? s.call(e) : a.get(e)), f = (e, a, s) => a.has(e) ? C("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, s), d = (e, a, s, r) => (k(e, a, "write to private field"), r ? r.call(e, s) : a.set(e, s), s);
|
|
6
|
+
import { __runInitializers as c, __esDecorate as h } from "tslib";
|
|
7
|
+
import { ResizeController as w } from "@lit-labs/observers/resize-controller.js";
|
|
8
|
+
import { css as L, LitElement as S, isServer as E, html as D } from "lit";
|
|
9
|
+
import { customElement as H, property as R, state as $ } from "lit/decorators.js";
|
|
10
|
+
import { until as I } from "lit/directives/until.js";
|
|
11
|
+
import { IS_FOCUSABLE_QUERY as O } from "../core/a11y.js";
|
|
12
|
+
import { SbbConnectedAbortController as F, SbbLanguageController as A } from "../core/controllers.js";
|
|
13
|
+
import { forceType as T } from "../core/decorators.js";
|
|
14
|
+
import { EventEmitter as j } from "../core/eventing.js";
|
|
15
|
+
import { i18nFlipCard as q, i18nReverseCard as M } from "../core/i18n.js";
|
|
16
|
+
import { SbbHydrationMixin as P } from "../core/mixins.js";
|
|
16
17
|
import "../button/secondary-button-static.js";
|
|
17
18
|
import "../screen-reader-only.js";
|
|
18
|
-
const
|
|
19
|
-
let
|
|
19
|
+
const U = L`*,:before,:after{box-sizing:border-box}:host{--sbb-flip-card-toggle-icon-transform: rotate(0);--sbb-flip-card-background-color: var(--sbb-color-cloud);--sbb-flip-card-border-radius: var(--sbb-border-radius-4x);--sbb-flip-card-min-height: 17.5rem;--sbb-flip-card-summary-transition-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-5x) );--sbb-flip-card-summary-transition-delay: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-2x) );--sbb-flip-card-details-transition-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-4x) );position:relative;display:block}@media (min-width: 52.5rem){:host{--sbb-flip-card-min-height: 20rem}}@media (any-hover: hover){:host(:hover){--sbb-flip-card-background-color: var(--sbb-color-cloud-alpha-80);--sbb-flip-card-translate-title-y-hover: -.0625rem}}:host([data-flipped]){--sbb-flip-card-toggle-icon-transform: rotate(45deg);--sbb-flip-card-details-transition-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-2x) );--sbb-flip-card-summary-transition-delay: 0s}:host([data-flipped]) ::slotted(sbb-flip-card-summary){--sbb-flip-card-summary-opacity: 0;--sbb-flip-card-summary-pointer-events: none}:host([data-flipped]) ::slotted(sbb-flip-card-details){--sbb-flip-card-details-opacity: 1;--sbb-flip-card-details-translate-y: 0}@media (min-width: 37.5rem) and (max-width: 52.4375rem){:host([data-image-alignment=after]){--sbb-flip-card-min-height: 15rem}}@media (min-width: 80rem){:host([data-image-alignment=after]){--sbb-flip-card-min-height: 25rem}}.sbb-flip-card{position:relative;display:flex;height:100%;flex-flow:wrap;flex-direction:column;gap:var(--sbb-spacing-responsive-xs);min-height:var(--sbb-flip-card-min-height);background-color:var(--sbb-flip-card-background-color);border-radius:var(--sbb-flip-card-border-radius);transition:all var(--sbb-flip-card-summary-transition-duration) ease-out,min-height var(--sbb-flip-card-details-transition-duration);transition-delay:var(--sbb-flip-card-summary-transition-delay);cursor:pointer}:host([data-flipped]) .sbb-flip-card{min-height:max(var(--sbb-flip-card-min-height),var(--sbb-flip-card-details-height))}@media (forced-colors: active){.sbb-flip-card:after{content:"";border:var(--sbb-border-width-2x) solid CanvasText;border-radius:var(--sbb-flip-card-border-radius);position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}}@media (forced-colors: active) and (any-hover: hover){:host(:hover) .sbb-flip-card:after{border-color:Highlight}}.sbb-flip-card:before{content:"";opacity:0;pointer-events:none;position:absolute;inset-inline-start:var(--sbb-spacing-responsive-s);inset-block-end:var(--sbb-spacing-responsive-s);background-color:var(--sbb-color-midnight);width:var(--sbb-size-element-xs);height:var(--sbb-size-element-xs);border-radius:16rem;transition:var(--sbb-disable-animation-zero-time, var(--sbb-animation-duration-3x)) ease-out}:host([data-flipped]) .sbb-flip-card:before{opacity:1;inset-inline-start:0;inset-block-end:0;width:100%;height:100%;border-radius:var(--sbb-flip-card-border-radius);transition-duration:var(--sbb-disable-animation-zero-time, var(--sbb-animation-duration-5x))}.sbb-flip-card--toggle-button{position:absolute;inset-inline-start:var(--sbb-spacing-responsive-s);inset-block-end:var(--sbb-spacing-responsive-s)}:host([data-flipped]) .sbb-flip-card--toggle-button{--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark)}.sbb-flip-card--toggle-button-icon{transform:var(--sbb-flip-card-toggle-icon-transform);transition:transform var(--sbb-flip-card-summary-transition-duration) ease-out}.sbb-flip-card-button{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;position:absolute;top:0;right:0;bottom:0;left:0;width:100%;border-radius:var(--sbb-flip-card-border-radius);cursor:pointer}.sbb-flip-card-button:not([data-focus-origin=mouse],[data-focus-origin=touch]):focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}`;
|
|
20
|
+
let st = (() => {
|
|
20
21
|
var l, n, o;
|
|
21
|
-
let e = [
|
|
22
|
-
var p = (o = class extends
|
|
22
|
+
let e = [H("sbb-flip-card")], a, s = [], r, u = P(S), g, v = [], _ = [], y, x = [], z = [];
|
|
23
|
+
var p = (o = class extends u {
|
|
23
24
|
constructor() {
|
|
24
25
|
super(...arguments);
|
|
25
26
|
f(this, l);
|
|
26
27
|
f(this, n);
|
|
27
|
-
d(this, l, c(this, v, "")), this.flip = (c(this,
|
|
28
|
+
d(this, l, c(this, v, "")), this.flip = (c(this, _), new j(this, p.events.flip)), d(this, n, c(this, x, !1)), this._abort = (c(this, z), new F(this)), this._language = new A(this), this._cardDetailsResizeObserver = new w(this, {
|
|
29
|
+
target: null,
|
|
30
|
+
skipInitial: !0,
|
|
31
|
+
callback: () => this._setCardDetailsHeight()
|
|
32
|
+
});
|
|
28
33
|
}
|
|
29
34
|
/**
|
|
30
35
|
* This will be forwarded as aria-label to the action in the non flipped state.
|
|
@@ -33,18 +38,22 @@ let ei = (() => {
|
|
|
33
38
|
get accessibilityLabel() {
|
|
34
39
|
return m(this, l);
|
|
35
40
|
}
|
|
36
|
-
set accessibilityLabel(
|
|
37
|
-
d(this, l,
|
|
41
|
+
set accessibilityLabel(t) {
|
|
42
|
+
d(this, l, t);
|
|
38
43
|
}
|
|
39
44
|
/** Returns the slotted sbb-flip-card-summary. */
|
|
40
45
|
get summary() {
|
|
41
|
-
var
|
|
42
|
-
return (
|
|
46
|
+
var t;
|
|
47
|
+
return (t = this.querySelector) == null ? void 0 : t.call(this, "sbb-flip-card-summary");
|
|
43
48
|
}
|
|
44
49
|
/** Returns the slotted sbb-flip-card-details. */
|
|
45
50
|
get details() {
|
|
46
|
-
var
|
|
47
|
-
return (
|
|
51
|
+
var t;
|
|
52
|
+
return (t = this.querySelector) == null ? void 0 : t.call(this, "sbb-flip-card-details");
|
|
53
|
+
}
|
|
54
|
+
/** Returns the card details content element wrapper. */
|
|
55
|
+
get _detailsContentElement() {
|
|
56
|
+
return this.details.shadowRoot.firstElementChild;
|
|
48
57
|
}
|
|
49
58
|
/** Whether the flip card is flipped. */
|
|
50
59
|
get isFlipped() {
|
|
@@ -54,32 +63,37 @@ let ei = (() => {
|
|
|
54
63
|
get _flipped() {
|
|
55
64
|
return m(this, n);
|
|
56
65
|
}
|
|
57
|
-
set _flipped(
|
|
58
|
-
d(this, n,
|
|
66
|
+
set _flipped(t) {
|
|
67
|
+
d(this, n, t);
|
|
59
68
|
}
|
|
60
69
|
connectedCallback() {
|
|
61
|
-
super.connectedCallback(), this.addEventListener("click", (
|
|
62
|
-
var
|
|
63
|
-
(
|
|
70
|
+
super.connectedCallback(), this.addEventListener("click", (t) => {
|
|
71
|
+
var i, b;
|
|
72
|
+
(t.target === this || !((b = (i = t.target) == null ? void 0 : i.matches) != null && b.call(i, O))) && this.toggle();
|
|
64
73
|
}, { signal: this._abort.signal });
|
|
65
74
|
}
|
|
66
75
|
/** Toggles the state of the sbb-flip-card. */
|
|
67
76
|
toggle() {
|
|
68
|
-
this._flipped = !this._flipped, this.toggleAttribute("data-flipped", this._flipped), this.details.toggleAttribute("data-flipped", this._flipped), this.summary.inert = this._flipped, this.details.inert = !this._flipped, this.flip.emit();
|
|
77
|
+
this._flipped = !this._flipped, this._flipped ? (this._setCardDetailsHeight(), this._cardDetailsResizeObserver.observe(this._detailsContentElement)) : this._cardDetailsResizeObserver.unobserve(this._detailsContentElement), this.toggleAttribute("data-flipped", this._flipped), this.details.toggleAttribute("data-flipped", this._flipped), this.summary.inert = this._flipped, this.details.inert = !this._flipped, this.flip.emit();
|
|
78
|
+
}
|
|
79
|
+
_setCardDetailsHeight() {
|
|
80
|
+
var i;
|
|
81
|
+
const t = Math.floor(this._detailsContentElement.offsetHeight);
|
|
82
|
+
(i = this.style) == null || i.setProperty("--sbb-flip-card-details-height", `${t}px`);
|
|
69
83
|
}
|
|
70
84
|
async _accessibilityLabel() {
|
|
71
|
-
var
|
|
72
|
-
return
|
|
85
|
+
var t, i;
|
|
86
|
+
return E ? "" : (await this.hydrationComplete, this._flipped ? M[this._language.current] : `${(this.accessibilityLabel ? this.accessibilityLabel : (i = (t = this.summary) == null ? void 0 : t.textContent) == null ? void 0 : i.trim()) ?? ""}, ${q[this._language.current]}`);
|
|
73
87
|
}
|
|
74
88
|
render() {
|
|
75
|
-
return
|
|
89
|
+
return D`
|
|
76
90
|
<div class="sbb-flip-card">
|
|
77
91
|
<button
|
|
78
92
|
class="sbb-flip-card-button"
|
|
79
93
|
aria-expanded=${this._flipped.toString()}
|
|
80
94
|
type="button"
|
|
81
95
|
>
|
|
82
|
-
<sbb-screen-reader-only>${
|
|
96
|
+
<sbb-screen-reader-only>${I(this._accessibilityLabel(), "")}</sbb-screen-reader-only>
|
|
83
97
|
</button>
|
|
84
98
|
<slot name="summary" @slotchange=${() => this.summary.inert = this._flipped}></slot>
|
|
85
99
|
<slot name="details" @slotchange=${() => this.details.inert = !this._flipped}></slot>
|
|
@@ -94,17 +108,17 @@ let ei = (() => {
|
|
|
94
108
|
`;
|
|
95
109
|
}
|
|
96
110
|
}, l = new WeakMap(), n = new WeakMap(), r = o, (() => {
|
|
97
|
-
const
|
|
98
|
-
g = [
|
|
99
|
-
|
|
100
|
-
} }, metadata:
|
|
101
|
-
|
|
102
|
-
} }, metadata:
|
|
103
|
-
})(), o.styles =
|
|
111
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
112
|
+
g = [T(), R({ attribute: "accessibility-label" })], y = [$()], h(o, null, g, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (i) => "accessibilityLabel" in i, get: (i) => i.accessibilityLabel, set: (i, b) => {
|
|
113
|
+
i.accessibilityLabel = b;
|
|
114
|
+
} }, metadata: t }, v, _), h(o, null, y, { kind: "accessor", name: "_flipped", static: !1, private: !1, access: { has: (i) => "_flipped" in i, get: (i) => i._flipped, set: (i, b) => {
|
|
115
|
+
i._flipped = b;
|
|
116
|
+
} }, metadata: t }, x, z), h(null, a = { value: r }, e, { kind: "class", name: r.name, metadata: t }, null, s), p = r = a.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
117
|
+
})(), o.styles = U, o.events = {
|
|
104
118
|
flip: "flip"
|
|
105
119
|
}, c(r, s), o);
|
|
106
120
|
return p = r;
|
|
107
121
|
})();
|
|
108
122
|
export {
|
|
109
|
-
|
|
123
|
+
st as SbbFlipCardElement
|
|
110
124
|
};
|
package/icon/icon.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { SbbIconBase } from './icon-base.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Displays an icon loaded from a registered namespace.
|
|
5
5
|
*/
|
|
6
6
|
export declare class SbbIconElement extends SbbIconBase {
|
|
7
7
|
/**
|
package/image/image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/elements/image/image.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AASb,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,6CAA6C,EAAE,CAAC;CAC9D;AAED,MAAM,WAAW,6CAA6C;IAC5D,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,YAAY,EAAE,6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CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7F,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,2BAA2B;IAKnC,OAAO,CAAC,gCAAgC;IAMxC,OAAO,CAAC,gBAAgB;IA0CxB,OAAO,CAAC,0BAA0B;IAgElC,OAAO,CAAC,uBAAuB;IAwB/B,OAAO,CAAC,YAAY;cAMD,MAAM,IAAI,cAAc;CAgG5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,WAAW,EAAE,eAAe,CAAC;KAC9B;CACF"}
|
package/image.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
var qt = (r) => {
|
|
2
2
|
throw TypeError(r);
|
|
3
3
|
};
|
|
4
|
-
var Tt = (r, n,
|
|
5
|
-
var p = (r, n,
|
|
4
|
+
var Tt = (r, n, m) => n.has(r) || qt("Cannot " + m);
|
|
5
|
+
var p = (r, n, m) => (Tt(r, n, "read from private field"), m ? m.call(r) : n.get(r)), h = (r, n, m) => n.has(r) ? qt("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, m), s = (r, n, m, b) => (Tt(r, n, "write to private field"), b ? b.call(r, m) : n.set(r, m), m);
|
|
6
6
|
import { __esDecorate as c, __runInitializers as a } from "tslib";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { S as At, a as Ut, b as Vt, c as Kt, d as Wt, e as Nt, f as Zt, g as Gt, h as Jt, i as te, j as ee, k as ie, l as ae, m as se, n as re } from "./sbb-tokens-Dx20OtVg.js";
|
|
8
|
+
import { css as oe, html as T, nothing as _, LitElement as ne } from "lit";
|
|
9
|
+
import { customElement as ce, property as d, eventOptions as le } from "lit/decorators.js";
|
|
10
|
+
import { ref as pe } from "lit/directives/ref.js";
|
|
10
11
|
import { forceType as u } from "./core/decorators.js";
|
|
11
|
-
import { hostContext as
|
|
12
|
-
const
|
|
13
|
-
var jt = Object.freeze,
|
|
12
|
+
import { hostContext as he } from "./core/dom.js";
|
|
13
|
+
const de = oe`*,:before,:after{box-sizing:border-box}:host{--sbb-image-border-radius: var(--sbb-border-radius-4x);--sbb-image-aspect-ratio: auto;--sbb-image-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-4x) );--sbb-image-object-fit: cover;display:block}:host([aspect-ratio="1-1"]){--sbb-image-aspect-ratio: 1 / 1}:host([aspect-ratio="1-2"]){--sbb-image-aspect-ratio: 1 / 2}:host([aspect-ratio="2-1"]){--sbb-image-aspect-ratio: 2 / 1}:host([aspect-ratio="2-3"]){--sbb-image-aspect-ratio: 2 / 3}:host([aspect-ratio="3-2"]){--sbb-image-aspect-ratio: 3 / 2}:host([aspect-ratio="3-4"]){--sbb-image-aspect-ratio: 3 / 4}:host([aspect-ratio="4-3"]){--sbb-image-aspect-ratio: 4 / 3}:host([aspect-ratio="4-5"]){--sbb-image-aspect-ratio: 4 / 5}:host([aspect-ratio="5-4"]){--sbb-image-aspect-ratio: 5 / 4}:host([aspect-ratio="16-9"]){--sbb-image-aspect-ratio: 16 / 9}:host([aspect-ratio="9-16"]){--sbb-image-aspect-ratio: 9 / 16}:host([data-teaser]){--sbb-image-aspect-ratio: 1 / 1}@media (min-width: 37.5rem){:host([data-teaser]){--sbb-image-aspect-ratio: 16 / 9}}:host(:is([border-radius=none],[data-teaser])){--sbb-image-border-radius: 0}:host([border-radius=round]:not([data-teaser])){--sbb-image-border-radius: var(--sbb-border-radius-infinity)}.sbb-image__figure{display:flex;flex-direction:column;gap:var(--sbb-spacing-fixed-4x);margin:0;height:100%}.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;overflow:hidden;width:100%;height:100%;aspect-ratio:var(--sbb-image-aspect-ratio);border-radius:var(--sbb-image-border-radius)}.sbb-image__caption{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size)}`;
|
|
14
|
+
var jt = Object.freeze, me = Object.defineProperty, ge = (r, n) => jt(me(r, "raw", { value: jt(r.slice()) })), Xt;
|
|
14
15
|
const be = (r) => {
|
|
15
16
|
if (!r || r.length === 0)
|
|
16
17
|
return [];
|
|
@@ -24,38 +25,38 @@ const be = (r) => {
|
|
|
24
25
|
return [];
|
|
25
26
|
if (!Array.isArray(n.breakpoints))
|
|
26
27
|
return [];
|
|
27
|
-
let
|
|
28
|
+
let m = !1, b = !1;
|
|
28
29
|
const Q = ["image", "mediaQueries"];
|
|
29
30
|
return n.breakpoints.forEach((j) => {
|
|
30
31
|
const H = Object.keys(j);
|
|
31
32
|
H.forEach((k) => {
|
|
32
|
-
Q.includes(k) || (
|
|
33
|
+
Q.includes(k) || (m = !0);
|
|
33
34
|
}), Q.forEach((k) => {
|
|
34
35
|
H.includes(k) || (b = !0);
|
|
35
36
|
});
|
|
36
|
-
}),
|
|
37
|
+
}), m || b ? [] : n.breakpoints;
|
|
37
38
|
}, ue = {
|
|
38
39
|
once: !0,
|
|
39
40
|
passive: !0
|
|
40
|
-
},
|
|
41
|
-
"sbb-breakpoint-zero-min":
|
|
42
|
-
"sbb-breakpoint-zero-max":
|
|
43
|
-
"sbb-breakpoint-micro-min":
|
|
44
|
-
"sbb-breakpoint-micro-max":
|
|
45
|
-
"sbb-breakpoint-small-min":
|
|
46
|
-
"sbb-breakpoint-small-max":
|
|
47
|
-
"sbb-breakpoint-medium-min":
|
|
48
|
-
"sbb-breakpoint-medium-max":
|
|
49
|
-
"sbb-breakpoint-large-min":
|
|
50
|
-
"sbb-breakpoint-large-max":
|
|
51
|
-
"sbb-breakpoint-wide-min":
|
|
52
|
-
"sbb-breakpoint-wide-max":
|
|
53
|
-
"sbb-breakpoint-ultra-min":
|
|
54
|
-
"sbb-breakpoint-ultra-max":
|
|
41
|
+
}, g = (r) => r / At, _e = {
|
|
42
|
+
"sbb-breakpoint-zero-min": g(Ut),
|
|
43
|
+
"sbb-breakpoint-zero-max": g(Vt),
|
|
44
|
+
"sbb-breakpoint-micro-min": g(Kt),
|
|
45
|
+
"sbb-breakpoint-micro-max": g(Wt),
|
|
46
|
+
"sbb-breakpoint-small-min": g(Nt),
|
|
47
|
+
"sbb-breakpoint-small-max": g(Zt),
|
|
48
|
+
"sbb-breakpoint-medium-min": g(Gt),
|
|
49
|
+
"sbb-breakpoint-medium-max": g(Jt),
|
|
50
|
+
"sbb-breakpoint-large-min": g(te),
|
|
51
|
+
"sbb-breakpoint-large-max": g(ee),
|
|
52
|
+
"sbb-breakpoint-wide-min": g(ie),
|
|
53
|
+
"sbb-breakpoint-wide-max": g(ae),
|
|
54
|
+
"sbb-breakpoint-ultra-min": g(se),
|
|
55
|
+
"sbb-breakpoint-ultra-max": g(re)
|
|
55
56
|
};
|
|
56
|
-
let
|
|
57
|
-
var y, z, P, v,
|
|
58
|
-
let r = [
|
|
57
|
+
let Me = (() => {
|
|
58
|
+
var y, z, P, v, S, x, $, M, w, I, L, C, R, D, F, B, E, o;
|
|
59
|
+
let r = [ce("sbb-image")], n, m = [], b, Q = ne, j = [], H, k = [], X = [], Y, A = [], U = [], V, K = [], W = [], N, Z = [], G = [], J, tt = [], et = [], it, at = [], st = [], rt, ot = [], nt = [], ct, lt = [], pt = [], ht, dt = [], mt = [], gt, bt = [], ut = [], _t, ft = [], kt = [], yt, zt = [], Pt = [], vt, St = [], xt = [], $t, Mt = [], wt = [], It, Lt = [], Ct = [], Rt, Dt = [], Ft = [], Bt, Et = [], Qt = [], Ht;
|
|
59
60
|
return o = class extends Q {
|
|
60
61
|
constructor() {
|
|
61
62
|
super(...arguments);
|
|
@@ -63,8 +64,8 @@ let $e = (() => {
|
|
|
63
64
|
h(this, z);
|
|
64
65
|
h(this, P);
|
|
65
66
|
h(this, v);
|
|
66
|
-
h(this, x);
|
|
67
67
|
h(this, S);
|
|
68
|
+
h(this, x);
|
|
68
69
|
h(this, $);
|
|
69
70
|
h(this, M);
|
|
70
71
|
h(this, w);
|
|
@@ -79,7 +80,7 @@ let $e = (() => {
|
|
|
79
80
|
this._captionElement = a(this, j), this._config = {
|
|
80
81
|
nonRetinaQuality: "45",
|
|
81
82
|
retinaQuality: "20"
|
|
82
|
-
}, s(this, y, a(this, k, "")), s(this, z, (a(this, X), a(this, A, !1))), s(this, P, (a(this, U), a(this, K, ""))), s(this, v, (a(this, W), a(this, Z, ""))), s(this,
|
|
83
|
+
}, s(this, y, a(this, k, "")), s(this, z, (a(this, X), a(this, A, !1))), s(this, P, (a(this, U), a(this, K, ""))), s(this, v, (a(this, W), a(this, Z, ""))), s(this, S, (a(this, G), a(this, tt, "Organization"))), s(this, x, (a(this, et), a(this, at, !1))), s(this, $, (a(this, st), a(this, ot, "auto"))), s(this, M, (a(this, nt), a(this, lt, !1))), s(this, w, (a(this, pt), a(this, dt, 1))), s(this, I, (a(this, mt), a(this, bt, 1))), s(this, L, (a(this, ut), a(this, ft, ""))), s(this, C, (a(this, kt), a(this, zt, "high"))), s(this, R, (a(this, Pt), a(this, St, "eager"))), s(this, D, (a(this, xt), a(this, Mt, ""))), s(this, F, (a(this, wt), a(this, Lt, ""))), s(this, B, (a(this, Ct), a(this, Dt, "default"))), s(this, E, (a(this, Ft), a(this, Et, "16-9"))), a(this, Qt);
|
|
83
84
|
}
|
|
84
85
|
/**
|
|
85
86
|
* An alt text is not always necessary (e.g. in teaser cards when
|
|
@@ -134,10 +135,10 @@ let $e = (() => {
|
|
|
134
135
|
* Copyright holder can either be an Organization or a Person
|
|
135
136
|
*/
|
|
136
137
|
get copyrightHolder() {
|
|
137
|
-
return p(this,
|
|
138
|
+
return p(this, S);
|
|
138
139
|
}
|
|
139
140
|
set copyrightHolder(e) {
|
|
140
|
-
s(this,
|
|
141
|
+
s(this, S, e);
|
|
141
142
|
}
|
|
142
143
|
/**
|
|
143
144
|
* Set this to true, if you want to pass a custom focal point
|
|
@@ -145,10 +146,10 @@ let $e = (() => {
|
|
|
145
146
|
* https://docs.imgix.com/apis/rendering/focalpoint-crop
|
|
146
147
|
*/
|
|
147
148
|
get customFocalPoint() {
|
|
148
|
-
return p(this,
|
|
149
|
+
return p(this, x);
|
|
149
150
|
}
|
|
150
151
|
set customFocalPoint(e) {
|
|
151
|
-
s(this,
|
|
152
|
+
s(this, x, e);
|
|
152
153
|
}
|
|
153
154
|
/**
|
|
154
155
|
* If the lazy property is set to true, the module will automatically
|
|
@@ -357,7 +358,7 @@ let $e = (() => {
|
|
|
357
358
|
return ((i = (t = (e = this.shadowRoot) == null ? void 0 : e.querySelector) == null ? void 0 : t.call(e, ".sbb-image__img")) == null ? void 0 : i.complete) ?? !1;
|
|
358
359
|
}
|
|
359
360
|
connectedCallback() {
|
|
360
|
-
super.connectedCallback(), this.toggleAttribute("data-teaser", !!
|
|
361
|
+
super.connectedCallback(), this.toggleAttribute("data-teaser", !!he("sbb-teaser-hero", this) || !!this.closest("sbb-teaser-paid"));
|
|
361
362
|
}
|
|
362
363
|
updated(e) {
|
|
363
364
|
super.updated(e), this._captionElement && (this._linksInCaption = this._captionElement.querySelectorAll("a"), this._linksInCaption && this._addFocusAbilityToLinksInCaption());
|
|
@@ -507,17 +508,17 @@ let $e = (() => {
|
|
|
507
508
|
${e ? T`<figcaption
|
|
508
509
|
class="sbb-image__caption"
|
|
509
510
|
.innerHTML=${e}
|
|
510
|
-
${
|
|
511
|
+
${pe((f) => {
|
|
511
512
|
this._captionElement = f;
|
|
512
513
|
})}
|
|
513
514
|
></figcaption>` : _}
|
|
514
|
-
${t ? T(Xt || (Xt =
|
|
515
|
+
${t ? T(Xt || (Xt = ge(['<script type="application/ld+json" .innerHTML=', "><\/script>"])), t) : _}
|
|
515
516
|
</figure>
|
|
516
517
|
`;
|
|
517
518
|
}
|
|
518
|
-
}, y = new WeakMap(), z = new WeakMap(), P = new WeakMap(), v = new WeakMap(),
|
|
519
|
+
}, y = new WeakMap(), z = new WeakMap(), P = new WeakMap(), v = new WeakMap(), S = new WeakMap(), x = new WeakMap(), $ = new WeakMap(), M = new WeakMap(), w = new WeakMap(), I = new WeakMap(), L = new WeakMap(), C = new WeakMap(), R = new WeakMap(), D = new WeakMap(), F = new WeakMap(), B = new WeakMap(), E = new WeakMap(), b = o, (() => {
|
|
519
520
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(Q[Symbol.metadata] ?? null) : void 0;
|
|
520
|
-
H = [u(), d()], Y = [u(), d({ attribute: "skip-lqip", type: Boolean, reflect: !0 })], V = [u(), d()], N = [u(), d()], J = [d({ attribute: "copyright-holder" })], it = [u(), d({ attribute: "custom-focal-point", type: Boolean })], rt = [d()], ct = [u(), d({ attribute: "focal-point-debug", type: Boolean })], ht = [u(), d({ attribute: "focal-point-x", type: Number })],
|
|
521
|
+
H = [u(), d()], Y = [u(), d({ attribute: "skip-lqip", type: Boolean, reflect: !0 })], V = [u(), d()], N = [u(), d()], J = [d({ attribute: "copyright-holder" })], it = [u(), d({ attribute: "custom-focal-point", type: Boolean })], rt = [d()], ct = [u(), d({ attribute: "focal-point-debug", type: Boolean })], ht = [u(), d({ attribute: "focal-point-x", type: Number })], gt = [u(), d({ attribute: "focal-point-y", type: Number })], _t = [u(), d({ attribute: "image-src" })], yt = [d()], vt = [d()], $t = [u(), d({ attribute: "performance-mark" })], It = [u(), d({ attribute: "picture-sizes-config" })], Rt = [d({ attribute: "border-radius", reflect: !0 })], Bt = [d({ attribute: "aspect-ratio", reflect: !0 })], Ht = [le(ue)], c(o, null, H, { kind: "accessor", name: "alt", static: !1, private: !1, access: { has: (t) => "alt" in t, get: (t) => t.alt, set: (t, i) => {
|
|
521
522
|
t.alt = i;
|
|
522
523
|
} }, metadata: e }, k, X), c(o, null, Y, { kind: "accessor", name: "skipLqip", static: !1, private: !1, access: { has: (t) => "skipLqip" in t, get: (t) => t.skipLqip, set: (t, i) => {
|
|
523
524
|
t.skipLqip = i;
|
|
@@ -535,7 +536,7 @@ let $e = (() => {
|
|
|
535
536
|
t.focalPointDebug = i;
|
|
536
537
|
} }, metadata: e }, lt, pt), c(o, null, ht, { kind: "accessor", name: "focalPointX", static: !1, private: !1, access: { has: (t) => "focalPointX" in t, get: (t) => t.focalPointX, set: (t, i) => {
|
|
537
538
|
t.focalPointX = i;
|
|
538
|
-
} }, metadata: e }, dt,
|
|
539
|
+
} }, metadata: e }, dt, mt), c(o, null, gt, { kind: "accessor", name: "focalPointY", static: !1, private: !1, access: { has: (t) => "focalPointY" in t, get: (t) => t.focalPointY, set: (t, i) => {
|
|
539
540
|
t.focalPointY = i;
|
|
540
541
|
} }, metadata: e }, bt, ut), c(o, null, _t, { kind: "accessor", name: "imageSrc", static: !1, private: !1, access: { has: (t) => "imageSrc" in t, get: (t) => t.imageSrc, set: (t, i) => {
|
|
541
542
|
t.imageSrc = i;
|
|
@@ -543,7 +544,7 @@ let $e = (() => {
|
|
|
543
544
|
t.importance = i;
|
|
544
545
|
} }, metadata: e }, zt, Pt), c(o, null, vt, { kind: "accessor", name: "loading", static: !1, private: !1, access: { has: (t) => "loading" in t, get: (t) => t.loading, set: (t, i) => {
|
|
545
546
|
t.loading = i;
|
|
546
|
-
} }, metadata: e },
|
|
547
|
+
} }, metadata: e }, St, xt), c(o, null, $t, { kind: "accessor", name: "performanceMark", static: !1, private: !1, access: { has: (t) => "performanceMark" in t, get: (t) => t.performanceMark, set: (t, i) => {
|
|
547
548
|
t.performanceMark = i;
|
|
548
549
|
} }, metadata: e }, Mt, wt), c(o, null, It, { kind: "accessor", name: "pictureSizesConfig", static: !1, private: !1, access: { has: (t) => "pictureSizesConfig" in t, get: (t) => t.pictureSizesConfig, set: (t, i) => {
|
|
549
550
|
t.pictureSizesConfig = i;
|
|
@@ -551,12 +552,12 @@ let $e = (() => {
|
|
|
551
552
|
t.borderRadius = i;
|
|
552
553
|
} }, metadata: e }, Dt, Ft), c(o, null, Bt, { kind: "accessor", name: "aspectRatio", static: !1, private: !1, access: { has: (t) => "aspectRatio" in t, get: (t) => t.aspectRatio, set: (t, i) => {
|
|
553
554
|
t.aspectRatio = i;
|
|
554
|
-
} }, metadata: e }, Et, Qt), c(o, null, Ht, { kind: "method", name: "_imageLoaded", static: !1, private: !1, access: { has: (t) => "_imageLoaded" in t, get: (t) => t._imageLoaded }, metadata: e }, null, j), c(null, n = { value: b }, r, { kind: "class", name: b.name, metadata: e }, null,
|
|
555
|
+
} }, metadata: e }, Et, Qt), c(o, null, Ht, { kind: "method", name: "_imageLoaded", static: !1, private: !1, access: { has: (t) => "_imageLoaded" in t, get: (t) => t._imageLoaded }, metadata: e }, null, j), c(null, n = { value: b }, r, { kind: "class", name: b.name, metadata: e }, null, m), b = n.value, e && Object.defineProperty(b, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
555
556
|
})(), o.styles = de, o.events = {
|
|
556
557
|
error: "error",
|
|
557
558
|
load: "load"
|
|
558
|
-
}, a(b,
|
|
559
|
+
}, a(b, m), b;
|
|
559
560
|
})();
|
|
560
561
|
export {
|
|
561
|
-
|
|
562
|
+
Me as SbbImageElement
|
|
562
563
|
};
|
package/map-container.js
CHANGED
|
@@ -4,23 +4,23 @@ var y = (a) => {
|
|
|
4
4
|
var B = (a, i, o) => i.has(a) || y("Cannot " + o);
|
|
5
5
|
var m = (a, i, o) => (B(a, i, "read from private field"), o ? o.call(a) : i.get(a)), p = (a, i, o) => i.has(a) ? y("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(a) : i.set(a, o), c = (a, i, o, s) => (B(a, i, "write to private field"), s ? s.call(a, o) : i.set(a, o), o);
|
|
6
6
|
import { __runInitializers as d, __esDecorate as u } from "tslib";
|
|
7
|
-
import { IntersectionController as
|
|
8
|
-
import { css as
|
|
7
|
+
import { IntersectionController as x } from "@lit-labs/observers/intersection-controller.js";
|
|
8
|
+
import { css as S, html as U, nothing as V, LitElement as z } from "lit";
|
|
9
9
|
import { customElement as I, property as C, state as E } from "lit/decorators.js";
|
|
10
10
|
import { SbbLanguageController as O } from "./core/controllers.js";
|
|
11
11
|
import { forceType as $ } from "./core/decorators.js";
|
|
12
12
|
import { i18nMapContainerButtonLabel as D } from "./core/i18n.js";
|
|
13
13
|
import "./button/tertiary-button.js";
|
|
14
|
-
const L =
|
|
14
|
+
const L = S`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-map-container-map-height-zero: 18.4375rem;--sbb-map-container-map-height-small: 20rem;--sbb-map-container-sidebar-width: 25rem;--sbb-map-container-sidebar-background-color: var(--sbb-color-white);--sbb-map-container-border-radius: var(--sbb-border-radius-4x);--sbb-map-container-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-4x) );--sbb-map-container-map-height: calc( var(--sbb-map-container-map-height-zero) + var(--sbb-map-container-border-radius) );--sbb-map-container-mobile-sticky-block-start: 0}@media (min-width: 37.5rem){:host{--sbb-map-container-map-height: calc( var(--sbb-map-container-map-height-small) + var(--sbb-map-container-border-radius) )}}@media (min-width: 80rem){:host{--sbb-map-container-sidebar-width: 30rem}}.sbb-map-container{display:grid;grid-template-rows:auto auto}@media (min-width: 52.5rem){.sbb-map-container{grid-template-columns:max(var(--sbb-map-container-sidebar-width)) calc(100% - var(--sbb-map-container-sidebar-width));position:fixed;inset:var(--sbb-map-container-margin-start, var(--sbb-header-height)) 0 0 0}}.sbb-map-container__sidebar-button{position:fixed;left:50%;inset-block-end:var(--sbb-spacing-fixed-5x);visibility:hidden;opacity:0;transform:translate(-50%) translateY(calc(100% + var(--sbb-spacing-fixed-5x)));transition:opacity var(--sbb-map-container-animation-duration) var(--sbb-animation-easing),visibility var(--sbb-map-container-animation-duration) var(--sbb-animation-easing) var(--sbb-map-container-animation-duration),transform var(--sbb-map-container-animation-duration) var(--sbb-animation-easing)}:host([data-scroll-up-button-visible]) .sbb-map-container__sidebar-button{transition:visibility var(--sbb-map-container-animation-duration) var(--sbb-animation-easing),opacity var(--sbb-map-container-animation-duration) var(--sbb-animation-easing),transform var(--sbb-map-container-animation-duration) ease-out;visibility:visible;opacity:1;transform:translate(-50%) translateY(0)}@media (min-width: 52.5rem){.sbb-map-container__sidebar-button{display:none}}.sbb-map-container__sidebar{--sbb-scrollbar-thumb-width: .5rem;--sbb-scrollbar-thumb-width-hover: var(--sbb-scrollbar-thumb-width);--sbb-scrollbar-width-firefox: auto;--sbb-scrollbar-color: var(--sbb-color-black-alpha-30);--sbb-scrollbar-color-hover: var(--sbb-color-black-alpha-60);--sbb-scrollbar-track-color: var(--sbb-color-cloud);--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x)}.sbb-map-container__sidebar::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-map-container__sidebar::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-map-container__sidebar::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-map-container__sidebar::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-map-container__sidebar::-webkit-scrollbar-button,.sbb-map-container__sidebar::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-map-container__sidebar{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-map-container__sidebar{grid-column:1/3;grid-row:2/3;width:100%;overflow:hidden auto;position:relative;border-start-end-radius:var(--sbb-map-container-border-radius);border-start-start-radius:var(--sbb-map-container-border-radius);margin-block-start:calc(var(--sbb-map-container-border-radius) * -1);background-color:var(--sbb-map-container-sidebar-background-color)}@media (min-width: 52.5rem){.sbb-map-container__sidebar{grid-column:1/2;grid-row:1/3;border-radius:0;margin-block-start:0;border-block-start:var(--sbb-border-width-1x) solid var(--sbb-color-cloud)}}.sbb-map-container__map{position:sticky;inset-block-start:0;inset-inline:0;grid-row:1/2;grid-column:1/3}@media (max-width: 52.4375rem){.sbb-map-container__map{inset-block-start:var(--sbb-map-container-mobile-sticky-block-start);height:var(--sbb-map-container-map-height)}}@media (min-width: 52.5rem){.sbb-map-container__map{grid-row:1/3;grid-column:2/3;position:relative}}`;
|
|
15
15
|
let J = (() => {
|
|
16
16
|
var b, n, e;
|
|
17
|
-
let a = [I("sbb-map-container")], i, o = [], s, h = z,
|
|
17
|
+
let a = [I("sbb-map-container")], i, o = [], s, h = z, _, v = [], g = [], w, f = [], k = [];
|
|
18
18
|
return e = class extends h {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
p(this, b);
|
|
22
22
|
p(this, n);
|
|
23
|
-
c(this, b, d(this,
|
|
23
|
+
c(this, b, d(this, v, !1)), c(this, n, (d(this, g), d(this, f, !1))), this._language = (d(this, k), new O(this)), this._observer = new x(this, {
|
|
24
24
|
target: null,
|
|
25
25
|
callback: (r) => this._toggleButtonVisibilityOnIntersect(r)
|
|
26
26
|
});
|
|
@@ -96,9 +96,9 @@ let J = (() => {
|
|
|
96
96
|
}
|
|
97
97
|
}, b = new WeakMap(), n = new WeakMap(), s = e, (() => {
|
|
98
98
|
const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
|
|
99
|
-
|
|
99
|
+
_ = [$(), C({ attribute: "hide-scroll-up-button", reflect: !0, type: Boolean })], w = [E()], u(e, null, _, { kind: "accessor", name: "hideScrollUpButton", static: !1, private: !1, access: { has: (t) => "hideScrollUpButton" in t, get: (t) => t.hideScrollUpButton, set: (t, l) => {
|
|
100
100
|
t.hideScrollUpButton = l;
|
|
101
|
-
} }, metadata: r },
|
|
101
|
+
} }, metadata: r }, v, g), u(e, null, w, { kind: "accessor", name: "_scrollUpButtonVisible", static: !1, private: !1, access: { has: (t) => "_scrollUpButtonVisible" in t, get: (t) => t._scrollUpButtonVisible, set: (t, l) => {
|
|
102
102
|
t._scrollUpButtonVisible = l;
|
|
103
103
|
} }, metadata: r }, f, k), u(null, i = { value: s }, a, { kind: "class", name: s.name, metadata: r }, null, o), s = i.value, r && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r });
|
|
104
104
|
})(), e.styles = L, d(s, o), s;
|
package/menu/menu/menu.d.ts
CHANGED
package/menu/menu/menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/elements/menu/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAYrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/elements/menu/menu/menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAQ,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAYrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAgBtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;;AAkB1D;;;;;;;;;;;GAWG;AACH,qBAEM,cAAe,SAAQ,mBAGH;IACxB,OAAuB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