@proximus/lavender-span 2.0.0-alpha.23 → 2.0.0-alpha.230

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 CHANGED
@@ -1,19 +1,26 @@
1
1
  import { PxElement } from '@proximus/lavender-common';
2
2
  export declare class Span extends PxElement<HTMLSpanElement> {
3
+ /**
4
+ * @summary A span component for styling text.
5
+ * @attr {string} title - Text to be displayed in a tooltip when hovering over the element.
6
+ */
7
+ protected static readonly template: HTMLTemplateElement;
3
8
  static nativeName: string;
4
- private template;
9
+ static nativeAttributes: {};
5
10
  constructor();
6
11
  static get observedAttributes(): string[];
7
12
  attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
8
13
  updateTypography(attrName: string, oldValue: string, newValue: string, attrValue: string[]): void;
9
- get color(): string;
10
- set color(value: string);
11
- get fontsize(): string;
12
- set fontsize(value: string);
13
- get fontweight(): string;
14
- set fontweight(value: string);
15
- get inverted(): string;
16
- set inverted(value: string);
17
- get disabled(): string;
18
- set disabled(value: string);
14
+ get color(): string | null;
15
+ set color(value: string | null);
16
+ get fontsize(): string | null;
17
+ set fontsize(value: string | null);
18
+ get fontweight(): string | null;
19
+ set fontweight(value: string | null);
20
+ get inverted(): boolean;
21
+ set inverted(value: boolean);
22
+ get strikethrough(): boolean;
23
+ set strikethrough(value: boolean);
24
+ get disabled(): boolean;
25
+ set disabled(value: boolean);
19
26
  }
