@proximus/lavender-selectablebox 1.4.1 → 1.4.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +184 -178
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -31,7 +31,7 @@ class c extends n {
|
|
|
31
31
|
super(h), this.overflowXAttributeDelegate = new x(
|
|
32
32
|
this,
|
|
33
33
|
"overflow-x",
|
|
34
|
-
(
|
|
34
|
+
(t) => t,
|
|
35
35
|
"--overflow-x"
|
|
36
36
|
), this.template = `<div class="flex-container">
|
|
37
37
|
<slot></slot>
|
|
@@ -75,14 +75,14 @@ class c extends n {
|
|
|
75
75
|
"overflow-x--desktop"
|
|
76
76
|
];
|
|
77
77
|
}
|
|
78
|
-
attributeChangedCallback(
|
|
79
|
-
switch (
|
|
78
|
+
attributeChangedCallback(t, e, i) {
|
|
79
|
+
switch (t) {
|
|
80
80
|
case "gap":
|
|
81
81
|
case "gap--mobile":
|
|
82
82
|
case "gap--tablet":
|
|
83
83
|
case "gap--laptop":
|
|
84
84
|
case "gap--desktop":
|
|
85
|
-
this.updateFlexProperties(
|
|
85
|
+
this.updateFlexProperties(t, e, i, v);
|
|
86
86
|
break;
|
|
87
87
|
case "justify-content":
|
|
88
88
|
case "justify-content--mobile":
|
|
@@ -90,8 +90,8 @@ class c extends n {
|
|
|
90
90
|
case "justify-content--laptop":
|
|
91
91
|
case "justify-content--desktop":
|
|
92
92
|
this.updateFlexProperties(
|
|
93
|
-
e,
|
|
94
93
|
t,
|
|
94
|
+
e,
|
|
95
95
|
i,
|
|
96
96
|
C
|
|
97
97
|
);
|
|
@@ -101,245 +101,245 @@ class c extends n {
|
|
|
101
101
|
case "align-items--tablet":
|
|
102
102
|
case "align-items--laptop":
|
|
103
103
|
case "align-items--desktop":
|
|
104
|
-
this.updateFlexProperties(
|
|
104
|
+
this.updateFlexProperties(t, e, i, w);
|
|
105
105
|
break;
|
|
106
106
|
case "wrap":
|
|
107
107
|
case "wrap--mobile":
|
|
108
108
|
case "wrap--tablet":
|
|
109
109
|
case "wrap--laptop":
|
|
110
110
|
case "wrap--desktop":
|
|
111
|
-
this.updateFlexProperties(
|
|
111
|
+
this.updateFlexProperties(t, e, i, $);
|
|
112
112
|
break;
|
|
113
113
|
case "direction":
|
|
114
114
|
case "direction--mobile":
|
|
115
115
|
case "direction--tablet":
|
|
116
116
|
case "direction--laptop":
|
|
117
117
|
case "direction--desktop":
|
|
118
|
-
this.updateFlexProperties(
|
|
118
|
+
this.updateFlexProperties(t, e, i, A);
|
|
119
119
|
break;
|
|
120
120
|
case "overflow-x":
|
|
121
121
|
case "overflow-x--mobile":
|
|
122
122
|
case "overflow-x--tablet":
|
|
123
123
|
case "overflow-x--laptop":
|
|
124
124
|
case "overflow-x--desktop":
|
|
125
|
-
this.updateOverflowX(
|
|
125
|
+
this.updateOverflowX(t, e, i, S);
|
|
126
126
|
break;
|
|
127
127
|
default:
|
|
128
|
-
super.attributeChangedCallback(
|
|
128
|
+
super.attributeChangedCallback(t, e, i);
|
|
129
129
|
break;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
updateOverflowX(
|
|
132
|
+
updateOverflowX(t, e, i, o) {
|
|
133
133
|
if (!m(o, i)) {
|
|
134
|
-
console.error(`${i} is not an allowed ${
|
|
134
|
+
console.error(`${i} is not an allowed ${t} value`);
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
this.overflowXAttributeDelegate.attributeChangedCallback(
|
|
138
|
-
e,
|
|
139
138
|
t,
|
|
139
|
+
e,
|
|
140
140
|
i
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
|
-
updateFlexProperties(
|
|
143
|
+
updateFlexProperties(t, e, i, o) {
|
|
144
144
|
this.checkName(o, i) || console.error(`${i} is not a valid value for ${o}`);
|
|
145
|
-
const d =
|
|
145
|
+
const d = t.indexOf("--") > -1, s = d ? t.split("--")[0] : t, a = [];
|
|
146
146
|
if (!d)
|
|
147
147
|
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) => {
|
|
148
|
-
this.updateStyle(s, l,
|
|
148
|
+
this.updateStyle(s, l, e, o), this.updateStyle(s, l, i, o);
|
|
149
149
|
});
|
|
150
150
|
else {
|
|
151
|
-
const l =
|
|
152
|
-
this.updateStyle(s, l,
|
|
151
|
+
const l = t.split("--")[1];
|
|
152
|
+
this.updateStyle(s, l, e, o), this.updateStyle(s, l, i, o);
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
updateStyle(
|
|
156
|
-
i && (
|
|
157
|
-
`--flex-${
|
|
158
|
-
`var(--px-spacing-${i}-${
|
|
155
|
+
updateStyle(t, e, i, o) {
|
|
156
|
+
i && (t === "gap" && o && o.includes(i) ? this.$el.style.setProperty(
|
|
157
|
+
`--flex-${t}--${e}-value`,
|
|
158
|
+
`var(--px-spacing-${i}-${e === "laptop" ? "desktop" : e})`
|
|
159
159
|
) : this.$el.style.setProperty(
|
|
160
|
-
`--flex-${
|
|
160
|
+
`--flex-${t}--${e}-value`,
|
|
161
161
|
i
|
|
162
162
|
));
|
|
163
163
|
}
|
|
164
164
|
get direction() {
|
|
165
165
|
return this.getAttribute("direction");
|
|
166
166
|
}
|
|
167
|
-
set direction(
|
|
168
|
-
this.setAttribute("direction",
|
|
167
|
+
set direction(t) {
|
|
168
|
+
this.setAttribute("direction", t);
|
|
169
169
|
}
|
|
170
170
|
get directionMobile() {
|
|
171
171
|
return this.getAttribute("direction--mobile");
|
|
172
172
|
}
|
|
173
|
-
set directionMobile(
|
|
174
|
-
this.setAttribute("direction--mobile",
|
|
173
|
+
set directionMobile(t) {
|
|
174
|
+
this.setAttribute("direction--mobile", t);
|
|
175
175
|
}
|
|
176
176
|
get directionTablet() {
|
|
177
177
|
return this.getAttribute("direction--tablet");
|
|
178
178
|
}
|
|
179
|
-
set directionTablet(
|
|
180
|
-
this.setAttribute("direction--tablet",
|
|
179
|
+
set directionTablet(t) {
|
|
180
|
+
this.setAttribute("direction--tablet", t);
|
|
181
181
|
}
|
|
182
182
|
get directionLaptop() {
|
|
183
183
|
return this.getAttribute("direction--laptop");
|
|
184
184
|
}
|
|
185
|
-
set directionLaptop(
|
|
186
|
-
this.setAttribute("direction--laptop",
|
|
185
|
+
set directionLaptop(t) {
|
|
186
|
+
this.setAttribute("direction--laptop", t);
|
|
187
187
|
}
|
|
188
188
|
get directionDesktop() {
|
|
189
189
|
return this.getAttribute("direction--desktop");
|
|
190
190
|
}
|
|
191
|
-
set directionDesktop(
|
|
192
|
-
this.setAttribute("direction--desktop",
|
|
191
|
+
set directionDesktop(t) {
|
|
192
|
+
this.setAttribute("direction--desktop", t);
|
|
193
193
|
}
|
|
194
194
|
get gap() {
|
|
195
195
|
return this.getAttribute("gap");
|
|
196
196
|
}
|
|
197
|
-
set gap(
|
|
198
|
-
this.setAttribute("gap",
|
|
197
|
+
set gap(t) {
|
|
198
|
+
this.setAttribute("gap", t);
|
|
199
199
|
}
|
|
200
200
|
get gapMobile() {
|
|
201
201
|
return this.getAttribute("gap--mobile");
|
|
202
202
|
}
|
|
203
|
-
set gapMobile(
|
|
204
|
-
this.setAttribute("gap--mobile",
|
|
203
|
+
set gapMobile(t) {
|
|
204
|
+
this.setAttribute("gap--mobile", t);
|
|
205
205
|
}
|
|
206
206
|
get gapTablet() {
|
|
207
207
|
return this.getAttribute("gap--tablet");
|
|
208
208
|
}
|
|
209
|
-
set gapTablet(
|
|
210
|
-
this.setAttribute("gap--tablet",
|
|
209
|
+
set gapTablet(t) {
|
|
210
|
+
this.setAttribute("gap--tablet", t);
|
|
211
211
|
}
|
|
212
212
|
get gapLaptop() {
|
|
213
213
|
return this.getAttribute("gap--laptop");
|
|
214
214
|
}
|
|
215
|
-
set gapLaptop(
|
|
216
|
-
this.setAttribute("gap--laptop",
|
|
215
|
+
set gapLaptop(t) {
|
|
216
|
+
this.setAttribute("gap--laptop", t);
|
|
217
217
|
}
|
|
218
218
|
get gapDesktop() {
|
|
219
219
|
return this.getAttribute("gap--desktop");
|
|
220
220
|
}
|
|
221
|
-
set gapDesktop(
|
|
222
|
-
this.setAttribute("gap--desktop",
|
|
221
|
+
set gapDesktop(t) {
|
|
222
|
+
this.setAttribute("gap--desktop", t);
|
|
223
223
|
}
|
|
224
224
|
get justifyContent() {
|
|
225
225
|
return this.getAttribute("justify-content");
|
|
226
226
|
}
|
|
227
|
-
set justifyContent(
|
|
228
|
-
this.setAttribute("justify-content",
|
|
227
|
+
set justifyContent(t) {
|
|
228
|
+
this.setAttribute("justify-content", t);
|
|
229
229
|
}
|
|
230
230
|
get justifyContentMobile() {
|
|
231
231
|
return this.getAttribute("justify-content--mobile");
|
|
232
232
|
}
|
|
233
|
-
set justifyContentMobile(
|
|
234
|
-
this.setAttribute("justify-content--mobile",
|
|
233
|
+
set justifyContentMobile(t) {
|
|
234
|
+
this.setAttribute("justify-content--mobile", t);
|
|
235
235
|
}
|
|
236
236
|
get justifyContentTablet() {
|
|
237
237
|
return this.getAttribute("justify-content--tablet");
|
|
238
238
|
}
|
|
239
|
-
set justifyContentTablet(
|
|
240
|
-
this.setAttribute("justify-content--tablet",
|
|
239
|
+
set justifyContentTablet(t) {
|
|
240
|
+
this.setAttribute("justify-content--tablet", t);
|
|
241
241
|
}
|
|
242
242
|
get justifyContentLaptop() {
|
|
243
243
|
return this.getAttribute("justify-content--laptop");
|
|
244
244
|
}
|
|
245
|
-
set justifyContentLaptop(
|
|
246
|
-
this.setAttribute("justify-content--laptop",
|
|
245
|
+
set justifyContentLaptop(t) {
|
|
246
|
+
this.setAttribute("justify-content--laptop", t);
|
|
247
247
|
}
|
|
248
248
|
get justifyContentDesktop() {
|
|
249
249
|
return this.getAttribute("justify-content--desktop");
|
|
250
250
|
}
|
|
251
|
-
set justifyContentDesktop(
|
|
252
|
-
this.setAttribute("justify-content--desktop",
|
|
251
|
+
set justifyContentDesktop(t) {
|
|
252
|
+
this.setAttribute("justify-content--desktop", t);
|
|
253
253
|
}
|
|
254
254
|
get alignItems() {
|
|
255
255
|
return this.getAttribute("align-items");
|
|
256
256
|
}
|
|
257
|
-
set alignItems(
|
|
258
|
-
this.setAttribute("align-items",
|
|
257
|
+
set alignItems(t) {
|
|
258
|
+
this.setAttribute("align-items", t);
|
|
259
259
|
}
|
|
260
260
|
get alignItemsMobile() {
|
|
261
261
|
return this.getAttribute("align-items--mobile");
|
|
262
262
|
}
|
|
263
|
-
set alignItemsMobile(
|
|
264
|
-
this.setAttribute("align-items--mobile",
|
|
263
|
+
set alignItemsMobile(t) {
|
|
264
|
+
this.setAttribute("align-items--mobile", t);
|
|
265
265
|
}
|
|
266
266
|
get alignItemsTablet() {
|
|
267
267
|
return this.getAttribute("align-items--tablet");
|
|
268
268
|
}
|
|
269
|
-
set alignItemsTablet(
|
|
270
|
-
this.setAttribute("align-items--tablet",
|
|
269
|
+
set alignItemsTablet(t) {
|
|
270
|
+
this.setAttribute("align-items--tablet", t);
|
|
271
271
|
}
|
|
272
272
|
get alignItemsLaptop() {
|
|
273
273
|
return this.getAttribute("align-items--laptop");
|
|
274
274
|
}
|
|
275
|
-
set alignItemsLaptop(
|
|
276
|
-
this.setAttribute("align-items--laptop",
|
|
275
|
+
set alignItemsLaptop(t) {
|
|
276
|
+
this.setAttribute("align-items--laptop", t);
|
|
277
277
|
}
|
|
278
278
|
get alignItemsDesktop() {
|
|
279
279
|
return this.getAttribute("align-items--desktop");
|
|
280
280
|
}
|
|
281
|
-
set alignItemsDesktop(
|
|
282
|
-
this.setAttribute("align-items--desktop",
|
|
281
|
+
set alignItemsDesktop(t) {
|
|
282
|
+
this.setAttribute("align-items--desktop", t);
|
|
283
283
|
}
|
|
284
284
|
get wrap() {
|
|
285
285
|
return this.getAttribute("wrap");
|
|
286
286
|
}
|
|
287
|
-
set wrap(
|
|
288
|
-
this.setAttribute("wrap",
|
|
287
|
+
set wrap(t) {
|
|
288
|
+
this.setAttribute("wrap", t);
|
|
289
289
|
}
|
|
290
290
|
get wrapMobile() {
|
|
291
291
|
return this.getAttribute("wrap--mobile");
|
|
292
292
|
}
|
|
293
|
-
set wrapMobile(
|
|
294
|
-
this.setAttribute("wrap--mobile",
|
|
293
|
+
set wrapMobile(t) {
|
|
294
|
+
this.setAttribute("wrap--mobile", t);
|
|
295
295
|
}
|
|
296
296
|
get wrapTablet() {
|
|
297
297
|
return this.getAttribute("wrap--tablet");
|
|
298
298
|
}
|
|
299
|
-
set wrapTablet(
|
|
300
|
-
this.setAttribute("wrap--tablet",
|
|
299
|
+
set wrapTablet(t) {
|
|
300
|
+
this.setAttribute("wrap--tablet", t);
|
|
301
301
|
}
|
|
302
302
|
get wrapLaptop() {
|
|
303
303
|
return this.getAttribute("wrap--laptop");
|
|
304
304
|
}
|
|
305
|
-
set wrapLaptop(
|
|
306
|
-
this.setAttribute("wrap--laptop",
|
|
305
|
+
set wrapLaptop(t) {
|
|
306
|
+
this.setAttribute("wrap--laptop", t);
|
|
307
307
|
}
|
|
308
308
|
get wrapDesktop() {
|
|
309
309
|
return this.getAttribute("wrap--desktop");
|
|
310
310
|
}
|
|
311
|
-
set wrapDesktop(
|
|
312
|
-
this.setAttribute("wrap--desktop",
|
|
311
|
+
set wrapDesktop(t) {
|
|
312
|
+
this.setAttribute("wrap--desktop", t);
|
|
313
313
|
}
|
|
314
314
|
get overflowX() {
|
|
315
315
|
return this.getAttribute("overflow-x");
|
|
316
316
|
}
|
|
317
|
-
set overflowX(
|
|
318
|
-
this.setAttribute("overflow-x",
|
|
317
|
+
set overflowX(t) {
|
|
318
|
+
this.setAttribute("overflow-x", t);
|
|
319
319
|
}
|
|
320
320
|
get overflowXMobile() {
|
|
321
321
|
return this.getAttribute("overflow-x--mobile");
|
|
322
322
|
}
|
|
323
|
-
set overflowXMobile(
|
|
324
|
-
this.setAttribute("overflow-x--mobile",
|
|
323
|
+
set overflowXMobile(t) {
|
|
324
|
+
this.setAttribute("overflow-x--mobile", t);
|
|
325
325
|
}
|
|
326
326
|
get overflowXTablet() {
|
|
327
327
|
return this.getAttribute("overflow-x--tablet");
|
|
328
328
|
}
|
|
329
|
-
set overflowXTablet(
|
|
330
|
-
this.setAttribute("overflow-x--tablet",
|
|
329
|
+
set overflowXTablet(t) {
|
|
330
|
+
this.setAttribute("overflow-x--tablet", t);
|
|
331
331
|
}
|
|
332
332
|
get overflowXLaptop() {
|
|
333
333
|
return this.getAttribute("overflow-x--laptop");
|
|
334
334
|
}
|
|
335
|
-
set overflowXLaptop(
|
|
336
|
-
this.setAttribute("overflow-x--laptop",
|
|
335
|
+
set overflowXLaptop(t) {
|
|
336
|
+
this.setAttribute("overflow-x--laptop", t);
|
|
337
337
|
}
|
|
338
338
|
get overflowXDesktop() {
|
|
339
339
|
return this.getAttribute("overflow-x--desktop");
|
|
340
340
|
}
|
|
341
|
-
set overflowXDesktop(
|
|
342
|
-
this.setAttribute("overflow-x--desktop",
|
|
341
|
+
set overflowXDesktop(t) {
|
|
342
|
+
this.setAttribute("overflow-x--desktop", t);
|
|
343
343
|
}
|
|
344
344
|
get $el() {
|
|
345
345
|
return this.shadowRoot.querySelector(".flex-container");
|
|
@@ -369,25 +369,25 @@ class z extends HTMLElement {
|
|
|
369
369
|
super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
|
|
370
370
|
}
|
|
371
371
|
static get observedAttributes() {
|
|
372
|
-
return ["grow"];
|
|
372
|
+
return ["grow", "nogap"];
|
|
373
373
|
}
|
|
374
|
-
attributeChangedCallback(
|
|
375
|
-
|
|
374
|
+
attributeChangedCallback(t, e, i) {
|
|
375
|
+
t === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
|
|
376
376
|
}
|
|
377
377
|
connectedCallback() {
|
|
378
|
-
this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.resizeObserver = new ResizeObserver(() => {
|
|
378
|
+
this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && (this.resizeObserver = new ResizeObserver(() => {
|
|
379
379
|
this.handleSizeChange();
|
|
380
|
-
}), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck();
|
|
380
|
+
}), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
|
|
381
381
|
}
|
|
382
382
|
disconnectedCallback() {
|
|
383
|
-
var
|
|
384
|
-
(
|
|
383
|
+
var t;
|
|
384
|
+
(t = this.resizeObserver) == null || t.disconnect(), this.recheckHandle && (cancelAnimationFrame(this.recheckHandle), this.recheckHandle = void 0);
|
|
385
385
|
}
|
|
386
386
|
get grow() {
|
|
387
387
|
return this.getAttribute("grow");
|
|
388
388
|
}
|
|
389
|
-
set grow(
|
|
390
|
-
this.setAttribute("grow",
|
|
389
|
+
set grow(t) {
|
|
390
|
+
this.setAttribute("grow", t);
|
|
391
391
|
}
|
|
392
392
|
scheduleRecheck() {
|
|
393
393
|
this.recheckHandle && cancelAnimationFrame(this.recheckHandle), this.recheckHandle = requestAnimationFrame(() => {
|
|
@@ -398,19 +398,25 @@ class z extends HTMLElement {
|
|
|
398
398
|
this.isConnected && (this.style.display = "", this.style.flexGrow = this.growValue, this.handleSizeChange());
|
|
399
399
|
}
|
|
400
400
|
handleSizeChange() {
|
|
401
|
-
const
|
|
402
|
-
this.isZeroSized !==
|
|
401
|
+
const t = this.getBoundingClientRect(), e = t.width === 0 && !this.isVertical || t.height === 0 && this.isVertical;
|
|
402
|
+
this.isZeroSized !== e && (this.isZeroSized = e, this.updateParticipation());
|
|
403
403
|
}
|
|
404
404
|
updateParticipation() {
|
|
405
405
|
this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
|
|
406
406
|
}
|
|
407
|
+
get nogap() {
|
|
408
|
+
return this.hasAttribute("nogap");
|
|
409
|
+
}
|
|
410
|
+
set nogap(t) {
|
|
411
|
+
t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
|
|
412
|
+
}
|
|
407
413
|
}
|
|
408
414
|
customElements.get("px-spacer") || customElements.define("px-spacer", z);
|
|
409
415
|
const L = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", b = new CSSStyleSheet();
|
|
410
416
|
b.replaceSync(L);
|
|
411
417
|
class D extends n {
|
|
412
418
|
constructor() {
|
|
413
|
-
super(b), this.template = (
|
|
419
|
+
super(b), this.template = (t) => `
|
|
414
420
|
<px-container border-radius="none" padding="none">
|
|
415
421
|
<px-vstack>
|
|
416
422
|
<px-container id="header-container" border-radius="none">
|
|
@@ -447,7 +453,7 @@ class D extends n {
|
|
|
447
453
|
<px-spacer></px-spacer>
|
|
448
454
|
</px-hstack>
|
|
449
455
|
</px-container>
|
|
450
|
-
${
|
|
456
|
+
${t ? ` <px-hstack>
|
|
451
457
|
<px-spacer></px-spacer>
|
|
452
458
|
<px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
|
|
453
459
|
<px-vstack gap="s">
|
|
@@ -563,11 +569,11 @@ class D extends n {
|
|
|
563
569
|
get paddingHorizontal() {
|
|
564
570
|
return this.getAttribute("padding-horizontal");
|
|
565
571
|
}
|
|
566
|
-
set paddingVertical(
|
|
567
|
-
this.setAttribute("padding-vertical",
|
|
572
|
+
set paddingVertical(t) {
|
|
573
|
+
this.setAttribute("padding-vertical", t);
|
|
568
574
|
}
|
|
569
|
-
set paddingHorizontal(
|
|
570
|
-
this.setAttribute("padding-horizontal",
|
|
575
|
+
set paddingHorizontal(t) {
|
|
576
|
+
this.setAttribute("padding-horizontal", t);
|
|
571
577
|
}
|
|
572
578
|
get gap() {
|
|
573
579
|
return this.getAttribute("gap");
|
|
@@ -575,9 +581,9 @@ class D extends n {
|
|
|
575
581
|
connectedCallback() {
|
|
576
582
|
this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
|
|
577
583
|
}
|
|
578
|
-
attributeChangedCallback(
|
|
579
|
-
if (
|
|
580
|
-
switch (
|
|
584
|
+
attributeChangedCallback(t, e, i) {
|
|
585
|
+
if (e !== i)
|
|
586
|
+
switch (t) {
|
|
581
587
|
case "background-image":
|
|
582
588
|
this.$imageContainer.setAttribute("background-image", i);
|
|
583
589
|
break;
|
|
@@ -597,14 +603,14 @@ class D extends n {
|
|
|
597
603
|
this.handlePaddingHorizontalChange(i);
|
|
598
604
|
break;
|
|
599
605
|
default:
|
|
600
|
-
super.attributeChangedCallback(
|
|
606
|
+
super.attributeChangedCallback(t, e, i);
|
|
601
607
|
}
|
|
602
608
|
}
|
|
603
|
-
handlePaddingVerticalChange(
|
|
604
|
-
this.$headerContainer.setAttribute("padding-top",
|
|
609
|
+
handlePaddingVerticalChange(t) {
|
|
610
|
+
this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
|
|
605
611
|
}
|
|
606
|
-
handlePaddingHorizontalChange(
|
|
607
|
-
this.$headerContainer.paddingLeft =
|
|
612
|
+
handlePaddingHorizontalChange(t) {
|
|
613
|
+
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;
|
|
608
614
|
}
|
|
609
615
|
}
|
|
610
616
|
customElements.get("px-page") === void 0 && customElements.define("px-page", D);
|
|
@@ -641,11 +647,11 @@ class R extends n {
|
|
|
641
647
|
static get observedAttributes() {
|
|
642
648
|
return [...super.observedAttributes, "inverted", "hide-footer"];
|
|
643
649
|
}
|
|
644
|
-
attributeChangedCallback(
|
|
645
|
-
if (
|
|
646
|
-
switch (
|
|
650
|
+
attributeChangedCallback(t, e, i) {
|
|
651
|
+
if (e !== i)
|
|
652
|
+
switch (t) {
|
|
647
653
|
default:
|
|
648
|
-
super.attributeChangedCallback(
|
|
654
|
+
super.attributeChangedCallback(t, e, i);
|
|
649
655
|
break;
|
|
650
656
|
}
|
|
651
657
|
}
|
|
@@ -655,14 +661,14 @@ class R extends n {
|
|
|
655
661
|
get inverted() {
|
|
656
662
|
return this.hasAttribute("inverted");
|
|
657
663
|
}
|
|
658
|
-
set inverted(
|
|
659
|
-
|
|
664
|
+
set inverted(t) {
|
|
665
|
+
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
660
666
|
}
|
|
661
667
|
get hideFooter() {
|
|
662
668
|
return this.hasAttribute("hide-footer");
|
|
663
669
|
}
|
|
664
|
-
set hideFooter(
|
|
665
|
-
|
|
670
|
+
set hideFooter(t) {
|
|
671
|
+
t ? this.setAttribute("hide-footer", "") : this.removeAttribute("hide-footer");
|
|
666
672
|
}
|
|
667
673
|
}
|
|
668
674
|
customElements.get("px-selectable-box") || customElements.define("px-selectable-box", R);
|
|
@@ -690,8 +696,8 @@ class F extends n {
|
|
|
690
696
|
`;
|
|
691
697
|
}
|
|
692
698
|
constructor() {
|
|
693
|
-
var
|
|
694
|
-
super(g), this.shadowRoot.innerHTML = this.template(), this.internals = (
|
|
699
|
+
var t;
|
|
700
|
+
super(g), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
695
701
|
}
|
|
696
702
|
connectedCallback() {
|
|
697
703
|
this.tabIndex = 0, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
|
|
@@ -709,15 +715,15 @@ class F extends n {
|
|
|
709
715
|
"disabled"
|
|
710
716
|
];
|
|
711
717
|
}
|
|
712
|
-
attributeChangedCallback(
|
|
713
|
-
if (
|
|
714
|
-
switch (
|
|
718
|
+
attributeChangedCallback(t, e, i) {
|
|
719
|
+
if (e !== i)
|
|
720
|
+
switch (t) {
|
|
715
721
|
case "inverted":
|
|
716
722
|
this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$checkbox.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$checkbox.removeAttribute("inverted"));
|
|
717
723
|
break;
|
|
718
724
|
case "name":
|
|
719
725
|
case "value":
|
|
720
|
-
this.$checkbox && this.$checkbox.setAttribute(
|
|
726
|
+
this.$checkbox && this.$checkbox.setAttribute(t, i);
|
|
721
727
|
break;
|
|
722
728
|
case "disabled":
|
|
723
729
|
this.handleDisabledAttributeChange(i !== null);
|
|
@@ -726,7 +732,7 @@ class F extends n {
|
|
|
726
732
|
this.handleCheckedAttributeChange(i);
|
|
727
733
|
break;
|
|
728
734
|
default:
|
|
729
|
-
super.attributeChangedCallback(
|
|
735
|
+
super.attributeChangedCallback(t, e, i);
|
|
730
736
|
break;
|
|
731
737
|
}
|
|
732
738
|
}
|
|
@@ -742,25 +748,25 @@ class F extends n {
|
|
|
742
748
|
setHoverAttribute() {
|
|
743
749
|
this.$checkbox.setAttribute("hover", "");
|
|
744
750
|
}
|
|
745
|
-
setKeypressEvent(
|
|
746
|
-
switch (
|
|
751
|
+
setKeypressEvent(t) {
|
|
752
|
+
switch (t.stopPropagation(), t.preventDefault(), t.code) {
|
|
747
753
|
case "Space":
|
|
748
754
|
this.click();
|
|
749
755
|
break;
|
|
750
756
|
}
|
|
751
757
|
}
|
|
752
|
-
setClickEvent(
|
|
753
|
-
this.checked = !this.checked,
|
|
758
|
+
setClickEvent(t) {
|
|
759
|
+
this.checked = !this.checked, t.stopPropagation(), t.preventDefault();
|
|
754
760
|
}
|
|
755
761
|
toggleFooterVisibility() {
|
|
756
762
|
this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
|
|
757
763
|
}
|
|
758
|
-
handleDisabledAttributeChange(
|
|
759
|
-
|
|
764
|
+
handleDisabledAttributeChange(t) {
|
|
765
|
+
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"));
|
|
760
766
|
}
|
|
761
|
-
handleCheckedAttributeChange(
|
|
762
|
-
var
|
|
763
|
-
(
|
|
767
|
+
handleCheckedAttributeChange(t) {
|
|
768
|
+
var e;
|
|
769
|
+
(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(
|
|
764
770
|
new Event("change", {
|
|
765
771
|
bubbles: !0,
|
|
766
772
|
composed: !0
|
|
@@ -776,13 +782,13 @@ class F extends n {
|
|
|
776
782
|
formResetCallback() {
|
|
777
783
|
this.checked = !1;
|
|
778
784
|
}
|
|
779
|
-
formStateRestoreCallback(
|
|
780
|
-
this.checked =
|
|
785
|
+
formStateRestoreCallback(t) {
|
|
786
|
+
this.checked = t;
|
|
781
787
|
}
|
|
782
788
|
formData() {
|
|
783
789
|
if (this.name) {
|
|
784
|
-
const
|
|
785
|
-
return
|
|
790
|
+
const t = new FormData(), e = this.getAttribute("name");
|
|
791
|
+
return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
|
|
786
792
|
}
|
|
787
793
|
}
|
|
788
794
|
get $el() {
|
|
@@ -807,32 +813,32 @@ class F extends n {
|
|
|
807
813
|
get inverted() {
|
|
808
814
|
return this.hasAttribute("inverted");
|
|
809
815
|
}
|
|
810
|
-
set inverted(
|
|
811
|
-
|
|
816
|
+
set inverted(t) {
|
|
817
|
+
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
812
818
|
}
|
|
813
819
|
get checked() {
|
|
814
820
|
return this.hasAttribute("checked");
|
|
815
821
|
}
|
|
816
|
-
set checked(
|
|
817
|
-
|
|
822
|
+
set checked(t) {
|
|
823
|
+
t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
818
824
|
}
|
|
819
825
|
get name() {
|
|
820
826
|
return this.getAttribute("name");
|
|
821
827
|
}
|
|
822
|
-
set name(
|
|
823
|
-
|
|
828
|
+
set name(t) {
|
|
829
|
+
t ? this.setAttribute("name", t) : this.removeAttribute("name");
|
|
824
830
|
}
|
|
825
831
|
get disabled() {
|
|
826
832
|
return this.hasAttribute("disabled");
|
|
827
833
|
}
|
|
828
|
-
set disabled(
|
|
829
|
-
|
|
834
|
+
set disabled(t) {
|
|
835
|
+
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
830
836
|
}
|
|
831
837
|
get value() {
|
|
832
838
|
return this.getAttribute("value");
|
|
833
839
|
}
|
|
834
|
-
set value(
|
|
835
|
-
|
|
840
|
+
set value(t) {
|
|
841
|
+
t ? this.setAttribute("value", t) : this.removeAttribute("value");
|
|
836
842
|
}
|
|
837
843
|
}
|
|
838
844
|
customElements.get("px-selectable-box-checkbox") || customElements.define("px-selectable-box-checkbox", F);
|
|
@@ -860,12 +866,12 @@ class H extends n {
|
|
|
860
866
|
`;
|
|
861
867
|
}
|
|
862
868
|
constructor() {
|
|
863
|
-
var
|
|
864
|
-
super(f), this.shadowRoot.innerHTML = this.template(), this.internals = (
|
|
869
|
+
var t;
|
|
870
|
+
super(f), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "radio", this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
865
871
|
}
|
|
866
872
|
connectedCallback() {
|
|
867
|
-
var
|
|
868
|
-
this.tabIndex = ((
|
|
873
|
+
var t;
|
|
874
|
+
this.tabIndex = ((t = this.parentElement) == null ? void 0 : t.firstElementChild) === this ? 0 : -1, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
|
|
869
875
|
"slotchange",
|
|
870
876
|
this.toggleFooterVisibility
|
|
871
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);
|
|
@@ -880,15 +886,15 @@ class H extends n {
|
|
|
880
886
|
"disabled"
|
|
881
887
|
];
|
|
882
888
|
}
|
|
883
|
-
attributeChangedCallback(
|
|
884
|
-
if (
|
|
885
|
-
switch (
|
|
889
|
+
attributeChangedCallback(t, e, i) {
|
|
890
|
+
if (e !== i)
|
|
891
|
+
switch (t) {
|
|
886
892
|
case "inverted":
|
|
887
893
|
this.inverted ? (this.$selectableBox.setAttribute("inverted", ""), this.$radio.setAttribute("inverted", "")) : (this.$selectableBox.removeAttribute("inverted"), this.$radio.removeAttribute("inverted"));
|
|
888
894
|
break;
|
|
889
895
|
case "name":
|
|
890
896
|
case "value":
|
|
891
|
-
this.$radio && this.$radio.setAttribute(
|
|
897
|
+
this.$radio && this.$radio.setAttribute(t, i);
|
|
892
898
|
break;
|
|
893
899
|
case "disabled":
|
|
894
900
|
this.handleDisabledAttributeChange(i !== null);
|
|
@@ -897,7 +903,7 @@ class H extends n {
|
|
|
897
903
|
this.handleCheckedAttributeChange(i);
|
|
898
904
|
break;
|
|
899
905
|
default:
|
|
900
|
-
super.attributeChangedCallback(
|
|
906
|
+
super.attributeChangedCallback(t, e, i);
|
|
901
907
|
break;
|
|
902
908
|
}
|
|
903
909
|
}
|
|
@@ -913,25 +919,25 @@ class H extends n {
|
|
|
913
919
|
setHoverAttribute() {
|
|
914
920
|
this.$radio.setAttribute("hover", "");
|
|
915
921
|
}
|
|
916
|
-
setKeypressEvent(
|
|
917
|
-
switch (
|
|
922
|
+
setKeypressEvent(t) {
|
|
923
|
+
switch (t.preventDefault(), t.code) {
|
|
918
924
|
case "Space":
|
|
919
925
|
this.click();
|
|
920
926
|
break;
|
|
921
927
|
}
|
|
922
928
|
}
|
|
923
|
-
setClickEvent(
|
|
924
|
-
this.checked || (this.checked = !0),
|
|
929
|
+
setClickEvent(t) {
|
|
930
|
+
this.checked || (this.checked = !0), t.stopPropagation(), t.preventDefault();
|
|
925
931
|
}
|
|
926
932
|
toggleFooterVisibility() {
|
|
927
933
|
this.$slottedFooter ? this.$selectableBox.removeAttribute("hide-footer") : this.$selectableBox.setAttribute("hide-footer", "");
|
|
928
934
|
}
|
|
929
|
-
handleDisabledAttributeChange(
|
|
930
|
-
|
|
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"));
|
|
931
937
|
}
|
|
932
|
-
handleCheckedAttributeChange(
|
|
933
|
-
var
|
|
934
|
-
(
|
|
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(
|
|
935
941
|
new Event("change", {
|
|
936
942
|
bubbles: !0,
|
|
937
943
|
composed: !0
|
|
@@ -947,13 +953,13 @@ class H extends n {
|
|
|
947
953
|
formResetCallback() {
|
|
948
954
|
this.checked = !1;
|
|
949
955
|
}
|
|
950
|
-
formStateRestoreCallback(
|
|
951
|
-
this.checked =
|
|
956
|
+
formStateRestoreCallback(t) {
|
|
957
|
+
this.checked = t;
|
|
952
958
|
}
|
|
953
959
|
formData() {
|
|
954
960
|
if (this.name) {
|
|
955
|
-
const
|
|
956
|
-
return
|
|
961
|
+
const t = new FormData(), e = this.getAttribute("name");
|
|
962
|
+
return e && (this.checked ? t.set(e, this.value) : t.delete(e)), t;
|
|
957
963
|
}
|
|
958
964
|
}
|
|
959
965
|
get $el() {
|
|
@@ -978,32 +984,32 @@ class H extends n {
|
|
|
978
984
|
get inverted() {
|
|
979
985
|
return this.hasAttribute("inverted");
|
|
980
986
|
}
|
|
981
|
-
set inverted(
|
|
982
|
-
|
|
987
|
+
set inverted(t) {
|
|
988
|
+
t ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
983
989
|
}
|
|
984
990
|
get checked() {
|
|
985
991
|
return this.hasAttribute("checked");
|
|
986
992
|
}
|
|
987
|
-
set checked(
|
|
988
|
-
|
|
993
|
+
set checked(t) {
|
|
994
|
+
t ? this.setAttribute("checked", "") : this.removeAttribute("checked");
|
|
989
995
|
}
|
|
990
996
|
get name() {
|
|
991
997
|
return this.getAttribute("name");
|
|
992
998
|
}
|
|
993
|
-
set name(
|
|
994
|
-
|
|
999
|
+
set name(t) {
|
|
1000
|
+
t ? this.setAttribute("name", t) : this.removeAttribute("name");
|
|
995
1001
|
}
|
|
996
1002
|
get disabled() {
|
|
997
1003
|
return this.hasAttribute("disabled");
|
|
998
1004
|
}
|
|
999
|
-
set disabled(
|
|
1000
|
-
|
|
1005
|
+
set disabled(t) {
|
|
1006
|
+
t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
|
|
1001
1007
|
}
|
|
1002
1008
|
get value() {
|
|
1003
1009
|
return this.getAttribute("value");
|
|
1004
1010
|
}
|
|
1005
|
-
set value(
|
|
1006
|
-
|
|
1011
|
+
set value(t) {
|
|
1012
|
+
t ? this.setAttribute("value", t) : this.removeAttribute("value");
|
|
1007
1013
|
}
|
|
1008
1014
|
}
|
|
1009
1015
|
customElements.get("px-selectable-box-radio") || customElements.define("px-selectable-box-radio", H);
|