@proximus/lavender-tile 1.4.1-beta.1 → 1.4.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 +13 -13
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PxElement as b, checkName as E, WithExtraAttributes as u } from "@proximus/lavender-common";
|
|
2
2
|
import "@proximus/lavender-layout";
|
|
3
|
-
import { checkboxStateValues as
|
|
4
|
-
import { stateValues as
|
|
3
|
+
import { checkboxStateValues as D } from "@proximus/lavender-checkbox";
|
|
4
|
+
import { stateValues as q } from "@proximus/lavender-radio-group";
|
|
5
5
|
function l(o) {
|
|
6
6
|
o.hasAttribute("width") || o.setAttribute("width", "s"), o.setAttribute("border-radius", "pill");
|
|
7
7
|
}
|
|
@@ -276,7 +276,7 @@ class R extends u {
|
|
|
276
276
|
}
|
|
277
277
|
constructor() {
|
|
278
278
|
var t;
|
|
279
|
-
super($), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`)
|
|
279
|
+
super($), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
280
280
|
}
|
|
281
281
|
connectedCallback() {
|
|
282
282
|
if (this.$slotPrefix) {
|
|
@@ -328,7 +328,7 @@ class R extends u {
|
|
|
328
328
|
break;
|
|
329
329
|
case "state":
|
|
330
330
|
if (this.$checkbox)
|
|
331
|
-
if (this.checkName(
|
|
331
|
+
if (this.checkName(D, i))
|
|
332
332
|
this.$checkbox.setAttribute("state", i);
|
|
333
333
|
else {
|
|
334
334
|
console.error(`${i} is not a valid state value`);
|
|
@@ -344,11 +344,11 @@ class R extends u {
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
handleDisabledAttributeChange(t) {
|
|
347
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$tile.disabled = !0, this.$checkbox.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$tile.disabled = !1, this.$checkbox.removeAttribute("disabled"));
|
|
347
|
+
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$tile.disabled = !0, this.$checkbox.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$tile.disabled = !1, this.$checkbox.removeAttribute("disabled"));
|
|
348
348
|
}
|
|
349
349
|
handleCheckedAttributeChange(t) {
|
|
350
350
|
var e;
|
|
351
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.checked = !1, this.$checkbox && this.$checkbox.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.checked = !0, this.$checkbox && this.$checkbox.setAttribute("checked", ""), this.dispatchEvent(
|
|
351
|
+
(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(
|
|
352
352
|
new Event("change", {
|
|
353
353
|
bubbles: !0,
|
|
354
354
|
composed: !0
|
|
@@ -455,7 +455,7 @@ class L extends u {
|
|
|
455
455
|
}
|
|
456
456
|
constructor() {
|
|
457
457
|
var t;
|
|
458
|
-
super(C), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`)
|
|
458
|
+
super(C), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.role = "radio", this.internals && (this.internals.role = "radio", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
459
459
|
}
|
|
460
460
|
connectedCallback() {
|
|
461
461
|
var t;
|
|
@@ -508,7 +508,7 @@ class L extends u {
|
|
|
508
508
|
break;
|
|
509
509
|
case "state":
|
|
510
510
|
if (this.$radio)
|
|
511
|
-
if (this.checkName(
|
|
511
|
+
if (this.checkName(q, i))
|
|
512
512
|
this.$radio.setAttribute("state", i);
|
|
513
513
|
else {
|
|
514
514
|
console.error(`${i} is not a valid state value`);
|
|
@@ -524,11 +524,11 @@ class L extends u {
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
handleDisabledAttributeChange(t) {
|
|
527
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$tile.disabled = !0, this.$radio.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$tile.disabled = !1, this.$radio.removeAttribute("disabled"));
|
|
527
|
+
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$tile.disabled = !0, this.$radio.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$tile.disabled = !1, this.$radio.removeAttribute("disabled"));
|
|
528
528
|
}
|
|
529
529
|
handleCheckedAttributeChange(t) {
|
|
530
530
|
var e;
|
|
531
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.tabIndex = -1, this.checked = !1, this.$radio && this.$radio.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.tabIndex = 0, this.checked = !0, this.$radio && this.$radio.setAttribute("checked", ""), this.dispatchEvent(
|
|
531
|
+
(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(
|
|
532
532
|
new Event("change", {
|
|
533
533
|
bubbles: !0,
|
|
534
534
|
composed: !0
|
|
@@ -759,7 +759,7 @@ class H extends u {
|
|
|
759
759
|
}
|
|
760
760
|
constructor() {
|
|
761
761
|
var t;
|
|
762
|
-
super(w), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`)
|
|
762
|
+
super(w), this.shadowRoot.innerHTML = this.template(), this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.tabIndex = 0, this.role = "checkbox", this.internals && (this.internals.role = "checkbox", this.internals.ariaChecked = `${this.checked}`), this.ariaChecked = `${this.checked}`;
|
|
763
763
|
}
|
|
764
764
|
connectedCallback() {
|
|
765
765
|
if (this.$slotPrefix) {
|
|
@@ -817,11 +817,11 @@ class H extends u {
|
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
handleDisabledAttributeChange(t) {
|
|
820
|
-
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.$tile.disabled = !0, this.$switch.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.$tile.disabled = !1, this.$switch.removeAttribute("disabled"));
|
|
820
|
+
t ? (this.disabled = !0, this.internals && (this.internals.ariaDisabled = "true"), this.ariaDisabled = "true", this.$tile.disabled = !0, this.$switch.setAttribute("disabled", "")) : (this.disabled = !1, this.internals && (this.internals.ariaDisabled = "false"), this.ariaDisabled = "false", this.$tile.disabled = !1, this.$switch.removeAttribute("disabled"));
|
|
821
821
|
}
|
|
822
822
|
handleCheckedAttributeChange(t) {
|
|
823
823
|
var e;
|
|
824
|
-
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.checked = !1, this.$switch && this.$switch.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.checked = !0, this.$switch && this.$switch.setAttribute("checked", ""), this.dispatchEvent(
|
|
824
|
+
(e = this.internals) == null || e.setFormValue(this.formData()), t === null ? (this.internals && (this.internals.ariaChecked = "false"), this.ariaChecked = "false", this.checked = !1, this.$switch && this.$switch.removeAttribute("checked")) : (this.internals && (this.internals.ariaChecked = "true"), this.ariaChecked = "true", this.checked = !0, this.$switch && this.$switch.setAttribute("checked", ""), this.dispatchEvent(
|
|
825
825
|
new Event("change", {
|
|
826
826
|
bubbles: !0,
|
|
827
827
|
composed: !0
|