@proximus/lavender-heading 1.4.10-alpha.9 → 1.4.10-beta.2
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 +24 -24
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -50,19 +50,19 @@ class n extends A {
|
|
|
50
50
|
toggleClass(t, e) {
|
|
51
51
|
t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`style-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`style-${e}`);
|
|
52
52
|
}
|
|
53
|
-
updateAttribute(t, e, i,
|
|
54
|
-
this.checkName(
|
|
55
|
-
|
|
53
|
+
updateAttribute(t, e, i, o) {
|
|
54
|
+
this.checkName(o, i) ? this.toggleClass(e, i) : a(
|
|
55
|
+
`"${i}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
updateColor(t, e, i) {
|
|
59
59
|
if (!this.checkName(i, e)) {
|
|
60
60
|
a(
|
|
61
|
-
|
|
61
|
+
`"${e}" is not a valid color value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join('", "')}".`
|
|
62
62
|
);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
65
|
+
const o = (s) => {
|
|
66
66
|
s !== null && s !== "" && s !== "default" && (this.$el.style.setProperty(
|
|
67
67
|
"--heading-color-default",
|
|
68
68
|
`var(--px-color-text-${s}-default)`
|
|
@@ -71,28 +71,28 @@ class n extends A {
|
|
|
71
71
|
`var(--px-color-text-${s}-inverted)`
|
|
72
72
|
));
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
o(t), o(e);
|
|
75
75
|
}
|
|
76
|
-
updateTextAlign(t, e, i,
|
|
77
|
-
if (!this.checkName(
|
|
76
|
+
updateTextAlign(t, e, i, o) {
|
|
77
|
+
if (!this.checkName(o, i)) {
|
|
78
78
|
a(
|
|
79
|
-
|
|
79
|
+
`"${i}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${o.join('", "')}".`
|
|
80
80
|
);
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
const s = (
|
|
83
|
+
const s = (l, r) => {
|
|
84
84
|
r !== null && r !== "" && r !== "default" && this.$el.style.setProperty(
|
|
85
|
-
`--heading-text-align--${
|
|
85
|
+
`--heading-text-align--${l}`,
|
|
86
86
|
r
|
|
87
87
|
);
|
|
88
88
|
};
|
|
89
89
|
if (t === "text-align")
|
|
90
|
-
["mobile", "tablet", "laptop", "desktop"].forEach((
|
|
91
|
-
s(
|
|
90
|
+
["mobile", "tablet", "laptop", "desktop"].forEach((l) => {
|
|
91
|
+
s(l, e), s(l, i);
|
|
92
92
|
});
|
|
93
93
|
else {
|
|
94
|
-
const
|
|
95
|
-
s(
|
|
94
|
+
const l = t.split("--")[1];
|
|
95
|
+
s(l, e), s(l, i);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
get variant() {
|
|
@@ -150,21 +150,21 @@ class n extends A {
|
|
|
150
150
|
t ? this.setAttribute("auto-spacing", "") : this.removeAttribute("auto-spacing");
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const f = class f extends n {
|
|
154
154
|
constructor() {
|
|
155
155
|
super("h1");
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
|
|
159
|
-
let h =
|
|
158
|
+
f.nativeName = "h1";
|
|
159
|
+
let h = f;
|
|
160
160
|
customElements.get("px-h1") || customElements.define("px-h1", h);
|
|
161
|
-
const
|
|
161
|
+
const z = class z extends n {
|
|
162
162
|
constructor() {
|
|
163
163
|
super("h2");
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
|
-
|
|
167
|
-
let d =
|
|
166
|
+
z.nativeName = "h2";
|
|
167
|
+
let d = z;
|
|
168
168
|
customElements.get("px-h2") || customElements.define("px-h2", d);
|
|
169
169
|
const c = class c extends n {
|
|
170
170
|
constructor() {
|
|
@@ -196,13 +196,13 @@ const u = class u extends n {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
u.nativeName = "h6";
|
|
199
|
-
let
|
|
200
|
-
customElements.get("px-h6") || customElements.define("px-h6",
|
|
199
|
+
let v = u;
|
|
200
|
+
customElements.get("px-h6") || customElements.define("px-h6", v);
|
|
201
201
|
export {
|
|
202
202
|
h as H1,
|
|
203
203
|
d as H2,
|
|
204
204
|
x as H3,
|
|
205
205
|
p as H4,
|
|
206
206
|
g as H5,
|
|
207
|
-
|
|
207
|
+
v as H6
|
|
208
208
|
};
|