@sbb-esta/lyne-elements-experimental-dev 5.0.0-next.1-dev.1777448516 → 5.0.0-next.1-dev.1777455651
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-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/{autocomplete-grid-option.component-DhmoLeEw.js → autocomplete-grid-option.component-DC-XxD8e.js} +9 -9
- package/autocomplete-grid.js +1 -1
- package/autocomplete-grid.pure.js +1 -1
- package/custom-elements.json +5 -5
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/development/{autocomplete-grid-option.component-B4SXR9_v.js → autocomplete-grid-option.component-BvDlE8TK.js} +3 -3
- package/development/autocomplete-grid.js +1 -1
- package/development/autocomplete-grid.pure.js +1 -1
- package/development/journey-summary/journey-summary.component.d.ts.map +1 -1
- package/development/journey-summary/journey-summary.component.js +1 -1
- package/development/journey-summary.component-Ch38LiQx.js +345 -0
- package/development/journey-summary.js +1 -1
- package/development/journey-summary.pure.js +1 -1
- package/development/pearl-chain/pearl-chain.component.d.ts.map +1 -1
- package/development/pearl-chain/pearl-chain.component.js +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.d.ts.map +1 -1
- package/development/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/development/{pearl-chain-time.component-DDnGnI77.js → pearl-chain-time.component-f2y8Jebp.js} +8 -4
- package/development/pearl-chain-time.js +1 -1
- package/development/pearl-chain-time.pure.js +1 -1
- package/development/{pearl-chain.component-CngXp3rK.js → pearl-chain.component-bTvnaUEj.js} +8 -4
- package/development/pearl-chain.js +1 -1
- package/development/pearl-chain.pure.js +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +1 -1
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.d.ts.map +1 -1
- package/development/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +1 -1
- package/development/{seat-reservation-navigation-coach.component-DRCcI2ss.js → seat-reservation-navigation-coach.component-cSX-OEsP.js} +10 -6
- package/development/{seat-reservation-navigation-services.component-ZNm77ZG-.js → seat-reservation-navigation-services.component-CLho6RnU.js} +12 -6
- package/development/{seat-reservation-place-control.component-BQ7fOSHM.js → seat-reservation-place-control.component-BEeaDOS6.js} +10 -6
- package/development/seat-reservation.component-Dkn66vPo.js +518 -0
- package/development/seat-reservation.js +4 -4
- package/development/seat-reservation.pure.js +4 -4
- package/development/timetable-duration/timetable-duration.component.d.ts.map +1 -1
- package/development/timetable-duration/timetable-duration.component.js +1 -1
- package/development/timetable-duration.component-BhIBA6le.js +100 -0
- package/development/timetable-duration.js +1 -1
- package/development/timetable-duration.pure.js +1 -1
- package/development/timetable-row/timetable-row.component.d.ts.map +1 -1
- package/development/timetable-row/timetable-row.component.js +1 -1
- package/development/timetable-row.component-BjaJFKLW.js +736 -0
- package/development/timetable-row.js +1 -1
- package/development/timetable-row.pure.js +1 -1
- package/journey-summary/journey-summary.component.js +1 -1
- package/{journey-summary.component-DqeuhXNk.js → journey-summary.component-DZ9M06Nt.js} +15 -12
- package/journey-summary.js +1 -1
- package/journey-summary.pure.js +1 -1
- package/package.json +2 -2
- package/pearl-chain/pearl-chain.component.js +1 -1
- package/pearl-chain-time/pearl-chain-time.component.js +1 -1
- package/{pearl-chain-time.component-awU4lFdO.js → pearl-chain-time.component-DGilJDFx.js} +39 -35
- package/pearl-chain-time.js +1 -1
- package/pearl-chain-time.pure.js +1 -1
- package/{pearl-chain.component-BAtmfmpA.js → pearl-chain.component-D7Dz_ruc.js} +40 -36
- package/pearl-chain.js +1 -1
- package/pearl-chain.pure.js +1 -1
- package/seat-reservation/seat-reservation/seat-reservation.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-coach/seat-reservation-navigation-coach.component.js +1 -1
- package/seat-reservation/seat-reservation-navigation-services/seat-reservation-navigation-services.component.js +1 -1
- package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js +1 -1
- package/{seat-reservation-navigation-coach.component-CGfmiQJq.js → seat-reservation-navigation-coach.component-cYSUjsBj.js} +13 -9
- package/{seat-reservation-navigation-services.component-DQviLWvy.js → seat-reservation-navigation-services.component-BSeCIGnn.js} +13 -7
- package/{seat-reservation-place-control.component-BYJi6aYS.js → seat-reservation-place-control.component-DOEKL6FP.js} +14 -10
- package/{seat-reservation.component-uWai3ks6.js → seat-reservation.component-80NgYHsf.js} +7 -4
- package/seat-reservation.js +4 -4
- package/seat-reservation.pure.js +4 -4
- package/timetable-duration/timetable-duration.component.js +1 -1
- package/{timetable-duration.component-PmvoOKVw.js → timetable-duration.component-B2Wq8dP0.js} +19 -15
- package/timetable-duration.js +1 -1
- package/timetable-duration.pure.js +1 -1
- package/timetable-row/timetable-row.component.js +1 -1
- package/{timetable-row.component-BnmrhD2d.js → timetable-row.component-BPH5pFQO.js} +102 -98
- package/timetable-row.js +1 -1
- package/timetable-row.pure.js +1 -1
- package/development/journey-summary.component-BHnQ-M7H.js +0 -342
- package/development/seat-reservation.component-wkvc3Frp.js +0 -515
- package/development/timetable-duration.component-2JBYobDt.js +0 -96
- package/development/timetable-row.component-B884Zj89.js +0 -732
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as handleNotices, c as sortSituation, i as getHimIcon, n as filterNotices, o as renderIconProduct, r as getCus, s as renderStringProduct, t as SbbTimetableRowElement } from "./timetable-row.component-
|
|
1
|
+
import { a as handleNotices, c as sortSituation, i as getHimIcon, n as filterNotices, o as renderIconProduct, r as getCus, s as renderStringProduct, t as SbbTimetableRowElement } from "./timetable-row.component-BjaJFKLW.js";
|
|
2
2
|
import "./timetable-row.pure.js";
|
|
3
3
|
//#region src/elements-experimental/timetable-row.ts
|
|
4
4
|
/** @entrypoint */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as handleNotices, c as sortSituation, i as getHimIcon, n as filterNotices, o as renderIconProduct, r as getCus, s as renderStringProduct, t as SbbTimetableRowElement } from "./timetable-row.component-
|
|
1
|
+
import { a as handleNotices, c as sortSituation, i as getHimIcon, n as filterNotices, o as renderIconProduct, r as getCus, s as renderStringProduct, t as SbbTimetableRowElement } from "./timetable-row.component-BjaJFKLW.js";
|
|
2
2
|
export { SbbTimetableRowElement, filterNotices, getCus, getHimIcon, handleNotices, renderIconProduct, renderStringProduct, sortSituation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../journey-summary.component-
|
|
1
|
+
import { t as e } from "../journey-summary.component-DZ9M06Nt.js";
|
|
2
2
|
export { e as SbbJourneySummaryElement };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./format-DbUuNYFU.js";
|
|
2
2
|
import { t } from "./isValid-B9oVW3lA.js";
|
|
3
3
|
import { __esDecorate as n, __runInitializers as r } from "tslib";
|
|
4
|
-
import { SbbElement as i, SbbLanguageController as a,
|
|
4
|
+
import { SbbElement as i, SbbLanguageController as a, boxSizingStyles as o, defaultDateAdapter as s, forceType as c, i18nTripDuration as l, screenReaderOnlyStyles as u } from "@sbb-esta/lyne-elements/core.js";
|
|
5
5
|
import { html as d, nothing as f, unsafeCSS as p } from "lit";
|
|
6
6
|
import { SbbDividerElement as m } from "@sbb-esta/lyne-elements/divider.pure.js";
|
|
7
7
|
import { SbbJourneyHeaderElement as h } from "@sbb-esta/lyne-elements/journey-header.pure.js";
|
|
@@ -20,13 +20,13 @@ var b = ":host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sb
|
|
|
20
20
|
C = [g({ type: Object })], E = [g({
|
|
21
21
|
attribute: "trip-back",
|
|
22
22
|
type: Object
|
|
23
|
-
})], k = [
|
|
23
|
+
})], k = [c(), g({
|
|
24
24
|
attribute: "round-trip",
|
|
25
25
|
type: Boolean
|
|
26
|
-
})], M = [g({ attribute: "header-level" })], F = [
|
|
26
|
+
})], M = [g({ attribute: "header-level" })], F = [c(), g({
|
|
27
27
|
attribute: "disable-animation",
|
|
28
28
|
type: Boolean
|
|
29
|
-
})], R = [
|
|
29
|
+
})], R = [c(), g({
|
|
30
30
|
attribute: "a11y-footpath",
|
|
31
31
|
type: Boolean
|
|
32
32
|
})], V = [g()], n(this, null, C, {
|
|
@@ -133,12 +133,15 @@ var b = ":host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sb
|
|
|
133
133
|
this.elementDependencies = [
|
|
134
134
|
m,
|
|
135
135
|
h,
|
|
136
|
-
y
|
|
137
|
-
o
|
|
136
|
+
y
|
|
138
137
|
];
|
|
139
138
|
}
|
|
140
139
|
static {
|
|
141
|
-
this.styles = [
|
|
140
|
+
this.styles = [
|
|
141
|
+
o,
|
|
142
|
+
u,
|
|
143
|
+
p(b)
|
|
144
|
+
];
|
|
142
145
|
}
|
|
143
146
|
#e;
|
|
144
147
|
get trip() {
|
|
@@ -183,7 +186,7 @@ var b = ":host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sb
|
|
|
183
186
|
this.#a = e;
|
|
184
187
|
}
|
|
185
188
|
set now(e) {
|
|
186
|
-
this._now =
|
|
189
|
+
this._now = s.getValidDateOrNull(s.deserialize(e));
|
|
187
190
|
}
|
|
188
191
|
get now() {
|
|
189
192
|
return this._now ?? /* @__PURE__ */ new Date();
|
|
@@ -192,14 +195,14 @@ var b = ":host{display:block}.sbb-journey-summary{--sbb-text-font-size: var(--sb
|
|
|
192
195
|
super.connectedCallback(), this._hasContentSlot = !!this.querySelector?.("[slot=\"content\"]");
|
|
193
196
|
}
|
|
194
197
|
_renderJourneyStart(n, r) {
|
|
195
|
-
let i =
|
|
198
|
+
let i = s, a = r ? _(r, this._language.current) : null;
|
|
196
199
|
if (t(n)) return d`
|
|
197
200
|
<time datetime=${e(n, "d") + " " + e(n, "M")}>
|
|
198
201
|
${i.format(n).replace(",", ".")}</time
|
|
199
202
|
>${r && r > 0 ? d`,<time>
|
|
200
|
-
<sbb-screen-reader-only>
|
|
201
|
-
${
|
|
202
|
-
</
|
|
203
|
+
<span class="sbb-screen-reader-only">
|
|
204
|
+
${l[this._language.current]} ${a.long}
|
|
205
|
+
</span>
|
|
203
206
|
<span aria-hidden="true">${a.short}</span>
|
|
204
207
|
</time>` : f}
|
|
205
208
|
`;
|
package/journey-summary.js
CHANGED
package/journey-summary.pure.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./journey-summary.component-
|
|
1
|
+
import { t as e } from "./journey-summary.component-DZ9M06Nt.js";
|
|
2
2
|
export { e as SbbJourneySummaryElement };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbb-esta/lyne-elements-experimental-dev",
|
|
3
|
-
"version": "5.0.0-next.1-dev.
|
|
3
|
+
"version": "5.0.0-next.1-dev.1777455651",
|
|
4
4
|
"description": "Lyne Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
7
7
|
"web components",
|
|
8
8
|
"lit",
|
|
9
9
|
"storybook",
|
|
10
|
-
"https://github.com/sbb-design-systems/lyne-components/commit/
|
|
10
|
+
"https://github.com/sbb-design-systems/lyne-components/commit/af1886f019eb34d46855abebe0e56ed562c54b20"
|
|
11
11
|
],
|
|
12
12
|
"type": "module",
|
|
13
13
|
"exports": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../pearl-chain.component-
|
|
1
|
+
import { t as e } from "../pearl-chain.component-D7Dz_ruc.js";
|
|
2
2
|
export { e as SbbPearlChainElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../pearl-chain-time.component-
|
|
1
|
+
import { t as e } from "../pearl-chain-time.component-DGilJDFx.js";
|
|
2
2
|
export { e as SbbPearlChainTimeElement };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { t as e } from "./format-DbUuNYFU.js";
|
|
2
2
|
import { __esDecorate as t, __runInitializers as n } from "tslib";
|
|
3
|
-
import { SbbElement as r, SbbLanguageController as i, boxSizingStyles as a, defaultDateAdapter as o, forceType as s, i18nArrival as c, i18nDeparture as l, i18nTransferProcedures as u } from "@sbb-esta/lyne-elements/core.js";
|
|
4
|
-
import { SbbIconElement as
|
|
5
|
-
import { html as
|
|
6
|
-
import { property as
|
|
7
|
-
import { getDepartureArrivalTimeAttribute as
|
|
8
|
-
import { SbbPearlChainElement as
|
|
3
|
+
import { SbbElement as r, SbbLanguageController as i, boxSizingStyles as a, defaultDateAdapter as o, forceType as s, i18nArrival as c, i18nDeparture as l, i18nTransferProcedures as u, screenReaderOnlyStyles as d } from "@sbb-esta/lyne-elements/core.js";
|
|
4
|
+
import { SbbIconElement as f } from "@sbb-esta/lyne-elements/icon.pure.js";
|
|
5
|
+
import { html as p, nothing as m, unsafeCSS as h } from "lit";
|
|
6
|
+
import { property as g } from "lit/decorators.js";
|
|
7
|
+
import { getDepartureArrivalTimeAttribute as _, isRideLeg as v, removeTimezoneFromISOTimeString as y } from "./core.js";
|
|
8
|
+
import { SbbPearlChainElement as b } from "./pearl-chain.pure.js";
|
|
9
9
|
//#region src/elements-experimental/pearl-chain-time/pearl-chain-time.scss?inline
|
|
10
|
-
var
|
|
11
|
-
let
|
|
12
|
-
return class extends
|
|
10
|
+
var x = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-width:37.5rem){:host{--sbb-pearl-chain-time-height: 1.5625rem}}@media(min-width:64rem){:host{--sbb-pearl-chain-time-height: 1.75rem}}.sbb-pearl-chain__time{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;height:var(--sbb-pearl-chain-time-height)}.sbb-pearl-chain__time-walktime,.sbb-pearl-chain__time-transfer{--sbb-text-font-size: var(--sbb-text-font-size-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);display:inline-flex;align-items:center}.sbb-pearl-chain__time-walktime--walk-small-left{transform:translate(-.4375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--walk-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-left{transform:translate(-.375rem);margin-inline-end:calc(var(--sbb-spacing-fixed-2x) - .4375rem)}.sbb-pearl-chain__time-walktime--wheelchair-small-right{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-walktime-prime-symbol{float:right}.sbb-pearl-chain__time-transfer{gap:var(--sbb-spacing-fixed-1x)}.sbb-pearl-chain__time-transfer--sa-ci-departure{margin-inline-end:var(--sbb-spacing-fixed-2x)}.sbb-pearl-chain__time-transfer--sa-ci-arrival{margin-inline-start:calc(var(--sbb-spacing-fixed-2x) - .25rem)}.sbb-pearl-chain__time-chain{flex:1 1 auto;align-self:center;margin-inline:var(--sbb-spacing-fixed-3x)}.sbb-pearl-chain__time-time{--sbb-text-font-size: var(--sbb-text-font-size-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-text);letter-spacing:var(--sbb-typo-letter-spacing-text);font-size:var(--sbb-text-font-size);font-weight:700;color:var(--sbb-color-2)}", S = (() => {
|
|
11
|
+
let S = r, C = [], w, T = [], E = [], D, O = [], k = [], A, j = [], M = [], N, P = [], F = [], I, L = [], R = [], z, B = [], V = [], H, U = [], W = [], G;
|
|
12
|
+
return class extends S {
|
|
13
13
|
constructor() {
|
|
14
|
-
super(...arguments), this.#e = (n(this,
|
|
14
|
+
super(...arguments), this.#e = (n(this, C), n(this, T, [])), this.#t = (n(this, E), n(this, O, "")), this.#n = (n(this, k), n(this, j, "")), this.#r = (n(this, M), n(this, P, NaN)), this.#i = (n(this, F), n(this, L, NaN)), this.#a = (n(this, R), n(this, B, !1)), this.#o = (n(this, V), n(this, U, !1)), this._now = (n(this, W), null), this._language = new i(this);
|
|
15
15
|
}
|
|
16
16
|
static {
|
|
17
|
-
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
18
|
-
|
|
17
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(S[Symbol.metadata] ?? null) : void 0;
|
|
18
|
+
w = [g({ type: Array })], D = [s(), g({ attribute: "departure-time" })], A = [s(), g({ attribute: "arrival-time" })], N = [s(), g({
|
|
19
19
|
attribute: "departure-walk",
|
|
20
20
|
type: Number
|
|
21
|
-
})],
|
|
21
|
+
})], I = [s(), g({
|
|
22
22
|
attribute: "arrival-walk",
|
|
23
23
|
type: Number
|
|
24
|
-
})],
|
|
24
|
+
})], z = [s(), g({
|
|
25
25
|
attribute: "disable-animation",
|
|
26
26
|
type: Boolean
|
|
27
|
-
})],
|
|
27
|
+
})], H = [s(), g({
|
|
28
28
|
attribute: "a11y-footpath",
|
|
29
29
|
type: Boolean
|
|
30
|
-
})],
|
|
30
|
+
})], G = [g()], t(this, null, w, {
|
|
31
31
|
kind: "accessor",
|
|
32
32
|
name: "legs",
|
|
33
33
|
static: !1,
|
|
@@ -40,7 +40,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
metadata: e
|
|
43
|
-
},
|
|
43
|
+
}, T, E), t(this, null, D, {
|
|
44
44
|
kind: "accessor",
|
|
45
45
|
name: "departureTime",
|
|
46
46
|
static: !1,
|
|
@@ -53,7 +53,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
metadata: e
|
|
56
|
-
},
|
|
56
|
+
}, O, k), t(this, null, A, {
|
|
57
57
|
kind: "accessor",
|
|
58
58
|
name: "arrivalTime",
|
|
59
59
|
static: !1,
|
|
@@ -66,7 +66,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
metadata: e
|
|
69
|
-
},
|
|
69
|
+
}, j, M), t(this, null, N, {
|
|
70
70
|
kind: "accessor",
|
|
71
71
|
name: "departureWalk",
|
|
72
72
|
static: !1,
|
|
@@ -79,7 +79,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
metadata: e
|
|
82
|
-
},
|
|
82
|
+
}, P, F), t(this, null, I, {
|
|
83
83
|
kind: "accessor",
|
|
84
84
|
name: "arrivalWalk",
|
|
85
85
|
static: !1,
|
|
@@ -92,7 +92,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
metadata: e
|
|
95
|
-
},
|
|
95
|
+
}, L, R), t(this, null, z, {
|
|
96
96
|
kind: "accessor",
|
|
97
97
|
name: "disableAnimation",
|
|
98
98
|
static: !1,
|
|
@@ -105,7 +105,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
metadata: e
|
|
108
|
-
},
|
|
108
|
+
}, B, V), t(this, null, H, {
|
|
109
109
|
kind: "accessor",
|
|
110
110
|
name: "a11yFootpath",
|
|
111
111
|
static: !1,
|
|
@@ -118,7 +118,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
metadata: e
|
|
121
|
-
},
|
|
121
|
+
}, U, W), t(this, null, G, {
|
|
122
122
|
kind: "setter",
|
|
123
123
|
name: "now",
|
|
124
124
|
static: !1,
|
|
@@ -130,7 +130,7 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
132
|
metadata: e
|
|
133
|
-
}, null,
|
|
133
|
+
}, null, C), e && Object.defineProperty(this, Symbol.metadata, {
|
|
134
134
|
enumerable: !0,
|
|
135
135
|
configurable: !0,
|
|
136
136
|
writable: !0,
|
|
@@ -141,10 +141,14 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
141
141
|
this.elementName = "sbb-pearl-chain-time";
|
|
142
142
|
}
|
|
143
143
|
static {
|
|
144
|
-
this.elementDependencies = [
|
|
144
|
+
this.elementDependencies = [f, b];
|
|
145
145
|
}
|
|
146
146
|
static {
|
|
147
|
-
this.styles = [
|
|
147
|
+
this.styles = [
|
|
148
|
+
a,
|
|
149
|
+
d,
|
|
150
|
+
h(x)
|
|
151
|
+
];
|
|
148
152
|
}
|
|
149
153
|
#e;
|
|
150
154
|
get legs() {
|
|
@@ -202,31 +206,31 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
202
206
|
return this._now ?? /* @__PURE__ */ new Date();
|
|
203
207
|
}
|
|
204
208
|
render() {
|
|
205
|
-
let t = this.departureTime ?
|
|
206
|
-
return
|
|
209
|
+
let t = this.departureTime ? y(this.departureTime) : void 0, n = this.arrivalTime ? y(this.arrivalTime) : void 0, { renderDepartureTimeAttribute: r, renderArrivalTimeAttribute: i } = _(this.legs, this.departureWalk || 0, this.arrivalWalk || 0, this._language.current, this.a11yFootpath), a = this.legs?.filter((e) => v(e));
|
|
210
|
+
return p`
|
|
207
211
|
<div class="sbb-pearl-chain__time">
|
|
208
212
|
${r()}
|
|
209
|
-
${t ?
|
|
213
|
+
${t ? p`<time class="sbb-pearl-chain__time-time" datetime=${this.departureTime}>
|
|
210
214
|
<span class="sbb-screen-reader-only"
|
|
211
215
|
>${l[this._language.current]}: </span
|
|
212
216
|
>
|
|
213
217
|
${e(t, "HH:mm")}
|
|
214
|
-
</time>` :
|
|
215
|
-
${a?.length > 1 ?
|
|
218
|
+
</time>` : m}
|
|
219
|
+
${a?.length > 1 ? p`<span class="sbb-screen-reader-only" role="paragraph">
|
|
216
220
|
${a?.length - 1} ${u[this._language.current]}
|
|
217
|
-
</span>` :
|
|
221
|
+
</span>` : m}
|
|
218
222
|
<sbb-pearl-chain
|
|
219
223
|
class="sbb-pearl-chain__time-chain"
|
|
220
224
|
.legs=${this.legs}
|
|
221
225
|
.disableAnimation=${this.disableAnimation}
|
|
222
226
|
.now=${this.now}
|
|
223
227
|
></sbb-pearl-chain>
|
|
224
|
-
${n ?
|
|
228
|
+
${n ? p`<time class="sbb-pearl-chain__time-time" datetime=${this.arrivalTime}>
|
|
225
229
|
<span class="sbb-screen-reader-only"
|
|
226
230
|
>${c[this._language.current]}: </span
|
|
227
231
|
>
|
|
228
232
|
${e(n, "HH:mm")}
|
|
229
|
-
</time>` :
|
|
233
|
+
</time>` : m}
|
|
230
234
|
${i()}
|
|
231
235
|
</div>
|
|
232
236
|
`;
|
|
@@ -234,4 +238,4 @@ var b = ":host{display:block;--sbb-pearl-chain-time-height: auto}@media(min-widt
|
|
|
234
238
|
};
|
|
235
239
|
})();
|
|
236
240
|
//#endregion
|
|
237
|
-
export {
|
|
241
|
+
export { S as t };
|
package/pearl-chain-time.js
CHANGED
package/pearl-chain-time.pure.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./pearl-chain-time.component-
|
|
1
|
+
import { t as e } from "./pearl-chain-time.component-DGilJDFx.js";
|
|
2
2
|
export { e as SbbPearlChainTimeElement };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { t as e } from "./toDate-p-Tpkb7t.js";
|
|
2
2
|
import { r as t, t as n } from "./differenceInMinutes-Dr9gRqtu.js";
|
|
3
3
|
import { __esDecorate as r, __runInitializers as i } from "tslib";
|
|
4
|
-
import { SbbElement as a, boxSizingStyles as o, defaultDateAdapter as s, forceType as c } from "@sbb-esta/lyne-elements/core.js";
|
|
5
|
-
import { html as
|
|
6
|
-
import { property as
|
|
7
|
-
import { isRideLeg as
|
|
8
|
-
import { styleMap as
|
|
4
|
+
import { SbbElement as a, boxSizingStyles as o, defaultDateAdapter as s, forceType as c, screenReaderOnlyStyles as l } from "@sbb-esta/lyne-elements/core.js";
|
|
5
|
+
import { html as u, nothing as d, unsafeCSS as f } from "lit";
|
|
6
|
+
import { property as p } from "lit/decorators.js";
|
|
7
|
+
import { isRideLeg as m, removeTimezoneFromISOTimeString as h } from "./core.js";
|
|
8
|
+
import { styleMap as g } from "lit/directives/style-map.js";
|
|
9
9
|
//#region node_modules/date-fns/isAfter.js
|
|
10
|
-
function
|
|
10
|
+
function _(t, n) {
|
|
11
11
|
return +e(t) > +e(n);
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region node_modules/date-fns/isBefore.js
|
|
15
|
-
function
|
|
15
|
+
function v(t, n) {
|
|
16
16
|
return +e(t) < +e(n);
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/elements-experimental/pearl-chain/pearl-chain.scss?inline
|
|
20
|
-
var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small: .125rem;--sbb-pearl-chain-color: var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-color-past: var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-leg-width: 100%;display:block;--sbb-pearl-chain-position-color: var(--sbb-color-primary);--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-background-color-3-inverted);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-past: light-dark(var(--sbb-color-metal), var(--sbb-color-granite));--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: light-dark( var(--sbb-color-metal), var(--sbb-color-granite) );--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-error);--sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-2x);--sbb-pearl-chain-bullet-animation-duration: 1.92s;--sbb-pearl-chain-bullet-animation-easing: ease-out;--sbb-pearl-chain-bullet-crossed-width: .88375rem;--sbb-pearl-chain-bullet-crossed-height: .21875rem;--sbb-pearl-chain-bullet-crossed-border-width: .09375rem}.sbb-pearl-chain{position:relative;display:flex;justify-content:space-between;flex-wrap:nowrap;color:var(--sbb-pearl-chain-color);width:100%;padding-block:calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);padding-inline-end:var(--sbb-pearl-chain-bullet-size-start-end)}.sbb-pearl-chain__bullet{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__bullet{content:\"\";position:absolute;background-color:currentcolor;inset-block-start:0;z-index:3}.sbb-pearl-chain__bullet:first-of-type{inset-inline-start:0}.sbb-pearl-chain__bullet:last-of-type{inset-inline-end:0}.sbb-pearl-chain__leg{flex-shrink:0;flex-grow:0;position:relative;height:var(--sbb-pearl-chain-height);border-inline-end:var(--sbb-pearl-chain-spacing-small) solid Canvas;background-color:currentcolor;width:var(--sbb-pearl-chain-leg-width);display:flex;align-items:center}@media(forced-colors:active){.sbb-pearl-chain__leg{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type{border:none}.sbb-pearl-chain__stop{position:relative;z-index:2;background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__stop{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__bullet--future{background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__bullet--future{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{color:var(--sbb-pearl-chain-color-past);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{--sbb-pearl-chain-bullet-color: GrayText !important}}@media(forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{background-color:GrayText!important}}.sbb-pearl-chain__bullet--progress{background:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__bullet--progress{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:var(--sbb-pearl-chain-color-disruption);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{--sbb-pearl-chain-bullet-color: Highlight}}@media(forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:Highlight;background:Highlight}}.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: Highlight}}.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__leg--disruption:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media(forced-colors:active){.sbb-pearl-chain__leg--disruption:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__leg--skipped{color:var(--sbb-pearl-chain-color-disruption)}.sbb-pearl-chain__leg--skipped:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media(forced-colors:active){.sbb-pearl-chain__leg--skipped:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__stop--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__stop--departure-skipped:before{content:\"\";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media(forced-colors:active){.sbb-pearl-chain__stop--departure-skipped:before{background:Highlight}}.sbb-pearl-chain--arrival-skipped,.sbb-pearl-chain--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{content:\"\";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media(forced-colors:active){.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{background:Highlight}}.sbb-pearl-chain__leg:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;background-color:currentcolor;border-radius:var(--sbb-pearl-chain-height);z-index:1}@media(forced-colors:active){.sbb-pearl-chain__leg:after{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg:after{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type:after{inset-inline-end:calc(-1 * var(--sbb-pearl-chain-height))}.sbb-pearl-chain__leg--progress:after{background-color:var(--sbb-pearl-chain-color-past);width:var(--sbb-pearl-chain-leg-status)}.sbb-pearl-chain__position{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-position-color)}@media(forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-position-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}50%{box-shadow:0 0 0 .1875rem color-mix(in srgb,var(--sbb-pearl-chain-position-color) 20%,transparent)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}}.sbb-pearl-chain__position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite;position:absolute;inset-block-start:-200%;z-index:4;inset-inline-start:var(--sbb-pearl-chain-status-position)}.sbb-pearl-chain__position--no-animation{animation:unset}.sbb-screen-reader-only{border:0;clip-path:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}", y = (() => {
|
|
21
|
-
let e = a,
|
|
20
|
+
var y = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-chain-spacing-small: .125rem;--sbb-pearl-chain-color: var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-color-disruption: var(--sbb-pearl-chain-bullet-color-disruption);--sbb-pearl-chain-color-past: var(--sbb-pearl-chain-bullet-color-past);--sbb-pearl-chain-leg-width: 100%;display:block;--sbb-pearl-chain-position-color: var(--sbb-color-primary);--sbb-pearl-chain-bullet-size-start-end: .625rem;--sbb-pearl-chain-bullet-size-stop: .5rem;--sbb-pearl-chain-bullet-color: var(--sbb-background-color-3-inverted);--sbb-pearl-chain-bullet-color-past: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-past: light-dark(var(--sbb-color-metal), var(--sbb-color-granite));--sbb-pearl-chain-bullet-color-irrelevant: var(--sbb-color-metal);--sbb-pearl-chain-bullet-color-irrelevant: light-dark( var(--sbb-color-metal), var(--sbb-color-granite) );--sbb-pearl-chain-bullet-color-disruption: var(--sbb-color-error);--sbb-pearl-chain-bullet-border-width: var(--sbb-border-width-2x);--sbb-pearl-chain-bullet-animation-duration: 1.92s;--sbb-pearl-chain-bullet-animation-easing: ease-out;--sbb-pearl-chain-bullet-crossed-width: .88375rem;--sbb-pearl-chain-bullet-crossed-height: .21875rem;--sbb-pearl-chain-bullet-crossed-border-width: .09375rem}.sbb-pearl-chain{position:relative;display:flex;justify-content:space-between;flex-wrap:nowrap;color:var(--sbb-pearl-chain-color);width:100%;padding-block:calc((var(--sbb-pearl-chain-bullet-size-start-end) - var(--sbb-pearl-chain-height)) / 2);padding-inline-end:var(--sbb-pearl-chain-bullet-size-start-end)}.sbb-pearl-chain__bullet{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__bullet{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__bullet{content:\"\";position:absolute;background-color:currentcolor;inset-block-start:0;z-index:3}.sbb-pearl-chain__bullet:first-of-type{inset-inline-start:0}.sbb-pearl-chain__bullet:last-of-type{inset-inline-end:0}.sbb-pearl-chain__leg{flex-shrink:0;flex-grow:0;position:relative;height:var(--sbb-pearl-chain-height);border-inline-end:var(--sbb-pearl-chain-spacing-small) solid Canvas;background-color:currentcolor;width:var(--sbb-pearl-chain-leg-width);display:flex;align-items:center}@media(forced-colors:active){.sbb-pearl-chain__leg{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type{border:none}.sbb-pearl-chain__stop{position:relative;z-index:2;background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__stop{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__bullet--future{background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__bullet--future{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{color:var(--sbb-pearl-chain-color-past);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{--sbb-pearl-chain-bullet-color: GrayText !important}}@media(forced-colors:active){.sbb-pearl-chain__leg--past,.sbb-pearl-chain--past,.sbb-pearl-chain__leg--past:after,.sbb-pearl-chain__leg--progress:after,.sbb-pearl-chain__leg--progress .sbb-pearl-chain__stop,.sbb-pearl-chain--progress,.sbb-pearl-chain__bullet--past{background-color:GrayText!important}}.sbb-pearl-chain__bullet--progress{background:var(--sbb-pearl-chain-bullet-color);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__bullet--progress{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:var(--sbb-pearl-chain-color-disruption);--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{--sbb-pearl-chain-bullet-color: Highlight}}@media(forced-colors:active){.sbb-pearl-chain__bullet--departure-disruption,.sbb-pearl-chain--arrival-disruption,.sbb-pearl-chain--departure-disruption,.sbb-pearl-chain__leg--disruption{color:Highlight;background:Highlight}}.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-disruption)}@media(forced-colors:active){.sbb-pearl-chain__leg--disruption .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: Highlight}}.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-bullet-color-past)}@media(forced-colors:active){.sbb-pearl-chain__leg--past .sbb-pearl-chain__stop{--sbb-pearl-chain-bullet-color: GrayText !important}}.sbb-pearl-chain__leg--disruption:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media(forced-colors:active){.sbb-pearl-chain__leg--disruption:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__leg--skipped{color:var(--sbb-pearl-chain-color-disruption)}.sbb-pearl-chain__leg--skipped:after{background-color:unset;background-image:linear-gradient(to right,currentcolor 0%,currentcolor 50%,Canvas 50%);background-repeat:repeat-x;background-size:calc(2 * var(--sbb-pearl-chain-spacing-small)) var(--sbb-pearl-chain-height);inset-inline-end:var(--sbb-pearl-chain-height)}@media(forced-colors:active){.sbb-pearl-chain__leg--skipped:after{background:unset;border-block-start:.0625rem dashed Highlight;transform:translateY(.0625rem)}}.sbb-pearl-chain__stop--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-stop);min-width:var(--sbb-pearl-chain-bullet-size-stop);height:var(--sbb-pearl-chain-bullet-size-stop);width:var(--sbb-pearl-chain-bullet-size-stop);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain__stop--departure-skipped:before{content:\"\";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media(forced-colors:active){.sbb-pearl-chain__stop--departure-skipped:before{background:Highlight}}.sbb-pearl-chain--arrival-skipped,.sbb-pearl-chain--departure-skipped{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);border:var(--sbb-pearl-chain-bullet-border-width) solid currentcolor;background:Canvas}.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{content:\"\";position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%) rotate(45deg);border-block-start:var(--sbb-pearl-chain-bullet-crossed-border-width) solid canvas;background:var(--sbb-pearl-chain-bullet-color-disruption);height:var(--sbb-pearl-chain-bullet-crossed-height);width:var(--sbb-pearl-chain-bullet-crossed-width)}@media(forced-colors:active){.sbb-pearl-chain--arrival-skipped:before,.sbb-pearl-chain--departure-skipped:before{background:Highlight}}.sbb-pearl-chain__leg:after{content:\"\";position:absolute;inset-block:0;inset-inline-start:0;background-color:currentcolor;border-radius:var(--sbb-pearl-chain-height);z-index:1}@media(forced-colors:active){.sbb-pearl-chain__leg:after{background-color:CanvasText}.sbb-pearl-chain--past .sbb-pearl-chain__leg:after{background-color:GrayText}}.sbb-pearl-chain__leg:last-of-type:after{inset-inline-end:calc(-1 * var(--sbb-pearl-chain-height))}.sbb-pearl-chain__leg--progress:after{background-color:var(--sbb-pearl-chain-color-past);width:var(--sbb-pearl-chain-leg-status)}.sbb-pearl-chain__position{min-height:var(--sbb-pearl-chain-bullet-size-start-end);min-width:var(--sbb-pearl-chain-bullet-size-start-end);height:var(--sbb-pearl-chain-bullet-size-start-end);width:var(--sbb-pearl-chain-bullet-size-start-end);background:var(--sbb-pearl-chain-bullet-color);color:var(--sbb-pearl-chain-bullet-color);border-color:var(--sbb-pearl-chain-bullet-color);border-radius:100%}@media(forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: CanvasText}}.sbb-pearl-chain__position{--sbb-pearl-chain-bullet-color: var(--sbb-pearl-chain-position-color)}@media(forced-colors:active){.sbb-pearl-chain__position{--sbb-pearl-chain-position-color: Highlight}}@keyframes pearl-chain-bullet-position-pulse{0%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}25%{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}50%{box-shadow:0 0 0 .1875rem color-mix(in srgb,var(--sbb-pearl-chain-position-color) 20%,transparent)}to{box-shadow:0 0 0 0 var(--sbb-pearl-chain-position-color)}}.sbb-pearl-chain__position{animation:pearl-chain-bullet-position-pulse var(--sbb-pearl-chain-bullet-animation-duration) var(--sbb-pearl-chain-bullet-animation-easing) infinite;position:absolute;inset-block-start:-200%;z-index:4;inset-inline-start:var(--sbb-pearl-chain-status-position)}.sbb-pearl-chain__position--no-animation{animation:unset}", b = (() => {
|
|
21
|
+
let e = a, b = [], x, S = [], C = [], w, T = [], E = [], D;
|
|
22
22
|
return class extends e {
|
|
23
23
|
constructor() {
|
|
24
|
-
super(...arguments), this.#e = (i(this,
|
|
24
|
+
super(...arguments), this.#e = (i(this, b), i(this, S, [])), this.#t = (i(this, C), i(this, T, !1)), this._now = (i(this, E), null);
|
|
25
25
|
}
|
|
26
26
|
static {
|
|
27
27
|
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(e[Symbol.metadata] ?? null) : void 0;
|
|
28
|
-
|
|
28
|
+
x = [p({ type: Array })], w = [c(), p({
|
|
29
29
|
attribute: "disable-animation",
|
|
30
30
|
type: Boolean
|
|
31
|
-
})],
|
|
31
|
+
})], D = [p()], r(this, null, x, {
|
|
32
32
|
kind: "accessor",
|
|
33
33
|
name: "legs",
|
|
34
34
|
static: !1,
|
|
@@ -41,7 +41,7 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
metadata: t
|
|
44
|
-
},
|
|
44
|
+
}, S, C), r(this, null, w, {
|
|
45
45
|
kind: "accessor",
|
|
46
46
|
name: "disableAnimation",
|
|
47
47
|
static: !1,
|
|
@@ -54,7 +54,7 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
metadata: t
|
|
57
|
-
},
|
|
57
|
+
}, T, E), r(this, null, D, {
|
|
58
58
|
kind: "setter",
|
|
59
59
|
name: "now",
|
|
60
60
|
static: !1,
|
|
@@ -66,7 +66,7 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
metadata: t
|
|
69
|
-
}, null,
|
|
69
|
+
}, null, b), t && Object.defineProperty(this, Symbol.metadata, {
|
|
70
70
|
enumerable: !0,
|
|
71
71
|
configurable: !0,
|
|
72
72
|
writable: !0,
|
|
@@ -77,7 +77,11 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
77
77
|
this.elementName = "sbb-pearl-chain";
|
|
78
78
|
}
|
|
79
79
|
static {
|
|
80
|
-
this.styles = [
|
|
80
|
+
this.styles = [
|
|
81
|
+
o,
|
|
82
|
+
l,
|
|
83
|
+
f(y)
|
|
84
|
+
];
|
|
81
85
|
}
|
|
82
86
|
#e;
|
|
83
87
|
get legs() {
|
|
@@ -101,17 +105,17 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
101
105
|
}
|
|
102
106
|
_getAllDuration(e) {
|
|
103
107
|
return e?.reduce((e, t) => {
|
|
104
|
-
let r =
|
|
105
|
-
return r && i ? e + n(
|
|
108
|
+
let r = h(t.arrival?.time), i = h(t.departure?.time);
|
|
109
|
+
return r && i ? e + n(h(t.arrival.time), h(t.departure.time)) : e;
|
|
106
110
|
}, 0);
|
|
107
111
|
}
|
|
108
112
|
_isAllCancelled(e) {
|
|
109
113
|
return e?.every((e) => e?.serviceJourney?.serviceAlteration?.cancelled);
|
|
110
114
|
}
|
|
111
115
|
_getRelativeDuration(e, t) {
|
|
112
|
-
let r =
|
|
116
|
+
let r = h(t.arrival?.time), i = h(t.departure?.time);
|
|
113
117
|
if (r && i) {
|
|
114
|
-
let r = n(
|
|
118
|
+
let r = n(h(t.arrival.time), h(t.departure.time)), i = this._getAllDuration(e);
|
|
115
119
|
return i === 0 ? 100 : r / i * 100;
|
|
116
120
|
}
|
|
117
121
|
return 0;
|
|
@@ -123,7 +127,7 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
123
127
|
}
|
|
124
128
|
_getStatus(e, n, r) {
|
|
125
129
|
let i = n && n.time && t(n.time, n.delay ?? 0), a = r && r.time && t(r.time, r.delay ?? 0);
|
|
126
|
-
return i &&
|
|
130
|
+
return i && v(i, e) && a && _(a, e) ? "progress" : a && v(a, e) ? "past" : "future";
|
|
127
131
|
}
|
|
128
132
|
_renderPosition(e, t, n) {
|
|
129
133
|
let r = this._getProgress(e, t, n);
|
|
@@ -132,54 +136,54 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
132
136
|
"--sbb-pearl-chain-status-position": `${r}%`,
|
|
133
137
|
...r >= 50 ? { transform: "translateX(-100%)" } : {}
|
|
134
138
|
}), a = this.disableAnimation ? "sbb-pearl-chain__position--no-animation" : "";
|
|
135
|
-
return
|
|
136
|
-
style=${
|
|
139
|
+
return u`<span
|
|
140
|
+
style=${g(i())}
|
|
137
141
|
class="sbb-pearl-chain__position ${a}"
|
|
138
142
|
></span>`;
|
|
139
143
|
}
|
|
140
144
|
render() {
|
|
141
|
-
let e = this.now ?? /* @__PURE__ */ new Date(), t = this.legs?.filter((e) =>
|
|
145
|
+
let e = this.now ?? /* @__PURE__ */ new Date(), t = this.legs?.filter((e) => m(e)), n = t?.length && h(t[0]?.departure?.time), r = n && {
|
|
142
146
|
time: n,
|
|
143
147
|
delay: t[0].departure.delay ?? 0
|
|
144
|
-
}, i = t?.length &&
|
|
148
|
+
}, i = t?.length && h(t[t.length - 1].arrival?.time), a = i && {
|
|
145
149
|
time: i,
|
|
146
150
|
delay: t[t.length - 1]?.arrival.delay ?? 0
|
|
147
151
|
}, o = t && t[0]?.serviceJourney?.stopPoints && t[0]?.serviceJourney?.stopPoints[0].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--departure-skipped" : "", s = (() => {
|
|
148
152
|
let e = t && t[t.length - 1], n = e && e.serviceJourney?.stopPoints;
|
|
149
153
|
return n && n[n.length - 1].stopStatus === "NOT_SERVICED" ? "sbb-pearl-chain--arrival-skipped" : "";
|
|
150
|
-
})(), c = t && t[0]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--departure-disruption" : "",
|
|
151
|
-
return this._isAllCancelled(t) ?
|
|
154
|
+
})(), c = t && t[0]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--departure-disruption" : "", l = t && t[t.length - 1]?.serviceJourney?.serviceAlteration?.cancelled ? "sbb-pearl-chain--arrival-disruption" : "", f = r && a && this._getStatus(e, r, a), p = t && f && !c ? "sbb-pearl-chain__bullet--" + f : "", _ = t && f && !l ? "sbb-pearl-chain__bullet--" + this._getStatus(e, void 0, a) : "";
|
|
155
|
+
return this._isAllCancelled(t) ? u`
|
|
152
156
|
<div class="sbb-pearl-chain">
|
|
153
157
|
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
154
158
|
<div class="sbb-pearl-chain__leg sbb-pearl-chain__leg--disruption"></div>
|
|
155
159
|
<span class="sbb-pearl-chain__bullet sbb-pearl-chain--departure-disruption"></span>
|
|
156
160
|
</div>
|
|
157
|
-
` :
|
|
161
|
+
` : u`
|
|
158
162
|
<div class="sbb-pearl-chain">
|
|
159
163
|
<span
|
|
160
|
-
class="sbb-pearl-chain__bullet ${
|
|
164
|
+
class="sbb-pearl-chain__bullet ${p} ${o} ${c}"
|
|
161
165
|
></span>
|
|
162
166
|
${t?.map((n, r) => {
|
|
163
|
-
let { stopPoints: i, serviceAlteration: a } = n?.serviceJourney || {}, o = this._getRelativeDuration(t, n), s =
|
|
167
|
+
let { stopPoints: i, serviceAlteration: a } = n?.serviceJourney || {}, o = this._getRelativeDuration(t, n), s = h(n.departure?.time), c = h(n.arrival?.time), l = i && i[i.length - 1]?.stopStatus === "NOT_SERVICED", f = i && i[i.length - 1]?.stopStatus === "PLANNED", p = i && i[0]?.stopStatus === "NOT_SERVICED", m = r > 0 && t[r - 1].serviceJourney.stopPoints, _ = m && m[m.length - 1]?.stopStatus === "NOT_SERVICED", v = l || p && f ? "sbb-pearl-chain__leg--skipped" : "", y = p || _ ? "sbb-pearl-chain__stop--departure-skipped" : "", b = a?.cancelled || a?.partiallyCancelled ? "sbb-pearl-chain__leg--disruption" : "", x = {
|
|
164
168
|
time: s,
|
|
165
169
|
delay: n.departure?.delay ?? 0
|
|
166
170
|
}, S = {
|
|
167
171
|
time: c,
|
|
168
172
|
delay: n.arrival?.delay ?? 0
|
|
169
173
|
}, C = this._getStatus(e, x, S);
|
|
170
|
-
return
|
|
174
|
+
return u` <div
|
|
171
175
|
class="sbb-pearl-chain__leg ${!b && !v && "sbb-pearl-chain__leg--" + C || ""} ${b} ${v}"
|
|
172
|
-
style=${
|
|
176
|
+
style=${g({
|
|
173
177
|
"--sbb-pearl-chain-leg-width": `${o}%`,
|
|
174
178
|
...C === "progress" && !b && !v ? { "--sbb-pearl-chain-leg-status": `${this._getProgress(e, x, S)}%` } : {}
|
|
175
179
|
})}
|
|
176
180
|
>
|
|
177
|
-
${r > 0 && r < t.length ?
|
|
178
|
-
${C === "progress" && !b && !v ? this._renderPosition(e, x, S) :
|
|
181
|
+
${r > 0 && r < t.length ? u`<span class="sbb-pearl-chain__stop ${y}"></span>` : d}
|
|
182
|
+
${C === "progress" && !b && !v ? this._renderPosition(e, x, S) : d}
|
|
179
183
|
</div>`;
|
|
180
184
|
})}
|
|
181
185
|
<span
|
|
182
|
-
class="sbb-pearl-chain__bullet ${_} ${s} ${
|
|
186
|
+
class="sbb-pearl-chain__bullet ${_} ${s} ${l}"
|
|
183
187
|
></span>
|
|
184
188
|
</div>
|
|
185
189
|
`;
|
|
@@ -187,4 +191,4 @@ var v = ":host{--sbb-pearl-chain-height: var(--sbb-border-width-2x);--sbb-pearl-
|
|
|
187
191
|
};
|
|
188
192
|
})();
|
|
189
193
|
//#endregion
|
|
190
|
-
export {
|
|
194
|
+
export { b as t };
|
package/pearl-chain.js
CHANGED
package/pearl-chain.pure.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./pearl-chain.component-
|
|
1
|
+
import { t as e } from "./pearl-chain.component-D7Dz_ruc.js";
|
|
2
2
|
export { e as SbbPearlChainElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation.component-80NgYHsf.js";
|
|
2
2
|
export { e as SbbSeatReservationElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-navigation-coach.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-navigation-coach.component-cYSUjsBj.js";
|
|
2
2
|
export { e as SbbSeatReservationNavigationCoachElement };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-navigation-services.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-navigation-services.component-BSeCIGnn.js";
|
|
2
2
|
export { e as SbbSeatReservationNavigationServicesElement };
|
package/seat-reservation/seat-reservation-place-control/seat-reservation-place-control.component.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../seat-reservation-place-control.component-
|
|
1
|
+
import { t as e } from "../../seat-reservation-place-control.component-DOEKL6FP.js";
|
|
2
2
|
export { e as SbbSeatReservationPlaceControlElement };
|