@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.
Files changed (2) hide show
  1. package/dist/index.es.js +184 -178
  2. 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
- (e) => e,
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(e, t, i) {
79
- switch (e) {
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(e, t, i, v);
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(e, t, i, w);
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(e, t, i, $);
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(e, t, i, A);
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(e, t, i, S);
125
+ this.updateOverflowX(t, e, i, S);
126
126
  break;
127
127
  default:
128
- super.attributeChangedCallback(e, t, i);
128
+ super.attributeChangedCallback(t, e, i);
129
129
  break;
130
130
  }
131
131
  }
132
- updateOverflowX(e, t, i, o) {
132
+ updateOverflowX(t, e, i, o) {
133
133
  if (!m(o, i)) {
134
- console.error(`${i} is not an allowed ${e} value`);
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(e, t, i, o) {
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 = e.indexOf("--") > -1, s = d ? e.split("--")[0] : e, a = [];
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, t, o), this.updateStyle(s, l, i, o);
148
+ this.updateStyle(s, l, e, o), this.updateStyle(s, l, i, o);
149
149
  });
150
150
  else {
151
- const l = e.split("--")[1];
152
- this.updateStyle(s, l, t, o), this.updateStyle(s, l, i, o);
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(e, t, i, o) {
156
- i && (e === "gap" && o && o.includes(i) ? this.$el.style.setProperty(
157
- `--flex-${e}--${t}-value`,
158
- `var(--px-spacing-${i}-${t === "laptop" ? "desktop" : t})`
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-${e}--${t}-value`,
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(e) {
168
- this.setAttribute("direction", e);
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(e) {
174
- this.setAttribute("direction--mobile", e);
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(e) {
180
- this.setAttribute("direction--tablet", e);
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(e) {
186
- this.setAttribute("direction--laptop", e);
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(e) {
192
- this.setAttribute("direction--desktop", e);
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(e) {
198
- this.setAttribute("gap", e);
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(e) {
204
- this.setAttribute("gap--mobile", e);
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(e) {
210
- this.setAttribute("gap--tablet", e);
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(e) {
216
- this.setAttribute("gap--laptop", e);
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(e) {
222
- this.setAttribute("gap--desktop", e);
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(e) {
228
- this.setAttribute("justify-content", e);
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(e) {
234
- this.setAttribute("justify-content--mobile", e);
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(e) {
240
- this.setAttribute("justify-content--tablet", e);
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(e) {
246
- this.setAttribute("justify-content--laptop", e);
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(e) {
252
- this.setAttribute("justify-content--desktop", e);
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(e) {
258
- this.setAttribute("align-items", e);
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(e) {
264
- this.setAttribute("align-items--mobile", e);
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(e) {
270
- this.setAttribute("align-items--tablet", e);
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(e) {
276
- this.setAttribute("align-items--laptop", e);
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(e) {
282
- this.setAttribute("align-items--desktop", e);
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(e) {
288
- this.setAttribute("wrap", e);
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(e) {
294
- this.setAttribute("wrap--mobile", e);
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(e) {
300
- this.setAttribute("wrap--tablet", e);
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(e) {
306
- this.setAttribute("wrap--laptop", e);
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(e) {
312
- this.setAttribute("wrap--desktop", e);
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(e) {
318
- this.setAttribute("overflow-x", e);
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(e) {
324
- this.setAttribute("overflow-x--mobile", e);
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(e) {
330
- this.setAttribute("overflow-x--tablet", e);
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(e) {
336
- this.setAttribute("overflow-x--laptop", e);
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(e) {
342
- this.setAttribute("overflow-x--desktop", e);
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(e, t, i) {
375
- e === "grow" && (this.growValue = i || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
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 e;
384
- (e = this.resizeObserver) == null || e.disconnect(), this.recheckHandle && (cancelAnimationFrame(this.recheckHandle), this.recheckHandle = void 0);
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(e) {
390
- this.setAttribute("grow", e);
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 e = this.getBoundingClientRect(), t = e.width === 0 && !this.isVertical || e.height === 0 && this.isVertical;
402
- this.isZeroSized !== t && (this.isZeroSized = t, this.updateParticipation());
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 = (e) => `
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
- ${e ? ` <px-hstack>
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(e) {
567
- this.setAttribute("padding-vertical", e);
572
+ set paddingVertical(t) {
573
+ this.setAttribute("padding-vertical", t);
568
574
  }
569
- set paddingHorizontal(e) {
570
- this.setAttribute("padding-horizontal", e);
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(e, t, i) {
579
- if (t !== i)
580
- switch (e) {
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(e, t, i);
606
+ super.attributeChangedCallback(t, e, i);
601
607
  }
602
608
  }
603
- handlePaddingVerticalChange(e) {
604
- this.$headerContainer.setAttribute("padding-top", e), this.$footerContainer.setAttribute("padding-bottom", e);
609
+ handlePaddingVerticalChange(t) {
610
+ this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
605
611
  }
606
- handlePaddingHorizontalChange(e) {
607
- 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;
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(e, t, i) {
645
- if (t !== i)
646
- switch (e) {
650
+ attributeChangedCallback(t, e, i) {
651
+ if (e !== i)
652
+ switch (t) {
647
653
  default:
648
- super.attributeChangedCallback(e, t, i);
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(e) {
659
- e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
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(e) {
665
- e ? this.setAttribute("hide-footer", "") : this.removeAttribute("hide-footer");
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 e;
694
- super(g), this.shadowRoot.innerHTML = this.template(), this.internals = (e = this.attachInternals) == null ? void 0 : e.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}`;
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(e, t, i) {
713
- if (t !== i)
714
- switch (e) {
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(e, i);
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(e, t, i);
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(e) {
746
- switch (e.stopPropagation(), e.preventDefault(), e.code) {
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(e) {
753
- this.checked = !this.checked, e.stopPropagation(), e.preventDefault();
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(e) {
759
- 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"));
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(e) {
762
- var t;
763
- (t = this.internals) == null || t.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(
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(e) {
780
- this.checked = e;
785
+ formStateRestoreCallback(t) {
786
+ this.checked = t;
781
787
  }
782
788
  formData() {
783
789
  if (this.name) {
784
- const e = new FormData(), t = this.getAttribute("name");
785
- return t && (this.checked ? e.set(t, this.value) : e.delete(t)), e;
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(e) {
811
- e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
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(e) {
817
- e ? this.setAttribute("checked", "") : this.removeAttribute("checked");
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(e) {
823
- e ? this.setAttribute("name", e) : this.removeAttribute("name");
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(e) {
829
- e ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
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(e) {
835
- e ? this.setAttribute("value", e) : this.removeAttribute("value");
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 e;
864
- super(f), this.shadowRoot.innerHTML = this.template(), this.internals = (e = this.attachInternals) == null ? void 0 : e.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}`;
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 e;
868
- this.tabIndex = ((e = this.parentElement) == null ? void 0 : e.firstElementChild) === this ? 0 : -1, this.toggleFooterVisibility(), this.$slotFooter.addEventListener(
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(e, t, i) {
884
- if (t !== i)
885
- switch (e) {
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(e, i);
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(e, t, i);
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(e) {
917
- switch (e.preventDefault(), e.code) {
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(e) {
924
- this.checked || (this.checked = !0), e.stopPropagation(), e.preventDefault();
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(e) {
930
- 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"));
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(e) {
933
- var t;
934
- (t = this.internals) == null || t.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(
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(e) {
951
- this.checked = e;
956
+ formStateRestoreCallback(t) {
957
+ this.checked = t;
952
958
  }
953
959
  formData() {
954
960
  if (this.name) {
955
- const e = new FormData(), t = this.getAttribute("name");
956
- return t && (this.checked ? e.set(t, this.value) : e.delete(t)), e;
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(e) {
982
- e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
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(e) {
988
- e ? this.setAttribute("checked", "") : this.removeAttribute("checked");
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(e) {
994
- e ? this.setAttribute("name", e) : this.removeAttribute("name");
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(e) {
1000
- e ? this.setAttribute("disabled", "") : this.removeAttribute("disabled");
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(e) {
1006
- e ? this.setAttribute("value", e) : this.removeAttribute("value");
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-selectablebox",
3
- "version": "1.4.1",
3
+ "version": "1.4.2-beta.1",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",