@proximus/lavender-selectablebox 2.0.0-alpha.17 → 2.0.0-alpha.173

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,426 +1,416 @@
1
- import { WithExtraAttributes as n, AttributeBreakpointHandlerDelegate as v, gapValues as m, checkName as k, log as h, backgroundColorValues as y } from "@proximus/lavender-common";
2
- const A = ':host{display:block}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);overflow-x:var(--overflow-x-all)}@media only screen and (max-width: 47.9375em){.flex-container{overflow-x:var(--overflow-x-all-mobile, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 48em){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media only screen and (min-width: 48em) and (max-width: 64em){.flex-container{overflow-x:var(--overflow-x-all-tablet, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 64.0625em){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.flex-container{overflow-x:var(--overflow-x-all-laptop, var(--overflow-x-all))}}@media only screen and (min-width: 90.0625em){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-x:var(--overflow-x-all-desktop, var(--overflow-x-all))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}', b = new CSSStyleSheet();
3
- b.replaceSync(A);
4
- const w = [
5
- "",
6
- "default",
7
- "row",
8
- "row-reverse",
9
- "column",
10
- "column-reverse"
11
- ], C = [
12
- "",
13
- "default",
14
- "stretch",
15
- "flex-start",
16
- "flex-end",
17
- "center",
18
- "baseline"
19
- ], $ = [
20
- "",
21
- "default",
22
- "flex-start",
23
- "flex-end",
24
- "center",
25
- "space-between",
26
- "space-around",
27
- "space-evenly"
28
- ], S = ["", "default", "nowrap", "wrap", "wrap-reverse"], _ = ["", "visible", "hidden", "scroll", "auto"];
29
- class c extends n {
30
- constructor() {
31
- super(b), this.overflowXAttributeDelegate = new v(
32
- this,
33
- "overflow-x",
34
- (t) => t,
35
- "--overflow-x"
36
- ), this.template = `<div class="flex-container">
37
- <slot></slot>
38
- </div>`, this.shadowRoot.innerHTML = this.template;
39
- }
40
- connectedCallback() {
41
- this.hasAttribute("direction") || (this.direction = "row"), this.hasAttribute("gap") || (this.gap = "none"), this.hasAttribute("align-items") || (this.alignItems = "stretch"), this.hasAttribute("justify-content") || (this.justifyContent = "flex-start"), this.hasAttribute("wrap") || (this.wrap = "nowrap"), this.hasAttribute("overflow-x") || this.overflowXAttributeDelegate.init("visible");
42
- }
43
- static get observedAttributes() {
44
- return [
45
- ...super.observedAttributes,
46
- "direction",
47
- "direction--mobile",
48
- "direction--tablet",
49
- "direction--laptop",
50
- "direction--desktop",
51
- "gap",
52
- "gap--mobile",
53
- "gap--tablet",
54
- "gap--laptop",
55
- "gap--desktop",
56
- "justify-content",
57
- "justify-content--mobile",
58
- "justify-content--tablet",
59
- "justify-content--laptop",
60
- "justify-content--desktop",
61
- "align-items",
62
- "align-items--mobile",
63
- "align-items--tablet",
64
- "align-items--laptop",
65
- "align-items--desktop",
66
- "wrap",
67
- "wrap--mobile",
68
- "wrap--tablet",
69
- "wrap--laptop",
70
- "wrap--desktop",
71
- "overflow-x",
72
- "overflow-x--mobile",
73
- "overflow-x--tablet",
74
- "overflow-x--laptop",
75
- "overflow-x--desktop"
76
- ];
77
- }
78
- attributeChangedCallback(t, e, i) {
79
- switch (t) {
80
- case "gap":
81
- case "gap--mobile":
82
- case "gap--tablet":
83
- case "gap--laptop":
84
- case "gap--desktop":
85
- this.updateFlexProperties(t, e, i, m);
86
- break;
87
- case "justify-content":
88
- case "justify-content--mobile":
89
- case "justify-content--tablet":
90
- case "justify-content--laptop":
91
- case "justify-content--desktop":
92
- this.updateFlexProperties(
93
- t,
94
- e,
95
- i,
96
- $
97
- );
98
- break;
99
- case "align-items":
100
- case "align-items--mobile":
101
- case "align-items--tablet":
102
- case "align-items--laptop":
103
- case "align-items--desktop":
104
- this.updateFlexProperties(t, e, i, C);
105
- break;
106
- case "wrap":
107
- case "wrap--mobile":
108
- case "wrap--tablet":
109
- case "wrap--laptop":
110
- case "wrap--desktop":
111
- this.updateFlexProperties(t, e, i, S);
112
- break;
113
- case "direction":
114
- case "direction--mobile":
115
- case "direction--tablet":
116
- case "direction--laptop":
117
- case "direction--desktop":
118
- this.updateFlexProperties(t, e, i, w);
119
- break;
120
- case "overflow-x":
121
- case "overflow-x--mobile":
122
- case "overflow-x--tablet":
123
- case "overflow-x--laptop":
124
- case "overflow-x--desktop":
125
- this.updateOverflowX(t, e, i, _);
126
- break;
127
- default:
128
- super.attributeChangedCallback(t, e, i);
129
- break;
130
- }
131
- }
132
- updateOverflowX(t, e, i, o) {
133
- if (!k(o, i)) {
134
- h(
135
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
136
- );
137
- return;
138
- }
139
- this.overflowXAttributeDelegate.attributeChangedCallback(
140
- t,
141
- e,
142
- i
143
- );
144
- }
145
- updateFlexProperties(t, e, i, o) {
146
- this.checkName(o, i) || h(
147
- `${i} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
148
- );
149
- const d = t.indexOf("--") > -1, s = d ? t.split("--")[0] : t, a = [];
150
- if (!d)
151
- this.getAttribute(s + "--mobile") || a.push("mobile"), this.getAttribute(s + "--tablet") || a.push("tablet"), this.getAttribute(s + "--laptop") || a.push("laptop"), this.getAttribute(s + "--desktop") || a.push("desktop"), a.forEach((l) => {
152
- this.updateStyle(s, l, e, o), this.updateStyle(s, l, i, o);
153
- });
154
- else {
155
- const l = t.split("--")[1];
156
- this.updateStyle(s, l, e, o), this.updateStyle(s, l, i, o);
157
- }
158
- }
159
- updateStyle(t, e, i, o) {
160
- i && (t === "gap" && o && o.includes(i) ? this.$el.style.setProperty(
161
- `--flex-${t}--${e}-value`,
162
- `var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
163
- ) : this.$el.style.setProperty(
164
- `--flex-${t}--${e}-value`,
165
- i
166
- ));
167
- }
168
- get direction() {
169
- return this.getAttribute("direction");
170
- }
171
- set direction(t) {
172
- this.setAttribute("direction", t);
173
- }
174
- get directionMobile() {
175
- return this.getAttribute("direction--mobile");
176
- }
177
- set directionMobile(t) {
178
- this.setAttribute("direction--mobile", t);
179
- }
180
- get directionTablet() {
181
- return this.getAttribute("direction--tablet");
182
- }
183
- set directionTablet(t) {
184
- this.setAttribute("direction--tablet", t);
185
- }
186
- get directionLaptop() {
187
- return this.getAttribute("direction--laptop");
188
- }
189
- set directionLaptop(t) {
190
- this.setAttribute("direction--laptop", t);
191
- }
192
- get directionDesktop() {
193
- return this.getAttribute("direction--desktop");
194
- }
195
- set directionDesktop(t) {
196
- this.setAttribute("direction--desktop", t);
197
- }
198
- get gap() {
199
- return this.getAttribute("gap");
200
- }
201
- set gap(t) {
202
- this.setAttribute("gap", t);
203
- }
204
- get gapMobile() {
205
- return this.getAttribute("gap--mobile");
206
- }
207
- set gapMobile(t) {
208
- this.setAttribute("gap--mobile", t);
209
- }
210
- get gapTablet() {
211
- return this.getAttribute("gap--tablet");
212
- }
213
- set gapTablet(t) {
214
- this.setAttribute("gap--tablet", t);
215
- }
216
- get gapLaptop() {
217
- return this.getAttribute("gap--laptop");
218
- }
219
- set gapLaptop(t) {
220
- this.setAttribute("gap--laptop", t);
221
- }
222
- get gapDesktop() {
223
- return this.getAttribute("gap--desktop");
224
- }
225
- set gapDesktop(t) {
226
- this.setAttribute("gap--desktop", t);
227
- }
228
- get justifyContent() {
229
- return this.getAttribute("justify-content");
230
- }
231
- set justifyContent(t) {
232
- this.setAttribute("justify-content", t);
233
- }
234
- get justifyContentMobile() {
235
- return this.getAttribute("justify-content--mobile");
236
- }
237
- set justifyContentMobile(t) {
238
- this.setAttribute("justify-content--mobile", t);
239
- }
240
- get justifyContentTablet() {
241
- return this.getAttribute("justify-content--tablet");
242
- }
243
- set justifyContentTablet(t) {
244
- this.setAttribute("justify-content--tablet", t);
245
- }
246
- get justifyContentLaptop() {
247
- return this.getAttribute("justify-content--laptop");
248
- }
249
- set justifyContentLaptop(t) {
250
- this.setAttribute("justify-content--laptop", t);
251
- }
252
- get justifyContentDesktop() {
253
- return this.getAttribute("justify-content--desktop");
254
- }
255
- set justifyContentDesktop(t) {
256
- this.setAttribute("justify-content--desktop", t);
257
- }
258
- get alignItems() {
259
- return this.getAttribute("align-items");
260
- }
261
- set alignItems(t) {
262
- this.setAttribute("align-items", t);
263
- }
264
- get alignItemsMobile() {
265
- return this.getAttribute("align-items--mobile");
266
- }
267
- set alignItemsMobile(t) {
268
- this.setAttribute("align-items--mobile", t);
269
- }
270
- get alignItemsTablet() {
271
- return this.getAttribute("align-items--tablet");
272
- }
273
- set alignItemsTablet(t) {
274
- this.setAttribute("align-items--tablet", t);
275
- }
276
- get alignItemsLaptop() {
277
- return this.getAttribute("align-items--laptop");
278
- }
279
- set alignItemsLaptop(t) {
280
- this.setAttribute("align-items--laptop", t);
281
- }
282
- get alignItemsDesktop() {
283
- return this.getAttribute("align-items--desktop");
284
- }
285
- set alignItemsDesktop(t) {
286
- this.setAttribute("align-items--desktop", t);
287
- }
288
- get wrap() {
289
- return this.getAttribute("wrap");
290
- }
291
- set wrap(t) {
292
- this.setAttribute("wrap", t);
293
- }
294
- get wrapMobile() {
295
- return this.getAttribute("wrap--mobile");
296
- }
297
- set wrapMobile(t) {
298
- this.setAttribute("wrap--mobile", t);
299
- }
300
- get wrapTablet() {
301
- return this.getAttribute("wrap--tablet");
302
- }
303
- set wrapTablet(t) {
304
- this.setAttribute("wrap--tablet", t);
305
- }
306
- get wrapLaptop() {
307
- return this.getAttribute("wrap--laptop");
308
- }
309
- set wrapLaptop(t) {
310
- this.setAttribute("wrap--laptop", t);
311
- }
312
- get wrapDesktop() {
313
- return this.getAttribute("wrap--desktop");
314
- }
315
- set wrapDesktop(t) {
316
- this.setAttribute("wrap--desktop", t);
317
- }
318
- get overflowX() {
319
- return this.getAttribute("overflow-x");
320
- }
321
- set overflowX(t) {
322
- this.setAttribute("overflow-x", t);
323
- }
324
- get overflowXMobile() {
325
- return this.getAttribute("overflow-x--mobile");
326
- }
327
- set overflowXMobile(t) {
328
- this.setAttribute("overflow-x--mobile", t);
329
- }
330
- get overflowXTablet() {
331
- return this.getAttribute("overflow-x--tablet");
332
- }
333
- set overflowXTablet(t) {
334
- this.setAttribute("overflow-x--tablet", t);
335
- }
336
- get overflowXLaptop() {
337
- return this.getAttribute("overflow-x--laptop");
338
- }
339
- set overflowXLaptop(t) {
340
- this.setAttribute("overflow-x--laptop", t);
341
- }
342
- get overflowXDesktop() {
343
- return this.getAttribute("overflow-x--desktop");
344
- }
345
- set overflowXDesktop(t) {
346
- this.setAttribute("overflow-x--desktop", t);
347
- }
348
- get $el() {
349
- return this.shadowRoot.querySelector(".flex-container");
350
- }
351
- }
352
- customElements.get("px-stack") || customElements.define("px-stack", c);
353
- class E extends c {
354
- constructor() {
355
- super();
356
- }
357
- connectedCallback() {
358
- super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
359
- }
360
- }
361
- customElements.get("px-vstack") || customElements.define("px-vstack", E);
362
- class z extends c {
363
- constructor() {
364
- super();
365
- }
366
- connectedCallback() {
367
- super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
368
- }
369
- }
370
- customElements.get("px-hstack") || customElements.define("px-hstack", z);
371
- class L extends HTMLElement {
372
- constructor() {
373
- super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
374
- }
375
- static get observedAttributes() {
376
- return ["grow", "nogap"];
377
- }
378
- attributeChangedCallback(t, e, i) {
379
- t === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
380
- }
381
- connectedCallback() {
382
- this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && (this.resizeObserver = new ResizeObserver(() => {
383
- this.handleSizeChange();
384
- }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
385
- }
386
- disconnectedCallback() {
387
- var t;
388
- (t = this.resizeObserver) == null || t.disconnect(), this.recheckHandle && (cancelAnimationFrame(this.recheckHandle), this.recheckHandle = void 0);
389
- }
390
- get grow() {
391
- return this.getAttribute("grow");
392
- }
393
- set grow(t) {
394
- this.setAttribute("grow", t);
395
- }
396
- scheduleRecheck() {
397
- this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
398
- this.recheckHandle = void 0, this.recalculateVisibility();
399
- });
400
- }
401
- recalculateVisibility() {
402
- this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
403
- }
404
- handleSizeChange() {
405
- const t = this.getBoundingClientRect(), e = t.width === 0 && !this.isVertical || t.height === 0 && this.isVertical;
406
- this.isZeroSized !== e && (this.isZeroSized = e, this.updateParticipation());
407
- }
408
- updateParticipation() {
409
- this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
410
- }
411
- get nogap() {
412
- return this.hasAttribute("nogap");
413
- }
414
- set nogap(t) {
415
- t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
416
- }
417
- }
418
- customElements.get("px-spacer") || customElements.define("px-spacer", L);
419
- const D = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", p = new CSSStyleSheet();
420
- p.replaceSync(D);
421
- class j extends n {
422
- constructor() {
423
- super(p), this.template = (t) => `
1
+ import { AttributeBreakpointHandlerDelegate as e, WithExtraAttributes as t, backgroundColorValues as n, booleanPropertyToAttributeSetter as r, checkName as i, gapValues as a, log as o, propertyToAttributeSetter as s } from "@proximus/lavender-common";
2
+ //#region ../Layout/src/Stack.css?inline
3
+ var c = ":host{display:block}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-mobile) - var(--host-gap--mobile))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.flex-container{box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);width:100%;height:100%;overflow-x:var(--overflow-x-all);display:flex}@media screen and (width<=47.938rem){.flex-container{overflow-x:var(--overflow-x-all-mobile,var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media screen and (width>=48rem){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-tablet) - var(--host-gap--tablet))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@media screen and (width>=48rem) and (width<=64rem){.flex-container{overflow-x:var(--overflow-x-all-tablet,var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media screen and (width>=64.0625rem){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-laptop) - var(--host-gap--laptop))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@media screen and (width>=64.0625rem) and (width<=90rem){.flex-container{overflow-x:var(--overflow-x-all-laptop,var(--overflow-x-all))}}@media screen and (width>=90.0625rem){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-x:var(--overflow-x-all-desktop,var(--overflow-x-all))}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-desktop) - var(--host-gap--desktop))}:host([overflow-x=auto]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x=auto]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}", l = new CSSStyleSheet();
4
+ l.replaceSync(c);
5
+ var u = [
6
+ "",
7
+ "default",
8
+ "row",
9
+ "row-reverse",
10
+ "column",
11
+ "column-reverse"
12
+ ], d = [
13
+ "",
14
+ "default",
15
+ "stretch",
16
+ "flex-start",
17
+ "start",
18
+ "flex-end",
19
+ "end",
20
+ "center",
21
+ "baseline"
22
+ ], f = [
23
+ "",
24
+ "default",
25
+ "flex-start",
26
+ "start",
27
+ "flex-end",
28
+ "end",
29
+ "center",
30
+ "space-between",
31
+ "space-around",
32
+ "space-evenly"
33
+ ], p = [
34
+ "",
35
+ "default",
36
+ "nowrap",
37
+ "wrap",
38
+ "wrap-reverse"
39
+ ], m = [
40
+ "",
41
+ "visible",
42
+ "hidden",
43
+ "scroll",
44
+ "auto"
45
+ ], h = class extends t {
46
+ constructor() {
47
+ super(l), this.overflowXAttributeDelegate = new e(this, "overflow-x", (e) => e, "--overflow-x"), this.template = "<div class=\"flex-container\">\n <slot></slot>\n </div>", this.shadowRoot.innerHTML = this.template;
48
+ }
49
+ connectedCallback() {
50
+ this.hasAttribute("direction") || (this.direction = "row"), this.hasAttribute("gap") || (this.gap = "none"), this.hasAttribute("align-items") || (this.alignItems = "stretch"), this.hasAttribute("justify-content") || (this.justifyContent = "flex-start"), this.hasAttribute("wrap") || (this.wrap = "nowrap"), this.hasAttribute("overflow-x") || this.overflowXAttributeDelegate.init("visible");
51
+ }
52
+ static get observedAttributes() {
53
+ return [
54
+ ...super.observedAttributes,
55
+ "direction",
56
+ "direction--mobile",
57
+ "direction--tablet",
58
+ "direction--laptop",
59
+ "direction--desktop",
60
+ "gap",
61
+ "gap--mobile",
62
+ "gap--tablet",
63
+ "gap--laptop",
64
+ "gap--desktop",
65
+ "justify-content",
66
+ "justify-content--mobile",
67
+ "justify-content--tablet",
68
+ "justify-content--laptop",
69
+ "justify-content--desktop",
70
+ "align-items",
71
+ "align-items--mobile",
72
+ "align-items--tablet",
73
+ "align-items--laptop",
74
+ "align-items--desktop",
75
+ "wrap",
76
+ "wrap--mobile",
77
+ "wrap--tablet",
78
+ "wrap--laptop",
79
+ "wrap--desktop",
80
+ "overflow-x",
81
+ "overflow-x--mobile",
82
+ "overflow-x--tablet",
83
+ "overflow-x--laptop",
84
+ "overflow-x--desktop"
85
+ ];
86
+ }
87
+ attributeChangedCallback(e, t, n) {
88
+ switch (e) {
89
+ case "gap":
90
+ case "gap--mobile":
91
+ case "gap--tablet":
92
+ case "gap--laptop":
93
+ case "gap--desktop":
94
+ this.updateFlexProperties(e, t, n, a);
95
+ break;
96
+ case "justify-content":
97
+ case "justify-content--mobile":
98
+ case "justify-content--tablet":
99
+ case "justify-content--laptop":
100
+ case "justify-content--desktop":
101
+ this.updateFlexProperties(e, t, n, f);
102
+ break;
103
+ case "align-items":
104
+ case "align-items--mobile":
105
+ case "align-items--tablet":
106
+ case "align-items--laptop":
107
+ case "align-items--desktop":
108
+ this.updateFlexProperties(e, t, n, d);
109
+ break;
110
+ case "wrap":
111
+ case "wrap--mobile":
112
+ case "wrap--tablet":
113
+ case "wrap--laptop":
114
+ case "wrap--desktop":
115
+ this.updateFlexProperties(e, t, n, p);
116
+ break;
117
+ case "direction":
118
+ case "direction--mobile":
119
+ case "direction--tablet":
120
+ case "direction--laptop":
121
+ case "direction--desktop":
122
+ this.updateFlexProperties(e, t, n, u);
123
+ break;
124
+ case "overflow-x":
125
+ case "overflow-x--mobile":
126
+ case "overflow-x--tablet":
127
+ case "overflow-x--laptop":
128
+ case "overflow-x--desktop":
129
+ this.updateOverflowX(e, t, n, m);
130
+ break;
131
+ default: super.attributeChangedCallback(e, t, n);
132
+ }
133
+ }
134
+ updateOverflowX(e, t, n, r) {
135
+ if (!i(r, n)) {
136
+ o(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
137
+ return;
138
+ }
139
+ this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n);
140
+ }
141
+ updateFlexProperties(e, t, n, r) {
142
+ this.checkName(r, n) || o(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
143
+ let i = e.indexOf("--") > -1, a = i ? e.split("--")[0] : e, s = [];
144
+ if (!i) this.getAttribute(a + "--mobile") || s.push("mobile"), this.getAttribute(a + "--tablet") || s.push("tablet"), this.getAttribute(a + "--laptop") || s.push("laptop"), this.getAttribute(a + "--desktop") || s.push("desktop"), s.forEach((e) => {
145
+ this.updateStyle(a, e, t, r), this.updateStyle(a, e, n, r);
146
+ });
147
+ else {
148
+ let i = e.split("--")[1];
149
+ this.updateStyle(a, i, t, r), this.updateStyle(a, i, n, r);
150
+ }
151
+ }
152
+ updateStyle(e, t, n, r) {
153
+ n && (e === "gap" && r && r.includes(n) ? (this.$el.style.setProperty(`--flex-${e}--${t}-value`, `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`), this.style.setProperty(`--host-gap--${t}`, `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`)) : this.$el.style.setProperty(`--flex-${e}--${t}-value`, n));
154
+ }
155
+ get direction() {
156
+ return this.getAttribute("direction");
157
+ }
158
+ set direction(e) {
159
+ s(this, "direction", e);
160
+ }
161
+ get directionMobile() {
162
+ return this.getAttribute("direction--mobile");
163
+ }
164
+ set directionMobile(e) {
165
+ s(this, "direction--mobile", e);
166
+ }
167
+ get directionTablet() {
168
+ return this.getAttribute("direction--tablet");
169
+ }
170
+ set directionTablet(e) {
171
+ s(this, "direction--tablet", e);
172
+ }
173
+ get directionLaptop() {
174
+ return this.getAttribute("direction--laptop");
175
+ }
176
+ set directionLaptop(e) {
177
+ s(this, "direction--laptop", e);
178
+ }
179
+ get directionDesktop() {
180
+ return this.getAttribute("direction--desktop");
181
+ }
182
+ set directionDesktop(e) {
183
+ s(this, "direction--desktop", e);
184
+ }
185
+ get gap() {
186
+ return this.getAttribute("gap");
187
+ }
188
+ set gap(e) {
189
+ s(this, "gap", e);
190
+ }
191
+ get gapMobile() {
192
+ return this.getAttribute("gap--mobile");
193
+ }
194
+ set gapMobile(e) {
195
+ s(this, "gap--mobile", e);
196
+ }
197
+ get gapTablet() {
198
+ return this.getAttribute("gap--tablet");
199
+ }
200
+ set gapTablet(e) {
201
+ s(this, "gap--tablet", e);
202
+ }
203
+ get gapLaptop() {
204
+ return this.getAttribute("gap--laptop");
205
+ }
206
+ set gapLaptop(e) {
207
+ s(this, "gap--laptop", e);
208
+ }
209
+ get gapDesktop() {
210
+ return this.getAttribute("gap--desktop");
211
+ }
212
+ set gapDesktop(e) {
213
+ s(this, "gap--desktop", e);
214
+ }
215
+ get justifyContent() {
216
+ return this.getAttribute("justify-content");
217
+ }
218
+ set justifyContent(e) {
219
+ s(this, "justify-content", e);
220
+ }
221
+ get justifyContentMobile() {
222
+ return this.getAttribute("justify-content--mobile");
223
+ }
224
+ set justifyContentMobile(e) {
225
+ s(this, "justify-content--mobile", e);
226
+ }
227
+ get justifyContentTablet() {
228
+ return this.getAttribute("justify-content--tablet");
229
+ }
230
+ set justifyContentTablet(e) {
231
+ s(this, "justify-content--tablet", e);
232
+ }
233
+ get justifyContentLaptop() {
234
+ return this.getAttribute("justify-content--laptop");
235
+ }
236
+ set justifyContentLaptop(e) {
237
+ s(this, "justify-content--laptop", e);
238
+ }
239
+ get justifyContentDesktop() {
240
+ return this.getAttribute("justify-content--desktop");
241
+ }
242
+ set justifyContentDesktop(e) {
243
+ s(this, "justify-content--desktop", e);
244
+ }
245
+ get alignItems() {
246
+ return this.getAttribute("align-items");
247
+ }
248
+ set alignItems(e) {
249
+ s(this, "align-items", e);
250
+ }
251
+ get alignItemsMobile() {
252
+ return this.getAttribute("align-items--mobile");
253
+ }
254
+ set alignItemsMobile(e) {
255
+ s(this, "align-items--mobile", e);
256
+ }
257
+ get alignItemsTablet() {
258
+ return this.getAttribute("align-items--tablet");
259
+ }
260
+ set alignItemsTablet(e) {
261
+ s(this, "align-items--tablet", e);
262
+ }
263
+ get alignItemsLaptop() {
264
+ return this.getAttribute("align-items--laptop");
265
+ }
266
+ set alignItemsLaptop(e) {
267
+ s(this, "align-items--laptop", e);
268
+ }
269
+ get alignItemsDesktop() {
270
+ return this.getAttribute("align-items--desktop");
271
+ }
272
+ set alignItemsDesktop(e) {
273
+ s(this, "align-items--desktop", e);
274
+ }
275
+ get wrap() {
276
+ return this.getAttribute("wrap");
277
+ }
278
+ set wrap(e) {
279
+ s(this, "wrap", e);
280
+ }
281
+ get wrapMobile() {
282
+ return this.getAttribute("wrap--mobile");
283
+ }
284
+ set wrapMobile(e) {
285
+ s(this, "wrap--mobile", e);
286
+ }
287
+ get wrapTablet() {
288
+ return this.getAttribute("wrap--tablet");
289
+ }
290
+ set wrapTablet(e) {
291
+ s(this, "wrap--tablet", e);
292
+ }
293
+ get wrapLaptop() {
294
+ return this.getAttribute("wrap--laptop");
295
+ }
296
+ set wrapLaptop(e) {
297
+ s(this, "wrap--laptop", e);
298
+ }
299
+ get wrapDesktop() {
300
+ return this.getAttribute("wrap--desktop");
301
+ }
302
+ set wrapDesktop(e) {
303
+ s(this, "wrap--desktop", e);
304
+ }
305
+ get overflowX() {
306
+ return this.getAttribute("overflow-x");
307
+ }
308
+ set overflowX(e) {
309
+ s(this, "overflow-x", e);
310
+ }
311
+ get overflowXMobile() {
312
+ return this.getAttribute("overflow-x--mobile");
313
+ }
314
+ set overflowXMobile(e) {
315
+ s(this, "overflow-x--mobile", e);
316
+ }
317
+ get overflowXTablet() {
318
+ return this.getAttribute("overflow-x--tablet");
319
+ }
320
+ set overflowXTablet(e) {
321
+ s(this, "overflow-x--tablet", e);
322
+ }
323
+ get overflowXLaptop() {
324
+ return this.getAttribute("overflow-x--laptop");
325
+ }
326
+ set overflowXLaptop(e) {
327
+ s(this, "overflow-x--laptop", e);
328
+ }
329
+ get overflowXDesktop() {
330
+ return this.getAttribute("overflow-x--desktop");
331
+ }
332
+ set overflowXDesktop(e) {
333
+ s(this, "overflow-x--desktop", e);
334
+ }
335
+ get $el() {
336
+ return this.shadowRoot.querySelector(".flex-container");
337
+ }
338
+ };
339
+ customElements.get("px-stack") || customElements.define("px-stack", h);
340
+ var g = class extends h {
341
+ constructor() {
342
+ super();
343
+ }
344
+ connectedCallback() {
345
+ super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
346
+ }
347
+ };
348
+ customElements.get("px-vstack") || customElements.define("px-vstack", g);
349
+ var _ = class extends h {
350
+ constructor() {
351
+ super();
352
+ }
353
+ connectedCallback() {
354
+ super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
355
+ }
356
+ };
357
+ customElements.get("px-hstack") || customElements.define("px-hstack", _);
358
+ //#endregion
359
+ //#region ../Layout/src/Spacer.ts
360
+ var v = class extends HTMLElement {
361
+ constructor() {
362
+ super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
363
+ }
364
+ static get observedAttributes() {
365
+ return ["grow", "nogap"];
366
+ }
367
+ attributeChangedCallback(e, t, n) {
368
+ e === "grow" && (this.growValue = n || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
369
+ }
370
+ connectedCallback() {
371
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && this.parentElement && (this.resizeObserver = new ResizeObserver(() => {
372
+ this.handleSizeChange();
373
+ }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
374
+ }
375
+ disconnectedCallback() {
376
+ this.resizeObserver?.disconnect(), this.recheckHandle &&= (cancelAnimationFrame(this.recheckHandle), void 0);
377
+ }
378
+ get grow() {
379
+ return this.getAttribute("grow");
380
+ }
381
+ set grow(e) {
382
+ this.setAttribute("grow", `${e}`);
383
+ }
384
+ scheduleRecheck() {
385
+ this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
386
+ this.recheckHandle = void 0, this.recalculateVisibility();
387
+ });
388
+ }
389
+ recalculateVisibility() {
390
+ this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
391
+ }
392
+ handleSizeChange() {
393
+ let e = this.getBoundingClientRect(), t = e.width === 0 && !this.isVertical || e.height === 0 && this.isVertical;
394
+ this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
395
+ }
396
+ updateParticipation() {
397
+ this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
398
+ }
399
+ get nogap() {
400
+ return this.hasAttribute("nogap");
401
+ }
402
+ set nogap(e) {
403
+ e ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
404
+ }
405
+ };
406
+ customElements.get("px-spacer") || customElements.define("px-spacer", v);
407
+ //#endregion
408
+ //#region ../Layout/src/Page.css?inline
409
+ var y = ":host{box-sizing:border-box;display:block}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", b = new CSSStyleSheet();
410
+ b.replaceSync(y);
411
+ var x = class extends t {
412
+ constructor() {
413
+ super(b), this.template = (e) => `
424
414
  <px-container border-radius="none" padding="none">
425
415
  <px-vstack>
426
416
  <px-container id="header-container" border-radius="none">
@@ -457,7 +447,7 @@ class j extends n {
457
447
  <px-spacer></px-spacer>
458
448
  </px-hstack>
459
449
  </px-container>
460
- ${t ? ` <px-hstack>
450
+ ${e ? ` <px-hstack>
461
451
  <px-spacer></px-spacer>
462
452
  <px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
463
453
  <px-vstack gap="s">
@@ -523,502 +513,418 @@ class j extends n {
523
513
  </px-vstack>
524
514
  </px-container>
525
515
  `, this.shadowRoot.innerHTML = this.template(!!this.$imageStickySlot);
526
- }
527
- static get observedAttributes() {
528
- return [
529
- ...super.observedAttributes,
530
- "background-image",
531
- "gap",
532
- "background-color",
533
- "padding-vertical",
534
- "padding-horizontal"
535
- ];
536
- }
537
- get $wideImage() {
538
- return this.shadowRoot.querySelector("#image-box");
539
- }
540
- get $bodyVStackContainer() {
541
- return this.shadowRoot.querySelector("#header-vstack-container");
542
- }
543
- get $bodyContainer() {
544
- return this.shadowRoot.querySelector("#body-container");
545
- }
546
- get $contactContainer() {
547
- return this.shadowRoot.querySelector("#contact-container");
548
- }
549
- get $footerContainer() {
550
- return this.shadowRoot.querySelector("#footer-container");
551
- }
552
- get $headerContainer() {
553
- return this.shadowRoot.querySelector("#header-container");
554
- }
555
- get $imageContainer() {
556
- return this.shadowRoot.querySelector("#image-container");
557
- }
558
- get backgroundImage() {
559
- return this.getAttribute("background-image");
560
- }
561
- get $imageStickySlot() {
562
- return this.querySelector('*[slot="image-sticky-container"]');
563
- }
564
- get $main() {
565
- return this.shadowRoot.querySelector("#main");
566
- }
567
- get backgroundColor() {
568
- return this.getAttribute("background-color") || "none";
569
- }
570
- get paddingVertical() {
571
- return this.getAttribute("padding-vertical");
572
- }
573
- get paddingHorizontal() {
574
- return this.getAttribute("padding-horizontal");
575
- }
576
- set paddingVertical(t) {
577
- this.setAttribute("padding-vertical", t);
578
- }
579
- set paddingHorizontal(t) {
580
- this.setAttribute("padding-horizontal", t);
581
- }
582
- get gap() {
583
- return this.getAttribute("gap");
584
- }
585
- connectedCallback() {
586
- this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
587
- }
588
- attributeChangedCallback(t, e, i) {
589
- if (e !== i)
590
- switch (t) {
591
- case "background-image":
592
- this.$imageContainer.setAttribute("background-image", i);
593
- break;
594
- case "gap":
595
- this.$bodyVStackContainer.setAttribute("gap", i);
596
- break;
597
- case "background-color":
598
- this.$bodyContainer.setAttribute(
599
- "background-color",
600
- y.indexOf(i) > 0 ? i : "none"
601
- );
602
- break;
603
- case "padding-vertical":
604
- this.handlePaddingVerticalChange(i);
605
- break;
606
- case "padding-horizontal":
607
- this.handlePaddingHorizontalChange(i);
608
- break;
609
- default:
610
- super.attributeChangedCallback(t, e, i);
611
- }
612
- }
613
- handlePaddingVerticalChange(t) {
614
- this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
615
- }
616
- handlePaddingHorizontalChange(t) {
617
- this.$headerContainer.paddingLeft = t, this.$headerContainer.paddingRight = t, this.$bodyContainer.paddingLeft = t, this.$bodyContainer.paddingRight = t, this.$contactContainer.paddingLeft = t, this.$contactContainer.paddingRight = t, this.$footerContainer.paddingLeft = t, this.$footerContainer.paddingRight = t, this.$imageContainer.paddingLeft = t, this.$imageContainer.paddingRight = t;
618
- }
619
- }
620
- customElements.get("px-page") === void 0 && customElements.define("px-page", j);
621
- const R = ':host{display:block;font-family:var(--px-font-family);font-size:var(--px-font-size-base)}:host *{box-sizing:border-box}.selectable-box{display:flex;flex-direction:column;height:100%}::slotted([slot="media"]){width:100%;height:auto}.info{display:flex;flex-grow:1}.info .info__body{display:flex;flex-direction:column;flex-basis:80%;gap:var(--px-spacing-default-mobile);padding:var(--px-padding-m-mobile);flex-grow:1}.info .info__body .header{display:flex;align-items:center;gap:var(--px-spacing-s-mobile)}.info .info__body .header .titles{display:flex;flex-direction:column;gap:var(--px-spacing-xs-mobile)}.info .info__body .header .titles ::slotted([slot="title"]){font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-title);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default);flex-grow:1}.info .info__body .header .titles ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-dimmed-default);flex-grow:1}.info .info__body ::slotted([slot="content"]){color:var(--px-color-text-neutral-default)}.info .info__footer{display:flex;align-items:center;padding:var(--px-padding-s-mobile);background:var(--px-color-background-container-default-default);text-align:center}:host([hide-footer]) .info .info__body{flex-basis:auto}:host([hide-footer]) .info__footer{display:none}@media only screen and (min-width: 48em){.info{flex-direction:column}.info .info__body{flex-basis:auto;gap:var(--px-spacing-default-tablet);padding:var(--px-padding-m-tablet)}.info .info__body .header{gap:var(--px-spacing-s-tablet)}.info .info__body .header .titles{gap:var(--px-spacing-xs-tablet)}.info .info__body .header .titles ::slotted([slot="title"]){font-size:var(--px-text-size-label-m-tablet)}.info .info__body .header .titles ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-tablet)}.info .info__footer{justify-content:center;padding:var(--px-padding-s-tablet)}}@media only screen and (min-width: 64.0625em){.info .info__body{gap:var(--px-spacing-default-laptop);padding:var(--px-padding-m-laptop)}.info .info__body .header{gap:var(--px-spacing-s-laptop)}.info .info__body .header .titles{gap:var(--px-spacing-xs-laptop)}.info .info__body .header .titles ::slotted([slot="title"]){font-size:var(--px-text-size-label-m-laptop)}.info .info__body .header .titles ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-laptop)}.info .info__footer{padding:var(--px-padding-s-laptop)}}@media only screen and (min-width: 90.0625em){.info .info__body{gap:var(--px-spacing-default-desktop);padding:var(--px-padding-m-desktop)}.info .info__body .header{gap:var(--px-spacing-s-desktop)}.info .info__body .header .titles{gap:var(--px-spacing-xs-desktop)}.info .info__body .header .titles ::slotted([slot="title"]){font-size:var(--px-text-size-label-m-desktop)}.info .info__body .header .titles ::slotted([slot="description"]){font-size:var(--px-text-size-label-m-desktop)}.info .info__footer{padding:var(--px-padding-s-desktop)}}:host([inverted]) .info .info__body .header .titles ::slotted([slot="title"]){color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info .info__body .header .titles ::slotted([slot="description"]){color:var(--px-color-text-dimmed-inverted)}:host([inverted]) .info .info__body ::slotted([slot="content"]){color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info .info__footer{background:var(--px-color-background-container-default-inverted)}', u = new CSSStyleSheet();
622
- u.replaceSync(R);
623
- class F extends n {
624
- template() {
625
- return `
626
- <div class="selectable-box">
627
- <slot name="media"></slot>
628
- <div class="info">
629
- <div class="info__body">
630
- <div class="header">
631
- <slot name="action"></slot>
632
- <slot name="icon"></slot>
633
- <slot name="logo"></slot>
634
- <div class="titles">
635
- <slot name="title"></slot>
636
- <slot name="description"></slot>
637
- </div>
638
- </div>
639
- <slot name="content"></slot>
640
- </div>
641
- <div class="info__footer">
642
- <slot name="footer"></slot>
643
- </div>
644
- </div>
645
- </div>
646
- `;
647
- }
648
- constructor() {
649
- super(u), this.shadowRoot.innerHTML = this.template();
650
- }
651
- static get observedAttributes() {
652
- return [...super.observedAttributes, "inverted", "hide-footer"];
653
- }
654
- attributeChangedCallback(t, e, i) {
655
- if (e !== i)
656
- switch (t) {
657
- default:
658
- super.attributeChangedCallback(t, e, i);
659
- break;
660
- }
661
- }
662
- get $el() {
663
- return this.shadowRoot.querySelector(".selectable-box");
664
- }
665
- get inverted() {
666
- return this.hasAttribute("inverted");
667
- }
668
- set inverted(t) {
669
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
670
- }
671
- get hideFooter() {
672
- return this.hasAttribute("hide-footer");
673
- }
674
- set hideFooter(t) {
675
- t ? this.setAttribute("hide-footer", "") : this.removeAttribute("hide-footer");
676
- }
677
- }
678
- customElements.get("px-selectable-box") || customElements.define("px-selectable-box", F);
679
- const g = ':host{display:block;outline:none}:host *{box-sizing:border-box}.selectable-box-checkbox,.selectable-box-radio{box-sizing:border-box;height:100%;cursor:pointer;border-radius:var(--px-radius-main);overflow:hidden;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border:var(--px-size-border-m) solid var(--px-color-border-main-default);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile)}.selectable-box-checkbox px-selectable-box,.selectable-box-radio px-selectable-box{height:100%;background-color:var(--px-color-background-container-light-default)}:host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host(:not([disabled])):host(:hover) .selectable-box-radio{border-color:var(--px-color-border-state-hover-default)}:host(:not([disabled])):host(:hover) .selectable-box-checkbox px-selectable-box,:host(:not([disabled])):host(:hover) .selectable-box-radio px-selectable-box{background-color:var( --px-color-background-state-hover-bordered-default )}:host(:not([disabled])):host(:focus-visible) .selectable-box-checkbox,:host(:not([disabled])):host(:focus-visible) .selectable-box-radio{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}:host([checked]) .selectable-box-checkbox,:host([checked]) .selectable-box-radio{border-color:var(--px-color-border-state-active-default)}:host([disabled]) .selectable-box-checkbox,:host([disabled]) .selectable-box-radio{cursor:default;pointer-events:none;border-color:transparent}:host([disabled]) .selectable-box-checkbox px-selectable-box,:host([disabled]) .selectable-box-radio px-selectable-box{background-color:var(--px-color-background-state-disabled-default)}:host([disabled]) ::slotted([slot="title"]),:host([disabled]) ::slotted([slot="description"]),:host([disabled]) ::slotted([slot="content"]){color:var(--px-color-text-state-disabled-default)}@media only screen and (min-width: 48em){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 64.0625em){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625em){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-desktop)}}:host([inverted]) .selectable-box-checkbox,:host([inverted]) .selectable-box-radio{border-color:var(--px-color-border-main-inverted);outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .selectable-box-checkbox px-selectable-box,:host([inverted]) .selectable-box-radio px-selectable-box{background-color:var(--px-color-background-container-light-inverted)}:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-radio{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-checkbox px-selectable-box,:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-radio px-selectable-box{background-color:var( --px-color-background-state-hover-bordered-inverted )}:host([inverted]):host([checked]) .selectable-box-checkbox,:host([inverted]):host([checked]) .selectable-box-radio{border-color:var(--px-color-border-state-active-inverted)}:host([inverted]):host([disabled]) .selectable-box-checkbox,:host([inverted]):host([disabled]) .selectable-box-radio{border-color:transparent}:host([inverted]):host([disabled]) .selectable-box-checkbox px-selectable-box,:host([inverted]):host([disabled]) .selectable-box-radio px-selectable-box{background-color:var(--px-color-background-state-disabled-inverted)}:host([inverted]):host([disabled]) ::slotted([slot="title"]),:host([inverted]):host([disabled]) ::slotted([slot="description"]),:host([inverted]):host([disabled]) ::slotted([slot="content"]){color:var(--px-color-text-state-disabled-inverted)}', f = new CSSStyleSheet();
680
- f.replaceSync(g);
681
- class H extends n {
682
- template() {
683
- return `
684
- <div class="selectable-box-checkbox">
685
- <px-selectable-box>
686
- <slot name="media" slot="media"></slot>
687
- <px-checkbox
688
- slot="action" inert
689
- name="${this.name}"
690
- value="${this.value}"
691
- ></px-checkbox>
692
- <slot name="icon" slot="icon"></slot>
693
- <slot name="logo" slot="logo"></slot>
694
- <slot name="title" slot="title"></slot>
695
- <slot name="description" slot="description"></slot>
696
- <slot name="content" slot="content"></slot>
697
- <slot name="footer" slot="footer"></slot>
698
- </px-selectable-box>
699
- </div>
700
- `;
701
- }
702
- constructor() {
703
- var t;
704
- super(f), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
705
- }
706
- connectedCallback() {
707
- this.tabIndex = 0, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
708
- "slotchange",
709
- this.toggleFooterVisibility
710
- ), this.addEventListener("mouseover", this.setHoverAttribute), this.addEventListener("mouseout", this.removeHoverAttribute), this.addEventListener("keypress", this.setKeypressEvent), this.addEventListener("click", this.setClickEvent), this.hasAttribute("checked") && (this.checked = !0);
711
- }
712
- static get observedAttributes() {
713
- return [
714
- ...super.observedAttributes,
715
- "inverted",
716
- "name",
717
- "value",
718
- "checked",
719
- "disabled"
720
- ];
721
- }
722
- attributeChangedCallback(t, e, i) {
723
- if (e !== i)
724
- switch (t) {
725
- case "inverted":
726
- this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$checkbox.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$checkbox.removeAttribute("inverted"));
727
- break;
728
- case "name":
729
- case "value":
730
- this.$checkbox && this.$checkbox.setAttribute(t, i);
731
- break;
732
- case "disabled":
733
- this.handleDisabledAttributeChange(i !== null);
734
- break;
735
- case "checked":
736
- this.handleCheckedAttributeChange(i);
737
- break;
738
- default:
739
- super.attributeChangedCallback(t, e, i);
740
- break;
741
- }
742
- }
743
- disconnectedCallback() {
744
- this.$slotFooter.removeEventListener(
745
- "slotchange",
746
- this.toggleFooterVisibility
747
- ), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent);
748
- }
749
- removeHoverAttribute() {
750
- this.$checkbox.removeAttribute("hover");
751
- }
752
- setHoverAttribute() {
753
- this.$checkbox.setAttribute("hover", "");
754
- }
755
- setKeypressEvent(t) {
756
- switch (t.stopPropagation(), t.preventDefault(), t.code) {
757
- case "Space":
758
- this.click();
759
- break;
760
- }
761
- }
762
- setClickEvent(t) {
763
- this.checked = !this.checked, t.stopPropagation(), t.preventDefault();
764
- }
765
- toggleFooterVisibility() {
766
- this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
767
- }
768
- handleDisabledAttributeChange(t) {
769
- t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$checkbox.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$checkbox.removeAttribute("disabled"));
770
- }
771
- handleCheckedAttributeChange(t) {
772
- var e;
773
- (e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.checked = !1, this.$checkbox && this.$checkbox.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.checked = !0, this.$checkbox && this.$checkbox.setAttribute("checked", ""), this.dispatchEvent(
774
- new Event("change", {
775
- bubbles: !0,
776
- composed: !0
777
- // Allow the event to pass through shadow DOM boundaries
778
- })
779
- ));
780
- }
781
- // Form-associated callbacks
782
- static get formAssociated() {
783
- return !0;
784
- }
785
- // Set default behavior when the element is attached to a form
786
- formResetCallback() {
787
- this.checked = !1;
788
- }
789
- formStateRestoreCallback(t) {
790
- this.checked = t;
791
- }
792
- formData() {
793
- if (this.name) {
794
- const t = new FormData(), e = this.getAttribute("name");
795
- return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
796
- }
797
- }
798
- get $el() {
799
- return this.shadowRoot.querySelector(
800
- ".selectable-box-checkbox"
801
- );
802
- }
803
- get $selectableBox() {
804
- return this.shadowRoot.querySelector("px-selectable-box");
805
- }
806
- get $checkbox() {
807
- return this.shadowRoot.querySelector("px-checkbox");
808
- }
809
- get $slotFooter() {
810
- return this.shadowRoot.querySelector(
811
- 'slot[name="footer"]'
812
- );
813
- }
814
- get $slottedFooter() {
815
- return this.querySelector('[slot="footer"]');
816
- }
817
- get inverted() {
818
- return this.hasAttribute("inverted");
819
- }
820
- set inverted(t) {
821
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
822
- }
823
- get checked() {
824
- return this.hasAttribute("checked");
825
- }
826
- set checked(t) {
827
- t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
828
- }
829
- get name() {
830
- return this.getAttribute("name");
831
- }
832
- set name(t) {
833
- t ? this.setAttribute("name", t) : this.removeAttribute("name");
834
- }
835
- get disabled() {
836
- return this.hasAttribute("disabled");
837
- }
838
- set disabled(t) {
839
- t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
840
- }
841
- get value() {
842
- return this.getAttribute("value");
843
- }
844
- set value(t) {
845
- t ? this.setAttribute("value", t) : this.removeAttribute("value");
846
- }
847
- }
848
- customElements.get("px-selectable-box-checkbox") || customElements.define("px-selectable-box-checkbox", H);
849
- const x = new CSSStyleSheet();
850
- x.replaceSync(g);
851
- class q extends n {
852
- template() {
853
- return `
854
- <div class="selectable-box-radio">
855
- <px-selectable-box>
856
- <slot name="media" slot="media"></slot>
857
- <px-radio
858
- slot="action" inert
859
- name="${this.name}"
860
- value="${this.value}"
861
- ></px-radio>
862
- <slot name="icon" slot="icon"></slot>
863
- <slot name="logo" slot="logo"></slot>
864
- <slot name="title" slot="title"></slot>
865
- <slot name="description" slot="description"></slot>
866
- <slot name="content" slot="content"></slot>
867
- <slot name="footer" slot="footer"></slot>
868
- </px-selectable-box>
869
- </div>
870
- `;
871
- }
872
- constructor() {
873
- var t;
874
- super(x), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "radio", this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
875
- }
876
- connectedCallback() {
877
- var t;
878
- this.tabIndex = ((t = this.parentElement) == null ? void 0 : t.firstElementChild) === this ? 0 : -1, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
879
- "slotchange",
880
- this.toggleFooterVisibility
881
- ), this.addEventListener("mouseover", this.setHoverAttribute), this.addEventListener("mouseout", this.removeHoverAttribute), this.addEventListener("keypress", this.setKeypressEvent), this.addEventListener("click", this.setClickEvent), this.hasAttribute("checked") && (this.checked = !0);
882
- }
883
- static get observedAttributes() {
884
- return [
885
- ...super.observedAttributes,
886
- "inverted",
887
- "name",
888
- "value",
889
- "checked",
890
- "disabled"
891
- ];
892
- }
893
- attributeChangedCallback(t, e, i) {
894
- if (e !== i)
895
- switch (t) {
896
- case "inverted":
897
- this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$radio.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$radio.removeAttribute("inverted"));
898
- break;
899
- case "name":
900
- case "value":
901
- this.$radio && this.$radio.setAttribute(t, i);
902
- break;
903
- case "disabled":
904
- this.handleDisabledAttributeChange(i !== null);
905
- break;
906
- case "checked":
907
- this.handleCheckedAttributeChange(i);
908
- break;
909
- default:
910
- super.attributeChangedCallback(t, e, i);
911
- break;
912
- }
913
- }
914
- disconnectedCallback() {
915
- this.$slotFooter.removeEventListener(
916
- "slotchange",
917
- this.toggleFooterVisibility
918
- ), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent);
919
- }
920
- removeHoverAttribute() {
921
- this.$radio.removeAttribute("hover");
922
- }
923
- setHoverAttribute() {
924
- this.$radio.setAttribute("hover", "");
925
- }
926
- setKeypressEvent(t) {
927
- switch (t.preventDefault(), t.code) {
928
- case "Space":
929
- this.click();
930
- break;
931
- }
932
- }
933
- setClickEvent(t) {
934
- this.checked || (this.checked = !0), t.stopPropagation(), t.preventDefault();
935
- }
936
- toggleFooterVisibility() {
937
- this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
938
- }
939
- handleDisabledAttributeChange(t) {
940
- t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$radio.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$radio.removeAttribute("disabled"));
941
- }
942
- handleCheckedAttributeChange(t) {
943
- var e;
944
- (e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.tabIndex = -1, this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.tabIndex = 0, this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(
945
- new Event("change", {
946
- bubbles: !0,
947
- composed: !0
948
- // Allow the event to pass through shadow DOM boundaries
949
- })
950
- ));
951
- }
952
- // Form-associated callbacks
953
- static get formAssociated() {
954
- return !0;
955
- }
956
- // Set default behavior when the element is attached to a form
957
- formResetCallback() {
958
- this.checked = !1;
959
- }
960
- formStateRestoreCallback(t) {
961
- this.checked = t;
962
- }
963
- formData() {
964
- if (this.name) {
965
- const t = new FormData(), e = this.getAttribute("name");
966
- return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
967
- }
968
- }
969
- get $el() {
970
- return this.shadowRoot.querySelector(
971
- ".selectable-box-radio"
972
- );
973
- }
974
- get $selectableBox() {
975
- return this.shadowRoot.querySelector("px-selectable-box");
976
- }
977
- get $radio() {
978
- return this.shadowRoot.querySelector("px-radio");
979
- }
980
- get $slotFooter() {
981
- return this.shadowRoot.querySelector(
982
- 'slot[name="footer"]'
983
- );
984
- }
985
- get $slottedFooter() {
986
- return this.querySelector('[slot="footer"]');
987
- }
988
- get inverted() {
989
- return this.hasAttribute("inverted");
990
- }
991
- set inverted(t) {
992
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
993
- }
994
- get checked() {
995
- return this.hasAttribute("checked");
996
- }
997
- set checked(t) {
998
- t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
999
- }
1000
- get name() {
1001
- return this.getAttribute("name");
1002
- }
1003
- set name(t) {
1004
- t ? this.setAttribute("name", t) : this.removeAttribute("name");
1005
- }
1006
- get disabled() {
1007
- return this.hasAttribute("disabled");
1008
- }
1009
- set disabled(t) {
1010
- t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
1011
- }
1012
- get value() {
1013
- return this.getAttribute("value");
1014
- }
1015
- set value(t) {
1016
- t ? this.setAttribute("value", t) : this.removeAttribute("value");
1017
- }
516
+ }
517
+ static get observedAttributes() {
518
+ return [
519
+ ...super.observedAttributes,
520
+ "background-image",
521
+ "gap",
522
+ "background-color",
523
+ "padding-vertical",
524
+ "padding-horizontal"
525
+ ];
526
+ }
527
+ get $wideImage() {
528
+ return this.shadowRoot.querySelector("#image-box");
529
+ }
530
+ get $bodyVStackContainer() {
531
+ return this.shadowRoot.querySelector("#header-vstack-container");
532
+ }
533
+ get $bodyContainer() {
534
+ return this.shadowRoot.querySelector("#body-container");
535
+ }
536
+ get $contactContainer() {
537
+ return this.shadowRoot.querySelector("#contact-container");
538
+ }
539
+ get $footerContainer() {
540
+ return this.shadowRoot.querySelector("#footer-container");
541
+ }
542
+ get $headerContainer() {
543
+ return this.shadowRoot.querySelector("#header-container");
544
+ }
545
+ get $imageContainer() {
546
+ return this.shadowRoot.querySelector("#image-container");
547
+ }
548
+ get backgroundImage() {
549
+ return this.getAttribute("background-image");
550
+ }
551
+ get $imageStickySlot() {
552
+ return this.querySelector("*[slot=\"image-sticky-container\"]");
553
+ }
554
+ get $main() {
555
+ return this.shadowRoot.querySelector("#main");
556
+ }
557
+ get backgroundColor() {
558
+ return this.getAttribute("background-color") || "none";
559
+ }
560
+ get paddingVertical() {
561
+ return this.getAttribute("padding-vertical");
562
+ }
563
+ get paddingHorizontal() {
564
+ return this.getAttribute("padding-horizontal");
565
+ }
566
+ set paddingVertical(e) {
567
+ this.setAttribute("padding-vertical", `${e}`);
568
+ }
569
+ set paddingHorizontal(e) {
570
+ this.setAttribute("padding-horizontal", `${e}`);
571
+ }
572
+ get gap() {
573
+ return this.getAttribute("gap");
574
+ }
575
+ connectedCallback() {
576
+ this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
577
+ }
578
+ attributeChangedCallback(e, t, r) {
579
+ if (t !== r) switch (e) {
580
+ case "background-image":
581
+ this.$imageContainer.setAttribute("background-image", r);
582
+ break;
583
+ case "gap":
584
+ this.$bodyVStackContainer.setAttribute("gap", r);
585
+ break;
586
+ case "background-color":
587
+ this.$bodyContainer.setAttribute("background-color", n.indexOf(r) > 0 ? r : "none");
588
+ break;
589
+ case "padding-vertical":
590
+ this.handlePaddingVerticalChange(r);
591
+ break;
592
+ case "padding-horizontal":
593
+ this.handlePaddingHorizontalChange(r);
594
+ break;
595
+ default: super.attributeChangedCallback(e, t, r);
596
+ }
597
+ }
598
+ handlePaddingVerticalChange(e) {
599
+ this.$bodyContainer.paddingTop = e, this.$bodyContainer.paddingBottom = e;
600
+ }
601
+ handlePaddingHorizontalChange(e) {
602
+ this.$headerContainer.paddingLeft = e, this.$headerContainer.paddingRight = e, this.$bodyContainer.paddingLeft = e, this.$bodyContainer.paddingRight = e, this.$contactContainer.paddingLeft = e, this.$contactContainer.paddingRight = e, this.$footerContainer.paddingLeft = e, this.$footerContainer.paddingRight = e, this.$imageContainer.paddingLeft = e, this.$imageContainer.paddingRight = e;
603
+ }
604
+ };
605
+ customElements.get("px-page") === void 0 && customElements.define("px-page", x);
606
+ //#endregion
607
+ //#region src/selectable-box.css?inline
608
+ var S = ":host{font-family:var(--px-font-family);font-size:var(--px-font-size-base);display:block}:host *{box-sizing:border-box}.selectable-box{flex-direction:column;height:100%;display:flex}::slotted([slot=media]){width:100%;height:auto}.info{flex-grow:1;display:flex}.info .info__body{gap:var(--px-spacing-default-mobile);padding:var(--px-padding-s-mobile);flex-direction:column;flex:7 1 0;display:flex}.info .info__body .header{align-items:center;gap:var(--px-spacing-s-mobile);display:flex}.info .info__body .header ::slotted([slot=action]),.info .info__body .header ::slotted([slot=icon]),.info .info__body .header ::slotted([slot=logo]){flex-shrink:0}.info .info__body .header .titles{gap:var(--px-spacing-xs-mobile);flex-direction:column;display:flex}.info .info__body .header .titles ::slotted([slot=title]){font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-title);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default);flex-grow:1}.info .info__body .header .titles ::slotted([slot=description]){font-size:var(--px-text-size-label-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-dimmed-default);flex-grow:1}.info .info__body ::slotted([slot=content]){color:var(--px-color-text-neutral-default)}.info .info__footer{padding:var(--px-padding-s-mobile);background:var(--px-color-background-container-default-default);text-align:center;flex:3 1 0;align-items:center;display:flex}:host([hide-footer]) .info .info__body{flex-basis:auto}:host([hide-footer]) .info__footer{display:none}@media screen and (width>=48rem){.info{flex-direction:column}.info .info__body{gap:var(--px-spacing-default-tablet);padding:var(--px-padding-s-tablet);flex-basis:auto}.info .info__body .header{gap:var(--px-spacing-s-tablet)}.info .info__body .header .titles{gap:var(--px-spacing-xs-tablet)}.info .info__body .header .titles ::slotted([slot=title]),.info .info__body .header .titles ::slotted([slot=description]){font-size:var(--px-text-size-label-m-tablet)}.info .info__footer{padding:var(--px-padding-s-tablet);flex:none;justify-content:center}}@media screen and (width>=64.0625rem){.info .info__body{gap:var(--px-spacing-default-laptop);padding:var(--px-padding-s-laptop)}.info .info__body .header{gap:var(--px-spacing-s-laptop)}.info .info__body .header .titles{gap:var(--px-spacing-xs-laptop)}.info .info__body .header .titles ::slotted([slot=title]),.info .info__body .header .titles ::slotted([slot=description]){font-size:var(--px-text-size-label-m-laptop)}.info .info__footer{padding:var(--px-padding-s-laptop)}}@media screen and (width>=90.0625rem){.info .info__body{gap:var(--px-spacing-default-desktop);padding:var(--px-padding-s-desktop)}.info .info__body .header{gap:var(--px-spacing-s-desktop)}.info .info__body .header .titles{gap:var(--px-spacing-xs-desktop)}.info .info__body .header .titles ::slotted([slot=title]),.info .info__body .header .titles ::slotted([slot=description]){font-size:var(--px-text-size-label-m-desktop)}.info .info__footer{padding:var(--px-padding-s-desktop)}}:host([inverted]) .info .info__body .header .titles ::slotted([slot=title]){color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info .info__body .header .titles ::slotted([slot=description]){color:var(--px-color-text-dimmed-inverted)}:host([inverted]) .info .info__body ::slotted([slot=content]){color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info .info__footer{background:var(--px-color-background-container-default-inverted)}", C = new CSSStyleSheet();
609
+ C.replaceSync(S);
610
+ var w = class extends t {
611
+ template() {
612
+ return "\n <div class=\"selectable-box\">\n <slot name=\"media\"></slot>\n <div class=\"info\">\n <div class=\"info__body\">\n <div class=\"header\">\n <slot name=\"action\"></slot>\n <slot name=\"icon\"></slot>\n <slot name=\"logo\"></slot>\n <div class=\"titles\">\n <slot name=\"title\"></slot>\n <slot name=\"description\"></slot>\n </div>\n </div>\n <slot name=\"content\"></slot>\n </div>\n <div class=\"info__footer\">\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n ";
613
+ }
614
+ constructor() {
615
+ super(C), this.shadowRoot.innerHTML = this.template();
616
+ }
617
+ static get observedAttributes() {
618
+ return [
619
+ ...super.observedAttributes,
620
+ "inverted",
621
+ "hide-footer"
622
+ ];
623
+ }
624
+ attributeChangedCallback(e, t, n) {
625
+ if (t !== n) switch (e) {
626
+ default: super.attributeChangedCallback(e, t, n);
627
+ }
628
+ }
629
+ get $el() {
630
+ return this.shadowRoot.querySelector(".selectable-box");
631
+ }
632
+ get inverted() {
633
+ return this.hasAttribute("inverted");
634
+ }
635
+ set inverted(e) {
636
+ e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
637
+ }
638
+ get hideFooter() {
639
+ return this.hasAttribute("hide-footer");
640
+ }
641
+ set hideFooter(e) {
642
+ e ? this.setAttribute("hide-footer", "") : this.removeAttribute("hide-footer");
643
+ }
644
+ };
645
+ customElements.get("px-selectable-box") || customElements.define("px-selectable-box", w);
646
+ //#endregion
647
+ //#region src/clickEventGuards.ts
648
+ var T = ["px-a", "px-button"];
649
+ function E(e, t, n = T) {
650
+ let r = new Set(n), i = e.composedPath();
651
+ for (let e of i) {
652
+ if (e === t) break;
653
+ if (e instanceof Element && r.has(e.tagName.toLowerCase())) return !0;
654
+ }
655
+ return !1;
1018
656
  }
1019
- customElements.get("px-selectable-box-radio") || customElements.define("px-selectable-box-radio", q);
1020
- export {
1021
- F as SelectableBox,
1022
- H as SelectableBoxCheckbox,
1023
- q as SelectableBoxRadio
657
+ //#endregion
658
+ //#region src/common.css?inline
659
+ var D = ":host{outline:none;display:block}:host *{box-sizing:border-box}.selectable-box-checkbox,.selectable-box-radio{box-sizing:border-box;cursor:pointer;border-radius:var(--px-radius-main);--btn-transition:all .2s ease-in-out 0s;height:100%;transition:var(--btn-transition);border:var(--px-size-border-m) solid var(--px-color-border-main-default);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile);overflow:hidden}:is(.selectable-box-checkbox,.selectable-box-radio) px-selectable-box{background-color:var(--px-color-background-container-light-default);height:100%}:host([parent-has-anchor-full]) :is(.selectable-box-checkbox,.selectable-box-radio){border-radius:0 0 var(--px-radius-main) var(--px-radius-main)}:host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host(:not([disabled])):host(:hover) .selectable-box-radio{border-color:var(--px-color-border-state-hover-default)}:is(:host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host(:not([disabled])):host(:hover) .selectable-box-radio) px-selectable-box{background-color:var(--px-color-background-state-hover-bordered-default)}:host(:not([disabled])):host(:focus-visible) .selectable-box-checkbox,:host(:not([disabled])):host(:focus-visible) .selectable-box-radio{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}:host([checked]) .selectable-box-checkbox,:host([checked]) .selectable-box-radio{border-color:var(--px-color-border-state-active-default)}:host([disabled]) .selectable-box-checkbox,:host([disabled]) .selectable-box-radio{cursor:default;pointer-events:none;border-color:#0000}:is(:host([disabled]) .selectable-box-checkbox,:host([disabled]) .selectable-box-radio) px-selectable-box{background-color:var(--px-color-background-state-disabled-default)}:host([disabled]) ::slotted([slot=title]),:host([disabled]) ::slotted([slot=description]),:host([disabled]) ::slotted([slot=content]){color:var(--px-color-text-state-disabled-default)}@media screen and (width>=48rem){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-tablet)}}@media screen and (width>=64.0625rem){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-laptop)}}@media screen and (width>=90.0625rem){.selectable-box-checkbox,.selectable-box-radio{outline-width:var(--px-focus-outline-desktop)}}:host([inverted]) .selectable-box-checkbox,:host([inverted]) .selectable-box-radio{border-color:var(--px-color-border-main-inverted);outline-color:var(--px-color-border-focus-outline-inverted)}:is(:host([inverted]) .selectable-box-checkbox,:host([inverted]) .selectable-box-radio) px-selectable-box{background-color:var(--px-color-background-container-light-inverted)}:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-radio{border-color:var(--px-color-border-state-hover-inverted)}:is(:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-checkbox,:host([inverted]):host(:not([disabled])):host(:hover) .selectable-box-radio) px-selectable-box{background-color:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]):host([checked]) .selectable-box-checkbox,:host([inverted]):host([checked]) .selectable-box-radio{border-color:var(--px-color-border-state-active-inverted)}:host([inverted]):host([disabled]) .selectable-box-checkbox,:host([inverted]):host([disabled]) .selectable-box-radio{border-color:#0000}:is(:host([inverted]):host([disabled]) .selectable-box-checkbox,:host([inverted]):host([disabled]) .selectable-box-radio) px-selectable-box{background-color:var(--px-color-background-state-disabled-inverted)}:host([inverted]):host([disabled]) ::slotted([slot=title]),:host([inverted]):host([disabled]) ::slotted([slot=description]),:host([inverted]):host([disabled]) ::slotted([slot=content]){color:var(--px-color-text-state-disabled-inverted)}", O = new CSSStyleSheet();
660
+ O.replaceSync(D);
661
+ var k = class extends t {
662
+ template() {
663
+ return "\n <div class=\"selectable-box-checkbox\">\n <px-selectable-box>\n <slot name=\"media\" slot=\"media\"></slot>\n <px-checkbox \n slot=\"action\" inert \n ></px-checkbox>\n <slot name=\"icon\" slot=\"icon\"></slot>\n <slot name=\"logo\" slot=\"logo\"></slot>\n <slot name=\"title\" slot=\"title\"></slot>\n <slot name=\"description\" slot=\"description\"></slot>\n <slot name=\"content\" slot=\"content\"></slot>\n <slot name=\"footer\" slot=\"footer\"></slot>\n </px-selectable-box>\n </div>\n ";
664
+ }
665
+ constructor() {
666
+ super(O), this.shadowRoot.innerHTML = this.template(), this.internals = this.attachInternals?.();
667
+ }
668
+ connectedCallback() {
669
+ this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "checkbox", this.internals && (this.internals.role = "checkbox"), this.tabIndex = 0, this.ariaChecked = "false", this.toggleFooterVisibility(), this.$slotFooter.addEventListener("slotchange", this.toggleFooterVisibility), this.addEventListener("mouseover", this.setHoverAttribute), this.addEventListener("mouseout", this.removeHoverAttribute), this.addEventListener("keypress", this.setKeypressEvent), this.addEventListener("click", this.setClickEvent);
670
+ }
671
+ static get observedAttributes() {
672
+ return [
673
+ ...super.observedAttributes,
674
+ "inverted",
675
+ "name",
676
+ "value",
677
+ "checked",
678
+ "disabled"
679
+ ];
680
+ }
681
+ attributeChangedCallback(e, t, n) {
682
+ if (t !== n) switch (e) {
683
+ case "inverted":
684
+ this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$checkbox.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$checkbox.removeAttribute("inverted"));
685
+ break;
686
+ case "name":
687
+ case "value":
688
+ this.$checkbox && this.$checkbox.setAttribute(e, n);
689
+ break;
690
+ case "disabled":
691
+ this.handleDisabledAttributeChange(n !== null);
692
+ break;
693
+ case "checked":
694
+ this.handleCheckedAttributeChange(n);
695
+ break;
696
+ default: super.attributeChangedCallback(e, t, n);
697
+ }
698
+ }
699
+ disconnectedCallback() {
700
+ this.$slotFooter.removeEventListener("slotchange", this.toggleFooterVisibility), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent);
701
+ }
702
+ removeHoverAttribute() {
703
+ this.$checkbox.removeAttribute("hover");
704
+ }
705
+ setHoverAttribute() {
706
+ this.$checkbox.setAttribute("hover", "");
707
+ }
708
+ setKeypressEvent(e) {
709
+ e.stopPropagation(), e.preventDefault(), e.code === "Space" && this.click();
710
+ }
711
+ setClickEvent(e) {
712
+ E(e, this) || (this.checked = !this.checked, e.stopPropagation(), e.preventDefault());
713
+ }
714
+ toggleFooterVisibility() {
715
+ this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
716
+ }
717
+ handleDisabledAttributeChange(e) {
718
+ e ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$checkbox.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$checkbox.removeAttribute("disabled"));
719
+ }
720
+ handleCheckedAttributeChange(e) {
721
+ this.internals?.setFormValue(this.formData()), e === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.checked = !1, this.$checkbox && this.$checkbox.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.checked = !0, this.$checkbox && this.$checkbox.setAttribute("checked", "")), this.dispatchEvent(new Event("change", {
722
+ bubbles: !0,
723
+ composed: !0
724
+ }));
725
+ }
726
+ static get formAssociated() {
727
+ return !0;
728
+ }
729
+ formResetCallback() {
730
+ this.checked = !1;
731
+ }
732
+ formStateRestoreCallback(e) {
733
+ this.checked = e;
734
+ }
735
+ formData() {
736
+ let e = new FormData();
737
+ if (this.name) {
738
+ let t = this.getAttribute("name");
739
+ t && (this.checked ? e.set(t, this.value ?? "") : e.delete(t));
740
+ }
741
+ return e;
742
+ }
743
+ get $el() {
744
+ return this.shadowRoot.querySelector(".selectable-box-checkbox");
745
+ }
746
+ get $selectableBox() {
747
+ return this.shadowRoot.querySelector("px-selectable-box");
748
+ }
749
+ get $checkbox() {
750
+ return this.shadowRoot.querySelector("px-checkbox");
751
+ }
752
+ get $slotFooter() {
753
+ return this.shadowRoot.querySelector("slot[name=\"footer\"]");
754
+ }
755
+ get $slottedFooter() {
756
+ return this.querySelector("[slot=\"footer\"]");
757
+ }
758
+ get inverted() {
759
+ return this.hasAttribute("inverted");
760
+ }
761
+ set inverted(e) {
762
+ r(this, "inverted", e);
763
+ }
764
+ get checked() {
765
+ return this.hasAttribute("checked");
766
+ }
767
+ set checked(e) {
768
+ r(this, "checked", e);
769
+ }
770
+ get name() {
771
+ return this.getAttribute("name");
772
+ }
773
+ set name(e) {
774
+ s(this, "name", e);
775
+ }
776
+ get disabled() {
777
+ return this.hasAttribute("disabled");
778
+ }
779
+ set disabled(e) {
780
+ r(this, "disabled", e);
781
+ }
782
+ get value() {
783
+ return this.getAttribute("value");
784
+ }
785
+ set value(e) {
786
+ s(this, "value", e);
787
+ }
788
+ };
789
+ customElements.get("px-selectable-box-checkbox") || customElements.define("px-selectable-box-checkbox", k);
790
+ //#endregion
791
+ //#region src/SelectableBoxRadio.ts
792
+ var A = new CSSStyleSheet();
793
+ A.replaceSync(D);
794
+ var j = "px-selectable-box-radio-connected", M = "px-selectable-box-radio-disconnected", N = class extends t {
795
+ template() {
796
+ return "\n <div class=\"selectable-box-radio\">\n <px-selectable-box>\n <slot name=\"media\" slot=\"media\"></slot>\n <px-radio \n slot=\"action\" inert \n ></px-radio>\n <slot name=\"icon\" slot=\"icon\"></slot>\n <slot name=\"logo\" slot=\"logo\"></slot>\n <slot name=\"title\" slot=\"title\"></slot>\n <slot name=\"description\" slot=\"description\"></slot>\n <slot name=\"content\" slot=\"content\"></slot>\n <slot name=\"footer\" slot=\"footer\"></slot>\n </px-selectable-box>\n </div>\n ";
797
+ }
798
+ constructor() {
799
+ super(A), this.shadowRoot.innerHTML = this.template(), this.internals = this.attachInternals?.();
800
+ }
801
+ connectedCallback() {
802
+ this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "radio", this.internals && (this.internals.role = "radio"), this.dispatchEvent(new CustomEvent(j, {
803
+ bubbles: !0,
804
+ composed: !0
805
+ })), this.ariaChecked = "false", this.toggleFooterVisibility(), this.$slotFooter.addEventListener("slotchange", this.toggleFooterVisibility), this.addEventListener("mouseover", this.setHoverAttribute), this.addEventListener("mouseout", this.removeHoverAttribute), this.addEventListener("keypress", this.setKeypressEvent), this.addEventListener("click", this.setClickEvent);
806
+ }
807
+ static get observedAttributes() {
808
+ return [
809
+ ...super.observedAttributes,
810
+ "inverted",
811
+ "name",
812
+ "value",
813
+ "checked",
814
+ "disabled"
815
+ ];
816
+ }
817
+ attributeChangedCallback(e, t, n) {
818
+ if (t !== n) switch (e) {
819
+ case "inverted":
820
+ this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$radio.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$radio.removeAttribute("inverted"));
821
+ break;
822
+ case "name":
823
+ case "value":
824
+ this.$radio && this.$radio.setAttribute(e, n);
825
+ break;
826
+ case "disabled":
827
+ this.handleDisabledAttributeChange(n !== null);
828
+ break;
829
+ case "checked":
830
+ this.handleCheckedAttributeChange(n);
831
+ break;
832
+ default: super.attributeChangedCallback(e, t, n);
833
+ }
834
+ }
835
+ disconnectedCallback() {
836
+ this.$slotFooter.removeEventListener("slotchange", this.toggleFooterVisibility), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent), this.dispatchEvent(new CustomEvent(M, {
837
+ bubbles: !0,
838
+ composed: !0
839
+ }));
840
+ }
841
+ removeHoverAttribute() {
842
+ this.$radio.removeAttribute("hover");
843
+ }
844
+ setHoverAttribute() {
845
+ this.$radio.setAttribute("hover", "");
846
+ }
847
+ setKeypressEvent(e) {
848
+ e.preventDefault(), e.code === "Space" && this.click();
849
+ }
850
+ setClickEvent(e) {
851
+ E(e, this) || (this.checked ||= !0, e.stopPropagation(), e.preventDefault());
852
+ }
853
+ toggleFooterVisibility() {
854
+ this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
855
+ }
856
+ handleDisabledAttributeChange(e) {
857
+ e ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$radio.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$radio.removeAttribute("disabled"));
858
+ }
859
+ handleCheckedAttributeChange(e) {
860
+ this.internals?.setFormValue(this.formData()), e == null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.tabIndex = -1, this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.tabIndex = 0, this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(new Event("change", {
861
+ bubbles: !0,
862
+ composed: !0
863
+ })));
864
+ }
865
+ static get formAssociated() {
866
+ return !0;
867
+ }
868
+ formResetCallback() {
869
+ this.checked = !1;
870
+ }
871
+ formStateRestoreCallback(e) {
872
+ this.checked = e;
873
+ }
874
+ formData() {
875
+ let e = new FormData();
876
+ if (this.name) {
877
+ let t = this.getAttribute("name");
878
+ t && (this.checked ? e.set(t, this.value ?? "") : e.delete(t));
879
+ }
880
+ return e;
881
+ }
882
+ get $el() {
883
+ return this.shadowRoot.querySelector(".selectable-box-radio");
884
+ }
885
+ get $selectableBox() {
886
+ return this.shadowRoot.querySelector("px-selectable-box");
887
+ }
888
+ get $radio() {
889
+ return this.shadowRoot.querySelector("px-radio");
890
+ }
891
+ get $slotFooter() {
892
+ return this.shadowRoot.querySelector("slot[name=\"footer\"]");
893
+ }
894
+ get $slottedFooter() {
895
+ return this.querySelector("[slot=\"footer\"]");
896
+ }
897
+ get inverted() {
898
+ return this.hasAttribute("inverted");
899
+ }
900
+ set inverted(e) {
901
+ r(this, "inverted", e);
902
+ }
903
+ get checked() {
904
+ return this.hasAttribute("checked");
905
+ }
906
+ set checked(e) {
907
+ r(this, "checked", e);
908
+ }
909
+ get name() {
910
+ return this.getAttribute("name");
911
+ }
912
+ set name(e) {
913
+ s(this, "name", e);
914
+ }
915
+ get disabled() {
916
+ return this.hasAttribute("disabled");
917
+ }
918
+ set disabled(e) {
919
+ r(this, "disabled", e);
920
+ }
921
+ get value() {
922
+ return this.getAttribute("value");
923
+ }
924
+ set value(e) {
925
+ s(this, "value", e);
926
+ }
1024
927
  };
928
+ customElements.get("px-selectable-box-radio") || customElements.define("px-selectable-box-radio", N);
929
+ //#endregion
930
+ export { j as SELECTABLE_BOX_RADIO_CONNECTED_EVENT, M as SELECTABLE_BOX_RADIO_DISCONNECTED_EVENT, w as SelectableBox, k as SelectableBoxCheckbox, N as SelectableBoxRadio };