@proximus/lavender-header 2.0.0-alpha.3 → 2.0.0-alpha.30
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/Header.d.ts +2 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +236 -3421
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,3214 +1,23 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Q = (o) => {
|
|
2
2
|
throw TypeError(o);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import
|
|
4
|
+
var _ = (o, t, e) => t.has(o) || Q("Cannot " + e);
|
|
5
|
+
var d = (o, t, e) => (_(o, t, "read from private field"), e ? e.call(o) : t.get(o)), h = (o, t, e) => t.has(o) ? Q("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(o) : t.set(o, e), A = (o, t, e, r) => (_(o, t, "write to private field"), r ? r.call(o, e) : t.set(o, e), e), b = (o, t, e) => (_(o, t, "access private method"), e);
|
|
6
|
+
import "@proximus/lavender-button-icon";
|
|
7
|
+
import "@proximus/lavender-cell";
|
|
8
|
+
import { WithExtraAttributes as Z, fontsizeValues as kt, PxElement as yt, transferAccessibilityAttributes as zt, fontweightValues as wt, colorValues as $t, log as R, checkName as At } from "@proximus/lavender-common";
|
|
7
9
|
import "@proximus/lavender-layout";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
m(
|
|
15
|
-
"padding",
|
|
16
|
-
k,
|
|
17
|
-
v,
|
|
18
|
-
A,
|
|
19
|
-
"--container-padding"
|
|
20
|
-
),
|
|
21
|
-
m(
|
|
22
|
-
"padding-inline",
|
|
23
|
-
k,
|
|
24
|
-
v,
|
|
25
|
-
A
|
|
26
|
-
),
|
|
27
|
-
m(
|
|
28
|
-
"padding-block",
|
|
29
|
-
k,
|
|
30
|
-
v,
|
|
31
|
-
A
|
|
32
|
-
),
|
|
33
|
-
m(
|
|
34
|
-
"padding-top",
|
|
35
|
-
k,
|
|
36
|
-
v,
|
|
37
|
-
A
|
|
38
|
-
),
|
|
39
|
-
m(
|
|
40
|
-
"padding-right",
|
|
41
|
-
k,
|
|
42
|
-
v,
|
|
43
|
-
A,
|
|
44
|
-
"--container-padding-right"
|
|
45
|
-
),
|
|
46
|
-
m(
|
|
47
|
-
"padding-bottom",
|
|
48
|
-
k,
|
|
49
|
-
v,
|
|
50
|
-
A
|
|
51
|
-
),
|
|
52
|
-
m(
|
|
53
|
-
"padding-left",
|
|
54
|
-
k,
|
|
55
|
-
v,
|
|
56
|
-
A,
|
|
57
|
-
"--container-padding-left"
|
|
58
|
-
)
|
|
59
|
-
), this.template = () => `<div class="container">
|
|
60
|
-
<slot></slot>
|
|
61
|
-
<slot name="anchor-left"></slot>
|
|
62
|
-
<slot name="anchor-right"></slot>
|
|
63
|
-
<slot name="anchor-full"></slot>
|
|
64
|
-
</div>`, this._bgObserver = null, this._isInViewport = !1, this.shadowRoot.innerHTML = this.template();
|
|
65
|
-
}
|
|
66
|
-
static get observedAttributes() {
|
|
67
|
-
return [
|
|
68
|
-
...super.observedAttributes,
|
|
69
|
-
"border",
|
|
70
|
-
"border-color",
|
|
71
|
-
"border-side",
|
|
72
|
-
"border-side--mobile",
|
|
73
|
-
"border-side--tablet",
|
|
74
|
-
"border-side--laptop",
|
|
75
|
-
"border-radius",
|
|
76
|
-
"no-border-radius",
|
|
77
|
-
"no-border-radius--mobile",
|
|
78
|
-
"no-border-radius--tablet",
|
|
79
|
-
"no-border-radius--laptop",
|
|
80
|
-
"background-color",
|
|
81
|
-
"background-color--mobile",
|
|
82
|
-
"background-color--tablet",
|
|
83
|
-
"background-color--laptop",
|
|
84
|
-
"background-gradient",
|
|
85
|
-
"background-gradient--mobile",
|
|
86
|
-
"background-gradient--tablet",
|
|
87
|
-
"background-gradient--laptop",
|
|
88
|
-
"background-image",
|
|
89
|
-
"background-image--mobile",
|
|
90
|
-
"background-image--tablet",
|
|
91
|
-
"background-image--laptop",
|
|
92
|
-
"background-size",
|
|
93
|
-
"background-position",
|
|
94
|
-
"box-shadow",
|
|
95
|
-
"anchor-offset",
|
|
96
|
-
"inverted"
|
|
97
|
-
];
|
|
98
|
-
}
|
|
99
|
-
connectedCallback() {
|
|
100
|
-
super.connectedCallback(), this.padding || (this.padding = "m"), this.backgroundColor || (this.backgroundColor = "surface-light"), this.borderColor || (this.borderColor = "main");
|
|
101
|
-
const t = this.querySelector("[slot]");
|
|
102
|
-
t && Ee.includes(t.getAttribute("slot")) && this.shadowRoot.querySelector(".container").classList.toggle("anchored"), this._bgObserver = new IntersectionObserver((e) => {
|
|
103
|
-
e.forEach((r) => {
|
|
104
|
-
var i;
|
|
105
|
-
r.isIntersecting && (this._isInViewport = !0, this._loadBackgroundImages(), (i = this._bgObserver) == null || i.disconnect());
|
|
106
|
-
});
|
|
107
|
-
}), this._bgObserver.observe(this.$el);
|
|
108
|
-
}
|
|
109
|
-
disconnectedCallback() {
|
|
110
|
-
var t;
|
|
111
|
-
(t = this._bgObserver) == null || t.disconnect();
|
|
112
|
-
}
|
|
113
|
-
attributeChangedCallback(t, e, r) {
|
|
114
|
-
if (e !== r)
|
|
115
|
-
switch (t) {
|
|
116
|
-
case "border":
|
|
117
|
-
this.updateAttribute(t, e, r, Ae);
|
|
118
|
-
break;
|
|
119
|
-
case "border-color":
|
|
120
|
-
this.updateBorderColor(t, r);
|
|
121
|
-
break;
|
|
122
|
-
case "border-side":
|
|
123
|
-
case "border-side--mobile":
|
|
124
|
-
case "border-side--tablet":
|
|
125
|
-
case "border-side--laptop":
|
|
126
|
-
this.updateAttribute(t, e, r, ke);
|
|
127
|
-
break;
|
|
128
|
-
case "border-radius":
|
|
129
|
-
this.updateAttribute(
|
|
130
|
-
t,
|
|
131
|
-
e,
|
|
132
|
-
r,
|
|
133
|
-
me
|
|
134
|
-
);
|
|
135
|
-
break;
|
|
136
|
-
case "no-border-radius":
|
|
137
|
-
case "no-border-radius--mobile":
|
|
138
|
-
case "no-border-radius--tablet":
|
|
139
|
-
case "no-border-radius--laptop":
|
|
140
|
-
this.updateNoBorderRadius(
|
|
141
|
-
t,
|
|
142
|
-
e,
|
|
143
|
-
r,
|
|
144
|
-
fe
|
|
145
|
-
);
|
|
146
|
-
break;
|
|
147
|
-
case "background-color":
|
|
148
|
-
case "background-color--mobile":
|
|
149
|
-
case "background-color--tablet":
|
|
150
|
-
case "background-color--laptop":
|
|
151
|
-
this.updateBackgroundColor(t, r);
|
|
152
|
-
break;
|
|
153
|
-
case "background-gradient":
|
|
154
|
-
case "background-gradient--mobile":
|
|
155
|
-
case "background-gradient--tablet":
|
|
156
|
-
case "background-gradient--laptop":
|
|
157
|
-
this.updateGradient(t, r);
|
|
158
|
-
break;
|
|
159
|
-
case "background-size":
|
|
160
|
-
this.updateAttribute(
|
|
161
|
-
t,
|
|
162
|
-
e,
|
|
163
|
-
r,
|
|
164
|
-
xe
|
|
165
|
-
);
|
|
166
|
-
break;
|
|
167
|
-
case "background-image":
|
|
168
|
-
case "background-image--mobile":
|
|
169
|
-
case "background-image--tablet":
|
|
170
|
-
case "background-image--laptop":
|
|
171
|
-
this._isInViewport && this.updateBackgroundImg(t, r);
|
|
172
|
-
break;
|
|
173
|
-
case "background-position":
|
|
174
|
-
r !== null && r !== "" && (this.$el.style.backgroundPosition = r);
|
|
175
|
-
break;
|
|
176
|
-
case "box-shadow":
|
|
177
|
-
this.updateAttribute(t, e, r, ve);
|
|
178
|
-
break;
|
|
179
|
-
case "anchor-offset":
|
|
180
|
-
this.updateAnchorOffset(e, r, v);
|
|
181
|
-
break;
|
|
182
|
-
default:
|
|
183
|
-
super.attributeChangedCallback(t, e, r);
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
_loadBackgroundImages() {
|
|
188
|
-
[
|
|
189
|
-
"background-image",
|
|
190
|
-
"background-image--mobile",
|
|
191
|
-
"background-image--tablet",
|
|
192
|
-
"background-image--laptop"
|
|
193
|
-
].forEach((e) => {
|
|
194
|
-
const r = this.getAttribute(e);
|
|
195
|
-
r && this.updateBackgroundImg(e, r);
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
updateBackgroundImg(t, e) {
|
|
199
|
-
this.$el.style.setProperty(`--${t}`, `url("${e}")`);
|
|
200
|
-
}
|
|
201
|
-
updateGradient(t, e) {
|
|
202
|
-
if (this.checkName(ye, e)) {
|
|
203
|
-
const r = this.splitAttrNameFromBreakpoint(t);
|
|
204
|
-
t = r.attrName;
|
|
205
|
-
const i = r.breakpoint;
|
|
206
|
-
this.$el.style.setProperty(
|
|
207
|
-
`--${t}${i}`,
|
|
208
|
-
`linear-gradient(var(--px-color-background-gradient-${e}))`
|
|
209
|
-
);
|
|
210
|
-
} else
|
|
211
|
-
console.error(`${e} is not an allowed background-gradient value`);
|
|
212
|
-
}
|
|
213
|
-
updateBackgroundColor(t, e) {
|
|
214
|
-
const r = e.startsWith("surface-");
|
|
215
|
-
if (this.checkName(St, e)) {
|
|
216
|
-
const i = this.splitAttrNameFromBreakpoint(t), a = i.breakpoint;
|
|
217
|
-
this.$el.style.setProperty(
|
|
218
|
-
`--${i.attrName}${a}`,
|
|
219
|
-
`var(--px-color-background-${e}${r ? "" : "-default"})`
|
|
220
|
-
), this.$el.style.setProperty(
|
|
221
|
-
`--${i.attrName}-inverted${a}`,
|
|
222
|
-
`var(--px-color-background-${e}${r ? "" : "-inverted"})`
|
|
223
|
-
);
|
|
224
|
-
} else
|
|
225
|
-
console.error(`${e} is not an allowed ${t} value`);
|
|
226
|
-
}
|
|
227
|
-
updateBorderColor(t, e) {
|
|
228
|
-
this.checkName($e, e) ? (this.$el.style.setProperty(
|
|
229
|
-
`--${t}`,
|
|
230
|
-
`var(--px-color-border-${e}-default)`
|
|
231
|
-
), this.$el.style.setProperty(
|
|
232
|
-
`--${t}-inverted`,
|
|
233
|
-
`var(--px-color-border-${e}-inverted)`
|
|
234
|
-
)) : console.error(`${e} is not an allowed ${t} value`);
|
|
235
|
-
}
|
|
236
|
-
updateNoBorderRadius(t, e, r, i) {
|
|
237
|
-
if (!this.checkName(i, r))
|
|
238
|
-
console.error(`${r} is not an allowed ${t} value`);
|
|
239
|
-
else {
|
|
240
|
-
const a = this.splitAttrNameFromBreakpoint(t), s = a.breakpoint;
|
|
241
|
-
e !== null && e !== "" && this.$el.classList.toggle(
|
|
242
|
-
`${a.attrName}-${e}${s}`
|
|
243
|
-
), r !== null && r !== "" && this.$el.classList.toggle(
|
|
244
|
-
`${a.attrName}-${r}${s}`
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
updateAttribute(t, e, r, i) {
|
|
249
|
-
if (!this.checkName(i, r))
|
|
250
|
-
console.error(`${r} is not an allowed ${t} value`);
|
|
251
|
-
else {
|
|
252
|
-
const a = this.splitAttrNameFromBreakpoint(t), s = a.breakpoint;
|
|
253
|
-
e !== null && e !== "" && this.$el.classList.toggle(
|
|
254
|
-
`${a.attrName}-${e}${s}`
|
|
255
|
-
), r !== null && r !== "" && this.$el.classList.toggle(
|
|
256
|
-
`${a.attrName}-${r}${s}`
|
|
257
|
-
);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
splitAttrNameFromBreakpoint(t) {
|
|
261
|
-
let e = "";
|
|
262
|
-
if (["--mobile", "--tablet", "--laptop"].some(
|
|
263
|
-
(r) => t.includes(r)
|
|
264
|
-
)) {
|
|
265
|
-
const r = t.split("--");
|
|
266
|
-
t = r[0], e = `--${r[1]}`;
|
|
267
|
-
}
|
|
268
|
-
return { attrName: t, breakpoint: e };
|
|
269
|
-
}
|
|
270
|
-
updateAnchorOffset(t, e, r) {
|
|
271
|
-
if (!$(r, e)) {
|
|
272
|
-
console.error(`${e} is not a valid anchor-offset value`);
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
const i = (a) => {
|
|
276
|
-
a !== null && a !== "" && a !== "default" && (this.$el.style.setProperty(
|
|
277
|
-
"--container-anchor-offset--mobile",
|
|
278
|
-
`var(--px-padding-${a}-mobile)`
|
|
279
|
-
), this.$el.style.setProperty(
|
|
280
|
-
"--container-anchor-offset--tablet",
|
|
281
|
-
`var(--px-padding-${a}-tablet)`
|
|
282
|
-
), this.$el.style.setProperty(
|
|
283
|
-
"--container-anchor-offset--laptop",
|
|
284
|
-
`var(--px-padding-${a}-laptop)`
|
|
285
|
-
));
|
|
286
|
-
};
|
|
287
|
-
i(t), i(e);
|
|
288
|
-
}
|
|
289
|
-
get padding() {
|
|
290
|
-
return this.getAttribute("padding");
|
|
291
|
-
}
|
|
292
|
-
set padding(t) {
|
|
293
|
-
this.setAttribute("padding", t);
|
|
294
|
-
}
|
|
295
|
-
get paddingBlock() {
|
|
296
|
-
return this.getAttribute("padding-block");
|
|
297
|
-
}
|
|
298
|
-
set paddingBlock(t) {
|
|
299
|
-
this.setAttribute("padding-block", t);
|
|
300
|
-
}
|
|
301
|
-
get paddingInline() {
|
|
302
|
-
return this.getAttribute("padding-inline");
|
|
303
|
-
}
|
|
304
|
-
set paddingInline(t) {
|
|
305
|
-
this.setAttribute("padding-inline", t);
|
|
306
|
-
}
|
|
307
|
-
get paddingTop() {
|
|
308
|
-
return this.getAttribute("padding-top");
|
|
309
|
-
}
|
|
310
|
-
set paddingTop(t) {
|
|
311
|
-
this.setAttribute("padding-top", t);
|
|
312
|
-
}
|
|
313
|
-
get paddingRight() {
|
|
314
|
-
return this.getAttribute("padding-right");
|
|
315
|
-
}
|
|
316
|
-
set paddingRight(t) {
|
|
317
|
-
this.setAttribute("padding-right", t);
|
|
318
|
-
}
|
|
319
|
-
get paddingBottom() {
|
|
320
|
-
return this.getAttribute("padding-bottom");
|
|
321
|
-
}
|
|
322
|
-
set paddingBottom(t) {
|
|
323
|
-
this.setAttribute("padding-bottom", t);
|
|
324
|
-
}
|
|
325
|
-
get paddingLeft() {
|
|
326
|
-
return this.getAttribute("padding-left");
|
|
327
|
-
}
|
|
328
|
-
set paddingLeft(t) {
|
|
329
|
-
this.setAttribute("padding-left", t);
|
|
330
|
-
}
|
|
331
|
-
get paddingMobile() {
|
|
332
|
-
return this.getAttribute("padding--mobile");
|
|
333
|
-
}
|
|
334
|
-
set paddingMobile(t) {
|
|
335
|
-
this.setAttribute("padding--mobile", t);
|
|
336
|
-
}
|
|
337
|
-
get paddingBlockMobile() {
|
|
338
|
-
return this.getAttribute("padding-block--mobile");
|
|
339
|
-
}
|
|
340
|
-
set paddingBlockMobile(t) {
|
|
341
|
-
this.setAttribute("padding-block--mobile", t);
|
|
342
|
-
}
|
|
343
|
-
get paddingInlineMobile() {
|
|
344
|
-
return this.getAttribute("padding-inline--mobile");
|
|
345
|
-
}
|
|
346
|
-
set paddingInlineMobile(t) {
|
|
347
|
-
this.setAttribute("padding-inline--mobile", t);
|
|
348
|
-
}
|
|
349
|
-
get paddingTopMobile() {
|
|
350
|
-
return this.getAttribute("padding-top--mobile");
|
|
351
|
-
}
|
|
352
|
-
set paddingTopMobile(t) {
|
|
353
|
-
this.setAttribute("padding-top--mobile", t);
|
|
354
|
-
}
|
|
355
|
-
get paddingRightMobile() {
|
|
356
|
-
return this.getAttribute("padding-right--mobile");
|
|
357
|
-
}
|
|
358
|
-
set paddingRightMobile(t) {
|
|
359
|
-
this.setAttribute("padding-right--mobile", t);
|
|
360
|
-
}
|
|
361
|
-
get paddingBottomMobile() {
|
|
362
|
-
return this.getAttribute("padding-bottom--mobile");
|
|
363
|
-
}
|
|
364
|
-
set paddingBottomMobile(t) {
|
|
365
|
-
this.setAttribute("padding-bottom--mobile", t);
|
|
366
|
-
}
|
|
367
|
-
get paddingLeftMobile() {
|
|
368
|
-
return this.getAttribute("padding-left--mobile");
|
|
369
|
-
}
|
|
370
|
-
set paddingLeftMobile(t) {
|
|
371
|
-
this.setAttribute("padding-left--mobile", t);
|
|
372
|
-
}
|
|
373
|
-
get paddingTablet() {
|
|
374
|
-
return this.getAttribute("padding--tablet");
|
|
375
|
-
}
|
|
376
|
-
set paddingTablet(t) {
|
|
377
|
-
this.setAttribute("padding--tablet", t);
|
|
378
|
-
}
|
|
379
|
-
get paddingBlockTablet() {
|
|
380
|
-
return this.getAttribute("padding-block--tablet");
|
|
381
|
-
}
|
|
382
|
-
set paddingBlockTablet(t) {
|
|
383
|
-
this.setAttribute("padding-block--tablet", t);
|
|
384
|
-
}
|
|
385
|
-
get paddingInlineTablet() {
|
|
386
|
-
return this.getAttribute("padding-inline--tablet");
|
|
387
|
-
}
|
|
388
|
-
set paddingInlineTablet(t) {
|
|
389
|
-
this.setAttribute("padding-inline--tablet", t);
|
|
390
|
-
}
|
|
391
|
-
get paddingTopTablet() {
|
|
392
|
-
return this.getAttribute("padding-top--tablet");
|
|
393
|
-
}
|
|
394
|
-
set paddingTopTablet(t) {
|
|
395
|
-
this.setAttribute("padding-top--tablet", t);
|
|
396
|
-
}
|
|
397
|
-
get paddingRightTablet() {
|
|
398
|
-
return this.getAttribute("padding-right--tablet");
|
|
399
|
-
}
|
|
400
|
-
set paddingRightTablet(t) {
|
|
401
|
-
this.setAttribute("padding-right--tablet", t);
|
|
402
|
-
}
|
|
403
|
-
get paddingBottomTablet() {
|
|
404
|
-
return this.getAttribute("padding-bottom--tablet");
|
|
405
|
-
}
|
|
406
|
-
set paddingBottomTablet(t) {
|
|
407
|
-
this.setAttribute("padding-bottom--tablet", t);
|
|
408
|
-
}
|
|
409
|
-
get paddingLeftTablet() {
|
|
410
|
-
return this.getAttribute("padding-left--tablet");
|
|
411
|
-
}
|
|
412
|
-
set paddingLeftTablet(t) {
|
|
413
|
-
this.setAttribute("padding-left--tablet", t);
|
|
414
|
-
}
|
|
415
|
-
get paddingLaptop() {
|
|
416
|
-
return this.getAttribute("padding--laptop");
|
|
417
|
-
}
|
|
418
|
-
set paddingLaptop(t) {
|
|
419
|
-
this.setAttribute("padding--laptop", t);
|
|
420
|
-
}
|
|
421
|
-
get paddingBlockLaptop() {
|
|
422
|
-
return this.getAttribute("padding-block--laptop");
|
|
423
|
-
}
|
|
424
|
-
set paddingBlockLaptop(t) {
|
|
425
|
-
this.setAttribute("padding-block--laptop", t);
|
|
426
|
-
}
|
|
427
|
-
get paddingInlineLaptop() {
|
|
428
|
-
return this.getAttribute("padding-inline--laptop");
|
|
429
|
-
}
|
|
430
|
-
set paddingInlineLaptop(t) {
|
|
431
|
-
this.setAttribute("padding-inline--laptop", t);
|
|
432
|
-
}
|
|
433
|
-
get paddingTopLaptop() {
|
|
434
|
-
return this.getAttribute("padding-top--laptop");
|
|
435
|
-
}
|
|
436
|
-
set paddingTopLaptop(t) {
|
|
437
|
-
this.setAttribute("padding-top--laptop", t);
|
|
438
|
-
}
|
|
439
|
-
get paddingRightLaptop() {
|
|
440
|
-
return this.getAttribute("padding-right--laptop");
|
|
441
|
-
}
|
|
442
|
-
set paddingRightLaptop(t) {
|
|
443
|
-
this.setAttribute("padding-right--laptop", t);
|
|
444
|
-
}
|
|
445
|
-
get paddingBottomLaptop() {
|
|
446
|
-
return this.getAttribute("padding-bottom--laptop");
|
|
447
|
-
}
|
|
448
|
-
set paddingBottomLaptop(t) {
|
|
449
|
-
this.setAttribute("padding-bottom--laptop", t);
|
|
450
|
-
}
|
|
451
|
-
get paddingLeftLaptop() {
|
|
452
|
-
return this.getAttribute("padding-left--laptop");
|
|
453
|
-
}
|
|
454
|
-
set paddingLeftLaptop(t) {
|
|
455
|
-
this.setAttribute("padding-left--laptop", t);
|
|
456
|
-
}
|
|
457
|
-
get border() {
|
|
458
|
-
return this.getAttribute("border");
|
|
459
|
-
}
|
|
460
|
-
set border(t) {
|
|
461
|
-
this.setAttribute("border", t);
|
|
462
|
-
}
|
|
463
|
-
get borderColor() {
|
|
464
|
-
return this.getAttribute("border-color");
|
|
465
|
-
}
|
|
466
|
-
set borderColor(t) {
|
|
467
|
-
this.setAttribute("border-color", t);
|
|
468
|
-
}
|
|
469
|
-
get borderSide() {
|
|
470
|
-
return this.getAttribute("border-side");
|
|
471
|
-
}
|
|
472
|
-
set borderSide(t) {
|
|
473
|
-
this.setAttribute("border-side", t);
|
|
474
|
-
}
|
|
475
|
-
get borderSideMobile() {
|
|
476
|
-
return this.getAttribute("border-side--mobile");
|
|
477
|
-
}
|
|
478
|
-
set borderSideMobile(t) {
|
|
479
|
-
this.setAttribute("border-side--mobile", t);
|
|
480
|
-
}
|
|
481
|
-
get borderSideTablet() {
|
|
482
|
-
return this.getAttribute("border-side--tablet");
|
|
483
|
-
}
|
|
484
|
-
set borderSideTablet(t) {
|
|
485
|
-
this.setAttribute("border-side--tablet", t);
|
|
486
|
-
}
|
|
487
|
-
get borderSideLaptop() {
|
|
488
|
-
return this.getAttribute("border-side--laptop");
|
|
489
|
-
}
|
|
490
|
-
set borderSideLaptop(t) {
|
|
491
|
-
this.setAttribute("border-side--laptop", t);
|
|
492
|
-
}
|
|
493
|
-
get borderRadius() {
|
|
494
|
-
return this.getAttribute("border-radius");
|
|
495
|
-
}
|
|
496
|
-
set borderRadius(t) {
|
|
497
|
-
this.setAttribute("border-radius", t);
|
|
498
|
-
}
|
|
499
|
-
get noBorderRadius() {
|
|
500
|
-
return this.getAttribute("no-border-radius");
|
|
501
|
-
}
|
|
502
|
-
set noBorderRadius(t) {
|
|
503
|
-
this.setAttribute("no-border-radius", t);
|
|
504
|
-
}
|
|
505
|
-
get noBorderRadiusMobile() {
|
|
506
|
-
return this.getAttribute("no-border-radius--mobile");
|
|
507
|
-
}
|
|
508
|
-
set noBorderRadiusMobile(t) {
|
|
509
|
-
this.setAttribute("no-border-radius--mobile", t);
|
|
510
|
-
}
|
|
511
|
-
get noBorderRadiusTablet() {
|
|
512
|
-
return this.getAttribute("no-border-radius--tablet");
|
|
513
|
-
}
|
|
514
|
-
set noBorderRadiusTablet(t) {
|
|
515
|
-
this.setAttribute("no-border-radius--tablet", t);
|
|
516
|
-
}
|
|
517
|
-
get noBorderRadiusLaptop() {
|
|
518
|
-
return this.getAttribute("no-border-radius--laptop");
|
|
519
|
-
}
|
|
520
|
-
set noBorderRadiusLaptop(t) {
|
|
521
|
-
this.setAttribute("no-border-radius--laptop", t);
|
|
522
|
-
}
|
|
523
|
-
get backgroundColor() {
|
|
524
|
-
return this.getAttribute("background-color");
|
|
525
|
-
}
|
|
526
|
-
set backgroundColor(t) {
|
|
527
|
-
this.setAttribute("background-color", t);
|
|
528
|
-
}
|
|
529
|
-
get backgroundColorMobile() {
|
|
530
|
-
return this.getAttribute("background-color--mobile");
|
|
531
|
-
}
|
|
532
|
-
set backgroundColorMobile(t) {
|
|
533
|
-
this.setAttribute("background-color--mobile", t);
|
|
534
|
-
}
|
|
535
|
-
get backgroundColorTablet() {
|
|
536
|
-
return this.getAttribute("background-color--tablet");
|
|
537
|
-
}
|
|
538
|
-
set backgroundColorTablet(t) {
|
|
539
|
-
this.setAttribute("background-color--tablet", t);
|
|
540
|
-
}
|
|
541
|
-
get backgroundColorLaptop() {
|
|
542
|
-
return this.getAttribute("background-color--laptop");
|
|
543
|
-
}
|
|
544
|
-
set backgroundColorLaptop(t) {
|
|
545
|
-
this.setAttribute("background-color--laptop", t);
|
|
546
|
-
}
|
|
547
|
-
get gradient() {
|
|
548
|
-
return this.getAttribute("background-gradient");
|
|
549
|
-
}
|
|
550
|
-
set gradient(t) {
|
|
551
|
-
this.setAttribute("background-gradient", t);
|
|
552
|
-
}
|
|
553
|
-
get gradientMobile() {
|
|
554
|
-
return this.getAttribute("background-gradient--mobile");
|
|
555
|
-
}
|
|
556
|
-
set gradientMobile(t) {
|
|
557
|
-
this.setAttribute("background-gradient--mobile", t);
|
|
558
|
-
}
|
|
559
|
-
get gradientTablet() {
|
|
560
|
-
return this.getAttribute("background-gradient--tablet");
|
|
561
|
-
}
|
|
562
|
-
set gradientTablet(t) {
|
|
563
|
-
this.setAttribute("background-gradient--tablet", t);
|
|
564
|
-
}
|
|
565
|
-
get gradientLaptop() {
|
|
566
|
-
return this.getAttribute("background-gradient--laptop");
|
|
567
|
-
}
|
|
568
|
-
set gradientLaptop(t) {
|
|
569
|
-
this.setAttribute("background-gradient--laptop", t);
|
|
570
|
-
}
|
|
571
|
-
get backgroundImage() {
|
|
572
|
-
return this.getAttribute("background-image");
|
|
573
|
-
}
|
|
574
|
-
set backgroundImage(t) {
|
|
575
|
-
this.setAttribute("background-image", t);
|
|
576
|
-
}
|
|
577
|
-
get backgroundImageMobile() {
|
|
578
|
-
return this.getAttribute("background-image--mobile");
|
|
579
|
-
}
|
|
580
|
-
set backgroundImageMobile(t) {
|
|
581
|
-
this.setAttribute("background-image--mobile", t);
|
|
582
|
-
}
|
|
583
|
-
get backgroundImageTablet() {
|
|
584
|
-
return this.getAttribute("background-image--tablet");
|
|
585
|
-
}
|
|
586
|
-
set backgroundImageTablet(t) {
|
|
587
|
-
this.setAttribute("background-image--tablet", t);
|
|
588
|
-
}
|
|
589
|
-
get backgroundImageLaptop() {
|
|
590
|
-
return this.getAttribute("background-image--laptop");
|
|
591
|
-
}
|
|
592
|
-
set backgroundImageLaptop(t) {
|
|
593
|
-
this.setAttribute("background-image--laptop", t);
|
|
594
|
-
}
|
|
595
|
-
get backgroundSize() {
|
|
596
|
-
return this.getAttribute("background-size");
|
|
597
|
-
}
|
|
598
|
-
set backgroundSize(t) {
|
|
599
|
-
this.setAttribute("background-size", t);
|
|
600
|
-
}
|
|
601
|
-
get backgroundPosition() {
|
|
602
|
-
return this.getAttribute("background-position");
|
|
603
|
-
}
|
|
604
|
-
set backgroundPosition(t) {
|
|
605
|
-
this.setAttribute("background-position", t);
|
|
606
|
-
}
|
|
607
|
-
get boxShadow() {
|
|
608
|
-
return this.getAttribute("box-shadow");
|
|
609
|
-
}
|
|
610
|
-
set boxShadow(t) {
|
|
611
|
-
this.setAttribute("box-shadow", t);
|
|
612
|
-
}
|
|
613
|
-
get anchorOffset() {
|
|
614
|
-
return this.getAttribute("anchor-offset");
|
|
615
|
-
}
|
|
616
|
-
set anchorOffset(t) {
|
|
617
|
-
this.setAttribute("anchor-offset", t);
|
|
618
|
-
}
|
|
619
|
-
get inverted() {
|
|
620
|
-
return this.getAttribute("inverted");
|
|
621
|
-
}
|
|
622
|
-
set inverted(t) {
|
|
623
|
-
this.setAttribute("inverted", t);
|
|
624
|
-
}
|
|
625
|
-
};
|
|
626
|
-
ct.nativeName = "div";
|
|
627
|
-
let tt = ct;
|
|
628
|
-
customElements.get("px-container") || customElements.define("px-container", tt);
|
|
629
|
-
const Lt = `.btn{width:var(--button-extended--mobile, var(--button-extended, auto));display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title);text-align:center;gap:var(--px-spacing-2xs-mobile);cursor:pointer;text-decoration:none;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border:var(--px-size-border-m) solid transparent}.btn,.btn *{box-sizing:border-box}.btn ::slotted(px-icon){line-height:0}.btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-color-border-state-hover-default)}.btn:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn:active:not([disabled],[aria-disabled=true],.loading){transform:scale(.95);border-color:var(--px-color-border-state-active-default);color:var(--px-color-text-state-active-default);background:var(--px-color-background-state-hover-bordered-default)}.btn[disabled],.btn[aria-disabled=true]{cursor:default;pointer-events:none}.btn.loading{cursor:inherit}.btn.loading ::slotted(px-spinner){line-height:0}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-primary-default);min-height:var(--px-spacing-l-mobile);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown)[disabled],.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown)[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown).loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-brand-default);border-color:transparent}.btn.secondary{color:var(--px-color-text-brand-default);background:var(--px-color-background-container-secondary-default);min-height:var(--px-spacing-l-mobile);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn.secondary[disabled],.btn.secondary[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}.btn.secondary.loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-brand-default);border-color:transparent}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn.tertiary{background:none;color:var(--px-color-text-brand-default);border-radius:var(--px-radius-pill);border:var(--px-size-border-m) solid transparent;padding:var(--px-padding-2xs-mobile) 0;gap:var(--px-spacing-xs-mobile)}.btn.tertiary ::slotted(px-icon){display:flex;align-items:center;justify-content:center;width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);padding:4px;border-radius:var(--px-radius-pill);background:var(--px-color-background-container-secondary-default);transition:var(--btn-transition)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading),.btn.tertiary:active:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-mobile) var(--px-padding-s-mobile)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon),.btn.tertiary:active:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent;margin:0 -8px;width:inherit;height:inherit}.btn.tertiary[disabled],.btn.tertiary[aria-disabled=true]{color:var(--px-color-text-state-disabled-default)}.btn.tertiary[disabled] ::slotted(px-icon),.btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-color-background-state-disabled-default)}.btn.tertiary.loading{color:var(--px-color-text-brand-default);border-color:transparent}.btn.tertiary.loading ::slotted(px-spinner){display:flex;align-items:center;justify-content:center;width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);padding:4px;border-radius:var(--px-radius-pill);background:var(--px-color-background-state-disabled-default)}.btn.patch{display:inline-flex}.btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn.patch[disabled],.btn.patch[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}.btn.actionable-tag{background:var(--px-color-background-container-default-inverted);color:var(--px-color-text-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);gap:var(--px-spacing-xs-mobile);border-radius:var(--px-radius-pill);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default)}.btn.actionable-tag:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn.actionable-tag:active:not([disabled],[aria-disabled=true],.loading){background:var(--px-color-background-state-state-hover-bordered-default);color:var(--px-color-text-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn.actionable-tag[disabled],.btn.actionable-tag[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default);border-color:var(--px-color-border-none-default)}.btn.header-dropdown{display:flex;justify-content:space-between;width:100%;color:var(--px-color-text-neutral-default);font-weight:var(--px-font-weight-body);font-size:var(--px-text-size-label-l-mobile);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default);padding:var(--px-padding-xs-mobile) var(--px-padding-s-mobile);border-radius:var(--px-radius-main);background-color:var(--px-color-background-container-default-default);touch-action:manipulation}.btn.header-dropdown:after{display:inline-block;content:"";width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:50% 50%;mask-position:50% 50%;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.4753 7.37808C15.1565 7.06426 14.6396 7.06426 14.3208 7.37808L10.0001 11.6313L5.67934 7.37808C5.36055 7.06426 4.84368 7.06426 4.52488 7.37808C4.20608 7.69189 4.20608 8.20069 4.52488 8.5145L9.42284 13.3359C9.74163 13.6497 10.2585 13.6497 10.5773 13.3359L15.4753 8.5145C15.7941 8.20069 15.7941 7.69189 15.4753 7.37808Z' fill='%235C2D91'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.4753 7.37808C15.1565 7.06426 14.6396 7.06426 14.3208 7.37808L10.0001 11.6313L5.67934 7.37808C5.36055 7.06426 4.84368 7.06426 4.52488 7.37808C4.20608 7.69189 4.20608 8.20069 4.52488 8.5145L9.42284 13.3359C9.74163 13.6497 10.2585 13.6497 10.5773 13.3359L15.4753 8.5145C15.7941 8.20069 15.7941 7.69189 15.4753 7.37808Z' fill='%235C2D91'/%3E%3C/svg%3E");background-color:currentColor;color:var(--px-color-icon-brand-default)}button.link{background:none;border:none;text-decoration:underline;padding:0;cursor:pointer}button.link[disabled],button.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}:host([inverted]) .btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn:active:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-color-border-state-active-inverted);color:var(--px-color-text-state-active-inverted);background:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag){color:var(--px-color-text-brand-default);background:var(--px-color-background-container-primary-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag)[disabled],:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag)[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag).loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-brand-inverted);border-color:transparent}:host([inverted]) .btn.secondary{color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-secondary-inverted)}:host([inverted]) .btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-default-inverted)}:host([inverted]) .btn.secondary[disabled],:host([inverted]) .btn.secondary[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn.secondary.loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-brand-inverted);border-color:transparent}:host([inverted]) .btn.tertiary{color:var(--px-color-text-brand-inverted)}:host([inverted]) .btn.tertiary ::slotted(px-icon){background:var(--px-color-background-container-secondary-inverted)}:host([inverted]) .btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon),:host([inverted]) .btn.tertiary:active:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent}:host([inverted]) .btn.tertiary[disabled],:host([inverted]) .btn.tertiary[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn.tertiary[disabled] ::slotted(px-icon),:host([inverted]) .btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-color-background-state-disabled-inverted)}:host([inverted]) .btn.tertiary.loading{color:var(--px-color-text-brand-inverted)}:host([inverted]) .btn.tertiary.loading ::slotted(px-spinner){background:var(--px-color-background-state-disabled-inverted)}:host([inverted]) .btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) .btn.patch[disabled],:host([inverted]) .btn.patch[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn.actionable-tag{background:var(--px-color-background-container-default-default);color:var(--px-color-text-brand-inverted);border-color:var(--px-color-border-neutral-inverted)}:host([inverted]) .btn.actionable-tag:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-default-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn.actionable-tag:active:not([disabled],[aria-disabled=true],.loading){background:var( --px-color-background-state-state-hover-bordered-inverted );color:var(--px-color-text-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn.actionable-tag[disabled],:host([inverted]) .btn.actionable-tag[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted);border-color:var(--px-color-border-none-default)}:host([inverted]) button.link[disabled],:host([inverted]) button.link[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}@media only screen and (max-width: 47.938em){.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}}@media only screen and (min-width: 48em) and (min-width: 64em){.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}}@media only screen and (min-width: 48em){.btn{width:var(--button-extended--tablet, var(--button-extended, auto));font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-2xs-desktop)}.btn:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn.actionable-tag{padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop);gap:var(--px-spacing-xs-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-desktop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-desktop) * -1)}.btn.secondary{padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn.tertiary{padding:var(--px-padding-2xs-desktop) 0;gap:var(--px-spacing-xs-desktop)}.btn.tertiary ::slotted(px-icon){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-desktop) var(--px-padding-s-desktop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.header-dropdown{justify-content:flex-start;align-items:center;width:inherit;color:var(--px-color-text-brand-default);font-weight:var(--px-font-weight-title);font-size:var(--px-text-size-label-m-tablet);border:none;padding:0;border-radius:0;background:none}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}}@media only screen and (min-width: 64.0625em){.btn{width:var(--button-extended--laptop, var(--button-extended, auto));font-size:var(--px-text-size-label-m-laptop);gap:var(--px-spacing-2xs-laptop)}.btn:focus-visble:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}.btn.actionable-tag{padding:var(--px-padding-2xs-laptop) var(--px-padding-xs-laptop);gap:var(--px-spacing-xs-laptop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){padding:var(--px-padding-xs-laptop) var(--px-padding-m-laptop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-laptop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-laptop) * -1)}.btn.secondary{padding:var(--px-padding-xs-laptop) var(--px-padding-m-laptop)}.btn.tertiary{padding:var(--px-padding-2xs-laptop) 0;gap:var(--px-spacing-xs-laptop)}.btn.tertiary ::slotted(px-icon){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-laptop) var(--px-padding-s-laptop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.header-dropdown{font-size:var(--px-text-size-label-m-laptop);padding:0}}@media only screen and (min-width: 90.0625em){.btn{width:var(--button-extended--desktop, var(--button-extended, auto));font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-2xs-desktop)}.btn:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn.actionable-tag{padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop);gap:var(--px-spacing-xs-desktop)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-desktop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-desktop) * -1)}.btn.secondary{padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn.tertiary{padding:var(--px-padding-2xs-desktop) 0;gap:var(--px-spacing-xs-desktop)}.btn.tertiary ::slotted(px-icon){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-desktop) var(--px-padding-s-desktop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.header-dropdown{font-size:var(--px-text-size-label-m-desktop);padding:0}}@keyframes anim-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}`, Tt = ':host([variant="icon-link"]){display:inline-flex}a,.link,::slotted(a){display:inline;align-items:center;font-family:var(--px-font-family);font-size:var(--px-text-size-link-m-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}a:hover,.link:hover{color:var(--px-color-text-state-hover-default)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}a[aria-disabled=true],.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-mobile)}a ::slotted(span[slot="after"]),a ::slotted(span[slot="before"]),.link ::slotted(span[slot="after"]),.link ::slotted(span[slot="before"]){display:inline-block}::slotted(a:hover){color:var(--px-color-text-state-hover-default)}a.no-style{text-decoration:none}a.no-style:hover,a.no-style:focus-visible{color:inherit}a.skip-link{position:absolute;left:-10000px;top:auto;overflow:hidden;background-color:var(--px-color-background-container-default-default);padding:var(--px-padding-xs-mobile)}a.skip-link:focus-visible{left:auto;z-index:999}:host([target="_blank"]) ::slotted(px-icon){vertical-align:middle}.icon-link{color:var(--px-color-icon-brand-default);line-height:1;display:inline-flex}:host([inverted]) a,:host([inverted]) .link,:host([inverted]) ::slotted(a){color:var(--px-color-text-neutral-inverted)}:host([inverted]) a:hover,:host([inverted]) .link:hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) a:focus-visible,:host([inverted]) .link:focus-visible{outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) a[aria-disabled=true],:host([inverted]) .link[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) ::slotted(a:hover){color:var(--px-color-text-state-hover-inverted)}:host([inverted]) a.skip-link{background-color:var(--px-color-background-container-default-inverted)}:host([inverted]) .icon-link{color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-tablet)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-tablet)}a.skip-link{padding:var(--px-padding-xs-tablet)}}@media only screen and (min-width: 1025px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-laptop)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-laptop)}a.skip-link{padding:var(--px-padding-xs-laptop)}}@media only screen and (min-width: 90.0625em){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-desktop)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-desktop)}a.skip-link{padding:var(--px-padding-xs-desktop)}}', Le = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s-mobile);height:1.625em;border:var(--px-size-border-m) solid transparent;border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small);font-family:var(--px-font-family);font-weight:var(--px-font-weight-title);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l);text-align:center;background-color:var(--px-color-background-purpose-promo-default);color:var(--px-color-text-neutral-inverted)}.patch,.patch *{box-sizing:border-box}[shape=bottom-right]{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small) var(--px-radius-patch-big)}[shape=bottom-left],[shape=default]{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small)}.info{background-color:var(--px-color-background-purpose-info-default);color:var(--px-color-text-neutral-default)}.black-friday{background-color:var(--px-color-background-surface-dark);color:var(--px-color-text-neutral-inverted)}.eco{background-color:var(--px-color-background-purpose-success-default);color:var(--px-color-text-neutral-inverted)}.greyed{background-color:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}:host([inverted]) .patch{background-color:var(--px-color-background-purpose-promo-inverted);color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info{background-color:var(--px-color-background-purpose-info-inverted);color:var(--px-color-text-neutral-default)}:host([inverted]) .black-friday{background-color:var(--px-color-background-container-light-default);color:var(--px-color-text-neutral-default)}:host([inverted]) .eco{background-color:var(--px-color-background-purpose-success-inverted);color:var(--px-color-text-neutral-default)}:host([inverted]) .greyed{background-color:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}@media only screen and (min-width: 768px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1025px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1441px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}", Te = ":host:has(.tag){display:inline-block}.tag{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-body);gap:var(--px-spacing-xs-mobile);background-color:var(--px-color-background-container-default-default);color:var(--px-color-text-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);border:var(--px-size-border-s) solid transparent;border-radius:var(--px-radius-main)}.tag,.tag *{box-sizing:border-box}:host([disabled]) .tag{background-color:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}:host([inverted]) .tag{background-color:var(--px-color-background-container-default-inverted);color:var(--px-color-text-neutral-inverted)}:host([inverted]):host([disabled]) .tag{background-color:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}@media only screen and (min-width: 768px){.tag{font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-xs-desktop);padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop)}}@media only screen and (min-width: 1025px){.tag{font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-xs-desktop);padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop)}}", Mt = new CSSStyleSheet(), Rt = new CSSStyleSheet(), Bt = new CSSStyleSheet(), It = new CSSStyleSheet();
|
|
630
|
-
Mt.replaceSync(Lt);
|
|
631
|
-
Rt.replaceSync(Tt);
|
|
632
|
-
Bt.replaceSync(Le);
|
|
633
|
-
It.replaceSync(Te);
|
|
634
|
-
const Me = [
|
|
635
|
-
"",
|
|
636
|
-
"default",
|
|
637
|
-
"secondary",
|
|
638
|
-
"tertiary",
|
|
639
|
-
"link",
|
|
640
|
-
"patch",
|
|
641
|
-
"patch-info",
|
|
642
|
-
"patch-black-friday",
|
|
643
|
-
"patch-eco",
|
|
644
|
-
"actionable-tag",
|
|
645
|
-
"header-dropdown"
|
|
646
|
-
], Re = [
|
|
647
|
-
"",
|
|
648
|
-
"default",
|
|
649
|
-
"bottom-right",
|
|
650
|
-
"bottom-left",
|
|
651
|
-
"alternative"
|
|
652
|
-
], bt = class bt extends x {
|
|
653
|
-
constructor() {
|
|
654
|
-
super(Mt, Rt, Bt, It), this.template = () => `<button class="btn">
|
|
655
|
-
<slot name="before"></slot><slot></slot><slot name="after"></slot>
|
|
656
|
-
</button>`, this.shadowRoot.innerHTML = this.template();
|
|
657
|
-
}
|
|
658
|
-
static get observedAttributes() {
|
|
659
|
-
return [
|
|
660
|
-
...super.observedAttributes,
|
|
661
|
-
"variant",
|
|
662
|
-
"state",
|
|
663
|
-
"loading",
|
|
664
|
-
"shape",
|
|
665
|
-
"shape--mobile",
|
|
666
|
-
"shape--tablet",
|
|
667
|
-
"shape--laptop",
|
|
668
|
-
"shape--desktop",
|
|
669
|
-
"inverted",
|
|
670
|
-
"aria-expanded",
|
|
671
|
-
"extended",
|
|
672
|
-
"extended--mobile",
|
|
673
|
-
"extended--tablet",
|
|
674
|
-
"extended--laptop",
|
|
675
|
-
"extended--desktop"
|
|
676
|
-
];
|
|
677
|
-
}
|
|
678
|
-
connectedCallback() {
|
|
679
|
-
super.connectedCallback();
|
|
680
|
-
const t = this.querySelectorAll("px-icon");
|
|
681
|
-
t && t.forEach((e) => {
|
|
682
|
-
const r = e.getAttribute("size"), i = e.getAttribute("color");
|
|
683
|
-
e && (e.addEventListener("click", () => {
|
|
684
|
-
this.$el.focus();
|
|
685
|
-
}), r || e.setAttribute("size", "xs"), i || e.setAttribute("color", "inherit"));
|
|
686
|
-
}), zt(this, this.$el), this.$el.type === "submit" && this.addEventListener("click", (e) => {
|
|
687
|
-
var r;
|
|
688
|
-
e.preventDefault(), (r = this.closest("form")) == null || r.submit();
|
|
689
|
-
}), this.$el.type === "reset" && this.addEventListener("click", (e) => {
|
|
690
|
-
var r;
|
|
691
|
-
e.preventDefault(), (r = this.closest("form")) == null || r.reset();
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
|
-
attributeChangedCallback(t, e, r) {
|
|
695
|
-
if (e !== r)
|
|
696
|
-
switch (t) {
|
|
697
|
-
case "variant":
|
|
698
|
-
this.updateVariant(e, r);
|
|
699
|
-
break;
|
|
700
|
-
case "state":
|
|
701
|
-
this.updateState(e, r);
|
|
702
|
-
break;
|
|
703
|
-
case "extended":
|
|
704
|
-
case "extended--mobile":
|
|
705
|
-
case "extended--tablet":
|
|
706
|
-
case "extended--laptop":
|
|
707
|
-
case "extended--desktop":
|
|
708
|
-
this.updateExtended(t, r);
|
|
709
|
-
break;
|
|
710
|
-
case "loading":
|
|
711
|
-
this.updateLoading();
|
|
712
|
-
break;
|
|
713
|
-
case "shape":
|
|
714
|
-
case "shape--mobile":
|
|
715
|
-
case "shape--tablet":
|
|
716
|
-
case "shape--laptop":
|
|
717
|
-
case "shape--desktop":
|
|
718
|
-
this.updateShape(t, r, Re);
|
|
719
|
-
break;
|
|
720
|
-
case "aria-expanded":
|
|
721
|
-
r && (this.$el.setAttribute("aria-expanded", r), this.removeAttribute("aria-expanded"));
|
|
722
|
-
break;
|
|
723
|
-
default:
|
|
724
|
-
super.attributeChangedCallback(t, e, r);
|
|
725
|
-
break;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
checkClass(t) {
|
|
729
|
-
if (t.startsWith("patch-")) {
|
|
730
|
-
const e = t.split(/-(.*)/s);
|
|
731
|
-
for (const r of e)
|
|
732
|
-
r != "" && this.$el.classList.toggle(r);
|
|
733
|
-
} else
|
|
734
|
-
this.$el.classList.toggle(t);
|
|
735
|
-
}
|
|
736
|
-
_toggleClass(t, e) {
|
|
737
|
-
t !== null && t !== "" && t !== "default" && this.checkClass(t), e !== null && e !== "" && e !== "default" && this.checkClass(e);
|
|
738
|
-
}
|
|
739
|
-
updateVariant(t, e) {
|
|
740
|
-
e === "link" ? this.$el.classList.remove("btn") : this.$el.classList.add("btn"), this._toggleClass(t, e), this.checkName(Me, e) || console.error(
|
|
741
|
-
`${e} is not a valid "variant" value for ${e}`
|
|
742
|
-
);
|
|
743
|
-
}
|
|
744
|
-
updateState(t, e) {
|
|
745
|
-
const r = ["", "default", "success", "error"];
|
|
746
|
-
this._toggleClass(t, e), this.checkName(r, e) || console.error(`${e} is not a valid "sate" value`);
|
|
747
|
-
}
|
|
748
|
-
updateExtended(t, e) {
|
|
749
|
-
e === null ? this.$el.style.setProperty(`--button-${t}`, "") : this.$el.style.setProperty(`--button-${t}`, "100%");
|
|
750
|
-
}
|
|
751
|
-
updateLoading() {
|
|
752
|
-
const t = this.querySelector("px-spinner");
|
|
753
|
-
t && (t.getAttribute("size") || t.setAttribute("size", "xs")), this.$el.classList.toggle("loading");
|
|
754
|
-
}
|
|
755
|
-
updateShape(t, e, r) {
|
|
756
|
-
if (!$(r, e)) {
|
|
757
|
-
console.error(`${e} is not a valid shape value`);
|
|
758
|
-
return;
|
|
759
|
-
}
|
|
760
|
-
e !== null && e !== "" && this.$el.setAttribute(t, e);
|
|
761
|
-
}
|
|
762
|
-
get variant() {
|
|
763
|
-
return this.getAttribute("variant");
|
|
764
|
-
}
|
|
765
|
-
set variant(t) {
|
|
766
|
-
this.setAttribute("variant", t);
|
|
767
|
-
}
|
|
768
|
-
get state() {
|
|
769
|
-
return this.getAttribute("state");
|
|
770
|
-
}
|
|
771
|
-
set state(t) {
|
|
772
|
-
this.setAttribute("state", t);
|
|
773
|
-
}
|
|
774
|
-
get extended() {
|
|
775
|
-
return this.getAttribute("extended");
|
|
776
|
-
}
|
|
777
|
-
set extended(t) {
|
|
778
|
-
this.setAttribute("extended", t);
|
|
779
|
-
}
|
|
780
|
-
get extendedMobile() {
|
|
781
|
-
return this.getAttribute("extended--mobile");
|
|
782
|
-
}
|
|
783
|
-
set extendedMobile(t) {
|
|
784
|
-
this.setAttribute("extended--mobile", t);
|
|
785
|
-
}
|
|
786
|
-
get extendedTablet() {
|
|
787
|
-
return this.getAttribute("extended--tablet");
|
|
788
|
-
}
|
|
789
|
-
set extendedTablet(t) {
|
|
790
|
-
this.setAttribute("extended--tablet", t);
|
|
791
|
-
}
|
|
792
|
-
get extendedLaptop() {
|
|
793
|
-
return this.getAttribute("extended--laptop");
|
|
794
|
-
}
|
|
795
|
-
set extendedLaptop(t) {
|
|
796
|
-
this.setAttribute("extended--laptop", t);
|
|
797
|
-
}
|
|
798
|
-
get extendedDesktop() {
|
|
799
|
-
return this.getAttribute("extended--desktop");
|
|
800
|
-
}
|
|
801
|
-
set extendedDesktop(t) {
|
|
802
|
-
this.setAttribute("extended--desktop", t);
|
|
803
|
-
}
|
|
804
|
-
get loading() {
|
|
805
|
-
return this.getAttribute("loading");
|
|
806
|
-
}
|
|
807
|
-
set loading(t) {
|
|
808
|
-
this.setAttribute("loading", t);
|
|
809
|
-
}
|
|
810
|
-
get shape() {
|
|
811
|
-
return this.getAttribute("shape");
|
|
812
|
-
}
|
|
813
|
-
set shape(t) {
|
|
814
|
-
this.setAttribute("shape", t);
|
|
815
|
-
}
|
|
816
|
-
get shapeMobile() {
|
|
817
|
-
return this.getAttribute("shape--mobile");
|
|
818
|
-
}
|
|
819
|
-
set shapeMobile(t) {
|
|
820
|
-
this.setAttribute("shape--mobile", t);
|
|
821
|
-
}
|
|
822
|
-
get shapeTablet() {
|
|
823
|
-
return this.getAttribute("shape--tablet");
|
|
824
|
-
}
|
|
825
|
-
set shapeTablet(t) {
|
|
826
|
-
this.setAttribute("shape--tablet", t);
|
|
827
|
-
}
|
|
828
|
-
get shapeLaptop() {
|
|
829
|
-
return this.getAttribute("shape--laptop");
|
|
830
|
-
}
|
|
831
|
-
set shapeLaptop(t) {
|
|
832
|
-
this.setAttribute("shape--laptop", t);
|
|
833
|
-
}
|
|
834
|
-
get shapeDesktop() {
|
|
835
|
-
return this.getAttribute("shape--desktop");
|
|
836
|
-
}
|
|
837
|
-
set shapeDesktop(t) {
|
|
838
|
-
this.setAttribute("shape--desktop", t);
|
|
839
|
-
}
|
|
840
|
-
get inverted() {
|
|
841
|
-
return this.getAttribute("inverted");
|
|
842
|
-
}
|
|
843
|
-
set inverted(t) {
|
|
844
|
-
this.setAttribute("inverted", t);
|
|
845
|
-
}
|
|
846
|
-
get ariaExpanded() {
|
|
847
|
-
return this.getAttribute("aria-expanded");
|
|
848
|
-
}
|
|
849
|
-
set ariaExpanded(t) {
|
|
850
|
-
t ? this.setAttribute("aria-expanded", t) : this.removeAttribute("aria-expanded");
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
bt.nativeName = "button";
|
|
854
|
-
let et = bt;
|
|
855
|
-
customElements.get("px-button") || customElements.define("px-button", et);
|
|
856
|
-
const Be = ':host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:var(--px-content-wrapper-max-width-desktop)}@media only screen and (min-width: 77em){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-overlapped-mobile) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-mobile)}@media only screen and (min-width: 48em){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}@media only screen and (min-width: 64.0625em){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}', qt = new CSSStyleSheet();
|
|
857
|
-
qt.replaceSync(Be);
|
|
858
|
-
class Ie extends HTMLElement {
|
|
859
|
-
constructor() {
|
|
860
|
-
super(), this.template = () => `
|
|
861
|
-
<px-container border-radius="none" padding-inline="none" background-color="${this.backgroundColor}">
|
|
862
|
-
<div class="content-wrapper ${this.$slotOverlap ? "overlapped" : ""}">
|
|
863
|
-
<px-vstack gap="heading-to-content">
|
|
864
|
-
<slot name="heading"></slot>
|
|
865
|
-
<px-vstack gap="none">
|
|
866
|
-
<slot></slot>
|
|
867
|
-
</px-vstack>
|
|
868
|
-
</px-vstack>
|
|
869
|
-
</div>
|
|
870
|
-
</px-container>
|
|
871
|
-
<div class="content-wrapper">
|
|
872
|
-
<slot name="overlap"></slot>
|
|
873
|
-
</div>
|
|
874
|
-
`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [qt];
|
|
875
|
-
}
|
|
876
|
-
connectedCallback() {
|
|
877
|
-
const t = this.querySelector('[slot="heading"]');
|
|
878
|
-
!this.paddingBlock && !this.paddingTop && !this.paddingBottom && !this.paddingBlockMobile && !this.paddingTopMobile && !this.paddingBottomMobile && !this.paddingBlockTablet && !this.paddingTopTablet && !this.paddingBottomTablet && !this.paddingBlockLaptop && !this.paddingTopLaptop && !this.paddingBottomLaptop && (this.$container.paddingBlock = "none"), t || this.shadowRoot.querySelector("px-vstack").setAttribute("gap", "none");
|
|
879
|
-
}
|
|
880
|
-
static get observedAttributes() {
|
|
881
|
-
return [
|
|
882
|
-
"background-color",
|
|
883
|
-
"background-gradient",
|
|
884
|
-
"background-image",
|
|
885
|
-
"background-image--mobile",
|
|
886
|
-
"background-image--tablet",
|
|
887
|
-
"background-image--laptop",
|
|
888
|
-
"background-size",
|
|
889
|
-
"background-position",
|
|
890
|
-
"padding-block",
|
|
891
|
-
"padding-top",
|
|
892
|
-
"padding-bottom",
|
|
893
|
-
"padding-block--mobile",
|
|
894
|
-
"padding-top--mobile",
|
|
895
|
-
"padding-bottom--mobile",
|
|
896
|
-
"padding-block--tablet",
|
|
897
|
-
"padding-top--tablet",
|
|
898
|
-
"padding-bottom--tablet",
|
|
899
|
-
"padding-block--laptop",
|
|
900
|
-
"padding-top--laptop",
|
|
901
|
-
"padding-bottom--laptop",
|
|
902
|
-
"border",
|
|
903
|
-
"border-side",
|
|
904
|
-
"border-side--mobile",
|
|
905
|
-
"border-side--tablet",
|
|
906
|
-
"border-side--laptop"
|
|
907
|
-
];
|
|
908
|
-
}
|
|
909
|
-
get $container() {
|
|
910
|
-
return this.shadowRoot.querySelector("px-container");
|
|
911
|
-
}
|
|
912
|
-
attributeChangedCallback(t, e, r) {
|
|
913
|
-
if (e !== r)
|
|
914
|
-
switch (t) {
|
|
915
|
-
case "background-color":
|
|
916
|
-
this.$container.backgroundColor = St.indexOf(r) > 0 ? r : "none";
|
|
917
|
-
break;
|
|
918
|
-
case "background-gradient":
|
|
919
|
-
this.$container.gradient = this.gradient;
|
|
920
|
-
break;
|
|
921
|
-
case "background-image":
|
|
922
|
-
this.$container.backgroundImage = r;
|
|
923
|
-
break;
|
|
924
|
-
case "background-image--mobile":
|
|
925
|
-
this.$container.backgroundImageMobile = r;
|
|
926
|
-
break;
|
|
927
|
-
case "background-image--tablet":
|
|
928
|
-
this.$container.backgroundImageTablet = r;
|
|
929
|
-
break;
|
|
930
|
-
case "background-image--laptop":
|
|
931
|
-
this.$container.backgroundImageLaptop = r;
|
|
932
|
-
break;
|
|
933
|
-
case "background-size":
|
|
934
|
-
this.$container.backgroundSize = r;
|
|
935
|
-
break;
|
|
936
|
-
case "background-position":
|
|
937
|
-
this.$container.backgroundPosition = r;
|
|
938
|
-
break;
|
|
939
|
-
case "padding-block":
|
|
940
|
-
this.$container.paddingBlock = r;
|
|
941
|
-
break;
|
|
942
|
-
case "padding-top":
|
|
943
|
-
this.$container.paddingTop = r;
|
|
944
|
-
break;
|
|
945
|
-
case "padding-bottom":
|
|
946
|
-
this.$container.paddingBottom = r;
|
|
947
|
-
break;
|
|
948
|
-
case "padding-block--mobile":
|
|
949
|
-
this.$container.paddingBlockMobile = r;
|
|
950
|
-
break;
|
|
951
|
-
case "padding-top--mobile":
|
|
952
|
-
this.$container.paddingTopMobile = r;
|
|
953
|
-
break;
|
|
954
|
-
case "padding-bottom--mobile":
|
|
955
|
-
this.$container.paddingBottomMobile = r;
|
|
956
|
-
break;
|
|
957
|
-
case "padding-block--tablet":
|
|
958
|
-
this.$container.paddingBlockTablet = r;
|
|
959
|
-
break;
|
|
960
|
-
case "padding-top--tablet":
|
|
961
|
-
this.$container.paddingTopTablet = r;
|
|
962
|
-
break;
|
|
963
|
-
case "padding-bottom--tablet":
|
|
964
|
-
this.$container.paddingBottomTablet = r;
|
|
965
|
-
break;
|
|
966
|
-
case "padding-block--laptop":
|
|
967
|
-
this.$container.paddingBlockLaptop = r;
|
|
968
|
-
break;
|
|
969
|
-
case "padding-top--laptop":
|
|
970
|
-
this.$container.paddingTopLaptop = r;
|
|
971
|
-
break;
|
|
972
|
-
case "padding-bottom--laptop":
|
|
973
|
-
this.$container.paddingBottomLaptop = r;
|
|
974
|
-
break;
|
|
975
|
-
case "border":
|
|
976
|
-
this.$container.border = r;
|
|
977
|
-
break;
|
|
978
|
-
case "border-side":
|
|
979
|
-
this.$container.borderSide = r;
|
|
980
|
-
break;
|
|
981
|
-
case "border-side--mobile":
|
|
982
|
-
this.$container.borderSideMobile = r;
|
|
983
|
-
break;
|
|
984
|
-
case "border-side--tablet":
|
|
985
|
-
this.$container.borderSideTablet = r;
|
|
986
|
-
break;
|
|
987
|
-
case "border-side--laptop":
|
|
988
|
-
this.$container.borderSideLaptop = r;
|
|
989
|
-
break;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
get $slotOverlap() {
|
|
993
|
-
return this.querySelector('[slot="overlap"]');
|
|
994
|
-
}
|
|
995
|
-
get backgroundColor() {
|
|
996
|
-
return this.getAttribute("background-color") || "none";
|
|
997
|
-
}
|
|
998
|
-
set backgroundColor(t) {
|
|
999
|
-
this.setAttribute("background-color", t);
|
|
1000
|
-
}
|
|
1001
|
-
get gradient() {
|
|
1002
|
-
return this.getAttribute("background-gradient");
|
|
1003
|
-
}
|
|
1004
|
-
set gradient(t) {
|
|
1005
|
-
this.setAttribute("background-gradient", t);
|
|
1006
|
-
}
|
|
1007
|
-
get backgroundImage() {
|
|
1008
|
-
return this.getAttribute("background-image");
|
|
1009
|
-
}
|
|
1010
|
-
set backgroundImage(t) {
|
|
1011
|
-
this.setAttribute("background-image", t);
|
|
1012
|
-
}
|
|
1013
|
-
get backgroundImageMobile() {
|
|
1014
|
-
return this.getAttribute("background-image--mobile");
|
|
1015
|
-
}
|
|
1016
|
-
set backgroundImageMobile(t) {
|
|
1017
|
-
this.setAttribute("background-image--mobile", t);
|
|
1018
|
-
}
|
|
1019
|
-
get backgroundImageTablet() {
|
|
1020
|
-
return this.getAttribute("background-image--tablet");
|
|
1021
|
-
}
|
|
1022
|
-
set backgroundImageTablet(t) {
|
|
1023
|
-
this.setAttribute("background-image--tablet", t);
|
|
1024
|
-
}
|
|
1025
|
-
get backgroundImageLaptop() {
|
|
1026
|
-
return this.getAttribute("background-image--laptop");
|
|
1027
|
-
}
|
|
1028
|
-
set backgroundImageLaptop(t) {
|
|
1029
|
-
this.setAttribute("background-image--laptop", t);
|
|
1030
|
-
}
|
|
1031
|
-
get backgroundSize() {
|
|
1032
|
-
return this.getAttribute("background-size");
|
|
1033
|
-
}
|
|
1034
|
-
set backgroundSize(t) {
|
|
1035
|
-
this.setAttribute("background-size", t);
|
|
1036
|
-
}
|
|
1037
|
-
get backgroundPosition() {
|
|
1038
|
-
return this.getAttribute("background-position");
|
|
1039
|
-
}
|
|
1040
|
-
set backgroundPosition(t) {
|
|
1041
|
-
this.setAttribute("background-position", t);
|
|
1042
|
-
}
|
|
1043
|
-
get paddingBlock() {
|
|
1044
|
-
return this.getAttribute("padding-block");
|
|
1045
|
-
}
|
|
1046
|
-
set paddingBlock(t) {
|
|
1047
|
-
this.setAttribute("padding-block", t);
|
|
1048
|
-
}
|
|
1049
|
-
get paddingTop() {
|
|
1050
|
-
return this.getAttribute("padding-top");
|
|
1051
|
-
}
|
|
1052
|
-
set paddingTop(t) {
|
|
1053
|
-
this.setAttribute("padding-top", t);
|
|
1054
|
-
}
|
|
1055
|
-
get paddingBottom() {
|
|
1056
|
-
return this.getAttribute("padding-bottom");
|
|
1057
|
-
}
|
|
1058
|
-
set paddingBottom(t) {
|
|
1059
|
-
this.setAttribute("padding-bottom", t);
|
|
1060
|
-
}
|
|
1061
|
-
get paddingBlockMobile() {
|
|
1062
|
-
return this.getAttribute("padding-block--mobile");
|
|
1063
|
-
}
|
|
1064
|
-
set paddingBlockMobile(t) {
|
|
1065
|
-
this.setAttribute("padding-block--mobile", t);
|
|
1066
|
-
}
|
|
1067
|
-
get paddingTopMobile() {
|
|
1068
|
-
return this.getAttribute("padding-top--mobile");
|
|
1069
|
-
}
|
|
1070
|
-
set paddingTopMobile(t) {
|
|
1071
|
-
this.setAttribute("padding-top--mobile", t);
|
|
1072
|
-
}
|
|
1073
|
-
get paddingBottomMobile() {
|
|
1074
|
-
return this.getAttribute("padding-bottom--mobile");
|
|
1075
|
-
}
|
|
1076
|
-
set paddingBottomMobile(t) {
|
|
1077
|
-
this.setAttribute("padding-bottom--mobile", t);
|
|
1078
|
-
}
|
|
1079
|
-
get paddingBlockTablet() {
|
|
1080
|
-
return this.getAttribute("padding-block--tablet");
|
|
1081
|
-
}
|
|
1082
|
-
set paddingBlockTablet(t) {
|
|
1083
|
-
this.setAttribute("padding-block--tablet", t);
|
|
1084
|
-
}
|
|
1085
|
-
get paddingTopTablet() {
|
|
1086
|
-
return this.getAttribute("padding-top--tablet");
|
|
1087
|
-
}
|
|
1088
|
-
set paddingTopTablet(t) {
|
|
1089
|
-
this.setAttribute("padding-top--tablet", t);
|
|
1090
|
-
}
|
|
1091
|
-
get paddingBottomTablet() {
|
|
1092
|
-
return this.getAttribute("padding-bottom--tablet");
|
|
1093
|
-
}
|
|
1094
|
-
set paddingBottomTablet(t) {
|
|
1095
|
-
this.setAttribute("padding-bottom--tablet", t);
|
|
1096
|
-
}
|
|
1097
|
-
get paddingBlockLaptop() {
|
|
1098
|
-
return this.getAttribute("padding-block--laptop");
|
|
1099
|
-
}
|
|
1100
|
-
set paddingBlockLaptop(t) {
|
|
1101
|
-
this.setAttribute("padding-block--laptop", t);
|
|
1102
|
-
}
|
|
1103
|
-
get paddingTopLaptop() {
|
|
1104
|
-
return this.getAttribute("padding-top--laptop");
|
|
1105
|
-
}
|
|
1106
|
-
set paddingTopLaptop(t) {
|
|
1107
|
-
this.setAttribute("padding-top--laptop", t);
|
|
1108
|
-
}
|
|
1109
|
-
get paddingBottomLaptop() {
|
|
1110
|
-
return this.getAttribute("padding-bottom--laptop");
|
|
1111
|
-
}
|
|
1112
|
-
set paddingBottomLaptop(t) {
|
|
1113
|
-
this.setAttribute("padding-bottom--laptop", t);
|
|
1114
|
-
}
|
|
1115
|
-
get border() {
|
|
1116
|
-
return this.getAttribute("border");
|
|
1117
|
-
}
|
|
1118
|
-
set border(t) {
|
|
1119
|
-
this.setAttribute("border", t);
|
|
1120
|
-
}
|
|
1121
|
-
get borderSide() {
|
|
1122
|
-
return this.getAttribute("border-side");
|
|
1123
|
-
}
|
|
1124
|
-
set borderSide(t) {
|
|
1125
|
-
this.setAttribute("border-side", t);
|
|
1126
|
-
}
|
|
1127
|
-
get borderSideMobile() {
|
|
1128
|
-
return this.getAttribute("border-side--mobile");
|
|
1129
|
-
}
|
|
1130
|
-
set borderSideMobile(t) {
|
|
1131
|
-
this.setAttribute("border-side--mobile", t);
|
|
1132
|
-
}
|
|
1133
|
-
get borderSideTablet() {
|
|
1134
|
-
return this.getAttribute("border-side--tablet");
|
|
1135
|
-
}
|
|
1136
|
-
set borderSideTablet(t) {
|
|
1137
|
-
this.setAttribute("border-side--tablet", t);
|
|
1138
|
-
}
|
|
1139
|
-
get borderSideLaptop() {
|
|
1140
|
-
return this.getAttribute("border-side--laptop");
|
|
1141
|
-
}
|
|
1142
|
-
set borderSideLaptop(t) {
|
|
1143
|
-
this.setAttribute("border-side--laptop", t);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
customElements.get("px-section") || customElements.define("px-section", Ie);
|
|
1147
|
-
const qe = ["", "default", "naked", "contained"], De = [
|
|
1148
|
-
"",
|
|
1149
|
-
"container-light",
|
|
1150
|
-
"container-default"
|
|
1151
|
-
];
|
|
1152
|
-
function T(o) {
|
|
1153
|
-
o.hasAttribute("width") || o.setAttribute("width", "s"), o.setAttribute("border-radius", "pill");
|
|
1154
|
-
}
|
|
1155
|
-
function M(o) {
|
|
1156
|
-
o.getAttribute("variant") === "contained" && !o.getAttribute("background-color") && o.setAttribute("background-color", "container-light");
|
|
1157
|
-
}
|
|
1158
|
-
function Pe(o, t, e) {
|
|
1159
|
-
if (!$(qe, e)) {
|
|
1160
|
-
console.error(`${e} is not an allowed variant value.`);
|
|
1161
|
-
return;
|
|
1162
|
-
}
|
|
1163
|
-
t !== null && t !== "" && t !== "default" && o.classList.toggle(t), e !== null && e !== "" && e !== "default" && o.classList.toggle(e);
|
|
1164
|
-
}
|
|
1165
|
-
function O(o, t, e, r = []) {
|
|
1166
|
-
e ? (o.setAttribute("inverted", ""), r.forEach((i) => i.setAttribute("inverted", "")), t.forEach((i) => {
|
|
1167
|
-
i.hasAttribute("inverted") || i.setAttribute("inverted", "");
|
|
1168
|
-
})) : (o.removeAttribute("inverted"), r.forEach((i) => i.removeAttribute("inverted")), t.forEach((i) => {
|
|
1169
|
-
i.hasAttribute("inverted") && i.removeAttribute("inverted");
|
|
1170
|
-
}));
|
|
1171
|
-
}
|
|
1172
|
-
function _e(o, t, e, r, i) {
|
|
1173
|
-
if (!$(i, r)) {
|
|
1174
|
-
console.error(`${r} is not an allowed ${t} value`);
|
|
1175
|
-
return;
|
|
1176
|
-
}
|
|
1177
|
-
const a = (s) => {
|
|
1178
|
-
s !== null && s !== "" && s !== "default" && (o.style.setProperty(
|
|
1179
|
-
"--cell-contained-background-color-default",
|
|
1180
|
-
`var(--px-color-background-${s}-default)`
|
|
1181
|
-
), o.style.setProperty(
|
|
1182
|
-
"--cell-contained-background-color-inverted",
|
|
1183
|
-
`var(--px-color-background-${s}-inverted)`
|
|
1184
|
-
));
|
|
1185
|
-
};
|
|
1186
|
-
a(e), a(r);
|
|
1187
|
-
}
|
|
1188
|
-
function Dt(o, t, e, r = [], i = {}) {
|
|
1189
|
-
e ? (o.setAttribute("disabled", ""), r.forEach((a) => a.setAttribute("disabled", "")), t.forEach((a) => {
|
|
1190
|
-
a.hasAttribute("disabled") || a.setAttribute("disabled", "");
|
|
1191
|
-
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "true"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = -1)) : (o.removeAttribute("disabled"), r.forEach((a) => a.removeAttribute("disabled")), t.forEach((a) => {
|
|
1192
|
-
a.hasAttribute("disabled") && a.removeAttribute("disabled");
|
|
1193
|
-
}), i.ariaEl && i.setAria && i.ariaEl.setAttribute("aria-disabled", "false"), i.ariaEl && i.setTabIndex && (i.ariaEl.tabIndex = 0));
|
|
1194
|
-
}
|
|
1195
|
-
const R = ":host{display:block;outline:none}:host .cell,:host .cell-link,:host .cell-button,:host .cell-checkbox,:host .cell-radio,:host .cell-switch{display:block;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition)}:host .cell,:host .cell *,:host .cell-link,:host .cell-link *,:host .cell-button,:host .cell-button *,:host .cell-checkbox,:host .cell-checkbox *,:host .cell-radio,:host .cell-radio *,:host .cell-switch,:host .cell-switch *{box-sizing:border-box}:host .cell-link,:host .cell-button,:host .cell-checkbox,:host .cell-radio,:host .cell-switch{width:100%;outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile)}:host .cell-link,:host .cell-button{cursor:pointer}:host .cell-checkbox,:host .cell-radio,:host .cell-switch{cursor:default}:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-mobile);outline-style:solid;position:relative}:host:host(:not([disabled])) .cell-link:focus-visible,:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid;position:relative}:host:host([disabled]) .cell-link,:host:host([disabled]) .cell-button,:host:host([disabled]) .cell-checkbox,:host:host([disabled]) .cell-radio,:host:host([disabled]) .cell-switch{cursor:default;pointer-events:none}@media only screen and (min-width: 768px){:scope:host .cell-link,:scope:host .cell-button,:scope:host .cell-checkbox,:scope:host .cell-radio,:scope:host .cell-switch{outline-width:var(--px-focus-outline-tablet)}:scope:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}:scope:host:host(:not([disabled])) .cell-link:focus-visible,:scope:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 1025px){:scope:host .cell-link,:scope:host .cell-button,:scope:host .cell-checkbox,:scope:host .cell-radio,:scope:host .cell-switch{outline-width:var(--px-focus-outline-desktop)}:scope:host:host(:not([disabled])):host(:focus-visible) .cell-checkbox,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-radio,:scope:host:host(:not([disabled])):host(:focus-visible) .cell-switch{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}:scope:host:host(:not([disabled])) .cell-link:focus-visible,:scope:host:host(:not([disabled])) .cell-button:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}:host([inverted]) .cell-link,:host([inverted]) .cell-button,:host([inverted]) .cell-checkbox,:host([inverted]) .cell-radio,:host([inverted]) .cell-switch{outline-color:var(--px-color-border-focus-outline-inverted)}", He = ':host([separator]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.cell{color:var(--px-color-text-neutral-default);padding:var(--px-spacing-s-mobile);font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-mobile);font-weight:var(--px-font-weight-title)}.cell ::slotted([slot="description"]){font-weight:var(--px-font-weight-body);font-size:var(--px-text-size-label-m-mobile)}.cell ::slotted([slot="suffix"]){text-align:right;font-weight:var(--px-font-weight-title)}.cell[compact]{padding-block:var(--px-spacing-xs-mobile)}:host([hoverable]:not([disabled])) .cell{cursor:pointer;text-decoration:none}:host([hoverable]:hover:not([disabled])) .cell{background-color:var(--px-color-background-state-hover-default)}:host([hoverable][disabled]) .cell{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}.contained{background-color:var( --cell-contained-background-color-default, var(--px-color-background-container-light-default) )}:host([hoverable]) .contained{border:var(--px-size-border-m) solid transparent}:host([hoverable]:hover:not([disabled])) .contained{background-color:var(--px-color-background-state-hover-bordered-default);border-color:var(--px-color-border-state-hover-default)}:host([hoverable][disabled]) .contained{background-color:var(--px-color-background-state-disabled-default)}@media only screen and (max-width: 47.9375em){:host([separator--mobile]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.contained{border-radius:var( --cell-contained-border-radius-top-left--mobile, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--mobile, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--mobile, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--mobile, var(--px-radius-main) )}}@media only screen and (min-width: 48em){:host{display:block}.cell{padding:var(--px-padding-s-tablet)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-tablet)}.cell ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-tablet)}.cell[compact]{padding-block:var(--px-spacing-xs-tablet)}}@media only screen and (min-width: 48em) and (max-width: 64em){:host([separator--tablet]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.contained{border-radius:var( --cell-contained-border-radius-top-left--tablet, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--tablet, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--tablet, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--tablet, var(--px-radius-main) )}}@media only screen and (min-width: 64.0625em){:host{display:block}.cell{padding:var(--px-spacing-s-laptop)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-laptop)}.cell ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-laptop)}.cell[compact]{padding-block:var(--px-spacing-xs-laptop)}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){:host([separator--laptop]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.contained{border-radius:var( --cell-contained-border-radius-top-left--laptop, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--laptop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--laptop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--laptop, var(--px-radius-main) )}}@media only screen and (min-width: 90.0625em){:host{display:block}:host([separator--desktop]):after{position:relative;content:"";display:block;width:100%;border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}.cell{padding:var(--px-spacing-s-desktop)}.cell ::slotted([slot="label"]){font-size:var(--px-text-size-label-l-desktop)}.cell ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-desktop)}.cell[compact]{padding-block:var(--px-spacing-xs-desktop)}.contained{border-radius:var( --cell-contained-border-radius-top-left--desktop, var(--px-radius-main) ) var( --cell-contained-border-radius-top-right--desktop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-right--desktop, var(--px-radius-main) ) var( --cell-contained-border-radius-bottom-left--desktop, var(--px-radius-main) )}}:host([inverted]):after{border-bottom-color:var(--px-color-border-main-inverted)}:host([inverted]) .cell{color:var(--px-color-text-neutral-inverted)}:host([inverted]):host([hoverable]:hover:not([disabled])) .cell{background-color:var(--px-color-background-state-hover-inverted)}:host([inverted]):host([hoverable][disabled]) .cell{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]):host([hoverable][disabled]) .contained{background-color:var(--px-color-background-state-disabled-inverted)}:host([inverted]) .contained{background-color:var( --cell-contained-background-color-inverted, var(--px-color-background-container-light-inverted) )}:host([inverted]):host([hoverable]:hover:not([disabled])) .contained{background-color:var( --px-color-background-state-hover-bordered-inverted );border-color:var(--px-color-border-state-hover-inverted)}', Pt = new CSSStyleSheet(), _t = new CSSStyleSheet();
|
|
1196
|
-
Pt.replaceSync(R);
|
|
1197
|
-
_t.replaceSync(He);
|
|
1198
|
-
const At = ["secondary"], Oe = ["", "default", "top", "bottom", "none"], pt = class pt extends x {
|
|
1199
|
-
template() {
|
|
1200
|
-
return `
|
|
1201
|
-
<px-hstack gap="s" justify-content="space-between" align-items="center">
|
|
1202
|
-
<px-hstack gap="s" align-items="center">
|
|
1203
|
-
<slot name="prefix"></slot>
|
|
1204
|
-
<slot name="visual"></slot>
|
|
1205
|
-
<px-vstack gap="2xs">
|
|
1206
|
-
<slot name="label"></slot>
|
|
1207
|
-
<slot name="description"></slot>
|
|
1208
|
-
</px-vstack>
|
|
1209
|
-
</px-hstack>
|
|
1210
|
-
<px-hstack gap="s" align-items="center" class="cell-layout__suffix-action-container">
|
|
1211
|
-
<px-stack direction="column" gap="2xs" align-items="flex-end" class="cell__suffix-container">
|
|
1212
|
-
<slot name="suffix"></slot>
|
|
1213
|
-
</px-stack>
|
|
1214
|
-
<slot name="action-indicator"></slot>
|
|
1215
|
-
</px-hstack>
|
|
1216
|
-
</px-hstack>
|
|
1217
|
-
`;
|
|
1218
|
-
}
|
|
1219
|
-
constructor() {
|
|
1220
|
-
super(_t, Pt);
|
|
1221
|
-
const t = document.createElement(this.nativeName);
|
|
1222
|
-
t.classList.add("cell"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
1223
|
-
}
|
|
1224
|
-
connectedCallback() {
|
|
1225
|
-
if (super.connectedCallback(), this.$slotVisual) {
|
|
1226
|
-
const t = this.querySelector('px-img[slot="visual"]');
|
|
1227
|
-
t && T(t);
|
|
1228
|
-
}
|
|
1229
|
-
if (this.$slotSuffix) {
|
|
1230
|
-
const t = this.querySelectorAll(
|
|
1231
|
-
'px-button-icon[slot="suffix"]'
|
|
1232
|
-
), e = t.length > 0, r = t.length > 1;
|
|
1233
|
-
e && t.forEach((i) => {
|
|
1234
|
-
this.configureSlotSuffixButtonIcon(i);
|
|
1235
|
-
}), r && (this.$suffixContainer.gap = "s", this.$suffixContainer.direction = "row", this.$suffixContainer.alignItems = "center");
|
|
1236
|
-
}
|
|
1237
|
-
M(this);
|
|
1238
|
-
}
|
|
1239
|
-
static get observedAttributes() {
|
|
1240
|
-
return [
|
|
1241
|
-
...super.observedAttributes,
|
|
1242
|
-
"inverted",
|
|
1243
|
-
"variant",
|
|
1244
|
-
"disabled",
|
|
1245
|
-
"separator",
|
|
1246
|
-
"separator--mobile",
|
|
1247
|
-
"separator--tablet",
|
|
1248
|
-
"separator--laptop",
|
|
1249
|
-
"separator--desktop",
|
|
1250
|
-
"radius",
|
|
1251
|
-
"radius--mobile",
|
|
1252
|
-
"radius--tablet",
|
|
1253
|
-
"radius--laptop",
|
|
1254
|
-
"radius--desktop",
|
|
1255
|
-
"background-color",
|
|
1256
|
-
"compact"
|
|
1257
|
-
];
|
|
1258
|
-
}
|
|
1259
|
-
attributeChangedCallback(t, e, r) {
|
|
1260
|
-
if (e !== r)
|
|
1261
|
-
switch (t) {
|
|
1262
|
-
case "variant":
|
|
1263
|
-
Pe(this.$el, e, r);
|
|
1264
|
-
break;
|
|
1265
|
-
case "inverted":
|
|
1266
|
-
for (let i = 0; i < this.$children.length; i++)
|
|
1267
|
-
this.$children[i].hasAttribute("inverted") ? this.$children[i].removeAttribute("inverted") : this.$children[i].setAttribute("inverted", "");
|
|
1268
|
-
break;
|
|
1269
|
-
case "radius":
|
|
1270
|
-
case "radius--mobile":
|
|
1271
|
-
case "radius--tablet":
|
|
1272
|
-
case "radius--laptop":
|
|
1273
|
-
case "radius--desktop":
|
|
1274
|
-
this.updateRadius(t, e, r, Oe);
|
|
1275
|
-
break;
|
|
1276
|
-
case "background-color":
|
|
1277
|
-
_e(
|
|
1278
|
-
this.$el,
|
|
1279
|
-
t,
|
|
1280
|
-
e,
|
|
1281
|
-
r,
|
|
1282
|
-
De
|
|
1283
|
-
);
|
|
1284
|
-
break;
|
|
1285
|
-
default:
|
|
1286
|
-
super.attributeChangedCallback(t, e, r);
|
|
1287
|
-
break;
|
|
1288
|
-
}
|
|
1289
|
-
}
|
|
1290
|
-
configureSlotSuffixButtonIcon(t) {
|
|
1291
|
-
t.hasAttribute("variant") ? $(
|
|
1292
|
-
At,
|
|
1293
|
-
t.getAttribute("variant")
|
|
1294
|
-
) || (console.error(
|
|
1295
|
-
`Wrong button-icon variant value for suffix. Allowed values are: ${At.join(
|
|
1296
|
-
", "
|
|
1297
|
-
)}.`
|
|
1298
|
-
), t.setAttribute("variant", "secondary")) : t.setAttribute("variant", "secondary");
|
|
1299
|
-
}
|
|
1300
|
-
updateRadius(t, e, r, i) {
|
|
1301
|
-
if (!$(i, r)) {
|
|
1302
|
-
console.error(`${r} is not a valid ${t} value`);
|
|
1303
|
-
return;
|
|
1304
|
-
}
|
|
1305
|
-
const a = t.includes("--"), s = [];
|
|
1306
|
-
if (!a)
|
|
1307
|
-
this.separatorMobile || s.push("mobile"), this.separatorTablet || s.push("tablet"), this.separatorLaptop || s.push("laptop"), this.separatorDesktop || s.push("desktop");
|
|
1308
|
-
else {
|
|
1309
|
-
const d = t.split("--")[1];
|
|
1310
|
-
s.push(d);
|
|
1311
|
-
}
|
|
1312
|
-
s.forEach((d) => {
|
|
1313
|
-
e !== null && e !== "" && e !== "default" && this.updateStyle(d, e), r !== null && r !== "" && r !== "default" && this.updateStyle(d, r);
|
|
1314
|
-
});
|
|
1315
|
-
}
|
|
1316
|
-
updateStyle(t, e) {
|
|
1317
|
-
let r = [];
|
|
1318
|
-
e === "top" ? r = ["bottom-right", "bottom-left"] : e === "bottom" ? r = ["top-right", "top-left"] : e === "none" && (r = ["top-right", "bottom-right", "bottom-left", "top-left"]), r.forEach((i) => {
|
|
1319
|
-
this.$el.style.setProperty(
|
|
1320
|
-
`--cell-contained-border-radius-${i}--${t}`,
|
|
1321
|
-
"0"
|
|
1322
|
-
);
|
|
1323
|
-
});
|
|
1324
|
-
}
|
|
1325
|
-
get $children() {
|
|
1326
|
-
return this.querySelectorAll("px-cell > *");
|
|
1327
|
-
}
|
|
1328
|
-
get $slotVisual() {
|
|
1329
|
-
return this.querySelector('[slot="visual"]');
|
|
1330
|
-
}
|
|
1331
|
-
get $slotSuffix() {
|
|
1332
|
-
return this.querySelector('[slot="suffix"]');
|
|
1333
|
-
}
|
|
1334
|
-
get $suffixContainer() {
|
|
1335
|
-
return this.shadowRoot.querySelector(".cell__suffix-container");
|
|
1336
|
-
}
|
|
1337
|
-
get inverted() {
|
|
1338
|
-
return this.hasAttribute("inverted");
|
|
1339
|
-
}
|
|
1340
|
-
set inverted(t) {
|
|
1341
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
1342
|
-
}
|
|
1343
|
-
get variant() {
|
|
1344
|
-
return this.getAttribute("variant");
|
|
1345
|
-
}
|
|
1346
|
-
set variant(t) {
|
|
1347
|
-
this.setAttribute("variant", t);
|
|
1348
|
-
}
|
|
1349
|
-
get disabled() {
|
|
1350
|
-
return this.hasAttribute("disabled");
|
|
1351
|
-
}
|
|
1352
|
-
set disabled(t) {
|
|
1353
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
1354
|
-
}
|
|
1355
|
-
get separator() {
|
|
1356
|
-
return this.getAttribute("separator");
|
|
1357
|
-
}
|
|
1358
|
-
set separator(t) {
|
|
1359
|
-
this.setAttribute("separator", t);
|
|
1360
|
-
}
|
|
1361
|
-
get separatorMobile() {
|
|
1362
|
-
return this.getAttribute("separator--mobile");
|
|
1363
|
-
}
|
|
1364
|
-
set separatorMobile(t) {
|
|
1365
|
-
this.setAttribute("separator--mobile", t);
|
|
1366
|
-
}
|
|
1367
|
-
get separatorTablet() {
|
|
1368
|
-
return this.getAttribute("separator--tablet");
|
|
1369
|
-
}
|
|
1370
|
-
set separatorTablet(t) {
|
|
1371
|
-
this.setAttribute("separator--tablet", t);
|
|
1372
|
-
}
|
|
1373
|
-
get separatorLaptop() {
|
|
1374
|
-
return this.getAttribute("separator--laptop");
|
|
1375
|
-
}
|
|
1376
|
-
set separatorLaptop(t) {
|
|
1377
|
-
this.setAttribute("separator--laptop", t);
|
|
1378
|
-
}
|
|
1379
|
-
get separatorDesktop() {
|
|
1380
|
-
return this.getAttribute("separator--desktop");
|
|
1381
|
-
}
|
|
1382
|
-
set separatorDesktop(t) {
|
|
1383
|
-
this.setAttribute("separator--desktop", t);
|
|
1384
|
-
}
|
|
1385
|
-
get radius() {
|
|
1386
|
-
return this.getAttribute("radius");
|
|
1387
|
-
}
|
|
1388
|
-
set radius(t) {
|
|
1389
|
-
this.setAttribute("radius", t);
|
|
1390
|
-
}
|
|
1391
|
-
get radiusMobile() {
|
|
1392
|
-
return this.getAttribute("radius--mobile");
|
|
1393
|
-
}
|
|
1394
|
-
set radiusMobile(t) {
|
|
1395
|
-
this.setAttribute("radius--mobile", t);
|
|
1396
|
-
}
|
|
1397
|
-
get radiusTablet() {
|
|
1398
|
-
return this.getAttribute("radius--tablet");
|
|
1399
|
-
}
|
|
1400
|
-
set radiusTablet(t) {
|
|
1401
|
-
this.setAttribute("radius--tablet", t);
|
|
1402
|
-
}
|
|
1403
|
-
get radiusLaptop() {
|
|
1404
|
-
return this.getAttribute("radius--laptop");
|
|
1405
|
-
}
|
|
1406
|
-
set radiusLaptop(t) {
|
|
1407
|
-
this.setAttribute("radius--laptop", t);
|
|
1408
|
-
}
|
|
1409
|
-
get radiusDesktop() {
|
|
1410
|
-
return this.getAttribute("radius--desktop");
|
|
1411
|
-
}
|
|
1412
|
-
set radiusDesktop(t) {
|
|
1413
|
-
this.setAttribute("radius--desktop", t);
|
|
1414
|
-
}
|
|
1415
|
-
get backgroundColor() {
|
|
1416
|
-
return this.getAttribute("background-color");
|
|
1417
|
-
}
|
|
1418
|
-
set backgroundColor(t) {
|
|
1419
|
-
t ? this.setAttribute("background-color", t) : this.removeAttribute("background-color");
|
|
1420
|
-
}
|
|
1421
|
-
get compact() {
|
|
1422
|
-
return this.hasAttribute("compact");
|
|
1423
|
-
}
|
|
1424
|
-
set compact(t) {
|
|
1425
|
-
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
1426
|
-
}
|
|
1427
|
-
};
|
|
1428
|
-
pt.nativeName = "div";
|
|
1429
|
-
let rt = pt;
|
|
1430
|
-
customElements.get("px-cell") || customElements.define("px-cell", rt);
|
|
1431
|
-
const je = '.cell-link{text-decoration:none}.cell-link[noicon=""] px-icon{display:none}.cell-link px-icon{color:var(--px-color-icon-brand-default)}.cell-link[aria-disabled=true] px-icon{color:var(--px-color-icon-state-disabled-default)}[compact] .cell-link{padding-block:var(--px-spacing-xs-mobile)}:host([inverted]) .cell-link px-icon{color:var(--px-color-icon-brand-inverted)}:host([inverted]) .cell-link[aria-disabled=true] px-icon{color:var(--px-color-icon-state-disabled-inverted)}', Ht = new CSSStyleSheet();
|
|
1432
|
-
Ht.replaceSync(R);
|
|
1433
|
-
const Ot = new CSSStyleSheet();
|
|
1434
|
-
Ot.replaceSync(je);
|
|
1435
|
-
const ht = class ht extends x {
|
|
1436
|
-
template() {
|
|
1437
|
-
return `
|
|
1438
|
-
<px-cell hoverable>
|
|
1439
|
-
<slot name="visual" slot="visual"></slot>
|
|
1440
|
-
<slot name="label" slot="label"></slot>
|
|
1441
|
-
<slot name="description" slot="description"></slot>
|
|
1442
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
1443
|
-
<px-icon
|
|
1444
|
-
name="chevron_right"
|
|
1445
|
-
slot="action-indicator"
|
|
1446
|
-
from="lavender"
|
|
1447
|
-
size="m"
|
|
1448
|
-
color="inherit"
|
|
1449
|
-
></px-icon>
|
|
1450
|
-
</px-cell>
|
|
1451
|
-
`;
|
|
1452
|
-
}
|
|
1453
|
-
constructor() {
|
|
1454
|
-
super(Ot, Ht);
|
|
1455
|
-
const t = document.createElement(this.nativeName);
|
|
1456
|
-
t.classList.add("cell-link"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
1457
|
-
}
|
|
1458
|
-
connectedCallback() {
|
|
1459
|
-
if (super.connectedCallback(), this.$slotVisual) {
|
|
1460
|
-
const e = this.querySelector('px-img[slot="visual"]');
|
|
1461
|
-
e && T(e);
|
|
1462
|
-
}
|
|
1463
|
-
this.hasAttribute("target") && this.getAttribute("target") === "_blank" && (this.$pxIcon.setAttribute("name", "target_blank"), this.$pxIcon.setAttribute(
|
|
1464
|
-
"aria-label",
|
|
1465
|
-
this.targetBlankAriaLabel ? this.targetBlankAriaLabel : "Opens in a new tab"
|
|
1466
|
-
)), M(this);
|
|
1467
|
-
}
|
|
1468
|
-
static get observedAttributes() {
|
|
1469
|
-
return [
|
|
1470
|
-
...super.observedAttributes,
|
|
1471
|
-
"inverted",
|
|
1472
|
-
"variant",
|
|
1473
|
-
"disabled",
|
|
1474
|
-
"separator",
|
|
1475
|
-
"separator--mobile",
|
|
1476
|
-
"separator--tablet",
|
|
1477
|
-
"separator--laptop",
|
|
1478
|
-
"separator--desktop",
|
|
1479
|
-
"radius",
|
|
1480
|
-
"radius--mobile",
|
|
1481
|
-
"radius--tablet",
|
|
1482
|
-
"radius--laptop",
|
|
1483
|
-
"radius--desktop",
|
|
1484
|
-
"target-blank-aria-label",
|
|
1485
|
-
"background-color",
|
|
1486
|
-
"noicon",
|
|
1487
|
-
"compact"
|
|
1488
|
-
];
|
|
1489
|
-
}
|
|
1490
|
-
attributeChangedCallback(t, e, r) {
|
|
1491
|
-
if (e !== r)
|
|
1492
|
-
switch (t) {
|
|
1493
|
-
case "variant":
|
|
1494
|
-
this.$cell.variant = this.variant;
|
|
1495
|
-
break;
|
|
1496
|
-
case "inverted":
|
|
1497
|
-
O(this.$cell, this.$children, this.inverted, [
|
|
1498
|
-
this.$pxIcon
|
|
1499
|
-
]);
|
|
1500
|
-
break;
|
|
1501
|
-
case "disabled":
|
|
1502
|
-
Dt(this.$cell, this.$children, this.disabled, [], {
|
|
1503
|
-
ariaEl: this.$el,
|
|
1504
|
-
setAria: !0,
|
|
1505
|
-
setTabIndex: !0
|
|
1506
|
-
});
|
|
1507
|
-
break;
|
|
1508
|
-
case "radius":
|
|
1509
|
-
case "radius--mobile":
|
|
1510
|
-
case "radius--tablet":
|
|
1511
|
-
case "radius--laptop":
|
|
1512
|
-
case "radius--desktop":
|
|
1513
|
-
case "separator":
|
|
1514
|
-
case "separator--mobile":
|
|
1515
|
-
case "separator--tablet":
|
|
1516
|
-
case "separator--laptop":
|
|
1517
|
-
case "separator--desktop":
|
|
1518
|
-
case "background-color":
|
|
1519
|
-
case "compact":
|
|
1520
|
-
this.$cell.setAttribute(t, this.getAttribute(t) || "");
|
|
1521
|
-
break;
|
|
1522
|
-
case "target-blank-aria-label":
|
|
1523
|
-
this.$pxIcon && this.$pxIcon.setAttribute(
|
|
1524
|
-
"aria-label",
|
|
1525
|
-
this.targetBlankAriaLabel || "Opens in a new tab"
|
|
1526
|
-
);
|
|
1527
|
-
break;
|
|
1528
|
-
default:
|
|
1529
|
-
super.attributeChangedCallback(t, e, r);
|
|
1530
|
-
break;
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
get $cell() {
|
|
1534
|
-
return this.shadowRoot.querySelector("px-cell");
|
|
1535
|
-
}
|
|
1536
|
-
get $slotVisual() {
|
|
1537
|
-
return this.querySelector('[slot="visual"]');
|
|
1538
|
-
}
|
|
1539
|
-
get $children() {
|
|
1540
|
-
return this.querySelectorAll("px-cell-link > *");
|
|
1541
|
-
}
|
|
1542
|
-
get $pxIcon() {
|
|
1543
|
-
return this.shadowRoot.querySelector("px-icon");
|
|
1544
|
-
}
|
|
1545
|
-
get inverted() {
|
|
1546
|
-
return this.hasAttribute("inverted");
|
|
1547
|
-
}
|
|
1548
|
-
set inverted(t) {
|
|
1549
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
1550
|
-
}
|
|
1551
|
-
get variant() {
|
|
1552
|
-
return this.getAttribute("variant");
|
|
1553
|
-
}
|
|
1554
|
-
set variant(t) {
|
|
1555
|
-
this.setAttribute("variant", t);
|
|
1556
|
-
}
|
|
1557
|
-
get disabled() {
|
|
1558
|
-
return this.hasAttribute("disabled");
|
|
1559
|
-
}
|
|
1560
|
-
set disabled(t) {
|
|
1561
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
1562
|
-
}
|
|
1563
|
-
get separator() {
|
|
1564
|
-
return this.getAttribute("separator");
|
|
1565
|
-
}
|
|
1566
|
-
set separator(t) {
|
|
1567
|
-
this.setAttribute("separator", t);
|
|
1568
|
-
}
|
|
1569
|
-
get separatorMobile() {
|
|
1570
|
-
return this.getAttribute("separator--mobile");
|
|
1571
|
-
}
|
|
1572
|
-
set separatorMobile(t) {
|
|
1573
|
-
this.setAttribute("separator--mobile", t);
|
|
1574
|
-
}
|
|
1575
|
-
get separatorTablet() {
|
|
1576
|
-
return this.getAttribute("separator--tablet");
|
|
1577
|
-
}
|
|
1578
|
-
set separatorTablet(t) {
|
|
1579
|
-
this.setAttribute("separator--tablet", t);
|
|
1580
|
-
}
|
|
1581
|
-
get separatorLaptop() {
|
|
1582
|
-
return this.getAttribute("separator--laptop");
|
|
1583
|
-
}
|
|
1584
|
-
set separatorLaptop(t) {
|
|
1585
|
-
this.setAttribute("separator--laptop", t);
|
|
1586
|
-
}
|
|
1587
|
-
get separatorDesktop() {
|
|
1588
|
-
return this.getAttribute("separator--desktop");
|
|
1589
|
-
}
|
|
1590
|
-
set separatorDesktop(t) {
|
|
1591
|
-
this.setAttribute("separator--desktop", t);
|
|
1592
|
-
}
|
|
1593
|
-
get radius() {
|
|
1594
|
-
return this.getAttribute("radius");
|
|
1595
|
-
}
|
|
1596
|
-
set radius(t) {
|
|
1597
|
-
this.setAttribute("radius", t);
|
|
1598
|
-
}
|
|
1599
|
-
get radiusMobile() {
|
|
1600
|
-
return this.getAttribute("radius--mobile");
|
|
1601
|
-
}
|
|
1602
|
-
set radiusMobile(t) {
|
|
1603
|
-
this.setAttribute("radius--mobile", t);
|
|
1604
|
-
}
|
|
1605
|
-
get radiusTablet() {
|
|
1606
|
-
return this.getAttribute("radius--tablet");
|
|
1607
|
-
}
|
|
1608
|
-
set radiusTablet(t) {
|
|
1609
|
-
this.setAttribute("radius--tablet", t);
|
|
1610
|
-
}
|
|
1611
|
-
get radiusLaptop() {
|
|
1612
|
-
return this.getAttribute("radius--laptop");
|
|
1613
|
-
}
|
|
1614
|
-
set radiusLaptop(t) {
|
|
1615
|
-
this.setAttribute("radius--laptop", t);
|
|
1616
|
-
}
|
|
1617
|
-
get radiusDesktop() {
|
|
1618
|
-
return this.getAttribute("radius--desktop");
|
|
1619
|
-
}
|
|
1620
|
-
set radiusDesktop(t) {
|
|
1621
|
-
this.setAttribute("radius--desktop", t);
|
|
1622
|
-
}
|
|
1623
|
-
get targetBlankAriaLabel() {
|
|
1624
|
-
return this.getAttribute("target-blank-aria-label");
|
|
1625
|
-
}
|
|
1626
|
-
set targetBlankAriaLabel(t) {
|
|
1627
|
-
this.setAttribute("target-blank-aria-label", t);
|
|
1628
|
-
}
|
|
1629
|
-
get backgroundColor() {
|
|
1630
|
-
return this.getAttribute("background-color");
|
|
1631
|
-
}
|
|
1632
|
-
set backgroundColor(t) {
|
|
1633
|
-
t ? this.setAttribute("background-color", t) : this.removeAttribute("background-color");
|
|
1634
|
-
}
|
|
1635
|
-
get compact() {
|
|
1636
|
-
return this.hasAttribute("compact");
|
|
1637
|
-
}
|
|
1638
|
-
set compact(t) {
|
|
1639
|
-
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
1640
|
-
}
|
|
1641
|
-
};
|
|
1642
|
-
ht.nativeName = "a";
|
|
1643
|
-
let ot = ht;
|
|
1644
|
-
customElements.get("px-cell-link") || customElements.define("px-cell-link", ot);
|
|
1645
|
-
const Fe = ".cell-button{padding:0;background:none;border:none;text-align:left;font-size:inherit}", jt = new CSSStyleSheet();
|
|
1646
|
-
jt.replaceSync(R);
|
|
1647
|
-
const Ft = new CSSStyleSheet();
|
|
1648
|
-
Ft.replaceSync(Fe);
|
|
1649
|
-
const ut = class ut extends x {
|
|
1650
|
-
template() {
|
|
1651
|
-
return `
|
|
1652
|
-
<px-cell hoverable>
|
|
1653
|
-
<slot name="visual" slot="visual"></slot>
|
|
1654
|
-
<slot name="label" slot="label"></slot>
|
|
1655
|
-
<slot name="description" slot="description"></slot>
|
|
1656
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
1657
|
-
</px-cell>
|
|
1658
|
-
`;
|
|
1659
|
-
}
|
|
1660
|
-
constructor() {
|
|
1661
|
-
super(Ft, jt);
|
|
1662
|
-
const t = document.createElement(this.nativeName);
|
|
1663
|
-
t.classList.add("cell-button"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
1664
|
-
}
|
|
1665
|
-
connectedCallback() {
|
|
1666
|
-
if (super.connectedCallback(), this.$slotVisual) {
|
|
1667
|
-
const t = this.querySelector('px-img[slot="visual"]');
|
|
1668
|
-
t && T(t);
|
|
1669
|
-
}
|
|
1670
|
-
M(this);
|
|
1671
|
-
}
|
|
1672
|
-
static get observedAttributes() {
|
|
1673
|
-
return [
|
|
1674
|
-
...super.observedAttributes,
|
|
1675
|
-
"inverted",
|
|
1676
|
-
"variant",
|
|
1677
|
-
"disabled",
|
|
1678
|
-
"separator",
|
|
1679
|
-
"separator--mobile",
|
|
1680
|
-
"separator--tablet",
|
|
1681
|
-
"separator--laptop",
|
|
1682
|
-
"separator--desktop",
|
|
1683
|
-
"radius",
|
|
1684
|
-
"radius--mobile",
|
|
1685
|
-
"radius--tablet",
|
|
1686
|
-
"radius--laptop",
|
|
1687
|
-
"radius--desktop",
|
|
1688
|
-
"background-color",
|
|
1689
|
-
"compact"
|
|
1690
|
-
];
|
|
1691
|
-
}
|
|
1692
|
-
attributeChangedCallback(t, e, r) {
|
|
1693
|
-
if (e !== r)
|
|
1694
|
-
switch (t) {
|
|
1695
|
-
case "variant":
|
|
1696
|
-
this.$cell.variant = this.variant;
|
|
1697
|
-
break;
|
|
1698
|
-
case "inverted":
|
|
1699
|
-
O(this.$cell, this.$children, this.inverted);
|
|
1700
|
-
break;
|
|
1701
|
-
case "disabled":
|
|
1702
|
-
Dt(this.$cell, this.$children, this.disabled, [], {
|
|
1703
|
-
ariaEl: this.$el,
|
|
1704
|
-
setAria: !0,
|
|
1705
|
-
setTabIndex: !0
|
|
1706
|
-
});
|
|
1707
|
-
break;
|
|
1708
|
-
case "radius":
|
|
1709
|
-
case "radius--mobile":
|
|
1710
|
-
case "radius--tablet":
|
|
1711
|
-
case "radius--laptop":
|
|
1712
|
-
case "radius--desktop":
|
|
1713
|
-
case "separator":
|
|
1714
|
-
case "separator--mobile":
|
|
1715
|
-
case "separator--tablet":
|
|
1716
|
-
case "separator--laptop":
|
|
1717
|
-
case "separator--desktop":
|
|
1718
|
-
case "background-color":
|
|
1719
|
-
case "compact":
|
|
1720
|
-
this.$cell.setAttribute(t, this.getAttribute(t) || "");
|
|
1721
|
-
break;
|
|
1722
|
-
default:
|
|
1723
|
-
super.attributeChangedCallback(t, e, r);
|
|
1724
|
-
break;
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
get $cell() {
|
|
1728
|
-
return this.shadowRoot.querySelector("px-cell");
|
|
1729
|
-
}
|
|
1730
|
-
get $slotVisual() {
|
|
1731
|
-
return this.querySelector('[slot="visual"]');
|
|
1732
|
-
}
|
|
1733
|
-
get $children() {
|
|
1734
|
-
return this.querySelectorAll("px-cell-button > *");
|
|
1735
|
-
}
|
|
1736
|
-
get inverted() {
|
|
1737
|
-
return this.hasAttribute("inverted");
|
|
1738
|
-
}
|
|
1739
|
-
set inverted(t) {
|
|
1740
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
1741
|
-
}
|
|
1742
|
-
get variant() {
|
|
1743
|
-
return this.getAttribute("variant");
|
|
1744
|
-
}
|
|
1745
|
-
set variant(t) {
|
|
1746
|
-
this.setAttribute("variant", t);
|
|
1747
|
-
}
|
|
1748
|
-
get disabled() {
|
|
1749
|
-
return this.hasAttribute("disabled");
|
|
1750
|
-
}
|
|
1751
|
-
set disabled(t) {
|
|
1752
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
1753
|
-
}
|
|
1754
|
-
get separator() {
|
|
1755
|
-
return this.getAttribute("separator");
|
|
1756
|
-
}
|
|
1757
|
-
set separator(t) {
|
|
1758
|
-
this.setAttribute("separator", t);
|
|
1759
|
-
}
|
|
1760
|
-
get separatorMobile() {
|
|
1761
|
-
return this.getAttribute("separator--mobile");
|
|
1762
|
-
}
|
|
1763
|
-
set separatorMobile(t) {
|
|
1764
|
-
this.setAttribute("separator--mobile", t);
|
|
1765
|
-
}
|
|
1766
|
-
get separatorTablet() {
|
|
1767
|
-
return this.getAttribute("separator--tablet");
|
|
1768
|
-
}
|
|
1769
|
-
set separatorTablet(t) {
|
|
1770
|
-
this.setAttribute("separator--tablet", t);
|
|
1771
|
-
}
|
|
1772
|
-
get separatorLaptop() {
|
|
1773
|
-
return this.getAttribute("separator--laptop");
|
|
1774
|
-
}
|
|
1775
|
-
set separatorLaptop(t) {
|
|
1776
|
-
this.setAttribute("separator--laptop", t);
|
|
1777
|
-
}
|
|
1778
|
-
get separatorDesktop() {
|
|
1779
|
-
return this.getAttribute("separator--desktop");
|
|
1780
|
-
}
|
|
1781
|
-
set separatorDesktop(t) {
|
|
1782
|
-
this.setAttribute("separator--desktop", t);
|
|
1783
|
-
}
|
|
1784
|
-
get radius() {
|
|
1785
|
-
return this.getAttribute("radius");
|
|
1786
|
-
}
|
|
1787
|
-
set radius(t) {
|
|
1788
|
-
this.setAttribute("radius", t);
|
|
1789
|
-
}
|
|
1790
|
-
get radiusMobile() {
|
|
1791
|
-
return this.getAttribute("radius--mobile");
|
|
1792
|
-
}
|
|
1793
|
-
set radiusMobile(t) {
|
|
1794
|
-
this.setAttribute("radius--mobile", t);
|
|
1795
|
-
}
|
|
1796
|
-
get radiusTablet() {
|
|
1797
|
-
return this.getAttribute("radius--tablet");
|
|
1798
|
-
}
|
|
1799
|
-
set radiusTablet(t) {
|
|
1800
|
-
this.setAttribute("radius--tablet", t);
|
|
1801
|
-
}
|
|
1802
|
-
get radiusLaptop() {
|
|
1803
|
-
return this.getAttribute("radius--laptop");
|
|
1804
|
-
}
|
|
1805
|
-
set radiusLaptop(t) {
|
|
1806
|
-
this.setAttribute("radius--laptop", t);
|
|
1807
|
-
}
|
|
1808
|
-
get radiusDesktop() {
|
|
1809
|
-
return this.getAttribute("radius--desktop");
|
|
1810
|
-
}
|
|
1811
|
-
set radiusDesktop(t) {
|
|
1812
|
-
this.setAttribute("radius--desktop", t);
|
|
1813
|
-
}
|
|
1814
|
-
get backgroundColor() {
|
|
1815
|
-
return this.getAttribute("background-color");
|
|
1816
|
-
}
|
|
1817
|
-
set backgroundColor(t) {
|
|
1818
|
-
t ? this.setAttribute("background-color", t) : this.removeAttribute("background-color");
|
|
1819
|
-
}
|
|
1820
|
-
get compact() {
|
|
1821
|
-
return this.hasAttribute("compact");
|
|
1822
|
-
}
|
|
1823
|
-
set compact(t) {
|
|
1824
|
-
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
1825
|
-
}
|
|
1826
|
-
};
|
|
1827
|
-
ut.nativeName = "button";
|
|
1828
|
-
let it = ut;
|
|
1829
|
-
customElements.get("px-cell-button") || customElements.define("px-cell-button", it);
|
|
1830
|
-
const We = `:host{display:block}input{font-size:var(--px-font-size-base)}.checkbox{display:flex;flex-direction:column;gap:var(--px-spacing-xs-mobile);font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-body)}.checkbox ::slotted([slot="error-text"]){font-size:var(--px-text-size-body-m-mobile);color:var(--px-color-text-purpose-error-default)}.checkbox #checkbox-container{display:flex;align-items:flex-start;gap:var(--px-spacing-s-mobile)}.all-slots-empty :is(.checkbox #checkbox-container){gap:0}.checkbox label{line-height:calc(var(--px-line-height-ratio-l) * 1em);color:var(--px-color-text-neutral-default)}:host(:not([variant="selectable-tag"])) input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;border-radius:var(--px-radius-main);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default);width:var(--px-size-icon-m);height:var(--px-size-icon-m);flex-shrink:0;transition:box-shadow .3s ease-out,background-color .3s;animation:anim-pop .2s cubic-bezier(.9,-.13,.61,.99) forwards .1s}:host(:not([variant="selectable-tag"])) input:focus-visible{outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default);outline-offset:var(--px-focus-offset-mobile)}:host([checked]) :is(:host(:not([variant="selectable-tag"])) input){background-color:var(--px-color-background-container-primary-default);border-color:var(--px-color-border-none-default);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17.6726 10.0557L11.1723 16.1192C10.9368 16.3298 10.6319 16.4463 10.3159 16.4463C9.99992 16.4463 9.69501 16.3298 9.45948 16.1192L6.28215 12.9418C6.08774 12.7087 5.98754 12.4113 6.00124 12.1081C6.01494 11.8048 6.14155 11.5177 6.3562 11.303C6.57084 11.0884 6.85799 10.9618 7.16123 10.9481C7.46447 10.9344 7.76187 11.0346 7.995 11.229L10.333 13.567L15.994 8.29143C16.2319 8.08824 16.5389 7.98454 16.8513 8.00187C17.1636 8.0192 17.4573 8.15625 17.6712 8.38451C17.8851 8.61277 18.0029 8.9147 17.9999 9.22753C17.997 9.54036 17.8736 9.84002 17.6555 10.0642L17.6726 10.0557Z' fill='white'/%3E%3C/svg%3E");background-position:center center;background-repeat:no-repeat}:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input):hover,:host([hover]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)){border:var(--px-size-border-l) solid var(--px-color-border-state-hover-default)}:host([checked]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input):hover),:host([checked]) :is(:host([hover]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input))){box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-default),0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-default)}:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input):hover{cursor:pointer}:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input){background-color:var(--px-color-background-state-disabled-default);border-color:var(--px-color-border-main-default)}:host([checked]) :is(:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input)){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17.6726 10.0557L11.1723 16.1192C10.9368 16.3298 10.6319 16.4463 10.3159 16.4463C9.99992 16.4463 9.69501 16.3298 9.45948 16.1192L6.28215 12.9418C6.08774 12.7087 5.98754 12.4113 6.00124 12.1081C6.01494 11.8048 6.14155 11.5177 6.3562 11.303C6.57084 11.0884 6.85799 10.9618 7.16123 10.9481C7.46447 10.9344 7.76187 11.0346 7.995 11.229L10.333 13.567L15.994 8.29143C16.2319 8.08824 16.5389 7.98454 16.8513 8.00187C17.1636 8.0192 17.4573 8.15625 17.6712 8.38451C17.8851 8.61277 18.0029 8.9147 17.9999 9.22753C17.997 9.54036 17.8736 9.84002 17.6555 10.0642L17.6726 10.0557Z' fill='%23000' fill-opacity='0.12'/%3E%3C/svg%3E")}:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input)+label{color:var(--px-color-text-state-disabled-default)}:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input){border-color:var(--px-color-border-purpose-error-default)}:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)){background-color:var(--px-color-background-purpose-error-default)}:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)):hover,:host([hover]) :is(:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input))){background-color:var(--px-color-background-purpose-error-default);border-color:var(--px-color-border-purpose-error-default);box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-default),0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-default)}:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input){border-color:var(--px-color-border-neutral-inverted)}:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input):focus-visible{outline-color:var(--px-color-border-focus-outline-inverted)}:host([checked]) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)){background-color:var(--px-color-background-container-primary-inverted);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17.6726 10.0557L11.1723 16.1192C10.9368 16.3298 10.6319 16.4463 10.3159 16.4463C9.99992 16.4463 9.69501 16.3298 9.45948 16.1192L6.28215 12.9418C6.08774 12.7087 5.98754 12.4113 6.00124 12.1081C6.01494 11.8048 6.14155 11.5177 6.3562 11.303C6.57084 11.0884 6.85799 10.9618 7.16123 10.9481C7.46447 10.9344 7.76187 11.0346 7.995 11.229L10.333 13.567L15.994 8.29143C16.2319 8.08824 16.5389 7.98454 16.8513 8.00187C17.1636 8.0192 17.4573 8.15625 17.6712 8.38451C17.8851 8.61277 18.0029 8.9147 17.9999 9.22753C17.997 9.54036 17.8736 9.84002 17.6555 10.0642L17.6726 10.0557Z' fill='%235C2D91'/%3E%3C/svg%3E")}:host(:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)):hover,:host([hover]) :is(:host(:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input))){border-color:var(--px-color-border-state-hover-inverted)}:host([checked]) :is(:host(:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)):hover),:host([checked]) :is(:host([hover]) :is(:host(:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)))){box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-inverted),0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-inverted)}:host([disabled]) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)){background-color:var(--px-color-background-state-disabled-inverted);border-color:var(--px-color-border-main-inverted)}:host([checked]) :is(:host([disabled]) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input))){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17.6726 10.0557L11.1723 16.1192C10.9368 16.3298 10.6319 16.4463 10.3159 16.4463C9.99992 16.4463 9.69501 16.3298 9.45948 16.1192L6.28215 12.9418C6.08774 12.7087 5.98754 12.4113 6.00124 12.1081C6.01494 11.8048 6.14155 11.5177 6.3562 11.303C6.57084 11.0884 6.85799 10.9618 7.16123 10.9481C7.46447 10.9344 7.76187 11.0346 7.995 11.229L10.333 13.567L15.994 8.29143C16.2319 8.08824 16.5389 7.98454 16.8513 8.00187C17.1636 8.0192 17.4573 8.15625 17.6712 8.38451C17.8851 8.61277 18.0029 8.9147 17.9999 9.22753C17.997 9.54036 17.8736 9.84002 17.6555 10.0642L17.6726 10.0557Z' fill='white' fill-opacity='0.08'/%3E%3C/svg%3E")}:host([disabled]) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input))+label{color:var(--px-color-text-state-disabled-inverted)}:host([state="error"]:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)){border-color:var(--px-color-border-purpose-error-inverted)}:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input))){background-color:var(--px-color-background-purpose-error-inverted);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M17.6726 10.0557L11.1723 16.1192C10.9368 16.3298 10.6319 16.4463 10.3159 16.4463C9.99992 16.4463 9.69501 16.3298 9.45948 16.1192L6.28215 12.9418C6.08774 12.7087 5.98754 12.4113 6.00124 12.1081C6.01494 11.8048 6.14155 11.5177 6.3562 11.303C6.57084 11.0884 6.85799 10.9618 7.16123 10.9481C7.46447 10.9344 7.76187 11.0346 7.995 11.229L10.333 13.567L15.994 8.29143C16.2319 8.08824 16.5389 7.98454 16.8513 8.00187C17.1636 8.0192 17.4573 8.15625 17.6712 8.38451C17.8851 8.61277 18.0029 8.9147 17.9999 9.22753C17.997 9.54036 17.8736 9.84002 17.6555 10.0642L17.6726 10.0557Z' fill='white'/%3E%3C/svg%3E")}:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input))):hover,:host([hover]) :is(:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)))){background-color:var(--px-color-background-purpose-error-inverted);border-color:var(--px-color-border-purpose-error-inverted);box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-inverted),0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-inverted)}:host([inverted]) :is(:host(:not([variant="selectable-tag"])) input)+label{color:var(--px-color-text-neutral-inverted)}:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='2' viewBox='0 0 12 2' fill='none'%3E%3Cg clip-path='url(%23clip0_8558_6622)'%3E%3Cpath d='M11 0H1C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_8558_6622'%3E%3Crect width='12' height='2' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}:host([disabled]) :is(:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input)){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='2' viewBox='0 0 12 2' fill='none'%3E%3Cg clip-path='url(%23clip0_8685_408)'%3E%3Cpath d='M11 0H1C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0Z' fill='black' fill-opacity='0.12'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_8685_408'%3E%3Crect width='12' height='2' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}:host([inverted]) :is(:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input)){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='2' viewBox='0 0 12 2' fill='none'%3E%3Cg clip-path='url(%23clip0_8685_6804)'%3E%3Cpath d='M11 0H1C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0Z' fill='%235C2D91'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_8685_6804'%3E%3Crect width='12' height='2' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}:host([disabled]) :is(:host([inverted]) :is(:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input))){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='2' viewBox='0 0 12 2' fill='none'%3E%3Cg clip-path='url(%23clip0_8685_6817)'%3E%3Cpath d='M11 0H1C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0Z' fill='white' fill-opacity='0.08'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_8685_6817'%3E%3Crect width='12' height='2' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}:host([state="error"]) :is(:host([inverted]) :is(:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input))){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='2' viewBox='0 0 12 2' fill='none'%3E%3Cg clip-path='url(%23clip0_8685_6256)'%3E%3Cpath d='M11 0H1C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_8685_6256'%3E%3Crect width='12' height='2' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}:host([state="error"]) :is(:host([inverted]) :is(:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input))):hover,:host([hover]) :is(:host([state="error"]) :is(:host([inverted]) :is(:host([indeterminate][checked]) :is(:host(:not([variant="selectable-tag"])) input)))){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='2' viewBox='0 0 12 2' fill='none'%3E%3Cg clip-path='url(%23clip0_8685_6804)'%3E%3Cpath d='M11 0H1C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_8685_6804'%3E%3Crect width='12' height='2' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E")}.checkbox.selectable-tag,.checkbox.selectable-tag #checkbox-container{gap:0}:host([variant="selectable-tag"]){display:inline-flex}:host([variant="selectable-tag"]) label{line-height:var(--px-line-height-ratio-l);display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;gap:var(--px-spacing-xs-mobile);background-color:var(--px-color-background-container-default-inverted);color:var(--px-color-text-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default);border-radius:var(--px-radius-pill);transition:all .2s ease-in-out 0s}:host([variant="selectable-tag"]) input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}:host([variant="selectable-tag"]) input:focus-visible+label{outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default);outline-offset:var(--px-focus-offset-mobile)}:host([variant="selectable-tag"]) input:hover:not([disabled],[aria-disabled=true],.loading)+label,:host([variant="selectable-tag"]) input.hover:not([disabled],[aria-disabled=true],.loading)+label{color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default);border-color:var(--px-color-border-state-hover-default);cursor:pointer}:host([variant="selectable-tag"]) input:active:not([disabled],[aria-disabled=true],.loading)+label{background:var(--px-color-background-state-active-default);color:var(--px-color-text-state-active-inverted);border-color:var(--px-color-border-none-default)}:host([variant="selectable-tag"]) input:checked+label,:host([variant="selectable-tag"]) input:checked+label:hover{background-color:var(--px-color-background-state-active-default);border-color:var(--px-color-border-none-default);color:var(--px-color-text-state-active-inverted)}:host([variant="selectable-tag"]) input[disabled]+label{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default);border-color:var(--px-color-border-none-default)}:host([variant="selectable-tag"]):host([inverted]) label{background:var(--px-color-background-container-default-default);color:var(--px-color-text-brand-inverted);border-color:var(--px-color-border-neutral-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:hover:not([disabled],[aria-disabled=true])+label,:host([variant="selectable-tag"]):host([inverted]) input.hover:not([disabled],[aria-disabled=true])+label{color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:active:not([disabled],[aria-disabled=true])+label{background:var(--px-color-background-state-active-inverted);color:var(--px-color-text-state-active-default);border-color:var(--px-color-border-none-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:checked+label,:host([variant="selectable-tag"]):host([inverted]) input:checked+label:hover{background-color:var(--px-color-background-state-active-inverted);border-color:var(--px-color-border-none-inverted);color:var(--px-color-text-state-active-default)}:host([variant="selectable-tag"]):host([inverted]) input[disabled]+label{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted);border-color:var(--px-color-border-none-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:focus-visible+label{outline-color:var(--px-color-border-focus-outline-inverted)}@media only screen and (min-width: 48em){.checkbox{gap:var(--px-spacing-xs-tablet)}.checkbox ::slotted([slot="error-text"]){font-size:var(--px-text-size-body-m-tablet)}#checkbox-container{gap:var(--px-spacing-s-tablet)}:host(:not([variant="selectable-tag"])) input:focus-visible,:host([variant="selectable-tag"]) input:focus-visible+label{outline-width:var(--px-focus-outline-tablet);outline-offset:var(--px-focus-offset-tablet)}label{font-size:var(--px-text-size-label-m-tablet)}}@media only screen and (min-width: 64.0625em){.checkbox{gap:var(--px-spacing-xs-laptop)}.checkbox ::slotted([slot="error-text"]){font-size:var(--px-text-size-body-m-laptop)}#checkbox-container{gap:var(--px-spacing-s-laptop)}:host(:not([variant="selectable-tag"])) input:focus-visible,:host([variant="selectable-tag"]) input:focus-visible+label{outline-width:var(--px-focus-outline-laptop);outline-offset:var(--px-focus-offset-laptop)}label{font-size:var(--px-text-size-label-m-laptop)}}@media only screen and (min-width: 90.0625em){.checkbox{gap:var(--px-spacing-xs-desktop)}.checkbox ::slotted([slot="error-text"]){font-size:var(--px-text-size-body-m-desktop)}#checkbox-container{gap:var(--px-spacing-s-desktop)}:host(:not([variant="selectable-tag"])) input:focus-visible,:host([variant="selectable-tag"]) input:focus-visible+label{outline-width:var(--px-focus-outline-desktop);outline-offset:var(--px-focus-offset-desktop)}label{font-size:var(--px-text-size-label-m-desktop)}}:host([inverted]) .checkbox ::slotted([slot="error-text"]){color:var(--px-color-text-purpose-error-inverted)}@keyframes anim-pop{0%{transform:scale(0)}to{transform:scale(1)}}`, Wt = new CSSStyleSheet();
|
|
1831
|
-
Wt.replaceSync(We);
|
|
1832
|
-
const Ne = ["", "default", "selectable-tag"], Nt = ["", "error"], gt = class gt extends x {
|
|
1833
|
-
constructor() {
|
|
1834
|
-
var t;
|
|
1835
|
-
super(Wt), this.template = () => `<div class="checkbox">
|
|
1836
|
-
<slot name="error-text"></slot>
|
|
1837
|
-
<div id="checkbox-container">
|
|
1838
|
-
<input type="checkbox"/>
|
|
1839
|
-
<label><slot name="before"></slot><slot name="label"></slot></label>
|
|
1840
|
-
</div>
|
|
1841
|
-
</div>`, this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this);
|
|
1842
|
-
}
|
|
1843
|
-
static get observedAttributes() {
|
|
1844
|
-
return [
|
|
1845
|
-
...super.observedAttributes,
|
|
1846
|
-
"state",
|
|
1847
|
-
"variant",
|
|
1848
|
-
"indeterminate",
|
|
1849
|
-
"inverted",
|
|
1850
|
-
"hover"
|
|
1851
|
-
];
|
|
1852
|
-
}
|
|
1853
|
-
connectedCallback() {
|
|
1854
|
-
this.hasAttribute("name") || console.error(
|
|
1855
|
-
'<px-checkbox> requires a "name" attribute to function properly.'
|
|
1856
|
-
), this.$el.addEventListener("change", () => {
|
|
1857
|
-
var e;
|
|
1858
|
-
const t = new Event("change", {
|
|
1859
|
-
bubbles: !0,
|
|
1860
|
-
composed: !0
|
|
1861
|
-
// Allow the event to pass through shadow DOM boundaries
|
|
1862
|
-
});
|
|
1863
|
-
this.dispatchEvent(t), (e = this.internals) == null || e.setFormValue(this.formData()), this.$el.checked ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
1864
|
-
}), this.setupForId(), this.hasAttribute("checked") && (this.checked = !0), this.$iconSlot && (this.$iconSlot.setAttribute("size", "xs"), this.$iconSlot.setAttribute("color", "inherit")), !this.$labelSlot && !this.$iconSlot && this.$checkbox.classList.add("all-slots-empty"), this.setupAriaDescribedBy(
|
|
1865
|
-
this.$slotErrorText,
|
|
1866
|
-
this.$errorTextSlot,
|
|
1867
|
-
"error-text"
|
|
1868
|
-
);
|
|
1869
|
-
}
|
|
1870
|
-
attributeChangedCallback(t, e, r) {
|
|
1871
|
-
if (e !== r)
|
|
1872
|
-
switch (t) {
|
|
1873
|
-
case "state":
|
|
1874
|
-
this.updateAttribute(
|
|
1875
|
-
e,
|
|
1876
|
-
r,
|
|
1877
|
-
Nt,
|
|
1878
|
-
t
|
|
1879
|
-
), this.setupAriaDescribedBy(
|
|
1880
|
-
this.$slotErrorText,
|
|
1881
|
-
this.$errorTextSlot,
|
|
1882
|
-
"error-text"
|
|
1883
|
-
);
|
|
1884
|
-
break;
|
|
1885
|
-
case "variant":
|
|
1886
|
-
this.updateAttribute(
|
|
1887
|
-
e,
|
|
1888
|
-
r,
|
|
1889
|
-
Ne,
|
|
1890
|
-
t
|
|
1891
|
-
);
|
|
1892
|
-
break;
|
|
1893
|
-
case "hover":
|
|
1894
|
-
this.$el.classList.toggle("hover");
|
|
1895
|
-
break;
|
|
1896
|
-
default:
|
|
1897
|
-
super.attributeChangedCallback(t, e, r);
|
|
1898
|
-
break;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
updateAttribute(t, e, r, i) {
|
|
1902
|
-
var a, s;
|
|
1903
|
-
if (!this.checkName(r, e)) {
|
|
1904
|
-
console.error(`${e} is not a valid ${i} value`);
|
|
1905
|
-
return;
|
|
1906
|
-
}
|
|
1907
|
-
t !== null && (i === "variant" ? (a = this.$checkbox) == null || a.classList.toggle(t) : this.$el.classList.toggle(t)), e !== null && (i === "variant" ? (s = this.$checkbox) == null || s.classList.toggle(e) : this.$el.classList.toggle(e));
|
|
1908
|
-
}
|
|
1909
|
-
formData() {
|
|
1910
|
-
if (this.$el.name) {
|
|
1911
|
-
const t = new FormData();
|
|
1912
|
-
return t.append(this.getAttribute("name"), this.$el.value), t;
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
// Form-associated callbacks
|
|
1916
|
-
static get formAssociated() {
|
|
1917
|
-
return !0;
|
|
1918
|
-
}
|
|
1919
|
-
// Set default behavior when the element is attached to a form
|
|
1920
|
-
formResetCallback() {
|
|
1921
|
-
this.checked = !1;
|
|
1922
|
-
}
|
|
1923
|
-
formStateRestoreCallback(t) {
|
|
1924
|
-
this.checked = t;
|
|
1925
|
-
}
|
|
1926
|
-
setupForId() {
|
|
1927
|
-
const t = Math.random().toString(36).substr(2, 9);
|
|
1928
|
-
this.$el.setAttribute("id", t), this.$label && this.$label.setAttribute("for", t);
|
|
1929
|
-
}
|
|
1930
|
-
setupAriaDescribedBy(t, e, r) {
|
|
1931
|
-
if (t.length > 0 && this.$el.hasAttribute("id")) {
|
|
1932
|
-
e.setAttribute("id", `${this.$el.id}-${r}`);
|
|
1933
|
-
let i = this.$el.getAttribute("aria-describedby");
|
|
1934
|
-
i ? i += ` ${this.$el.id}-${r}` : i = `${this.$el.id}-${r}`, this.$el.setAttribute("aria-describedby", i);
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
get $checkbox() {
|
|
1938
|
-
return this.shadowRoot.querySelector(".checkbox");
|
|
1939
|
-
}
|
|
1940
|
-
get $label() {
|
|
1941
|
-
return this.shadowRoot.querySelector("label");
|
|
1942
|
-
}
|
|
1943
|
-
get $labelSlot() {
|
|
1944
|
-
return this.querySelector('[slot="label"]');
|
|
1945
|
-
}
|
|
1946
|
-
get $iconSlot() {
|
|
1947
|
-
return this.querySelector('px-icon[slot="before"]');
|
|
1948
|
-
}
|
|
1949
|
-
get $errorTextSlot() {
|
|
1950
|
-
return this.shadowRoot.querySelector('slot[name="error-text"]');
|
|
1951
|
-
}
|
|
1952
|
-
get $slotErrorText() {
|
|
1953
|
-
return this.querySelectorAll('[slot="error-text"]');
|
|
1954
|
-
}
|
|
1955
|
-
get variant() {
|
|
1956
|
-
return this.getAttribute("variant");
|
|
1957
|
-
}
|
|
1958
|
-
set variant(t) {
|
|
1959
|
-
this.setAttribute("variant", t);
|
|
1960
|
-
}
|
|
1961
|
-
get state() {
|
|
1962
|
-
return this.getAttribute("state");
|
|
1963
|
-
}
|
|
1964
|
-
set state(t) {
|
|
1965
|
-
this.setAttribute("state", t);
|
|
1966
|
-
}
|
|
1967
|
-
get inverted() {
|
|
1968
|
-
return this.getAttribute("inverted");
|
|
1969
|
-
}
|
|
1970
|
-
set inverted(t) {
|
|
1971
|
-
this.setAttribute("inverted", t);
|
|
1972
|
-
}
|
|
1973
|
-
get checked() {
|
|
1974
|
-
return this.$el.checked;
|
|
1975
|
-
}
|
|
1976
|
-
set checked(t) {
|
|
1977
|
-
this.$el.checked = t, t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
1978
|
-
}
|
|
1979
|
-
};
|
|
1980
|
-
gt.nativeName = "input";
|
|
1981
|
-
let at = gt;
|
|
1982
|
-
customElements.get("px-checkbox") || customElements.define("px-checkbox", at);
|
|
1983
|
-
const Zt = new CSSStyleSheet();
|
|
1984
|
-
Zt.replaceSync(R);
|
|
1985
|
-
const Ze = ["", "left", "right"];
|
|
1986
|
-
class Ue extends C {
|
|
1987
|
-
template() {
|
|
1988
|
-
return `
|
|
1989
|
-
<div class="cell-checkbox">
|
|
1990
|
-
<px-cell hoverable>
|
|
1991
|
-
<px-checkbox slot="prefix" aria-hidden="true" tabindex="-1" ${this.name ? 'name="${this.name"' : ""} ${this.value ? 'value="${this.value"' : ""}></px-checkbox>
|
|
1992
|
-
<slot name="visual" slot="visual"></slot>
|
|
1993
|
-
<slot name="label" slot="label"></slot>
|
|
1994
|
-
<slot name="description" slot="description"></slot>
|
|
1995
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
1996
|
-
</px-cell>
|
|
1997
|
-
`;
|
|
1998
|
-
}
|
|
1999
|
-
constructor() {
|
|
2000
|
-
var t;
|
|
2001
|
-
super(Zt), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`);
|
|
2002
|
-
}
|
|
2003
|
-
connectedCallback() {
|
|
2004
|
-
if (this.$slotVisual) {
|
|
2005
|
-
const t = this.querySelector('px-img[slot="visual"]');
|
|
2006
|
-
t && T(t);
|
|
2007
|
-
}
|
|
2008
|
-
this.addEventListener("mouseover", () => {
|
|
2009
|
-
this.$checkbox.setAttribute("hover", "");
|
|
2010
|
-
}), this.addEventListener("mouseout", () => {
|
|
2011
|
-
this.$checkbox.removeAttribute("hover");
|
|
2012
|
-
}), this.addEventListener("keypress", (t) => {
|
|
2013
|
-
switch (t.stopPropagation(), t.preventDefault(), t.code) {
|
|
2014
|
-
case "Space":
|
|
2015
|
-
this.click();
|
|
2016
|
-
break;
|
|
2017
|
-
}
|
|
2018
|
-
}), this.addEventListener("click", (t) => {
|
|
2019
|
-
this.checked = !this.checked, t.stopPropagation(), t.preventDefault();
|
|
2020
|
-
}), this.hasAttribute("checked") && (this.checked = !0), M(this);
|
|
2021
|
-
}
|
|
2022
|
-
static get observedAttributes() {
|
|
2023
|
-
return [
|
|
2024
|
-
"inverted",
|
|
2025
|
-
"variant",
|
|
2026
|
-
"disabled",
|
|
2027
|
-
"separator",
|
|
2028
|
-
"separator--mobile",
|
|
2029
|
-
"separator--tablet",
|
|
2030
|
-
"separator--laptop",
|
|
2031
|
-
"separator--desktop",
|
|
2032
|
-
"radius",
|
|
2033
|
-
"radius--mobile",
|
|
2034
|
-
"radius--tablet",
|
|
2035
|
-
"radius--laptop",
|
|
2036
|
-
"radius--desktop",
|
|
2037
|
-
"name",
|
|
2038
|
-
"value",
|
|
2039
|
-
"state",
|
|
2040
|
-
"checked",
|
|
2041
|
-
"checkbox-position",
|
|
2042
|
-
"background-color",
|
|
2043
|
-
"compact"
|
|
2044
|
-
];
|
|
2045
|
-
}
|
|
2046
|
-
attributeChangedCallback(t, e, r) {
|
|
2047
|
-
if (e !== r)
|
|
2048
|
-
switch (t) {
|
|
2049
|
-
case "variant":
|
|
2050
|
-
this.$cell.variant = this.variant;
|
|
2051
|
-
break;
|
|
2052
|
-
case "inverted":
|
|
2053
|
-
O(this.$cell, this.$children, this.inverted, [
|
|
2054
|
-
this.$checkbox
|
|
2055
|
-
]);
|
|
2056
|
-
break;
|
|
2057
|
-
case "disabled":
|
|
2058
|
-
this.handleDisabledAttributeChange(r !== null);
|
|
2059
|
-
break;
|
|
2060
|
-
case "radius":
|
|
2061
|
-
case "radius--mobile":
|
|
2062
|
-
case "radius--tablet":
|
|
2063
|
-
case "radius--laptop":
|
|
2064
|
-
case "radius--desktop":
|
|
2065
|
-
case "separator":
|
|
2066
|
-
case "separator--mobile":
|
|
2067
|
-
case "separator--tablet":
|
|
2068
|
-
case "separator--laptop":
|
|
2069
|
-
case "separator--desktop":
|
|
2070
|
-
case "background-color":
|
|
2071
|
-
case "compact":
|
|
2072
|
-
this.$cell.setAttribute(t, this.getAttribute(t) || "");
|
|
2073
|
-
break;
|
|
2074
|
-
case "name":
|
|
2075
|
-
case "value":
|
|
2076
|
-
this.$checkbox && this.$checkbox.setAttribute(t, r);
|
|
2077
|
-
break;
|
|
2078
|
-
case "state":
|
|
2079
|
-
if (this.$checkbox)
|
|
2080
|
-
if (this.checkName(Nt, r))
|
|
2081
|
-
this.$checkbox.setAttribute("state", r);
|
|
2082
|
-
else {
|
|
2083
|
-
console.error(`${r} is not a valid state value`);
|
|
2084
|
-
return;
|
|
2085
|
-
}
|
|
2086
|
-
break;
|
|
2087
|
-
case "checked":
|
|
2088
|
-
this.handleCheckedAttributeChange(r);
|
|
2089
|
-
break;
|
|
2090
|
-
case "checkbox-position":
|
|
2091
|
-
this.handleCheckboxPositionChange(r);
|
|
2092
|
-
break;
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
handleDisabledAttributeChange(t) {
|
|
2096
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$cell.disabled = !0, this.$checkbox.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
2097
|
-
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
2098
|
-
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$cell.disabled = !1, this.$checkbox.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
2099
|
-
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
2100
|
-
}));
|
|
2101
|
-
}
|
|
2102
|
-
handleCheckedAttributeChange(t) {
|
|
2103
|
-
var e;
|
|
2104
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.checked = !1, this.$checkbox && this.$checkbox.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.checked = !0, this.$checkbox && this.$checkbox.setAttribute("checked", ""), this.dispatchEvent(
|
|
2105
|
-
new Event("change", {
|
|
2106
|
-
bubbles: !0,
|
|
2107
|
-
composed: !0
|
|
2108
|
-
// Allow the event to pass through shadow DOM boundaries
|
|
2109
|
-
})
|
|
2110
|
-
));
|
|
2111
|
-
}
|
|
2112
|
-
handleCheckboxPositionChange(t) {
|
|
2113
|
-
if (!this.checkName(Ze, t)) {
|
|
2114
|
-
console.error(`${t} is not a valid position value`);
|
|
2115
|
-
return;
|
|
2116
|
-
}
|
|
2117
|
-
this.$checkbox && (t === "" || t === "left" ? this.$checkbox.setAttribute("slot", "prefix") : t === "right" && this.$checkbox.setAttribute("slot", "action-indicator"));
|
|
2118
|
-
}
|
|
2119
|
-
// Form-associated callbacks
|
|
2120
|
-
static get formAssociated() {
|
|
2121
|
-
return !0;
|
|
2122
|
-
}
|
|
2123
|
-
// Set default behavior when the element is attached to a form
|
|
2124
|
-
formResetCallback() {
|
|
2125
|
-
this.checked = !1;
|
|
2126
|
-
}
|
|
2127
|
-
formStateRestoreCallback(t) {
|
|
2128
|
-
this.checked = t;
|
|
2129
|
-
}
|
|
2130
|
-
formData() {
|
|
2131
|
-
if (this.name) {
|
|
2132
|
-
const t = new FormData(), e = this.getAttribute("name");
|
|
2133
|
-
return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
get $cell() {
|
|
2137
|
-
return this.shadowRoot.querySelector("px-cell");
|
|
2138
|
-
}
|
|
2139
|
-
get $el() {
|
|
2140
|
-
return this.shadowRoot.querySelector(".cell-checkbox");
|
|
2141
|
-
}
|
|
2142
|
-
get $checkbox() {
|
|
2143
|
-
return this.shadowRoot.querySelector("px-checkbox");
|
|
2144
|
-
}
|
|
2145
|
-
get $slotVisual() {
|
|
2146
|
-
return this.querySelector('[slot="visual"]');
|
|
2147
|
-
}
|
|
2148
|
-
get $children() {
|
|
2149
|
-
return this.querySelectorAll("px-cell-checkbox > *");
|
|
2150
|
-
}
|
|
2151
|
-
get inverted() {
|
|
2152
|
-
return this.hasAttribute("inverted");
|
|
2153
|
-
}
|
|
2154
|
-
set inverted(t) {
|
|
2155
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
2156
|
-
}
|
|
2157
|
-
get variant() {
|
|
2158
|
-
return this.getAttribute("variant");
|
|
2159
|
-
}
|
|
2160
|
-
set variant(t) {
|
|
2161
|
-
this.setAttribute("variant", t);
|
|
2162
|
-
}
|
|
2163
|
-
get disabled() {
|
|
2164
|
-
return this.hasAttribute("disabled");
|
|
2165
|
-
}
|
|
2166
|
-
set disabled(t) {
|
|
2167
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
2168
|
-
}
|
|
2169
|
-
get separator() {
|
|
2170
|
-
return this.getAttribute("separator");
|
|
2171
|
-
}
|
|
2172
|
-
set separator(t) {
|
|
2173
|
-
this.setAttribute("separator", t);
|
|
2174
|
-
}
|
|
2175
|
-
get separatorMobile() {
|
|
2176
|
-
return this.getAttribute("separator--mobile");
|
|
2177
|
-
}
|
|
2178
|
-
set separatorMobile(t) {
|
|
2179
|
-
this.setAttribute("separator--mobile", t);
|
|
2180
|
-
}
|
|
2181
|
-
get separatorTablet() {
|
|
2182
|
-
return this.getAttribute("separator--tablet");
|
|
2183
|
-
}
|
|
2184
|
-
set separatorTablet(t) {
|
|
2185
|
-
this.setAttribute("separator--tablet", t);
|
|
2186
|
-
}
|
|
2187
|
-
get separatorLaptop() {
|
|
2188
|
-
return this.getAttribute("separator--laptop");
|
|
2189
|
-
}
|
|
2190
|
-
set separatorLaptop(t) {
|
|
2191
|
-
this.setAttribute("separator--laptop", t);
|
|
2192
|
-
}
|
|
2193
|
-
get separatorDesktop() {
|
|
2194
|
-
return this.getAttribute("separator--desktop");
|
|
2195
|
-
}
|
|
2196
|
-
set separatorDesktop(t) {
|
|
2197
|
-
this.setAttribute("separator--desktop", t);
|
|
2198
|
-
}
|
|
2199
|
-
get radius() {
|
|
2200
|
-
return this.getAttribute("radius");
|
|
2201
|
-
}
|
|
2202
|
-
set radius(t) {
|
|
2203
|
-
this.setAttribute("radius", t);
|
|
2204
|
-
}
|
|
2205
|
-
get radiusMobile() {
|
|
2206
|
-
return this.getAttribute("radius--mobile");
|
|
2207
|
-
}
|
|
2208
|
-
set radiusMobile(t) {
|
|
2209
|
-
this.setAttribute("radius--mobile", t);
|
|
2210
|
-
}
|
|
2211
|
-
get radiusTablet() {
|
|
2212
|
-
return this.getAttribute("radius--tablet");
|
|
2213
|
-
}
|
|
2214
|
-
set radiusTablet(t) {
|
|
2215
|
-
this.setAttribute("radius--tablet", t);
|
|
2216
|
-
}
|
|
2217
|
-
get radiusLaptop() {
|
|
2218
|
-
return this.getAttribute("radius--laptop");
|
|
2219
|
-
}
|
|
2220
|
-
set radiusLaptop(t) {
|
|
2221
|
-
this.setAttribute("radius--laptop", t);
|
|
2222
|
-
}
|
|
2223
|
-
get radiusDesktop() {
|
|
2224
|
-
return this.getAttribute("radius--desktop");
|
|
2225
|
-
}
|
|
2226
|
-
set radiusDesktop(t) {
|
|
2227
|
-
this.setAttribute("radius--desktop", t);
|
|
2228
|
-
}
|
|
2229
|
-
get checked() {
|
|
2230
|
-
return this.hasAttribute("checked");
|
|
2231
|
-
}
|
|
2232
|
-
set checked(t) {
|
|
2233
|
-
t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
2234
|
-
}
|
|
2235
|
-
get name() {
|
|
2236
|
-
return this.getAttribute("name");
|
|
2237
|
-
}
|
|
2238
|
-
set name(t) {
|
|
2239
|
-
t ? this.setAttribute("name", t) : this.removeAttribute("name");
|
|
2240
|
-
}
|
|
2241
|
-
get state() {
|
|
2242
|
-
return this.getAttribute("state");
|
|
2243
|
-
}
|
|
2244
|
-
set state(t) {
|
|
2245
|
-
t ? this.setAttribute("state", t) : this.removeAttribute("state");
|
|
2246
|
-
}
|
|
2247
|
-
get value() {
|
|
2248
|
-
return this.getAttribute("value");
|
|
2249
|
-
}
|
|
2250
|
-
set value(t) {
|
|
2251
|
-
t ? this.setAttribute("value", t) : this.removeAttribute("value");
|
|
2252
|
-
}
|
|
2253
|
-
get checkboxPosition() {
|
|
2254
|
-
return this.getAttribute("checkbox-position");
|
|
2255
|
-
}
|
|
2256
|
-
set checkboxPosition(t) {
|
|
2257
|
-
t ? this.setAttribute("checkbox-position", t) : this.removeAttribute("checkbox-position");
|
|
2258
|
-
}
|
|
2259
|
-
get backgroundColor() {
|
|
2260
|
-
return this.getAttribute("background-color");
|
|
2261
|
-
}
|
|
2262
|
-
set backgroundColor(t) {
|
|
2263
|
-
t ? this.setAttribute("background-color", t) : this.removeAttribute("background-color");
|
|
2264
|
-
}
|
|
2265
|
-
get compact() {
|
|
2266
|
-
return this.hasAttribute("compact");
|
|
2267
|
-
}
|
|
2268
|
-
set compact(t) {
|
|
2269
|
-
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
2270
|
-
}
|
|
2271
|
-
}
|
|
2272
|
-
customElements.get("px-cell-checkbox") || customElements.define("px-cell-checkbox", Ue);
|
|
2273
|
-
const Ut = new CSSStyleSheet();
|
|
2274
|
-
Ut.replaceSync(R);
|
|
2275
|
-
class Ye extends C {
|
|
2276
|
-
template() {
|
|
2277
|
-
return `
|
|
2278
|
-
<div class="cell-switch">
|
|
2279
|
-
<px-cell hoverable>
|
|
2280
|
-
<px-switch slot="action-indicator" aria-hidden="true" tabindex="-1"></px-switch>
|
|
2281
|
-
<slot name="visual" slot="visual"></slot>
|
|
2282
|
-
<slot name="label" slot="label"></slot>
|
|
2283
|
-
<slot name="description" slot="description"></slot>
|
|
2284
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
2285
|
-
</px-cell>
|
|
2286
|
-
`;
|
|
2287
|
-
}
|
|
2288
|
-
constructor() {
|
|
2289
|
-
var t;
|
|
2290
|
-
super(Ut), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`);
|
|
2291
|
-
}
|
|
2292
|
-
connectedCallback() {
|
|
2293
|
-
if (this.$slotVisual) {
|
|
2294
|
-
const t = this.querySelector('px-img[slot="visual"]');
|
|
2295
|
-
t && T(t);
|
|
2296
|
-
}
|
|
2297
|
-
this.addEventListener("mouseover", () => {
|
|
2298
|
-
this.$switch.setAttribute("hover", "");
|
|
2299
|
-
}), this.addEventListener("mouseout", () => {
|
|
2300
|
-
this.$switch.removeAttribute("hover");
|
|
2301
|
-
}), this.addEventListener("keypress", (t) => {
|
|
2302
|
-
switch (t.stopPropagation(), t.preventDefault(), t.code) {
|
|
2303
|
-
case "Space":
|
|
2304
|
-
this.click();
|
|
2305
|
-
break;
|
|
2306
|
-
}
|
|
2307
|
-
}), this.addEventListener("click", (t) => {
|
|
2308
|
-
this.checked = !this.checked, t.stopPropagation(), t.preventDefault();
|
|
2309
|
-
}), this.hasAttribute("checked") && (this.checked = !0), M(this);
|
|
2310
|
-
}
|
|
2311
|
-
static get observedAttributes() {
|
|
2312
|
-
return [
|
|
2313
|
-
"inverted",
|
|
2314
|
-
"variant",
|
|
2315
|
-
"disabled",
|
|
2316
|
-
"separator",
|
|
2317
|
-
"separator--mobile",
|
|
2318
|
-
"separator--tablet",
|
|
2319
|
-
"separator--laptop",
|
|
2320
|
-
"separator--desktop",
|
|
2321
|
-
"radius",
|
|
2322
|
-
"radius--mobile",
|
|
2323
|
-
"radius--tablet",
|
|
2324
|
-
"radius--laptop",
|
|
2325
|
-
"radius--desktop",
|
|
2326
|
-
"name",
|
|
2327
|
-
"value",
|
|
2328
|
-
"checked",
|
|
2329
|
-
"background-color",
|
|
2330
|
-
"compact"
|
|
2331
|
-
];
|
|
2332
|
-
}
|
|
2333
|
-
attributeChangedCallback(t, e, r) {
|
|
2334
|
-
if (e !== r)
|
|
2335
|
-
switch (t) {
|
|
2336
|
-
case "variant":
|
|
2337
|
-
this.$cell.variant = this.variant;
|
|
2338
|
-
break;
|
|
2339
|
-
case "inverted":
|
|
2340
|
-
O(this.$cell, this.$children, this.inverted, [
|
|
2341
|
-
this.$switch
|
|
2342
|
-
]);
|
|
2343
|
-
break;
|
|
2344
|
-
case "disabled":
|
|
2345
|
-
this.handleDisabledAttributeChange(r !== null);
|
|
2346
|
-
break;
|
|
2347
|
-
case "radius":
|
|
2348
|
-
case "radius--mobile":
|
|
2349
|
-
case "radius--tablet":
|
|
2350
|
-
case "radius--laptop":
|
|
2351
|
-
case "radius--desktop":
|
|
2352
|
-
case "separator":
|
|
2353
|
-
case "separator--mobile":
|
|
2354
|
-
case "separator--tablet":
|
|
2355
|
-
case "separator--laptop":
|
|
2356
|
-
case "separator--desktop":
|
|
2357
|
-
case "background-color":
|
|
2358
|
-
case "compact":
|
|
2359
|
-
this.$cell.setAttribute(t, this.getAttribute(t) || "");
|
|
2360
|
-
break;
|
|
2361
|
-
case "name":
|
|
2362
|
-
case "value":
|
|
2363
|
-
this.$switch && this.$switch.setAttribute(t, r);
|
|
2364
|
-
break;
|
|
2365
|
-
case "checked":
|
|
2366
|
-
this.handleCheckedAttributeChange(r);
|
|
2367
|
-
break;
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
handleDisabledAttributeChange(t) {
|
|
2371
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$cell.disabled = !0, this.$switch.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
2372
|
-
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
2373
|
-
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$cell.disabled = !1, this.$switch.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
2374
|
-
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
2375
|
-
}));
|
|
2376
|
-
}
|
|
2377
|
-
handleCheckedAttributeChange(t) {
|
|
2378
|
-
var e;
|
|
2379
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.checked = !1, this.$switch && this.$switch.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.checked = !0, this.$switch && this.$switch.setAttribute("checked", ""), this.dispatchEvent(
|
|
2380
|
-
new Event("change", {
|
|
2381
|
-
bubbles: !0,
|
|
2382
|
-
composed: !0
|
|
2383
|
-
// Allow the event to pass through shadow DOM boundaries
|
|
2384
|
-
})
|
|
2385
|
-
));
|
|
2386
|
-
}
|
|
2387
|
-
// Form-associated callbacks
|
|
2388
|
-
static get formAssociated() {
|
|
2389
|
-
return !0;
|
|
2390
|
-
}
|
|
2391
|
-
// Set default behavior when the element is attached to a form
|
|
2392
|
-
formResetCallback() {
|
|
2393
|
-
this.checked = !1;
|
|
2394
|
-
}
|
|
2395
|
-
formStateRestoreCallback(t) {
|
|
2396
|
-
this.checked = t;
|
|
2397
|
-
}
|
|
2398
|
-
formData() {
|
|
2399
|
-
if (this.name) {
|
|
2400
|
-
const t = new FormData(), e = this.getAttribute("name");
|
|
2401
|
-
return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
|
|
2402
|
-
}
|
|
2403
|
-
}
|
|
2404
|
-
get $cell() {
|
|
2405
|
-
return this.shadowRoot.querySelector("px-cell");
|
|
2406
|
-
}
|
|
2407
|
-
get $el() {
|
|
2408
|
-
return this.shadowRoot.querySelector(".cell-switch");
|
|
2409
|
-
}
|
|
2410
|
-
get $switch() {
|
|
2411
|
-
return this.shadowRoot.querySelector("px-switch");
|
|
2412
|
-
}
|
|
2413
|
-
get $slotVisual() {
|
|
2414
|
-
return this.querySelector('[slot="visual"]');
|
|
2415
|
-
}
|
|
2416
|
-
get $children() {
|
|
2417
|
-
return this.querySelectorAll("px-cell-switch > *");
|
|
2418
|
-
}
|
|
2419
|
-
get inverted() {
|
|
2420
|
-
return this.hasAttribute("inverted");
|
|
2421
|
-
}
|
|
2422
|
-
set inverted(t) {
|
|
2423
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
2424
|
-
}
|
|
2425
|
-
get variant() {
|
|
2426
|
-
return this.getAttribute("variant");
|
|
2427
|
-
}
|
|
2428
|
-
set variant(t) {
|
|
2429
|
-
this.setAttribute("variant", t);
|
|
2430
|
-
}
|
|
2431
|
-
get disabled() {
|
|
2432
|
-
return this.hasAttribute("disabled");
|
|
2433
|
-
}
|
|
2434
|
-
set disabled(t) {
|
|
2435
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
2436
|
-
}
|
|
2437
|
-
get separator() {
|
|
2438
|
-
return this.getAttribute("separator");
|
|
2439
|
-
}
|
|
2440
|
-
set separator(t) {
|
|
2441
|
-
this.setAttribute("separator", t);
|
|
2442
|
-
}
|
|
2443
|
-
get separatorMobile() {
|
|
2444
|
-
return this.getAttribute("separator--mobile");
|
|
2445
|
-
}
|
|
2446
|
-
set separatorMobile(t) {
|
|
2447
|
-
this.setAttribute("separator--mobile", t);
|
|
2448
|
-
}
|
|
2449
|
-
get separatorTablet() {
|
|
2450
|
-
return this.getAttribute("separator--tablet");
|
|
2451
|
-
}
|
|
2452
|
-
set separatorTablet(t) {
|
|
2453
|
-
this.setAttribute("separator--tablet", t);
|
|
2454
|
-
}
|
|
2455
|
-
get separatorLaptop() {
|
|
2456
|
-
return this.getAttribute("separator--laptop");
|
|
2457
|
-
}
|
|
2458
|
-
set separatorLaptop(t) {
|
|
2459
|
-
this.setAttribute("separator--laptop", t);
|
|
2460
|
-
}
|
|
2461
|
-
get separatorDesktop() {
|
|
2462
|
-
return this.getAttribute("separator--desktop");
|
|
2463
|
-
}
|
|
2464
|
-
set separatorDesktop(t) {
|
|
2465
|
-
this.setAttribute("separator--desktop", t);
|
|
2466
|
-
}
|
|
2467
|
-
get radius() {
|
|
2468
|
-
return this.getAttribute("radius");
|
|
2469
|
-
}
|
|
2470
|
-
set radius(t) {
|
|
2471
|
-
this.setAttribute("radius", t);
|
|
2472
|
-
}
|
|
2473
|
-
get radiusMobile() {
|
|
2474
|
-
return this.getAttribute("radius--mobile");
|
|
2475
|
-
}
|
|
2476
|
-
set radiusMobile(t) {
|
|
2477
|
-
this.setAttribute("radius--mobile", t);
|
|
2478
|
-
}
|
|
2479
|
-
get radiusTablet() {
|
|
2480
|
-
return this.getAttribute("radius--tablet");
|
|
2481
|
-
}
|
|
2482
|
-
set radiusTablet(t) {
|
|
2483
|
-
this.setAttribute("radius--tablet", t);
|
|
2484
|
-
}
|
|
2485
|
-
get radiusLaptop() {
|
|
2486
|
-
return this.getAttribute("radius--laptop");
|
|
2487
|
-
}
|
|
2488
|
-
set radiusLaptop(t) {
|
|
2489
|
-
this.setAttribute("radius--laptop", t);
|
|
2490
|
-
}
|
|
2491
|
-
get radiusDesktop() {
|
|
2492
|
-
return this.getAttribute("radius--desktop");
|
|
2493
|
-
}
|
|
2494
|
-
set radiusDesktop(t) {
|
|
2495
|
-
this.setAttribute("radius--desktop", t);
|
|
2496
|
-
}
|
|
2497
|
-
get checked() {
|
|
2498
|
-
return this.hasAttribute("checked");
|
|
2499
|
-
}
|
|
2500
|
-
set checked(t) {
|
|
2501
|
-
t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
2502
|
-
}
|
|
2503
|
-
get name() {
|
|
2504
|
-
return this.getAttribute("name");
|
|
2505
|
-
}
|
|
2506
|
-
set name(t) {
|
|
2507
|
-
t ? this.setAttribute("name", t) : this.removeAttribute("name");
|
|
2508
|
-
}
|
|
2509
|
-
get state() {
|
|
2510
|
-
return this.getAttribute("state");
|
|
2511
|
-
}
|
|
2512
|
-
set state(t) {
|
|
2513
|
-
t ? this.setAttribute("state", t) : this.removeAttribute("state");
|
|
2514
|
-
}
|
|
2515
|
-
get value() {
|
|
2516
|
-
return this.getAttribute("value");
|
|
2517
|
-
}
|
|
2518
|
-
set value(t) {
|
|
2519
|
-
t ? this.setAttribute("value", t) : this.removeAttribute("value");
|
|
2520
|
-
}
|
|
2521
|
-
get backgroundColor() {
|
|
2522
|
-
return this.getAttribute("background-color");
|
|
2523
|
-
}
|
|
2524
|
-
set backgroundColor(t) {
|
|
2525
|
-
t ? this.setAttribute("background-color", t) : this.removeAttribute("background-color");
|
|
2526
|
-
}
|
|
2527
|
-
get compact() {
|
|
2528
|
-
return this.hasAttribute("compact");
|
|
2529
|
-
}
|
|
2530
|
-
set compact(t) {
|
|
2531
|
-
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
customElements.get("px-cell-switch") || customElements.define("px-cell-switch", Ye);
|
|
2535
|
-
const Ge = `:host{display:block}:host(:focus-visible){outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default);outline-offset:var(--px-focus-offset-mobile)}:host([variant="selectable-tag"]:focus-visible){border-radius:var(--px-radius-pill)}:host([inverted]:focus-visible){outline-color:var(--px-color-border-focus-outline-inverted)}input{font-size:var(--px-font-size-base)}.radio{display:flex;align-items:flex-start;gap:var(--px-spacing-s-mobile)}.radio.all-slots-empty{gap:0}label{font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:calc(var(--px-line-height-ratio-l) * 1em);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}:host(:not([variant="selectable-tag"])) input{-webkit-appearance:none;-moz-appearance:none;appearance:none;pointer-events:none;margin:0;border-radius:var(--px-radius-pill);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default);width:var(--px-size-icon-m);height:var(--px-size-icon-m);flex-shrink:0;transition:box-shadow .3s ease-out,background-color .3s;animation:anim-pop .2s cubic-bezier(.9,-.13,.61,.99) forwards .1s}:host([checked]) :is(:host(:not([variant="selectable-tag"])) input){background-color:var(--px-color-background-container-primary-default);border-color:var(--px-color-border-none-default);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' fill='white'/%3E%3C/svg%3E");background-position:center center}:host(:hover) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)),:host([hover]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)){border:var(--px-size-border-l) solid var(--px-color-border-state-hover-default)}:host([checked]) :is(:host(:hover) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input))),:host([checked]) :is(:host([hover]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input))){box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-default),0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-default)}:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input){background-color:var(--px-color-background-state-disabled-default);border-color:var(--px-color-border-main-default)}:host([checked]) :is(:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input)){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' fill='black' fill-opacity='0.12'/%3E%3C/svg%3E")}:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input)+label{color:var(--px-color-text-state-disabled-default)}:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input){border-color:var(--px-color-border-purpose-error-default)}:host(:hover) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)),:host([hover]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)){border-color:var(--px-color-border-purpose-error-default)}:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input)){background-color:var(--px-color-background-purpose-error-default)}:host(:hover) :is(:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input))),:host([hover]) :is(:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input))){background-color:var(--px-color-background-purpose-error-default);border-color:var(--px-color-border-purpose-error-default);box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-default),0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-default)}:host(:not([variant="selectable-tag"])) input[inverted]{border-color:var(--px-color-border-neutral-inverted)}:host([checked]) :is(:host(:not([variant="selectable-tag"])) input[inverted]){background-color:var(--px-color-background-container-primary-inverted);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' fill='%235C2D91'/%3E%3C/svg%3E");border-color:var(--px-color-border-none-inverted)}:host(:hover) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted])),:host([hover]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted])){border-color:var(--px-color-border-state-hover-inverted)}:host([checked]) :is(:host(:hover) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted]))),:host([checked]) :is(:host([hover]) :is(:host(:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted]))){box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-inverted),0 0 0 var(--px-size-border-s) var(--px-color-border-state-hover-inverted)}:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input[inverted]){background-color:var(--px-color-background-state-disabled-inverted);border-color:var(--px-color-border-main-inverted)}:host([checked]) :is(:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input[inverted])){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' fill='white' fill-opacity='0.16'/%3E%3C/svg%3E")}:host([disabled]) :is(:host(:not([variant="selectable-tag"])) input[inverted])+label{color:var(--px-color-text-state-disabled-inverted)}:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted]){border-color:var(--px-color-border-purpose-error-inverted)}:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted])){background-color:var(--px-color-background-purpose-error-inverted);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' fill='white'/%3E%3C/svg%3E")}:host(:hover) :is(:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted]))),:host([hover]) :is(:host([checked]) :is(:host([state="error"]:not([disabled])) :is(:host(:not([variant="selectable-tag"])) input[inverted]))){background-color:var(--px-color-background-purpose-error-inverted);border-color:var(--px-color-border-purpose-error-inverted);box-shadow:inset 0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-inverted),0 0 0 var(--px-size-border-s) var(--px-color-border-purpose-error-inverted)}:host(:not([variant="selectable-tag"])) input[inverted]+label{color:var(--px-color-text-neutral-inverted)}.radio.selectable-tag{gap:0}:host([variant="selectable-tag"]){display:inline-flex}:host([variant="selectable-tag"]) label{line-height:var(--px-line-height-ratio-l);display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;gap:var(--px-spacing-xs-mobile);background-color:var(--px-color-background-container-default-inverted);color:var(--px-color-text-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default);border-radius:var(--px-radius-pill);transition:all .2s ease-in-out 0s}:host([variant="selectable-tag"]) input{-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0}:host([variant="selectable-tag"]) input:hover:not([disabled],[aria-disabled=true])+label,:host([variant="selectable-tag"]) input.hover:not([disabled],[aria-disabled=true])+label{color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default);border-color:var(--px-color-border-state-hover-default);cursor:pointer}:host([variant="selectable-tag"]) input:active:not([disabled],[aria-disabled=true])+label{background:var(--px-color-background-state-active-default);color:var(--px-color-text-state-active-inverted);border-color:var(--px-color-border-none-default)}:host([variant="selectable-tag"]) input:checked+label,:host([variant="selectable-tag"]) input:checked+label:hover{background-color:var(--px-color-background-state-active-default);border-color:var(--px-color-border-none-default);color:var(--px-color-text-state-active-inverted)}:host([variant="selectable-tag"]) input[disabled]+label{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default);border-color:var(--px-color-border-none-default)}:host([variant="selectable-tag"]):host([inverted]) label{background:var(--px-color-background-container-default-default);color:var(--px-color-text-brand-inverted);border-color:var(--px-color-border-neutral-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:hover:not([disabled],[aria-disabled=true])+label,:host([variant="selectable-tag"]):host([inverted]) input.hover:not([disabled],[aria-disabled=true])+label{color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:active:not([disabled],[aria-disabled=true])+label{background:var(--px-color-background-state-active-inverted);color:var(--px-color-text-state-active-default);border-color:var(--px-color-border-none-inverted)}:host([variant="selectable-tag"]):host([inverted]) input:checked+label,:host([variant="selectable-tag"]):host([inverted]) input:checked+label:hover{background-color:var(--px-color-background-state-active-inverted);border-color:var(--px-color-border-none-inverted);color:var(--px-color-text-state-active-default)}:host([variant="selectable-tag"]):host([inverted]) input[disabled]+label{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted);border-color:var(--px-color-border-none-inverted)}@media only screen and (min-width: 768px){.radio{gap:var(--px-spacing-s-desktop)}:host(:focus-visible){outline-width:var(--px-focus-outline-desktop);outline-offset:var(--px-focus-offset-desktop)}label{font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1025px){.radio{gap:var(--px-spacing-s-desktop)}:host(:focus-visible){outline-width:var(--px-focus-outline-desktop);outline-offset:var(--px-focus-offset-desktop)}label{font-size:var(--px-text-size-label-m-desktop)}}@keyframes anim-pop{0%{transform:scale(0)}to{transform:scale(1)}}`, Yt = new CSSStyleSheet();
|
|
2536
|
-
Yt.replaceSync(Ge);
|
|
2537
|
-
const Gt = ["", "default", "selectable-tag"], Kt = ["", "error"], U = class U extends x {
|
|
2538
|
-
constructor() {
|
|
2539
|
-
super(Yt), this.template = () => `<div class="radio" tabindex="-1">
|
|
2540
|
-
<input type="radio" tabindex="-1" />
|
|
2541
|
-
<label><slot name="before"></slot><slot name="label"></slot></label>
|
|
2542
|
-
</div>`, this.shadowRoot && (this.shadowRoot.innerHTML = this.template());
|
|
2543
|
-
}
|
|
2544
|
-
static get observedAttributes() {
|
|
2545
|
-
return [...super.observedAttributes, "hover", "inverted"];
|
|
2546
|
-
}
|
|
2547
|
-
attributeChangedCallback(t, e, r) {
|
|
2548
|
-
if (e !== r)
|
|
2549
|
-
switch (t) {
|
|
2550
|
-
case "hover":
|
|
2551
|
-
this.$el.classList.toggle("hover");
|
|
2552
|
-
break;
|
|
2553
|
-
default:
|
|
2554
|
-
super.attributeChangedCallback(t, e, r);
|
|
2555
|
-
break;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
get $radio() {
|
|
2559
|
-
return this.shadowRoot.querySelector(".radio");
|
|
2560
|
-
}
|
|
2561
|
-
get $labelSlot() {
|
|
2562
|
-
return this.querySelector('[slot="label"]');
|
|
2563
|
-
}
|
|
2564
|
-
get $iconSlot() {
|
|
2565
|
-
return this.querySelector('px-icon[slot="before"]');
|
|
2566
|
-
}
|
|
2567
|
-
get inverted() {
|
|
2568
|
-
return this.getAttribute("inverted");
|
|
2569
|
-
}
|
|
2570
|
-
set inverted(t) {
|
|
2571
|
-
this.setAttribute("inverted", t);
|
|
2572
|
-
}
|
|
2573
|
-
};
|
|
2574
|
-
U.nativeName = "input", U.accessorExclusions = ["checked"];
|
|
2575
|
-
let W = U;
|
|
2576
|
-
customElements.get("px-radio-base") || customElements.define("px-radio-base", W);
|
|
2577
|
-
class Ke extends W {
|
|
2578
|
-
constructor() {
|
|
2579
|
-
var t, e;
|
|
2580
|
-
super(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = ((e = this.parentElement) == null ? void 0 : e.querySelector("px-radio")) === this ? 0 : -1, this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`);
|
|
2581
|
-
}
|
|
2582
|
-
static get observedAttributes() {
|
|
2583
|
-
return [...super.observedAttributes, "state", "variant", "inverted"];
|
|
2584
|
-
}
|
|
2585
|
-
connectedCallback() {
|
|
2586
|
-
super.connectedCallback(), this.addEventListener("keypress", (t) => {
|
|
2587
|
-
switch (t.stopPropagation(), t.preventDefault(), t.code) {
|
|
2588
|
-
case "Space":
|
|
2589
|
-
this.click();
|
|
2590
|
-
break;
|
|
2591
|
-
}
|
|
2592
|
-
}), this.addEventListener("click", (t) => {
|
|
2593
|
-
this.checked || (this.checked = !0), t.stopPropagation(), t.preventDefault();
|
|
2594
|
-
}), this.setupForId(), this.$iconSlot && (this.$iconSlot.setAttribute("size", "xs"), this.$iconSlot.setAttribute("color", "inherit")), !this.$labelSlot && !this.$iconSlot ? this.$radio.classList.add("all-slots-empty") : this.$radio.classList.remove("all-slots-empty");
|
|
2595
|
-
}
|
|
2596
|
-
attributeChangedCallback(t, e, r) {
|
|
2597
|
-
if (e !== r)
|
|
2598
|
-
switch (t) {
|
|
2599
|
-
case "state":
|
|
2600
|
-
this.updateAttribute(e, r, Kt, t);
|
|
2601
|
-
break;
|
|
2602
|
-
case "variant":
|
|
2603
|
-
this.updateAttribute(
|
|
2604
|
-
e,
|
|
2605
|
-
r,
|
|
2606
|
-
Gt,
|
|
2607
|
-
t
|
|
2608
|
-
);
|
|
2609
|
-
break;
|
|
2610
|
-
case "checked":
|
|
2611
|
-
this.handleCheckedChange(r !== null);
|
|
2612
|
-
break;
|
|
2613
|
-
default:
|
|
2614
|
-
super.attributeChangedCallback(t, e, r);
|
|
2615
|
-
break;
|
|
2616
|
-
}
|
|
2617
|
-
}
|
|
2618
|
-
// Form-associated callbacks
|
|
2619
|
-
static get formAssociated() {
|
|
2620
|
-
return !0;
|
|
2621
|
-
}
|
|
2622
|
-
// Set default behavior when the element is attached to a form
|
|
2623
|
-
formResetCallback() {
|
|
2624
|
-
this.checked = !1;
|
|
2625
|
-
}
|
|
2626
|
-
formStateRestoreCallback(t) {
|
|
2627
|
-
this.checked = t;
|
|
2628
|
-
}
|
|
2629
|
-
updateAttribute(t, e, r, i) {
|
|
2630
|
-
var a, s;
|
|
2631
|
-
if (!this.checkName(r, e)) {
|
|
2632
|
-
console.error(`${e} is not a valid ${i} value`);
|
|
2633
|
-
return;
|
|
2634
|
-
}
|
|
2635
|
-
t !== null && (i === "variant" ? (a = this.$el.parentElement) == null || a.classList.toggle(t) : this.$el.classList.toggle(t)), e !== null && (i === "variant" ? (s = this.$el.parentElement) == null || s.classList.toggle(e) : this.$el.classList.toggle(e));
|
|
2636
|
-
}
|
|
2637
|
-
handleCheckedChange(t) {
|
|
2638
|
-
var e;
|
|
2639
|
-
this.$el.checked = t, (e = this.internals) == null || e.setFormValue(this.formData()), t ? (this.tabIndex = 0, this.internals && (this.internals.ariaChecked = "true")) : (this.tabIndex = -1, this.internals && (this.internals.ariaChecked = "false")), t && this.dispatchEvent(
|
|
2640
|
-
new Event("change", {
|
|
2641
|
-
bubbles: !0,
|
|
2642
|
-
composed: !0
|
|
2643
|
-
// Allow the event to pass through shadow DOM boundaries
|
|
2644
|
-
})
|
|
2645
|
-
);
|
|
2646
|
-
}
|
|
2647
|
-
formData() {
|
|
2648
|
-
if (this.$el.name) {
|
|
2649
|
-
const t = new FormData(), e = this.getAttribute("name");
|
|
2650
|
-
return e && (this.$el.checked ? t.set(e, this.$el.value) : t.delete(e)), t;
|
|
2651
|
-
}
|
|
2652
|
-
}
|
|
2653
|
-
setupForId() {
|
|
2654
|
-
const t = Math.random().toString(36).substr(2, 9);
|
|
2655
|
-
this.$el.setAttribute("id", t), this.$label && this.$label.setAttribute("for", t);
|
|
2656
|
-
}
|
|
2657
|
-
get state() {
|
|
2658
|
-
return this.getAttribute("state");
|
|
2659
|
-
}
|
|
2660
|
-
set state(t) {
|
|
2661
|
-
this.setAttribute("state", t);
|
|
2662
|
-
}
|
|
2663
|
-
get disabled() {
|
|
2664
|
-
return this.getAttribute("disabled") !== null;
|
|
2665
|
-
}
|
|
2666
|
-
set disabled(t) {
|
|
2667
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
2668
|
-
}
|
|
2669
|
-
get $label() {
|
|
2670
|
-
return this.shadowRoot.querySelector("label");
|
|
2671
|
-
}
|
|
2672
|
-
get inverted() {
|
|
2673
|
-
return this.getAttribute("inverted");
|
|
2674
|
-
}
|
|
2675
|
-
set inverted(t) {
|
|
2676
|
-
this.setAttribute("inverted", t);
|
|
2677
|
-
}
|
|
2678
|
-
get checked() {
|
|
2679
|
-
return this.$el.checked;
|
|
2680
|
-
}
|
|
2681
|
-
set checked(t) {
|
|
2682
|
-
t ? this.setAttribute("checked", t ? "" : "false") : this.removeAttribute("checked");
|
|
2683
|
-
}
|
|
2684
|
-
get $radio() {
|
|
2685
|
-
return this.shadowRoot.querySelector(".radio");
|
|
2686
|
-
}
|
|
2687
|
-
get $labelSlot() {
|
|
2688
|
-
return this.querySelector('[slot="label"]');
|
|
2689
|
-
}
|
|
2690
|
-
get $iconSlot() {
|
|
2691
|
-
return this.querySelector('px-icon[slot="before"]');
|
|
2692
|
-
}
|
|
2693
|
-
}
|
|
2694
|
-
customElements.get("px-radio") || customElements.define("px-radio", Ke);
|
|
2695
|
-
const Xe = ":host{display:block}:host *{box-sizing:border-box}#radio-container{display:inline-flex;flex-direction:column;gap:var(--px-radiogroup-gap--mobile, var(--px-spacing-s-mobile));font-family:var(--px-font-family)}.selectable-tag #radio-container{flex-direction:row}@media only screen and (min-width: 48em){#radio-container{gap:var(--px-radiogroup-gap--tablet, var(--px-spacing-s-tablet))}}@media only screen and (min-width: 64.0625em){#radio-container{gap:var(--px-radiogroup-gap--laptop, var(--px-spacing-s-laptop))}}@media only screen and (min-width: 90.0625em){#radio-container{gap:var(--px-radiogroup-gap--desktop, var(--px-spacing-s-desktop))}}", Xt = new CSSStyleSheet();
|
|
2696
|
-
Xt.replaceSync(Xe);
|
|
2697
|
-
const Je = [
|
|
2698
|
-
"",
|
|
2699
|
-
"none",
|
|
2700
|
-
"2xs",
|
|
2701
|
-
"xs",
|
|
2702
|
-
"s",
|
|
2703
|
-
"default",
|
|
2704
|
-
"l"
|
|
2705
|
-
];
|
|
2706
|
-
class Qe extends C {
|
|
2707
|
-
constructor() {
|
|
2708
|
-
super(Xt), this.template = () => `<px-fieldset role="radiogroup">
|
|
2709
|
-
<slot name="legend" slot="legend"></slot>
|
|
2710
|
-
<slot name="error-text" slot="error-text"></slot>
|
|
2711
|
-
<div id="radio-container">
|
|
2712
|
-
<slot></slot>
|
|
2713
|
-
</div>
|
|
2714
|
-
</px-fieldset>`, this.handleKeyDown = () => {
|
|
2715
|
-
var e;
|
|
2716
|
-
const t = this.currentCheckedRadio ? ((e = this.currentCheckedRadio) == null ? void 0 : e.nextElementSibling) ?? this.$radioList[0] : this.$radioList[1];
|
|
2717
|
-
t.checked = !0, t.focus();
|
|
2718
|
-
}, this.handleKeyUp = () => {
|
|
2719
|
-
var e;
|
|
2720
|
-
const t = ((e = this.currentCheckedRadio) == null ? void 0 : e.previousElementSibling) ?? this.$radioList[this.$radioList.length - 1];
|
|
2721
|
-
t.checked = !0, t.focus();
|
|
2722
|
-
}, this.handleRadioChange = (t) => {
|
|
2723
|
-
const e = t.target;
|
|
2724
|
-
if (e.localName === "px-tile-radio" || e.localName === "px-radio" || e.localName === "px-cell-radio" || e.localName === "px-selectable-box-radio") {
|
|
2725
|
-
this.currentCheckedRadio = e;
|
|
2726
|
-
const r = e.getAttribute("name");
|
|
2727
|
-
r && this.currentCheckedRadio.checked && this.uncheckOtherRadios(r);
|
|
2728
|
-
}
|
|
2729
|
-
}, this.shadowRoot.innerHTML = this.template();
|
|
2730
|
-
}
|
|
2731
|
-
static get observedAttributes() {
|
|
2732
|
-
return [
|
|
2733
|
-
...super.observedAttributes,
|
|
2734
|
-
"name",
|
|
2735
|
-
"gap",
|
|
2736
|
-
"variant",
|
|
2737
|
-
"required",
|
|
2738
|
-
"disabled",
|
|
2739
|
-
"state",
|
|
2740
|
-
"inverted"
|
|
2741
|
-
];
|
|
2742
|
-
}
|
|
2743
|
-
connectedCallback() {
|
|
2744
|
-
var e;
|
|
2745
|
-
(!this.hasAttribute("name") || this.getAttribute("name") === "") && console.error(
|
|
2746
|
-
'<px-radio-group> requires a "name" attribute to function properly.'
|
|
2747
|
-
), ((e = this.$slotLegend) == null ? void 0 : e.assignedNodes().length) > 0 || console.error(
|
|
2748
|
-
'<px-radiogroup> requires a slot="legend" containing the description of the fieldset radiogroup.'
|
|
2749
|
-
), this.setupErrorState(), this.addEventListener("change", this.handleRadioChange), this.addEventListener("keydown", (r) => {
|
|
2750
|
-
switch (r.code) {
|
|
2751
|
-
case "ArrowUp":
|
|
2752
|
-
case "ArrowDown":
|
|
2753
|
-
r.stopPropagation(), r.preventDefault();
|
|
2754
|
-
}
|
|
2755
|
-
}), this.addEventListener("keyup", (r) => {
|
|
2756
|
-
switch (r.stopPropagation(), r.preventDefault(), r.code) {
|
|
2757
|
-
case "ArrowUp":
|
|
2758
|
-
case "ArrowLeft":
|
|
2759
|
-
this.handleKeyUp();
|
|
2760
|
-
break;
|
|
2761
|
-
case "ArrowDown":
|
|
2762
|
-
case "ArrowRight":
|
|
2763
|
-
this.handleKeyDown();
|
|
2764
|
-
break;
|
|
2765
|
-
}
|
|
2766
|
-
});
|
|
2767
|
-
}
|
|
2768
|
-
disconnectedCallback() {
|
|
2769
|
-
this.removeEventListener("change", this.handleRadioChange);
|
|
2770
|
-
}
|
|
2771
|
-
attributeChangedCallback(t, e, r) {
|
|
2772
|
-
if (e !== r)
|
|
2773
|
-
switch (t) {
|
|
2774
|
-
case "gap":
|
|
2775
|
-
this.updateGap(e, r, Je);
|
|
2776
|
-
break;
|
|
2777
|
-
case "variant":
|
|
2778
|
-
this.updateVariant(e, r, Gt);
|
|
2779
|
-
break;
|
|
2780
|
-
case "disabled":
|
|
2781
|
-
this.$el.ariaDisabled = "true", this.$radioList.forEach((i) => {
|
|
2782
|
-
i.setAttribute(t, r);
|
|
2783
|
-
});
|
|
2784
|
-
break;
|
|
2785
|
-
case "required":
|
|
2786
|
-
this.$el.ariaRequired = "true";
|
|
2787
|
-
break;
|
|
2788
|
-
case "name":
|
|
2789
|
-
this.$radioList.forEach((i) => {
|
|
2790
|
-
i.setAttribute(t, r);
|
|
2791
|
-
});
|
|
2792
|
-
break;
|
|
2793
|
-
case "inverted":
|
|
2794
|
-
this.$el.setAttribute(t, r), this.$radioList.forEach((i) => {
|
|
2795
|
-
i.setAttribute(t, r);
|
|
2796
|
-
});
|
|
2797
|
-
break;
|
|
2798
|
-
case "state":
|
|
2799
|
-
this.setupErrorState();
|
|
2800
|
-
break;
|
|
2801
|
-
default:
|
|
2802
|
-
super.attributeChangedCallback(t, e, r);
|
|
2803
|
-
break;
|
|
2804
|
-
}
|
|
2805
|
-
}
|
|
2806
|
-
uncheckOtherRadios(t) {
|
|
2807
|
-
this.querySelectorAll(
|
|
2808
|
-
`px-radio[name="${t}"], px-tile-radio[name="${t}"], px-cell-radio[name="${t}"], px-selectable-box-radio[name="${t}"]`
|
|
2809
|
-
).forEach((r) => {
|
|
2810
|
-
r !== this.currentCheckedRadio && r.shadowRoot && (r.checked = !1);
|
|
2811
|
-
});
|
|
2812
|
-
}
|
|
2813
|
-
updateVariant(t, e, r) {
|
|
2814
|
-
if (!this.checkName(r, e)) {
|
|
2815
|
-
console.error(`${e} is not a valid variant value`);
|
|
2816
|
-
return;
|
|
2817
|
-
}
|
|
2818
|
-
t !== null && t !== "" && this.$el.classList.toggle(t), e !== null && e !== "" && (this.$el.classList.toggle(e), this.$radioList.forEach((i) => {
|
|
2819
|
-
i.setAttribute("variant", e);
|
|
2820
|
-
}));
|
|
2821
|
-
}
|
|
2822
|
-
updateGap(t, e, r) {
|
|
2823
|
-
if (!this.checkName(r, e)) {
|
|
2824
|
-
console.error(`${e} is not a valid gap value`);
|
|
2825
|
-
return;
|
|
2826
|
-
}
|
|
2827
|
-
this.updateGapStyle(t), this.updateGapStyle(e);
|
|
2828
|
-
}
|
|
2829
|
-
updateGapStyle(t) {
|
|
2830
|
-
t !== null && t !== "" && t !== "default" && (this.$el.style.setProperty(
|
|
2831
|
-
"--px-radiogroup-gap--mobile",
|
|
2832
|
-
`var(--px-spacing-${t}-mobile)`
|
|
2833
|
-
), this.$el.style.setProperty(
|
|
2834
|
-
"--px-radiogroup-gap--tablet",
|
|
2835
|
-
`var(--px-spacing-${t}-tablet)`
|
|
2836
|
-
), this.$el.style.setProperty(
|
|
2837
|
-
"--px-radiogroup-gap--laptop",
|
|
2838
|
-
`var(--px-spacing-${t}-laptop)`
|
|
2839
|
-
), this.$el.style.setProperty(
|
|
2840
|
-
"--px-radiogroup-gap--desktop",
|
|
2841
|
-
`var(--px-spacing-${t}-desktop)`
|
|
2842
|
-
));
|
|
2843
|
-
}
|
|
2844
|
-
setupErrorState() {
|
|
2845
|
-
var e;
|
|
2846
|
-
const t = ((e = this.$slotError) == null ? void 0 : e.assignedNodes().length) > 0;
|
|
2847
|
-
this.state === "error" && !t && console.error(
|
|
2848
|
-
'<px-radiogroup> with state="error" requires a slot="error-text" containing the error description.'
|
|
2849
|
-
), this.state === "error" && t ? (this.$el.setAttribute("state", "error"), this.$radioList.forEach((r) => {
|
|
2850
|
-
r.setAttribute("state", "error");
|
|
2851
|
-
})) : (this.$el.removeAttribute("state"), this.$radioList.forEach((r) => {
|
|
2852
|
-
r.removeAttribute("state");
|
|
2853
|
-
}));
|
|
2854
|
-
}
|
|
2855
|
-
get $el() {
|
|
2856
|
-
return this.shadowRoot.querySelector("px-fieldset");
|
|
2857
|
-
}
|
|
2858
|
-
get $slotLegend() {
|
|
2859
|
-
return this.shadowRoot.querySelector(
|
|
2860
|
-
'slot[name="legend"]'
|
|
2861
|
-
);
|
|
2862
|
-
}
|
|
2863
|
-
get $slotError() {
|
|
2864
|
-
return this.shadowRoot.querySelector(
|
|
2865
|
-
'slot[name="error-text"]'
|
|
2866
|
-
);
|
|
2867
|
-
}
|
|
2868
|
-
get $radioList() {
|
|
2869
|
-
return this.querySelectorAll(
|
|
2870
|
-
"px-radio, px-tile-radio, px-cell-radio, px-selectable-box-radio"
|
|
2871
|
-
);
|
|
2872
|
-
}
|
|
2873
|
-
get gap() {
|
|
2874
|
-
return this.getAttribute("gap");
|
|
2875
|
-
}
|
|
2876
|
-
set gap(t) {
|
|
2877
|
-
this.setAttribute("gap", t);
|
|
2878
|
-
}
|
|
2879
|
-
get variant() {
|
|
2880
|
-
return this.getAttribute("variant");
|
|
2881
|
-
}
|
|
2882
|
-
set variant(t) {
|
|
2883
|
-
this.setAttribute("variant", t);
|
|
2884
|
-
}
|
|
2885
|
-
get state() {
|
|
2886
|
-
return this.getAttribute("state");
|
|
2887
|
-
}
|
|
2888
|
-
set state(t) {
|
|
2889
|
-
this.setAttribute("state", t);
|
|
2890
|
-
}
|
|
2891
|
-
get $label() {
|
|
2892
|
-
return this.shadowRoot.querySelector("label");
|
|
2893
|
-
}
|
|
2894
|
-
get inverted() {
|
|
2895
|
-
return this.getAttribute("inverted");
|
|
2896
|
-
}
|
|
2897
|
-
set inverted(t) {
|
|
2898
|
-
this.setAttribute("inverted", t);
|
|
2899
|
-
}
|
|
2900
|
-
get disabled() {
|
|
2901
|
-
return this.hasAttribute("disabled");
|
|
2902
|
-
}
|
|
2903
|
-
set disabled(t) {
|
|
2904
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
2905
|
-
}
|
|
2906
|
-
get required() {
|
|
2907
|
-
return this.hasAttribute("required");
|
|
2908
|
-
}
|
|
2909
|
-
set required(t) {
|
|
2910
|
-
t ? this.setAttribute("required", "") : this.removeAttribute("required");
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
customElements.get("px-radio-group") || customElements.define("px-radio-group", Qe);
|
|
2914
|
-
const Jt = new CSSStyleSheet();
|
|
2915
|
-
Jt.replaceSync(R);
|
|
2916
|
-
const Ve = ["", "left", "right"];
|
|
2917
|
-
class tr extends C {
|
|
2918
|
-
template() {
|
|
2919
|
-
return `
|
|
2920
|
-
<div class="cell-radio">
|
|
2921
|
-
<px-cell hoverable>
|
|
2922
|
-
<px-radio-base slot="prefix" aria-hidden="true" tabindex="-1"></px-radio-base>
|
|
2923
|
-
<slot name="visual" slot="visual"></slot>
|
|
2924
|
-
<slot name="label" slot="label"></slot>
|
|
2925
|
-
<slot name="description" slot="description"></slot>
|
|
2926
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
2927
|
-
</px-cell>
|
|
2928
|
-
`;
|
|
2929
|
-
}
|
|
2930
|
-
constructor() {
|
|
2931
|
-
var t, e;
|
|
2932
|
-
super(Jt), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = ((e = this.parentElement) == null ? void 0 : e.firstElementChild) === this ? 0 : -1, this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`);
|
|
2933
|
-
}
|
|
2934
|
-
connectedCallback() {
|
|
2935
|
-
if (this.$slotVisual) {
|
|
2936
|
-
const t = this.querySelector('px-img[slot="visual"]');
|
|
2937
|
-
t && T(t);
|
|
2938
|
-
}
|
|
2939
|
-
this.addEventListener("mouseover", () => {
|
|
2940
|
-
this.$radio.setAttribute("hover", "");
|
|
2941
|
-
}), this.addEventListener("mouseout", () => {
|
|
2942
|
-
this.$radio.removeAttribute("hover");
|
|
2943
|
-
}), this.addEventListener("keypress", (t) => {
|
|
2944
|
-
switch (t.stopPropagation(), t.preventDefault(), t.code) {
|
|
2945
|
-
case "Space":
|
|
2946
|
-
this.click();
|
|
2947
|
-
break;
|
|
2948
|
-
}
|
|
2949
|
-
}), this.addEventListener("click", (t) => {
|
|
2950
|
-
this.checked || (this.checked = !0), t.stopPropagation(), t.preventDefault();
|
|
2951
|
-
}), this.hasAttribute("checked") && (this.checked = !0), M(this);
|
|
2952
|
-
}
|
|
2953
|
-
static get observedAttributes() {
|
|
2954
|
-
return [
|
|
2955
|
-
"inverted",
|
|
2956
|
-
"variant",
|
|
2957
|
-
"disabled",
|
|
2958
|
-
"separator",
|
|
2959
|
-
"separator--mobile",
|
|
2960
|
-
"separator--tablet",
|
|
2961
|
-
"separator--laptop",
|
|
2962
|
-
"separator--desktop",
|
|
2963
|
-
"radius",
|
|
2964
|
-
"radius--mobile",
|
|
2965
|
-
"radius--tablet",
|
|
2966
|
-
"radius--laptop",
|
|
2967
|
-
"radius--desktop",
|
|
2968
|
-
"name",
|
|
2969
|
-
"value",
|
|
2970
|
-
"state",
|
|
2971
|
-
"checked",
|
|
2972
|
-
"radio-position",
|
|
2973
|
-
"background-color",
|
|
2974
|
-
"compact"
|
|
2975
|
-
];
|
|
2976
|
-
}
|
|
2977
|
-
attributeChangedCallback(t, e, r) {
|
|
2978
|
-
if (e !== r)
|
|
2979
|
-
switch (t) {
|
|
2980
|
-
case "variant":
|
|
2981
|
-
this.$cell.variant = this.variant;
|
|
2982
|
-
break;
|
|
2983
|
-
case "inverted":
|
|
2984
|
-
O(this.$cell, this.$children, this.inverted, [
|
|
2985
|
-
this.$radio
|
|
2986
|
-
]);
|
|
2987
|
-
break;
|
|
2988
|
-
case "disabled":
|
|
2989
|
-
this.handleDisabledAttributeChange(r !== null);
|
|
2990
|
-
break;
|
|
2991
|
-
case "radius":
|
|
2992
|
-
case "radius--mobile":
|
|
2993
|
-
case "radius--tablet":
|
|
2994
|
-
case "radius--laptop":
|
|
2995
|
-
case "radius--desktop":
|
|
2996
|
-
case "separator":
|
|
2997
|
-
case "separator--mobile":
|
|
2998
|
-
case "separator--tablet":
|
|
2999
|
-
case "separator--laptop":
|
|
3000
|
-
case "separator--desktop":
|
|
3001
|
-
case "background-color":
|
|
3002
|
-
case "compact":
|
|
3003
|
-
this.$cell.setAttribute(t, this.getAttribute(t) || "");
|
|
3004
|
-
break;
|
|
3005
|
-
case "name":
|
|
3006
|
-
case "value":
|
|
3007
|
-
this.$radio && this.$radio.setAttribute(t, r);
|
|
3008
|
-
break;
|
|
3009
|
-
case "state":
|
|
3010
|
-
if (this.$radio)
|
|
3011
|
-
if (this.checkName(Kt, r))
|
|
3012
|
-
this.$radio.setAttribute("state", r);
|
|
3013
|
-
else {
|
|
3014
|
-
console.error(`${r} is not a valid state value`);
|
|
3015
|
-
return;
|
|
3016
|
-
}
|
|
3017
|
-
break;
|
|
3018
|
-
case "checked":
|
|
3019
|
-
this.handleCheckedAttributeChange(r);
|
|
3020
|
-
break;
|
|
3021
|
-
case "radio-position":
|
|
3022
|
-
this.handleRadioPositionChange(r);
|
|
3023
|
-
break;
|
|
3024
|
-
}
|
|
3025
|
-
}
|
|
3026
|
-
handleDisabledAttributeChange(t) {
|
|
3027
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$cell.disabled = !0, this.$radio.setAttribute("disabled", ""), this.$children.forEach((e) => {
|
|
3028
|
-
e.hasAttribute("disabled") || e.setAttribute("disabled", "");
|
|
3029
|
-
})) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$cell.disabled = !1, this.$radio.removeAttribute("disabled"), this.$children.forEach((e) => {
|
|
3030
|
-
e.hasAttribute("disabled") && e.removeAttribute("disabled");
|
|
3031
|
-
}));
|
|
3032
|
-
}
|
|
3033
|
-
handleCheckedAttributeChange(t) {
|
|
3034
|
-
var e;
|
|
3035
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.setAttribute("tabIndex", "-1"), this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.setAttribute("tabIndex", "0"), this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(
|
|
3036
|
-
new Event("change", {
|
|
3037
|
-
bubbles: !0,
|
|
3038
|
-
composed: !0
|
|
3039
|
-
// Allow the event to pass through shadow DOM boundaries
|
|
3040
|
-
})
|
|
3041
|
-
));
|
|
3042
|
-
}
|
|
3043
|
-
handleRadioPositionChange(t) {
|
|
3044
|
-
if (!this.checkName(Ve, t)) {
|
|
3045
|
-
console.error(`${t} is not a valid position value`);
|
|
3046
|
-
return;
|
|
3047
|
-
}
|
|
3048
|
-
this.$radio && (t === "" || t === "left" ? this.$radio.setAttribute("slot", "prefix") : t === "right" && this.$radio.setAttribute("slot", "action-indicator"));
|
|
3049
|
-
}
|
|
3050
|
-
// Form-associated callbacks
|
|
3051
|
-
static get formAssociated() {
|
|
3052
|
-
return !0;
|
|
3053
|
-
}
|
|
3054
|
-
// Set default behavior when the element is attached to a form
|
|
3055
|
-
formResetCallback() {
|
|
3056
|
-
this.checked = !1;
|
|
3057
|
-
}
|
|
3058
|
-
formStateRestoreCallback(t) {
|
|
3059
|
-
this.checked = t;
|
|
3060
|
-
}
|
|
3061
|
-
formData() {
|
|
3062
|
-
if (this.name) {
|
|
3063
|
-
const t = new FormData(), e = this.getAttribute("name");
|
|
3064
|
-
return e && (this.checked ? t.set(e, this.$radio.value) : t.delete(e)), t;
|
|
3065
|
-
}
|
|
3066
|
-
}
|
|
3067
|
-
get $cell() {
|
|
3068
|
-
return this.shadowRoot.querySelector("px-cell");
|
|
3069
|
-
}
|
|
3070
|
-
get $el() {
|
|
3071
|
-
return this.shadowRoot.querySelector(".cell-radio");
|
|
3072
|
-
}
|
|
3073
|
-
get $radio() {
|
|
3074
|
-
return this.shadowRoot.querySelector("px-radio-base");
|
|
3075
|
-
}
|
|
3076
|
-
get $slotVisual() {
|
|
3077
|
-
return this.querySelector('[slot="visual"]');
|
|
3078
|
-
}
|
|
3079
|
-
get $children() {
|
|
3080
|
-
return this.querySelectorAll("px-cell-radio > *");
|
|
3081
|
-
}
|
|
3082
|
-
get inverted() {
|
|
3083
|
-
return this.hasAttribute("inverted");
|
|
3084
|
-
}
|
|
3085
|
-
set inverted(t) {
|
|
3086
|
-
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
3087
|
-
}
|
|
3088
|
-
get variant() {
|
|
3089
|
-
return this.getAttribute("variant");
|
|
3090
|
-
}
|
|
3091
|
-
set variant(t) {
|
|
3092
|
-
this.setAttribute("variant", t);
|
|
3093
|
-
}
|
|
3094
|
-
get disabled() {
|
|
3095
|
-
return this.hasAttribute("disabled");
|
|
3096
|
-
}
|
|
3097
|
-
set disabled(t) {
|
|
3098
|
-
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
3099
|
-
}
|
|
3100
|
-
get separator() {
|
|
3101
|
-
return this.getAttribute("separator");
|
|
3102
|
-
}
|
|
3103
|
-
set separator(t) {
|
|
3104
|
-
this.setAttribute("separator", t);
|
|
3105
|
-
}
|
|
3106
|
-
get separatorMobile() {
|
|
3107
|
-
return this.getAttribute("separator--mobile");
|
|
3108
|
-
}
|
|
3109
|
-
set separatorMobile(t) {
|
|
3110
|
-
this.setAttribute("separator--mobile", t);
|
|
3111
|
-
}
|
|
3112
|
-
get separatorTablet() {
|
|
3113
|
-
return this.getAttribute("separator--tablet");
|
|
3114
|
-
}
|
|
3115
|
-
set separatorTablet(t) {
|
|
3116
|
-
this.setAttribute("separator--tablet", t);
|
|
3117
|
-
}
|
|
3118
|
-
get separatorLaptop() {
|
|
3119
|
-
return this.getAttribute("separator--laptop");
|
|
3120
|
-
}
|
|
3121
|
-
set separatorLaptop(t) {
|
|
3122
|
-
this.setAttribute("separator--laptop", t);
|
|
3123
|
-
}
|
|
3124
|
-
get separatorDesktop() {
|
|
3125
|
-
return this.getAttribute("separator--desktop");
|
|
3126
|
-
}
|
|
3127
|
-
set separatorDesktop(t) {
|
|
3128
|
-
this.setAttribute("separator--desktop", t);
|
|
3129
|
-
}
|
|
3130
|
-
get radius() {
|
|
3131
|
-
return this.getAttribute("radius");
|
|
3132
|
-
}
|
|
3133
|
-
set radius(t) {
|
|
3134
|
-
this.setAttribute("radius", t);
|
|
3135
|
-
}
|
|
3136
|
-
get radiusMobile() {
|
|
3137
|
-
return this.getAttribute("radius--mobile");
|
|
3138
|
-
}
|
|
3139
|
-
set radiusMobile(t) {
|
|
3140
|
-
this.setAttribute("radius--mobile", t);
|
|
3141
|
-
}
|
|
3142
|
-
get radiusTablet() {
|
|
3143
|
-
return this.getAttribute("radius--tablet");
|
|
3144
|
-
}
|
|
3145
|
-
set radiusTablet(t) {
|
|
3146
|
-
this.setAttribute("radius--tablet", t);
|
|
3147
|
-
}
|
|
3148
|
-
get radiusLaptop() {
|
|
3149
|
-
return this.getAttribute("radius--laptop");
|
|
3150
|
-
}
|
|
3151
|
-
set radiusLaptop(t) {
|
|
3152
|
-
this.setAttribute("radius--laptop", t);
|
|
3153
|
-
}
|
|
3154
|
-
get radiusDesktop() {
|
|
3155
|
-
return this.getAttribute("radius--desktop");
|
|
3156
|
-
}
|
|
3157
|
-
set radiusDesktop(t) {
|
|
3158
|
-
this.setAttribute("radius--desktop", t);
|
|
3159
|
-
}
|
|
3160
|
-
get checked() {
|
|
3161
|
-
return this.hasAttribute("checked");
|
|
3162
|
-
}
|
|
3163
|
-
set checked(t) {
|
|
3164
|
-
t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
3165
|
-
}
|
|
3166
|
-
get name() {
|
|
3167
|
-
return this.getAttribute("name");
|
|
3168
|
-
}
|
|
3169
|
-
set name(t) {
|
|
3170
|
-
t ? this.setAttribute("name", t) : this.removeAttribute("name");
|
|
3171
|
-
}
|
|
3172
|
-
get state() {
|
|
3173
|
-
return this.getAttribute("state");
|
|
3174
|
-
}
|
|
3175
|
-
set state(t) {
|
|
3176
|
-
t ? this.setAttribute("state", t) : this.removeAttribute("state");
|
|
3177
|
-
}
|
|
3178
|
-
get value() {
|
|
3179
|
-
return this.getAttribute("value");
|
|
3180
|
-
}
|
|
3181
|
-
set value(t) {
|
|
3182
|
-
t ? this.setAttribute("value", t) : this.removeAttribute("value");
|
|
3183
|
-
}
|
|
3184
|
-
get radioPosition() {
|
|
3185
|
-
return this.getAttribute("radio-position");
|
|
3186
|
-
}
|
|
3187
|
-
set radioPosition(t) {
|
|
3188
|
-
t ? this.setAttribute("radio-position", t) : this.removeAttribute("radio-position");
|
|
3189
|
-
}
|
|
3190
|
-
get backgroundColor() {
|
|
3191
|
-
return this.getAttribute("background-color");
|
|
3192
|
-
}
|
|
3193
|
-
set backgroundColor(t) {
|
|
3194
|
-
t ? this.setAttribute("background-color", t) : this.removeAttribute("background-color");
|
|
3195
|
-
}
|
|
3196
|
-
get compact() {
|
|
3197
|
-
return this.hasAttribute("compact");
|
|
3198
|
-
}
|
|
3199
|
-
set compact(t) {
|
|
3200
|
-
t ? this.setAttribute("compact", "") : this.removeAttribute("compact");
|
|
3201
|
-
}
|
|
3202
|
-
}
|
|
3203
|
-
customElements.get("px-cell-radio") || customElements.define("px-cell-radio", tr);
|
|
3204
|
-
const er = ":host{display:block}:host *{box-sizing:border-box}button,a{display:block;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-font-line-height-l);color:var(--px-color-text-neutral-default);text-align:center;cursor:pointer;padding:2em 0;height:100%}button:after,a:after{content:attr(data-label);display:block;height:0;width:auto;visibility:hidden;overflow:hidden;-webkit-user-select:none;user-select:none;pointer-events:none;font-weight:var(--px-font-weight-title)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}button:hover,a:hover{font-weight:var(--px-font-weight-title);color:var(--px-color-background-container-primary-default);padding-block:calc(2em - 2px)}button{margin:0;border:0;border-bottom:2px solid rgba(0,0,0,0);outline:0;background:inherit}button[aria-expanded=true]{font-weight:var(--px-font-weight-title);color:var(--px-color-background-container-primary-default);border-bottom-color:var(--px-color-background-container-primary-default)}a{text-decoration:none}@media only screen and (min-width: 48em){button,a{font-size:var(--px-text-size-label-m-tablet)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 64.0625em){button,a{font-size:var(--px-text-size-label-m-laptop)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625em){button,a{font-size:var(--px-text-size-label-m-desktop)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}", Qt = new CSSStyleSheet();
|
|
3205
|
-
Qt.replaceSync(er);
|
|
3206
|
-
class rr extends C {
|
|
10
|
+
import "@proximus/lavender-container";
|
|
11
|
+
import "@proximus/lavender-button";
|
|
12
|
+
import "@proximus/lavender-section";
|
|
13
|
+
const St = ":host{display:block}:host *{box-sizing:border-box}button,a{display:block;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-font-line-height-l);color:var(--px-color-text-neutral-default);text-align:center;cursor:pointer;padding:2em 0;height:100%}button:after,a:after{content:attr(data-label);display:block;height:0;width:auto;visibility:hidden;overflow:hidden;-webkit-user-select:none;user-select:none;pointer-events:none;font-weight:var(--px-font-weight-title)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}button:hover,a:hover{font-weight:var(--px-font-weight-title);color:var(--px-color-background-container-primary-default);padding-block:calc(2em - 2px)}button{margin:0;border:0;border-bottom:2px solid rgba(0,0,0,0);outline:0;background:inherit}button[aria-expanded=true]{font-weight:var(--px-font-weight-title);color:var(--px-color-background-container-primary-default);border-bottom-color:var(--px-color-background-container-primary-default)}a{text-decoration:none}@media only screen and (min-width: 48em){button,a{font-size:var(--px-text-size-label-m-tablet)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 64.0625em){button,a{font-size:var(--px-text-size-label-m-laptop)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625em){button,a{font-size:var(--px-text-size-label-m-desktop)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}", ot = new CSSStyleSheet();
|
|
14
|
+
ot.replaceSync(St);
|
|
15
|
+
class Ct extends Z {
|
|
3207
16
|
constructor() {
|
|
3208
17
|
var t;
|
|
3209
18
|
super(), this.template = () => `${this.getAttribute("href") ? `<a href="${this.getAttribute("href")}" data-label="${this.textContent}">
|
|
3210
19
|
<slot></slot>
|
|
3211
|
-
</a>` : `<button data-label="${this.textContent}"><slot></slot></button>`}`, this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [
|
|
20
|
+
</a>` : `<button data-label="${this.textContent}"><slot></slot></button>`}`, this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [ot], this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.role = "listitem", this.internals && (this.internals.role = "listitem");
|
|
3212
21
|
}
|
|
3213
22
|
static get observedAttributes() {
|
|
3214
23
|
return ["for", "href"];
|
|
@@ -3255,12 +64,12 @@ class rr extends C {
|
|
|
3255
64
|
return this.shadowRoot.querySelector("a");
|
|
3256
65
|
}
|
|
3257
66
|
}
|
|
3258
|
-
customElements.get("px-header-item") || customElements.define("px-header-item",
|
|
3259
|
-
const or = ".color-inherit{color:inherit!important}.color-brand{color:var(--px-color-text-brand-default)!important}.color-neutral{color:var(--px-color-text-neutral-default)!important}.color-dimmed{color:var(--px-color-text-dimmed-default)!important}.color-purpose-success{color:var(--px-color-text-purpose-success-default)!important}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)!important}.color-purpose-error{color:var(--px-color-text-purpose-error-default)!important}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)!important}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)!important}.color-state-hover{color:var(--px-color-text-state-hover-default)!important}.color-state-active{color:var(--px-color-text-state-active-default)!important}.color-state-disabled{color:var(--px-color-text-state-disabled-default)!important}:host([inverted]) .color-inherit{color:inherit!important}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)!important}:host([inverted]) .color-neutral{color:var(--px-color-text-neutral-inverted)!important}:host([inverted]) .color-dimmed{color:var(--px-color-text-dimmed-inverted)!important}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)!important}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)!important}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)!important}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)!important}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-purpose-promo-inverted)!important}:host([inverted]) .color-state-hover{color:var(--px-color-text-state-hover-inverted)!important}:host([inverted]) .color-state-active{color:var(--px-color-text-state-active-inverted)!important}:host([inverted]) .color-state-disabled{color:var(--px-color-text-state-disabled-inverted)!important}.font-size-inherit{font-size:inherit;line-height:inherit}.font-size-body-l{font-size:var(--px-text-size-body-l-mobile)}.font-size-body-m{font-size:var(--px-text-size-body-m-mobile)}.font-size-body-s{font-size:var(--px-text-size-body-s-mobile)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-mobile)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-mobile)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-mobile)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-mobile)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-mobile)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-mobile)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-mobile)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-mobile)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-mobile)}.font-size-heading-3xl,.font-size-heading-4xl,.font-size-heading-5xl{line-height:var(--px-line-height-ratio-s)}.font-size-link-m{font-size:var(--px-text-size-link-m-mobile)}.font-size-link-s{font-size:var(--px-text-size-link-s-mobile)}@media only screen and (min-width: 48em){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}.font-size-link-m{font-size:var(--px-text-size-link-m-desktop)}.font-size-link-s{font-size:var(--px-text-size-link-s-desktop)}}@media only screen and (min-width: 64.0625em){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}.font-size-link-m{font-size:var(--px-text-size-link-m-desktop)}.font-size-link-s{font-size:var(--px-text-size-link-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-body{font-weight:var(--px-font-weight-body)}.font-weight-title{font-weight:var(--px-font-weight-title)}.font-weight-title-large{font-weight:var(--px-font-weight-title-large)}.font-weight-subtitle{font-weight:var(--px-font-weight-subtitle)}", Vt = new CSSStyleSheet(), te = new CSSStyleSheet(), ee = new CSSStyleSheet();
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
const
|
|
67
|
+
customElements.get("px-header-item") || customElements.define("px-header-item", Ct);
|
|
68
|
+
const Et = ':host([variant="icon-link"]){display:inline-flex}a,.link,::slotted(a){display:inline;align-items:center;font-family:var(--px-font-family);font-size:var(--px-text-size-link-m-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}a:hover,.link:hover{color:var(--px-color-text-state-hover-default)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}a[aria-disabled=true],.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-mobile)}a ::slotted(span[slot="after"]),a ::slotted(span[slot="before"]),.link ::slotted(span[slot="after"]),.link ::slotted(span[slot="before"]){display:inline-block}::slotted(a:hover){color:var(--px-color-text-state-hover-default)}a.no-style{text-decoration:none}a.no-style:hover,a.no-style:focus-visible{color:inherit}a.skip-link{position:absolute;left:-10000px;top:auto;overflow:hidden;background-color:var(--px-color-background-container-default-default);padding:var(--px-padding-xs-mobile)}a.skip-link:focus-visible{left:auto;z-index:999}:host([target="_blank"]) ::slotted(px-icon){vertical-align:middle}.icon-link{color:var(--px-color-icon-brand-default);line-height:1;display:inline-flex}:host([inverted]) a,:host([inverted]) .link,:host([inverted]) ::slotted(a){color:var(--px-color-text-neutral-inverted)}:host([inverted]) a:hover,:host([inverted]) .link:hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) a:focus-visible,:host([inverted]) .link:focus-visible{outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) a[aria-disabled=true],:host([inverted]) .link[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) ::slotted(a:hover){color:var(--px-color-text-state-hover-inverted)}:host([inverted]) a.skip-link{background-color:var(--px-color-background-container-default-inverted)}:host([inverted]) .icon-link{color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-tablet)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-tablet)}a.skip-link{padding:var(--px-padding-xs-tablet)}}@media only screen and (min-width: 1025px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-laptop)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-laptop)}a.skip-link{padding:var(--px-padding-xs-laptop)}}@media only screen and (min-width: 90.0625em){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-desktop)}a:focus-visible,.link:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-desktop)}a.skip-link{padding:var(--px-padding-xs-desktop)}}', Lt = `.btn{width:var(--button-extended--mobile, var(--button-extended, auto));display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title);text-align:center;gap:var(--px-spacing-2xs-mobile);cursor:pointer;text-decoration:none;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border:var(--px-size-border-m) solid transparent}.btn,.btn *{box-sizing:border-box}.btn ::slotted(px-icon){line-height:0}.btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-color-border-state-hover-default)}.btn:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn:active:not([disabled],[aria-disabled=true],.loading){transform:scale(.95);border-color:var(--px-color-border-state-active-default);color:var(--px-color-text-state-active-default);background:var(--px-color-background-state-hover-bordered-default)}.btn[disabled],.btn[aria-disabled=true]{cursor:default;pointer-events:none}.btn.loading{cursor:inherit}.btn.loading ::slotted(px-spinner){line-height:0}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-primary-default);min-height:var(--px-spacing-l-mobile);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown)[disabled],.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown)[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown).loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-brand-default);border-color:transparent}.btn.secondary{color:var(--px-color-text-brand-default);background:var(--px-color-background-container-secondary-default);min-height:var(--px-spacing-l-mobile);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn.secondary[disabled],.btn.secondary[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}.btn.secondary.loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-brand-default);border-color:transparent}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn.tertiary{background:none;color:var(--px-color-text-brand-default);border-radius:var(--px-radius-pill);border:var(--px-size-border-m) solid transparent;padding:var(--px-padding-2xs-mobile) 0;gap:var(--px-spacing-xs-mobile)}.btn.tertiary ::slotted(px-icon){display:flex;align-items:center;justify-content:center;width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);padding:4px;border-radius:var(--px-radius-pill);background:var(--px-color-background-container-secondary-default);transition:var(--btn-transition)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading),.btn.tertiary:active:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-mobile) var(--px-padding-s-mobile)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon),.btn.tertiary:active:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent;margin:0 -8px;width:inherit;height:inherit}.btn.tertiary[disabled],.btn.tertiary[aria-disabled=true]{color:var(--px-color-text-state-disabled-default)}.btn.tertiary[disabled] ::slotted(px-icon),.btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-color-background-state-disabled-default)}.btn.tertiary.loading{color:var(--px-color-text-brand-default);border-color:transparent}.btn.tertiary.loading ::slotted(px-spinner){display:flex;align-items:center;justify-content:center;width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);padding:4px;border-radius:var(--px-radius-pill);background:var(--px-color-background-state-disabled-default)}.btn.patch{display:inline-flex}.btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn.patch[disabled],.btn.patch[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}.btn.actionable-tag{background:var(--px-color-background-container-default-inverted);color:var(--px-color-text-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);gap:var(--px-spacing-xs-mobile);border-radius:var(--px-radius-pill);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default)}.btn.actionable-tag:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-default);background:var(--px-color-background-state-hover-bordered-default)}.btn.actionable-tag:active:not([disabled],[aria-disabled=true],.loading){background:var(--px-color-background-state-active-default);color:var(--px-color-text-state-active-inverted);border-color:var(--px-color-border-none-default)}.btn.actionable-tag[disabled],.btn.actionable-tag[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default);border-color:var(--px-color-border-none-default)}.btn.header-dropdown{display:flex;justify-content:space-between;width:100%;color:var(--px-color-text-neutral-default);font-weight:var(--px-font-weight-body);font-size:var(--px-text-size-label-l-mobile);border:var(--px-size-border-m) solid var(--px-color-border-neutral-default);padding:var(--px-padding-xs-mobile) var(--px-padding-s-mobile);border-radius:var(--px-radius-main);background-color:var(--px-color-background-container-default-default);touch-action:manipulation}.btn.header-dropdown:after{display:inline-block;content:"";width:var(--px-size-icon-xs);height:var(--px-size-icon-xs);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:50% 50%;mask-position:50% 50%;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.4753 7.37808C15.1565 7.06426 14.6396 7.06426 14.3208 7.37808L10.0001 11.6313L5.67934 7.37808C5.36055 7.06426 4.84368 7.06426 4.52488 7.37808C4.20608 7.69189 4.20608 8.20069 4.52488 8.5145L9.42284 13.3359C9.74163 13.6497 10.2585 13.6497 10.5773 13.3359L15.4753 8.5145C15.7941 8.20069 15.7941 7.69189 15.4753 7.37808Z' fill='%235C2D91'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.4753 7.37808C15.1565 7.06426 14.6396 7.06426 14.3208 7.37808L10.0001 11.6313L5.67934 7.37808C5.36055 7.06426 4.84368 7.06426 4.52488 7.37808C4.20608 7.69189 4.20608 8.20069 4.52488 8.5145L9.42284 13.3359C9.74163 13.6497 10.2585 13.6497 10.5773 13.3359L15.4753 8.5145C15.7941 8.20069 15.7941 7.69189 15.4753 7.37808Z' fill='%235C2D91'/%3E%3C/svg%3E");background-color:currentColor;color:var(--px-color-icon-brand-default)}button.link{background:none;border:none;text-decoration:underline;padding:0;cursor:pointer}button.link[disabled],button.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-color-text-state-disabled-default)}:host([inverted]) .btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn:active:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-color-border-state-active-inverted);color:var(--px-color-text-state-active-inverted);background:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag){color:var(--px-color-text-brand-default);background:var(--px-color-background-container-primary-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag)[disabled],:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag)[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag).loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-brand-inverted);border-color:transparent}:host([inverted]) .btn.secondary{color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-secondary-inverted)}:host([inverted]) .btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-container-default-inverted)}:host([inverted]) .btn.secondary[disabled],:host([inverted]) .btn.secondary[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn.secondary.loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-brand-inverted);border-color:transparent}:host([inverted]) .btn.tertiary{color:var(--px-color-text-brand-inverted)}:host([inverted]) .btn.tertiary ::slotted(px-icon){background:var(--px-color-background-container-secondary-inverted)}:host([inverted]) .btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon),:host([inverted]) .btn.tertiary:active:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent}:host([inverted]) .btn.tertiary[disabled],:host([inverted]) .btn.tertiary[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn.tertiary[disabled] ::slotted(px-icon),:host([inverted]) .btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-color-background-state-disabled-inverted)}:host([inverted]) .btn.tertiary.loading{color:var(--px-color-text-brand-inverted)}:host([inverted]) .btn.tertiary.loading ::slotted(px-spinner){background:var(--px-color-background-state-disabled-inverted)}:host([inverted]) .btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) .btn.patch[disabled],:host([inverted]) .btn.patch[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .btn.actionable-tag{background:var(--px-color-background-container-default-default);color:var(--px-color-text-brand-inverted);border-color:var(--px-color-border-neutral-inverted)}:host([inverted]) .btn.actionable-tag:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-color-text-brand-inverted);background:var(--px-color-background-state-hover-bordered-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn.actionable-tag:active:not([disabled],[aria-disabled=true],.loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-text-state-active-default);border-color:var(--px-color-border-none-inverted)}:host([inverted]) .btn.actionable-tag[disabled],:host([inverted]) .btn.actionable-tag[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted);border-color:var(--px-color-border-none-default)}:host([inverted]) button.link[disabled],:host([inverted]) button.link[aria-disabled=true]{color:var(--px-color-text-state-disabled-inverted)}@media only screen and (max-width: 47.938em){.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--mobile=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}}@media only screen and (min-width: 48em) and (max-width: 64em){.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--tablet=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}}@media only screen and (min-width: 48em){.btn{width:var(--button-extended--tablet, var(--button-extended, auto));font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-2xs-desktop)}.btn:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn.actionable-tag{padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop);gap:var(--px-spacing-xs-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-desktop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-desktop) * -1)}.btn.secondary{padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn.tertiary{padding:var(--px-padding-2xs-desktop) 0;gap:var(--px-spacing-xs-desktop)}.btn.tertiary ::slotted(px-icon){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-desktop) var(--px-padding-s-desktop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.header-dropdown{justify-content:flex-start;align-items:center;width:inherit;color:var(--px-color-text-brand-default);font-weight:var(--px-font-weight-title);font-size:var(--px-text-size-label-m-tablet);border:none;padding:0;border-radius:0;background:none}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--laptop=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}}@media only screen and (min-width: 64.0625em){.btn{width:var(--button-extended--laptop, var(--button-extended, auto));font-size:var(--px-text-size-label-m-laptop);gap:var(--px-spacing-2xs-laptop)}.btn:focus-visble:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}.btn.actionable-tag{padding:var(--px-padding-2xs-laptop) var(--px-padding-xs-laptop);gap:var(--px-spacing-xs-laptop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){padding:var(--px-padding-xs-laptop) var(--px-padding-m-laptop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-laptop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-laptop) * -1)}.btn.secondary{padding:var(--px-padding-xs-laptop) var(--px-padding-m-laptop)}.btn.tertiary{padding:var(--px-padding-2xs-laptop) 0;gap:var(--px-spacing-xs-laptop)}.btn.tertiary ::slotted(px-icon){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-laptop) var(--px-padding-s-laptop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.header-dropdown{font-size:var(--px-text-size-label-m-laptop);padding:0}}@media only screen and (min-width: 90.0625em){.btn{width:var(--button-extended--desktop, var(--button-extended, auto));font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-2xs-desktop)}.btn:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn.actionable-tag{padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop);gap:var(--px-spacing-xs-desktop)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=alternative]{border-radius:var(--px-radius-button-small)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=bottom-left]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big)}.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=bottom-right],.btn:not(.tertiary,.patch,.actionable-tag,.header-dropdown)[shape--desktop=default]{border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown){padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-desktop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag,.header-dropdown) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-desktop) * -1)}.btn.secondary{padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn.tertiary{padding:var(--px-padding-2xs-desktop) 0;gap:var(--px-spacing-xs-desktop)}.btn.tertiary ::slotted(px-icon){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-desktop) var(--px-padding-s-desktop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-size-icon-xs);height:var(--px-size-icon-xs)}.btn.header-dropdown{font-size:var(--px-text-size-label-m-desktop);padding:0}}@keyframes anim-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}`, Tt = ".color-inherit{color:inherit!important}.color-brand{color:var(--px-color-text-brand-default)!important}.color-neutral{color:var(--px-color-text-neutral-default)!important}.color-dimmed{color:var(--px-color-text-dimmed-default)!important}.color-purpose-success{color:var(--px-color-text-purpose-success-default)!important}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)!important}.color-purpose-error{color:var(--px-color-text-purpose-error-default)!important}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)!important}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)!important}.color-state-hover{color:var(--px-color-text-state-hover-default)!important}.color-state-active{color:var(--px-color-text-state-active-default)!important}.color-state-disabled{color:var(--px-color-text-state-disabled-default)!important}:host([inverted]) .color-inherit{color:inherit!important}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)!important}:host([inverted]) .color-neutral{color:var(--px-color-text-neutral-inverted)!important}:host([inverted]) .color-dimmed{color:var(--px-color-text-dimmed-inverted)!important}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)!important}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)!important}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)!important}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)!important}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-purpose-promo-inverted)!important}:host([inverted]) .color-state-hover{color:var(--px-color-text-state-hover-inverted)!important}:host([inverted]) .color-state-active{color:var(--px-color-text-state-active-inverted)!important}:host([inverted]) .color-state-disabled{color:var(--px-color-text-state-disabled-inverted)!important}.font-size-inherit{font-size:inherit;line-height:inherit}.font-size-body-l{font-size:var(--px-text-size-body-l-mobile)}.font-size-body-m{font-size:var(--px-text-size-body-m-mobile)}.font-size-body-s{font-size:var(--px-text-size-body-s-mobile)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-mobile)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-mobile)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-mobile)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-mobile)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-mobile)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-mobile)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-mobile)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-mobile)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-mobile)}.font-size-heading-3xl,.font-size-heading-4xl,.font-size-heading-5xl{line-height:var(--px-line-height-ratio-s)}.font-size-link-m{font-size:var(--px-text-size-link-m-mobile)}.font-size-link-s{font-size:var(--px-text-size-link-s-mobile)}@media only screen and (min-width: 48em){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}.font-size-link-m{font-size:var(--px-text-size-link-m-desktop)}.font-size-link-s{font-size:var(--px-text-size-link-s-desktop)}}@media only screen and (min-width: 64.0625em){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}.font-size-link-m{font-size:var(--px-text-size-link-m-desktop)}.font-size-link-s{font-size:var(--px-text-size-link-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-body{font-weight:var(--px-font-weight-body)}.font-weight-title{font-weight:var(--px-font-weight-title)}.font-weight-title-large{font-weight:var(--px-font-weight-title-large)}.font-weight-subtitle{font-weight:var(--px-font-weight-subtitle)}", rt = new CSSStyleSheet(), at = new CSSStyleSheet(), it = new CSSStyleSheet();
|
|
69
|
+
rt.replaceSync(Et);
|
|
70
|
+
at.replaceSync(Lt);
|
|
71
|
+
it.replaceSync(Tt);
|
|
72
|
+
const Mt = [...kt, "link-m", "link-s"], Rt = [
|
|
3264
73
|
"link",
|
|
3265
74
|
"no-style",
|
|
3266
75
|
"skip-link",
|
|
@@ -3268,10 +77,10 @@ const ir = [...Ce, "link-m", "link-s"], ar = [
|
|
|
3268
77
|
"btn-secondary",
|
|
3269
78
|
"btn-tertiary",
|
|
3270
79
|
"icon-link"
|
|
3271
|
-
],
|
|
80
|
+
], Nt = ["", "default", "alternative"], j = class j extends yt {
|
|
3272
81
|
constructor() {
|
|
3273
|
-
super(
|
|
3274
|
-
const t = document.createElement(
|
|
82
|
+
super(rt, at, it), this.template = () => '<slot name="before"></slot><slot></slot><slot name="after"></slot>';
|
|
83
|
+
const t = document.createElement(j.nativeName);
|
|
3275
84
|
t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
3276
85
|
}
|
|
3277
86
|
static get observedAttributes() {
|
|
@@ -3297,7 +106,7 @@ const ir = [...Ce, "link-m", "link-s"], ar = [
|
|
|
3297
106
|
];
|
|
3298
107
|
}
|
|
3299
108
|
connectedCallback() {
|
|
3300
|
-
|
|
109
|
+
this.$before && this.$before.localName === "px-icon" && this.configureBeforeAfterIcon(this.$before), this.$after && this.$after.localName === "px-icon" && this.configureBeforeAfterIcon(this.$after), zt(this, this.$el, !1);
|
|
3301
110
|
}
|
|
3302
111
|
attributeChangedCallback(t, e, r) {
|
|
3303
112
|
if (e !== r)
|
|
@@ -3313,7 +122,7 @@ const ir = [...Ce, "link-m", "link-s"], ar = [
|
|
|
3313
122
|
case "shape--tablet":
|
|
3314
123
|
case "shape--laptop":
|
|
3315
124
|
case "shape--desktop":
|
|
3316
|
-
this.updateShape(t, r,
|
|
125
|
+
this.updateShape(t, r, Nt);
|
|
3317
126
|
break;
|
|
3318
127
|
case "extended":
|
|
3319
128
|
case "extended--mobile":
|
|
@@ -3327,14 +136,14 @@ const ir = [...Ce, "link-m", "link-s"], ar = [
|
|
|
3327
136
|
t,
|
|
3328
137
|
e,
|
|
3329
138
|
r,
|
|
3330
|
-
|
|
139
|
+
Mt
|
|
3331
140
|
);
|
|
3332
141
|
break;
|
|
3333
142
|
case "color":
|
|
3334
|
-
this.updateTypography(t, e, r,
|
|
143
|
+
this.updateTypography(t, e, r, $t);
|
|
3335
144
|
break;
|
|
3336
145
|
case "font-weight":
|
|
3337
|
-
this.updateTypography(t, e, r,
|
|
146
|
+
this.updateTypography(t, e, r, wt);
|
|
3338
147
|
break;
|
|
3339
148
|
case "title":
|
|
3340
149
|
r && (this.$el.setAttribute("title", r), this.removeAttribute("title"));
|
|
@@ -3359,17 +168,23 @@ const ir = [...Ce, "link-m", "link-s"], ar = [
|
|
|
3359
168
|
this.$el.classList.toggle(t);
|
|
3360
169
|
}
|
|
3361
170
|
updateVariant(t, e) {
|
|
3362
|
-
t !== null && t !== "" && t !== "link" && this._toggleClassList(t), e !== null && e !== "" && e !== "link" && this._toggleClassList(e), this.checkName(
|
|
171
|
+
t !== null && t !== "" && t !== "link" && this._toggleClassList(t), e !== null && e !== "" && e !== "link" && this._toggleClassList(e), this.checkName(Rt, e) || R(
|
|
172
|
+
`${e} is not an allowed variant value for ${this.tagName.toLowerCase()}`
|
|
173
|
+
), e === "icon-link" && this.$iconNotBeforeAfter.setAttribute("color", "inherit");
|
|
3363
174
|
}
|
|
3364
175
|
updateShape(t, e, r) {
|
|
3365
|
-
if (
|
|
3366
|
-
|
|
176
|
+
if (!At(r, e)) {
|
|
177
|
+
R(
|
|
178
|
+
`${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
179
|
+
);
|
|
3367
180
|
return;
|
|
3368
181
|
}
|
|
3369
182
|
e !== null && e !== "" && this.$el.setAttribute(t, e);
|
|
3370
183
|
}
|
|
3371
|
-
updateTypography(t, e, r,
|
|
3372
|
-
e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), r !== null && r !== "" && r !== "default" && this.$el.classList.toggle(`${t}-${r}`), this.checkName(
|
|
184
|
+
updateTypography(t, e, r, n) {
|
|
185
|
+
e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), r !== null && r !== "" && r !== "default" && this.$el.classList.toggle(`${t}-${r}`), this.checkName(n, r) || R(
|
|
186
|
+
`${r} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
187
|
+
);
|
|
3373
188
|
}
|
|
3374
189
|
updateExtended(t, e) {
|
|
3375
190
|
e === null ? this.$el.style.setProperty(`--button-${t}`, "") : this.$el.style.setProperty(`--button-${t}`, "100%");
|
|
@@ -3488,10 +303,10 @@ const ir = [...Ce, "link-m", "link-s"], ar = [
|
|
|
3488
303
|
t ? this.setAttribute("title", t) : this.removeAttribute("title");
|
|
3489
304
|
}
|
|
3490
305
|
};
|
|
3491
|
-
|
|
3492
|
-
let
|
|
3493
|
-
customElements.get("px-a") || customElements.define("px-a",
|
|
3494
|
-
class
|
|
306
|
+
j.nativeName = "a";
|
|
307
|
+
let W = j;
|
|
308
|
+
customElements.get("px-a") || customElements.define("px-a", W);
|
|
309
|
+
class qt extends HTMLElement {
|
|
3495
310
|
constructor() {
|
|
3496
311
|
super(), this.template = `<px-a font-weight="title" font-size="body-l" color="brand" variant="no-style">
|
|
3497
312
|
<slot></slot>
|
|
@@ -3502,135 +317,135 @@ class nr extends HTMLElement {
|
|
|
3502
317
|
});
|
|
3503
318
|
}
|
|
3504
319
|
}
|
|
3505
|
-
customElements.get("px-mdd-a") || customElements.define("px-mdd-a",
|
|
3506
|
-
const
|
|
320
|
+
customElements.get("px-mdd-a") || customElements.define("px-mdd-a", qt);
|
|
321
|
+
const jt = "#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:block;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)}}";
|
|
3507
322
|
function N(o) {
|
|
3508
323
|
var t = typeof o;
|
|
3509
324
|
return o != null && (t == "object" || t == "function");
|
|
3510
325
|
}
|
|
3511
|
-
var
|
|
3512
|
-
return
|
|
3513
|
-
},
|
|
3514
|
-
function
|
|
3515
|
-
for (var t = o.length; t-- &&
|
|
326
|
+
var Ot = typeof global == "object" && global && global.Object === Object && global, It = typeof self == "object" && self && self.Object === Object && self, nt = Ot || It || Function("return this")(), F = function() {
|
|
327
|
+
return nt.Date.now();
|
|
328
|
+
}, Pt = /\s/;
|
|
329
|
+
function Bt(o) {
|
|
330
|
+
for (var t = o.length; t-- && Pt.test(o.charAt(t)); )
|
|
3516
331
|
;
|
|
3517
332
|
return t;
|
|
3518
333
|
}
|
|
3519
|
-
var
|
|
3520
|
-
function
|
|
3521
|
-
return o && o.slice(0,
|
|
334
|
+
var Ht = /^\s+/;
|
|
335
|
+
function _t(o) {
|
|
336
|
+
return o && o.slice(0, Bt(o) + 1).replace(Ht, "");
|
|
3522
337
|
}
|
|
3523
|
-
var
|
|
3524
|
-
function
|
|
3525
|
-
var t =
|
|
338
|
+
var q = nt.Symbol, st = Object.prototype, Ft = st.hasOwnProperty, Wt = st.toString, S = q ? q.toStringTag : void 0;
|
|
339
|
+
function Dt(o) {
|
|
340
|
+
var t = Ft.call(o, S), e = o[S];
|
|
3526
341
|
try {
|
|
3527
|
-
o[
|
|
342
|
+
o[S] = void 0;
|
|
3528
343
|
var r = !0;
|
|
3529
344
|
} catch {
|
|
3530
345
|
}
|
|
3531
|
-
var
|
|
3532
|
-
return r && (t ? o[
|
|
346
|
+
var n = Wt.call(o);
|
|
347
|
+
return r && (t ? o[S] = e : delete o[S]), n;
|
|
3533
348
|
}
|
|
3534
|
-
var
|
|
3535
|
-
function
|
|
3536
|
-
return
|
|
349
|
+
var Ut = Object.prototype, Yt = Ut.toString;
|
|
350
|
+
function Zt(o) {
|
|
351
|
+
return Yt.call(o);
|
|
3537
352
|
}
|
|
3538
|
-
var
|
|
3539
|
-
function
|
|
3540
|
-
return o == null ? o === void 0 ?
|
|
353
|
+
var Xt = "[object Null]", Jt = "[object Undefined]", G = q ? q.toStringTag : void 0;
|
|
354
|
+
function Kt(o) {
|
|
355
|
+
return o == null ? o === void 0 ? Jt : Xt : G && G in Object(o) ? Dt(o) : Zt(o);
|
|
3541
356
|
}
|
|
3542
|
-
function
|
|
357
|
+
function Qt(o) {
|
|
3543
358
|
return o != null && typeof o == "object";
|
|
3544
359
|
}
|
|
3545
|
-
var
|
|
3546
|
-
function
|
|
3547
|
-
return typeof o == "symbol" ||
|
|
360
|
+
var Gt = "[object Symbol]";
|
|
361
|
+
function Vt(o) {
|
|
362
|
+
return typeof o == "symbol" || Qt(o) && Kt(o) == Gt;
|
|
3548
363
|
}
|
|
3549
|
-
var
|
|
3550
|
-
function
|
|
364
|
+
var V = NaN, te = /^[-+]0x[0-9a-f]+$/i, ee = /^0b[01]+$/i, oe = /^0o[0-7]+$/i, re = parseInt;
|
|
365
|
+
function tt(o) {
|
|
3551
366
|
if (typeof o == "number")
|
|
3552
367
|
return o;
|
|
3553
|
-
if (
|
|
3554
|
-
return
|
|
368
|
+
if (Vt(o))
|
|
369
|
+
return V;
|
|
3555
370
|
if (N(o)) {
|
|
3556
371
|
var t = typeof o.valueOf == "function" ? o.valueOf() : o;
|
|
3557
372
|
o = N(t) ? t + "" : t;
|
|
3558
373
|
}
|
|
3559
374
|
if (typeof o != "string")
|
|
3560
375
|
return o === 0 ? o : +o;
|
|
3561
|
-
o =
|
|
3562
|
-
var e =
|
|
3563
|
-
return e ||
|
|
376
|
+
o = _t(o);
|
|
377
|
+
var e = ee.test(o);
|
|
378
|
+
return e || oe.test(o) ? re(o.slice(2), e ? 2 : 8) : te.test(o) ? V : +o;
|
|
3564
379
|
}
|
|
3565
|
-
var
|
|
3566
|
-
function
|
|
3567
|
-
var r,
|
|
380
|
+
var ae = "Expected a function", ie = Math.max, ne = Math.min;
|
|
381
|
+
function se(o, t, e) {
|
|
382
|
+
var r, n, s, i, l, c, g = 0, w = !1, u = !1, P = !0;
|
|
3568
383
|
if (typeof o != "function")
|
|
3569
|
-
throw new TypeError(
|
|
3570
|
-
t =
|
|
3571
|
-
function
|
|
3572
|
-
var
|
|
3573
|
-
return r =
|
|
3574
|
-
}
|
|
3575
|
-
function
|
|
3576
|
-
return
|
|
3577
|
-
}
|
|
3578
|
-
function
|
|
3579
|
-
var
|
|
3580
|
-
return u ?
|
|
3581
|
-
}
|
|
3582
|
-
function
|
|
3583
|
-
var
|
|
3584
|
-
return
|
|
3585
|
-
}
|
|
3586
|
-
function
|
|
3587
|
-
var
|
|
3588
|
-
if (
|
|
3589
|
-
return
|
|
3590
|
-
|
|
3591
|
-
}
|
|
3592
|
-
function
|
|
3593
|
-
return
|
|
3594
|
-
}
|
|
3595
|
-
function
|
|
3596
|
-
|
|
3597
|
-
}
|
|
3598
|
-
function
|
|
3599
|
-
return
|
|
3600
|
-
}
|
|
3601
|
-
function
|
|
3602
|
-
var
|
|
3603
|
-
if (r = arguments,
|
|
3604
|
-
if (
|
|
3605
|
-
return
|
|
384
|
+
throw new TypeError(ae);
|
|
385
|
+
t = tt(t) || 0, N(e) && (w = !!e.leading, u = "maxWait" in e, s = u ? ie(tt(e.maxWait) || 0, t) : s, P = "trailing" in e ? !!e.trailing : P);
|
|
386
|
+
function B(p) {
|
|
387
|
+
var x = r, $ = n;
|
|
388
|
+
return r = n = void 0, g = p, i = o.apply($, x), i;
|
|
389
|
+
}
|
|
390
|
+
function gt(p) {
|
|
391
|
+
return g = p, l = setTimeout(T, t), w ? B(p) : i;
|
|
392
|
+
}
|
|
393
|
+
function vt(p) {
|
|
394
|
+
var x = p - c, $ = p - g, K = t - x;
|
|
395
|
+
return u ? ne(K, s - $) : K;
|
|
396
|
+
}
|
|
397
|
+
function X(p) {
|
|
398
|
+
var x = p - c, $ = p - g;
|
|
399
|
+
return c === void 0 || x >= t || x < 0 || u && $ >= s;
|
|
400
|
+
}
|
|
401
|
+
function T() {
|
|
402
|
+
var p = F();
|
|
403
|
+
if (X(p))
|
|
404
|
+
return J(p);
|
|
405
|
+
l = setTimeout(T, vt(p));
|
|
406
|
+
}
|
|
407
|
+
function J(p) {
|
|
408
|
+
return l = void 0, P && r ? B(p) : (r = n = void 0, i);
|
|
409
|
+
}
|
|
410
|
+
function ft() {
|
|
411
|
+
l !== void 0 && clearTimeout(l), g = 0, r = c = n = l = void 0;
|
|
412
|
+
}
|
|
413
|
+
function mt() {
|
|
414
|
+
return l === void 0 ? i : J(F());
|
|
415
|
+
}
|
|
416
|
+
function H() {
|
|
417
|
+
var p = F(), x = X(p);
|
|
418
|
+
if (r = arguments, n = this, c = p, x) {
|
|
419
|
+
if (l === void 0)
|
|
420
|
+
return gt(c);
|
|
3606
421
|
if (u)
|
|
3607
|
-
return clearTimeout(
|
|
422
|
+
return clearTimeout(l), l = setTimeout(T, t), B(c);
|
|
3608
423
|
}
|
|
3609
|
-
return
|
|
424
|
+
return l === void 0 && (l = setTimeout(T, t)), i;
|
|
3610
425
|
}
|
|
3611
|
-
return
|
|
426
|
+
return H.cancel = ft, H.flush = mt, H;
|
|
3612
427
|
}
|
|
3613
|
-
var
|
|
3614
|
-
function
|
|
3615
|
-
var r = !0,
|
|
428
|
+
var de = "Expected a function";
|
|
429
|
+
function le(o, t, e) {
|
|
430
|
+
var r = !0, n = !0;
|
|
3616
431
|
if (typeof o != "function")
|
|
3617
|
-
throw new TypeError(
|
|
3618
|
-
return N(e) && (r = "leading" in e ? !!e.leading : r,
|
|
432
|
+
throw new TypeError(de);
|
|
433
|
+
return N(e) && (r = "leading" in e ? !!e.leading : r, n = "trailing" in e ? !!e.trailing : n), se(o, t, {
|
|
3619
434
|
leading: r,
|
|
3620
435
|
maxWait: t,
|
|
3621
|
-
trailing:
|
|
436
|
+
trailing: n
|
|
3622
437
|
});
|
|
3623
438
|
}
|
|
3624
|
-
const
|
|
3625
|
-
|
|
3626
|
-
const
|
|
3627
|
-
var
|
|
3628
|
-
class
|
|
439
|
+
const dt = new CSSStyleSheet();
|
|
440
|
+
dt.replaceSync(jt);
|
|
441
|
+
const pe = "Menu";
|
|
442
|
+
var L, a, lt, D, U, pt, Y, v, C, E, f;
|
|
443
|
+
class ce extends Z {
|
|
3629
444
|
constructor() {
|
|
3630
445
|
var e;
|
|
3631
|
-
super(
|
|
3632
|
-
h(this,
|
|
3633
|
-
h(this,
|
|
446
|
+
super(dt);
|
|
447
|
+
h(this, a);
|
|
448
|
+
h(this, L);
|
|
3634
449
|
this.template = `
|
|
3635
450
|
<div>
|
|
3636
451
|
<header>
|
|
@@ -3670,36 +485,36 @@ class _r extends C {
|
|
|
3670
485
|
<div id="backdrop-filter"></div>
|
|
3671
486
|
<slot name="main"></slot>
|
|
3672
487
|
</div>
|
|
3673
|
-
`,
|
|
3674
|
-
window.innerWidth >= 768 && (
|
|
3675
|
-
}), this.shadowRoot.innerHTML = this.template, this.internals = (e = this.attachInternals) == null ? void 0 : e.call(this), this.
|
|
488
|
+
`, A(this, L, () => {
|
|
489
|
+
window.innerWidth >= 768 && (b(this, a, pt).call(this), b(this, a, lt).call(this));
|
|
490
|
+
}), 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");
|
|
3676
491
|
}
|
|
3677
492
|
connectedCallback() {
|
|
3678
493
|
this.addEventListener("click", (e) => {
|
|
3679
494
|
const r = e.target.closest(
|
|
3680
495
|
"px-header-item"
|
|
3681
496
|
);
|
|
3682
|
-
r && r.for && (e.target.checked === !1 ? (this.$backdropFilter.style.display = "block",
|
|
3683
|
-
|
|
3684
|
-
}), r.checked = !0,
|
|
497
|
+
r && r.for && (e.target.checked === !1 ? (this.$backdropFilter.style.display = "block", d(this, a, C).forEach((n) => {
|
|
498
|
+
n.checked = !1;
|
|
499
|
+
}), r.checked = !0, b(this, a, D).call(this, e.target.for)) : b(this, a, Y).call(this));
|
|
3685
500
|
}), this.addEventListener("section-item-click", (e) => {
|
|
3686
|
-
this.$backdropFilter.style.display = "block",
|
|
501
|
+
this.$backdropFilter.style.display = "block", d(this, a, C).forEach((r) => {
|
|
3687
502
|
r.checked = !1;
|
|
3688
503
|
}), this.querySelector(
|
|
3689
504
|
`px-header-item[for="${e.detail.for}"]`
|
|
3690
|
-
).checked = !0,
|
|
505
|
+
).checked = !0, b(this, a, D).call(this, e.detail.for);
|
|
3691
506
|
}), this.addEventListener("back-to-mobile-menu", () => {
|
|
3692
|
-
this.$backdropFilter.style.display = "block",
|
|
507
|
+
this.$backdropFilter.style.display = "block", d(this, a, C).forEach((e) => {
|
|
3693
508
|
e.checked = !1;
|
|
3694
|
-
}),
|
|
509
|
+
}), b(this, a, U).call(this);
|
|
3695
510
|
}), this.shadowRoot.addEventListener("click", (e) => {
|
|
3696
|
-
e.target.closest("px-button-icon") && (this.$burgerMenu.setAttribute("aria-expanded", "true"),
|
|
511
|
+
e.target.closest("px-button-icon") && (this.$burgerMenu.setAttribute("aria-expanded", "true"), b(this, a, U).call(this));
|
|
3697
512
|
}), this.addEventListener("close-panel", () => {
|
|
3698
|
-
|
|
513
|
+
b(this, a, Y).call(this), this.$burgerMenu.setAttribute("aria-expanded", "false");
|
|
3699
514
|
}), this.addEventListener(
|
|
3700
515
|
"close-panel-from-dialog",
|
|
3701
516
|
(e) => {
|
|
3702
|
-
this.dispatchEvent(new CustomEvent("close-panel")), e.detail.clientY <
|
|
517
|
+
this.dispatchEvent(new CustomEvent("close-panel")), e.detail.clientY < d(this, a, E).getBoundingClientRect().bottom && requestAnimationFrame(() => {
|
|
3703
518
|
var r;
|
|
3704
519
|
(r = document.elementFromPoint(
|
|
3705
520
|
e.detail.clientX,
|
|
@@ -3707,7 +522,7 @@ class _r extends C {
|
|
|
3707
522
|
)) == null || r.click();
|
|
3708
523
|
});
|
|
3709
524
|
}
|
|
3710
|
-
), !this.$targetGroupDropdown && !this.$userLanguageDropdown && (this.$dropDownZoneDesktop.style.display = "none"), this.primaryNavigationAriaLabel || this.setAttribute("primary-navigation-aria-label",
|
|
525
|
+
), !this.$targetGroupDropdown && !this.$userLanguageDropdown && (this.$dropDownZoneDesktop.style.display = "none"), this.primaryNavigationAriaLabel || this.setAttribute("primary-navigation-aria-label", pe), window.addEventListener("resize", le(d(this, L), 200));
|
|
3711
526
|
}
|
|
3712
527
|
static get observedAttributes() {
|
|
3713
528
|
return [
|
|
@@ -3717,23 +532,23 @@ class _r extends C {
|
|
|
3717
532
|
"back-to-menu-label"
|
|
3718
533
|
];
|
|
3719
534
|
}
|
|
3720
|
-
attributeChangedCallback(e, r,
|
|
3721
|
-
if (r !==
|
|
535
|
+
attributeChangedCallback(e, r, n) {
|
|
536
|
+
if (r !== n)
|
|
3722
537
|
switch (e) {
|
|
3723
538
|
case "close-button-aria-label":
|
|
3724
|
-
|
|
3725
|
-
|
|
539
|
+
d(this, a, f).forEach((s) => {
|
|
540
|
+
s.setAttribute("close-button-aria-label", n);
|
|
3726
541
|
});
|
|
3727
542
|
break;
|
|
3728
543
|
case "burger-menu-aria-label":
|
|
3729
|
-
this.$burgerMenu.setAttribute("aria-label",
|
|
544
|
+
this.$burgerMenu.setAttribute("aria-label", n);
|
|
3730
545
|
break;
|
|
3731
546
|
case "primary-navigation-aria-label":
|
|
3732
|
-
this.$primaryNavigation.setAttribute("aria-label",
|
|
547
|
+
this.$primaryNavigation.setAttribute("aria-label", n);
|
|
3733
548
|
break;
|
|
3734
549
|
case "back-to-menu-label":
|
|
3735
|
-
|
|
3736
|
-
|
|
550
|
+
d(this, a, f).forEach((s) => {
|
|
551
|
+
s.setAttribute("back-to-menu-label", n);
|
|
3737
552
|
});
|
|
3738
553
|
break;
|
|
3739
554
|
}
|
|
@@ -3784,73 +599,73 @@ class _r extends C {
|
|
|
3784
599
|
e ? this.setAttribute("primary-navigation-aria-label", e) : this.removeAttribute("primary-navigation-aria-label");
|
|
3785
600
|
}
|
|
3786
601
|
}
|
|
3787
|
-
|
|
3788
|
-
const e = this.querySelectorAll("px-mdd"), r =
|
|
3789
|
-
e.forEach((
|
|
3790
|
-
|
|
602
|
+
L = new WeakMap(), a = new WeakSet(), lt = function() {
|
|
603
|
+
const e = this.querySelectorAll("px-mdd"), r = d(this, a, E).getBoundingClientRect().bottom;
|
|
604
|
+
e.forEach((n) => {
|
|
605
|
+
n.dialogOffsetTop = `${r}px`;
|
|
3791
606
|
});
|
|
3792
|
-
},
|
|
3793
|
-
|
|
3794
|
-
r.name === e && r.hidden && (r.dialogOffsetTop = `${
|
|
607
|
+
}, D = function(e) {
|
|
608
|
+
d(this, a, v).$megaDropDown.hidden = !0, d(this, a, f).forEach((r) => {
|
|
609
|
+
r.name === e && r.hidden && (r.dialogOffsetTop = `${d(this, a, E).getBoundingClientRect().bottom}px`, r.hidden = !r.hidden, this.querySelector(`px-header-item[for="${e}"]`).checked = !r.hidden, document.body.style.overflow = r.hidden ? "auto" : "hidden"), r.name !== e && !r.hidden && (r.hidden = !0);
|
|
3795
610
|
});
|
|
3796
|
-
},
|
|
3797
|
-
this.$backdropFilter.style.display = "none",
|
|
611
|
+
}, U = function() {
|
|
612
|
+
this.$backdropFilter.style.display = "none", d(this, a, f).forEach((e) => {
|
|
3798
613
|
e.hidden || (e.hidden = !0);
|
|
3799
|
-
}),
|
|
3800
|
-
},
|
|
3801
|
-
|
|
3802
|
-
},
|
|
3803
|
-
this.$backdropFilter.style.display = "none",
|
|
614
|
+
}), d(this, a, v).$megaDropDown.dialogOffsetTop = `${d(this, a, E).getBoundingClientRect().bottom}px`, d(this, a, v).$megaDropDown.hidden = !1, document.body.style.overflow = "hidden";
|
|
615
|
+
}, pt = function() {
|
|
616
|
+
d(this, a, v) && (d(this, a, v).$megaDropDown.hidden = !0, this.$burgerMenu.setAttribute("aria-expanded", "false"), document.body.style.overflow = "auto", this.$backdropFilter.style.display = "none");
|
|
617
|
+
}, Y = function() {
|
|
618
|
+
this.$backdropFilter.style.display = "none", d(this, a, v).$megaDropDown.hidden = !0, d(this, a, C).forEach((e) => {
|
|
3804
619
|
e.checked = !1;
|
|
3805
|
-
}),
|
|
620
|
+
}), d(this, a, f).forEach((e) => {
|
|
3806
621
|
e.hidden = !0;
|
|
3807
622
|
}), document.body.style.overflow = "auto";
|
|
3808
|
-
},
|
|
623
|
+
}, v = function() {
|
|
3809
624
|
return this.querySelector("px-header-mobile-menu");
|
|
3810
|
-
},
|
|
625
|
+
}, C = function() {
|
|
3811
626
|
return this.querySelectorAll("px-header-item");
|
|
3812
|
-
},
|
|
627
|
+
}, E = function() {
|
|
3813
628
|
return this.shadowRoot.querySelector("header");
|
|
3814
|
-
},
|
|
629
|
+
}, f = function() {
|
|
3815
630
|
return this.querySelectorAll("px-mdd");
|
|
3816
631
|
};
|
|
3817
|
-
customElements.get("px-header") || customElements.define("px-header",
|
|
3818
|
-
const
|
|
632
|
+
customElements.get("px-header") || customElements.define("px-header", ce);
|
|
633
|
+
const be = ':host{position:relative}::slotted([slot="popover"]){position:absolute;border-radius:var(--px-radius-main, 8px);background:var(--px-color-background-container-light-default, #fff);box-shadow:0 20px 25px -5px #25252514;margin:0;padding:var(--px-padding-xs-mobile) 0;border:0;right:0;width:auto}:host([grow]) ::slotted([slot="trigger"]):after{right:0;padding-right:var(--px-padding-xs-mobile)}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="bottom-right"]) ::slotted([slot="popover"]){left:auto}@media screen and (max-width: 767px){::slotted([slot="trigger"]){display:block;width:100%}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}}@media screen and (min-width: 768px){::slotted([slot="popover"]){padding-block:var(--px-padding-s-desktop);right:auto;width:auto}}', he = [
|
|
3819
634
|
"top-left",
|
|
3820
635
|
"top-right",
|
|
3821
636
|
"bottom-left",
|
|
3822
637
|
"bottom-right"
|
|
3823
638
|
];
|
|
3824
|
-
function
|
|
3825
|
-
"anchorName" in document.documentElement.style &&
|
|
3826
|
-
var
|
|
639
|
+
function et(o, t, e = "bottom-left", r, n = !1) {
|
|
640
|
+
"anchorName" in document.documentElement.style && n === !1 || t.addEventListener("toggle", () => {
|
|
641
|
+
var w, u;
|
|
3827
642
|
if (!o || !t)
|
|
3828
643
|
return;
|
|
3829
|
-
const
|
|
644
|
+
const s = o.getBoundingClientRect(), i = ((w = window.visualViewport) == null ? void 0 : w.height) ?? window.innerHeight, l = ((u = window.visualViewport) == null ? void 0 : u.width) ?? window.innerWidth, c = r.getPropertyValue("--px-padding-s-mobile") || "16px", g = parseInt(
|
|
3830
645
|
(r.getPropertyValue("--px-icon-size-xs-desktop") || "24").replace("px", "")
|
|
3831
646
|
);
|
|
3832
|
-
["top-left", "top-right"].includes(e) ? (t.style.bottom = `calc( ${
|
|
647
|
+
["top-left", "top-right"].includes(e) ? (t.style.bottom = `calc( ${c} + ${i - 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`);
|
|
3833
648
|
});
|
|
3834
649
|
}
|
|
3835
|
-
const
|
|
3836
|
-
|
|
3837
|
-
const
|
|
3838
|
-
var
|
|
3839
|
-
class
|
|
650
|
+
const ct = new CSSStyleSheet();
|
|
651
|
+
ct.replaceSync(be);
|
|
652
|
+
const M = "bottom-left";
|
|
653
|
+
var z, bt, m, k, y, ht;
|
|
654
|
+
class ue extends Z {
|
|
3840
655
|
constructor() {
|
|
3841
|
-
super(
|
|
3842
|
-
h(this, L);
|
|
3843
|
-
h(this, S);
|
|
656
|
+
super(ct);
|
|
3844
657
|
h(this, z);
|
|
3845
|
-
h(this,
|
|
658
|
+
h(this, m);
|
|
659
|
+
h(this, k);
|
|
660
|
+
h(this, y);
|
|
3846
661
|
this.template = () => `
|
|
3847
662
|
<style>${this.css}</style>
|
|
3848
663
|
<slot name="trigger"></slot>
|
|
3849
|
-
<slot name="popover"></slot>`, this.isAboutToClose = !1,
|
|
664
|
+
<slot name="popover"></slot>`, this.isAboutToClose = !1, A(this, m, () => {
|
|
3850
665
|
this.isAboutToClose || (this.$popoverElement.togglePopover({ source: this.$trigger }), this.$trigger.ariaExpanded = "true");
|
|
3851
|
-
}),
|
|
666
|
+
}), A(this, k, () => {
|
|
3852
667
|
this.$popoverElement.matches(":popover-open") && (this.isAboutToClose = !0, this.$trigger.ariaExpanded = "false");
|
|
3853
|
-
}),
|
|
668
|
+
}), A(this, y, () => {
|
|
3854
669
|
this.$popoverElement.matches(":popover-open") || setTimeout(() => {
|
|
3855
670
|
this.isAboutToClose = !1;
|
|
3856
671
|
});
|
|
@@ -3906,7 +721,7 @@ class jr extends C {
|
|
|
3906
721
|
this.getAttribute("id") || this.setAttribute(
|
|
3907
722
|
"id",
|
|
3908
723
|
`px-dropdown-${Math.random().toString(36).substring(2, 15)}`
|
|
3909
|
-
), this.getAttribute("anchoralignment") || this.setAttribute("anchoralignment",
|
|
724
|
+
), this.getAttribute("anchoralignment") || this.setAttribute("anchoralignment", M), et(
|
|
3910
725
|
this.$trigger,
|
|
3911
726
|
this.$popoverElement,
|
|
3912
727
|
this.anchorAlignment,
|
|
@@ -3914,14 +729,14 @@ class jr extends C {
|
|
|
3914
729
|
this.usePolyfill
|
|
3915
730
|
);
|
|
3916
731
|
}
|
|
3917
|
-
attributeChangedCallback(e, r,
|
|
3918
|
-
if (r !==
|
|
732
|
+
attributeChangedCallback(e, r, n) {
|
|
733
|
+
if (r !== n)
|
|
3919
734
|
switch (e) {
|
|
3920
735
|
case "id":
|
|
3921
736
|
this.initPopover();
|
|
3922
737
|
break;
|
|
3923
738
|
case "use-polyfill":
|
|
3924
|
-
|
|
739
|
+
et(
|
|
3925
740
|
this.$trigger,
|
|
3926
741
|
this.$popoverElement,
|
|
3927
742
|
this.anchorAlignment,
|
|
@@ -3930,12 +745,12 @@ class jr extends C {
|
|
|
3930
745
|
);
|
|
3931
746
|
break;
|
|
3932
747
|
default:
|
|
3933
|
-
super.attributeChangedCallback(e, r,
|
|
748
|
+
super.attributeChangedCallback(e, r, n);
|
|
3934
749
|
break;
|
|
3935
750
|
}
|
|
3936
751
|
}
|
|
3937
752
|
initPopover() {
|
|
3938
|
-
this.$trigger && (this.$trigger.setAttribute("popovertarget", this.popoverId), this.$trigger.setAttribute("aria-controls", this.popoverId), this.$trigger.setAttribute("aria-expanded", "false"), this.$popoverElement.setAttribute("id", this.popoverId), this.$popoverElement.setAttribute("popover", ""), this.$style.innerHTML = this.css,
|
|
753
|
+
this.$trigger && (this.$trigger.setAttribute("popovertarget", this.popoverId), this.$trigger.setAttribute("aria-controls", this.popoverId), this.$trigger.setAttribute("aria-expanded", "false"), this.$popoverElement.setAttribute("id", this.popoverId), this.$popoverElement.setAttribute("popover", ""), this.$style.innerHTML = this.css, b(this, z, bt).call(this), b(this, z, ht).call(this));
|
|
3939
754
|
}
|
|
3940
755
|
get popoverId() {
|
|
3941
756
|
return `${this.getAttribute("id")}-popover`;
|
|
@@ -3953,12 +768,12 @@ class jr extends C {
|
|
|
3953
768
|
return this.querySelector('[slot="popover"]');
|
|
3954
769
|
}
|
|
3955
770
|
get anchorAlignment() {
|
|
3956
|
-
return this.getAttribute("anchoralignment") ||
|
|
771
|
+
return this.getAttribute("anchoralignment") || M;
|
|
3957
772
|
}
|
|
3958
773
|
set anchorAlignment(e) {
|
|
3959
|
-
|
|
3960
|
-
`Invalid anchor alignment value: ${e}. Using default ${
|
|
3961
|
-
), this.setAttribute("anchoralignment",
|
|
774
|
+
he.includes(e) ? this.setAttribute("anchoralignment", e) : (R(
|
|
775
|
+
`Invalid anchor alignment value: ${e}. Using default ${M}.`
|
|
776
|
+
), this.setAttribute("anchoralignment", M));
|
|
3962
777
|
}
|
|
3963
778
|
get usePolyfill() {
|
|
3964
779
|
return this.hasAttribute("use-polyfill");
|
|
@@ -3967,36 +782,36 @@ class jr extends C {
|
|
|
3967
782
|
e ? this.setAttribute("use-polyfill", "") : this.removeAttribute("use-polyfill");
|
|
3968
783
|
}
|
|
3969
784
|
}
|
|
3970
|
-
|
|
3971
|
-
this.isAboutToClose = !1, this.$trigger.removeEventListener("click",
|
|
785
|
+
z = new WeakSet(), bt = function() {
|
|
786
|
+
this.isAboutToClose = !1, this.$trigger.removeEventListener("click", d(this, m)), this.$popoverElement.removeEventListener(
|
|
3972
787
|
"beforetoggle",
|
|
3973
|
-
|
|
3974
|
-
), this.$popoverElement.removeEventListener("toggle",
|
|
3975
|
-
},
|
|
788
|
+
d(this, k)
|
|
789
|
+
), this.$popoverElement.removeEventListener("toggle", d(this, y));
|
|
790
|
+
}, m = new WeakMap(), k = new WeakMap(), y = new WeakMap(), /**
|
|
3976
791
|
* Handles the manual display of the popover when the trigger is clicked.
|
|
3977
792
|
* This is necessary for cases where the trigger is not a button or input element.
|
|
3978
793
|
* This method adds event listeners to the trigger element to toggle the popover.
|
|
3979
794
|
* It also manages the state of whether the popover is about to close or not to avoid
|
|
3980
795
|
* race conditions when the popover is toggled and the trigger click event is fired.
|
|
3981
796
|
*/
|
|
3982
|
-
|
|
3983
|
-
this.$trigger && !["button", "input"].includes(this.$trigger.localName) && (this.$trigger.addEventListener("click",
|
|
797
|
+
ht = function() {
|
|
798
|
+
this.$trigger && !["button", "input"].includes(this.$trigger.localName) && (this.$trigger.addEventListener("click", d(this, m)), this.$popoverElement.addEventListener("beforetoggle", d(this, k)), this.$popoverElement.addEventListener("toggle", d(this, y)));
|
|
3984
799
|
};
|
|
3985
|
-
customElements.get("px-dropdown") || customElements.define("px-dropdown",
|
|
3986
|
-
const
|
|
3987
|
-
|
|
800
|
+
customElements.get("px-dropdown") || customElements.define("px-dropdown", ue);
|
|
801
|
+
const ut = new CSSStyleSheet();
|
|
802
|
+
ut.replaceSync(`
|
|
3988
803
|
@media screen and (min-width: 48em) {
|
|
3989
804
|
:host {
|
|
3990
805
|
display: none;
|
|
3991
806
|
}
|
|
3992
807
|
}
|
|
3993
808
|
`);
|
|
3994
|
-
var
|
|
3995
|
-
class
|
|
809
|
+
var O, I, xt;
|
|
810
|
+
class xe extends HTMLElement {
|
|
3996
811
|
constructor() {
|
|
3997
812
|
super();
|
|
3998
|
-
h(this,
|
|
3999
|
-
h(this,
|
|
813
|
+
h(this, I);
|
|
814
|
+
h(this, O, `<px-mdd
|
|
4000
815
|
name="__lavender_mobile_menu"
|
|
4001
816
|
hidden--tablet
|
|
4002
817
|
hidden--laptop
|
|
@@ -4005,7 +820,7 @@ class Fr extends HTMLElement {
|
|
|
4005
820
|
<span slot="title"><slot name="title"></slot></span>
|
|
4006
821
|
<px-mdd-section title-hidden></px-mdd-section>
|
|
4007
822
|
</px-mdd>`);
|
|
4008
|
-
this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML =
|
|
823
|
+
this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = d(this, O), this.shadowRoot.adoptedStyleSheets = [ut];
|
|
4009
824
|
}
|
|
4010
825
|
connectedCallback() {
|
|
4011
826
|
this.setAttribute("slot", "header-panels");
|
|
@@ -4014,39 +829,39 @@ class Fr extends HTMLElement {
|
|
|
4014
829
|
throw new Error(
|
|
4015
830
|
"<px-header-mobile-menu> must be used within a <px-header>."
|
|
4016
831
|
);
|
|
4017
|
-
const r = e.querySelectorAll("px-header-item"),
|
|
4018
|
-
|
|
4019
|
-
${[...r].map((
|
|
4020
|
-
const
|
|
4021
|
-
return
|
|
832
|
+
const r = e.querySelectorAll("px-header-item"), n = e.querySelectorAll("px-action-link"), s = this.shadowRoot.querySelector("px-mdd-section");
|
|
833
|
+
s.innerHTML = `
|
|
834
|
+
${[...r].map((i) => {
|
|
835
|
+
const l = i.getAttribute("for"), c = i.getAttribute("href");
|
|
836
|
+
return l ? `<px-mdd-section-item for="${l}">${i.innerText}</px-mdd-section-item>` : c ? `<px-mdd-section-item href="${c}">${i.innerText}</px-mdd-section-item>` : "";
|
|
4022
837
|
}).join("")}
|
|
4023
|
-
${[...
|
|
4024
|
-
(
|
|
4025
|
-
).join("")}`,
|
|
4026
|
-
|
|
838
|
+
${[...n].filter((i) => !i.hasAttribute("promoted")).map(
|
|
839
|
+
(i) => `<px-mdd-a href="${i.getAttribute("href")}" slot="footer">${i.innerText}</px-mdd-a>`
|
|
840
|
+
).join("")}`, b(this, I, xt).call(this).forEach((i) => {
|
|
841
|
+
i && this.$megaDropDown.appendChild(i);
|
|
4027
842
|
});
|
|
4028
843
|
}
|
|
4029
844
|
get $megaDropDown() {
|
|
4030
845
|
return this.shadowRoot.querySelector("px-mdd");
|
|
4031
846
|
}
|
|
4032
847
|
}
|
|
4033
|
-
|
|
848
|
+
O = new WeakMap(), I = new WeakSet(), xt = function() {
|
|
4034
849
|
const e = this.closest("px-header"), r = e.querySelector(
|
|
4035
850
|
'px-dropdown[slot="target-group"]'
|
|
4036
|
-
),
|
|
851
|
+
), n = e.querySelector(
|
|
4037
852
|
'px-dropdown[slot="user-language"]'
|
|
4038
|
-
),
|
|
853
|
+
), s = r == null ? void 0 : r.cloneNode(
|
|
4039
854
|
!0
|
|
4040
855
|
);
|
|
4041
|
-
|
|
4042
|
-
const
|
|
856
|
+
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");
|
|
857
|
+
const i = n == null ? void 0 : n.cloneNode(
|
|
4043
858
|
!0
|
|
4044
859
|
);
|
|
4045
|
-
return
|
|
860
|
+
return i == null || i.removeAttribute("id"), i == null || i.setAttribute("slot", "mdd-footer"), i == null || i.setAttribute("grow", "1"), i == null || i.setAttribute("anchoralignment", "top-right"), [s, i];
|
|
4046
861
|
};
|
|
4047
|
-
customElements.get("px-header-mobile-menu") || customElements.define("px-header-mobile-menu",
|
|
862
|
+
customElements.get("px-header-mobile-menu") || customElements.define("px-header-mobile-menu", xe);
|
|
4048
863
|
export {
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
864
|
+
ce as Header,
|
|
865
|
+
Ct as HeaderItem,
|
|
866
|
+
xe as HeaderMobileMenu
|
|
4052
867
|
};
|