@proximus/lavender-heading 1.2.0-alpha.44 → 1.2.0-alpha.47
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 +201 -0
- package/package.json +6 -32
- package/dist/index.js +0 -201
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { PxElement as k, textalignValues as A, colorValues as w, headingValues as $ } from "@proximus/lavender-common";
|
|
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-color-text-brand-default));text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-font-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-color-text-brand-inverted))}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-mobile);line-height:var(--px-font-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-font-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-font-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-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 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-brand{color:var(--px-color-text-brand-default)}.color-action-neutral{color:var(--px-color-text-neutral-default)}.color-action-hover{color:var(--px-color-text-state-hover-default)}.color-action-active{color:var(--px-color-text-state-active-default)}.color-action-disabled{color:var(--px-color-text-state-disabled-default)}.color-body-neutral-strong{color:var(--px-color-text-neutral-default)}.color-body-neutral-weak{color:var(--px-color-text-dimmed-default)}.color-heading-brand{color:var(--px-color-text-brand-default)}.color-heading-neutral{color:var(--px-color-text-neutral-default)}.color-purpose-success{color:var(--px-color-text-purpose-success-default)}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)}.color-purpose-error{color:var(--px-color-text-purpose-error-default)}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)}:host([inverted]) .color-inherit{color:inherit}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-action-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-action-hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) .color-action-active{color:var(--px-color-text-state-active-inverted)}:host([inverted]) .color-action-disabled{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .color-body-neutral-strong{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-body-neutral-weak{color:var(--px-color-text-dimmed-inverted)}:host([inverted]) .color-heading-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-heading-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-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-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)}}@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 r extends k {
|
|
7
|
+
template() {
|
|
8
|
+
return "<slot></slot>";
|
|
9
|
+
}
|
|
10
|
+
constructor(t) {
|
|
11
|
+
super(y, m);
|
|
12
|
+
const e = document.createElement(t);
|
|
13
|
+
e.innerHTML = this.template(), this.shadowRoot.appendChild(e);
|
|
14
|
+
}
|
|
15
|
+
static get observedAttributes() {
|
|
16
|
+
return [
|
|
17
|
+
...super.observedAttributes,
|
|
18
|
+
"variant",
|
|
19
|
+
"color",
|
|
20
|
+
"text-align",
|
|
21
|
+
"text-align--mobile",
|
|
22
|
+
"text-align--tablet",
|
|
23
|
+
"text-align--laptop",
|
|
24
|
+
"text-align--desktop",
|
|
25
|
+
"inverted"
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
attributeChangedCallback(t, e, i) {
|
|
29
|
+
if (e !== i)
|
|
30
|
+
switch (t) {
|
|
31
|
+
case "variant":
|
|
32
|
+
this.updateAttribute(t, e, i, $);
|
|
33
|
+
break;
|
|
34
|
+
case "color":
|
|
35
|
+
this.updateColor(e, i, w);
|
|
36
|
+
break;
|
|
37
|
+
case "text-align":
|
|
38
|
+
case "text-align--mobile":
|
|
39
|
+
case "text-align--tablet":
|
|
40
|
+
case "text-align--laptop":
|
|
41
|
+
case "text-align--desktop":
|
|
42
|
+
this.updateTextAlign(t, e, i, A);
|
|
43
|
+
break;
|
|
44
|
+
default:
|
|
45
|
+
super.attributeChangedCallback(t, e, i);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
toggleClass(t, e) {
|
|
50
|
+
t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`style-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`style-${e}`);
|
|
51
|
+
}
|
|
52
|
+
checkName(t, e) {
|
|
53
|
+
return t.includes(e);
|
|
54
|
+
}
|
|
55
|
+
updateAttribute(t, e, i, l) {
|
|
56
|
+
this.checkName(l, i) ? this.toggleClass(e, i) : console.error(
|
|
57
|
+
`${i} is not an allowed "${t}" value for`,
|
|
58
|
+
this.$el
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
updateColor(t, e, i) {
|
|
62
|
+
if (!this.checkName(i, e)) {
|
|
63
|
+
console.error("Bad color value for", this.$el);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const l = (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
|
+
));
|
|
74
|
+
};
|
|
75
|
+
l(t), l(e);
|
|
76
|
+
}
|
|
77
|
+
updateTextAlign(t, e, i, l) {
|
|
78
|
+
if (!this.checkName(l, i)) {
|
|
79
|
+
console.error(`Bad ${t} value for`, this.$el);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const o = (s, n) => {
|
|
83
|
+
n !== null && n !== "" && n !== "default" && this.$el.style.setProperty(
|
|
84
|
+
`--heading-text-align--${s}`,
|
|
85
|
+
n
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
if (t === "text-align")
|
|
89
|
+
["mobile", "tablet", "laptop", "desktop"].forEach((s) => {
|
|
90
|
+
o(s, e), o(s, i);
|
|
91
|
+
});
|
|
92
|
+
else {
|
|
93
|
+
const s = t.split("--")[1];
|
|
94
|
+
o(s, e), o(s, i);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
get variant() {
|
|
98
|
+
return this.getAttribute("variant");
|
|
99
|
+
}
|
|
100
|
+
set variant(t) {
|
|
101
|
+
this.setAttribute("variant", t);
|
|
102
|
+
}
|
|
103
|
+
get color() {
|
|
104
|
+
return this.getAttribute("color");
|
|
105
|
+
}
|
|
106
|
+
set color(t) {
|
|
107
|
+
this.setAttribute("color", t);
|
|
108
|
+
}
|
|
109
|
+
get textAlign() {
|
|
110
|
+
return this.getAttribute("text-align");
|
|
111
|
+
}
|
|
112
|
+
set textAlign(t) {
|
|
113
|
+
this.setAttribute("text-align", t);
|
|
114
|
+
}
|
|
115
|
+
get textAlignMobile() {
|
|
116
|
+
return this.getAttribute("text-align--mobile");
|
|
117
|
+
}
|
|
118
|
+
set textAlignMobile(t) {
|
|
119
|
+
this.setAttribute("text-align--mobile", t);
|
|
120
|
+
}
|
|
121
|
+
get textAlignTablet() {
|
|
122
|
+
return this.getAttribute("text-align--tablet");
|
|
123
|
+
}
|
|
124
|
+
set textAlignTablet(t) {
|
|
125
|
+
this.setAttribute("text-align--tablet", t);
|
|
126
|
+
}
|
|
127
|
+
get textAlignLaptop() {
|
|
128
|
+
return this.getAttribute("text-align--laptop");
|
|
129
|
+
}
|
|
130
|
+
set textAlignLaptop(t) {
|
|
131
|
+
this.setAttribute("text-align--laptop", t);
|
|
132
|
+
}
|
|
133
|
+
get textAlignDesktop() {
|
|
134
|
+
return this.getAttribute("text-align--desktop");
|
|
135
|
+
}
|
|
136
|
+
set textAlignDesktop(t) {
|
|
137
|
+
this.setAttribute("text-align--desktop", t);
|
|
138
|
+
}
|
|
139
|
+
get inverted() {
|
|
140
|
+
return this.getAttribute("inverted");
|
|
141
|
+
}
|
|
142
|
+
set inverted(t) {
|
|
143
|
+
this.setAttribute("inverted", t);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
const g = class g extends r {
|
|
147
|
+
constructor() {
|
|
148
|
+
super("h1");
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
g.nativeName = "h1";
|
|
152
|
+
let a = g;
|
|
153
|
+
customElements.define("px-h1", a);
|
|
154
|
+
const v = class v extends r {
|
|
155
|
+
constructor() {
|
|
156
|
+
super("h2");
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
v.nativeName = "h2";
|
|
160
|
+
let d = v;
|
|
161
|
+
customElements.define("px-h2", d);
|
|
162
|
+
const f = class f extends r {
|
|
163
|
+
constructor() {
|
|
164
|
+
super("h3");
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
f.nativeName = "h3";
|
|
168
|
+
let h = f;
|
|
169
|
+
customElements.define("px-h3", h);
|
|
170
|
+
const z = class z extends r {
|
|
171
|
+
constructor() {
|
|
172
|
+
super("h4");
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
z.nativeName = "h4";
|
|
176
|
+
let x = z;
|
|
177
|
+
customElements.define("px-h4", x);
|
|
178
|
+
const u = class u extends r {
|
|
179
|
+
constructor() {
|
|
180
|
+
super("h5");
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
u.nativeName = "h5";
|
|
184
|
+
let p = u;
|
|
185
|
+
customElements.define("px-h5", p);
|
|
186
|
+
const b = class b extends r {
|
|
187
|
+
constructor() {
|
|
188
|
+
super("h6");
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
b.nativeName = "h6";
|
|
192
|
+
let c = b;
|
|
193
|
+
customElements.define("px-h6", c);
|
|
194
|
+
export {
|
|
195
|
+
a as H1,
|
|
196
|
+
d as H2,
|
|
197
|
+
h as H3,
|
|
198
|
+
x as H4,
|
|
199
|
+
p as H5,
|
|
200
|
+
c as H6
|
|
201
|
+
};
|
package/package.json
CHANGED
|
@@ -1,46 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-heading",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.47",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./src/index.ts",
|
|
9
|
-
"development": "./src/index.ts",
|
|
10
|
-
"default": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"./src/*.css": {
|
|
13
|
-
"development": "src/*.css"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
5
|
+
"main": "dist/index.es.js",
|
|
16
6
|
"files": [
|
|
17
7
|
"dist"
|
|
18
8
|
],
|
|
19
9
|
"type": "module",
|
|
20
10
|
"scripts": {
|
|
21
|
-
"
|
|
11
|
+
"transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
|
|
12
|
+
"clean": "rm -rf dist",
|
|
13
|
+
"build": "npm run clean && tsc && NODE_ENV=development vite build && npm run transform-package-json",
|
|
22
14
|
"test": "vitest run --coverage"
|
|
23
15
|
},
|
|
24
16
|
"publishConfig": {
|
|
25
17
|
"access": "public"
|
|
26
18
|
},
|
|
27
|
-
"gitHead": "
|
|
28
|
-
"lerna": {
|
|
29
|
-
"command": {
|
|
30
|
-
"publish": {
|
|
31
|
-
"assets": [
|
|
32
|
-
"CHANGELOG.md",
|
|
33
|
-
"package.json",
|
|
34
|
-
"dist/*.js",
|
|
35
|
-
"dist/*.cjs",
|
|
36
|
-
"dist/css/**/*.css",
|
|
37
|
-
"dist/js/**/*.js",
|
|
38
|
-
"dist/*.svg",
|
|
39
|
-
"dist/*.ttf",
|
|
40
|
-
"dist/glyphmap.json",
|
|
41
|
-
"dist/*.d.ts"
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
19
|
+
"gitHead": "460ebd4c7e0171baabc0871a7058f475b5c9adbb"
|
|
46
20
|
}
|
package/dist/index.js
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import { PxElement as k, textalignValues as A, colorValues as w, headingValues as $ } from "@proximus/lavender-common";
|
|
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-color-text-brand-default) );text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-font-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-color-text-brand-inverted) )}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-mobile);line-height:var(--px-font-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-font-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-font-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-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 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-brand{color:var(--px-color-text-brand-default)}.color-action-neutral{color:var(--px-color-text-neutral-default)}.color-action-hover{color:var(--px-color-text-state-hover-default)}.color-action-active{color:var(--px-color-text-state-active-default)}.color-action-disabled{color:var(--px-color-text-state-disabled-default)}.color-body-neutral-strong{color:var(--px-color-text-neutral-default)}.color-body-neutral-weak{color:var(--px-color-text-dimmed-default)}.color-heading-brand{color:var(--px-color-text-brand-default)}.color-heading-neutral{color:var(--px-color-text-neutral-default)}.color-purpose-success{color:var(--px-color-text-purpose-success-default)}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)}.color-purpose-error{color:var(--px-color-text-purpose-error-default)}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)}:host([inverted]) .color-inherit{color:inherit}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-action-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-action-hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) .color-action-active{color:var(--px-color-text-state-active-inverted)}:host([inverted]) .color-action-disabled{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .color-body-neutral-strong{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-body-neutral-weak{color:var(--px-color-text-dimmed-inverted)}:host([inverted]) .color-heading-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-heading-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-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-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)}}@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 r extends k {
|
|
7
|
-
template() {
|
|
8
|
-
return "<slot></slot>";
|
|
9
|
-
}
|
|
10
|
-
constructor(t) {
|
|
11
|
-
super(y, m);
|
|
12
|
-
const e = document.createElement(t);
|
|
13
|
-
e.innerHTML = this.template(), this.shadowRoot.appendChild(e);
|
|
14
|
-
}
|
|
15
|
-
static get observedAttributes() {
|
|
16
|
-
return [
|
|
17
|
-
...super.observedAttributes,
|
|
18
|
-
"variant",
|
|
19
|
-
"color",
|
|
20
|
-
"text-align",
|
|
21
|
-
"text-align--mobile",
|
|
22
|
-
"text-align--tablet",
|
|
23
|
-
"text-align--laptop",
|
|
24
|
-
"text-align--desktop",
|
|
25
|
-
"inverted"
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
attributeChangedCallback(t, e, i) {
|
|
29
|
-
if (e !== i)
|
|
30
|
-
switch (t) {
|
|
31
|
-
case "variant":
|
|
32
|
-
this.updateAttribute(t, e, i, $);
|
|
33
|
-
break;
|
|
34
|
-
case "color":
|
|
35
|
-
this.updateColor(e, i, w);
|
|
36
|
-
break;
|
|
37
|
-
case "text-align":
|
|
38
|
-
case "text-align--mobile":
|
|
39
|
-
case "text-align--tablet":
|
|
40
|
-
case "text-align--laptop":
|
|
41
|
-
case "text-align--desktop":
|
|
42
|
-
this.updateTextAlign(t, e, i, A);
|
|
43
|
-
break;
|
|
44
|
-
default:
|
|
45
|
-
super.attributeChangedCallback(t, e, i);
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
toggleClass(t, e) {
|
|
50
|
-
t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`style-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`style-${e}`);
|
|
51
|
-
}
|
|
52
|
-
checkName(t, e) {
|
|
53
|
-
return t.includes(e);
|
|
54
|
-
}
|
|
55
|
-
updateAttribute(t, e, i, l) {
|
|
56
|
-
this.checkName(l, i) ? this.toggleClass(e, i) : console.error(
|
|
57
|
-
`${i} is not an allowed "${t}" value for`,
|
|
58
|
-
this.$el
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
updateColor(t, e, i) {
|
|
62
|
-
if (!this.checkName(i, e)) {
|
|
63
|
-
console.error("Bad color value for", this.$el);
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const l = (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
|
-
));
|
|
74
|
-
};
|
|
75
|
-
l(t), l(e);
|
|
76
|
-
}
|
|
77
|
-
updateTextAlign(t, e, i, l) {
|
|
78
|
-
if (!this.checkName(l, i)) {
|
|
79
|
-
console.error(`Bad ${t} value for`, this.$el);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const o = (s, n) => {
|
|
83
|
-
n !== null && n !== "" && n !== "default" && this.$el.style.setProperty(
|
|
84
|
-
`--heading-text-align--${s}`,
|
|
85
|
-
n
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
if (t === "text-align")
|
|
89
|
-
["mobile", "tablet", "laptop", "desktop"].forEach((s) => {
|
|
90
|
-
o(s, e), o(s, i);
|
|
91
|
-
});
|
|
92
|
-
else {
|
|
93
|
-
const s = t.split("--")[1];
|
|
94
|
-
o(s, e), o(s, i);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
get variant() {
|
|
98
|
-
return this.getAttribute("variant");
|
|
99
|
-
}
|
|
100
|
-
set variant(t) {
|
|
101
|
-
this.setAttribute("variant", t);
|
|
102
|
-
}
|
|
103
|
-
get color() {
|
|
104
|
-
return this.getAttribute("color");
|
|
105
|
-
}
|
|
106
|
-
set color(t) {
|
|
107
|
-
this.setAttribute("color", t);
|
|
108
|
-
}
|
|
109
|
-
get textAlign() {
|
|
110
|
-
return this.getAttribute("text-align");
|
|
111
|
-
}
|
|
112
|
-
set textAlign(t) {
|
|
113
|
-
this.setAttribute("text-align", t);
|
|
114
|
-
}
|
|
115
|
-
get textAlignMobile() {
|
|
116
|
-
return this.getAttribute("text-align--mobile");
|
|
117
|
-
}
|
|
118
|
-
set textAlignMobile(t) {
|
|
119
|
-
this.setAttribute("text-align--mobile", t);
|
|
120
|
-
}
|
|
121
|
-
get textAlignTablet() {
|
|
122
|
-
return this.getAttribute("text-align--tablet");
|
|
123
|
-
}
|
|
124
|
-
set textAlignTablet(t) {
|
|
125
|
-
this.setAttribute("text-align--tablet", t);
|
|
126
|
-
}
|
|
127
|
-
get textAlignLaptop() {
|
|
128
|
-
return this.getAttribute("text-align--laptop");
|
|
129
|
-
}
|
|
130
|
-
set textAlignLaptop(t) {
|
|
131
|
-
this.setAttribute("text-align--laptop", t);
|
|
132
|
-
}
|
|
133
|
-
get textAlignDesktop() {
|
|
134
|
-
return this.getAttribute("text-align--desktop");
|
|
135
|
-
}
|
|
136
|
-
set textAlignDesktop(t) {
|
|
137
|
-
this.setAttribute("text-align--desktop", t);
|
|
138
|
-
}
|
|
139
|
-
get inverted() {
|
|
140
|
-
return this.getAttribute("inverted");
|
|
141
|
-
}
|
|
142
|
-
set inverted(t) {
|
|
143
|
-
this.setAttribute("inverted", t);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
const g = class g extends r {
|
|
147
|
-
constructor() {
|
|
148
|
-
super("h1");
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
g.nativeName = "h1";
|
|
152
|
-
let a = g;
|
|
153
|
-
customElements.define("px-h1", a);
|
|
154
|
-
const v = class v extends r {
|
|
155
|
-
constructor() {
|
|
156
|
-
super("h2");
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
v.nativeName = "h2";
|
|
160
|
-
let d = v;
|
|
161
|
-
customElements.define("px-h2", d);
|
|
162
|
-
const f = class f extends r {
|
|
163
|
-
constructor() {
|
|
164
|
-
super("h3");
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
f.nativeName = "h3";
|
|
168
|
-
let h = f;
|
|
169
|
-
customElements.define("px-h3", h);
|
|
170
|
-
const z = class z extends r {
|
|
171
|
-
constructor() {
|
|
172
|
-
super("h4");
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
z.nativeName = "h4";
|
|
176
|
-
let x = z;
|
|
177
|
-
customElements.define("px-h4", x);
|
|
178
|
-
const u = class u extends r {
|
|
179
|
-
constructor() {
|
|
180
|
-
super("h5");
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
u.nativeName = "h5";
|
|
184
|
-
let p = u;
|
|
185
|
-
customElements.define("px-h5", p);
|
|
186
|
-
const b = class b extends r {
|
|
187
|
-
constructor() {
|
|
188
|
-
super("h6");
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
b.nativeName = "h6";
|
|
192
|
-
let c = b;
|
|
193
|
-
customElements.define("px-h6", c);
|
|
194
|
-
export {
|
|
195
|
-
a as H1,
|
|
196
|
-
d as H2,
|
|
197
|
-
h as H3,
|
|
198
|
-
x as H4,
|
|
199
|
-
p as H5,
|
|
200
|
-
c as H6
|
|
201
|
-
};
|