@proximus/lavender-grid 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 +17 -17
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -67,14 +67,14 @@ const b = [
67
67
  connectedCallback() {
68
68
  this.gap || (this.gap = "default"), this.alignItems || (this.alignItems = "stretch");
69
69
  }
70
- attributeChangedCallback(t, e, n) {
71
- if (e !== n)
70
+ attributeChangedCallback(t, e, i) {
71
+ if (e !== i)
72
72
  switch (t) {
73
73
  case "grid-cols":
74
74
  case "grid-cols--mobile":
75
75
  case "grid-cols--tablet":
76
76
  case "grid-cols--laptop":
77
- this.updateAttribute(t, e, n, b);
77
+ this.updateAttribute(t, e, i, b);
78
78
  break;
79
79
  case "justify-content":
80
80
  case "align-content":
@@ -89,7 +89,7 @@ const b = [
89
89
  this.updateAttribute(
90
90
  t,
91
91
  e,
92
- n,
92
+ i,
93
93
  y
94
94
  );
95
95
  break;
@@ -106,39 +106,39 @@ const b = [
106
106
  this.updateAttribute(
107
107
  t,
108
108
  e,
109
- n,
109
+ i,
110
110
  f
111
111
  );
112
112
  break;
113
113
  default:
114
- super.attributeChangedCallback(t, e, n);
114
+ super.attributeChangedCallback(t, e, i);
115
115
  break;
116
116
  }
117
117
  }
118
- updateGap(t, e, n) {
119
- if (!this.checkName(n, e)) {
118
+ updateGap(t, e, i) {
119
+ if (!this.checkName(i, e)) {
120
120
  l(
121
- `${e} is not an allowed gap value for ${this.tagName.toLowerCase()}`
121
+ `"${e}" is not a valid gap value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join('", "')}".`
122
122
  );
123
123
  return;
124
124
  }
125
- const s = (i) => {
126
- i !== null && i !== "" && i !== "default" && (this.$el.style.setProperty(
125
+ const s = (n) => {
126
+ n !== null && n !== "" && n !== "default" && (this.$el.style.setProperty(
127
127
  "--grid-gap--mobile",
128
- `var(--px-spacing-${i}-mobile)`
128
+ `var(--px-spacing-${n}-mobile)`
129
129
  ), this.$el.style.setProperty(
130
130
  "--grid-gap--tablet",
131
- `var(--px-spacing-${i}-tablet)`
131
+ `var(--px-spacing-${n}-tablet)`
132
132
  ), this.$el.style.setProperty(
133
133
  "--grid-gap--laptop",
134
- `var(--px-spacing-${i}-laptop)`
134
+ `var(--px-spacing-${n}-laptop)`
135
135
  ));
136
136
  };
137
137
  s(t), s(e);
138
138
  }
139
- updateAttribute(t, e, n, s) {
140
- this.checkName(s, n) ? t === "grid-cols" || t === "grid-cols--mobile" || t === "grid-cols--tablet" || t === "grid-cols--laptop" || t === "grid-cols--desktop" ? this.$el.style.setProperty(`--${t}`, n) : (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), n !== null && n !== "" && n !== "default" && this.$el.classList.toggle(`${t}-${n}`)) : l(
141
- `${n} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
139
+ updateAttribute(t, e, i, s) {
140
+ this.checkName(s, i) ? t === "grid-cols" || t === "grid-cols--mobile" || t === "grid-cols--tablet" || t === "grid-cols--laptop" || t === "grid-cols--desktop" ? this.$el.style.setProperty(`--${t}`, i) : (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), i !== null && i !== "" && i !== "default" && this.$el.classList.toggle(`${t}-${i}`)) : l(
141
+ `"${i}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${s.join('", "')}".`
142
142
  );
143
143
  }
144
144
  get gap() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-grid",
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
  "files": [