@proximus/lavender-heading 1.2.0-alpha.40 → 1.2.0-alpha.41
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.js +51 -45
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { PxElement as k, textalignValues as A, colorValues as w, headingValues as $ } from "@proximus/lavender-common";
|
|
2
|
-
const
|
|
3
|
-
y.replaceSync(
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
class
|
|
2
|
+
const C = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{margin:0;font-family:var(--px-font-family);color:var( --heading-color-default, var(--px-text-color-heading-brand-default) );text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-line-height-m);font-weight:700}:host([inverted]) h1,:host([inverted]) .style-title-4xl,:host([inverted]) ::slotted(h1),:host([inverted]) h2,:host([inverted]) .style-title-3xl,:host([inverted]) ::slotted(h2),:host([inverted]) h3,:host([inverted]) .style-title-2xl,:host([inverted]) ::slotted(h3),:host([inverted]) h4,:host([inverted]) .style-title-xl,:host([inverted]) ::slotted(h4),:host([inverted]) h5,:host([inverted]) .style-title-l,:host([inverted]) ::slotted(h5),:host([inverted]) h6,:host([inverted]) .style-title-m,:host([inverted]) ::slotted(h6),:host([inverted]) .style-title-s,:host([inverted]) .style-subtitle{color:var( --heading-color-inverted, var(--px-text-color-heading-brand-inverted) )}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-mobile);line-height:var(--px-line-height-s);font-weight:900}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-mobile);line-height:var(--px-line-height-s);font-weight:900}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-mobile);line-height:var(--px-line-height-s)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-mobile)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-mobile)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-mobile)}.style-subtitle{font-size:var(--px-text-size-heading-xl-mobile);font-weight:300}.style-title-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--tablet, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-tablet)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-tablet)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-tablet)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-tablet)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-tablet)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-tablet)}.style-title-s{font-size:var(--px-text-size-heading-s-tablet)}.style-subtitle{font-size:var(--px-text-size-heading-xl-tablet)}}@media only screen and (min-width: 1025px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--laptop, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-s-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media screen and (min-width: 1441px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--desktop, left)}}", S = ":host>*:first-child{--font-weight-light: 300;--font-weight-regular: 400;--font-weight-bold: 700;--font-weight-extrabold: 900}.color-inherit{color:inherit}.color-action-brand{color:var(--px-text-color-action-brand-default)}.color-action-neutral{color:var(--px-text-color-action-neutral-default)}.color-action-hover{color:var(--px-text-color-action-hover-default)}.color-action-active{color:var(--px-text-color-action-active-default)}.color-action-disabled{color:var(--px-text-color-action-disabled-default)}.color-body-neutral-strong{color:var(--px-text-color-body-neutral-strong-default)}.color-body-neutral-weak{color:var(--px-text-color-body-neutral-weak-default)}.color-heading-brand{color:var(--px-text-color-heading-brand-default)}.color-heading-neutral{color:var(--px-text-color-heading-neutral-default)}.color-purpose-success{color:var(--px-text-color-purpose-success-default)}.color-purpose-warning{color:var(--px-text-color-purpose-warning-default)}.color-purpose-error{color:var(--px-text-color-purpose-error-default)}.color-purpose-unlimited{color:var(--px-text-color-purpose-unlimited-default)}.color-purpose-promo{color:var(--px-text-color-purpose-promo-default)}:host([inverted]) .color-inherit{color:inherit}:host([inverted]) .color-action-brand{color:var(--px-text-color-action-brand-inverted)}:host([inverted]) .color-action-neutral{color:var(--px-text-color-action-neutral-inverted)}:host([inverted]) .color-action-hover{color:var(--px-text-color-action-hover-inverted)}:host([inverted]) .color-action-active{color:var(--px-text-color-action-active-inverted)}:host([inverted]) .color-action-disabled{color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .color-body-neutral-strong{color:var(--px-text-color-body-neutral-strong-inverted)}:host([inverted]) .color-body-neutral-weak{color:var(--px-text-color-body-neutral-weak-inverted)}:host([inverted]) .color-heading-brand{color:var(--px-text-color-heading-brand-inverted)}:host([inverted]) .color-heading-neutral{color:var(--px-text-color-heading-neutral-inverted)}:host([inverted]) .color-purpose-success{color:var(--px-text-color-purpose-success-inverted)}:host([inverted]) .color-purpose-warning{color:var(--px-text-color-purpose-warning-inverted)}:host([inverted]) .color-purpose-error{color:var(--px-text-color-purpose-error-inverted)}:host([inverted]) .color-purpose-unlimited{color:var(--px-text-color-purpose-unlimited-inverted)}:host([inverted]) .color-purpose-promo{color:var(--px-text-color-purpose-promo-inverted)}.font-size-inherit{font-size:inherit;line-height:inherit}.font-size-body-l{font-size:var(--px-text-size-body-l-mobile)}.font-size-body-m{font-size:var(--px-text-size-body-m-mobile)}.font-size-body-s{font-size:var(--px-text-size-body-s-mobile)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-mobile)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-mobile)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-mobile)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-mobile)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-mobile)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-mobile)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-mobile)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-mobile)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){.font-size-body-l{font-size:var(--px-text-size-body-l-tablet)}.font-size-body-m{font-size:var(--px-text-size-body-m-tablet)}.font-size-body-s{font-size:var(--px-text-size-body-s-tablet)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-tablet)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-tablet)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-tablet)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-tablet)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-tablet)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-tablet)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-tablet)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-tablet)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-tablet)}}@media only screen and (min-width: 1025px){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-normal{font-weight:var(--font-weight-regular)}.font-weight-bold{font-weight:var(--font-weight-bold)}.font-weight-extrabold{font-weight:var(--font-weight-extrabold)}.font-weight-light{font-weight:var(--font-weight-light)}", y = new CSSStyleSheet();
|
|
3
|
+
y.replaceSync(C);
|
|
4
|
+
const m = new CSSStyleSheet();
|
|
5
|
+
m.replaceSync(S);
|
|
6
|
+
class n extends k {
|
|
7
7
|
template() {
|
|
8
8
|
return "<slot></slot>";
|
|
9
9
|
}
|
|
10
10
|
constructor(t) {
|
|
11
|
-
super(y,
|
|
11
|
+
super(y, m);
|
|
12
12
|
const e = document.createElement(t);
|
|
13
13
|
e.innerHTML = this.template(), this.shadowRoot.appendChild(e);
|
|
14
14
|
}
|
|
@@ -52,40 +52,46 @@ class r extends k {
|
|
|
52
52
|
checkName(t, e) {
|
|
53
53
|
return t.includes(e);
|
|
54
54
|
}
|
|
55
|
-
updateAttribute(t, e, i,
|
|
56
|
-
this.checkName(
|
|
55
|
+
updateAttribute(t, e, i, s) {
|
|
56
|
+
this.checkName(s, i) ? this.toggleClass(e, i) : console.error(
|
|
57
|
+
`${i} is not an allowed "${t}" value for`,
|
|
58
|
+
this.$el
|
|
59
|
+
);
|
|
57
60
|
}
|
|
58
61
|
updateColor(t, e, i) {
|
|
59
62
|
if (!this.checkName(i, e)) {
|
|
60
63
|
console.error("Bad color value for", this.$el);
|
|
61
64
|
return;
|
|
62
65
|
}
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
`var(--px-color
|
|
67
|
-
)
|
|
66
|
+
const s = (o) => {
|
|
67
|
+
o !== null && o !== "" && o !== "default" && (this.$el.style.setProperty(
|
|
68
|
+
"--heading-color-default",
|
|
69
|
+
`var(--px-text-color-${o}-default)`
|
|
70
|
+
), this.$el.style.setProperty(
|
|
71
|
+
"--heading-color-inverted",
|
|
72
|
+
`var(--px-text-color-${o}-inverted)`
|
|
73
|
+
));
|
|
68
74
|
};
|
|
69
75
|
s(t), s(e);
|
|
70
76
|
}
|
|
71
|
-
updateTextAlign(t, e, i,
|
|
72
|
-
if (!this.checkName(
|
|
77
|
+
updateTextAlign(t, e, i, s) {
|
|
78
|
+
if (!this.checkName(s, i)) {
|
|
73
79
|
console.error(`Bad ${t} value for`, this.$el);
|
|
74
80
|
return;
|
|
75
81
|
}
|
|
76
|
-
const
|
|
77
|
-
|
|
82
|
+
const o = (l, r) => {
|
|
83
|
+
r !== null && r !== "" && r !== "default" && this.$el.style.setProperty(
|
|
78
84
|
`--heading-text-align--${l}`,
|
|
79
|
-
|
|
85
|
+
r
|
|
80
86
|
);
|
|
81
87
|
};
|
|
82
88
|
if (t === "text-align")
|
|
83
89
|
["mobile", "tablet", "laptop", "desktop"].forEach((l) => {
|
|
84
|
-
|
|
90
|
+
o(l, e), o(l, i);
|
|
85
91
|
});
|
|
86
92
|
else {
|
|
87
93
|
const l = t.split("--")[1];
|
|
88
|
-
|
|
94
|
+
o(l, e), o(l, i);
|
|
89
95
|
}
|
|
90
96
|
}
|
|
91
97
|
get variant() {
|
|
@@ -137,39 +143,39 @@ class r extends k {
|
|
|
137
143
|
this.setAttribute("inverted", t);
|
|
138
144
|
}
|
|
139
145
|
}
|
|
140
|
-
const
|
|
146
|
+
const g = class g extends n {
|
|
141
147
|
constructor() {
|
|
142
148
|
super("h1");
|
|
143
149
|
}
|
|
144
150
|
};
|
|
145
|
-
|
|
146
|
-
let
|
|
147
|
-
customElements.define("px-h1",
|
|
148
|
-
const v = class v extends
|
|
151
|
+
g.nativeName = "h1";
|
|
152
|
+
let a = g;
|
|
153
|
+
customElements.define("px-h1", a);
|
|
154
|
+
const v = class v extends n {
|
|
149
155
|
constructor() {
|
|
150
156
|
super("h2");
|
|
151
157
|
}
|
|
152
158
|
};
|
|
153
159
|
v.nativeName = "h2";
|
|
154
|
-
let
|
|
155
|
-
customElements.define("px-h2",
|
|
156
|
-
const
|
|
160
|
+
let h = v;
|
|
161
|
+
customElements.define("px-h2", h);
|
|
162
|
+
const f = class f extends n {
|
|
157
163
|
constructor() {
|
|
158
164
|
super("h3");
|
|
159
165
|
}
|
|
160
166
|
};
|
|
161
|
-
|
|
162
|
-
let
|
|
163
|
-
customElements.define("px-h3",
|
|
164
|
-
const
|
|
167
|
+
f.nativeName = "h3";
|
|
168
|
+
let d = f;
|
|
169
|
+
customElements.define("px-h3", d);
|
|
170
|
+
const z = class z extends n {
|
|
165
171
|
constructor() {
|
|
166
172
|
super("h4");
|
|
167
173
|
}
|
|
168
174
|
};
|
|
169
|
-
|
|
170
|
-
let
|
|
171
|
-
customElements.define("px-h4",
|
|
172
|
-
const b = class b extends
|
|
175
|
+
z.nativeName = "h4";
|
|
176
|
+
let x = z;
|
|
177
|
+
customElements.define("px-h4", x);
|
|
178
|
+
const b = class b extends n {
|
|
173
179
|
constructor() {
|
|
174
180
|
super("h5");
|
|
175
181
|
}
|
|
@@ -177,19 +183,19 @@ const b = class b extends r {
|
|
|
177
183
|
b.nativeName = "h5";
|
|
178
184
|
let p = b;
|
|
179
185
|
customElements.define("px-h5", p);
|
|
180
|
-
const
|
|
186
|
+
const u = class u extends n {
|
|
181
187
|
constructor() {
|
|
182
188
|
super("h6");
|
|
183
189
|
}
|
|
184
190
|
};
|
|
185
|
-
|
|
186
|
-
let
|
|
187
|
-
customElements.define("px-h6",
|
|
191
|
+
u.nativeName = "h6";
|
|
192
|
+
let c = u;
|
|
193
|
+
customElements.define("px-h6", c);
|
|
188
194
|
export {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
195
|
+
a as H1,
|
|
196
|
+
h as H2,
|
|
197
|
+
d as H3,
|
|
198
|
+
x as H4,
|
|
193
199
|
p as H5,
|
|
194
|
-
|
|
200
|
+
c as H6
|
|
195
201
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-heading",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.41",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "671fab7ee21d1c0ec6498b45b0bb2fd47e6e6c84",
|
|
28
28
|
"lerna": {
|
|
29
29
|
"command": {
|
|
30
30
|
"publish": {
|