@sbb-esta/lyne-elements 1.15.0 → 1.15.1
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/base-elements/link-base-element.d.ts +1 -0
- package/core/base-elements/link-base-element.d.ts.map +1 -1
- package/core/base-elements.js +46 -43
- package/core/config/config.d.ts +3 -0
- package/core/config/config.d.ts.map +1 -1
- package/custom-elements.json +344 -35
- package/development/core/base-elements/link-base-element.d.ts +1 -0
- package/development/core/base-elements/link-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +5 -2
- package/development/core/config/config.d.ts +3 -0
- package/development/core/config/config.d.ts.map +1 -1
- package/development/core/config.js +1 -1
- package/development/navigation/navigation.js +2 -7
- package/development/teaser/teaser.d.ts +2 -1
- package/development/teaser/teaser.d.ts.map +1 -1
- package/development/teaser-product/common/teaser-product-common.d.ts +1 -1
- package/development/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/development/teaser-product/common.js +19 -19
- package/development/teaser-product/teaser-product/teaser-product.d.ts +2 -1
- package/development/teaser-product/teaser-product/teaser-product.d.ts.map +1 -1
- package/development/teaser-product/teaser-product.js +44 -12
- package/development/teaser.js +33 -7
- package/navigation/navigation.js +1 -1
- package/package.json +1 -1
- package/teaser/teaser.d.ts +2 -1
- package/teaser/teaser.d.ts.map +1 -1
- package/teaser-product/common/teaser-product-common.d.ts +1 -1
- package/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/teaser-product/common.js +22 -20
- package/teaser-product/teaser-product/teaser-product.d.ts +2 -1
- package/teaser-product/teaser-product/teaser-product.d.ts.map +1 -1
- package/teaser-product/teaser-product.js +26 -13
- package/teaser.js +38 -26
|
@@ -26,5 +26,6 @@ export declare abstract class SbbLinkBaseElement extends SbbActionBaseElement {
|
|
|
26
26
|
private _evaluateRelAttribute;
|
|
27
27
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
28
28
|
protected render(): TemplateResult;
|
|
29
|
+
protected renderLink(renderContent: TemplateResult): TemplateResult;
|
|
29
30
|
}
|
|
30
31
|
//# sourceMappingURL=link-base-element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAIe,kBAAmB,SAAQ,oBAAoB;IAC5D,0CAA0C;IAC1C,SAEgB,IAAI,EAAE,MAAM,CAAM;IAElC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,cAAc,GAAG,MAAM,CAAM;IAErD,wEAAwE;IACxE,SAEgB,GAAG,EAAE,MAAM,CAAM;IAEjC,kEAAkE;IAClE,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,wEAAwE;IACxE,SAEgB,kBAAkB,EAAE,MAAM,CAAM;IAEhD,SAAS,CAAC,QAAQ,wBAAmC;;IASrD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;
|
|
1
|
+
{"version":3,"file":"link-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/link-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAGnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,6BAA6B,CAAC;AAErC,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAErE,uBAAuB;AACvB,8BAIe,kBAAmB,SAAQ,oBAAoB;IAC5D,0CAA0C;IAC1C,SAEgB,IAAI,EAAE,MAAM,CAAM;IAElC,uCAAuC;IACvC,SAEgB,MAAM,EAAE,cAAc,GAAG,MAAM,CAAM;IAErD,wEAAwE;IACxE,SAEgB,GAAG,EAAE,MAAM,CAAM;IAEjC,kEAAkE;IAClE,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C,wEAAwE;IACxE,SAEgB,kBAAkB,EAAE,MAAM,CAAM;IAEhD,SAAS,CAAC,QAAQ,wBAAmC;;IASrD,gBAAgB;IACA,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI;IAI/D,gBAAgB;IACA,IAAI,IAAI,IAAI;IAI5B,gBAAgB;IACA,KAAK,IAAI,IAAI;IAI7B,OAAO,CAAC,qBAAqB,CAE3B;IAEF,mHAAmH;cAChG,MAAM,IAAI,cAAc;IAI3C,SAAS,CAAC,UAAU,CAAC,aAAa,EAAE,cAAc,GAAG,cAAc;CAqBpE"}
|
package/core/base-elements.js
CHANGED
|
@@ -2,7 +2,7 @@ var H = (l) => {
|
|
|
2
2
|
throw TypeError(l);
|
|
3
3
|
};
|
|
4
4
|
var M = (l, r, n) => r.has(l) || H("Cannot " + n);
|
|
5
|
-
var S = (l, r, n) => (M(l, r, "read from private field"), n ? n.call(l) : r.get(l)), E = (l, r, n) => r.has(l) ? H("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, n), h = (l, r, n,
|
|
5
|
+
var S = (l, r, n) => (M(l, r, "read from private field"), n ? n.call(l) : r.get(l)), E = (l, r, n) => r.has(l) ? H("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, n), h = (l, r, n, i) => (M(l, r, "write to private field"), i ? i.call(l, n) : r.set(l, n), n);
|
|
6
6
|
import { __esDecorate as b, __runInitializers as o } from "tslib";
|
|
7
7
|
import { html as P, LitElement as W, isServer as F, nothing as C } from "lit";
|
|
8
8
|
import { hostAttributes as q, forceType as x } from "./decorators.js";
|
|
@@ -15,7 +15,7 @@ let G = (() => {
|
|
|
15
15
|
var u;
|
|
16
16
|
let l = [q({
|
|
17
17
|
"data-action": ""
|
|
18
|
-
})], r, n = [],
|
|
18
|
+
})], r, n = [], i, g = W;
|
|
19
19
|
return u = class extends g {
|
|
20
20
|
get maybeDisabled() {
|
|
21
21
|
const d = this;
|
|
@@ -46,17 +46,17 @@ let G = (() => {
|
|
|
46
46
|
render() {
|
|
47
47
|
return P` <span class="sbb-action-base ${this.localName}">${this.renderTemplate()}</span> `;
|
|
48
48
|
}
|
|
49
|
-
},
|
|
49
|
+
}, i = u, (() => {
|
|
50
50
|
const d = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
|
|
51
|
-
b(null, r = { value:
|
|
52
|
-
})(),
|
|
51
|
+
b(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: d }, null, n), i = r.value, d && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: d }), o(i, n);
|
|
52
|
+
})(), i;
|
|
53
53
|
})(), le = (() => {
|
|
54
54
|
var _, f, m;
|
|
55
55
|
let l = [q({
|
|
56
56
|
role: "button",
|
|
57
57
|
tabindex: "0",
|
|
58
58
|
"data-button": ""
|
|
59
|
-
})], r, n = [],
|
|
59
|
+
})], r, n = [], i, g = G, u = [], z, d = [], D = [], O, $, A, T = [], B = [];
|
|
60
60
|
return m = class extends g {
|
|
61
61
|
constructor() {
|
|
62
62
|
super();
|
|
@@ -138,7 +138,7 @@ let G = (() => {
|
|
|
138
138
|
attributeChangedCallback(e, t, c) {
|
|
139
139
|
(!["name", "value"].includes(e) || t !== c) && super.attributeChangedCallback(e, t, c);
|
|
140
140
|
}
|
|
141
|
-
}, _ = new WeakMap(), f = new WeakMap(),
|
|
141
|
+
}, _ = new WeakMap(), f = new WeakMap(), i = m, (() => {
|
|
142
142
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
|
|
143
143
|
z = [v()], O = [v()], $ = [v()], A = [x(), v()], b(m, null, z, { kind: "accessor", name: "type", static: !1, private: !1, access: { has: (t) => "type" in t, get: (t) => t.type, set: (t, c) => {
|
|
144
144
|
t.type = c;
|
|
@@ -148,13 +148,13 @@ let G = (() => {
|
|
|
148
148
|
t.value = c;
|
|
149
149
|
} }, metadata: e }, null, u), b(m, null, A, { kind: "accessor", name: "form", static: !1, private: !1, access: { has: (t) => "form" in t, get: (t) => t.form, set: (t, c) => {
|
|
150
150
|
t.form = c;
|
|
151
|
-
} }, metadata: e }, T, B), b(null, r = { value:
|
|
152
|
-
})(),
|
|
151
|
+
} }, metadata: e }, T, B), b(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: e }, null, n), i = r.value, e && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e }), o(i, n);
|
|
152
|
+
})(), i;
|
|
153
153
|
})(), ne = (() => {
|
|
154
|
-
var t, c, k, w,
|
|
154
|
+
var t, c, k, w, I, p;
|
|
155
155
|
let l = [q({
|
|
156
156
|
"data-link": ""
|
|
157
|
-
})], r, n = [],
|
|
157
|
+
})], r, n = [], i, g = G, u, z = [], d = [], D, O = [], $ = [], A, T = [], B = [], _, f = [], m = [], j, R = [], e = [];
|
|
158
158
|
return p = class extends g {
|
|
159
159
|
constructor() {
|
|
160
160
|
super();
|
|
@@ -162,61 +162,64 @@ let G = (() => {
|
|
|
162
162
|
E(this, c);
|
|
163
163
|
E(this, k);
|
|
164
164
|
E(this, w);
|
|
165
|
-
E(this,
|
|
166
|
-
h(this, t, o(this, z, "")), h(this, c, (o(this, d), o(this, O, ""))), h(this, k, (o(this, $), o(this, T, ""))), h(this, w, (o(this, B), o(this, f, !1))), h(this,
|
|
165
|
+
E(this, I);
|
|
166
|
+
h(this, t, o(this, z, "")), h(this, c, (o(this, d), o(this, O, ""))), h(this, k, (o(this, $), o(this, T, ""))), h(this, w, (o(this, B), o(this, f, !1))), h(this, I, (o(this, m), o(this, R, ""))), this.language = (o(this, e), new Q(this)), this._evaluateRelAttribute = () => this.rel ? this.rel : this.target === "_blank" ? "external noopener nofollow" : C, F || this.setupBaseEventHandlers();
|
|
167
167
|
}
|
|
168
168
|
/** The href value you want to link to. */
|
|
169
169
|
get href() {
|
|
170
170
|
return S(this, t);
|
|
171
171
|
}
|
|
172
|
-
set href(
|
|
173
|
-
h(this, t,
|
|
172
|
+
set href(s) {
|
|
173
|
+
h(this, t, s);
|
|
174
174
|
}
|
|
175
175
|
/** Where to display the linked URL. */
|
|
176
176
|
get target() {
|
|
177
177
|
return S(this, c);
|
|
178
178
|
}
|
|
179
|
-
set target(
|
|
180
|
-
h(this, c,
|
|
179
|
+
set target(s) {
|
|
180
|
+
h(this, c, s);
|
|
181
181
|
}
|
|
182
182
|
/** The relationship of the linked URL as space-separated link types. */
|
|
183
183
|
get rel() {
|
|
184
184
|
return S(this, k);
|
|
185
185
|
}
|
|
186
|
-
set rel(
|
|
187
|
-
h(this, k,
|
|
186
|
+
set rel(s) {
|
|
187
|
+
h(this, k, s);
|
|
188
188
|
}
|
|
189
189
|
/** Whether the browser will show the download dialog on click. */
|
|
190
190
|
get download() {
|
|
191
191
|
return S(this, w);
|
|
192
192
|
}
|
|
193
|
-
set download(
|
|
194
|
-
h(this, w,
|
|
193
|
+
set download(s) {
|
|
194
|
+
h(this, w, s);
|
|
195
195
|
}
|
|
196
196
|
/** This will be forwarded as aria-label to the inner anchor element. */
|
|
197
197
|
get accessibilityLabel() {
|
|
198
|
-
return S(this,
|
|
198
|
+
return S(this, I);
|
|
199
199
|
}
|
|
200
|
-
set accessibilityLabel(
|
|
201
|
-
h(this,
|
|
200
|
+
set accessibilityLabel(s) {
|
|
201
|
+
h(this, I, s);
|
|
202
202
|
}
|
|
203
203
|
/** @internal */
|
|
204
|
-
focus(
|
|
204
|
+
focus(s) {
|
|
205
205
|
var a;
|
|
206
|
-
(a = this.shadowRoot.querySelector("a")) == null || a.focus(
|
|
206
|
+
(a = this.shadowRoot.querySelector("a")) == null || a.focus(s);
|
|
207
207
|
}
|
|
208
208
|
/** @internal */
|
|
209
209
|
blur() {
|
|
210
|
-
var
|
|
211
|
-
(
|
|
210
|
+
var s;
|
|
211
|
+
(s = this.shadowRoot.querySelector("a")) == null || s.blur();
|
|
212
212
|
}
|
|
213
213
|
/** @internal */
|
|
214
214
|
click() {
|
|
215
|
-
var
|
|
216
|
-
(
|
|
215
|
+
var s;
|
|
216
|
+
(s = this.shadowRoot.querySelector("a")) == null || s.click();
|
|
217
217
|
}
|
|
218
218
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
219
219
|
render() {
|
|
220
|
+
return this.renderLink(this.renderTemplate());
|
|
221
|
+
}
|
|
222
|
+
renderLink(s) {
|
|
220
223
|
return P`
|
|
221
224
|
<a
|
|
222
225
|
class="sbb-action-base ${this.localName}"
|
|
@@ -228,31 +231,31 @@ let G = (() => {
|
|
|
228
231
|
tabindex=${this.maybeDisabled && !this.maybeDisabledInteractive ? "-1" : C}
|
|
229
232
|
aria-disabled=${this.maybeDisabled ? "true" : C}
|
|
230
233
|
>
|
|
231
|
-
${
|
|
234
|
+
${s}
|
|
232
235
|
${this.href && this.target === "_blank" ? P`<sbb-screen-reader-only
|
|
233
236
|
>. ${U[this.language.current]}</sbb-screen-reader-only
|
|
234
237
|
>` : C}
|
|
235
238
|
</a>
|
|
236
239
|
`;
|
|
237
240
|
}
|
|
238
|
-
}, t = new WeakMap(), c = new WeakMap(), k = new WeakMap(), w = new WeakMap(),
|
|
239
|
-
const
|
|
241
|
+
}, t = new WeakMap(), c = new WeakMap(), k = new WeakMap(), w = new WeakMap(), I = new WeakMap(), i = p, (() => {
|
|
242
|
+
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(g[Symbol.metadata] ?? null) : void 0;
|
|
240
243
|
u = [x(), v()], D = [x(), v()], A = [x(), v()], _ = [x(), v({ type: Boolean })], j = [x(), v({ attribute: "accessibility-label" })], b(p, null, u, { kind: "accessor", name: "href", static: !1, private: !1, access: { has: (a) => "href" in a, get: (a) => a.href, set: (a, y) => {
|
|
241
244
|
a.href = y;
|
|
242
|
-
} }, metadata:
|
|
245
|
+
} }, metadata: s }, z, d), b(p, null, D, { kind: "accessor", name: "target", static: !1, private: !1, access: { has: (a) => "target" in a, get: (a) => a.target, set: (a, y) => {
|
|
243
246
|
a.target = y;
|
|
244
|
-
} }, metadata:
|
|
247
|
+
} }, metadata: s }, O, $), b(p, null, A, { kind: "accessor", name: "rel", static: !1, private: !1, access: { has: (a) => "rel" in a, get: (a) => a.rel, set: (a, y) => {
|
|
245
248
|
a.rel = y;
|
|
246
|
-
} }, metadata:
|
|
249
|
+
} }, metadata: s }, T, B), b(p, null, _, { kind: "accessor", name: "download", static: !1, private: !1, access: { has: (a) => "download" in a, get: (a) => a.download, set: (a, y) => {
|
|
247
250
|
a.download = y;
|
|
248
|
-
} }, metadata:
|
|
251
|
+
} }, metadata: s }, f, m), b(p, null, j, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (a) => "accessibilityLabel" in a, get: (a) => a.accessibilityLabel, set: (a, y) => {
|
|
249
252
|
a.accessibilityLabel = y;
|
|
250
|
-
} }, metadata:
|
|
251
|
-
})(),
|
|
253
|
+
} }, metadata: s }, R, e), b(null, r = { value: i }, l, { kind: "class", name: i.name, metadata: s }, null, n), i = r.value, s && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s }), o(i, n);
|
|
254
|
+
})(), i;
|
|
252
255
|
})();
|
|
253
|
-
const
|
|
256
|
+
const L = class L extends W {
|
|
254
257
|
constructor() {
|
|
255
|
-
super(...arguments), this.willOpen = new K(this,
|
|
258
|
+
super(...arguments), this.willOpen = new K(this, L.events.willOpen), this.didOpen = new K(this, L.events.didOpen), this.willClose = new K(this, L.events.willClose), this.didClose = new K(this, L.events.didClose);
|
|
256
259
|
}
|
|
257
260
|
/** The state of the component. */
|
|
258
261
|
set state(r) {
|
|
@@ -269,13 +272,13 @@ const I = class I extends W {
|
|
|
269
272
|
super.connectedCallback(), this.state || (this.state = "closed");
|
|
270
273
|
}
|
|
271
274
|
};
|
|
272
|
-
|
|
275
|
+
L.events = {
|
|
273
276
|
willOpen: "willOpen",
|
|
274
277
|
didOpen: "didOpen",
|
|
275
278
|
willClose: "willClose",
|
|
276
279
|
didClose: "didClose"
|
|
277
280
|
};
|
|
278
|
-
let N =
|
|
281
|
+
let N = L;
|
|
279
282
|
export {
|
|
280
283
|
G as SbbActionBaseElement,
|
|
281
284
|
le as SbbButtonBaseElement,
|
package/core/config/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,UAAU,IAAI,SAAS,CAKtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAG5D"}
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,UAAU,IAAI,SAAS,CAKtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAG5D;AAED,OAAO,CAAC,MAAM,CAAC;IAGb,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B"}
|