@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
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { nothing, unsafeCSS } from "lit";
|
|
3
|
-
import { property } from "lit/decorators.js";
|
|
4
|
-
import { SbbElement, SbbLanguageController, SbbNamedSlotListMixin, boxSizingStyles, forceType, i18nTrain, i18nWagonsLabel, omitEmptyConverter } from "./core.js";
|
|
5
|
-
import { html as html$1, unsafeStatic } from "lit/static-html.js";
|
|
6
|
-
import { SbbIconElement } from "./icon.pure.js";
|
|
7
|
-
//#region src/elements/train/train/train.scss?inline
|
|
8
|
-
var train_default = ":host {\n display: block;\n --sbb-train-direction-label-spacing: var(--sbb-spacing-fixed-1x);\n}\n\n.sbb-train {\n --sbb-text-font-size: var(--sbb-text-font-size-xs);\n font-family: var(--sbb-typo-font-family);\n font-weight: normal;\n line-height: var(--sbb-typo-line-height-text);\n letter-spacing: var(--sbb-typo-letter-spacing-text);\n font-size: var(--sbb-text-font-size);\n display: flex;\n flex-direction: column;\n gap: var(--sbb-train-formation-vertical-gap);\n position: relative;\n}\n.sbb-train::before {\n content: \"\";\n display: var(--sbb-train-formation-reserve-spacing-display, none);\n height: max(var(--sbb-size-icon-ui-small), 1em * var(--sbb-typo-line-height-text));\n}\n\n.sbb-train__wagons {\n list-style: none;\n margin: 0;\n padding: 0;\n font-size: inherit;\n display: flex;\n gap: var(--sbb-train-formation-wagon-gap);\n}\n\n.sbb-train__direction-heading {\n display: flex;\n position: absolute;\n width: 100%;\n}\n\n.sbb-train__direction-sticky-wrapper {\n position: sticky;\n inset-inline-start: 0;\n display: inline-flex;\n align-items: center;\n gap: var(--sbb-train-direction-label-spacing);\n max-width: 100%;\n}\n\n.sbb-train__direction-label {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.sbb-train__direction-label-sr {\n border: 0;\n clip-path: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}";
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/elements/train/train/train.component.ts
|
|
11
|
-
/**
|
|
12
|
-
* It can be used as a container for `sbb-train-wagon` or `sbb-train-blocked-passage` components.
|
|
13
|
-
*
|
|
14
|
-
* @slot - Use the unnamed slot to add 'sbb-train-wagon' elements to the `sbb-train`.
|
|
15
|
-
*/
|
|
16
|
-
var SbbTrainElement = (() => {
|
|
17
|
-
let _classSuper = SbbNamedSlotListMixin(SbbElement);
|
|
18
|
-
let _directionLabel_decorators;
|
|
19
|
-
let _directionLabel_initializers = [];
|
|
20
|
-
let _directionLabel_extraInitializers = [];
|
|
21
|
-
let _directionLabelLevel_decorators;
|
|
22
|
-
let _directionLabelLevel_initializers = [];
|
|
23
|
-
let _directionLabelLevel_extraInitializers = [];
|
|
24
|
-
let _station_decorators;
|
|
25
|
-
let _station_initializers = [];
|
|
26
|
-
let _station_extraInitializers = [];
|
|
27
|
-
let _accessibilityLabel_decorators;
|
|
28
|
-
let _accessibilityLabel_initializers = [];
|
|
29
|
-
let _accessibilityLabel_extraInitializers = [];
|
|
30
|
-
let _direction_decorators;
|
|
31
|
-
let _direction_initializers = [];
|
|
32
|
-
let _direction_extraInitializers = [];
|
|
33
|
-
return class SbbTrainElement extends _classSuper {
|
|
34
|
-
constructor() {
|
|
35
|
-
super(...arguments);
|
|
36
|
-
this.listChildLocalNames = ["sbb-train-wagon", "sbb-train-blocked-passage"];
|
|
37
|
-
this.#directionLabel_accessor_storage = __runInitializers(this, _directionLabel_initializers, "");
|
|
38
|
-
this.#directionLabelLevel_accessor_storage = (__runInitializers(this, _directionLabel_extraInitializers), __runInitializers(this, _directionLabelLevel_initializers, "6"));
|
|
39
|
-
this.#station_accessor_storage = (__runInitializers(this, _directionLabelLevel_extraInitializers), __runInitializers(this, _station_initializers, ""));
|
|
40
|
-
this.#accessibilityLabel_accessor_storage = (__runInitializers(this, _station_extraInitializers), __runInitializers(this, _accessibilityLabel_initializers, ""));
|
|
41
|
-
this.#direction_accessor_storage = (__runInitializers(this, _accessibilityLabel_extraInitializers), __runInitializers(this, _direction_initializers, "left"));
|
|
42
|
-
this._language = (__runInitializers(this, _direction_extraInitializers), new SbbLanguageController(this));
|
|
43
|
-
}
|
|
44
|
-
static {
|
|
45
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
46
|
-
_directionLabel_decorators = [forceType(), property({
|
|
47
|
-
attribute: "direction-label",
|
|
48
|
-
reflect: true,
|
|
49
|
-
converter: omitEmptyConverter
|
|
50
|
-
})];
|
|
51
|
-
_directionLabelLevel_decorators = [property({ attribute: "direction-label-level" })];
|
|
52
|
-
_station_decorators = [forceType(), property()];
|
|
53
|
-
_accessibilityLabel_decorators = [forceType(), property({ attribute: "accessibility-label" })];
|
|
54
|
-
_direction_decorators = [property({ reflect: true })];
|
|
55
|
-
__esDecorate(this, null, _directionLabel_decorators, {
|
|
56
|
-
kind: "accessor",
|
|
57
|
-
name: "directionLabel",
|
|
58
|
-
static: false,
|
|
59
|
-
private: false,
|
|
60
|
-
access: {
|
|
61
|
-
has: (obj) => "directionLabel" in obj,
|
|
62
|
-
get: (obj) => obj.directionLabel,
|
|
63
|
-
set: (obj, value) => {
|
|
64
|
-
obj.directionLabel = value;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
metadata: _metadata
|
|
68
|
-
}, _directionLabel_initializers, _directionLabel_extraInitializers);
|
|
69
|
-
__esDecorate(this, null, _directionLabelLevel_decorators, {
|
|
70
|
-
kind: "accessor",
|
|
71
|
-
name: "directionLabelLevel",
|
|
72
|
-
static: false,
|
|
73
|
-
private: false,
|
|
74
|
-
access: {
|
|
75
|
-
has: (obj) => "directionLabelLevel" in obj,
|
|
76
|
-
get: (obj) => obj.directionLabelLevel,
|
|
77
|
-
set: (obj, value) => {
|
|
78
|
-
obj.directionLabelLevel = value;
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
metadata: _metadata
|
|
82
|
-
}, _directionLabelLevel_initializers, _directionLabelLevel_extraInitializers);
|
|
83
|
-
__esDecorate(this, null, _station_decorators, {
|
|
84
|
-
kind: "accessor",
|
|
85
|
-
name: "station",
|
|
86
|
-
static: false,
|
|
87
|
-
private: false,
|
|
88
|
-
access: {
|
|
89
|
-
has: (obj) => "station" in obj,
|
|
90
|
-
get: (obj) => obj.station,
|
|
91
|
-
set: (obj, value) => {
|
|
92
|
-
obj.station = value;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
metadata: _metadata
|
|
96
|
-
}, _station_initializers, _station_extraInitializers);
|
|
97
|
-
__esDecorate(this, null, _accessibilityLabel_decorators, {
|
|
98
|
-
kind: "accessor",
|
|
99
|
-
name: "accessibilityLabel",
|
|
100
|
-
static: false,
|
|
101
|
-
private: false,
|
|
102
|
-
access: {
|
|
103
|
-
has: (obj) => "accessibilityLabel" in obj,
|
|
104
|
-
get: (obj) => obj.accessibilityLabel,
|
|
105
|
-
set: (obj, value) => {
|
|
106
|
-
obj.accessibilityLabel = value;
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
metadata: _metadata
|
|
110
|
-
}, _accessibilityLabel_initializers, _accessibilityLabel_extraInitializers);
|
|
111
|
-
__esDecorate(this, null, _direction_decorators, {
|
|
112
|
-
kind: "accessor",
|
|
113
|
-
name: "direction",
|
|
114
|
-
static: false,
|
|
115
|
-
private: false,
|
|
116
|
-
access: {
|
|
117
|
-
has: (obj) => "direction" in obj,
|
|
118
|
-
get: (obj) => obj.direction,
|
|
119
|
-
set: (obj, value) => {
|
|
120
|
-
obj.direction = value;
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
metadata: _metadata
|
|
124
|
-
}, _direction_initializers, _direction_extraInitializers);
|
|
125
|
-
if (_metadata) Object.defineProperty(this, Symbol.metadata, {
|
|
126
|
-
enumerable: true,
|
|
127
|
-
configurable: true,
|
|
128
|
-
writable: true,
|
|
129
|
-
value: _metadata
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
static {
|
|
133
|
-
this.elementName = "sbb-train";
|
|
134
|
-
}
|
|
135
|
-
static {
|
|
136
|
-
this.elementDependencies = [SbbIconElement];
|
|
137
|
-
}
|
|
138
|
-
static {
|
|
139
|
-
this.styles = [boxSizingStyles, unsafeCSS(train_default)];
|
|
140
|
-
}
|
|
141
|
-
static {
|
|
142
|
-
this.events = { trainslotchange: "trainslotchange" };
|
|
143
|
-
}
|
|
144
|
-
#directionLabel_accessor_storage;
|
|
145
|
-
/** General label for "driving direction". */
|
|
146
|
-
get directionLabel() {
|
|
147
|
-
return this.#directionLabel_accessor_storage;
|
|
148
|
-
}
|
|
149
|
-
set directionLabel(value) {
|
|
150
|
-
this.#directionLabel_accessor_storage = value;
|
|
151
|
-
}
|
|
152
|
-
#directionLabelLevel_accessor_storage;
|
|
153
|
-
/** Heading level of the direction label, used for screen readers. */
|
|
154
|
-
get directionLabelLevel() {
|
|
155
|
-
return this.#directionLabelLevel_accessor_storage;
|
|
156
|
-
}
|
|
157
|
-
set directionLabelLevel(value) {
|
|
158
|
-
this.#directionLabelLevel_accessor_storage = value;
|
|
159
|
-
}
|
|
160
|
-
#station_accessor_storage;
|
|
161
|
-
/** Label for the destination station of the train. */
|
|
162
|
-
get station() {
|
|
163
|
-
return this.#station_accessor_storage;
|
|
164
|
-
}
|
|
165
|
-
set station(value) {
|
|
166
|
-
this.#station_accessor_storage = value;
|
|
167
|
-
}
|
|
168
|
-
#accessibilityLabel_accessor_storage;
|
|
169
|
-
/** Accessibility label for additional information regarding the leaving direction of the train. */
|
|
170
|
-
get accessibilityLabel() {
|
|
171
|
-
return this.#accessibilityLabel_accessor_storage;
|
|
172
|
-
}
|
|
173
|
-
set accessibilityLabel(value) {
|
|
174
|
-
this.#accessibilityLabel_accessor_storage = value;
|
|
175
|
-
}
|
|
176
|
-
#direction_accessor_storage;
|
|
177
|
-
/** Controls the direction indicator to show the arrow left or right. Default is left. */
|
|
178
|
-
get direction() {
|
|
179
|
-
return this.#direction_accessor_storage;
|
|
180
|
-
}
|
|
181
|
-
set direction(value) {
|
|
182
|
-
this.#direction_accessor_storage = value;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Create the aria-label text out of the direction label, station and the accessibility label.
|
|
186
|
-
*/
|
|
187
|
-
_getDirectionAriaLabel() {
|
|
188
|
-
const textParts = [i18nTrain[this._language.current]];
|
|
189
|
-
if (this.directionLabel && this.station) textParts.push(`${this.directionLabel} ${this.station}`);
|
|
190
|
-
if (this.accessibilityLabel) textParts.push(this.accessibilityLabel);
|
|
191
|
-
return `${textParts.join(", ")}.`;
|
|
192
|
-
}
|
|
193
|
-
willUpdate(changedProperties) {
|
|
194
|
-
super.willUpdate(changedProperties);
|
|
195
|
-
if (changedProperties.has("listChildren"))
|
|
196
|
-
/** @internal */
|
|
197
|
-
this.dispatchEvent(new Event("trainslotchange", { bubbles: true }));
|
|
198
|
-
}
|
|
199
|
-
render() {
|
|
200
|
-
const TITLE_TAG_NAME = `h${this.directionLabelLevel}`;
|
|
201
|
-
return html$1`
|
|
202
|
-
<div class="sbb-train">
|
|
203
|
-
<${unsafeStatic(TITLE_TAG_NAME)} class="sbb-train__direction-label-sr">
|
|
204
|
-
${this._getDirectionAriaLabel()}
|
|
205
|
-
</${unsafeStatic(TITLE_TAG_NAME)}>
|
|
206
|
-
${this.directionLabel ? html$1`<div class="sbb-train__direction-heading" aria-hidden="true">
|
|
207
|
-
<span class="sbb-train__direction-sticky-wrapper">
|
|
208
|
-
${this.direction === "left" ? html$1`<sbb-icon name="chevron-small-left-small"></sbb-icon>` : nothing}
|
|
209
|
-
|
|
210
|
-
<span class="sbb-train__direction-label">
|
|
211
|
-
${this.directionLabel} ${this.station}
|
|
212
|
-
</span>
|
|
213
|
-
|
|
214
|
-
${this.direction === "right" ? html$1`<sbb-icon name="chevron-small-right-small"></sbb-icon>` : nothing}
|
|
215
|
-
</span>
|
|
216
|
-
</div>` : nothing}
|
|
217
|
-
${this.renderList({
|
|
218
|
-
class: "sbb-train__wagons",
|
|
219
|
-
ariaLabel: i18nWagonsLabel[this._language.current]
|
|
220
|
-
})}
|
|
221
|
-
</div>
|
|
222
|
-
`;
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
})();
|
|
226
|
-
//#endregion
|
|
227
|
-
export { SbbTrainElement as t };
|
|
228
|
-
|
|
229
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhaW4uY29tcG9uZW50LUJ2Yk5Ca1pGLmpzIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9lbGVtZW50cy90cmFpbi90cmFpbi90cmFpbi5zY3NzP2lubGluZSIsIi4uLy4uLy4uL3NyYy9lbGVtZW50cy90cmFpbi90cmFpbi90cmFpbi5jb21wb25lbnQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiQHVzZSAnLi4vLi4vY29yZS9zdHlsZXMnIGFzIHNiYjtcblxuOmhvc3Qge1xuICBkaXNwbGF5OiBibG9jaztcblxuICAtLXNiYi10cmFpbi1kaXJlY3Rpb24tbGFiZWwtc3BhY2luZzogdmFyKC0tc2JiLXNwYWNpbmctZml4ZWQtMXgpO1xufVxuXG4uc2JiLXRyYWluIHtcbiAgQGluY2x1ZGUgc2JiLnRleHQteHMtLXJlZ3VsYXI7XG5cbiAgZGlzcGxheTogZmxleDtcbiAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgZ2FwOiB2YXIoLS1zYmItdHJhaW4tZm9ybWF0aW9uLXZlcnRpY2FsLWdhcCk7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcblxuICAvLyBQbGFjZWhvbGRlciB0byByZXNlcnZlIHRoZSBoZWlnaHQgb2YgdGhlIGRpcmVjdGlvbiByb3dcbiAgJjo6YmVmb3JlIHtcbiAgICBjb250ZW50OiAnJztcbiAgICBkaXNwbGF5OiB2YXIoLS1zYmItdHJhaW4tZm9ybWF0aW9uLXJlc2VydmUtc3BhY2luZy1kaXNwbGF5LCBub25lKTtcbiAgICBoZWlnaHQ6IGNhbGMobWF4KHZhcigtLXNiYi1zaXplLWljb24tdWktc21hbGwpLCAxZW0gKiB2YXIoLS1zYmItdHlwby1saW5lLWhlaWdodC10ZXh0KSk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FQUdiLFdBQVcsbUJBQXlEO0FBQ3JGLFNBQU0sV0FBVyxrQkFBa0I7QUFFbkMsT0FBSSxrQkFBa0IsSUFBSSxlQUFlOztBQUV2QyxRQUFLLGNBQWMsSUFBSSxNQUFNLG1CQUFtQixFQUFFLFNBQVMsTUFBTSxDQUFDLENBQUM7O0VBSXBELFNBQU07R0FDdkIsTUFBTSxpQkFBaUIsSUFBSSxLQUFLO0FBR2hDLFVBQU8sTUFBSTs7V0FFSixhQUFhLGVBQWUsQ0FBQTtZQUMzQixLQUFLLHdCQUF3QixDQUFBO1lBQzdCLGFBQWEsZUFBZSxDQUFBO1VBRTlCLEtBQUssaUJBQ0QsTUFBSTs7b0JBRUUsS0FBSyxjQUFjLFNBQ2pCLE1BQUksMERBQ0osUUFBQTs7O3NCQUdBLEtBQUssZUFBYyxHQUFJLEtBQUssUUFBQTs7O29CQUc5QixLQUFLLGNBQWMsVUFDakIsTUFBSSwyREFDSixRQUFBOzt3QkFHUixRQUFBO1VBRUosS0FBSyxXQUFXO0lBQ2hCLE9BQU87SUFDUCxXQUFXLGdCQUFnQixLQUFLLFVBQVU7SUFDM0MsQ0FBQyxDQUFBIn0=
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { html as e, unsafeCSS as t } from "lit";
|
|
2
|
-
import { SbbElement as n, boxSizingStyles as r } from "./core.js";
|
|
3
|
-
//#region src/elements/train/train-blocked-passage/train-blocked-passage.scss?inline
|
|
4
|
-
var i = ":host{display:block;--sbb-train-blocked-passage-height: var(--sbb-train-formation-wagon-height);--sbb-train-blocked-passage-background-color: var(--sbb-color-error);--sbb-train-blocked-passage-bar-color: var(--sbb-color-white);--sbb-train-blocked-passage-icon-dimension: 1rem;--sbb-train-blocked-passage-icon-bar-width: .625rem;--sbb-train-blocked-passage-icon-bar-height: .25rem;--sbb-train-blocked-passage-icon-bar-border-radius: .0625rem}@media(forced-colors:active){:host{--sbb-train-blocked-passage-background-color: CanvasText;--sbb-train-blocked-passage-bar-color: Canvas}}.sbb-train-blocked-passage:before{content:\"\";display:var(--sbb-train-formation-wagon-label-display, block);height:calc(var(--sbb-text-font-size-xxs) * var(--sbb-typo-line-height-text))}.sbb-train-blocked-passage__wrapper{width:var(--sbb-train-blocked-passage-icon-dimension);display:flex;justify-content:center;flex-direction:column;height:var(--sbb-train-blocked-passage-height)}.sbb-train-blocked-passage__icon{width:100%;height:var(--sbb-train-blocked-passage-icon-dimension);border-radius:50%;background-color:var(--sbb-train-blocked-passage-background-color);position:relative;flex-direction:column;display:flex;align-items:center}.sbb-train-blocked-passage__icon:before{content:\"\";width:var(--sbb-train-blocked-passage-icon-bar-width);height:var(--sbb-train-blocked-passage-icon-bar-height);border-radius:var(--sbb-train-blocked-passage-icon-bar-border-radius);background-color:var(--sbb-train-blocked-passage-bar-color);margin:auto 0}", a = class extends n {
|
|
5
|
-
static {
|
|
6
|
-
this.elementName = "sbb-train-blocked-passage";
|
|
7
|
-
}
|
|
8
|
-
static {
|
|
9
|
-
this.styles = [r, t(i)];
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
return e`
|
|
13
|
-
<span class="sbb-train-blocked-passage">
|
|
14
|
-
<span class="sbb-train-blocked-passage__wrapper">
|
|
15
|
-
<span class="sbb-train-blocked-passage__icon"></span>
|
|
16
|
-
</span>
|
|
17
|
-
</span>
|
|
18
|
-
`;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
export { a as t };
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { __esDecorate as e, __runInitializers as t } from "tslib";
|
|
2
|
-
import { html as n, nothing as r, unsafeCSS as i } from "lit";
|
|
3
|
-
import { property as a, state as o } from "lit/decorators.js";
|
|
4
|
-
import { SbbElement as s, SbbLanguageController as c, SbbNamedSlotListMixin as l, boxSizingStyles as u, i18nSector as d, i18nSectorShort as f, i18nTrains as p } from "./core.js";
|
|
5
|
-
import { styleMap as m } from "lit/directives/style-map.js";
|
|
6
|
-
//#region src/elements/train/train-formation/train-formation.scss?inline
|
|
7
|
-
var h = ":host{display:block;--sbb-train-formation-sector-line-color: var(--sbb-color-cement);--sbb-train-formation-sector-line-color: light-dark( var(--sbb-color-cement), var(--sbb-color-smoke) );--sbb-train-formation-sector-line-width: var(--sbb-border-width-1x);--sbb-train-formation-blocked-passage-width: 1rem;--sbb-train-formation-text-color: var(--sbb-color-3);--sbb-train-formation-vertical-gap: var(--sbb-spacing-fixed-2x)}@media(forced-colors:active){:host{--sbb-train-formation-sector-line-color: CanvasText}}.sbb-train-formation{--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x);--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: color-mix(in srgb, var(--sbb-color-black) 30%, transparent);--sbb-scrollbar-color: light-dark( color-mix(in srgb, var(--sbb-color-black) 30%, transparent), color-mix(in srgb, var(--sbb-color-white) 30%, transparent) );--sbb-scrollbar-color-hover: color-mix(in srgb, var(--sbb-color-black) 60%, transparent);--sbb-scrollbar-color-hover: light-dark( color-mix(in srgb, var(--sbb-color-black) 60%, transparent), color-mix(in srgb, var(--sbb-color-white) 60%, transparent) );--sbb-scrollbar-track-color: transparent}.sbb-train-formation::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-train-formation::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-train-formation::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-train-formation::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-train-formation::-webkit-scrollbar-button,.sbb-train-formation::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-train-formation{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-train-formation{display:grid;grid-template:\"start sectors end\" auto \"start trains end\" auto/auto 1fr auto;position:relative;overflow-x:auto;row-gap:calc(var(--sbb-train-formation-show-sectors-gap, 0) * var(--sbb-train-formation-vertical-gap));padding-block-end:var(--sbb-train-formation-vertical-gap);color:var(--sbb-train-formation-text-color)}.sbb-train-formation:focus-visible{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-formation:before,.sbb-train-formation:after{content:\"\";display:block;width:var(--sbb-train-formation-padding-inline)}.sbb-train-formation:before{grid-area:start}.sbb-train-formation:after{grid-area:end}.sbb-train-formation__sectors{display:flex;grid-area:sectors;gap:var(--sbb-train-formation-wagon-gap)}.sbb-train-formation__sector{--_wagon-sum: var(--sbb-train-formation-wagon-count) * var(--sbb-train-formation-wagon-width);--_blocked-passage-sum: var(--sbb-train-formation-wagon-blocked-passage-count) * var(--sbb-train-formation-blocked-passage-width);--_total-count: calc( var(--sbb-train-formation-wagon-count) + var(--sbb-train-formation-wagon-blocked-passage-count) );--_gap-sum: calc((var(--_total-count) - 1) * var(--sbb-train-formation-wagon-gap));--_sector-width: calc(var(--_wagon-sum) + var(--_blocked-passage-sum) + var(--_gap-sum));--sbb-text-font-size: var(--sbb-text-font-size-xs);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);flex:0 0 var(--_sector-width);text-align:center;overflow-x:clip}.sbb-train-formation__sector-sticky-wrapper{position:sticky;inset:auto 0;padding:0 var(--sbb-spacing-fixed-1x);margin:0 var(--sbb-spacing-fixed-2x);overflow:hidden;white-space:nowrap}.sbb-train-formation__sector-sticky-wrapper:before,.sbb-train-formation__sector-sticky-wrapper:after{content:\"\";position:absolute;inset-block:calc(50% - var(--sbb-train-formation-sector-line-width) / 2);border-block-end:var(--sbb-train-formation-sector-line-width) solid var(--sbb-train-formation-sector-line-color);width:calc(.5 * var(--_sector-width))}.sbb-train-formation__sector-sticky-wrapper:before{inset-inline-end:100%}.sbb-train-formation__sector-sticky-wrapper:after{inset-inline-start:100%}.sbb-train-formation__trains{grid-area:trains}.sbb-train-formation__train-list{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;gap:var(--sbb-train-formation-wagon-gap)}.sbb-train-formation__train-list>:is(li,span){display:inline-flex}", g = (() => {
|
|
8
|
-
let g = l(s), _, v = [], y = [], b, x = [], S = [];
|
|
9
|
-
return class extends g {
|
|
10
|
-
static {
|
|
11
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
|
|
12
|
-
_ = [a({ reflect: !0 })], b = [o()], e(this, null, _, {
|
|
13
|
-
kind: "accessor",
|
|
14
|
-
name: "view",
|
|
15
|
-
static: !1,
|
|
16
|
-
private: !1,
|
|
17
|
-
access: {
|
|
18
|
-
has: (e) => "view" in e,
|
|
19
|
-
get: (e) => e.view,
|
|
20
|
-
set: (e, t) => {
|
|
21
|
-
e.view = t;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
metadata: t
|
|
25
|
-
}, v, y), e(this, null, b, {
|
|
26
|
-
kind: "accessor",
|
|
27
|
-
name: "_sectors",
|
|
28
|
-
static: !1,
|
|
29
|
-
private: !1,
|
|
30
|
-
access: {
|
|
31
|
-
has: (e) => "_sectors" in e,
|
|
32
|
-
get: (e) => e._sectors,
|
|
33
|
-
set: (e, t) => {
|
|
34
|
-
e._sectors = t;
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
metadata: t
|
|
38
|
-
}, x, S), t && Object.defineProperty(this, Symbol.metadata, {
|
|
39
|
-
enumerable: !0,
|
|
40
|
-
configurable: !0,
|
|
41
|
-
writable: !0,
|
|
42
|
-
value: t
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
static {
|
|
46
|
-
this.elementName = "sbb-train-formation";
|
|
47
|
-
}
|
|
48
|
-
static {
|
|
49
|
-
this.styles = [u, i(h)];
|
|
50
|
-
}
|
|
51
|
-
#e;
|
|
52
|
-
get view() {
|
|
53
|
-
return this.#e;
|
|
54
|
-
}
|
|
55
|
-
set view(e) {
|
|
56
|
-
this.#e = e;
|
|
57
|
-
}
|
|
58
|
-
#t;
|
|
59
|
-
get _sectors() {
|
|
60
|
-
return this.#t;
|
|
61
|
-
}
|
|
62
|
-
set _sectors(e) {
|
|
63
|
-
this.#t = e;
|
|
64
|
-
}
|
|
65
|
-
constructor() {
|
|
66
|
-
super(), this.listChildLocalNames = ["sbb-train"], this.#e = t(this, v, "side"), this.#t = (t(this, y), t(this, x, [])), this._language = (t(this, S), new c(this)), this.addEventListener?.("trainslotchange", (e) => this._readSectors(e)), this.addEventListener?.("sectorchange", (e) => this._readSectors(e));
|
|
67
|
-
}
|
|
68
|
-
_readSectors(e) {
|
|
69
|
-
e?.stopPropagation(), this._sectors = Array.from(this.querySelectorAll?.("sbb-train-wagon,sbb-train-blocked-passage") ?? []).reduce((e, t) => {
|
|
70
|
-
let n = e[e.length - 1];
|
|
71
|
-
if (t.localName === "sbb-train-wagon") {
|
|
72
|
-
let r = t.sector ?? t.getAttribute("sector");
|
|
73
|
-
!n.label && r && (n.label = r), !r || n.label === r ? n.wagonCount++ : e.push({
|
|
74
|
-
label: r,
|
|
75
|
-
wagonCount: 1,
|
|
76
|
-
blockedPassageCount: 0
|
|
77
|
-
});
|
|
78
|
-
} else t.localName === "sbb-train-blocked-passage" && n.blockedPassageCount++;
|
|
79
|
-
return e;
|
|
80
|
-
}, [{
|
|
81
|
-
wagonCount: 0,
|
|
82
|
-
blockedPassageCount: 0
|
|
83
|
-
}]);
|
|
84
|
-
}
|
|
85
|
-
willUpdate(e) {
|
|
86
|
-
super.willUpdate(e), e.has("listChildren") && this._readSectors();
|
|
87
|
-
}
|
|
88
|
-
render() {
|
|
89
|
-
return n`
|
|
90
|
-
<div class="sbb-train-formation">
|
|
91
|
-
${this._sectors.length && this._sectors[0].label !== void 0 ? n`<div class="sbb-train-formation__sectors" aria-hidden="true">
|
|
92
|
-
${this._sectors.map((e) => n`<span
|
|
93
|
-
class="sbb-train-formation__sector"
|
|
94
|
-
style=${m({
|
|
95
|
-
"--sbb-train-formation-wagon-count": e.wagonCount,
|
|
96
|
-
"--sbb-train-formation-wagon-blocked-passage-count": e.blockedPassageCount
|
|
97
|
-
})}
|
|
98
|
-
>
|
|
99
|
-
<span class="sbb-train-formation__sector-sticky-wrapper">
|
|
100
|
-
${`${e.wagonCount === 1 && e.label ? f[this._language.current] : d[this._language.current]} ${e.label ? e.label : ""}`}
|
|
101
|
-
</span>
|
|
102
|
-
</span>`)}
|
|
103
|
-
</div>` : r}
|
|
104
|
-
|
|
105
|
-
<div class="sbb-train-formation__trains">
|
|
106
|
-
${this.renderList({
|
|
107
|
-
class: "sbb-train-formation__train-list",
|
|
108
|
-
ariaLabel: p[this._language.current]
|
|
109
|
-
})}
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
`;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
})();
|
|
116
|
-
//#endregion
|
|
117
|
-
export { g as t };
|
|
@@ -1,257 +0,0 @@
|
|
|
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, i18nAdditionalWagonInformationHeading as d, i18nBlockedPassage as f, i18nClass as p, i18nClosedCompartmentLabel as m, i18nCouchetteWagonLabel as h, i18nLocomotiveLabel as g, i18nRestaurantWagonLabel as _, i18nSector as v, i18nSleepingWagonLabel as y, i18nWagonLabel as b, i18nWagonLabelNumber as x, omitEmptyConverter as S } from "./core.js";
|
|
5
|
-
import { html as C } from "lit/static-html.js";
|
|
6
|
-
import { SbbIconElement as w } from "./icon.pure.js";
|
|
7
|
-
import { SbbTimetableOccupancyIconElement as T } from "./timetable-occupancy-icon.pure.js";
|
|
8
|
-
import { when as E } from "lit/directives/when.js";
|
|
9
|
-
//#region src/elements/train/train-wagon/train-wagon.scss?inline
|
|
10
|
-
var D = ":host{display:block;--sbb-train-wagon-width: var(--sbb-train-formation-wagon-width);--sbb-train-wagon-height: var(--sbb-train-formation-wagon-height);--sbb-train-wagon-shape-color: var(--sbb-color-3);--sbb-train-wagon-main-icon-height: 1.25rem;--sbb-train-wagon-main-icon-margin-block-start: .625rem;--sbb-train-wagon-attribute-icon-gap: var(--sbb-spacing-fixed-1x);--sbb-train-wagon-attribute-icon-height: .875rem;--sbb-train-wagon-attribute-icon-color: var(--sbb-color-1);--sbb-train-wagon-occupancy-height: .75rem}@media(forced-colors:active){:host{--sbb-train-wagon-shape-color: CanvasText}}@media(forced-colors:active){:host([type=closed]){--sbb-train-wagon-shape-color: GrayText}}:host(:is([type=sleeping],[type=couchette])){--sbb-train-wagon-main-icon-margin-block-start: .390625rem}:host(:is([type=wagon],[type=restaurant],[type=sleeping],[type=couchette])){--sbb-train-wagon-shape: var(--sbb-train-wagon-wagon-shape)}:host([type=closed]){--sbb-train-wagon-shape: var(--sbb-train-wagon-wagon-closed-shape)}:host([type=locomotive]){--sbb-train-wagon-shape: var(--sbb-train-wagon-locomotive-shape)}:host([type=wagon-end-left]){--sbb-train-wagon-shape: var(--sbb-train-wagon-wagon-end-left-shape)}:host([type=wagon-end-right]){--sbb-train-wagon-shape: var(--sbb-train-wagon-wagon-end-right-shape)}.sbb-train-wagon{display:flex;flex-direction:column;align-items:center;width:var(--sbb-train-wagon-width);gap:var(--sbb-train-formation-vertical-gap)}.sbb-train-wagon__compartment{list-style:none;margin:0;padding:0;font-size:inherit;display:grid;grid-template:\"label label\" auto \"occupancy class\" 1fr/1fr 1fr}.sbb-train-wagon__compartment:before{content:\"\";grid-column:occupancy/class;grid-row:occupancy;pointer-events:none;width:var(--sbb-train-wagon-width);height:var(--sbb-train-wagon-height);background-color:var(--sbb-train-wagon-shape-color);-webkit-mask-image:var(--sbb-train-wagon-shape);mask-image:var(--sbb-train-wagon-shape)}.sbb-train-wagon__main-icon{--sbb-icon-svg-height: var(--sbb-train-wagon-main-icon-height);grid-column:occupancy/class;grid-row:occupancy;margin-block-start:var(--sbb-train-wagon-main-icon-margin-block-start);justify-self:center}.sbb-train-wagon__label{--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);grid-area:label;text-align:center;display:var(--sbb-train-formation-wagon-label-display, inline-block);min-height:calc(1em * var(--sbb-typo-line-height-text))}.sbb-train-wagon__occupancy,.sbb-train-wagon__class{height:var(--sbb-train-wagon-height);display:flex;align-items:center;justify-content:center}.sbb-train-wagon__occupancy{--sbb-icon-svg-height: var(--sbb-train-wagon-occupancy-height);grid-area:occupancy}.sbb-train-wagon__class{--sbb-title-font-size: var(--sbb-title-font-size-level-6-lean, var(--sbb-heading-font-size-6));--sbb-title-line-height: var(--sbb-typo-line-height-text);margin-block:var(--sbb-title-margin-block, 0);margin-inline:0;font-family:var(--sbb-typo-font-family);font-weight:700;font-size:var(--sbb-title-font-size);letter-spacing:var(--sbb-typo-letter-spacing-heading);line-height:var(--sbb-title-line-height, var(--sbb-typo-line-height-heading));grid-area:class}.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;flex-wrap:wrap;justify-content:center;gap:var(--sbb-train-wagon-attribute-icon-gap);color:var(--sbb-train-wagon-attribute-icon-color)}.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}", O = {
|
|
11
|
-
couchette: "sa-cc",
|
|
12
|
-
sleeping: "sa-wl",
|
|
13
|
-
restaurant: "sa-wr"
|
|
14
|
-
}, k = (() => {
|
|
15
|
-
let k = s(a), A, j = [], M = [], N, P = [], F = [], I, L = [], R = [], z, B = [], V = [], H, U = [], W = [], G, K = [], q = [], J, Y = [], X = [];
|
|
16
|
-
return class extends k {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments), this.#e = t(this, j, "wagon"), this.listChildLocalNames = (t(this, M), ["sbb-icon"]), this.#t = t(this, P, null), this.#n = (t(this, F), t(this, L, "")), this.#r = (t(this, R), t(this, B, "none")), this.#i = (t(this, V), t(this, U, null)), this.#a = (t(this, W), t(this, K, "")), this.#o = (t(this, q), t(this, Y, "")), this._language = (t(this, X), new o(this));
|
|
19
|
-
}
|
|
20
|
-
static {
|
|
21
|
-
let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(k[Symbol.metadata] ?? null) : void 0;
|
|
22
|
-
A = [i({ reflect: !0 })], N = [i()], I = [
|
|
23
|
-
l(),
|
|
24
|
-
u((e) => e._sectorChanged()),
|
|
25
|
-
i({
|
|
26
|
-
reflect: !0,
|
|
27
|
-
converter: S
|
|
28
|
-
})
|
|
29
|
-
], z = [i({ attribute: "blocked-passage" })], H = [i({ attribute: "wagon-class" })], G = [l(), i({
|
|
30
|
-
reflect: !0,
|
|
31
|
-
converter: S
|
|
32
|
-
})], J = [l(), i({ attribute: "additional-accessibility-text" })], e(this, null, A, {
|
|
33
|
-
kind: "accessor",
|
|
34
|
-
name: "type",
|
|
35
|
-
static: !1,
|
|
36
|
-
private: !1,
|
|
37
|
-
access: {
|
|
38
|
-
has: (e) => "type" in e,
|
|
39
|
-
get: (e) => e.type,
|
|
40
|
-
set: (e, t) => {
|
|
41
|
-
e.type = t;
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
metadata: t
|
|
45
|
-
}, j, M), e(this, null, N, {
|
|
46
|
-
kind: "accessor",
|
|
47
|
-
name: "occupancy",
|
|
48
|
-
static: !1,
|
|
49
|
-
private: !1,
|
|
50
|
-
access: {
|
|
51
|
-
has: (e) => "occupancy" in e,
|
|
52
|
-
get: (e) => e.occupancy,
|
|
53
|
-
set: (e, t) => {
|
|
54
|
-
e.occupancy = t;
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
metadata: t
|
|
58
|
-
}, P, F), e(this, null, I, {
|
|
59
|
-
kind: "accessor",
|
|
60
|
-
name: "sector",
|
|
61
|
-
static: !1,
|
|
62
|
-
private: !1,
|
|
63
|
-
access: {
|
|
64
|
-
has: (e) => "sector" in e,
|
|
65
|
-
get: (e) => e.sector,
|
|
66
|
-
set: (e, t) => {
|
|
67
|
-
e.sector = t;
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
metadata: t
|
|
71
|
-
}, L, R), e(this, null, z, {
|
|
72
|
-
kind: "accessor",
|
|
73
|
-
name: "blockedPassage",
|
|
74
|
-
static: !1,
|
|
75
|
-
private: !1,
|
|
76
|
-
access: {
|
|
77
|
-
has: (e) => "blockedPassage" in e,
|
|
78
|
-
get: (e) => e.blockedPassage,
|
|
79
|
-
set: (e, t) => {
|
|
80
|
-
e.blockedPassage = t;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
metadata: t
|
|
84
|
-
}, B, V), e(this, null, H, {
|
|
85
|
-
kind: "accessor",
|
|
86
|
-
name: "wagonClass",
|
|
87
|
-
static: !1,
|
|
88
|
-
private: !1,
|
|
89
|
-
access: {
|
|
90
|
-
has: (e) => "wagonClass" in e,
|
|
91
|
-
get: (e) => e.wagonClass,
|
|
92
|
-
set: (e, t) => {
|
|
93
|
-
e.wagonClass = t;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
metadata: t
|
|
97
|
-
}, U, W), e(this, null, G, {
|
|
98
|
-
kind: "accessor",
|
|
99
|
-
name: "label",
|
|
100
|
-
static: !1,
|
|
101
|
-
private: !1,
|
|
102
|
-
access: {
|
|
103
|
-
has: (e) => "label" in e,
|
|
104
|
-
get: (e) => e.label,
|
|
105
|
-
set: (e, t) => {
|
|
106
|
-
e.label = t;
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
metadata: t
|
|
110
|
-
}, K, q), e(this, null, J, {
|
|
111
|
-
kind: "accessor",
|
|
112
|
-
name: "additionalAccessibilityText",
|
|
113
|
-
static: !1,
|
|
114
|
-
private: !1,
|
|
115
|
-
access: {
|
|
116
|
-
has: (e) => "additionalAccessibilityText" in e,
|
|
117
|
-
get: (e) => e.additionalAccessibilityText,
|
|
118
|
-
set: (e, t) => {
|
|
119
|
-
e.additionalAccessibilityText = t;
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
metadata: t
|
|
123
|
-
}, Y, X), t && Object.defineProperty(this, Symbol.metadata, {
|
|
124
|
-
enumerable: !0,
|
|
125
|
-
configurable: !0,
|
|
126
|
-
writable: !0,
|
|
127
|
-
value: t
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
static {
|
|
131
|
-
this.elementName = "sbb-train-wagon";
|
|
132
|
-
}
|
|
133
|
-
static {
|
|
134
|
-
this.elementDependencies = [w, T];
|
|
135
|
-
}
|
|
136
|
-
static {
|
|
137
|
-
this.styles = [c, r(D)];
|
|
138
|
-
}
|
|
139
|
-
static {
|
|
140
|
-
this.events = { sectorchange: "sectorchange" };
|
|
141
|
-
}
|
|
142
|
-
#e;
|
|
143
|
-
get type() {
|
|
144
|
-
return this.#e;
|
|
145
|
-
}
|
|
146
|
-
set type(e) {
|
|
147
|
-
this.#e = e;
|
|
148
|
-
}
|
|
149
|
-
#t;
|
|
150
|
-
get occupancy() {
|
|
151
|
-
return this.#t;
|
|
152
|
-
}
|
|
153
|
-
set occupancy(e) {
|
|
154
|
-
this.#t = e;
|
|
155
|
-
}
|
|
156
|
-
#n;
|
|
157
|
-
get sector() {
|
|
158
|
-
return this.#n;
|
|
159
|
-
}
|
|
160
|
-
set sector(e) {
|
|
161
|
-
this.#n = e;
|
|
162
|
-
}
|
|
163
|
-
#r;
|
|
164
|
-
get blockedPassage() {
|
|
165
|
-
return this.#r;
|
|
166
|
-
}
|
|
167
|
-
set blockedPassage(e) {
|
|
168
|
-
this.#r = e;
|
|
169
|
-
}
|
|
170
|
-
#i;
|
|
171
|
-
get wagonClass() {
|
|
172
|
-
return this.#i;
|
|
173
|
-
}
|
|
174
|
-
set wagonClass(e) {
|
|
175
|
-
this.#i = e;
|
|
176
|
-
}
|
|
177
|
-
#a;
|
|
178
|
-
get label() {
|
|
179
|
-
return this.#a;
|
|
180
|
-
}
|
|
181
|
-
set label(e) {
|
|
182
|
-
this.#a = e;
|
|
183
|
-
}
|
|
184
|
-
#o;
|
|
185
|
-
get additionalAccessibilityText() {
|
|
186
|
-
return this.#o;
|
|
187
|
-
}
|
|
188
|
-
set additionalAccessibilityText(e) {
|
|
189
|
-
this.#o = e;
|
|
190
|
-
}
|
|
191
|
-
_sectorChanged() {
|
|
192
|
-
this.dispatchEvent(new Event("sectorchange", {
|
|
193
|
-
bubbles: !0,
|
|
194
|
-
composed: !0
|
|
195
|
-
}));
|
|
196
|
-
}
|
|
197
|
-
_typeLabel() {
|
|
198
|
-
return this.type === "closed" ? m[this._language.current] : this.type === "locomotive" ? g[this._language.current] : this.type === "couchette" ? h[this._language.current] : this.type === "sleeping" ? y[this._language.current] : this.type === "restaurant" ? _[this._language.current] : b[this._language.current];
|
|
199
|
-
}
|
|
200
|
-
render() {
|
|
201
|
-
let e = this.type === "wagon-end-left" && this.blockedPassage === "none" ? "previous" : this.type === "wagon-end-right" && this.blockedPassage === "none" ? "next" : this.blockedPassage ?? "none", t = e !== "none", r = +!!this.sector + +!!this.label + +(!!this.wagonClass && this.type !== "closed") + +(!!this.occupancy && this.type !== "closed") + +t, i = `${v[this._language.current]}, ${this.sector}`, a = this.label ? C`<span class="sbb-screen-reader-only">
|
|
202
|
-
${`${x[this._language.current]}, ${this.label}`}
|
|
203
|
-
</span>
|
|
204
|
-
<span aria-hidden="true">${this.label}</span>` : n, o = C`<span class="sbb-screen-reader-only">
|
|
205
|
-
${this.wagonClass === "1" ? p.first[this._language.current] : p.second[this._language.current]}
|
|
206
|
-
</span>
|
|
207
|
-
<span aria-hidden="true">${this.wagonClass}</span>`, s = O[this.type] ? C`<sbb-icon
|
|
208
|
-
name=${O[this.type]}
|
|
209
|
-
class="sbb-train-wagon__main-icon"
|
|
210
|
-
></sbb-icon>` : n;
|
|
211
|
-
return C`
|
|
212
|
-
<div class="sbb-train-wagon">
|
|
213
|
-
${E(r > 1, () => C`<ul aria-label=${this._typeLabel()} class="sbb-train-wagon__compartment">
|
|
214
|
-
${this.sector ? C`<li class="sbb-screen-reader-only">${i}</li>` : n}
|
|
215
|
-
<li class="sbb-train-wagon__label" aria-hidden=${`${!this.label}`}>
|
|
216
|
-
${a}
|
|
217
|
-
</li>
|
|
218
|
-
${this.wagonClass && this.type !== "closed" ? C`<li class="sbb-train-wagon__class">${o}</li>` : n}
|
|
219
|
-
${this.occupancy && this.type !== "closed" ? C`<sbb-timetable-occupancy-icon
|
|
220
|
-
class="sbb-train-wagon__occupancy"
|
|
221
|
-
role="listitem"
|
|
222
|
-
occupancy=${this.occupancy}
|
|
223
|
-
></sbb-timetable-occupancy-icon>` : n}
|
|
224
|
-
${t ? C`<li class="sbb-screen-reader-only">
|
|
225
|
-
${f[e][this._language.current]}
|
|
226
|
-
</li>` : n}
|
|
227
|
-
${s}
|
|
228
|
-
</ul>`, () => C`<div class="sbb-train-wagon__compartment">
|
|
229
|
-
<span class="sbb-screen-reader-only">
|
|
230
|
-
${`${this._typeLabel()}${this.sector ? `, ${i}` : ""}`}
|
|
231
|
-
</span>
|
|
232
|
-
<span class="sbb-train-wagon__label" aria-hidden=${`${!this.label}`}>
|
|
233
|
-
${a}
|
|
234
|
-
</span>
|
|
235
|
-
|
|
236
|
-
${this.wagonClass && this.type !== "closed" ? C`<span class="sbb-train-wagon__class">${o}</span>` : n}
|
|
237
|
-
${this.occupancy && this.type !== "closed" ? C`<sbb-timetable-occupancy-icon
|
|
238
|
-
class="sbb-train-wagon__occupancy"
|
|
239
|
-
occupancy=${this.occupancy}
|
|
240
|
-
></sbb-timetable-occupancy-icon>` : n}
|
|
241
|
-
${t ? C`<span class="sbb-screen-reader-only">
|
|
242
|
-
${f[e][this._language.current]}
|
|
243
|
-
</span>` : n}
|
|
244
|
-
${s}
|
|
245
|
-
</div> `)}
|
|
246
|
-
${this.additionalAccessibilityText ? C`<span class="sbb-screen-reader-only">, ${this.additionalAccessibilityText}</span>` : n}
|
|
247
|
-
${this.renderList({
|
|
248
|
-
class: "sbb-train-wagon__attribute-icon-list",
|
|
249
|
-
ariaLabel: d[this._language.current]
|
|
250
|
-
})}
|
|
251
|
-
</div>
|
|
252
|
-
`;
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
})();
|
|
256
|
-
//#endregion
|
|
257
|
-
export { k as t };
|