@proximus/lavender-card 2.0.0-alpha.100 → 2.0.0-alpha.101
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 +22 -22
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -11,7 +11,7 @@ const C = [
|
|
|
11
11
|
"",
|
|
12
12
|
"container-default",
|
|
13
13
|
"container-light"
|
|
14
|
-
], w = ["", "s", "m", "l"],
|
|
14
|
+
], w = ["", "s", "m", "l"], j = ["", "s", "m"], q = ["", "top", "left", "background"], L = (r, n, t) => `:host([${r}${t ? `--${t}` : ""}='${n}']) .card__content`, M = "px-padding";
|
|
15
15
|
var i, l, p, z;
|
|
16
16
|
const m = class m extends y {
|
|
17
17
|
constructor() {
|
|
@@ -76,22 +76,22 @@ const m = class m extends y {
|
|
|
76
76
|
"media-src--laptop"
|
|
77
77
|
];
|
|
78
78
|
}
|
|
79
|
-
attributeChangedCallback(t,
|
|
80
|
-
if (
|
|
79
|
+
attributeChangedCallback(t, a, e) {
|
|
80
|
+
if (a !== e)
|
|
81
81
|
switch (t) {
|
|
82
82
|
case "inverted":
|
|
83
83
|
if (e === null || e === "") {
|
|
84
84
|
this.$container.setAttribute("inverted", "");
|
|
85
|
-
for (let
|
|
86
|
-
this.$children[
|
|
85
|
+
for (let o = 0; o < this.$children.length; o++)
|
|
86
|
+
this.$children[o].setAttribute("inverted", "");
|
|
87
87
|
} else {
|
|
88
88
|
this.$container.removeAttribute("inverted");
|
|
89
|
-
for (let
|
|
90
|
-
this.$children[
|
|
89
|
+
for (let o = 0; o < this.$children.length; o++)
|
|
90
|
+
this.$children[o].removeAttribute("inverted");
|
|
91
91
|
}
|
|
92
92
|
break;
|
|
93
93
|
case "background-color":
|
|
94
|
-
s(this, i, z).call(this, t,
|
|
94
|
+
s(this, i, z).call(this, t, a, e, C);
|
|
95
95
|
break;
|
|
96
96
|
case "background-size":
|
|
97
97
|
this.$container.setAttribute("background-size", e);
|
|
@@ -124,7 +124,7 @@ const m = class m extends y {
|
|
|
124
124
|
s(this, i, p).call(this, e, "laptop");
|
|
125
125
|
break;
|
|
126
126
|
default:
|
|
127
|
-
super.attributeChangedCallback(t,
|
|
127
|
+
super.attributeChangedCallback(t, a, e);
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -273,14 +273,14 @@ const m = class m extends y {
|
|
|
273
273
|
super._updateAttribute("media-src--laptop", t);
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
|
-
i = new WeakSet(), l = function(t,
|
|
277
|
-
const e =
|
|
278
|
-
t === "left" ? (this.$stackContainer.setAttribute(e, "row"),
|
|
279
|
-
}, p = function(t,
|
|
280
|
-
var e,
|
|
281
|
-
switch (
|
|
276
|
+
i = new WeakSet(), l = function(t, a) {
|
|
277
|
+
const e = a ? `direction--${a}` : "direction";
|
|
278
|
+
t === "left" ? (this.$stackContainer.setAttribute(e, "row"), a === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "row") : this.$stackContainer.removeAttribute("direction--desktop")) : (t === "top" || t === "null") && (this.$stackContainer.setAttribute(e, "column"), a === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "column") : this.$stackContainer.removeAttribute("direction--desktop"));
|
|
279
|
+
}, p = function(t, a) {
|
|
280
|
+
var e, o, c, d, u, h, g, f;
|
|
281
|
+
switch (a) {
|
|
282
282
|
case "mobile":
|
|
283
|
-
(this.mediaPosition === "background" || this.mediaPositionMobile === "background") && this.$container.setAttribute("background-image--mobile", t), t ? (e = this.$pictureSourceMobile) == null || e.setAttribute("srcset", t) : (
|
|
283
|
+
(this.mediaPosition === "background" || this.mediaPositionMobile === "background") && this.$container.setAttribute("background-image--mobile", t), t ? (e = this.$pictureSourceMobile) == null || e.setAttribute("srcset", t) : (o = this.$pictureSourceMobile) == null || o.removeAttribute("srcset");
|
|
284
284
|
break;
|
|
285
285
|
case "tablet":
|
|
286
286
|
(this.mediaPosition === "background" || this.mediaPositionTablet === "background") && this.$container.setAttribute("background-image--tablet", t), t ? (c = this.$pictureSourceTablet) == null || c.setAttribute("srcset", t) : (d = this.$pictureSourceTablet) == null || d.removeAttribute("srcset");
|
|
@@ -291,10 +291,10 @@ i = new WeakSet(), l = function(t, o) {
|
|
|
291
291
|
default:
|
|
292
292
|
this.mediaPosition === "background" && this.$container.setAttribute("background-image", t), t ? (g = this.$img) == null || g.setAttribute("src", t) : (f = this.$img) == null || f.removeAttribute("src");
|
|
293
293
|
}
|
|
294
|
-
}, z = function(t,
|
|
295
|
-
if (!S(
|
|
294
|
+
}, z = function(t, a, e, o) {
|
|
295
|
+
if (!S(o, e)) {
|
|
296
296
|
P(
|
|
297
|
-
|
|
297
|
+
`"${e}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
|
|
298
298
|
);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
@@ -307,14 +307,14 @@ i = new WeakSet(), l = function(t, o) {
|
|
|
307
307
|
`var(--px-color-background-${d}-inverted)`
|
|
308
308
|
));
|
|
309
309
|
};
|
|
310
|
-
c(
|
|
310
|
+
c(a), c(e);
|
|
311
311
|
}, m.nativeName = "a";
|
|
312
312
|
let b = m;
|
|
313
313
|
customElements.get("px-card") || customElements.define("px-card", b);
|
|
314
314
|
export {
|
|
315
315
|
b as Card,
|
|
316
316
|
C as cardBackgroundColorValues,
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
j as cardMediaLeftSizeValues,
|
|
318
|
+
q as cardMediaPositionValues,
|
|
319
319
|
w as cardPaddingValues
|
|
320
320
|
};
|