@proximus/lavender-span 1.4.14-beta.3 → 1.4.14
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/Span.d.ts +12 -12
- package/dist/index.es.js +86 -81
- package/package.json +1 -1
package/dist/Span.d.ts
CHANGED
|
@@ -10,16 +10,16 @@ export declare class Span extends PxElement<HTMLSpanElement> {
|
|
|
10
10
|
static get observedAttributes(): string[];
|
|
11
11
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
12
12
|
updateTypography(attrName: string, oldValue: string, newValue: string, attrValue: string[]): void;
|
|
13
|
-
get color(): string
|
|
14
|
-
set color(value: string
|
|
15
|
-
get fontsize(): string
|
|
16
|
-
set fontsize(value: string
|
|
17
|
-
get fontweight(): string
|
|
18
|
-
set fontweight(value: string
|
|
19
|
-
get inverted():
|
|
20
|
-
set inverted(value:
|
|
21
|
-
get strikethrough():
|
|
22
|
-
set strikethrough(value:
|
|
23
|
-
get disabled():
|
|
24
|
-
set disabled(value:
|
|
13
|
+
get color(): string;
|
|
14
|
+
set color(value: string);
|
|
15
|
+
get fontsize(): string;
|
|
16
|
+
set fontsize(value: string);
|
|
17
|
+
get fontweight(): string;
|
|
18
|
+
set fontweight(value: string);
|
|
19
|
+
get inverted(): string;
|
|
20
|
+
set inverted(value: string);
|
|
21
|
+
get strikethrough(): string;
|
|
22
|
+
set strikethrough(value: string);
|
|
23
|
+
get disabled(): string;
|
|
24
|
+
set disabled(value: string);
|
|
25
25
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,82 +1,87 @@
|
|
|
1
|
-
import { PxElement as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
import { PxElement as p, fontweightValues as d, fontsizeValues as x, colorValues as h, log as z, isFalsy as o } from "@proximus/lavender-common";
|
|
2
|
+
const f = "span,::slotted(span){font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);font-size:var(--px-text-size-body-m-mobile);line-height:var(--px-line-height-ratio-l)}:host([inverted]) span,:host([inverted]) ::slotted(span){color:var(--px-color-text-neutral-inverted)}:host([strikethrough]) span{text-decoration:line-through}span.link{text-decoration:underline}@media screen and (min-width: 48rem){span,::slotted(span){font-size:var(--px-text-size-body-m-tablet)}}@media screen and (min-width: 64.0625rem){span,::slotted(span){font-size:var(--px-text-size-body-m-laptop)}}", v = ".color-inherit{color:inherit!important}.color-brand{color:var(--px-color-text-brand-default)!important}.color-neutral{color:var(--px-color-text-neutral-default)!important}.color-dimmed{color:var(--px-color-text-dimmed-default)!important}.color-purpose-success{color:var(--px-color-text-purpose-success-default)!important}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)!important}.color-purpose-error{color:var(--px-color-text-purpose-error-default)!important}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)!important}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)!important}.color-state-hover{color:var(--px-color-text-state-hover-default)!important}.color-state-active{color:var(--px-color-text-state-active-default)!important}.color-state-disabled{color:var(--px-color-text-state-disabled-default)!important}:host([inverted]) .color-inherit{color:inherit!important}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)!important}:host([inverted]) .color-neutral{color:var(--px-color-text-neutral-inverted)!important}:host([inverted]) .color-dimmed{color:var(--px-color-text-dimmed-inverted)!important}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)!important}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)!important}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)!important}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)!important}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-purpose-promo-inverted)!important}:host([inverted]) .color-state-hover{color:var(--px-color-text-state-hover-inverted)!important}:host([inverted]) .color-state-active{color:var(--px-color-text-state-active-inverted)!important}:host([inverted]) .color-state-disabled{color:var(--px-color-text-state-disabled-inverted)!important}.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)}.font-size-heading-3xl,.font-size-heading-4xl,.font-size-heading-5xl{line-height:var(--px-line-height-ratio-s)}.font-size-link-m{font-size:var(--px-text-size-link-m-mobile)}.font-size-link-s{font-size:var(--px-text-size-link-s-mobile)}@media screen and (min-width: 48rem){.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)}.font-size-link-m{font-size:var(--px-text-size-link-m-tablet)}.font-size-link-s{font-size:var(--px-text-size-link-s-tablet)}}@media screen and (min-width: 64.0625rem){.font-size-body-l{font-size:var(--px-text-size-body-l-laptop)}.font-size-body-m{font-size:var(--px-text-size-body-m-laptop)}.font-size-body-s{font-size:var(--px-text-size-body-s-laptop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-laptop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-laptop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-laptop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-laptop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-laptop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-laptop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-laptop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-laptop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-laptop)}.font-size-link-m{font-size:var(--px-text-size-link-m-laptop)}.font-size-link-s{font-size:var(--px-text-size-link-s-laptop)}}@media screen and (min-width: 90.0625rem){.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-size-link-m{font-size:var(--px-text-size-link-m-desktop)}.font-size-link-s{font-size:var(--px-text-size-link-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-body{font-weight:var(--px-font-weight-body)}.font-weight-title{font-weight:var(--px-font-weight-title)}.font-weight-title-large{font-weight:var(--px-font-weight-title-large)}.font-weight-subtitle{font-weight:var(--px-font-weight-subtitle)}", a = new CSSStyleSheet(), l = new CSSStyleSheet();
|
|
3
|
+
a.replaceSync(f);
|
|
4
|
+
l.replaceSync(v);
|
|
5
|
+
const n = class n extends p {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(a, l), this.template = () => "<span><slot></slot></span>", this.shadowRoot.innerHTML = this.template();
|
|
8
|
+
}
|
|
9
|
+
static get observedAttributes() {
|
|
10
|
+
return [
|
|
11
|
+
...super.observedAttributes,
|
|
12
|
+
"color",
|
|
13
|
+
"font-size",
|
|
14
|
+
"font-weight",
|
|
15
|
+
"inverted",
|
|
16
|
+
"disabled",
|
|
17
|
+
"strikethrough"
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
attributeChangedCallback(t, i, e) {
|
|
21
|
+
if (i !== e)
|
|
22
|
+
switch (t) {
|
|
23
|
+
case "color":
|
|
24
|
+
this.updateTypography(t, i, e, h);
|
|
25
|
+
break;
|
|
26
|
+
case "font-size":
|
|
27
|
+
this.updateTypography(t, i, e, x);
|
|
28
|
+
break;
|
|
29
|
+
case "font-weight":
|
|
30
|
+
this.updateTypography(t, i, e, d);
|
|
31
|
+
break;
|
|
32
|
+
case "disabled":
|
|
33
|
+
this.color = "state-disabled";
|
|
34
|
+
break;
|
|
35
|
+
default:
|
|
36
|
+
super.attributeChangedCallback(t, i, e);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
updateTypography(t, i, e, r) {
|
|
41
|
+
i !== null && i !== "" && i !== "default" && this.$el.classList.toggle(`${t}-${i}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), this.checkName(r, e) || z(
|
|
42
|
+
`"${e}" is not a valid ${t} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join('", "')}".`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
get color() {
|
|
46
|
+
return this.getAttribute("color");
|
|
47
|
+
}
|
|
48
|
+
set color(t) {
|
|
49
|
+
this.setAttribute("color", t);
|
|
50
|
+
}
|
|
51
|
+
get fontsize() {
|
|
52
|
+
return this.getAttribute("font-size");
|
|
53
|
+
}
|
|
54
|
+
set fontsize(t) {
|
|
55
|
+
this.setAttribute("font-size", t);
|
|
56
|
+
}
|
|
57
|
+
get fontweight() {
|
|
58
|
+
return this.getAttribute("font-weight");
|
|
59
|
+
}
|
|
60
|
+
set fontweight(t) {
|
|
61
|
+
this.setAttribute("font-weight", t);
|
|
62
|
+
}
|
|
63
|
+
get inverted() {
|
|
64
|
+
return this.getAttribute("inverted");
|
|
65
|
+
}
|
|
66
|
+
set inverted(t) {
|
|
67
|
+
o(t) ? this.removeAttribute("inverted") : this.setAttribute("inverted", t);
|
|
68
|
+
}
|
|
69
|
+
get strikethrough() {
|
|
70
|
+
return this.getAttribute("strikethrough");
|
|
71
|
+
}
|
|
72
|
+
set strikethrough(t) {
|
|
73
|
+
o(t) ? this.removeAttribute("strikethrough") : this.setAttribute("strikethrough", t);
|
|
74
|
+
}
|
|
75
|
+
get disabled() {
|
|
76
|
+
return this.getAttribute("disabled");
|
|
77
|
+
}
|
|
78
|
+
set disabled(t) {
|
|
79
|
+
o(t) ? this.removeAttribute("disabled") : this.setAttribute("disabled", t);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
n.nativeName = "span";
|
|
83
|
+
let s = n;
|
|
84
|
+
customElements.get("px-span") || customElements.define("px-span", s);
|
|
85
|
+
export {
|
|
86
|
+
s as Span
|
|
79
87
|
};
|
|
80
|
-
customElements.get("px-span") || customElements.define("px-span", l);
|
|
81
|
-
//#endregion
|
|
82
|
-
export { l as Span };
|