@proximus/lavender-selectablebox 2.0.0-alpha.187 → 2.0.0-alpha.189
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/SelectableBoxRadio.d.ts +1 -0
- package/dist/index.es.js +6 -3
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export declare class SelectableBoxRadio extends WithExtraAttributes {
|
|
|
13
13
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
14
14
|
disconnectedCallback(): void;
|
|
15
15
|
private removeHoverAttribute;
|
|
16
|
+
private stopInternalRadioChange;
|
|
16
17
|
private setHoverAttribute;
|
|
17
18
|
private setKeypressEvent;
|
|
18
19
|
private setClickEvent;
|
package/dist/index.es.js
CHANGED
|
@@ -677,7 +677,7 @@ var A = class extends t {
|
|
|
677
677
|
super(k), this.shadowRoot.innerHTML = this.template(), this.internals = this.attachInternals?.();
|
|
678
678
|
}
|
|
679
679
|
connectedCallback() {
|
|
680
|
-
this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "checkbox", this.internals && (this.internals.role = "checkbox"), this.tabIndex = 0, this.ariaChecked =
|
|
680
|
+
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);
|
|
681
681
|
}
|
|
682
682
|
static get observedAttributes() {
|
|
683
683
|
return [
|
|
@@ -823,7 +823,7 @@ var M = "px-selectable-box-radio-connected", N = "px-selectable-box-radio-discon
|
|
|
823
823
|
this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.role = "radio", this.internals && (this.internals.role = "radio"), this.dispatchEvent(new CustomEvent(M, {
|
|
824
824
|
bubbles: !0,
|
|
825
825
|
composed: !0
|
|
826
|
-
})), this.ariaChecked =
|
|
826
|
+
})), 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);
|
|
827
827
|
}
|
|
828
828
|
static get observedAttributes() {
|
|
829
829
|
return [
|
|
@@ -858,7 +858,7 @@ var M = "px-selectable-box-radio-connected", N = "px-selectable-box-radio-discon
|
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
disconnectedCallback() {
|
|
861
|
-
this.$slotFooter.removeEventListener("slotchange", this.toggleFooterVisibility), this.removeEventListener("mouseover", this.setHoverAttribute), this.removeEventListener("mouseout", this.removeHoverAttribute), this.removeEventListener("keypress", this.setKeypressEvent), this.removeEventListener("click", this.setClickEvent), this.dispatchEvent(new CustomEvent(N, {
|
|
861
|
+
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(N, {
|
|
862
862
|
bubbles: !0,
|
|
863
863
|
composed: !0
|
|
864
864
|
}));
|
|
@@ -866,6 +866,9 @@ var M = "px-selectable-box-radio-connected", N = "px-selectable-box-radio-discon
|
|
|
866
866
|
removeHoverAttribute() {
|
|
867
867
|
this.$radio.removeAttribute("hover");
|
|
868
868
|
}
|
|
869
|
+
stopInternalRadioChange(e) {
|
|
870
|
+
e.stopPropagation();
|
|
871
|
+
}
|
|
869
872
|
setHoverAttribute() {
|
|
870
873
|
this.$radio.setAttribute("hover", "");
|
|
871
874
|
}
|