@proximus/lavender-header 2.0.0-alpha.75 → 2.0.0-alpha.76
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/dist/index.es.js +132 -130
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var V = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var V = (r) => {
|
|
2
|
+
throw TypeError(r);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var d = (
|
|
4
|
+
var F = (r, t, e) => t.has(r) || V("Cannot " + e);
|
|
5
|
+
var d = (r, t, e) => (F(r, t, "read from private field"), e ? e.call(r) : t.get(r)), u = (r, t, e) => t.has(r) ? V("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), k = (r, t, e, o) => (F(r, t, "write to private field"), o ? o.call(r, e) : t.set(r, e), e), b = (r, t, e) => (F(r, t, "access private method"), e);
|
|
6
6
|
import "@proximus/lavender-button-icon";
|
|
7
7
|
import "@proximus/lavender-cell";
|
|
8
8
|
import { WithExtraAttributes as J, fontsizeValues as zt, PxElement as $t, transferAccessibilityAttributes as At, fontweightValues as St, colorValues as Ct, log as q, checkName as Et, WrappedInteractiveStateController as Lt } from "@proximus/lavender-common";
|
|
@@ -34,8 +34,8 @@ class Mt extends J {
|
|
|
34
34
|
disconnectedCallback() {
|
|
35
35
|
this.contentObserver.disconnect();
|
|
36
36
|
}
|
|
37
|
-
attributeChangedCallback(t, e,
|
|
38
|
-
super.attributeChangedCallback(t, e,
|
|
37
|
+
attributeChangedCallback(t, e, o) {
|
|
38
|
+
super.attributeChangedCallback(t, e, o), t === "href" && this.$a && o ? this.shadowRoot.innerHTML = this.template() : t === "for" && this.$button && o && (this.shadowRoot.innerHTML = this.template(), this.setupButtonA11y());
|
|
39
39
|
}
|
|
40
40
|
setupButtonA11y() {
|
|
41
41
|
this.$button.ariaExpanded = "false", this.$button.setAttribute("aria-controls", this.for || "");
|
|
@@ -69,7 +69,7 @@ const Rt = ':host([variant="icon-link"]){display:inline-flex}a,.link,::slotted(a
|
|
|
69
69
|
it.replaceSync(Rt);
|
|
70
70
|
nt.replaceSync(qt);
|
|
71
71
|
st.replaceSync(It);
|
|
72
|
-
const Nt = [...zt, "link-m", "link-s"],
|
|
72
|
+
const Nt = [...zt, "link-m", "link-s"], Ot = [
|
|
73
73
|
"link",
|
|
74
74
|
"no-style",
|
|
75
75
|
"skip-link",
|
|
@@ -77,10 +77,10 @@ const Nt = [...zt, "link-m", "link-s"], jt = [
|
|
|
77
77
|
"btn-secondary",
|
|
78
78
|
"btn-tertiary",
|
|
79
79
|
"icon-link"
|
|
80
|
-
],
|
|
80
|
+
], jt = ["", "default", "alternative"], j = class j extends $t {
|
|
81
81
|
constructor() {
|
|
82
82
|
super(it, nt, st), this.template = () => '<slot name="before"></slot><slot></slot><slot name="after"></slot>';
|
|
83
|
-
const t = document.createElement(
|
|
83
|
+
const t = document.createElement(j.nativeName);
|
|
84
84
|
t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
85
85
|
}
|
|
86
86
|
static get observedAttributes() {
|
|
@@ -110,72 +110,72 @@ const Nt = [...zt, "link-m", "link-s"], jt = [
|
|
|
110
110
|
}
|
|
111
111
|
disconnectedCallback() {
|
|
112
112
|
}
|
|
113
|
-
attributeChangedCallback(t, e,
|
|
114
|
-
if (e !==
|
|
113
|
+
attributeChangedCallback(t, e, o) {
|
|
114
|
+
if (e !== o)
|
|
115
115
|
switch (t) {
|
|
116
116
|
case "disabled":
|
|
117
|
-
this.$el.toggleAttribute("aria-disabled"),
|
|
117
|
+
this.$el.toggleAttribute("aria-disabled"), o !== null && this.$el.setAttribute("aria-disabled", "true");
|
|
118
118
|
break;
|
|
119
119
|
case "variant":
|
|
120
|
-
this.updateVariant(e,
|
|
120
|
+
this.updateVariant(e, o);
|
|
121
121
|
break;
|
|
122
122
|
case "shape":
|
|
123
123
|
case "shape--mobile":
|
|
124
124
|
case "shape--tablet":
|
|
125
125
|
case "shape--laptop":
|
|
126
126
|
case "shape--desktop":
|
|
127
|
-
this.updateShape(t,
|
|
127
|
+
this.updateShape(t, o, jt);
|
|
128
128
|
break;
|
|
129
129
|
case "extended":
|
|
130
130
|
case "extended--mobile":
|
|
131
131
|
case "extended--tablet":
|
|
132
132
|
case "extended--laptop":
|
|
133
133
|
case "extended--desktop":
|
|
134
|
-
this.updateExtended(t,
|
|
134
|
+
this.updateExtended(t, o);
|
|
135
135
|
break;
|
|
136
136
|
case "font-size":
|
|
137
137
|
this.updateTypography(
|
|
138
138
|
t,
|
|
139
139
|
e,
|
|
140
|
-
|
|
140
|
+
o,
|
|
141
141
|
Nt
|
|
142
142
|
);
|
|
143
143
|
break;
|
|
144
144
|
case "color":
|
|
145
|
-
this.updateTypography(t, e,
|
|
145
|
+
this.updateTypography(t, e, o, Ct);
|
|
146
146
|
break;
|
|
147
147
|
case "font-weight":
|
|
148
|
-
this.updateTypography(t, e,
|
|
148
|
+
this.updateTypography(t, e, o, St);
|
|
149
149
|
break;
|
|
150
150
|
case "title":
|
|
151
|
-
|
|
151
|
+
o && (this.$el.setAttribute("title", o), this.removeAttribute("title"));
|
|
152
152
|
break;
|
|
153
153
|
default:
|
|
154
|
-
super.attributeChangedCallback(t, e,
|
|
154
|
+
super.attributeChangedCallback(t, e, o);
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
configureBeforeAfterIcon(t) {
|
|
159
|
-
const e = t.getAttribute("size"),
|
|
159
|
+
const e = t.getAttribute("size"), o = t.getAttribute("color");
|
|
160
160
|
t.addEventListener("click", () => {
|
|
161
161
|
this.$el.focus();
|
|
162
|
-
}), e || t.setAttribute("size", "xs"),
|
|
162
|
+
}), e || t.setAttribute("size", "xs"), o || t.setAttribute("color", "inherit");
|
|
163
163
|
}
|
|
164
164
|
_toggleClassList(t) {
|
|
165
165
|
if (t.startsWith("btn-")) {
|
|
166
166
|
const e = t.split("-");
|
|
167
|
-
for (const
|
|
168
|
-
this.$el.classList.toggle(
|
|
167
|
+
for (const o of e)
|
|
168
|
+
this.$el.classList.toggle(o);
|
|
169
169
|
} else
|
|
170
170
|
this.$el.classList.toggle(t);
|
|
171
171
|
}
|
|
172
172
|
updateVariant(t, e) {
|
|
173
|
-
t !== null && t !== "" && t !== "link" && this._toggleClassList(t), e !== null && e !== "" && e !== "link" && this._toggleClassList(e), this.checkName(
|
|
173
|
+
t !== null && t !== "" && t !== "link" && this._toggleClassList(t), e !== null && e !== "" && e !== "link" && this._toggleClassList(e), this.checkName(Ot, e) || q(
|
|
174
174
|
`${e} is not an allowed variant value for ${this.tagName.toLowerCase()}`
|
|
175
175
|
), e === "icon-link" && this.$iconNotBeforeAfter.setAttribute("color", "inherit");
|
|
176
176
|
}
|
|
177
|
-
updateShape(t, e,
|
|
178
|
-
if (!Et(
|
|
177
|
+
updateShape(t, e, o) {
|
|
178
|
+
if (!Et(o, e)) {
|
|
179
179
|
q(
|
|
180
180
|
`${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
181
181
|
);
|
|
@@ -183,9 +183,9 @@ const Nt = [...zt, "link-m", "link-s"], jt = [
|
|
|
183
183
|
}
|
|
184
184
|
e !== null && e !== "" && this.$el.setAttribute(t, e);
|
|
185
185
|
}
|
|
186
|
-
updateTypography(t, e,
|
|
187
|
-
e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`),
|
|
188
|
-
`${
|
|
186
|
+
updateTypography(t, e, o, a) {
|
|
187
|
+
e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), o !== null && o !== "" && o !== "default" && this.$el.classList.toggle(`${t}-${o}`), this.checkName(a, o) || q(
|
|
188
|
+
`${o} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
189
189
|
);
|
|
190
190
|
}
|
|
191
191
|
updateExtended(t, e) {
|
|
@@ -305,40 +305,40 @@ const Nt = [...zt, "link-m", "link-s"], jt = [
|
|
|
305
305
|
t ? this.setAttribute("title", t) : this.removeAttribute("title");
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
|
-
|
|
309
|
-
let I =
|
|
308
|
+
j.nativeName = "a";
|
|
309
|
+
let I = j;
|
|
310
310
|
customElements.get("px-a") || customElements.define("px-a", I);
|
|
311
|
-
var
|
|
311
|
+
var m, P, dt;
|
|
312
312
|
class Pt extends I {
|
|
313
313
|
constructor() {
|
|
314
314
|
super();
|
|
315
315
|
u(this, P);
|
|
316
|
-
u(this,
|
|
317
|
-
this.$el.classList.add("wrapper"),
|
|
316
|
+
u(this, m);
|
|
317
|
+
this.$el.classList.add("wrapper"), k(this, m, new Lt(
|
|
318
318
|
this,
|
|
319
319
|
this.$el,
|
|
320
320
|
() => b(this, P, dt).call(this)
|
|
321
321
|
));
|
|
322
322
|
}
|
|
323
323
|
connectedCallback() {
|
|
324
|
-
super.connectedCallback(), d(this,
|
|
324
|
+
super.connectedCallback(), d(this, m).connect();
|
|
325
325
|
}
|
|
326
326
|
disconnectedCallback() {
|
|
327
|
-
super.disconnectedCallback(), d(this,
|
|
327
|
+
super.disconnectedCallback(), d(this, m).disconnect();
|
|
328
328
|
}
|
|
329
|
-
attributeChangedCallback(e,
|
|
330
|
-
if (
|
|
329
|
+
attributeChangedCallback(e, o, a) {
|
|
330
|
+
if (o !== a)
|
|
331
331
|
switch (e) {
|
|
332
332
|
case "disabled":
|
|
333
|
-
super.attributeChangedCallback(e,
|
|
333
|
+
super.attributeChangedCallback(e, o, a), a !== null && d(this, m).clearInteractiveState();
|
|
334
334
|
break;
|
|
335
335
|
default:
|
|
336
|
-
super.attributeChangedCallback(e,
|
|
336
|
+
super.attributeChangedCallback(e, o, a);
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
m = new WeakMap(), P = new WeakSet(), dt = function() {
|
|
342
342
|
return !this.hasAttribute("disabled") && this.$el.getAttribute("aria-disabled") !== "true";
|
|
343
343
|
};
|
|
344
344
|
customElements.get("px-a-wrapper") || customElements.define("px-a-wrapper", Pt);
|
|
@@ -355,73 +355,73 @@ class Bt extends HTMLElement {
|
|
|
355
355
|
}
|
|
356
356
|
customElements.get("px-mdd-a") || customElements.define("px-mdd-a", Bt);
|
|
357
357
|
const Ht = "#navigation-container{border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}#dropdown-zone--desktop{display:none}#primary-navigation{display:none;margin:0;padding:0}#panel-container{position:absolute;top:0;left:0;right:0;z-index:999}#backdrop-filter{display:none;position:absolute;z-index:998;left:0;width:100vw;height:100%;background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}@media only screen and (min-width: 48em){#dropdown-zone--desktop{display:flex;justify-content:space-between;align-items:center;margin-block:var(--px-padding-s-tablet)}#primary-navigation{display:block}#panel-container{top:auto}}@media only screen and (min-width: 64.0625em){#dropdown-zone--desktop{margin-block:var(--px-padding-s-laptop)}}@media only screen and (min-width: 90.0625em){#dropdown-zone--desktop{margin-block:var(--px-padding-s-desktop)}}";
|
|
358
|
-
function N(
|
|
359
|
-
var t = typeof
|
|
360
|
-
return
|
|
358
|
+
function N(r) {
|
|
359
|
+
var t = typeof r;
|
|
360
|
+
return r != null && (t == "object" || t == "function");
|
|
361
361
|
}
|
|
362
362
|
var Wt = typeof global == "object" && global && global.Object === Object && global, _t = typeof self == "object" && self && self.Object === Object && self, lt = Wt || _t || Function("return this")(), U = function() {
|
|
363
363
|
return lt.Date.now();
|
|
364
|
-
},
|
|
365
|
-
function
|
|
366
|
-
for (var t =
|
|
364
|
+
}, Dt = /\s/;
|
|
365
|
+
function Ft(r) {
|
|
366
|
+
for (var t = r.length; t-- && Dt.test(r.charAt(t)); )
|
|
367
367
|
;
|
|
368
368
|
return t;
|
|
369
369
|
}
|
|
370
370
|
var Ut = /^\s+/;
|
|
371
|
-
function Yt(
|
|
372
|
-
return
|
|
371
|
+
function Yt(r) {
|
|
372
|
+
return r && r.slice(0, Ft(r) + 1).replace(Ut, "");
|
|
373
373
|
}
|
|
374
|
-
var
|
|
375
|
-
function Jt(
|
|
376
|
-
var t = Zt.call(
|
|
374
|
+
var O = lt.Symbol, pt = Object.prototype, Zt = pt.hasOwnProperty, Xt = pt.toString, C = O ? O.toStringTag : void 0;
|
|
375
|
+
function Jt(r) {
|
|
376
|
+
var t = Zt.call(r, C), e = r[C];
|
|
377
377
|
try {
|
|
378
|
-
|
|
379
|
-
var
|
|
378
|
+
r[C] = void 0;
|
|
379
|
+
var o = !0;
|
|
380
380
|
} catch {
|
|
381
381
|
}
|
|
382
|
-
var a = Xt.call(
|
|
383
|
-
return
|
|
382
|
+
var a = Xt.call(r);
|
|
383
|
+
return o && (t ? r[C] = e : delete r[C]), a;
|
|
384
384
|
}
|
|
385
385
|
var Kt = Object.prototype, Qt = Kt.toString;
|
|
386
|
-
function Gt(
|
|
387
|
-
return Qt.call(
|
|
386
|
+
function Gt(r) {
|
|
387
|
+
return Qt.call(r);
|
|
388
388
|
}
|
|
389
|
-
var Vt = "[object Null]", te = "[object Undefined]", tt =
|
|
390
|
-
function ee(
|
|
391
|
-
return
|
|
389
|
+
var Vt = "[object Null]", te = "[object Undefined]", tt = O ? O.toStringTag : void 0;
|
|
390
|
+
function ee(r) {
|
|
391
|
+
return r == null ? r === void 0 ? te : Vt : tt && tt in Object(r) ? Jt(r) : Gt(r);
|
|
392
392
|
}
|
|
393
|
-
function oe(
|
|
394
|
-
return
|
|
393
|
+
function oe(r) {
|
|
394
|
+
return r != null && typeof r == "object";
|
|
395
395
|
}
|
|
396
396
|
var re = "[object Symbol]";
|
|
397
|
-
function ae(
|
|
398
|
-
return typeof
|
|
397
|
+
function ae(r) {
|
|
398
|
+
return typeof r == "symbol" || oe(r) && ee(r) == re;
|
|
399
399
|
}
|
|
400
400
|
var et = NaN, ie = /^[-+]0x[0-9a-f]+$/i, ne = /^0b[01]+$/i, se = /^0o[0-7]+$/i, de = parseInt;
|
|
401
|
-
function ot(
|
|
402
|
-
if (typeof
|
|
403
|
-
return
|
|
404
|
-
if (ae(
|
|
401
|
+
function ot(r) {
|
|
402
|
+
if (typeof r == "number")
|
|
403
|
+
return r;
|
|
404
|
+
if (ae(r))
|
|
405
405
|
return et;
|
|
406
|
-
if (N(
|
|
407
|
-
var t = typeof
|
|
408
|
-
|
|
409
|
-
}
|
|
410
|
-
if (typeof
|
|
411
|
-
return
|
|
412
|
-
|
|
413
|
-
var e = ne.test(
|
|
414
|
-
return e || se.test(
|
|
406
|
+
if (N(r)) {
|
|
407
|
+
var t = typeof r.valueOf == "function" ? r.valueOf() : r;
|
|
408
|
+
r = N(t) ? t + "" : t;
|
|
409
|
+
}
|
|
410
|
+
if (typeof r != "string")
|
|
411
|
+
return r === 0 ? r : +r;
|
|
412
|
+
r = Yt(r);
|
|
413
|
+
var e = ne.test(r);
|
|
414
|
+
return e || se.test(r) ? de(r.slice(2), e ? 2 : 8) : ie.test(r) ? et : +r;
|
|
415
415
|
}
|
|
416
416
|
var le = "Expected a function", pe = Math.max, ce = Math.min;
|
|
417
|
-
function be(
|
|
418
|
-
var
|
|
419
|
-
if (typeof
|
|
417
|
+
function be(r, t, e) {
|
|
418
|
+
var o, a, s, n, l, c, g = 0, A = !1, h = !1, W = !0;
|
|
419
|
+
if (typeof r != "function")
|
|
420
420
|
throw new TypeError(le);
|
|
421
421
|
t = ot(t) || 0, N(e) && (A = !!e.leading, h = "maxWait" in e, s = h ? pe(ot(e.maxWait) || 0, t) : s, W = "trailing" in e ? !!e.trailing : W);
|
|
422
422
|
function _(p) {
|
|
423
|
-
var x =
|
|
424
|
-
return
|
|
423
|
+
var x = o, S = a;
|
|
424
|
+
return o = a = void 0, g = p, n = r.apply(S, x), n;
|
|
425
425
|
}
|
|
426
426
|
function mt(p) {
|
|
427
427
|
return g = p, l = setTimeout(M, t), A ? _(p) : n;
|
|
@@ -441,17 +441,17 @@ function be(o, t, e) {
|
|
|
441
441
|
l = setTimeout(M, kt(p));
|
|
442
442
|
}
|
|
443
443
|
function Q(p) {
|
|
444
|
-
return l = void 0, W &&
|
|
444
|
+
return l = void 0, W && o ? _(p) : (o = a = void 0, n);
|
|
445
445
|
}
|
|
446
446
|
function yt() {
|
|
447
|
-
l !== void 0 && clearTimeout(l), g = 0,
|
|
447
|
+
l !== void 0 && clearTimeout(l), g = 0, o = c = a = l = void 0;
|
|
448
448
|
}
|
|
449
449
|
function wt() {
|
|
450
450
|
return l === void 0 ? n : Q(U());
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function D() {
|
|
453
453
|
var p = U(), x = K(p);
|
|
454
|
-
if (
|
|
454
|
+
if (o = arguments, a = this, c = p, x) {
|
|
455
455
|
if (l === void 0)
|
|
456
456
|
return mt(c);
|
|
457
457
|
if (h)
|
|
@@ -459,15 +459,15 @@ function be(o, t, e) {
|
|
|
459
459
|
}
|
|
460
460
|
return l === void 0 && (l = setTimeout(M, t)), n;
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return D.cancel = yt, D.flush = wt, D;
|
|
463
463
|
}
|
|
464
464
|
var ue = "Expected a function";
|
|
465
|
-
function he(
|
|
466
|
-
var
|
|
467
|
-
if (typeof
|
|
465
|
+
function he(r, t, e) {
|
|
466
|
+
var o = !0, a = !0;
|
|
467
|
+
if (typeof r != "function")
|
|
468
468
|
throw new TypeError(ue);
|
|
469
|
-
return N(e) && (
|
|
470
|
-
leading:
|
|
469
|
+
return N(e) && (o = "leading" in e ? !!e.leading : o, a = "trailing" in e ? !!e.trailing : a), be(r, t, {
|
|
470
|
+
leading: o,
|
|
471
471
|
maxWait: t,
|
|
472
472
|
trailing: a
|
|
473
473
|
});
|
|
@@ -475,7 +475,7 @@ function he(o, t, e) {
|
|
|
475
475
|
const ct = new CSSStyleSheet();
|
|
476
476
|
ct.replaceSync(Ht);
|
|
477
477
|
const xe = "Menu";
|
|
478
|
-
var T, i, bt, Y, Z, ut, X, f, E, L,
|
|
478
|
+
var T, i, bt, Y, Z, ut, X, f, E, L, v;
|
|
479
479
|
class ge extends J {
|
|
480
480
|
constructor() {
|
|
481
481
|
var e;
|
|
@@ -519,21 +519,21 @@ class ge extends J {
|
|
|
519
519
|
<div id="backdrop-filter"></div>
|
|
520
520
|
<slot name="main"></slot>
|
|
521
521
|
</div>
|
|
522
|
-
`,
|
|
522
|
+
`, k(this, T, () => {
|
|
523
523
|
window.innerWidth >= 768 && (b(this, i, ut).call(this), b(this, i, bt).call(this));
|
|
524
524
|
}), this.shadowRoot.innerHTML = this.template, this.internals = (e = this.attachInternals) == null ? void 0 : e.call(this), this.role = "navigation", this.internals && (this.internals.role = "navigation");
|
|
525
525
|
}
|
|
526
526
|
connectedCallback() {
|
|
527
527
|
this.addEventListener("click", (e) => {
|
|
528
|
-
const
|
|
528
|
+
const o = e.target.closest(
|
|
529
529
|
"px-header-item"
|
|
530
530
|
);
|
|
531
|
-
|
|
531
|
+
o && o.for && (e.target.checked === !1 ? (this.$backdropFilter.style.display = "block", d(this, i, E).forEach((a) => {
|
|
532
532
|
a.checked = !1;
|
|
533
|
-
}),
|
|
533
|
+
}), o.checked = !0, b(this, i, Y).call(this, e.target.for)) : b(this, i, X).call(this));
|
|
534
534
|
}), this.addEventListener("section-item-click", (e) => {
|
|
535
|
-
this.$backdropFilter.style.display = "block", d(this, i, E).forEach((
|
|
536
|
-
|
|
535
|
+
this.$backdropFilter.style.display = "block", d(this, i, E).forEach((o) => {
|
|
536
|
+
o.checked = !1;
|
|
537
537
|
}), this.querySelector(
|
|
538
538
|
`px-header-item[for="${e.detail.for}"]`
|
|
539
539
|
).checked = !0, b(this, i, Y).call(this, e.detail.for);
|
|
@@ -549,11 +549,11 @@ class ge extends J {
|
|
|
549
549
|
"close-panel-from-dialog",
|
|
550
550
|
(e) => {
|
|
551
551
|
this.dispatchEvent(new CustomEvent("close-panel")), e.detail.clientY < d(this, i, L).getBoundingClientRect().bottom && requestAnimationFrame(() => {
|
|
552
|
-
var
|
|
553
|
-
(
|
|
552
|
+
var o;
|
|
553
|
+
(o = document.elementFromPoint(
|
|
554
554
|
e.detail.clientX,
|
|
555
555
|
e.detail.clientY
|
|
556
|
-
)) == null ||
|
|
556
|
+
)) == null || o.click();
|
|
557
557
|
});
|
|
558
558
|
}
|
|
559
559
|
), !this.$targetGroupDropdown && !this.$userLanguageDropdown && (this.$dropDownZoneDesktop.style.display = "none"), this.primaryNavigationAriaLabel || this.setAttribute("primary-navigation-aria-label", xe), window.addEventListener("resize", he(d(this, T), 200));
|
|
@@ -566,11 +566,11 @@ class ge extends J {
|
|
|
566
566
|
"back-to-menu-label"
|
|
567
567
|
];
|
|
568
568
|
}
|
|
569
|
-
attributeChangedCallback(e,
|
|
570
|
-
if (
|
|
569
|
+
attributeChangedCallback(e, o, a) {
|
|
570
|
+
if (o !== a)
|
|
571
571
|
switch (e) {
|
|
572
572
|
case "close-button-aria-label":
|
|
573
|
-
d(this, i,
|
|
573
|
+
d(this, i, v).forEach((s) => {
|
|
574
574
|
s.setAttribute("close-button-aria-label", a);
|
|
575
575
|
});
|
|
576
576
|
break;
|
|
@@ -581,7 +581,7 @@ class ge extends J {
|
|
|
581
581
|
this.$primaryNavigation.setAttribute("aria-label", a);
|
|
582
582
|
break;
|
|
583
583
|
case "back-to-menu-label":
|
|
584
|
-
d(this, i,
|
|
584
|
+
d(this, i, v).forEach((s) => {
|
|
585
585
|
s.setAttribute("back-to-menu-label", a);
|
|
586
586
|
});
|
|
587
587
|
break;
|
|
@@ -634,24 +634,26 @@ class ge extends J {
|
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
T = new WeakMap(), i = new WeakSet(), bt = function() {
|
|
637
|
-
const e = this.querySelectorAll("px-mdd"),
|
|
637
|
+
const e = this.querySelectorAll("px-mdd"), o = d(this, i, L).getBoundingClientRect().bottom;
|
|
638
638
|
e.forEach((a) => {
|
|
639
|
-
a.dialogOffsetTop = `${
|
|
639
|
+
a.dialogOffsetTop = `${o}px`;
|
|
640
640
|
});
|
|
641
641
|
}, Y = function(e) {
|
|
642
|
-
d(this, i, f).$megaDropDown.hidden = !0, d(this, i,
|
|
643
|
-
|
|
642
|
+
d(this, i, f).$megaDropDown.hidden = !0, d(this, i, v).forEach((o) => {
|
|
643
|
+
o.name === e && o.hidden && (o.dialogOffsetTop = `${d(this, i, L).getBoundingClientRect().bottom}px`, o.hidden = !o.hidden, this.querySelector(`px-header-item[for="${e}"]`).checked = !o.hidden, document.body.style.overflow = o.hidden ? "auto" : "hidden"), o.name !== e && !o.hidden && (o.hidden = !0);
|
|
644
644
|
});
|
|
645
645
|
}, Z = function() {
|
|
646
|
-
this.$backdropFilter.style.display = "none", d(this, i,
|
|
646
|
+
this.$backdropFilter.style.display = "none", d(this, i, v).forEach((e) => {
|
|
647
647
|
e.hidden || (e.hidden = !0);
|
|
648
648
|
}), d(this, i, f).$megaDropDown.dialogOffsetTop = `${d(this, i, L).getBoundingClientRect().bottom}px`, d(this, i, f).$megaDropDown.hidden = !1, document.body.style.overflow = "hidden";
|
|
649
649
|
}, ut = function() {
|
|
650
|
-
d(this, i, f) && (d(this, i, f).$megaDropDown.hidden = !0, this.$burgerMenu.setAttribute("aria-expanded", "false"),
|
|
650
|
+
d(this, i, f) && (d(this, i, f).$megaDropDown.hidden = !0, this.$burgerMenu.setAttribute("aria-expanded", "false"), Array.from(d(this, i, v)).some(
|
|
651
|
+
(o) => !o.hidden
|
|
652
|
+
) || (document.body.style.overflow = "auto", this.$backdropFilter.style.display = "none"));
|
|
651
653
|
}, X = function() {
|
|
652
654
|
this.$backdropFilter.style.display = "none", d(this, i, f).$megaDropDown.hidden = !0, d(this, i, E).forEach((e) => {
|
|
653
655
|
e.checked = !1;
|
|
654
|
-
}), d(this, i,
|
|
656
|
+
}), d(this, i, v).forEach((e) => {
|
|
655
657
|
e.hidden = !0;
|
|
656
658
|
}), document.body.style.overflow = "auto";
|
|
657
659
|
}, f = function() {
|
|
@@ -660,7 +662,7 @@ T = new WeakMap(), i = new WeakSet(), bt = function() {
|
|
|
660
662
|
return this.querySelectorAll("px-header-item");
|
|
661
663
|
}, L = function() {
|
|
662
664
|
return this.shadowRoot.querySelector("header");
|
|
663
|
-
},
|
|
665
|
+
}, v = function() {
|
|
664
666
|
return this.querySelectorAll("px-mdd");
|
|
665
667
|
};
|
|
666
668
|
customElements.get("px-header") || customElements.define("px-header", ge);
|
|
@@ -670,13 +672,13 @@ const fe = ':host{position:relative}::slotted([slot="popover"]){position:absolut
|
|
|
670
672
|
"bottom-left",
|
|
671
673
|
"bottom-right"
|
|
672
674
|
];
|
|
673
|
-
function rt(
|
|
675
|
+
function rt(r, t, e = "bottom-left", o, a = !1) {
|
|
674
676
|
"anchorName" in document.documentElement.style && a === !1 || t.addEventListener("toggle", () => {
|
|
675
677
|
var A, h;
|
|
676
|
-
if (!
|
|
678
|
+
if (!r || !t)
|
|
677
679
|
return;
|
|
678
|
-
const s =
|
|
679
|
-
(
|
|
680
|
+
const s = r.getBoundingClientRect(), n = ((A = window.visualViewport) == null ? void 0 : A.height) ?? window.innerHeight, l = ((h = window.visualViewport) == null ? void 0 : h.width) ?? window.innerWidth, c = o.getPropertyValue("--px-padding-s-mobile") || "16px", g = parseInt(
|
|
681
|
+
(o.getPropertyValue("--px-icon-size-xs-desktop") || "24").replace("px", "")
|
|
680
682
|
);
|
|
681
683
|
["top-left", "top-right"].includes(e) ? (t.style.bottom = `calc( ${c} + ${n - s.top - window.scrollY}px)`, t.style.top = "auto", e === "top-left" ? t.style.left = l < 768 ? `${c}px` : `${s.left}px` : t.style.right = l < 768 ? `${c}px` : `${l - s.right}px`) : (t.style.top = `${s.bottom + window.scrollY}px`, e === "bottom-left" ? t.style.left = l < 768 ? `${c}px` : `${s.left}px` : t.style.right = l < 768 ? `${c}px` : `${l - s.right - g}px`);
|
|
682
684
|
});
|
|
@@ -695,11 +697,11 @@ class me extends J {
|
|
|
695
697
|
this.template = () => `
|
|
696
698
|
<style>${this.css}</style>
|
|
697
699
|
<slot name="trigger"></slot>
|
|
698
|
-
<slot name="popover"></slot>`, this.isAboutToClose = !1,
|
|
700
|
+
<slot name="popover"></slot>`, this.isAboutToClose = !1, k(this, y, () => {
|
|
699
701
|
this.isAboutToClose || (this.$popoverElement.togglePopover({ source: this.$trigger }), this.$trigger.ariaExpanded = "true");
|
|
700
|
-
}),
|
|
702
|
+
}), k(this, w, () => {
|
|
701
703
|
this.$popoverElement.matches(":popover-open") && (this.isAboutToClose = !0, this.$trigger.ariaExpanded = "false");
|
|
702
|
-
}),
|
|
704
|
+
}), k(this, z, () => {
|
|
703
705
|
this.$popoverElement.matches(":popover-open") || setTimeout(() => {
|
|
704
706
|
this.isAboutToClose = !1;
|
|
705
707
|
});
|
|
@@ -763,8 +765,8 @@ class me extends J {
|
|
|
763
765
|
this.usePolyfill
|
|
764
766
|
);
|
|
765
767
|
}
|
|
766
|
-
attributeChangedCallback(e,
|
|
767
|
-
if (
|
|
768
|
+
attributeChangedCallback(e, o, a) {
|
|
769
|
+
if (o !== a)
|
|
768
770
|
switch (e) {
|
|
769
771
|
case "id":
|
|
770
772
|
this.initPopover();
|
|
@@ -779,7 +781,7 @@ class me extends J {
|
|
|
779
781
|
);
|
|
780
782
|
break;
|
|
781
783
|
default:
|
|
782
|
-
super.attributeChangedCallback(e,
|
|
784
|
+
super.attributeChangedCallback(e, o, a);
|
|
783
785
|
break;
|
|
784
786
|
}
|
|
785
787
|
}
|
|
@@ -863,9 +865,9 @@ class ke extends HTMLElement {
|
|
|
863
865
|
throw new Error(
|
|
864
866
|
"<px-header-mobile-menu> must be used within a <px-header>."
|
|
865
867
|
);
|
|
866
|
-
const
|
|
868
|
+
const o = e.querySelectorAll("px-header-item"), a = e.querySelectorAll("px-action-link"), s = this.shadowRoot.querySelector("px-mdd-section");
|
|
867
869
|
s.innerHTML = `
|
|
868
|
-
${[...
|
|
870
|
+
${[...o].map((n) => {
|
|
869
871
|
const l = n.getAttribute("for"), c = n.getAttribute("href");
|
|
870
872
|
return l ? `<px-mdd-section-item for="${l}">${n.innerText}</px-mdd-section-item>` : c ? `<px-mdd-section-item href="${c}">${n.innerText}</px-mdd-section-item>` : "";
|
|
871
873
|
}).join("")}
|
|
@@ -880,11 +882,11 @@ class ke extends HTMLElement {
|
|
|
880
882
|
}
|
|
881
883
|
}
|
|
882
884
|
B = new WeakMap(), H = new WeakSet(), vt = function() {
|
|
883
|
-
const e = this.closest("px-header"),
|
|
885
|
+
const e = this.closest("px-header"), o = e.querySelector(
|
|
884
886
|
'px-dropdown[slot="target-group"]'
|
|
885
887
|
), a = e.querySelector(
|
|
886
888
|
'px-dropdown[slot="user-language"]'
|
|
887
|
-
), s =
|
|
889
|
+
), s = o == null ? void 0 : o.cloneNode(
|
|
888
890
|
!0
|
|
889
891
|
);
|
|
890
892
|
s == null || s.removeAttribute("id"), s == null || s.setAttribute("slot", "mdd-footer"), s == null || s.setAttribute("grow", "3"), s == null || s.setAttribute("anchoralignment", "top-left");
|