@sbb-esta/lyne-elements-dev 5.0.0-next.1-dev.1777289537 → 5.0.0-next.1-dev.1777356659

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.
@@ -1,140 +0,0 @@
1
- import { __esDecorate as e, __runInitializers as t } from "tslib";
2
- import { html as n, unsafeCSS as r } from "lit";
3
- import { property as i } from "lit/decorators.js";
4
- import { SbbLanguageController as a, SbbNegativeMixin as o, SbbScreenReaderOnlyElement as s, boxSizingStyles as c, forceType as l, i18nConnectionFrom as u, i18nConnectionRoundtrip as d, i18nConnectionTo as f, isLean as p } from "./core.js";
5
- import { SbbIconElement as m } from "./icon.pure.js";
6
- import { SbbTitleBase as h } from "./title.pure.js";
7
- //#region src/elements/journey-header/journey-header.scss?inline
8
- var g = ":host{--sbb-journey-header-gap: var(--sbb-spacing-fixed-1x);display:block}:host([id]){scroll-margin-block-start:var(--sbb-spacing-fixed-10x)}:host([negative]){--sbb-title-text-color-normal: var(--sbb-color-3-negative)}sbb-icon{min-width:var(--sbb-size-icon-ui-small)}.sbb-journey-header{display:flex;flex-wrap:wrap;align-items:center;column-gap:var(--sbb-journey-header-gap);width:fit-content}.sbb-journey-header:dir(rtl) sbb-icon{transform:rotate(-180deg)}.sbb-journey-header>span{max-width:100%}", _ = new Map([
9
- ["s", "6"],
10
- ["m", "5"],
11
- ["l", "4"]
12
- ]), v = (() => {
13
- let v = o(h), y, b = [], x = [], S, C = [], w = [], T, E = [], D = [], O, k = [], A = [];
14
- return class extends v {
15
- static {
16
- let t = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
17
- y = [l(), i()], S = [l(), i()], T = [l(), i({
18
- attribute: "round-trip",
19
- type: Boolean
20
- })], O = [i({ reflect: !0 })], e(this, null, y, {
21
- kind: "accessor",
22
- name: "origin",
23
- static: !1,
24
- private: !1,
25
- access: {
26
- has: (e) => "origin" in e,
27
- get: (e) => e.origin,
28
- set: (e, t) => {
29
- e.origin = t;
30
- }
31
- },
32
- metadata: t
33
- }, b, x), e(this, null, S, {
34
- kind: "accessor",
35
- name: "destination",
36
- static: !1,
37
- private: !1,
38
- access: {
39
- has: (e) => "destination" in e,
40
- get: (e) => e.destination,
41
- set: (e, t) => {
42
- e.destination = t;
43
- }
44
- },
45
- metadata: t
46
- }, C, w), e(this, null, T, {
47
- kind: "accessor",
48
- name: "roundTrip",
49
- static: !1,
50
- private: !1,
51
- access: {
52
- has: (e) => "roundTrip" in e,
53
- get: (e) => e.roundTrip,
54
- set: (e, t) => {
55
- e.roundTrip = t;
56
- }
57
- },
58
- metadata: t
59
- }, E, D), e(this, null, O, {
60
- kind: "accessor",
61
- name: "size",
62
- static: !1,
63
- private: !1,
64
- access: {
65
- has: (e) => "size" in e,
66
- get: (e) => e.size,
67
- set: (e, t) => {
68
- e.size = t;
69
- }
70
- },
71
- metadata: t
72
- }, k, A), t && Object.defineProperty(this, Symbol.metadata, {
73
- enumerable: !0,
74
- configurable: !0,
75
- writable: !0,
76
- value: t
77
- });
78
- }
79
- static {
80
- this.elementName = "sbb-journey-header";
81
- }
82
- static {
83
- this.elementDependencies = [m, s];
84
- }
85
- static {
86
- this.styles = [
87
- c,
88
- h.styles,
89
- r(g)
90
- ];
91
- }
92
- #e;
93
- get origin() {
94
- return this.#e;
95
- }
96
- set origin(e) {
97
- this.#e = e;
98
- }
99
- #t;
100
- get destination() {
101
- return this.#t;
102
- }
103
- set destination(e) {
104
- this.#t = e;
105
- }
106
- #n;
107
- get roundTrip() {
108
- return this.#n;
109
- }
110
- set roundTrip(e) {
111
- this.#n = e;
112
- }
113
- #r;
114
- get size() {
115
- return this.#r;
116
- }
117
- set size(e) {
118
- this.#r = e;
119
- }
120
- constructor() {
121
- super(), this.#e = t(this, b, ""), this.#t = (t(this, x), t(this, C, "")), this.#n = (t(this, w), t(this, E, !1)), this.#r = (t(this, D), t(this, k, p() ? "s" : "m")), this._language = (t(this, A), new a(this)), this.level = "3", this.visualLevel = _.get(this.size) ?? null;
122
- }
123
- willUpdate(e) {
124
- super.willUpdate(e), e.has("size") && (this.visualLevel = _.get(this.size) ?? null);
125
- }
126
- render() {
127
- let e = this.roundTrip ? "arrows-long-right-left-small" : "arrow-long-right-small", t = `${u[this._language.current]} ${this.origin} ${f[this._language.current]} ${this.destination} ${this.roundTrip ? d(this.origin)[this._language.current] : ""}`;
128
- return n`
129
- <span class="sbb-journey-header" aria-hidden="true">
130
- <span class="sbb-journey-header__origin">${this.origin}</span>
131
- <sbb-icon name=${e}></sbb-icon>
132
- <span class="sbb-journey-header__destination">${this.destination}</span>
133
- </span>
134
- <sbb-screen-reader-only>${t}</sbb-screen-reader-only>
135
- `;
136
- }
137
- };
138
- })();
139
- //#endregion
140
- export { v as t };