@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.
Files changed (2) hide show
  1. package/dist/index.es.js +22 -22
  2. 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"], q = ["", "s", "m"], R = ["", "top", "left", "background"], L = (r, n, t) => `:host([${r}${t ? `--${t}` : ""}='${n}']) .card__content`, M = "px-padding";
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, o, e) {
80
- if (o !== e)
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 a = 0; a < this.$children.length; a++)
86
- this.$children[a].setAttribute("inverted", "");
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 a = 0; a < this.$children.length; a++)
90
- this.$children[a].removeAttribute("inverted");
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, o, e, C);
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, o, e);
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, o) {
277
- const e = o ? `direction--${o}` : "direction";
278
- t === "left" ? (this.$stackContainer.setAttribute(e, "row"), o === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "row") : this.$stackContainer.removeAttribute("direction--desktop")) : (t === "top" || t === "null") && (this.$stackContainer.setAttribute(e, "column"), o === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "column") : this.$stackContainer.removeAttribute("direction--desktop"));
279
- }, p = function(t, o) {
280
- var e, a, c, d, u, h, g, f;
281
- switch (o) {
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) : (a = this.$pictureSourceMobile) == null || a.removeAttribute("srcset");
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, o, e, a) {
295
- if (!S(a, e)) {
294
+ }, z = function(t, a, e, o) {
295
+ if (!S(o, e)) {
296
296
  P(
297
- `${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
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(o), c(e);
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
- q as cardMediaLeftSizeValues,
318
- R as cardMediaPositionValues,
317
+ j as cardMediaLeftSizeValues,
318
+ q as cardMediaPositionValues,
319
319
  w as cardPaddingValues
320
320
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-card",
3
- "version": "2.0.0-alpha.100",
3
+ "version": "2.0.0-alpha.101",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",