@proximus/lavender-drawer 1.4.8-beta.3 → 1.4.8
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 +24 -26
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -41,12 +41,10 @@ class h extends HTMLElement {
|
|
|
41
41
|
</dialog>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [n];
|
|
42
42
|
}
|
|
43
43
|
connectedCallback() {
|
|
44
|
-
var
|
|
44
|
+
var t;
|
|
45
45
|
this.toggleFooterVisibility = this.toggleFooterVisibility.bind(this), this.$opener && this.addOpenListener(), this.$closer && this.addCloseListener(), this.hasAttribute("showfrom") || this.setAttribute("showfrom", "bottom"), this.$closeButton.addEventListener("click", () => {
|
|
46
46
|
this.hide();
|
|
47
|
-
}), this
|
|
48
|
-
t.newState === "closed" && this.hide();
|
|
49
|
-
}), this.toggleFooterVisibility(), (e = this.$slotFooter) == null || e.addEventListener(
|
|
47
|
+
}), this.toggleFooterVisibility(), (t = this.$slotFooter) == null || t.addEventListener(
|
|
50
48
|
"slotchange",
|
|
51
49
|
this.toggleFooterVisibility
|
|
52
50
|
);
|
|
@@ -54,9 +52,9 @@ class h extends HTMLElement {
|
|
|
54
52
|
static get observedAttributes() {
|
|
55
53
|
return ["open", "aria-label-close-button", "openedby", "closedby"];
|
|
56
54
|
}
|
|
57
|
-
attributeChangedCallback(
|
|
55
|
+
attributeChangedCallback(t, e, o) {
|
|
58
56
|
var a, i, s;
|
|
59
|
-
switch (
|
|
57
|
+
switch (t) {
|
|
60
58
|
case "open":
|
|
61
59
|
o !== null ? this.show() : this.hide();
|
|
62
60
|
break;
|
|
@@ -68,9 +66,9 @@ class h extends HTMLElement {
|
|
|
68
66
|
) : (a = this.$closeButton) == null || a.removeAttribute("aria-label");
|
|
69
67
|
break;
|
|
70
68
|
case "openedby":
|
|
71
|
-
if (o !==
|
|
72
|
-
if (
|
|
73
|
-
const r = document.querySelector(`#${
|
|
69
|
+
if (o !== e) {
|
|
70
|
+
if (e) {
|
|
71
|
+
const r = document.querySelector(`#${e}`);
|
|
74
72
|
r == null || r.removeEventListener("click", () => this.show());
|
|
75
73
|
}
|
|
76
74
|
this.addOpenListener();
|
|
@@ -82,19 +80,19 @@ class h extends HTMLElement {
|
|
|
82
80
|
}
|
|
83
81
|
}
|
|
84
82
|
disconnectedCallback() {
|
|
85
|
-
var
|
|
86
|
-
(
|
|
83
|
+
var t, e;
|
|
84
|
+
(t = this.$slotFooter) == null || t.removeEventListener(
|
|
87
85
|
"slotchange",
|
|
88
86
|
this.toggleFooterVisibility
|
|
89
|
-
), (
|
|
87
|
+
), (e = this.observer) == null || e.disconnect(), this.$opener && this.$opener.removeEventListener("click", () => this.show()), this.$closer && this.$closer.removeEventListener("click", () => this.hide());
|
|
90
88
|
}
|
|
91
89
|
show() {
|
|
92
|
-
var
|
|
93
|
-
(
|
|
90
|
+
var t, e;
|
|
91
|
+
(e = (t = this.$dialog).showPopover) == null || e.call(t), document.body.style.overflow = "hidden";
|
|
94
92
|
}
|
|
95
93
|
hide() {
|
|
96
|
-
var
|
|
97
|
-
(
|
|
94
|
+
var t, e;
|
|
95
|
+
(e = (t = this.$dialog).hidePopover) == null || e.call(t), document.body.style.overflow = "", this.dispatchEvent(
|
|
98
96
|
new Event(d, {
|
|
99
97
|
bubbles: !0,
|
|
100
98
|
composed: !0
|
|
@@ -113,8 +111,8 @@ class h extends HTMLElement {
|
|
|
113
111
|
}));
|
|
114
112
|
}
|
|
115
113
|
addCloseListener() {
|
|
116
|
-
var
|
|
117
|
-
this.$closer && ((
|
|
114
|
+
var t;
|
|
115
|
+
this.$closer && ((t = this.$closer) == null || t.addEventListener("click", () => {
|
|
118
116
|
this.hide();
|
|
119
117
|
}));
|
|
120
118
|
}
|
|
@@ -148,26 +146,26 @@ class h extends HTMLElement {
|
|
|
148
146
|
get $footer() {
|
|
149
147
|
return this.shadowRoot.querySelector("#footer");
|
|
150
148
|
}
|
|
151
|
-
set open(
|
|
152
|
-
|
|
149
|
+
set open(t) {
|
|
150
|
+
t ? this.setAttribute("open", "") : this.removeAttribute("open");
|
|
153
151
|
}
|
|
154
152
|
get AriaLabelCloseButton() {
|
|
155
153
|
return this.getAttribute("aria-label-close-button");
|
|
156
154
|
}
|
|
157
|
-
set AriaLabelCloseButton(
|
|
158
|
-
this.setAttribute("aria-label-close-button",
|
|
155
|
+
set AriaLabelCloseButton(t) {
|
|
156
|
+
this.setAttribute("aria-label-close-button", t);
|
|
159
157
|
}
|
|
160
158
|
get openedby() {
|
|
161
159
|
return this.getAttribute("openedby");
|
|
162
160
|
}
|
|
163
|
-
set openedby(
|
|
164
|
-
this.setAttribute("openedby",
|
|
161
|
+
set openedby(t) {
|
|
162
|
+
this.setAttribute("openedby", t);
|
|
165
163
|
}
|
|
166
164
|
get closedby() {
|
|
167
165
|
return this.getAttribute("closedby");
|
|
168
166
|
}
|
|
169
|
-
set closedby(
|
|
170
|
-
this.setAttribute("closedby",
|
|
167
|
+
set closedby(t) {
|
|
168
|
+
this.setAttribute("closedby", t);
|
|
171
169
|
}
|
|
172
170
|
}
|
|
173
171
|
customElements.get("px-drawer") || customElements.define("px-drawer", h);
|