@sbb-esta/lyne-elements-dev 5.0.0-next.1-dev.1777358786 → 5.0.0-next.1-dev.1777393579
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/core/i18n/i18n.js +103 -98
- package/core/styles/core.scss +15 -38
- package/core.css +57 -31
- package/core.js +22 -22
- package/custom-elements.json +6013 -2585
- package/development/core/i18n/i18n.d.ts +1 -0
- package/development/core/i18n/i18n.d.ts.map +1 -1
- package/development/core/i18n/i18n.js +8 -2
- package/development/core.js +2 -2
- package/development/train/train/train.component.d.ts +2 -5
- package/development/train/train/train.component.d.ts.map +1 -1
- package/development/train/train/train.component.js +1 -1
- package/development/train/train-blocked-passage/train-blocked-passage.component.d.ts +4 -3
- package/development/train/train-blocked-passage/train-blocked-passage.component.d.ts.map +1 -1
- package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/development/train/train-formation/train-formation.component.d.ts +6 -2
- package/development/train/train-formation/train-formation.component.d.ts.map +1 -1
- package/development/train/train-formation/train-formation.component.js +1 -1
- package/development/train/train-formation-orientation-mixin.d.ts +12 -0
- package/development/train/train-formation-orientation-mixin.d.ts.map +1 -0
- package/development/train/train-formation-orientation-mixin.js +62 -0
- package/development/train/train-wagon/train-wagon.component.d.ts +5 -32
- package/development/train/train-wagon/train-wagon.component.d.ts.map +1 -1
- package/development/train/train-wagon/train-wagon.component.js +19 -1
- package/development/train/train-wagon-button/train-wagon-button.component.d.ts +18 -0
- package/development/train/train-wagon-button/train-wagon-button.component.d.ts.map +1 -0
- package/development/train/train-wagon-button/train-wagon-button.component.js +18 -0
- package/development/train/train-wagon-common.d.ts +15 -0
- package/development/train/train-wagon-common.d.ts.map +1 -0
- package/development/train/train-wagon-common.js +2 -0
- package/development/train/train-wagon-link/train-wagon-link.component.d.ts +18 -0
- package/development/train/train-wagon-link/train-wagon-link.component.d.ts.map +1 -0
- package/development/train/train-wagon-link/train-wagon-link.component.js +18 -0
- package/development/train-blocked-passage.component-BgBnEOfh.js +22 -0
- package/development/train-formation.component-CDKR5KCm.js +194 -0
- package/development/train-wagon-common-S3OJdguG.js +441 -0
- package/development/train.component-CP9QaQk8.js +239 -0
- package/development/train.d.ts.map +1 -1
- package/development/train.js +13 -7
- package/development/train.pure.d.ts +4 -0
- package/development/train.pure.d.ts.map +1 -1
- package/development/train.pure.js +9 -5
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/off-brand-theme.css +57 -31
- package/package.json +2 -2
- package/safety-theme.css +57 -31
- package/standard-theme.css +57 -31
- package/train/train/train.component.js +1 -1
- package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/train/train-formation/train-formation.component.js +1 -1
- package/train/train-formation-orientation-mixin.js +45 -0
- package/train/train-wagon/train-wagon.component.js +13 -2
- package/train/train-wagon-button/train-wagon-button.component.js +10 -0
- package/train/train-wagon-common.js +2 -0
- package/train/train-wagon-link/train-wagon-link.component.js +10 -0
- package/train-blocked-passage.component-voZ8fxiB.js +14 -0
- package/train-formation.component-6XQVXPue.js +147 -0
- package/train-wagon-common-DTN_G78z.js +354 -0
- package/train.component-3vmLxVCZ.js +181 -0
- package/train.js +10 -6
- package/train.pure.js +9 -5
- package/development/train-blocked-passage.component-Bh2dR1gn.js +0 -30
- package/development/train-formation.component-Dm0t9N_h.js +0 -149
- package/development/train-wagon.component-B6V4dPKn.js +0 -334
- package/development/train.component-BvbNBkZF.js +0 -229
- package/train-blocked-passage.component-DIh8dbU9.js +0 -22
- package/train-formation.component-DS4EDwPY.js +0 -117
- package/train-wagon.component-LwKwwuta.js +0 -257
- package/train.component-DuFi_iBX.js +0 -174
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { SbbTrainFormationOrientationMixin as e } from "./train/train-formation-orientation-mixin.js";
|
|
2
|
+
import { __esDecorate as t, __runInitializers as n } from "tslib";
|
|
3
|
+
import { isServer as r, nothing as i, unsafeCSS as a } from "lit";
|
|
4
|
+
import { property as o, state as s } from "lit/decorators.js";
|
|
5
|
+
import { SbbLanguageController as c, SbbNamedSlotListMixin as l, SbbPropertyWatcherController as ee, boxSizingStyles as te, forceType as u, handleDistinctChange as d, i18nAdditionalWagonInformationHeading as f, i18nAnd as p, i18nBlockedPassage as m, i18nClass as h, i18nClosedCompartmentLabel as g, i18nCouchetteWagonLabel as _, i18nLocomotiveLabel as v, i18nRestaurantWagonLabel as ne, i18nSector as re, i18nSleepingWagonLabel as ie, i18nWagonLabel as ae, i18nWagonLabelNumber as oe, omitEmptyConverter as y } from "./core.js";
|
|
6
|
+
import { html as b } from "lit/static-html.js";
|
|
7
|
+
import { SbbDividerElement as x } from "./divider.pure.js";
|
|
8
|
+
import { SbbIconElement as S } from "./icon.pure.js";
|
|
9
|
+
import { SbbTimetableOccupancyIconElement as C } from "./timetable-occupancy-icon.pure.js";
|
|
10
|
+
import { when as w } from "lit/directives/when.js";
|
|
11
|
+
//#region src/elements/train/train-wagon-common.scss?inline
|
|
12
|
+
var T = ":host{--sbb-train-wagon-transition-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );display:block;font-size:var(--sbb-train-wagon-font-size);letter-spacing:var(--sbb-typo-letter-spacing-text);outline:none!important}:host([wagon-type=closed]){--sbb-train-wagon-crossed-shape-display: block}@media(forced-colors:active){:host([wagon-type=closed]){--sbb-train-wagon-shape-color: GrayText}}:host(:is(:state(view-side),[state--view-side])[wagon-type=wagon-end-left]){--sbb-train-wagon-padding-inline: var(--sbb-spacing-fixed-4x) var(--sbb-spacing-fixed-3x)}:host(:is(:state(view-side),[state--view-side])[wagon-type=wagon-end-right]){--sbb-train-wagon-padding-inline: var(--sbb-spacing-fixed-3x) var(--sbb-spacing-fixed-4x)}:host(:is(:state(view-side),[state--view-side])[wagon-type=locomotive]){--sbb-train-wagon-padding-inline: var(--sbb-spacing-fixed-4x)}:host(:is(:state(view-top),[state--view-top])){--sbb-train-wagon-border-radius: var(--sbb-border-radius-4x)}:host([label]){--_sbb-train-wagon-attributes-max-width: var(--sbb-train-wagon-attributes-max-width)}:host(:not([label])){--_sbb-train-wagon-attributes-justify-content: center}:host(.sbb-active){--sbb-train-wagon-border-width: var(--sbb-border-width-3x)}:host(:is(:state(action),[state--action])){cursor:var(--sbb-cursor-pointer)}@media(forced-colors:active){:host(:is(:state(link),[state--link])){--sbb-train-wagon-shape-color: LinkText}}.sbb-train-wagon-link{outline:none;color:inherit;text-decoration:none}.sbb-train-wagon{display:flex;flex-direction:var(--_sbb-train-formation-flex-direction-inverted);align-items:center;width:var(--_sbb-train-formation-wagon-width);gap:var(--sbb-train-wagon-vertical-gap);position:relative}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon{width:auto;height:var(--_sbb-train-formation-wagon-height)}.sbb-train-wagon:before{content:\"\";position:absolute;width:var(--_sbb-train-formation-wagon-width);height:var(--_sbb-train-formation-wagon-height);border-radius:var(--sbb-train-wagon-border-radius)}:host(:is(:state(button),[state--button]):focus-visible) .sbb-train-wagon:before,.sbb-train-wagon-link:focus-visible .sbb-train-wagon:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}.sbb-train-wagon__compartment{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;flex-direction:var(--_sbb-train-formation-flex-direction);justify-content:center;padding-inline:var(--sbb-train-wagon-padding-inline);-webkit-mask-image:var(--_sbb-train-wagon-clip-shape-compartment);mask-image:var(--_sbb-train-wagon-clip-shape-compartment);transition:background-color var(--sbb-train-wagon-transition-duration) var(--sbb-animation-easing)}@media(any-hover:hover){:host(:is(:state(action),[state--action]):hover) .sbb-train-wagon__compartment{background-color:var(--sbb-train-wagon-background-color-hover)}}:host(:is(:state(action),[state--action]):is(:active,:is(:state(active),[state--active]))) .sbb-train-wagon__compartment{background-color:var(--sbb-train-wagon-background-color-active)}.sbb-train-wagon__compartment:has(.sbb-train-wagon__occupancy):has(.sbb-train-wagon__class){justify-content:space-between}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__compartment{padding-inline:0;padding-block:var(--sbb-train-wagon-padding-inline)}.sbb-train-wagon__compartment,.sbb-train-wagon__main-icon{width:var(--_sbb-train-formation-wagon-width);height:var(--_sbb-train-formation-wagon-height)}.sbb-train-wagon__shape{position:absolute;inset:0;width:var(--sbb-train-formation-wagon-dimension-long);height:var(--sbb-train-formation-wagon-dimension-short);transform-origin:0 0;will-change:transform}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__shape{rotate:-90deg;transform:scaleX(-1)}.sbb-train-wagon__shape{-webkit-mask-image:var(--_sbb-train-wagon-clip-shape);mask-image:var(--_sbb-train-wagon-clip-shape);pointer-events:none;fill:none;stroke:var(--sbb-train-wagon-shape-color);stroke-width:calc(var(--sbb-train-wagon-border-width) * 2)}.sbb-train-wagon__main-icon{--sbb-icon-svg-height: var(--sbb-train-wagon-main-icon-height);position:absolute;inset:0;display:flex;justify-content:center;align-items:center}.sbb-train-wagon__shape-closed{display:var(--sbb-train-wagon-crossed-shape-display, none);stroke-width:var(--sbb-border-width-1x)}.sbb-train-wagon__occupancy,.sbb-train-wagon__class{height:var(--_sbb-train-formation-wagon-height);flex-direction:var(--_sbb-train-formation-flex-direction);display:flex;align-items:center;justify-content:center}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__occupancy,:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__class{height:auto;width:var(--_sbb-train-formation-wagon-width)}.sbb-train-wagon__occupancy{--sbb-icon-svg-height: var(--sbb-train-wagon-occupancy-height);grid-area:occupancy}.sbb-train-wagon__class{gap:.0625rem;order:1}.sbb-train-wagon__class-entry{display:flex;align-items:center;justify-content:center;width:var(--sbb-train-wagon-class-dimension);height:var(--sbb-train-wagon-class-dimension);border:var(--sbb-train-wagon-class-border);background-color:var(--sbb-train-wagon-class-background-color);border-radius:var(--sbb-train-wagon-class-border-radius);font-weight:var(--sbb-train-wagon-class-font-weight);color:var(--sbb-train-wagon-class-color);position:relative;line-height:1}.sbb-train-wagon__class-entry.first:before{content:\"\";position:absolute;background-color:var(--sbb-train-wagon-class-first-color);border-end-end-radius:var(--sbb-train-wagon-class-first-border-radius)}:host(:not(:is(:state(orientation-vertical),[state--orientation-vertical]))) .sbb-train-wagon__class-entry.first:before{height:var(--sbb-train-wagon-class-first-thickness);width:var(--sbb-train-wagon-class-dimension);inset:calc(-.5 * (var(--_sbb-train-formation-wagon-height) - var(--sbb-train-wagon-class-dimension)) + var(--sbb-train-wagon-border-width) - var(--sbb-train-wagon-class-border-width)) 0 auto calc(-1 * var(--sbb-train-wagon-class-border-width));border-end-start-radius:var(--sbb-train-wagon-class-first-border-radius)}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__class-entry.first:before{width:var(--sbb-train-wagon-class-first-thickness);height:var(--sbb-train-wagon-class-dimension);inset:calc(-1 * var(--sbb-train-wagon-class-border-width)) auto 0 calc(-.5 * (var(--_sbb-train-formation-wagon-width) - var(--sbb-train-wagon-class-dimension)) + var(--sbb-train-wagon-border-width) - var(--sbb-train-wagon-class-border-width));border-start-end-radius:var(--sbb-train-wagon-class-first-border-radius)}.sbb-train-wagon__information-wrapper{display:flex;align-items:start;flex-direction:var(--_sbb-train-formation-flex-direction);gap:var(--sbb-train-wagon-information-gap)}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__information-wrapper{min-width:var(--sbb-train-wagon-information-min-width)}.sbb-train-wagon__information-wrapper[hidden]{display:none}:is(.sbb-train-wagon__label,.sbb-train-wagon__label-divider){margin-block-start:calc(.5 * (1em * var(--sbb-typo-line-height-text) - var(--sbb-train-wagon-font-size)))}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) :is(.sbb-train-wagon__label,.sbb-train-wagon__label-divider){margin-block-start:0}.sbb-train-wagon__label{line-height:1}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__label{max-width:var(--sbb-train-wagon-information-min-width);width:100%;text-align:center}.sbb-train-wagon__label-divider{height:var(--sbb-train-wagon-font-size)}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__label-divider{height:auto;width:var(--sbb-train-wagon-font-size);margin-inline-start:calc(.5 * (var(--sbb-train-wagon-information-min-width) - var(--sbb-train-wagon-font-size)))}.sbb-train-wagon__attribute-icon-list{list-style:none;margin:0;padding:0;font-size:inherit;--sbb-icon-svg-height: var(--sbb-train-wagon-attribute-icon-height);display:flex;justify-content:var(--_sbb-train-wagon-attributes-justify-content, start);flex-wrap:wrap;gap:var(--sbb-train-wagon-attribute-icon-gap);color:var(--sbb-train-wagon-attribute-icon-color);padding-block-start:calc(.5 * (1em * var(--sbb-typo-line-height-text) - var(--sbb-train-wagon-attribute-icon-height)));max-width:var(--_sbb-train-wagon-attributes-max-width)}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train-wagon__attribute-icon-list{max-width:calc(var(--_sbb-train-wagon-attributes-icon-columns) * var(--sbb-train-wagon-attributes-mean-width));max-height:calc(var(--_sbb-train-wagon-attributes-icon-rows, 3) * var(--sbb-train-wagon-attribute-icon-height) + (var(--_sbb-train-wagon-attributes-icon-rows, 3) - 1) * var(--sbb-train-wagon-attribute-icon-gap));padding-block-start:0;justify-content:center;width:100%}.sbb-train-wagon__attribute-icon-list>:is(li,span){display:inline-flex}.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}", E = {
|
|
13
|
+
couchette: "sa-cc",
|
|
14
|
+
sleeping: "sa-wl",
|
|
15
|
+
restaurant: "sa-wr"
|
|
16
|
+
}, D = {
|
|
17
|
+
wagon: {
|
|
18
|
+
side: "M12 0H72A12 12 0 0184 12V24A12 12 0 0172 36H12A12 12 0 010 24V12A12 12 0 0112 0Z",
|
|
19
|
+
top: "M8 0A8 8 0 000 8V28a8 8 0 008 8H76a8 8 0 008-8V8A8 8 0 0076 0H8Z"
|
|
20
|
+
},
|
|
21
|
+
locomotive: {
|
|
22
|
+
side: "M7.7 8.6C10.5 3.6 16 0 22 0H62c6 0 11.5 3.6 14.3 8.6l5.1 9C85.9 25.6 80 36 71 36H13C4 36-1.9 25.6 2.6 17.6l5.1-9Z",
|
|
23
|
+
top: "M66 0H18C8 0 0 8 0 18S8 36 18 36H66c10 0 18-8 18-18S76 0 66 0Z"
|
|
24
|
+
},
|
|
25
|
+
"wagon-end-left": {
|
|
26
|
+
side: "M7.7 8.6A16 16 0 0122 0H72c6 0 12 6 12 12V24c0 6-6 12-12 12H13C3.8 36-2 26.1 2.6 18.1Z",
|
|
27
|
+
top: "M76 0H18C8.25 0 .5 8.25.5 18S8 36 18 36H76c4 0 8-4 8-8V8c0-4-4-8-8-8Z"
|
|
28
|
+
},
|
|
29
|
+
"wagon-end-right": {
|
|
30
|
+
side: "M76.3 8.6A16 16 0 0062 0H12C6 0 0 6 0 13v11c0 6 6 12 12 12h58.4c8.6 0 15-9.9 10.4-17.9z",
|
|
31
|
+
top: "M66 0H8C4 0 0 4 0 8V28c0 4 4 8 8 8H66c9.75 0 17.5-8.25 17.5-18S76 0 66 0Z"
|
|
32
|
+
}
|
|
33
|
+
}, O = (O) => (() => {
|
|
34
|
+
let k = e(l(O)), A, j = [], M = [], N, P = [], F = [], I, L = [], R = [], z, B = [], V = [], H, U = [], W = [], G, K = [], q = [], J, Y = [], X = [], Z, Q = [], $ = [];
|
|
35
|
+
return class extends k {
|
|
36
|
+
static {
|
|
37
|
+
let e = typeof Symbol == "function" && Symbol.metadata ? Object.create(k[Symbol.metadata] ?? null) : void 0;
|
|
38
|
+
A = [o({
|
|
39
|
+
attribute: "wagon-type",
|
|
40
|
+
reflect: !0
|
|
41
|
+
})], N = [o()], I = [
|
|
42
|
+
u(),
|
|
43
|
+
d((e) => e._sectorChanged()),
|
|
44
|
+
o({
|
|
45
|
+
reflect: !0,
|
|
46
|
+
converter: y
|
|
47
|
+
})
|
|
48
|
+
], z = [o({ attribute: "blocked-passage" })], H = [o({ attribute: "wagon-class" })], G = [u(), o({
|
|
49
|
+
reflect: !0,
|
|
50
|
+
converter: y
|
|
51
|
+
})], J = [u(), o({ attribute: "additional-accessibility-text" })], Z = [s()], t(this, null, A, {
|
|
52
|
+
kind: "accessor",
|
|
53
|
+
name: "wagonType",
|
|
54
|
+
static: !1,
|
|
55
|
+
private: !1,
|
|
56
|
+
access: {
|
|
57
|
+
has: (e) => "wagonType" in e,
|
|
58
|
+
get: (e) => e.wagonType,
|
|
59
|
+
set: (e, t) => {
|
|
60
|
+
e.wagonType = t;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
metadata: e
|
|
64
|
+
}, j, M), t(this, null, N, {
|
|
65
|
+
kind: "accessor",
|
|
66
|
+
name: "occupancy",
|
|
67
|
+
static: !1,
|
|
68
|
+
private: !1,
|
|
69
|
+
access: {
|
|
70
|
+
has: (e) => "occupancy" in e,
|
|
71
|
+
get: (e) => e.occupancy,
|
|
72
|
+
set: (e, t) => {
|
|
73
|
+
e.occupancy = t;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
metadata: e
|
|
77
|
+
}, P, F), t(this, null, I, {
|
|
78
|
+
kind: "accessor",
|
|
79
|
+
name: "sector",
|
|
80
|
+
static: !1,
|
|
81
|
+
private: !1,
|
|
82
|
+
access: {
|
|
83
|
+
has: (e) => "sector" in e,
|
|
84
|
+
get: (e) => e.sector,
|
|
85
|
+
set: (e, t) => {
|
|
86
|
+
e.sector = t;
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
metadata: e
|
|
90
|
+
}, L, R), t(this, null, z, {
|
|
91
|
+
kind: "accessor",
|
|
92
|
+
name: "blockedPassage",
|
|
93
|
+
static: !1,
|
|
94
|
+
private: !1,
|
|
95
|
+
access: {
|
|
96
|
+
has: (e) => "blockedPassage" in e,
|
|
97
|
+
get: (e) => e.blockedPassage,
|
|
98
|
+
set: (e, t) => {
|
|
99
|
+
e.blockedPassage = t;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
metadata: e
|
|
103
|
+
}, B, V), t(this, null, H, {
|
|
104
|
+
kind: "accessor",
|
|
105
|
+
name: "wagonClass",
|
|
106
|
+
static: !1,
|
|
107
|
+
private: !1,
|
|
108
|
+
access: {
|
|
109
|
+
has: (e) => "wagonClass" in e,
|
|
110
|
+
get: (e) => e.wagonClass,
|
|
111
|
+
set: (e, t) => {
|
|
112
|
+
e.wagonClass = t;
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
metadata: e
|
|
116
|
+
}, U, W), t(this, null, G, {
|
|
117
|
+
kind: "accessor",
|
|
118
|
+
name: "label",
|
|
119
|
+
static: !1,
|
|
120
|
+
private: !1,
|
|
121
|
+
access: {
|
|
122
|
+
has: (e) => "label" in e,
|
|
123
|
+
get: (e) => e.label,
|
|
124
|
+
set: (e, t) => {
|
|
125
|
+
e.label = t;
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
metadata: e
|
|
129
|
+
}, K, q), t(this, null, J, {
|
|
130
|
+
kind: "accessor",
|
|
131
|
+
name: "additionalAccessibilityText",
|
|
132
|
+
static: !1,
|
|
133
|
+
private: !1,
|
|
134
|
+
access: {
|
|
135
|
+
has: (e) => "additionalAccessibilityText" in e,
|
|
136
|
+
get: (e) => e.additionalAccessibilityText,
|
|
137
|
+
set: (e, t) => {
|
|
138
|
+
e.additionalAccessibilityText = t;
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
metadata: e
|
|
142
|
+
}, Y, X), t(this, null, Z, {
|
|
143
|
+
kind: "accessor",
|
|
144
|
+
name: "_view",
|
|
145
|
+
static: !1,
|
|
146
|
+
private: !1,
|
|
147
|
+
access: {
|
|
148
|
+
has: (e) => "_view" in e,
|
|
149
|
+
get: (e) => e._view,
|
|
150
|
+
set: (e, t) => {
|
|
151
|
+
e._view = t;
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
metadata: e
|
|
155
|
+
}, Q, $), e && Object.defineProperty(this, Symbol.metadata, {
|
|
156
|
+
enumerable: !0,
|
|
157
|
+
configurable: !0,
|
|
158
|
+
writable: !0,
|
|
159
|
+
value: e
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
static {
|
|
163
|
+
this.elementDependencies = [
|
|
164
|
+
S,
|
|
165
|
+
C,
|
|
166
|
+
x
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
static {
|
|
170
|
+
this.styles = [te, a(T)];
|
|
171
|
+
}
|
|
172
|
+
#e;
|
|
173
|
+
get wagonType() {
|
|
174
|
+
return this.#e;
|
|
175
|
+
}
|
|
176
|
+
set wagonType(e) {
|
|
177
|
+
this.#e = e;
|
|
178
|
+
}
|
|
179
|
+
#t;
|
|
180
|
+
get occupancy() {
|
|
181
|
+
return this.#t;
|
|
182
|
+
}
|
|
183
|
+
set occupancy(e) {
|
|
184
|
+
this.#t = e;
|
|
185
|
+
}
|
|
186
|
+
#n;
|
|
187
|
+
get sector() {
|
|
188
|
+
return this.#n;
|
|
189
|
+
}
|
|
190
|
+
set sector(e) {
|
|
191
|
+
this.#n = e;
|
|
192
|
+
}
|
|
193
|
+
#r;
|
|
194
|
+
get blockedPassage() {
|
|
195
|
+
return this.#r;
|
|
196
|
+
}
|
|
197
|
+
set blockedPassage(e) {
|
|
198
|
+
this.#r = e;
|
|
199
|
+
}
|
|
200
|
+
#i;
|
|
201
|
+
get wagonClass() {
|
|
202
|
+
return this.#i;
|
|
203
|
+
}
|
|
204
|
+
set wagonClass(e) {
|
|
205
|
+
this.#i = e;
|
|
206
|
+
}
|
|
207
|
+
#a;
|
|
208
|
+
get label() {
|
|
209
|
+
return this.#a;
|
|
210
|
+
}
|
|
211
|
+
set label(e) {
|
|
212
|
+
this.#a = e;
|
|
213
|
+
}
|
|
214
|
+
#o;
|
|
215
|
+
get additionalAccessibilityText() {
|
|
216
|
+
return this.#o;
|
|
217
|
+
}
|
|
218
|
+
set additionalAccessibilityText(e) {
|
|
219
|
+
this.#o = e;
|
|
220
|
+
}
|
|
221
|
+
#s;
|
|
222
|
+
get _view() {
|
|
223
|
+
return this.#s;
|
|
224
|
+
}
|
|
225
|
+
set _view(e) {
|
|
226
|
+
this.#s = e;
|
|
227
|
+
}
|
|
228
|
+
constructor(...e) {
|
|
229
|
+
super(...e), this.#e = n(this, j, "wagon"), this.listChildLocalNames = (n(this, M), ["sbb-icon"]), this.#t = n(this, P, null), this.#n = (n(this, F), n(this, L, "")), this.#r = (n(this, R), n(this, B, "none")), this.#i = (n(this, V), n(this, U, null)), this.#a = (n(this, W), n(this, K, "")), this.#o = (n(this, q), n(this, Y, "")), this.#s = (n(this, X), n(this, Q, null)), this._language = (n(this, $), new c(this)), this._clipStyleSheet = null, this.addController(new ee(this, () => this.closest("sbb-train-formation"), { view: (e) => {
|
|
230
|
+
this._view && this.internals.states.delete(`view-${this._view}`), this._view = e.view, this._view && this.internals.states.add(`view-${this._view}`);
|
|
231
|
+
} }));
|
|
232
|
+
}
|
|
233
|
+
createRenderRoot() {
|
|
234
|
+
let e = super.createRenderRoot();
|
|
235
|
+
return r || (this._clipStyleSheet = new CSSStyleSheet(), e.adoptedStyleSheets.push(this._clipStyleSheet)), e;
|
|
236
|
+
}
|
|
237
|
+
_sectorChanged() {
|
|
238
|
+
this.dispatchEvent(new Event("sectorchange", {
|
|
239
|
+
bubbles: !0,
|
|
240
|
+
composed: !0
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
_wagonTypeLabel() {
|
|
244
|
+
switch (this.wagonType) {
|
|
245
|
+
case "closed": return g[this._language.current];
|
|
246
|
+
case "locomotive": return v[this._language.current];
|
|
247
|
+
case "couchette": return _[this._language.current];
|
|
248
|
+
case "sleeping": return ie[this._language.current];
|
|
249
|
+
case "restaurant": return ne[this._language.current];
|
|
250
|
+
default: return ae[this._language.current];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
_wagonShape() {
|
|
254
|
+
let e = this._view ?? "side";
|
|
255
|
+
return [
|
|
256
|
+
"wagon",
|
|
257
|
+
"couchette",
|
|
258
|
+
"sleeping",
|
|
259
|
+
"restaurant",
|
|
260
|
+
"closed"
|
|
261
|
+
].includes(this.wagonType) ? D.wagon[e] : D[this.wagonType][e] ?? D.wagon[e];
|
|
262
|
+
}
|
|
263
|
+
_classLabel() {
|
|
264
|
+
switch (this.wagonClass) {
|
|
265
|
+
case "1": return h.first[this._language.current];
|
|
266
|
+
case "2": return h.second[this._language.current];
|
|
267
|
+
case "1-2": return `${h.first[this._language.current]} ${p[this._language.current]} ${h.second[this._language.current]}`;
|
|
268
|
+
case "2-1": return `${h.second[this._language.current]} ${p[this._language.current]} ${h.first[this._language.current]}`;
|
|
269
|
+
default: return "";
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
renderTemplate() {
|
|
273
|
+
let e = this.wagonType === "wagon-end-left" && this.blockedPassage === "none" ? "previous" : this.wagonType === "wagon-end-right" && this.blockedPassage === "none" ? "next" : this.blockedPassage ?? "none", t = e !== "none", n = +!!this.sector + +!!this.label + +(!!this.wagonClass && this.wagonType !== "closed") + +(!!this.occupancy && this.wagonType !== "closed") + +t, r = `${re[this._language.current]}, ${this.sector}`, a = `${oe[this._language.current]}, ${this.label}`, o = b`<span class="sbb-screen-reader-only">
|
|
274
|
+
${this._classLabel()}
|
|
275
|
+
</span>
|
|
276
|
+
${this.wagonClass?.split("-").map((e) => b`<span
|
|
277
|
+
aria-hidden="true"
|
|
278
|
+
class="sbb-train-wagon__class-entry ${e === "1" ? "first" : ""}"
|
|
279
|
+
>
|
|
280
|
+
${e}
|
|
281
|
+
</span>`)} `, s = this._wagonShape(), c = this.label ? 3 : 4;
|
|
282
|
+
return this._clipStyleSheet?.replaceSync(`:host {
|
|
283
|
+
--_sbb-train-wagon-clip-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 36' fill='black'%3E%3Cpath d='${s}' /%3E%3C/svg%3E");
|
|
284
|
+
--_sbb-train-wagon-clip-shape-compartment: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 ${this.orientation === "vertical" ? 36 : 84} ${this.orientation === "vertical" ? 84 : 36}' fill='black'%3E%3Cpath d='${s}'${this.orientation === "vertical" ? " transform='rotate(-90, 0, 0) scale(-1, 1)'" : ""} /%3E%3C/svg%3E");
|
|
285
|
+
--_sbb-train-wagon-attributes-icon-columns: ${Math.ceil(this.listChildren.length / c)};
|
|
286
|
+
--_sbb-train-wagon-attributes-icon-rows: ${c};
|
|
287
|
+
}`), b`
|
|
288
|
+
<div class="sbb-train-wagon">
|
|
289
|
+
${w(n > 1, () => b`<ul aria-label=${this._wagonTypeLabel()} class="sbb-train-wagon__compartment">
|
|
290
|
+
${this.sector ? b`<li class="sbb-screen-reader-only">${r}</li>` : i}
|
|
291
|
+
${this.label ? b`<li class="sbb-screen-reader-only">${a}</li>` : i}
|
|
292
|
+
${this.wagonClass && this.wagonType !== "closed" ? b`<li class="sbb-train-wagon__class">${o}</li>` : i}
|
|
293
|
+
${this.occupancy && this.wagonType !== "closed" ? b`<sbb-timetable-occupancy-icon
|
|
294
|
+
class="sbb-train-wagon__occupancy"
|
|
295
|
+
role="listitem"
|
|
296
|
+
occupancy=${this.occupancy}
|
|
297
|
+
></sbb-timetable-occupancy-icon>` : i}
|
|
298
|
+
${t ? b`<li class="sbb-screen-reader-only">
|
|
299
|
+
${m[e][this._language.current]}
|
|
300
|
+
</li>` : i}
|
|
301
|
+
</ul>`, () => b`<div class="sbb-train-wagon__compartment">
|
|
302
|
+
<span class="sbb-screen-reader-only">
|
|
303
|
+
${`${this._wagonTypeLabel()}${this.sector ? `, ${r}` : ""}`}
|
|
304
|
+
</span>
|
|
305
|
+
${this.label ? b`<span class="sbb-screen-reader-only">${a}</span>` : i}
|
|
306
|
+
${this.wagonClass && this.wagonType !== "closed" ? b`<span class="sbb-train-wagon__class">${o}</span>` : i}
|
|
307
|
+
${this.occupancy && this.wagonType !== "closed" ? b`<sbb-timetable-occupancy-icon
|
|
308
|
+
class="sbb-train-wagon__occupancy"
|
|
309
|
+
occupancy=${this.occupancy}
|
|
310
|
+
></sbb-timetable-occupancy-icon>` : i}
|
|
311
|
+
${t ? b`<span class="sbb-screen-reader-only">
|
|
312
|
+
${m[e][this._language.current]}
|
|
313
|
+
</span>` : i}
|
|
314
|
+
</div> `)}
|
|
315
|
+
${E[this.wagonType] ? b`<sbb-icon
|
|
316
|
+
name=${E[this.wagonType]}
|
|
317
|
+
class="sbb-train-wagon__main-icon"
|
|
318
|
+
></sbb-icon>` : i}
|
|
319
|
+
<svg class="sbb-train-wagon__shape" viewBox="0 0 84 36" aria-hidden="true">
|
|
320
|
+
<path d=${s}></path>
|
|
321
|
+
<path
|
|
322
|
+
class="sbb-train-wagon__shape-closed"
|
|
323
|
+
d=${this._view === "top" ? "M81 3L3 34" : "M81 4L4 32"}
|
|
324
|
+
></path>
|
|
325
|
+
<path
|
|
326
|
+
class="sbb-train-wagon__shape-closed"
|
|
327
|
+
d=${this._view === "top" ? "M81 34L3 3" : "M81 32L4 4"}
|
|
328
|
+
></path>
|
|
329
|
+
</svg>
|
|
330
|
+
${this.additionalAccessibilityText ? b`<span class="sbb-screen-reader-only"
|
|
331
|
+
>, ${this.additionalAccessibilityText}</span
|
|
332
|
+
>` : i}
|
|
333
|
+
<span
|
|
334
|
+
class="sbb-train-wagon__information-wrapper"
|
|
335
|
+
?hidden=${!this.listChildren.length && !this.label}
|
|
336
|
+
>
|
|
337
|
+
${this.label ? b`<span aria-hidden="true" class="sbb-train-wagon__label">${this.label}</span>` : i}
|
|
338
|
+
${this.label && this.listChildren.length ? b`<sbb-divider
|
|
339
|
+
orientation=${this.orientation === "vertical" ? "horizontal" : "vertical"}
|
|
340
|
+
aria-hidden="true"
|
|
341
|
+
class="sbb-train-wagon__label-divider"
|
|
342
|
+
></sbb-divider>` : i}
|
|
343
|
+
${this.renderList({
|
|
344
|
+
class: "sbb-train-wagon__attribute-icon-list",
|
|
345
|
+
ariaLabel: f[this._language.current]
|
|
346
|
+
})}
|
|
347
|
+
</span>
|
|
348
|
+
</div>
|
|
349
|
+
`;
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
})();
|
|
353
|
+
//#endregion
|
|
354
|
+
export { O as t };
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
+
import { nothing as n, unsafeCSS as r } from "lit";
|
|
3
|
+
import { property as i } from "lit/decorators.js";
|
|
4
|
+
import { SbbElement as a, SbbLanguageController as o, SbbNamedSlotListMixin as s, boxSizingStyles as c, forceType as l, handleDistinctChange as u, i18nTrain as d, i18nWagonsLabel as f, omitEmptyConverter as p } from "./core.js";
|
|
5
|
+
import { html as m, unsafeStatic as h } from "lit/static-html.js";
|
|
6
|
+
import { SbbIconElement as g } from "./icon.pure.js";
|
|
7
|
+
import { SbbTrainFormationOrientationMixin as _ } from "./train/train-formation-orientation-mixin.js";
|
|
8
|
+
//#region src/elements/train/train/train.scss?inline
|
|
9
|
+
var v = ":host{--sbb-train-direction-label-spacing: var(--sbb-spacing-fixed-1x);--_sbb-train-direction-row-dimension: max(var(--sbb-size-icon-ui-small), 1em * var(--sbb-typo-line-height-text)) ;display:flex;font-size:var(--sbb-text-font-size-xs);letter-spacing:var(--sbb-typo-letter-spacing-text);flex-direction:var(--_sbb-train-formation-flex-direction-inverted);gap:var(--sbb-train-formation-gap);position:relative}:host:before{content:\"\";display:var(--_sbb-train-formation-reserve-spacing-display, none);height:var(--_sbb-train-direction-row-dimension)}:host(:is(:state(orientation-vertical),[state--orientation-vertical])):before{height:auto;width:var(--_sbb-train-direction-row-dimension)}.sbb-train__wagons{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;flex-direction:var(--_sbb-train-formation-flex-direction);gap:var(--sbb-train-formation-wagon-gap)}.sbb-train__direction-heading{display:flex;position:absolute;width:100%;flex-direction:var(--_sbb-train-formation-flex-direction)}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train__direction-heading{width:auto;height:100%}.sbb-train__direction-sticky-wrapper{position:sticky;inset-inline-start:0;display:inline-flex;flex-direction:var(--_sbb-train-formation-flex-direction);align-items:center;gap:var(--sbb-train-direction-label-spacing);max-width:100%}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train__direction-sticky-wrapper{inset-inline-start:unset;inset-block-start:0;max-width:unset;max-height:100%}:host([direction=right]) .sbb-train__direction-arrow{transform:scaleX(-1);order:2}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train__direction-arrow{rotate:90deg}.sbb-train__direction-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host(:is(:state(orientation-vertical),[state--orientation-vertical])) .sbb-train__direction-label{writing-mode:sideways-lr}.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 = (() => {
|
|
10
|
+
let y = _(s(a)), b, x = [], S = [], C, w = [], T = [], E, D = [], O = [], k, A = [], j = [], M, N = [], P = [];
|
|
11
|
+
return class extends y {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.listChildLocalNames = [
|
|
14
|
+
"sbb-train-wagon",
|
|
15
|
+
"sbb-train-wagon-button",
|
|
16
|
+
"sbb-train-wagon-link",
|
|
17
|
+
"sbb-train-blocked-passage"
|
|
18
|
+
], this.#e = t(this, x, ""), this.#t = (t(this, S), t(this, w, "6")), this.#n = (t(this, T), t(this, D, "")), this.#r = (t(this, O), t(this, A, "")), this.#i = (t(this, j), t(this, N, "left")), this._language = (t(this, P), new o(this));
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(y[Symbol.metadata] ?? null) : void 0;
|
|
22
|
+
b = [
|
|
23
|
+
l(),
|
|
24
|
+
u((e) => {
|
|
25
|
+
e.dispatchEvent(new Event("directionlabelchange", {
|
|
26
|
+
bubbles: !0,
|
|
27
|
+
composed: !0
|
|
28
|
+
}));
|
|
29
|
+
}),
|
|
30
|
+
i({
|
|
31
|
+
attribute: "direction-label",
|
|
32
|
+
reflect: !0,
|
|
33
|
+
converter: p
|
|
34
|
+
})
|
|
35
|
+
], C = [i({ attribute: "direction-label-level" })], E = [l(), i()], k = [l(), i({ attribute: "accessibility-label" })], M = [i({ reflect: !0 })], e(this, null, b, {
|
|
36
|
+
kind: "accessor",
|
|
37
|
+
name: "directionLabel",
|
|
38
|
+
static: !1,
|
|
39
|
+
private: !1,
|
|
40
|
+
access: {
|
|
41
|
+
has: (e) => "directionLabel" in e,
|
|
42
|
+
get: (e) => e.directionLabel,
|
|
43
|
+
set: (e, t) => {
|
|
44
|
+
e.directionLabel = t;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
metadata: t
|
|
48
|
+
}, x, S), e(this, null, C, {
|
|
49
|
+
kind: "accessor",
|
|
50
|
+
name: "directionLabelLevel",
|
|
51
|
+
static: !1,
|
|
52
|
+
private: !1,
|
|
53
|
+
access: {
|
|
54
|
+
has: (e) => "directionLabelLevel" in e,
|
|
55
|
+
get: (e) => e.directionLabelLevel,
|
|
56
|
+
set: (e, t) => {
|
|
57
|
+
e.directionLabelLevel = t;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
metadata: t
|
|
61
|
+
}, w, T), e(this, null, E, {
|
|
62
|
+
kind: "accessor",
|
|
63
|
+
name: "station",
|
|
64
|
+
static: !1,
|
|
65
|
+
private: !1,
|
|
66
|
+
access: {
|
|
67
|
+
has: (e) => "station" in e,
|
|
68
|
+
get: (e) => e.station,
|
|
69
|
+
set: (e, t) => {
|
|
70
|
+
e.station = t;
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
metadata: t
|
|
74
|
+
}, D, O), e(this, null, k, {
|
|
75
|
+
kind: "accessor",
|
|
76
|
+
name: "accessibilityLabel",
|
|
77
|
+
static: !1,
|
|
78
|
+
private: !1,
|
|
79
|
+
access: {
|
|
80
|
+
has: (e) => "accessibilityLabel" in e,
|
|
81
|
+
get: (e) => e.accessibilityLabel,
|
|
82
|
+
set: (e, t) => {
|
|
83
|
+
e.accessibilityLabel = t;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
metadata: t
|
|
87
|
+
}, A, j), e(this, null, M, {
|
|
88
|
+
kind: "accessor",
|
|
89
|
+
name: "direction",
|
|
90
|
+
static: !1,
|
|
91
|
+
private: !1,
|
|
92
|
+
access: {
|
|
93
|
+
has: (e) => "direction" in e,
|
|
94
|
+
get: (e) => e.direction,
|
|
95
|
+
set: (e, t) => {
|
|
96
|
+
e.direction = t;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
metadata: t
|
|
100
|
+
}, N, P), t && Object.defineProperty(this, Symbol.metadata, {
|
|
101
|
+
enumerable: !0,
|
|
102
|
+
configurable: !0,
|
|
103
|
+
writable: !0,
|
|
104
|
+
value: t
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
static {
|
|
108
|
+
this.elementName = "sbb-train";
|
|
109
|
+
}
|
|
110
|
+
static {
|
|
111
|
+
this.elementDependencies = [g];
|
|
112
|
+
}
|
|
113
|
+
static {
|
|
114
|
+
this.styles = [c, r(v)];
|
|
115
|
+
}
|
|
116
|
+
#e;
|
|
117
|
+
get directionLabel() {
|
|
118
|
+
return this.#e;
|
|
119
|
+
}
|
|
120
|
+
set directionLabel(e) {
|
|
121
|
+
this.#e = e;
|
|
122
|
+
}
|
|
123
|
+
#t;
|
|
124
|
+
get directionLabelLevel() {
|
|
125
|
+
return this.#t;
|
|
126
|
+
}
|
|
127
|
+
set directionLabelLevel(e) {
|
|
128
|
+
this.#t = e;
|
|
129
|
+
}
|
|
130
|
+
#n;
|
|
131
|
+
get station() {
|
|
132
|
+
return this.#n;
|
|
133
|
+
}
|
|
134
|
+
set station(e) {
|
|
135
|
+
this.#n = e;
|
|
136
|
+
}
|
|
137
|
+
#r;
|
|
138
|
+
get accessibilityLabel() {
|
|
139
|
+
return this.#r;
|
|
140
|
+
}
|
|
141
|
+
set accessibilityLabel(e) {
|
|
142
|
+
this.#r = e;
|
|
143
|
+
}
|
|
144
|
+
#i;
|
|
145
|
+
get direction() {
|
|
146
|
+
return this.#i;
|
|
147
|
+
}
|
|
148
|
+
set direction(e) {
|
|
149
|
+
this.#i = e;
|
|
150
|
+
}
|
|
151
|
+
_getDirectionAriaLabel() {
|
|
152
|
+
let e = [d[this._language.current]];
|
|
153
|
+
return this.directionLabel && this.station && e.push(`${this.directionLabel} ${this.station}`), this.accessibilityLabel && e.push(this.accessibilityLabel), `${e.join(", ")}.`;
|
|
154
|
+
}
|
|
155
|
+
willUpdate(e) {
|
|
156
|
+
super.willUpdate(e), e.has("listChildren") && this.dispatchEvent(new Event("trainslotchange", { bubbles: !0 }));
|
|
157
|
+
}
|
|
158
|
+
render() {
|
|
159
|
+
let e = `h${this.directionLabelLevel}`;
|
|
160
|
+
return m`
|
|
161
|
+
<${h(e)} class="sbb-screen-reader-only">
|
|
162
|
+
${this._getDirectionAriaLabel()}
|
|
163
|
+
</${h(e)}>
|
|
164
|
+
${this.directionLabel ? m`<div class="sbb-train__direction-heading" aria-hidden="true">
|
|
165
|
+
<span class="sbb-train__direction-sticky-wrapper">
|
|
166
|
+
<sbb-icon class="sbb-train__direction-arrow" name="arrow-left-small"></sbb-icon>
|
|
167
|
+
<span class="sbb-train__direction-label">
|
|
168
|
+
${this.directionLabel} ${this.station}
|
|
169
|
+
</span>
|
|
170
|
+
</span>
|
|
171
|
+
</div>` : n}
|
|
172
|
+
${this.renderList({
|
|
173
|
+
class: "sbb-train__wagons",
|
|
174
|
+
ariaLabel: f[this._language.current]
|
|
175
|
+
})}
|
|
176
|
+
`;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
})();
|
|
180
|
+
//#endregion
|
|
181
|
+
export { y as t };
|
package/train.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { t as e } from "./train-blocked-passage.component-
|
|
2
|
-
import { t } from "./train-formation.component-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { t as e } from "./train-blocked-passage.component-voZ8fxiB.js";
|
|
2
|
+
import { t } from "./train-formation.component-6XQVXPue.js";
|
|
3
|
+
import { SbbTrainWagonButtonElement as n } from "./train/train-wagon-button/train-wagon-button.component.js";
|
|
4
|
+
import { SbbTrainWagonLinkElement as r } from "./train/train-wagon-link/train-wagon-link.component.js";
|
|
5
|
+
import { SbbTrainWagonElement as i } from "./train/train-wagon/train-wagon.component.js";
|
|
6
|
+
import { t as a } from "./train.component-3vmLxVCZ.js";
|
|
7
|
+
import { SbbTrainFormationOrientationMixin as o } from "./train/train-formation-orientation-mixin.js";
|
|
8
|
+
import { t as s } from "./train-wagon-common-DTN_G78z.js";
|
|
5
9
|
import "./train.pure.js";
|
|
6
|
-
|
|
10
|
+
e.define(), a.define(), t.define(), n.define(), r.define(), i.define();
|
|
7
11
|
//#endregion
|
|
8
|
-
export { e as SbbTrainBlockedPassageElement,
|
|
12
|
+
export { e as SbbTrainBlockedPassageElement, a as SbbTrainElement, t as SbbTrainFormationElement, o as SbbTrainFormationOrientationMixin, n as SbbTrainWagonButtonElement, i as SbbTrainWagonElement, r as SbbTrainWagonLinkElement, s as SbbTrainWagonMixin };
|
package/train.pure.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { t as e } from "./train-blocked-passage.component-
|
|
2
|
-
import { t } from "./train-formation.component-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { t as e } from "./train-blocked-passage.component-voZ8fxiB.js";
|
|
2
|
+
import { t } from "./train-formation.component-6XQVXPue.js";
|
|
3
|
+
import { SbbTrainWagonButtonElement as n } from "./train/train-wagon-button/train-wagon-button.component.js";
|
|
4
|
+
import { SbbTrainWagonLinkElement as r } from "./train/train-wagon-link/train-wagon-link.component.js";
|
|
5
|
+
import { SbbTrainWagonElement as i } from "./train/train-wagon/train-wagon.component.js";
|
|
6
|
+
import { t as a } from "./train.component-3vmLxVCZ.js";
|
|
7
|
+
import { SbbTrainFormationOrientationMixin as o } from "./train/train-formation-orientation-mixin.js";
|
|
8
|
+
import { t as s } from "./train-wagon-common-DTN_G78z.js";
|
|
9
|
+
export { e as SbbTrainBlockedPassageElement, a as SbbTrainElement, t as SbbTrainFormationElement, o as SbbTrainFormationOrientationMixin, n as SbbTrainWagonButtonElement, i as SbbTrainWagonElement, r as SbbTrainWagonLinkElement, s as SbbTrainWagonMixin };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { html, unsafeCSS } from "lit";
|
|
2
|
-
import { SbbElement, boxSizingStyles } from "./core.js";
|
|
3
|
-
//#region src/elements/train/train-blocked-passage/train-blocked-passage.scss?inline
|
|
4
|
-
var train_blocked_passage_default = ":host {\n display: block;\n --sbb-train-blocked-passage-height: var(--sbb-train-formation-wagon-height);\n --sbb-train-blocked-passage-background-color: var(--sbb-color-error);\n --sbb-train-blocked-passage-bar-color: var(--sbb-color-white);\n --sbb-train-blocked-passage-icon-dimension: 1rem;\n --sbb-train-blocked-passage-icon-bar-width: 0.625rem;\n --sbb-train-blocked-passage-icon-bar-height: 0.25rem;\n --sbb-train-blocked-passage-icon-bar-border-radius: 0.0625rem;\n}\n@media (forced-colors: active) {\n :host {\n --sbb-train-blocked-passage-background-color: CanvasText;\n --sbb-train-blocked-passage-bar-color: Canvas;\n }\n}\n\n.sbb-train-blocked-passage::before {\n content: \"\";\n display: var(--sbb-train-formation-wagon-label-display, block);\n height: calc(var(--sbb-text-font-size-xxs) * var(--sbb-typo-line-height-text));\n}\n\n.sbb-train-blocked-passage__wrapper {\n width: var(--sbb-train-blocked-passage-icon-dimension);\n display: flex;\n justify-content: center;\n flex-direction: column;\n height: var(--sbb-train-blocked-passage-height);\n}\n\n.sbb-train-blocked-passage__icon {\n width: 100%;\n height: var(--sbb-train-blocked-passage-icon-dimension);\n border-radius: 50%;\n background-color: var(--sbb-train-blocked-passage-background-color);\n position: relative;\n flex-direction: column;\n display: flex;\n align-items: center;\n}\n.sbb-train-blocked-passage__icon::before {\n content: \"\";\n width: var(--sbb-train-blocked-passage-icon-bar-width);\n height: var(--sbb-train-blocked-passage-icon-bar-height);\n border-radius: var(--sbb-train-blocked-passage-icon-bar-border-radius);\n background-color: var(--sbb-train-blocked-passage-bar-color);\n margin: auto 0;\n}";
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/elements/train/train-blocked-passage/train-blocked-passage.component.ts
|
|
7
|
-
/**
|
|
8
|
-
* It visually displays a blocked passage between train wagons.
|
|
9
|
-
*/
|
|
10
|
-
var SbbTrainBlockedPassageElement = class extends SbbElement {
|
|
11
|
-
static {
|
|
12
|
-
this.elementName = "sbb-train-blocked-passage";
|
|
13
|
-
}
|
|
14
|
-
static {
|
|
15
|
-
this.styles = [boxSizingStyles, unsafeCSS(train_blocked_passage_default)];
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return html`
|
|
19
|
-
<span class="sbb-train-blocked-passage">
|
|
20
|
-
<span class="sbb-train-blocked-passage__wrapper">
|
|
21
|
-
<span class="sbb-train-blocked-passage__icon"></span>
|
|
22
|
-
</span>
|
|
23
|
-
</span>
|
|
24
|
-
`;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { SbbTrainBlockedPassageElement as t };
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhaW4tYmxvY2tlZC1wYXNzYWdlLmNvbXBvbmVudC1CaDJkUjFnbi5qcyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZWxlbWVudHMvdHJhaW4vdHJhaW4tYmxvY2tlZC1wYXNzYWdlL3RyYWluLWJsb2NrZWQtcGFzc2FnZS5zY3N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