@proximus/lavender-selectablebox 2.0.0-alpha.24 → 2.0.0-alpha.242

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,605 @@
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, createTemplate as a, gapValues as o, log as s, propertyToAttributeSetter as c, renderTemplate as l } from "@proximus/lavender-common";
2
+ //#region ../Layout/src/Stack.css?inline
3
+ var u = ":host{--flex-min-width--mobile-value:auto;--flex-min-width--tablet-value:auto;--flex-min-width--laptop-value:auto;--flex-min-width--desktop-value:auto;--flex-max-width--mobile-value:none;--flex-max-width--tablet-value:none;--flex-max-width--laptop-value:none;--flex-max-width--desktop-value:none;min-width:var(--flex-min-width--mobile-value);max-width:var(--flex-max-width--mobile-value);--host-gap--mobile:var(--px-spacing-none-mobile);--host-gap--tablet:var(--px-spacing-none-tablet);--host-gap--laptop:var(--px-spacing-none-desktop);--host-gap--desktop:var(--px-spacing-none-desktop);--overflow-x-all:visible;--overflow-x-all-mobile:initial;--overflow-x-all-tablet:initial;--overflow-x-all-laptop:initial;--overflow-x-all-desktop:initial;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{--flex-direction--mobile-value:row;--flex-direction--tablet-value:row;--flex-direction--laptop-value:row;--flex-direction--desktop-value:row;--flex-gap--mobile-value:var(--px-spacing-none-mobile);--flex-gap--tablet-value:var(--px-spacing-none-tablet);--flex-gap--laptop-value:var(--px-spacing-none-desktop);--flex-gap--desktop-value:var(--px-spacing-none-desktop);--flex-align-items--mobile-value:stretch;--flex-align-items--tablet-value:stretch;--flex-align-items--laptop-value:stretch;--flex-align-items--desktop-value:stretch;--flex-justify-content--mobile-value:flex-start;--flex-justify-content--tablet-value:flex-start;--flex-justify-content--laptop-value:flex-start;--flex-justify-content--desktop-value:flex-start;--flex-wrap--mobile-value:nowrap;--flex-wrap--tablet-value:nowrap;--flex-wrap--laptop-value:nowrap;--flex-wrap--desktop-value:nowrap;--flex-overflow-y--mobile-value:visible;--flex-overflow-y--tablet-value:visible;--flex-overflow-y--laptop-value:visible;--flex-overflow-y--desktop-value:visible;--flex-max-height--mobile-value:none;--flex-max-height--tablet-value:none;--flex-max-height--laptop-value:none;--flex-max-height--desktop-value:none;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);overflow-y:var(--flex-overflow-y--mobile-value);max-height:var(--flex-max-height--mobile-value);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){:host{min-width:var(--flex-min-width--tablet-value);max-width:var(--flex-max-width--tablet-value)}.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);overflow-y:var(--flex-overflow-y--tablet-value);max-height:var(--flex-max-height--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){:host{min-width:var(--flex-min-width--laptop-value);max-width:var(--flex-max-width--laptop-value)}.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);overflow-y:var(--flex-overflow-y--laptop-value);max-height:var(--flex-max-height--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){:host{min-width:var(--flex-min-width--desktop-value);max-width:var(--flex-max-width--desktop-value)}.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-y:var(--flex-overflow-y--desktop-value);max-height:var(--flex-max-height--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))}}:host(px-vstack) .flex-container{--flex-direction--mobile-value:column!important;--flex-direction--tablet-value:column!important;--flex-direction--laptop-value:column!important;--flex-direction--desktop-value:column!important}:host(px-hstack) .flex-container{--flex-direction--mobile-value:row!important;--flex-direction--tablet-value:row!important;--flex-direction--laptop-value:row!important;--flex-direction--desktop-value:row!important}", d = new CSSStyleSheet();
4
+ d.replaceSync(u);
5
+ var f = document.createElement("template");
6
+ f.innerHTML = "<div class=\"flex-container\"><slot></slot></div>";
7
+ var p = [
8
+ "",
9
+ "default",
10
+ "row",
11
+ "row-reverse",
12
+ "column",
13
+ "column-reverse"
14
+ ], m = [
15
+ "",
16
+ "default",
17
+ "stretch",
18
+ "flex-start",
19
+ "start",
20
+ "flex-end",
21
+ "end",
22
+ "center",
23
+ "baseline"
24
+ ], h = [
25
+ "",
26
+ "default",
27
+ "flex-start",
28
+ "start",
29
+ "flex-end",
30
+ "end",
31
+ "center",
32
+ "space-between",
33
+ "space-around",
34
+ "space-evenly"
35
+ ], g = [
36
+ "",
37
+ "default",
38
+ "nowrap",
39
+ "wrap",
40
+ "wrap-reverse"
41
+ ], _ = [
42
+ "",
43
+ "visible",
44
+ "hidden",
45
+ "scroll",
46
+ "auto"
47
+ ], v = class n extends t {
48
+ constructor() {
49
+ super(d), this.overflowXAttributeDelegate = new e(this, "overflow-x", (e) => e, "--overflow-x"), this.shadowRoot.firstChild || this.shadowRoot.appendChild(document.importNode(f.content, !0));
50
+ }
51
+ connectedCallback() {}
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
+ "overflow-y",
86
+ "overflow-y--mobile",
87
+ "overflow-y--tablet",
88
+ "overflow-y--laptop",
89
+ "overflow-y--desktop",
90
+ "max-height",
91
+ "max-height--mobile",
92
+ "max-height--tablet",
93
+ "max-height--laptop",
94
+ "max-height--desktop",
95
+ "min-width",
96
+ "min-width--mobile",
97
+ "min-width--tablet",
98
+ "min-width--laptop",
99
+ "min-width--desktop",
100
+ "max-width",
101
+ "max-width--mobile",
102
+ "max-width--tablet",
103
+ "max-width--laptop",
104
+ "max-width--desktop"
105
+ ];
106
+ }
107
+ attributeChangedCallback(e, t, n) {
108
+ switch (e) {
109
+ case "gap":
110
+ case "gap--mobile":
111
+ case "gap--tablet":
112
+ case "gap--laptop":
113
+ case "gap--desktop":
114
+ this.updateFlexProperties(e, t, n, o);
115
+ break;
116
+ case "justify-content":
117
+ case "justify-content--mobile":
118
+ case "justify-content--tablet":
119
+ case "justify-content--laptop":
120
+ case "justify-content--desktop":
121
+ this.updateFlexProperties(e, t, n, h);
122
+ break;
123
+ case "align-items":
124
+ case "align-items--mobile":
125
+ case "align-items--tablet":
126
+ case "align-items--laptop":
127
+ case "align-items--desktop":
128
+ this.updateFlexProperties(e, t, n, m);
129
+ break;
130
+ case "wrap":
131
+ case "wrap--mobile":
132
+ case "wrap--tablet":
133
+ case "wrap--laptop":
134
+ case "wrap--desktop":
135
+ this.updateFlexProperties(e, t, n, g);
136
+ break;
137
+ case "direction":
138
+ case "direction--mobile":
139
+ case "direction--tablet":
140
+ case "direction--laptop":
141
+ case "direction--desktop":
142
+ this.updateFlexProperties(e, t, n, p), this.updateVerticalStyles();
143
+ break;
144
+ case "min-width":
145
+ case "min-width--mobile":
146
+ case "min-width--tablet":
147
+ case "min-width--laptop":
148
+ case "min-width--desktop":
149
+ case "max-width":
150
+ case "max-width--mobile":
151
+ case "max-width--tablet":
152
+ case "max-width--laptop":
153
+ case "max-width--desktop":
154
+ n && !CSS.supports(e.split("--")[0], n) && s(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}.`), this.updateFlexProperties(e, t, n);
155
+ break;
156
+ case "overflow-y":
157
+ case "overflow-y--mobile":
158
+ case "overflow-y--tablet":
159
+ case "overflow-y--laptop":
160
+ case "overflow-y--desktop":
161
+ case "max-height":
162
+ case "max-height--mobile":
163
+ case "max-height--tablet":
164
+ case "max-height--laptop":
165
+ case "max-height--desktop":
166
+ n && !this.isValidVerticalValue(e, n) && s(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}.`), this.updateVerticalStyles();
167
+ break;
168
+ case "overflow-x":
169
+ case "overflow-x--mobile":
170
+ case "overflow-x--tablet":
171
+ case "overflow-x--laptop":
172
+ case "overflow-x--desktop":
173
+ this.updateOverflowX(e, t, n, _);
174
+ break;
175
+ default: super.attributeChangedCallback(e, t, n);
176
+ }
177
+ }
178
+ isValidVerticalValue(e, t) {
179
+ return e.startsWith("overflow-y") ? _.includes(t) : CSS.supports("max-height", t);
180
+ }
181
+ updateVerticalStyles() {
182
+ for (let e of n.breakpoints) {
183
+ let t = this.localName === "px-stack" && this.getAttribute(`direction--${e}`) || this.direction, n = t === "column" || t === "column-reverse";
184
+ for (let t of ["overflow-y", "max-height"]) {
185
+ let r = this.getAttribute(`${t}--${e}`) || this.getAttribute(t);
186
+ this.updateStyle(t, e, n && r && this.isValidVerticalValue(t, r) ? r : null);
187
+ }
188
+ }
189
+ }
190
+ updateOverflowX(e, t, n, r) {
191
+ i(r, n) ? this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n) : s(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
192
+ }
193
+ updateFlexProperties(e, t, r, i) {
194
+ i && r !== null && !this.checkName(i, r) && s(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
195
+ let a = e.indexOf("--");
196
+ if (a === -1) for (let t of n.breakpoints) this.getAttribute(`${e}--${t}`) || this.updateStyle(e, t, r, i);
197
+ else {
198
+ let t = e.slice(0, a), n = e.slice(a + 2);
199
+ this.updateStyle(t, n, r || this.getAttribute(t), i);
200
+ }
201
+ }
202
+ updateStyle(e, t, n, r) {
203
+ let i = `--flex-${e}--${t}-value`, a = e === "gap", o = e === "min-width" || e === "max-width", s = o ? this : this.$el;
204
+ if (o && n && !CSS.supports(e, n) && (n = null), !n) s.style.removeProperty(i), a && this.style.removeProperty(`--host-gap--${t}`);
205
+ else if (a && r && r.includes(n)) {
206
+ let e = `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`;
207
+ this.$el.style.setProperty(i, e), this.style.setProperty(`--host-gap--${t}`, e);
208
+ } else s.style.setProperty(i, n);
209
+ }
210
+ static {
211
+ this.breakpoints = [
212
+ "mobile",
213
+ "tablet",
214
+ "laptop",
215
+ "desktop"
216
+ ];
217
+ }
218
+ get direction() {
219
+ return this.getAttribute("direction") ?? "row";
220
+ }
221
+ set direction(e) {
222
+ c(this, "direction", e);
223
+ }
224
+ get directionMobile() {
225
+ return this.getAttribute("direction--mobile");
226
+ }
227
+ set directionMobile(e) {
228
+ c(this, "direction--mobile", e);
229
+ }
230
+ get directionTablet() {
231
+ return this.getAttribute("direction--tablet");
232
+ }
233
+ set directionTablet(e) {
234
+ c(this, "direction--tablet", e);
235
+ }
236
+ get directionLaptop() {
237
+ return this.getAttribute("direction--laptop");
238
+ }
239
+ set directionLaptop(e) {
240
+ c(this, "direction--laptop", e);
241
+ }
242
+ get directionDesktop() {
243
+ return this.getAttribute("direction--desktop");
244
+ }
245
+ set directionDesktop(e) {
246
+ c(this, "direction--desktop", e);
247
+ }
248
+ get gap() {
249
+ return this.getAttribute("gap") ?? "none";
250
+ }
251
+ set gap(e) {
252
+ c(this, "gap", e);
253
+ }
254
+ get gapMobile() {
255
+ return this.getAttribute("gap--mobile");
256
+ }
257
+ set gapMobile(e) {
258
+ c(this, "gap--mobile", e);
259
+ }
260
+ get gapTablet() {
261
+ return this.getAttribute("gap--tablet");
262
+ }
263
+ set gapTablet(e) {
264
+ c(this, "gap--tablet", e);
265
+ }
266
+ get gapLaptop() {
267
+ return this.getAttribute("gap--laptop");
268
+ }
269
+ set gapLaptop(e) {
270
+ c(this, "gap--laptop", e);
271
+ }
272
+ get gapDesktop() {
273
+ return this.getAttribute("gap--desktop");
274
+ }
275
+ set gapDesktop(e) {
276
+ c(this, "gap--desktop", e);
277
+ }
278
+ get justifyContent() {
279
+ return this.getAttribute("justify-content") ?? "flex-start";
280
+ }
281
+ set justifyContent(e) {
282
+ c(this, "justify-content", e);
283
+ }
284
+ get justifyContentMobile() {
285
+ return this.getAttribute("justify-content--mobile");
286
+ }
287
+ set justifyContentMobile(e) {
288
+ c(this, "justify-content--mobile", e);
289
+ }
290
+ get justifyContentTablet() {
291
+ return this.getAttribute("justify-content--tablet");
292
+ }
293
+ set justifyContentTablet(e) {
294
+ c(this, "justify-content--tablet", e);
295
+ }
296
+ get justifyContentLaptop() {
297
+ return this.getAttribute("justify-content--laptop");
298
+ }
299
+ set justifyContentLaptop(e) {
300
+ c(this, "justify-content--laptop", e);
301
+ }
302
+ get justifyContentDesktop() {
303
+ return this.getAttribute("justify-content--desktop");
304
+ }
305
+ set justifyContentDesktop(e) {
306
+ c(this, "justify-content--desktop", e);
307
+ }
308
+ get alignItems() {
309
+ return this.getAttribute("align-items") ?? "stretch";
310
+ }
311
+ set alignItems(e) {
312
+ c(this, "align-items", e);
313
+ }
314
+ get alignItemsMobile() {
315
+ return this.getAttribute("align-items--mobile");
316
+ }
317
+ set alignItemsMobile(e) {
318
+ c(this, "align-items--mobile", e);
319
+ }
320
+ get alignItemsTablet() {
321
+ return this.getAttribute("align-items--tablet");
322
+ }
323
+ set alignItemsTablet(e) {
324
+ c(this, "align-items--tablet", e);
325
+ }
326
+ get alignItemsLaptop() {
327
+ return this.getAttribute("align-items--laptop");
328
+ }
329
+ set alignItemsLaptop(e) {
330
+ c(this, "align-items--laptop", e);
331
+ }
332
+ get alignItemsDesktop() {
333
+ return this.getAttribute("align-items--desktop");
334
+ }
335
+ set alignItemsDesktop(e) {
336
+ c(this, "align-items--desktop", e);
337
+ }
338
+ get wrap() {
339
+ return this.getAttribute("wrap") ?? "nowrap";
340
+ }
341
+ set wrap(e) {
342
+ c(this, "wrap", e);
343
+ }
344
+ get wrapMobile() {
345
+ return this.getAttribute("wrap--mobile");
346
+ }
347
+ set wrapMobile(e) {
348
+ c(this, "wrap--mobile", e);
349
+ }
350
+ get wrapTablet() {
351
+ return this.getAttribute("wrap--tablet");
352
+ }
353
+ set wrapTablet(e) {
354
+ c(this, "wrap--tablet", e);
355
+ }
356
+ get wrapLaptop() {
357
+ return this.getAttribute("wrap--laptop");
358
+ }
359
+ set wrapLaptop(e) {
360
+ c(this, "wrap--laptop", e);
361
+ }
362
+ get wrapDesktop() {
363
+ return this.getAttribute("wrap--desktop");
364
+ }
365
+ set wrapDesktop(e) {
366
+ c(this, "wrap--desktop", e);
367
+ }
368
+ get overflowX() {
369
+ return this.getAttribute("overflow-x") ?? "visible";
370
+ }
371
+ set overflowX(e) {
372
+ c(this, "overflow-x", e);
373
+ }
374
+ get overflowXMobile() {
375
+ return this.getAttribute("overflow-x--mobile");
376
+ }
377
+ set overflowXMobile(e) {
378
+ c(this, "overflow-x--mobile", e);
379
+ }
380
+ get overflowXTablet() {
381
+ return this.getAttribute("overflow-x--tablet");
382
+ }
383
+ set overflowXTablet(e) {
384
+ c(this, "overflow-x--tablet", e);
385
+ }
386
+ get overflowXLaptop() {
387
+ return this.getAttribute("overflow-x--laptop");
388
+ }
389
+ set overflowXLaptop(e) {
390
+ c(this, "overflow-x--laptop", e);
391
+ }
392
+ get overflowXDesktop() {
393
+ return this.getAttribute("overflow-x--desktop");
394
+ }
395
+ set overflowXDesktop(e) {
396
+ c(this, "overflow-x--desktop", e);
397
+ }
398
+ get overflowY() {
399
+ return this.getAttribute("overflow-y") ?? "visible";
400
+ }
401
+ set overflowY(e) {
402
+ c(this, "overflow-y", e);
403
+ }
404
+ get overflowYMobile() {
405
+ return this.getAttribute("overflow-y--mobile");
406
+ }
407
+ set overflowYMobile(e) {
408
+ c(this, "overflow-y--mobile", e);
409
+ }
410
+ get overflowYTablet() {
411
+ return this.getAttribute("overflow-y--tablet");
412
+ }
413
+ set overflowYTablet(e) {
414
+ c(this, "overflow-y--tablet", e);
415
+ }
416
+ get overflowYLaptop() {
417
+ return this.getAttribute("overflow-y--laptop");
418
+ }
419
+ set overflowYLaptop(e) {
420
+ c(this, "overflow-y--laptop", e);
421
+ }
422
+ get overflowYDesktop() {
423
+ return this.getAttribute("overflow-y--desktop");
424
+ }
425
+ set overflowYDesktop(e) {
426
+ c(this, "overflow-y--desktop", e);
427
+ }
428
+ get maxHeight() {
429
+ return this.getAttribute("max-height") ?? "none";
430
+ }
431
+ set maxHeight(e) {
432
+ c(this, "max-height", e);
433
+ }
434
+ get maxHeightMobile() {
435
+ return this.getAttribute("max-height--mobile");
436
+ }
437
+ set maxHeightMobile(e) {
438
+ c(this, "max-height--mobile", e);
439
+ }
440
+ get maxHeightTablet() {
441
+ return this.getAttribute("max-height--tablet");
442
+ }
443
+ set maxHeightTablet(e) {
444
+ c(this, "max-height--tablet", e);
445
+ }
446
+ get maxHeightLaptop() {
447
+ return this.getAttribute("max-height--laptop");
448
+ }
449
+ set maxHeightLaptop(e) {
450
+ c(this, "max-height--laptop", e);
451
+ }
452
+ get maxHeightDesktop() {
453
+ return this.getAttribute("max-height--desktop");
454
+ }
455
+ set maxHeightDesktop(e) {
456
+ c(this, "max-height--desktop", e);
457
+ }
458
+ get minWidth() {
459
+ return this.getAttribute("min-width") ?? "auto";
460
+ }
461
+ set minWidth(e) {
462
+ c(this, "min-width", e);
463
+ }
464
+ get minWidthMobile() {
465
+ return this.getAttribute("min-width--mobile");
466
+ }
467
+ set minWidthMobile(e) {
468
+ c(this, "min-width--mobile", e);
469
+ }
470
+ get minWidthTablet() {
471
+ return this.getAttribute("min-width--tablet");
472
+ }
473
+ set minWidthTablet(e) {
474
+ c(this, "min-width--tablet", e);
475
+ }
476
+ get minWidthLaptop() {
477
+ return this.getAttribute("min-width--laptop");
478
+ }
479
+ set minWidthLaptop(e) {
480
+ c(this, "min-width--laptop", e);
481
+ }
482
+ get minWidthDesktop() {
483
+ return this.getAttribute("min-width--desktop");
484
+ }
485
+ set minWidthDesktop(e) {
486
+ c(this, "min-width--desktop", e);
487
+ }
488
+ get maxWidth() {
489
+ return this.getAttribute("max-width") ?? "none";
490
+ }
491
+ set maxWidth(e) {
492
+ c(this, "max-width", e);
493
+ }
494
+ get maxWidthMobile() {
495
+ return this.getAttribute("max-width--mobile");
496
+ }
497
+ set maxWidthMobile(e) {
498
+ c(this, "max-width--mobile", e);
499
+ }
500
+ get maxWidthTablet() {
501
+ return this.getAttribute("max-width--tablet");
502
+ }
503
+ set maxWidthTablet(e) {
504
+ c(this, "max-width--tablet", e);
505
+ }
506
+ get maxWidthLaptop() {
507
+ return this.getAttribute("max-width--laptop");
508
+ }
509
+ set maxWidthLaptop(e) {
510
+ c(this, "max-width--laptop", e);
511
+ }
512
+ get maxWidthDesktop() {
513
+ return this.getAttribute("max-width--desktop");
514
+ }
515
+ set maxWidthDesktop(e) {
516
+ c(this, "max-width--desktop", e);
517
+ }
518
+ get $el() {
519
+ return this.shadowRoot.firstElementChild;
520
+ }
521
+ };
522
+ customElements.get("px-stack") || customElements.define("px-stack", v);
523
+ var y = (e) => e === "direction" || e.startsWith("direction--"), b = class extends v {
524
+ get direction() {
525
+ return "column";
526
+ }
527
+ set direction(e) {
528
+ c(this, "direction", e);
529
+ }
530
+ attributeChangedCallback(e, t, n) {
531
+ y(e) || super.attributeChangedCallback(e, t, n);
532
+ }
533
+ };
534
+ customElements.get("px-vstack") || customElements.define("px-vstack", b);
535
+ var x = class extends v {
536
+ get direction() {
537
+ return "row";
538
+ }
539
+ set direction(e) {
540
+ c(this, "direction", e);
541
+ }
542
+ attributeChangedCallback(e, t, n) {
543
+ y(e) || super.attributeChangedCallback(e, t, n);
544
+ }
545
+ };
546
+ customElements.get("px-hstack") || customElements.define("px-hstack", x);
547
+ //#endregion
548
+ //#region ../Layout/src/Spacer.ts
549
+ var S = class extends HTMLElement {
550
+ constructor() {
551
+ super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
552
+ }
553
+ static get observedAttributes() {
554
+ return ["grow", "nogap"];
555
+ }
556
+ attributeChangedCallback(e, t, n) {
557
+ e === "grow" && (this.growValue = n || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
558
+ }
559
+ connectedCallback() {
560
+ this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && this.parentElement && (this.resizeObserver = new ResizeObserver(() => {
561
+ this.handleSizeChange();
562
+ }), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
563
+ }
564
+ disconnectedCallback() {
565
+ this.resizeObserver?.disconnect(), this.recheckHandle &&= (cancelAnimationFrame(this.recheckHandle), void 0);
566
+ }
567
+ get grow() {
568
+ return this.getAttribute("grow");
569
+ }
570
+ set grow(e) {
571
+ this.setAttribute("grow", `${e}`);
572
+ }
573
+ scheduleRecheck() {
574
+ this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
575
+ this.recheckHandle = void 0, this.recalculateVisibility();
576
+ });
577
+ }
578
+ recalculateVisibility() {
579
+ this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
580
+ }
581
+ handleSizeChange() {
582
+ let e = this.getBoundingClientRect(), t = e.width === 0 && !this.isVertical || e.height === 0 && this.isVertical;
583
+ this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
584
+ }
585
+ updateParticipation() {
586
+ this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
587
+ }
588
+ get nogap() {
589
+ return this.hasAttribute("nogap");
590
+ }
591
+ set nogap(e) {
592
+ e ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
593
+ }
594
+ };
595
+ customElements.get("px-spacer") || customElements.define("px-spacer", S);
596
+ //#endregion
597
+ //#region ../Layout/src/Page.css?inline
598
+ var C = ":host{box-sizing:border-box;display:block}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", w = new CSSStyleSheet();
599
+ w.replaceSync(C);
600
+ var T = class extends t {
601
+ constructor() {
602
+ super(w), this.template = () => `
424
603
  <px-container border-radius="none" padding="none">
425
604
  <px-vstack>
426
605
  <px-container id="header-container" border-radius="none">
@@ -457,15 +636,6 @@ class j extends n {
457
636
  <px-spacer></px-spacer>
458
637
  </px-hstack>
459
638
  </px-container>
460
- ${t ? ` <px-hstack>
461
- <px-spacer></px-spacer>
462
- <px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
463
- <px-vstack gap="s">
464
- <slot name="image-sticky-container"></slot>
465
- </px-vstack>
466
- </px-container>
467
- <px-spacer></px-spacer>
468
- </px-hstack>` : ""}
469
639
  <px-container
470
640
  id="body-container"
471
641
  id="main"
@@ -522,499 +692,459 @@ class j extends n {
522
692
  </px-container>
523
693
  </px-vstack>
524
694
  </px-container>
525
- `, 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
- ></px-checkbox>
690
- <slot name="icon" slot="icon"></slot>
691
- <slot name="logo" slot="logo"></slot>
692
- <slot name="title" slot="title"></slot>
693
- <slot name="description" slot="description"></slot>
694
- <slot name="content" slot="content"></slot>
695
- <slot name="footer" slot="footer"></slot>
696
- </px-selectable-box>
697
- </div>
698
- `;
699
- }
700
- constructor() {
701
- var t;
702
- super(f), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this);
703
- }
704
- connectedCallback() {
705
- this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.name && this.$checkbox.setAttribute("name", this.name), this.value && this.$checkbox.setAttribute("value", this.value), this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.tabIndex = 0, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
706
- "slotchange",
707
- this.toggleFooterVisibility
708
- ), 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);
709
- }
710
- static get observedAttributes() {
711
- return [
712
- ...super.observedAttributes,
713
- "inverted",
714
- "name",
715
- "value",
716
- "checked",
717
- "disabled"
718
- ];
719
- }
720
- attributeChangedCallback(t, e, i) {
721
- if (e !== i)
722
- switch (t) {
723
- case "inverted":
724
- this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$checkbox.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$checkbox.removeAttribute("inverted"));
725
- break;
726
- case "name":
727
- case "value":
728
- this.$checkbox && this.$checkbox.setAttribute(t, i);
729
- break;
730
- case "disabled":
731
- this.handleDisabledAttributeChange(i !== null);
732
- break;
733
- case "checked":
734
- this.handleCheckedAttributeChange(i);
735
- break;
736
- default:
737
- super.attributeChangedCallback(t, e, i);
738
- break;
739
- }
740
- }
741
- disconnectedCallback() {
742
- this.$slotFooter.removeEventListener(
743
- "slotchange",
744
- this.toggleFooterVisibility
745
- ), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent);
746
- }
747
- removeHoverAttribute() {
748
- this.$checkbox.removeAttribute("hover");
749
- }
750
- setHoverAttribute() {
751
- this.$checkbox.setAttribute("hover", "");
752
- }
753
- setKeypressEvent(t) {
754
- switch (t.stopPropagation(), t.preventDefault(), t.code) {
755
- case "Space":
756
- this.click();
757
- break;
758
- }
759
- }
760
- setClickEvent(t) {
761
- this.checked = !this.checked, t.stopPropagation(), t.preventDefault();
762
- }
763
- toggleFooterVisibility() {
764
- this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
765
- }
766
- handleDisabledAttributeChange(t) {
767
- 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"));
768
- }
769
- handleCheckedAttributeChange(t) {
770
- var e;
771
- (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(
772
- new Event("change", {
773
- bubbles: !0,
774
- composed: !0
775
- // Allow the event to pass through shadow DOM boundaries
776
- })
777
- ));
778
- }
779
- // Form-associated callbacks
780
- static get formAssociated() {
781
- return !0;
782
- }
783
- // Set default behavior when the element is attached to a form
784
- formResetCallback() {
785
- this.checked = !1;
786
- }
787
- formStateRestoreCallback(t) {
788
- this.checked = t;
789
- }
790
- formData() {
791
- if (this.name) {
792
- const t = new FormData(), e = this.getAttribute("name");
793
- return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
794
- }
795
- }
796
- get $el() {
797
- return this.shadowRoot.querySelector(
798
- ".selectable-box-checkbox"
799
- );
800
- }
801
- get $selectableBox() {
802
- return this.shadowRoot.querySelector("px-selectable-box");
803
- }
804
- get $checkbox() {
805
- return this.shadowRoot.querySelector("px-checkbox");
806
- }
807
- get $slotFooter() {
808
- return this.shadowRoot.querySelector(
809
- 'slot[name="footer"]'
810
- );
811
- }
812
- get $slottedFooter() {
813
- return this.querySelector('[slot="footer"]');
814
- }
815
- get inverted() {
816
- return this.hasAttribute("inverted");
817
- }
818
- set inverted(t) {
819
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
820
- }
821
- get checked() {
822
- return this.hasAttribute("checked");
823
- }
824
- set checked(t) {
825
- t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
826
- }
827
- get name() {
828
- return this.getAttribute("name");
829
- }
830
- set name(t) {
831
- t ? this.setAttribute("name", t) : this.removeAttribute("name");
832
- }
833
- get disabled() {
834
- return this.hasAttribute("disabled");
835
- }
836
- set disabled(t) {
837
- t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
838
- }
839
- get value() {
840
- return this.getAttribute("value");
841
- }
842
- set value(t) {
843
- t ? this.setAttribute("value", t) : this.removeAttribute("value");
844
- }
845
- }
846
- customElements.get("px-selectable-box-checkbox") || customElements.define("px-selectable-box-checkbox", H);
847
- const x = new CSSStyleSheet();
848
- x.replaceSync(g);
849
- class q extends n {
850
- template() {
851
- return `
852
- <div class="selectable-box-radio">
853
- <px-selectable-box>
854
- <slot name="media" slot="media"></slot>
855
- <px-radio
856
- slot="action" inert
857
- ></px-radio>
858
- <slot name="icon" slot="icon"></slot>
859
- <slot name="logo" slot="logo"></slot>
860
- <slot name="title" slot="title"></slot>
861
- <slot name="description" slot="description"></slot>
862
- <slot name="content" slot="content"></slot>
863
- <slot name="footer" slot="footer"></slot>
864
- </px-selectable-box>
865
- </div>
866
- `;
867
- }
868
- constructor() {
869
- var t;
870
- super(x), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this);
871
- }
872
- connectedCallback() {
873
- var t;
874
- this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.name && this.$radio.setAttribute("name", this.name), this.value && this.$radio.setAttribute("value", this.value), this.role = "radio", this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`, this.tabIndex = ((t = this.parentElement) == null ? void 0 : t.firstElementChild) === this ? 0 : -1, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
875
- "slotchange",
876
- this.toggleFooterVisibility
877
- ), 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);
878
- }
879
- static get observedAttributes() {
880
- return [
881
- ...super.observedAttributes,
882
- "inverted",
883
- "name",
884
- "value",
885
- "checked",
886
- "disabled"
887
- ];
888
- }
889
- attributeChangedCallback(t, e, i) {
890
- if (e !== i)
891
- switch (t) {
892
- case "inverted":
893
- this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$radio.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$radio.removeAttribute("inverted"));
894
- break;
895
- case "name":
896
- case "value":
897
- this.$radio && this.$radio.setAttribute(t, i);
898
- break;
899
- case "disabled":
900
- this.handleDisabledAttributeChange(i !== null);
901
- break;
902
- case "checked":
903
- this.handleCheckedAttributeChange(i);
904
- break;
905
- default:
906
- super.attributeChangedCallback(t, e, i);
907
- break;
908
- }
909
- }
910
- disconnectedCallback() {
911
- this.$slotFooter.removeEventListener(
912
- "slotchange",
913
- this.toggleFooterVisibility
914
- ), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent);
915
- }
916
- removeHoverAttribute() {
917
- this.$radio.removeAttribute("hover");
918
- }
919
- setHoverAttribute() {
920
- this.$radio.setAttribute("hover", "");
921
- }
922
- setKeypressEvent(t) {
923
- switch (t.preventDefault(), t.code) {
924
- case "Space":
925
- this.click();
926
- break;
927
- }
928
- }
929
- setClickEvent(t) {
930
- this.checked || (this.checked = !0), t.stopPropagation(), t.preventDefault();
931
- }
932
- toggleFooterVisibility() {
933
- this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
934
- }
935
- handleDisabledAttributeChange(t) {
936
- 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"));
937
- }
938
- handleCheckedAttributeChange(t) {
939
- var e;
940
- (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(
941
- new Event("change", {
942
- bubbles: !0,
943
- composed: !0
944
- // Allow the event to pass through shadow DOM boundaries
945
- })
946
- ));
947
- }
948
- // Form-associated callbacks
949
- static get formAssociated() {
950
- return !0;
951
- }
952
- // Set default behavior when the element is attached to a form
953
- formResetCallback() {
954
- this.checked = !1;
955
- }
956
- formStateRestoreCallback(t) {
957
- this.checked = t;
958
- }
959
- formData() {
960
- if (this.name) {
961
- const t = new FormData(), e = this.getAttribute("name");
962
- return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
963
- }
964
- }
965
- get $el() {
966
- return this.shadowRoot.querySelector(
967
- ".selectable-box-radio"
968
- );
969
- }
970
- get $selectableBox() {
971
- return this.shadowRoot.querySelector("px-selectable-box");
972
- }
973
- get $radio() {
974
- return this.shadowRoot.querySelector("px-radio");
975
- }
976
- get $slotFooter() {
977
- return this.shadowRoot.querySelector(
978
- 'slot[name="footer"]'
979
- );
980
- }
981
- get $slottedFooter() {
982
- return this.querySelector('[slot="footer"]');
983
- }
984
- get inverted() {
985
- return this.hasAttribute("inverted");
986
- }
987
- set inverted(t) {
988
- t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
989
- }
990
- get checked() {
991
- return this.hasAttribute("checked");
992
- }
993
- set checked(t) {
994
- t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
995
- }
996
- get name() {
997
- return this.getAttribute("name");
998
- }
999
- set name(t) {
1000
- t ? this.setAttribute("name", t) : this.removeAttribute("name");
1001
- }
1002
- get disabled() {
1003
- return this.hasAttribute("disabled");
1004
- }
1005
- set disabled(t) {
1006
- t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
1007
- }
1008
- get value() {
1009
- return this.getAttribute("value");
1010
- }
1011
- set value(t) {
1012
- t ? this.setAttribute("value", t) : this.removeAttribute("value");
1013
- }
695
+ `, l(this.shadowRoot, this.template());
696
+ }
697
+ static get observedAttributes() {
698
+ return [
699
+ ...super.observedAttributes,
700
+ "background-image",
701
+ "gap",
702
+ "background-color",
703
+ "padding-vertical",
704
+ "padding-horizontal"
705
+ ];
706
+ }
707
+ get $wideImage() {
708
+ return this.shadowRoot.querySelector("#image-box");
709
+ }
710
+ get $bodyVStackContainer() {
711
+ return this.shadowRoot.querySelector("#header-vstack-container");
712
+ }
713
+ get $bodyContainer() {
714
+ return this.shadowRoot.querySelector("#body-container");
715
+ }
716
+ get $contactContainer() {
717
+ return this.shadowRoot.querySelector("#contact-container");
718
+ }
719
+ get $footerContainer() {
720
+ return this.shadowRoot.querySelector("#footer-container");
721
+ }
722
+ get $headerContainer() {
723
+ return this.shadowRoot.querySelector("#header-container");
724
+ }
725
+ get $imageContainer() {
726
+ return this.shadowRoot.querySelector("#image-container");
727
+ }
728
+ get backgroundImage() {
729
+ return this.getAttribute("background-image");
730
+ }
731
+ get $main() {
732
+ return this.shadowRoot.querySelector("#main");
733
+ }
734
+ get backgroundColor() {
735
+ return this.getAttribute("background-color") || "none";
736
+ }
737
+ get paddingVertical() {
738
+ return this.getAttribute("padding-vertical");
739
+ }
740
+ get paddingHorizontal() {
741
+ return this.getAttribute("padding-horizontal");
742
+ }
743
+ set paddingVertical(e) {
744
+ this.setAttribute("padding-vertical", `${e}`);
745
+ }
746
+ set paddingHorizontal(e) {
747
+ this.setAttribute("padding-horizontal", `${e}`);
748
+ }
749
+ get gap() {
750
+ return this.getAttribute("gap");
751
+ }
752
+ connectedCallback() {
753
+ this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
754
+ }
755
+ attributeChangedCallback(e, t, r) {
756
+ if (t !== r) switch (e) {
757
+ case "background-image":
758
+ this.$imageContainer.setAttribute("background-image", r);
759
+ break;
760
+ case "gap":
761
+ this.$bodyVStackContainer.setAttribute("gap", r);
762
+ break;
763
+ case "background-color":
764
+ this.$bodyContainer.setAttribute("background-color", n.indexOf(r) > 0 ? r : "none");
765
+ break;
766
+ case "padding-vertical":
767
+ this.handlePaddingVerticalChange(r);
768
+ break;
769
+ case "padding-horizontal":
770
+ this.handlePaddingHorizontalChange(r);
771
+ break;
772
+ default: super.attributeChangedCallback(e, t, r);
773
+ }
774
+ }
775
+ handlePaddingVerticalChange(e) {
776
+ this.$bodyContainer.paddingTop = e, this.$bodyContainer.paddingBottom = e;
777
+ }
778
+ handlePaddingHorizontalChange(e) {
779
+ 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;
780
+ }
781
+ };
782
+ customElements.get("px-page") === void 0 && customElements.define("px-page", T);
783
+ //#endregion
784
+ //#region src/selectable-box.css?inline
785
+ var E = ":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{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);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}:host([footer-position=bottom]) .info{flex-direction:column}:host([footer-position=bottom]) .info__body{flex-basis:auto}:host([footer-position=bottom]) .info__footer{flex:none;justify-content:center}:host([footer-position=right]) .info{flex-direction:row}:host([footer-position=right]) .info__body{flex:7 1 0}:host([footer-position=right]) .info__footer{flex:3 1 0;align-items:center;display:flex}@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 ::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 ::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 ::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 ::slotted([slot=content]){color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info .info__footer{background:var(--px-color-background-container-default-inverted)}", D = new CSSStyleSheet();
786
+ D.replaceSync(E);
787
+ var O = [
788
+ "",
789
+ "right",
790
+ "bottom"
791
+ ], k = class e extends t {
792
+ static {
793
+ this.template = a("<div class=\"selectable-box\"><slot name=\"media\"></slot><div class=\"info\"><div class=\"info__body\"><div class=\"header\"><slot name=\"action\"></slot><slot name=\"icon\"></slot><slot name=\"logo\"></slot><div class=\"titles\"><slot name=\"title\"></slot><slot name=\"description\"></slot></div></div><slot name=\"content\"></slot></div><div class=\"info__footer\"><slot name=\"footer\"></slot></div></div></div>");
794
+ }
795
+ constructor() {
796
+ super(D), l(this.shadowRoot, e.template);
797
+ }
798
+ static get observedAttributes() {
799
+ return [
800
+ ...super.observedAttributes,
801
+ "inverted",
802
+ "hide-footer",
803
+ "footer-position"
804
+ ];
805
+ }
806
+ attributeChangedCallback(e, t, n) {
807
+ if (t !== n) switch (e) {
808
+ case "footer-position":
809
+ this.#e(n, O);
810
+ break;
811
+ default: super.attributeChangedCallback(e, t, n);
812
+ }
813
+ }
814
+ #e(e, t) {
815
+ i(t, e) || s(`
816
+ "${e}" is not a valid footer-position value for ${this.tagName.toLowerCase()}.
817
+ Allowed values are: "${t.join("\", \"")}".
818
+ `);
819
+ }
820
+ get $el() {
821
+ return this.shadowRoot.querySelector(".selectable-box");
822
+ }
823
+ get inverted() {
824
+ return this.hasAttribute("inverted");
825
+ }
826
+ set inverted(e) {
827
+ e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
828
+ }
829
+ get hideFooter() {
830
+ return this.hasAttribute("hide-footer");
831
+ }
832
+ set hideFooter(e) {
833
+ e ? this.setAttribute("hide-footer", "") : this.removeAttribute("hide-footer");
834
+ }
835
+ get footerPosition() {
836
+ return this.getAttribute("footer-position") ?? "";
837
+ }
838
+ set footerPosition(e) {
839
+ e ? this.setAttribute("footer-position", e) : this.removeAttribute("footer-position");
840
+ }
841
+ };
842
+ customElements.get("px-selectable-box") || customElements.define("px-selectable-box", k);
843
+ //#endregion
844
+ //#region src/clickEventGuards.ts
845
+ var A = ["px-a", "px-button"];
846
+ function j(e, t, n = A) {
847
+ let r = new Set(n), i = e.composedPath();
848
+ for (let e of i) {
849
+ if (e === t) break;
850
+ if (e instanceof Element && r.has(e.tagName.toLowerCase())) return !0;
851
+ }
852
+ return !1;
1014
853
  }
1015
- customElements.get("px-selectable-box-radio") || customElements.define("px-selectable-box-radio", q);
1016
- export {
1017
- F as SelectableBox,
1018
- H as SelectableBoxCheckbox,
1019
- q as SelectableBoxRadio
854
+ //#endregion
855
+ //#region src/common.css?inline
856
+ var M = ":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)}", N = new CSSStyleSheet();
857
+ N.replaceSync(M);
858
+ var P = class e extends t {
859
+ static {
860
+ this.template = a("<div class=\"selectable-box-checkbox\"><px-selectable-box><slot name=\"media\" slot=\"media\"></slot><px-checkbox \n slot=\"action\" inert \n ></px-checkbox><slot name=\"icon\" slot=\"icon\"></slot><slot name=\"logo\" slot=\"logo\"></slot><slot name=\"title\" slot=\"title\"></slot><slot name=\"description\" slot=\"description\"></slot><slot name=\"content\" slot=\"content\"></slot><slot name=\"footer\" slot=\"footer\"></slot></px-selectable-box></div>");
861
+ }
862
+ constructor() {
863
+ super(N), l(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
864
+ }
865
+ connectedCallback() {
866
+ this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "checkbox", this.internals && (this.internals.role = "checkbox"), this.tabIndex = 0, this.ariaChecked = `${this.checked}`, 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);
867
+ }
868
+ static get observedAttributes() {
869
+ return [
870
+ ...super.observedAttributes,
871
+ "inverted",
872
+ "name",
873
+ "value",
874
+ "checked",
875
+ "disabled",
876
+ "footer-position"
877
+ ];
878
+ }
879
+ attributeChangedCallback(e, t, n) {
880
+ if (t !== n) switch (e) {
881
+ case "inverted":
882
+ this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$checkbox.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$checkbox.removeAttribute("inverted"));
883
+ break;
884
+ case "name":
885
+ case "value":
886
+ this.$checkbox && this.$checkbox.setAttribute(e, n);
887
+ break;
888
+ case "disabled":
889
+ this.handleDisabledAttributeChange(n !== null);
890
+ break;
891
+ case "checked":
892
+ this.handleCheckedAttributeChange(n);
893
+ break;
894
+ case "footer-position":
895
+ this.$selectableBox && this.$selectableBox.setAttribute("footer-position", n);
896
+ break;
897
+ default: super.attributeChangedCallback(e, t, n);
898
+ }
899
+ }
900
+ disconnectedCallback() {
901
+ 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);
902
+ }
903
+ removeHoverAttribute() {
904
+ this.$checkbox.removeAttribute("hover");
905
+ }
906
+ setHoverAttribute() {
907
+ this.$checkbox.setAttribute("hover", "");
908
+ }
909
+ setKeypressEvent(e) {
910
+ e.stopPropagation(), e.preventDefault(), e.code === "Space" && this.click();
911
+ }
912
+ setClickEvent(e) {
913
+ j(e, this) || (this.checked = !this.checked, e.stopPropagation(), e.preventDefault());
914
+ }
915
+ toggleFooterVisibility() {
916
+ this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
917
+ }
918
+ handleDisabledAttributeChange(e) {
919
+ 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"));
920
+ }
921
+ handleCheckedAttributeChange(e) {
922
+ 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", {
923
+ bubbles: !0,
924
+ composed: !0
925
+ }));
926
+ }
927
+ static get formAssociated() {
928
+ return !0;
929
+ }
930
+ formResetCallback() {
931
+ this.checked = !1;
932
+ }
933
+ formStateRestoreCallback(e) {
934
+ this.checked = e;
935
+ }
936
+ formData() {
937
+ let e = new FormData();
938
+ if (this.name) {
939
+ let t = this.getAttribute("name");
940
+ t && (this.checked ? e.set(t, this.value ?? "") : e.delete(t));
941
+ }
942
+ return e;
943
+ }
944
+ get $el() {
945
+ return this.shadowRoot.querySelector(".selectable-box-checkbox");
946
+ }
947
+ get $selectableBox() {
948
+ return this.shadowRoot.querySelector("px-selectable-box");
949
+ }
950
+ get $checkbox() {
951
+ return this.shadowRoot.querySelector("px-checkbox");
952
+ }
953
+ get $slotFooter() {
954
+ return this.shadowRoot.querySelector("slot[name=\"footer\"]");
955
+ }
956
+ get $slottedFooter() {
957
+ return this.querySelector("[slot=\"footer\"]");
958
+ }
959
+ get inverted() {
960
+ return this.hasAttribute("inverted");
961
+ }
962
+ set inverted(e) {
963
+ r(this, "inverted", e);
964
+ }
965
+ get checked() {
966
+ return this.hasAttribute("checked");
967
+ }
968
+ set checked(e) {
969
+ r(this, "checked", e);
970
+ }
971
+ get name() {
972
+ return this.getAttribute("name");
973
+ }
974
+ set name(e) {
975
+ c(this, "name", e);
976
+ }
977
+ get disabled() {
978
+ return this.hasAttribute("disabled");
979
+ }
980
+ set disabled(e) {
981
+ r(this, "disabled", e);
982
+ }
983
+ get value() {
984
+ return this.getAttribute("value");
985
+ }
986
+ set value(e) {
987
+ c(this, "value", e);
988
+ }
989
+ get footerPosition() {
990
+ return this.getAttribute("footer-position") ?? "";
991
+ }
992
+ set footerPosition(e) {
993
+ e ? this.setAttribute("footer-position", e) : this.removeAttribute("footer-position");
994
+ }
995
+ };
996
+ customElements.get("px-selectable-box-checkbox") || customElements.define("px-selectable-box-checkbox", P);
997
+ //#endregion
998
+ //#region src/SelectableBoxRadio.ts
999
+ var F = new CSSStyleSheet();
1000
+ F.replaceSync(M);
1001
+ var I = "px-selectable-box-radio-connected", L = "px-selectable-box-radio-disconnected", R = class e extends t {
1002
+ static {
1003
+ this.template = a("<div class=\"selectable-box-radio\"><px-selectable-box><slot name=\"media\" slot=\"media\"></slot><px-radio \n slot=\"action\" inert \n ></px-radio><slot name=\"icon\" slot=\"icon\"></slot><slot name=\"logo\" slot=\"logo\"></slot><slot name=\"title\" slot=\"title\"></slot><slot name=\"description\" slot=\"description\"></slot><slot name=\"content\" slot=\"content\"></slot><slot name=\"footer\" slot=\"footer\"></slot></px-selectable-box></div>");
1004
+ }
1005
+ constructor() {
1006
+ super(F), l(this.shadowRoot, e.template), this.internals = this.attachInternals?.();
1007
+ }
1008
+ connectedCallback() {
1009
+ this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "radio", this.internals && (this.internals.role = "radio"), this.dispatchEvent(new CustomEvent(I, {
1010
+ bubbles: !0,
1011
+ composed: !0
1012
+ })), this.ariaChecked = `${this.checked}`, this.toggleFooterVisibility(), this.$slotFooter.addEventListener("slotchange", this.toggleFooterVisibility), this.$radio.addEventListener("change", this.stopInternalRadioChange), this.addEventListener("mouseover", this.setHoverAttribute), this.addEventListener("mouseout", this.removeHoverAttribute), this.addEventListener("keypress", this.setKeypressEvent), this.addEventListener("click", this.setClickEvent);
1013
+ }
1014
+ static get observedAttributes() {
1015
+ return [
1016
+ ...super.observedAttributes,
1017
+ "inverted",
1018
+ "name",
1019
+ "value",
1020
+ "checked",
1021
+ "disabled",
1022
+ "footer-position"
1023
+ ];
1024
+ }
1025
+ attributeChangedCallback(e, t, n) {
1026
+ if (t !== n) switch (e) {
1027
+ case "inverted":
1028
+ this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$radio.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$radio.removeAttribute("inverted"));
1029
+ break;
1030
+ case "name":
1031
+ case "value":
1032
+ this.$radio && this.$radio.setAttribute(e, n);
1033
+ break;
1034
+ case "disabled":
1035
+ this.handleDisabledAttributeChange(n !== null);
1036
+ break;
1037
+ case "checked":
1038
+ this.handleCheckedAttributeChange(n);
1039
+ break;
1040
+ case "footer-position":
1041
+ this.$selectableBox && this.$selectableBox.setAttribute("footer-position", n);
1042
+ break;
1043
+ default: super.attributeChangedCallback(e, t, n);
1044
+ }
1045
+ }
1046
+ disconnectedCallback() {
1047
+ this.$slotFooter.removeEventListener("slotchange", this.toggleFooterVisibility), this.$radio.removeEventListener("change", this.stopInternalRadioChange), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent), this.dispatchEvent(new CustomEvent(L, {
1048
+ bubbles: !0,
1049
+ composed: !0
1050
+ }));
1051
+ }
1052
+ removeHoverAttribute() {
1053
+ this.$radio.removeAttribute("hover");
1054
+ }
1055
+ stopInternalRadioChange(e) {
1056
+ e.stopPropagation();
1057
+ }
1058
+ setHoverAttribute() {
1059
+ this.$radio.setAttribute("hover", "");
1060
+ }
1061
+ setKeypressEvent(e) {
1062
+ e.preventDefault(), e.code === "Space" && this.click();
1063
+ }
1064
+ setClickEvent(e) {
1065
+ j(e, this) || (this.checked ||= !0, e.stopPropagation(), e.preventDefault());
1066
+ }
1067
+ toggleFooterVisibility() {
1068
+ this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
1069
+ }
1070
+ handleDisabledAttributeChange(e) {
1071
+ 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"));
1072
+ }
1073
+ handleCheckedAttributeChange(e) {
1074
+ 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", {
1075
+ bubbles: !0,
1076
+ composed: !0
1077
+ })));
1078
+ }
1079
+ static get formAssociated() {
1080
+ return !0;
1081
+ }
1082
+ formResetCallback() {
1083
+ this.checked = !1;
1084
+ }
1085
+ formStateRestoreCallback(e) {
1086
+ this.checked = e;
1087
+ }
1088
+ formData() {
1089
+ let e = new FormData();
1090
+ if (this.name) {
1091
+ let t = this.getAttribute("name");
1092
+ t && (this.checked ? e.set(t, this.value ?? "") : e.delete(t));
1093
+ }
1094
+ return e;
1095
+ }
1096
+ get $el() {
1097
+ return this.shadowRoot.querySelector(".selectable-box-radio");
1098
+ }
1099
+ get $selectableBox() {
1100
+ return this.shadowRoot.querySelector("px-selectable-box");
1101
+ }
1102
+ get $radio() {
1103
+ return this.shadowRoot.querySelector("px-radio");
1104
+ }
1105
+ get $slotFooter() {
1106
+ return this.shadowRoot.querySelector("slot[name=\"footer\"]");
1107
+ }
1108
+ get $slottedFooter() {
1109
+ return this.querySelector("[slot=\"footer\"]");
1110
+ }
1111
+ get inverted() {
1112
+ return this.hasAttribute("inverted");
1113
+ }
1114
+ set inverted(e) {
1115
+ r(this, "inverted", e);
1116
+ }
1117
+ get checked() {
1118
+ return this.hasAttribute("checked");
1119
+ }
1120
+ set checked(e) {
1121
+ r(this, "checked", e);
1122
+ }
1123
+ get name() {
1124
+ return this.getAttribute("name");
1125
+ }
1126
+ set name(e) {
1127
+ c(this, "name", e);
1128
+ }
1129
+ get disabled() {
1130
+ return this.hasAttribute("disabled");
1131
+ }
1132
+ set disabled(e) {
1133
+ r(this, "disabled", e);
1134
+ }
1135
+ get value() {
1136
+ return this.getAttribute("value");
1137
+ }
1138
+ set value(e) {
1139
+ c(this, "value", e);
1140
+ }
1141
+ get footerPosition() {
1142
+ return this.getAttribute("footer-position") ?? "";
1143
+ }
1144
+ set footerPosition(e) {
1145
+ e ? this.setAttribute("footer-position", e) : this.removeAttribute("footer-position");
1146
+ }
1020
1147
  };
1148
+ customElements.get("px-selectable-box-radio") || customElements.define("px-selectable-box-radio", R);
1149
+ //#endregion
1150
+ export { I as SELECTABLE_BOX_RADIO_CONNECTED_EVENT, L as SELECTABLE_BOX_RADIO_DISCONNECTED_EVENT, k as SelectableBox, P as SelectableBoxCheckbox, R as SelectableBoxRadio, O as selectableBoxFooterPosition };