@@ -0,0 +1,172 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/Span.ts",
8
+ "declarations": [
9
+ {
10
+ "kind": "class",
11
+ "description": "",
12
+ "name": "Span",
13
+ "members": [
14
+ {
15
+ "kind": "field",
16
+ "name": "template",
17
+ "privacy": "protected",
18
+ "static": true,
19
+ "readonly": true,
20
+ "summary": "A span component for styling text.",
21
+ "attribute": "title"
22
+ },
23
+ {
24
+ "kind": "field",
25
+ "name": "nativeName",
26
+ "type": {
27
+ "text": "string"
28
+ },
29
+ "static": true,
30
+ "default": "'span'"
31
+ },
32
+ {
33
+ "kind": "field",
34
+ "name": "nativeAttributes",
35
+ "type": {
36
+ "text": "object"
37
+ },
38
+ "static": true,
39
+ "default": "{}"
40
+ },
41
+ {
42
+ "kind": "method",
43
+ "name": "updateTypography",
44
+ "parameters": [
45
+ {
46
+ "name": "attrName",
47
+ "type": {
48
+ "text": "string"
49
+ }
50
+ },
51
+ {
52
+ "name": "oldValue",
53
+ "type": {
54
+ "text": "string"
55
+ }
56
+ },
57
+ {
58
+ "name": "newValue",
59
+ "type": {
60
+ "text": "string"
61
+ }
62
+ },
63
+ {
64
+ "name": "attrValue",
65
+ "type": {
66
+ "text": "string[]"
67
+ }
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "kind": "field",
73
+ "name": "color"
74
+ },
75
+ {
76
+ "kind": "field",
77
+ "name": "fontsize"
78
+ },
79
+ {
80
+ "kind": "field",
81
+ "name": "fontweight"
82
+ },
83
+ {
84
+ "kind": "field",
85
+ "name": "inverted"
86
+ },
87
+ {
88
+ "kind": "field",
89
+ "name": "strikethrough"
90
+ },
91
+ {
92
+ "kind": "field",
93
+ "name": "disabled"
94
+ }
95
+ ],
96
+ "attributes": [
97
+ {
98
+ "name": "color"
99
+ },
100
+ {
101
+ "name": "font-size"
102
+ },
103
+ {
104
+ "name": "font-weight"
105
+ },
106
+ {
107
+ "name": "inverted"
108
+ },
109
+ {
110
+ "name": "disabled"
111
+ },
112
+ {
113
+ "name": "strikethrough"
114
+ },
115
+ {
116
+ "name": "title",
117
+ "readonly": true,
118
+ "summary": "A span component for styling text.",
119
+ "fieldName": "template",
120
+ "description": "Text to be displayed in a tooltip when hovering over the element."
121
+ }
122
+ ],
123
+ "superclass": {
124
+ "name": "PxElement",
125
+ "package": "@proximus/lavender-common"
126
+ },
127
+ "tagName": "px-span",
128
+ "customElement": true
129
+ }
130
+ ],
131
+ "exports": [
132
+ {
133
+ "kind": "js",
134
+ "name": "Span",
135
+ "declaration": {
136
+ "name": "Span",
137
+ "module": "src/Span.ts"
138
+ }
139
+ },
140
+ {
141
+ "kind": "custom-element-definition",
142
+ "name": "px-span",
143
+ "declaration": {
144
+ "name": "Span",
145
+ "module": "src/Span.ts"
146
+ }
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "kind": "javascript-module",
152
+ "path": "src/index.ts",
153
+ "declarations": [],
154
+ "exports": [
155
+ {
156
+ "kind": "js",
157
+ "name": "*",
158
+ "declaration": {
159
+ "name": "*",
160
+ "module": "src/Span"
161
+ }
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "kind": "javascript-module",
167
+ "path": "src/span.css",
168
+ "declarations": [],
169
+ "exports": []
170
+ }
171
+ ]
172
+ }
package/dist/index.es.js CHANGED
@@ -1,84 +1,88 @@
1
- import { PxElement as l, fontweightValues as d, fontsizeValues as p, colorValues as x, log as f, isFalsy as h } from "@proximus/lavender-common";
2
- const z = "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)}span.link{text-decoration:underline}@media only screen and (min-width: 768px){span,::slotted(span){font-size:var(--px-text-size-body-m-desktop)}}@media only screen and (min-width: 1025px){span,::slotted(span){font-size:var(--px-text-size-body-m-desktop)}}", c = ".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 only screen and (min-width: 48em){.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)}}@media only screen and (min-width: 64.0625em){.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)}", r = new CSSStyleSheet(), n = new CSSStyleSheet();
3
- r.replaceSync(z);
4
- n.replaceSync(c);
5
- const s = class s extends l {
6
- constructor() {
7
- super(r, n), this.template = () => `<span>
8
- <slot name="before"></slot>
9
- <slot></slot>
10
- <slot name="after"></slot>
11
- </span>`, this.shadowRoot.innerHTML = this.template();
12
- }
13
- static get observedAttributes() {
14
- return [
15
- ...super.observedAttributes,
16
- "color",
17
- "font-size",
18
- "font-weight",
19
- "inverted",
20
- "disabled"
21
- ];
22
- }
23
- attributeChangedCallback(t, o, e) {
24
- if (o !== e)
25
- switch (t) {
26
- case "color":
27
- this.updateTypography(t, o, e, x);
28
- break;
29
- case "font-size":
30
- this.updateTypography(t, o, e, p);
31
- break;
32
- case "font-weight":
33
- this.updateTypography(t, o, e, d);
34
- break;
35
- case "disabled":
36
- this.color = "state-disabled";
37
- break;
38
- default:
39
- super.attributeChangedCallback(t, o, e);
40
- break;
41
- }
42
- }
43
- updateTypography(t, o, e, a) {
44
- o !== null && o !== "" && o !== "default" && this.$el.classList.toggle(`${t}-${o}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), this.checkName(a, e) || f(
45
- `${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
46
- );
47
- }
48
- get color() {
49
- return this.getAttribute("color");
50
- }
51
- set color(t) {
52
- this.setAttribute("color", t);
53
- }
54
- get fontsize() {
55
- return this.getAttribute("font-size");
56
- }
57
- set fontsize(t) {
58
- this.setAttribute("font-size", t);
59
- }
60
- get fontweight() {
61
- return this.getAttribute("font-weight");
62
- }
63
- set fontweight(t) {
64
- this.setAttribute("font-weight", t);
65
- }
66
- get inverted() {
67
- return this.getAttribute("inverted");
68
- }
69
- set inverted(t) {
70
- h(t) ? this.removeAttribute("inverted") : this.setAttribute("inverted", t);
71
- }
72
- get disabled() {
73
- return this.getAttribute("disabled");
74
- }
75
- set disabled(t) {
76
- this.setAttribute("disabled", t);
77
- }
78
- };
79
- s.nativeName = "span";
80
- let i = s;
81
- customElements.get("px-span") || customElements.define("px-span", i);
82
- export {
83
- i as Span
1
+ import { PxElement as e, colorValues as t, createTemplate as n, fontsizeValues as r, fontweightValues as i, log as a, renderTemplate as o } from "@proximus/lavender-common";
2
+ //#region src/span.css?inline
3
+ var s = "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 (width>=48rem){span,::slotted(span){font-size:var(--px-text-size-body-m-desktop)}}@media screen and (width>=64.0625rem){span,::slotted(span){font-size:var(--px-text-size-body-m-desktop)}}", c = ".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 (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 (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 (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)}", l = new CSSStyleSheet(), u = new CSSStyleSheet();
4
+ l.replaceSync(s), u.replaceSync(c);
5
+ var d = class s extends e {
6
+ static {
7
+ this.template = n("<span><slot></slot></span>");
8
+ }
9
+ static {
10
+ this.nativeName = "span";
11
+ }
12
+ static {
13
+ this.nativeAttributes = {};
14
+ }
15
+ constructor() {
16
+ super(l, u), o(this.shadowRoot, s.template);
17
+ }
18
+ static get observedAttributes() {
19
+ return [
20
+ ...super.observedAttributes,
21
+ "color",
22
+ "font-size",
23
+ "font-weight",
24
+ "inverted",
25
+ "disabled",
26
+ "strikethrough"
27
+ ];
28
+ }
29
+ attributeChangedCallback(e, n, a) {
30
+ if (n !== a) switch (e) {
31
+ case "color":
32
+ this.updateTypography(e, n, a, t);
33
+ break;
34
+ case "font-size":
35
+ this.updateTypography(e, n, a, r);
36
+ break;
37
+ case "font-weight":
38
+ this.updateTypography(e, n, a, i);
39
+ break;
40
+ case "disabled":
41
+ this.color = "state-disabled";
42
+ break;
43
+ default: super.attributeChangedCallback(e, n, a);
44
+ }
45
+ }
46
+ updateTypography(e, t, n, r) {
47
+ t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`${e}-${t}`), n !== null && n !== "" && n !== "default" && this.$el.classList.toggle(`${e}-${n}`), this.checkName(r, n) || a(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
48
+ }
49
+ get color() {
50
+ return this.getAttribute("color");
51
+ }
52
+ set color(e) {
53
+ this._updateAttribute("color", e);
54
+ }
55
+ get fontsize() {
56
+ return this.getAttribute("font-size");
57
+ }
58
+ set fontsize(e) {
59
+ this._updateAttribute("font-size", e);
60
+ }
61
+ get fontweight() {
62
+ return this.getAttribute("font-weight");
63
+ }
64
+ set fontweight(e) {
65
+ this._updateAttribute("font-weight", e);
66
+ }
67
+ get inverted() {
68
+ return this.hasAttribute("inverted");
69
+ }
70
+ set inverted(e) {
71
+ this._updateBooleanAttribute("inverted", e);
72
+ }
73
+ get strikethrough() {
74
+ return this.hasAttribute("strikethrough");
75
+ }
76
+ set strikethrough(e) {
77
+ this._updateBooleanAttribute("strikethrough", e);
78
+ }
79
+ get disabled() {
80
+ return this.hasAttribute("disabled");
81
+ }
82
+ set disabled(e) {
83
+ this._updateBooleanAttribute("disabled", e);
84
+ }
84
85
  };
86
+ customElements.get("px-span") || customElements.define("px-span", d);
87
+ //#endregion
88
+ export { d as Span };
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-css-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "properties": [],
5
+ "pseudoElements": []
6
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "px-span",
7
+ "description": "\n---\n",
8
+ "attributes": [
9
+ { "name": "color", "values": [] },
10
+ { "name": "font-size", "values": [] },
11
+ { "name": "font-weight", "values": [] },
12
+ { "name": "inverted", "values": [] },
13
+ { "name": "disabled", "values": [] },
14
+ { "name": "strikethrough", "values": [] },
15
+ {
16
+ "name": "title",
17
+ "description": "Text to be displayed in a tooltip when hovering over the element.",
18
+ "values": []
19
+ }
20
+ ],
21
+ "references": []
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
+ "name": "@proximus/lavender-span",
4
+ "version": "2.0.0-alpha.230",
5
+ "description-markup": "markdown",
6
+ "contributions": {
7
+ "html": {
8
+ "elements": [
9
+ {
10
+ "name": "px-span",
11
+ "description": "\n\n---\n",
12
+ "doc-url": "",
13
+ "attributes": [
14
+ { "name": "color", "value": { "type": "string" } },
15
+ { "name": "font-size", "value": { "type": "string" } },
16
+ { "name": "font-weight", "value": { "type": "string" } },
17
+ { "name": "inverted", "value": { "type": "string" } },
18
+ { "name": "disabled", "value": { "type": "string" } },
19
+ { "name": "strikethrough", "value": { "type": "string" } },
20
+ {
21
+ "name": "title",
22
+ "description": "Text to be displayed in a tooltip when hovering over the element.",
23
+ "value": { "type": "string" }
24
+ }
25
+ ],
26
+ "events": [],
27
+ "js": {
28
+ "properties": [
29
+ { "name": "color" },
30
+ { "name": "fontsize" },
31
+ { "name": "fontweight" },
32
+ { "name": "inverted" },
33
+ { "name": "strikethrough" },
34
+ { "name": "disabled" }
35
+ ],
36
+ "events": []
37
+ }
38
+ }
39
+ ]
40
+ },
41
+ "css": {
42
+ "properties": [],
43
+ "pseudo-elements": []
44
+ }
45
+ }
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-span",
3
- "version": "2.0.0-alpha.23",
3
+ "version": "2.0.0-alpha.230",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "clean": "rm -rf dist",
14
14
  "build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
15
15
  "test": "vitest run --coverage",
16
- "wc-manifest": "cem analyze --globs \"src/*\" --config ../custom-elements-manifest.config.js --outdir dist"
16
+ "wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"