@proximus/lavender-separator 2.0.0-alpha.21 → 2.0.0-alpha.211
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/Separator.d.ts +16 -16
- package/dist/custom-elements.json +277 -0
- package/dist/index.es.js +149 -172
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +21 -0
- package/dist/web-types.json +45 -0
- package/package.json +2 -2
package/dist/Separator.d.ts
CHANGED
|
@@ -11,20 +11,20 @@ export declare class Separator extends PxElement<HTMLHRElement> {
|
|
|
11
11
|
updateSize(attrName: string, oldValue: string, newValue: string, attrValue: string[]): void;
|
|
12
12
|
updateColor(attrName: string, oldValue: string, newValue: string, attrValue: string[]): void;
|
|
13
13
|
updateDirection(attrName: string, oldValue: string, newValue: string, attrValue: string[]): void;
|
|
14
|
-
get direction(): string;
|
|
15
|
-
set direction(value: string);
|
|
16
|
-
get directionMobile(): string;
|
|
17
|
-
set directionMobile(value: string);
|
|
18
|
-
get directionTablet(): string;
|
|
19
|
-
set directionTablet(value: string);
|
|
20
|
-
get directionLaptop(): string;
|
|
21
|
-
set directionLaptop(value: string);
|
|
22
|
-
get directionDesktop(): string;
|
|
23
|
-
set directionDesktop(value: string);
|
|
24
|
-
get size(): string;
|
|
25
|
-
set size(value: string);
|
|
26
|
-
get color(): string;
|
|
27
|
-
set color(value: string);
|
|
28
|
-
get inverted():
|
|
29
|
-
set inverted(value:
|
|
14
|
+
get direction(): string | null;
|
|
15
|
+
set direction(value: string | null);
|
|
16
|
+
get directionMobile(): string | null;
|
|
17
|
+
set directionMobile(value: string | null);
|
|
18
|
+
get directionTablet(): string | null;
|
|
19
|
+
set directionTablet(value: string | null);
|
|
20
|
+
get directionLaptop(): string | null;
|
|
21
|
+
set directionLaptop(value: string | null);
|
|
22
|
+
get directionDesktop(): string | null;
|
|
23
|
+
set directionDesktop(value: string | null);
|
|
24
|
+
get size(): string | null;
|
|
25
|
+
set size(value: string | null);
|
|
26
|
+
get color(): string | null;
|
|
27
|
+
set color(value: string | null);
|
|
28
|
+
get inverted(): boolean;
|
|
29
|
+
set inverted(value: boolean);
|
|
30
30
|
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/Separator.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "separatorDirectionValues",
|
|
12
|
+
"type": {
|
|
13
|
+
"text": "array"
|
|
14
|
+
},
|
|
15
|
+
"default": "[ '', 'default', 'horizontal', 'vertical', ]"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "variable",
|
|
19
|
+
"name": "separatorSizeValues",
|
|
20
|
+
"type": {
|
|
21
|
+
"text": "array"
|
|
22
|
+
},
|
|
23
|
+
"default": "['', 'default', 'none', 's', 'm', 'l']"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"kind": "variable",
|
|
27
|
+
"name": "separatorColorValues",
|
|
28
|
+
"type": {
|
|
29
|
+
"text": "array"
|
|
30
|
+
},
|
|
31
|
+
"default": "[ '', 'main', 'brand', 'none', 'neutral', 'purpose-success', 'purpose-warning', 'purpose-error', 'purpose-unlimited', 'state-hover', 'state-active', ]"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"kind": "class",
|
|
35
|
+
"description": "",
|
|
36
|
+
"name": "Separator",
|
|
37
|
+
"members": [
|
|
38
|
+
{
|
|
39
|
+
"kind": "field",
|
|
40
|
+
"name": "nativeName",
|
|
41
|
+
"type": {
|
|
42
|
+
"text": "string"
|
|
43
|
+
},
|
|
44
|
+
"static": true,
|
|
45
|
+
"default": "'hr'"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"kind": "field",
|
|
49
|
+
"name": "internals",
|
|
50
|
+
"type": {
|
|
51
|
+
"text": "ElementInternals"
|
|
52
|
+
},
|
|
53
|
+
"privacy": "protected"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "method",
|
|
57
|
+
"name": "updateSize",
|
|
58
|
+
"parameters": [
|
|
59
|
+
{
|
|
60
|
+
"name": "attrName",
|
|
61
|
+
"type": {
|
|
62
|
+
"text": "string"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "oldValue",
|
|
67
|
+
"type": {
|
|
68
|
+
"text": "string"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "newValue",
|
|
73
|
+
"type": {
|
|
74
|
+
"text": "string"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "attrValue",
|
|
79
|
+
"type": {
|
|
80
|
+
"text": "string[]"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"kind": "method",
|
|
87
|
+
"name": "updateColor",
|
|
88
|
+
"parameters": [
|
|
89
|
+
{
|
|
90
|
+
"name": "attrName",
|
|
91
|
+
"type": {
|
|
92
|
+
"text": "string"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "oldValue",
|
|
97
|
+
"type": {
|
|
98
|
+
"text": "string"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "newValue",
|
|
103
|
+
"type": {
|
|
104
|
+
"text": "string"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "attrValue",
|
|
109
|
+
"type": {
|
|
110
|
+
"text": "string[]"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"kind": "method",
|
|
117
|
+
"name": "updateDirection",
|
|
118
|
+
"parameters": [
|
|
119
|
+
{
|
|
120
|
+
"name": "attrName",
|
|
121
|
+
"type": {
|
|
122
|
+
"text": "string"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "oldValue",
|
|
127
|
+
"type": {
|
|
128
|
+
"text": "string"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "newValue",
|
|
133
|
+
"type": {
|
|
134
|
+
"text": "string"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "attrValue",
|
|
139
|
+
"type": {
|
|
140
|
+
"text": "string[]"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"kind": "field",
|
|
147
|
+
"name": "direction"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"kind": "field",
|
|
151
|
+
"name": "directionMobile"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"kind": "field",
|
|
155
|
+
"name": "directionTablet"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"kind": "field",
|
|
159
|
+
"name": "directionLaptop"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"kind": "field",
|
|
163
|
+
"name": "directionDesktop"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"kind": "field",
|
|
167
|
+
"name": "size"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"kind": "field",
|
|
171
|
+
"name": "color"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"kind": "field",
|
|
175
|
+
"name": "inverted"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"attributes": [
|
|
179
|
+
{
|
|
180
|
+
"name": "direction"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "direction--mobile"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "direction--tablet"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "direction--laptop"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "direction--desktop"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "size"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "color"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "inverted"
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"superclass": {
|
|
205
|
+
"name": "PxElement",
|
|
206
|
+
"package": "@proximus/lavender-common"
|
|
207
|
+
},
|
|
208
|
+
"tagName": "px-separator",
|
|
209
|
+
"customElement": true
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"exports": [
|
|
213
|
+
{
|
|
214
|
+
"kind": "js",
|
|
215
|
+
"name": "separatorDirectionValues",
|
|
216
|
+
"declaration": {
|
|
217
|
+
"name": "separatorDirectionValues",
|
|
218
|
+
"module": "src/Separator.ts"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"kind": "js",
|
|
223
|
+
"name": "separatorSizeValues",
|
|
224
|
+
"declaration": {
|
|
225
|
+
"name": "separatorSizeValues",
|
|
226
|
+
"module": "src/Separator.ts"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"kind": "js",
|
|
231
|
+
"name": "separatorColorValues",
|
|
232
|
+
"declaration": {
|
|
233
|
+
"name": "separatorColorValues",
|
|
234
|
+
"module": "src/Separator.ts"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "js",
|
|
239
|
+
"name": "Separator",
|
|
240
|
+
"declaration": {
|
|
241
|
+
"name": "Separator",
|
|
242
|
+
"module": "src/Separator.ts"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"kind": "custom-element-definition",
|
|
247
|
+
"name": "px-separator",
|
|
248
|
+
"declaration": {
|
|
249
|
+
"name": "Separator",
|
|
250
|
+
"module": "src/Separator.ts"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"kind": "javascript-module",
|
|
257
|
+
"path": "src/index.ts",
|
|
258
|
+
"declarations": [],
|
|
259
|
+
"exports": [
|
|
260
|
+
{
|
|
261
|
+
"kind": "js",
|
|
262
|
+
"name": "*",
|
|
263
|
+
"declaration": {
|
|
264
|
+
"name": "*",
|
|
265
|
+
"module": "src/Separator"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"kind": "javascript-module",
|
|
272
|
+
"path": "src/separator.css",
|
|
273
|
+
"declarations": [],
|
|
274
|
+
"exports": []
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,173 +1,150 @@
|
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return this.getAttribute("size");
|
|
148
|
-
}
|
|
149
|
-
set size(t) {
|
|
150
|
-
this.setAttribute("size", t);
|
|
151
|
-
}
|
|
152
|
-
get color() {
|
|
153
|
-
return this.getAttribute("color");
|
|
154
|
-
}
|
|
155
|
-
set color(t) {
|
|
156
|
-
this.setAttribute("color", t);
|
|
157
|
-
}
|
|
158
|
-
get inverted() {
|
|
159
|
-
return this.getAttribute("inverted");
|
|
160
|
-
}
|
|
161
|
-
set inverted(t) {
|
|
162
|
-
this.setAttribute("inverted", t);
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
n.nativeName = "hr";
|
|
166
|
-
let l = n;
|
|
167
|
-
customElements.get("px-separator") || customElements.define("px-separator", l);
|
|
168
|
-
export {
|
|
169
|
-
l as Separator,
|
|
170
|
-
v as separatorColorValues,
|
|
171
|
-
u as separatorDirectionValues,
|
|
172
|
-
g as separatorSizeValues
|
|
1
|
+
import { PxElement as e, log as t } from "@proximus/lavender-common";
|
|
2
|
+
//#region src/separator.css?inline
|
|
3
|
+
var n = ".separator{--separator-size:var(--px-size-border-m);--separator-direction--mobile-border-width:var(--separator-size) 0 0;--separator-direction--mobile-width:initial;--separator-direction--mobile-height:initial;clear:both;border-style:solid;border-color:var(--separator-color-default,var(--px-color-border-main-default));border-width:var(--separator-size) 0 0;width:initial;height:initial;margin:0}.separator-direction-horizontal--mobile{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--mobile{width:var(--separator-size);border-width:0 var(--separator-size) 0 0;height:100%}:host([inverted]) .separator{border-color:var(--separator-color-inverted,var(--px-color-border-main-inverted))}@media screen and (width>=48rem){.separator-direction-horizontal--tablet{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--tablet{width:var(--separator-size);border-width:0 var(--separator-size) 0 0;height:100%}}@media screen and (width>=64.0625rem){.separator-direction-horizontal--laptop{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--laptop{width:var(--separator-size);border-width:0 var(--separator-size) 0 0;height:100%}}@media screen and (width>=90.0625rem){.separator-direction-horizontal--desktop{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--desktop{width:var(--separator-size);border-width:0 var(--separator-size) 0 0;height:100%}}", r = new CSSStyleSheet();
|
|
4
|
+
r.replaceSync(n);
|
|
5
|
+
var i = [
|
|
6
|
+
"",
|
|
7
|
+
"default",
|
|
8
|
+
"horizontal",
|
|
9
|
+
"vertical"
|
|
10
|
+
], a = [
|
|
11
|
+
"",
|
|
12
|
+
"default",
|
|
13
|
+
"none",
|
|
14
|
+
"s",
|
|
15
|
+
"m",
|
|
16
|
+
"l"
|
|
17
|
+
], o = [
|
|
18
|
+
"",
|
|
19
|
+
"main",
|
|
20
|
+
"brand",
|
|
21
|
+
"none",
|
|
22
|
+
"neutral",
|
|
23
|
+
"purpose-success",
|
|
24
|
+
"purpose-warning",
|
|
25
|
+
"purpose-error",
|
|
26
|
+
"purpose-unlimited",
|
|
27
|
+
"state-hover",
|
|
28
|
+
"state-active"
|
|
29
|
+
], s = class n extends e {
|
|
30
|
+
static {
|
|
31
|
+
this.nativeName = "hr";
|
|
32
|
+
}
|
|
33
|
+
constructor() {
|
|
34
|
+
super(r);
|
|
35
|
+
let e = document.createElement(n.nativeName);
|
|
36
|
+
e.classList.add("separator"), this.internals = this.attachInternals?.(), this.shadowRoot.appendChild(e);
|
|
37
|
+
}
|
|
38
|
+
static get observedAttributes() {
|
|
39
|
+
return [
|
|
40
|
+
...super.observedAttributes,
|
|
41
|
+
"direction",
|
|
42
|
+
"direction--mobile",
|
|
43
|
+
"direction--tablet",
|
|
44
|
+
"direction--laptop",
|
|
45
|
+
"direction--desktop",
|
|
46
|
+
"size",
|
|
47
|
+
"color",
|
|
48
|
+
"inverted"
|
|
49
|
+
];
|
|
50
|
+
}
|
|
51
|
+
attributeChangedCallback(e, t, n) {
|
|
52
|
+
if (t !== n) switch (e) {
|
|
53
|
+
case "direction":
|
|
54
|
+
case "direction--mobile":
|
|
55
|
+
case "direction--tablet":
|
|
56
|
+
case "direction--laptop":
|
|
57
|
+
case "direction--desktop":
|
|
58
|
+
this.updateDirection(e, t, n, i);
|
|
59
|
+
break;
|
|
60
|
+
case "size":
|
|
61
|
+
this.updateSize(e, t, n, a);
|
|
62
|
+
break;
|
|
63
|
+
case "color":
|
|
64
|
+
this.updateColor(e, t, n, o);
|
|
65
|
+
break;
|
|
66
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
updateSize(e, n, r, i) {
|
|
70
|
+
let a = (e) => {
|
|
71
|
+
e !== null && e !== "" && e !== "default" && this.$el.style.setProperty("--separator-size", `var(--px-size-border-${e})`);
|
|
72
|
+
};
|
|
73
|
+
this.checkName(i, r) ? (a(n), a(r)) : t(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
|
|
74
|
+
}
|
|
75
|
+
updateColor(e, n, r, i) {
|
|
76
|
+
let a = (e) => {
|
|
77
|
+
e !== null && e !== "" && e !== "default" && (this.$el.style.setProperty("--separator-color-default", `var(--px-color-border-${e}-default)`), this.$el.style.setProperty("--separator-color-inverted", `var(--px-color-border-${e}-inverted)`));
|
|
78
|
+
};
|
|
79
|
+
this.checkName(i, r) ? (a(n), a(r)) : t(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
|
|
80
|
+
}
|
|
81
|
+
updateDirection(e, n, r, i) {
|
|
82
|
+
let a = (e, t) => {
|
|
83
|
+
t !== null && t !== "" && t !== "default" && this.$el.classList.add(`separator-direction-${t}--${e}`);
|
|
84
|
+
};
|
|
85
|
+
if (!this.checkName(i, r)) t(`"${r}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join("\", \"")}".`);
|
|
86
|
+
else if (e === "direction") [
|
|
87
|
+
"mobile",
|
|
88
|
+
"tablet",
|
|
89
|
+
"laptop",
|
|
90
|
+
"desktop"
|
|
91
|
+
].forEach((e) => {
|
|
92
|
+
Array.from(this.$el.classList).find((t) => t.startsWith("separator-direction-") && t.endsWith(`--${e}`)) || a(e, r);
|
|
93
|
+
});
|
|
94
|
+
else {
|
|
95
|
+
let t = e.split("--")[1], n = Array.from(this.$el.classList).find((e) => e.startsWith("separator-direction-") && e.endsWith(`--${t}`));
|
|
96
|
+
n ? this.$el.classList.replace(n, `separator-direction-${r}--${t}`) : a(t, r);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
get direction() {
|
|
100
|
+
return this.getAttribute("direction");
|
|
101
|
+
}
|
|
102
|
+
set direction(e) {
|
|
103
|
+
this._updateAttribute("direction", e);
|
|
104
|
+
}
|
|
105
|
+
get directionMobile() {
|
|
106
|
+
return this.getAttribute("direction--mobile");
|
|
107
|
+
}
|
|
108
|
+
set directionMobile(e) {
|
|
109
|
+
this._updateAttribute("direction--mobile", e);
|
|
110
|
+
}
|
|
111
|
+
get directionTablet() {
|
|
112
|
+
return this.getAttribute("direction--tablet");
|
|
113
|
+
}
|
|
114
|
+
set directionTablet(e) {
|
|
115
|
+
this._updateAttribute("direction--tablet", e);
|
|
116
|
+
}
|
|
117
|
+
get directionLaptop() {
|
|
118
|
+
return this.getAttribute("direction--laptop");
|
|
119
|
+
}
|
|
120
|
+
set directionLaptop(e) {
|
|
121
|
+
this._updateAttribute("direction--laptop", e);
|
|
122
|
+
}
|
|
123
|
+
get directionDesktop() {
|
|
124
|
+
return this.getAttribute("direction--desktop");
|
|
125
|
+
}
|
|
126
|
+
set directionDesktop(e) {
|
|
127
|
+
this._updateAttribute("direction--desktop", e);
|
|
128
|
+
}
|
|
129
|
+
get size() {
|
|
130
|
+
return this.getAttribute("size");
|
|
131
|
+
}
|
|
132
|
+
set size(e) {
|
|
133
|
+
this._updateAttribute("size", e);
|
|
134
|
+
}
|
|
135
|
+
get color() {
|
|
136
|
+
return this.getAttribute("color");
|
|
137
|
+
}
|
|
138
|
+
set color(e) {
|
|
139
|
+
this._updateAttribute("color", e);
|
|
140
|
+
}
|
|
141
|
+
get inverted() {
|
|
142
|
+
return this.hasAttribute("inverted");
|
|
143
|
+
}
|
|
144
|
+
set inverted(e) {
|
|
145
|
+
this._updateBooleanAttribute("inverted", e);
|
|
146
|
+
}
|
|
173
147
|
};
|
|
148
|
+
customElements.get("px-separator") || customElements.define("px-separator", s);
|
|
149
|
+
//#endregion
|
|
150
|
+
export { s as Separator, o as separatorColorValues, i as separatorDirectionValues, a as separatorSizeValues };
|
|
@@ -0,0 +1,21 @@
|
|
|
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-separator",
|
|
7
|
+
"description": "\n---\n",
|
|
8
|
+
"attributes": [
|
|
9
|
+
{ "name": "direction", "values": [] },
|
|
10
|
+
{ "name": "direction--mobile", "values": [] },
|
|
11
|
+
{ "name": "direction--tablet", "values": [] },
|
|
12
|
+
{ "name": "direction--laptop", "values": [] },
|
|
13
|
+
{ "name": "direction--desktop", "values": [] },
|
|
14
|
+
{ "name": "size", "values": [] },
|
|
15
|
+
{ "name": "color", "values": [] },
|
|
16
|
+
{ "name": "inverted", "values": [] }
|
|
17
|
+
],
|
|
18
|
+
"references": []
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@proximus/lavender-separator",
|
|
4
|
+
"version": "2.0.0-alpha.211",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "px-separator",
|
|
11
|
+
"description": "\n\n---\n",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [
|
|
14
|
+
{ "name": "direction", "value": { "type": "string" } },
|
|
15
|
+
{ "name": "direction--mobile", "value": { "type": "string" } },
|
|
16
|
+
{ "name": "direction--tablet", "value": { "type": "string" } },
|
|
17
|
+
{ "name": "direction--laptop", "value": { "type": "string" } },
|
|
18
|
+
{ "name": "direction--desktop", "value": { "type": "string" } },
|
|
19
|
+
{ "name": "size", "value": { "type": "string" } },
|
|
20
|
+
{ "name": "color", "value": { "type": "string" } },
|
|
21
|
+
{ "name": "inverted", "value": { "type": "string" } }
|
|
22
|
+
],
|
|
23
|
+
"events": [],
|
|
24
|
+
"js": {
|
|
25
|
+
"properties": [
|
|
26
|
+
{ "name": "direction" },
|
|
27
|
+
{ "name": "directionMobile" },
|
|
28
|
+
{ "name": "directionTablet" },
|
|
29
|
+
{ "name": "directionLaptop" },
|
|
30
|
+
{ "name": "directionDesktop" },
|
|
31
|
+
{ "name": "size" },
|
|
32
|
+
{ "name": "color" },
|
|
33
|
+
{ "name": "inverted" }
|
|
34
|
+
],
|
|
35
|
+
"events": []
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"css": {
|
|
41
|
+
"properties": [],
|
|
42
|
+
"pseudo-elements": []
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-separator",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.211",
|
|
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
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|