@proximus/lavender-separator 2.0.0-alpha.100 → 2.0.0-alpha.102

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 +23 -23
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -6,7 +6,7 @@ const u = [
6
6
  "default",
7
7
  "horizontal",
8
8
  "vertical"
9
- ], g = ["", "default", "none", "s", "m", "l"], m = [
9
+ ], v = ["", "default", "none", "s", "m", "l"], g = [
10
10
  "",
11
11
  "main",
12
12
  "brand",
@@ -54,29 +54,29 @@ const u = [
54
54
  );
55
55
  break;
56
56
  case "size":
57
- this.updateSize(t, r, e, g);
57
+ this.updateSize(t, r, e, v);
58
58
  break;
59
59
  case "color":
60
- this.updateColor(t, r, e, m);
60
+ this.updateColor(t, r, e, g);
61
61
  break;
62
62
  default:
63
63
  super.attributeChangedCallback(t, r, e);
64
64
  break;
65
65
  }
66
66
  }
67
- updateSize(t, r, e, a) {
68
- const o = (i) => {
67
+ updateSize(t, r, e, o) {
68
+ const s = (i) => {
69
69
  i !== null && i !== "" && i !== "default" && this.$el.style.setProperty(
70
70
  "--separator-size",
71
71
  `var(--px-size-border-${i})`
72
72
  );
73
73
  };
74
- this.checkName(a, e) ? (o(r), o(e)) : c(
75
- `${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
74
+ this.checkName(o, e) ? (s(r), s(e)) : c(
75
+ `"${e}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
76
76
  );
77
77
  }
78
- updateColor(t, r, e, a) {
79
- const o = (i) => {
78
+ updateColor(t, r, e, o) {
79
+ const s = (i) => {
80
80
  i !== null && i !== "" && i !== "default" && (this.$el.style.setProperty(
81
81
  "--separator-color-default",
82
82
  `var(--px-color-border-${i}-default)`
@@ -85,32 +85,32 @@ const u = [
85
85
  `var(--px-color-border-${i}-inverted)`
86
86
  ));
87
87
  };
88
- this.checkName(a, e) ? (o(r), o(e)) : c(
89
- `${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
88
+ this.checkName(o, e) ? (s(r), s(e)) : c(
89
+ `"${e}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
90
90
  );
91
91
  }
92
- updateDirection(t, r, e, a) {
93
- const o = (i, s) => {
94
- s !== null && s !== "" && s !== "default" && this.$el.classList.add(`separator-direction-${s}--${i}`);
92
+ updateDirection(t, r, e, o) {
93
+ const s = (i, a) => {
94
+ a !== null && a !== "" && a !== "default" && this.$el.classList.add(`separator-direction-${a}--${i}`);
95
95
  };
96
- if (!this.checkName(a, e))
96
+ if (!this.checkName(o, e))
97
97
  c(
98
- `${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
98
+ `"${e}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
99
99
  );
100
100
  else if (t === "direction")
101
101
  ["mobile", "tablet", "laptop", "desktop"].forEach((i) => {
102
102
  Array.from(this.$el.classList).find(
103
103
  (d) => d.startsWith("separator-direction-") && d.endsWith(`--${i}`)
104
- ) || o(i, e);
104
+ ) || s(i, e);
105
105
  });
106
106
  else {
107
- const i = t.split("--")[1], s = Array.from(this.$el.classList).find(
107
+ const i = t.split("--")[1], a = Array.from(this.$el.classList).find(
108
108
  (d) => d.startsWith("separator-direction-") && d.endsWith(`--${i}`)
109
109
  );
110
- s ? this.$el.classList.replace(
111
- s,
110
+ a ? this.$el.classList.replace(
111
+ a,
112
112
  `separator-direction-${e}--${i}`
113
- ) : o(i, e);
113
+ ) : s(i, e);
114
114
  }
115
115
  }
116
116
  get direction() {
@@ -167,7 +167,7 @@ let l = n;
167
167
  customElements.get("px-separator") || customElements.define("px-separator", l);
168
168
  export {
169
169
  l as Separator,
170
- m as separatorColorValues,
170
+ g as separatorColorValues,
171
171
  u as separatorDirectionValues,
172
- g as separatorSizeValues
172
+ v as separatorSizeValues
173
173
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-separator",
3
- "version": "2.0.0-alpha.100",
3
+ "version": "2.0.0-alpha.102",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",