@proximus/lavender-toaster 2.0.0-alpha.206 → 2.0.0-alpha.207
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 +8 -32
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -107,11 +107,8 @@ var l = class e extends HTMLElement {
|
|
|
107
107
|
let e = this.parentElement;
|
|
108
108
|
for (; e;) {
|
|
109
109
|
if (e.localName === "px-grid" || e.localName === "px-stack" && e?.getAttribute("direction") === "row") return !0;
|
|
110
|
-
if (window.getComputedStyle(e).display === "contents")
|
|
111
|
-
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
break;
|
|
110
|
+
if (window.getComputedStyle(e).display === "contents") e = e.parentElement;
|
|
111
|
+
else break;
|
|
115
112
|
}
|
|
116
113
|
return !1;
|
|
117
114
|
}
|
|
@@ -530,18 +527,10 @@ function x(e, t) {
|
|
|
530
527
|
return t !== null && e.includes(t);
|
|
531
528
|
}
|
|
532
529
|
function S(e, t, n) {
|
|
533
|
-
|
|
534
|
-
e.removeAttribute(t);
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
e.setAttribute(t, n.toString());
|
|
530
|
+
n == null || n === "" ? e.removeAttribute(t) : e.setAttribute(t, n.toString());
|
|
538
531
|
}
|
|
539
532
|
function C(e, t, n) {
|
|
540
|
-
|
|
541
|
-
e.removeAttribute(t);
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
e.setAttribute(t, "");
|
|
533
|
+
n ? e.setAttribute(t, "") : e.removeAttribute(t);
|
|
545
534
|
}
|
|
546
535
|
//#endregion
|
|
547
536
|
//#region ../common/src/breakpoints.ts
|
|
@@ -1406,11 +1395,7 @@ var B = [
|
|
|
1406
1395
|
}
|
|
1407
1396
|
}
|
|
1408
1397
|
updateOverflowX(e, t, n, r) {
|
|
1409
|
-
|
|
1410
|
-
c(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
|
|
1411
|
-
return;
|
|
1412
|
-
}
|
|
1413
|
-
this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n);
|
|
1398
|
+
x(r, n) ? this.overflowXAttributeDelegate.attributeChangedCallback(e, t, n) : c(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
|
|
1414
1399
|
}
|
|
1415
1400
|
updateFlexProperties(t, n, r, i) {
|
|
1416
1401
|
r !== null && !this.checkName(i, r) && c(`"${r}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
|
|
@@ -1423,11 +1408,8 @@ var B = [
|
|
|
1423
1408
|
}
|
|
1424
1409
|
updateStyle(e, t, n, r) {
|
|
1425
1410
|
let i = `--flex-${e}--${t}-value`, a = e === "gap";
|
|
1426
|
-
if (!n) {
|
|
1427
|
-
|
|
1428
|
-
return;
|
|
1429
|
-
}
|
|
1430
|
-
if (a && r && r.includes(n)) {
|
|
1411
|
+
if (!n) this.$el.style.removeProperty(i), a && this.style.removeProperty(`--host-gap--${t}`);
|
|
1412
|
+
else if (a && r && r.includes(n)) {
|
|
1431
1413
|
let e = `var(--px-spacing-${n}-${t === "laptop" ? "desktop" : t})`;
|
|
1432
1414
|
this.$el.style.setProperty(i, e), this.style.setProperty(`--host-gap--${t}`, e);
|
|
1433
1415
|
} else this.$el.style.setProperty(i, n);
|
|
@@ -1982,13 +1964,7 @@ var Y = class e extends l {
|
|
|
1982
1964
|
this.role = "img";
|
|
1983
1965
|
let e = document.querySelectorAll("px-icon-set");
|
|
1984
1966
|
e || console.log("<px-icon-set> component not found");
|
|
1985
|
-
for (let t of e) {
|
|
1986
|
-
if (!t.getAttribute("name") || !t.getAttribute("src")) {
|
|
1987
|
-
console.error("Icon name or src not found");
|
|
1988
|
-
continue;
|
|
1989
|
-
}
|
|
1990
|
-
t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
|
|
1991
|
-
}
|
|
1967
|
+
for (let t of e) !t.getAttribute("name") || !t.getAttribute("src") ? console.error("Icon name or src not found") : t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
|
|
1992
1968
|
!this.ariaLabel && this.#t && (this.#t.ariaHidden = "true", this.ariaHidden = "true"), this.parentElement?.localName === "px-a" && this.slot !== "before" && this.slot !== "after" && (this.color || this.setAttribute("color", "inherit"));
|
|
1993
1969
|
}
|
|
1994
1970
|
updateAttribute(e, t, n, r) {
|