@proximus/lavender-card 2.0.0-alpha.20 → 2.0.0-alpha.200
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/Card.d.ts +36 -36
- package/dist/custom-elements.json +376 -0
- package/dist/index.es.js +270 -319
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +27 -0
- package/dist/web-types.json +76 -0
- package/package.json +2 -2
package/dist/Card.d.ts
CHANGED
|
@@ -16,48 +16,48 @@ export declare class Card extends VerticallyExtendedElement<HTMLLinkElement> {
|
|
|
16
16
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
17
17
|
configureCard(): void;
|
|
18
18
|
get $children(): NodeListOf<Element>;
|
|
19
|
-
get $img(): Image;
|
|
20
|
-
get $pictureSourceMobile(): Image;
|
|
21
|
-
get $pictureSourceTablet(): Image;
|
|
22
|
-
get $pictureSourceLaptop(): Image;
|
|
19
|
+
get $img(): Image | null;
|
|
20
|
+
get $pictureSourceMobile(): Image | null;
|
|
21
|
+
get $pictureSourceTablet(): Image | null;
|
|
22
|
+
get $pictureSourceLaptop(): Image | null;
|
|
23
23
|
get $stackContainer(): Stack;
|
|
24
24
|
get $container(): Container;
|
|
25
25
|
get inverted(): boolean;
|
|
26
26
|
set inverted(value: boolean);
|
|
27
|
-
get backgroundColor(): string;
|
|
28
|
-
set backgroundColor(value: string);
|
|
29
|
-
get backgroundSize(): string;
|
|
30
|
-
set backgroundSize(value: string);
|
|
31
|
-
get backgroundPosition(): string;
|
|
32
|
-
set backgroundPosition(value: string);
|
|
33
|
-
get padding(): string;
|
|
34
|
-
set padding(value: string);
|
|
27
|
+
get backgroundColor(): string | null;
|
|
28
|
+
set backgroundColor(value: string | null);
|
|
29
|
+
get backgroundSize(): string | null;
|
|
30
|
+
set backgroundSize(value: string | null);
|
|
31
|
+
get backgroundPosition(): string | null;
|
|
32
|
+
set backgroundPosition(value: string | null);
|
|
33
|
+
get padding(): string | null;
|
|
34
|
+
set padding(value: string | null);
|
|
35
35
|
get gradientContrastHelper(): boolean;
|
|
36
36
|
set gradientContrastHelper(value: boolean);
|
|
37
37
|
get overlayContrastHelper(): boolean;
|
|
38
38
|
set overlayContrastHelper(value: boolean);
|
|
39
|
-
get mediaLeftSize(): string;
|
|
40
|
-
set mediaLeftSize(value: string);
|
|
41
|
-
get mediaLeftSizeMobile(): string;
|
|
42
|
-
set mediaLeftSizeMobile(value: string);
|
|
43
|
-
get mediaLeftSizeTablet(): string;
|
|
44
|
-
set mediaLeftSizeTablet(value: string);
|
|
45
|
-
get mediaLeftSizeLaptop(): string;
|
|
46
|
-
set mediaLeftSizeLaptop(value: string);
|
|
47
|
-
get mediaPosition(): string;
|
|
48
|
-
set mediaPosition(value: string);
|
|
49
|
-
get mediaPositionMobile(): string;
|
|
50
|
-
set mediaPositionMobile(value: string);
|
|
51
|
-
get mediaPositionTablet(): string;
|
|
52
|
-
set mediaPositionTablet(value: string);
|
|
53
|
-
get mediaPositionLaptop(): string;
|
|
54
|
-
set mediaPositionLaptop(value: string);
|
|
55
|
-
get mediaSrc(): string;
|
|
56
|
-
set mediaSrc(value: string);
|
|
57
|
-
get mediaSrcMobile(): string;
|
|
58
|
-
set mediaSrcMobile(value: string);
|
|
59
|
-
get mediaSrcTablet(): string;
|
|
60
|
-
set mediaSrcTablet(value: string);
|
|
61
|
-
get mediaSrcLaptop(): string;
|
|
62
|
-
set mediaSrcLaptop(value: string);
|
|
39
|
+
get mediaLeftSize(): string | null;
|
|
40
|
+
set mediaLeftSize(value: string | null);
|
|
41
|
+
get mediaLeftSizeMobile(): string | null;
|
|
42
|
+
set mediaLeftSizeMobile(value: string | null);
|
|
43
|
+
get mediaLeftSizeTablet(): string | null;
|
|
44
|
+
set mediaLeftSizeTablet(value: string | null);
|
|
45
|
+
get mediaLeftSizeLaptop(): string | null;
|
|
46
|
+
set mediaLeftSizeLaptop(value: string | null);
|
|
47
|
+
get mediaPosition(): string | null;
|
|
48
|
+
set mediaPosition(value: string | null);
|
|
49
|
+
get mediaPositionMobile(): string | null;
|
|
50
|
+
set mediaPositionMobile(value: string | null);
|
|
51
|
+
get mediaPositionTablet(): string | null;
|
|
52
|
+
set mediaPositionTablet(value: string | null);
|
|
53
|
+
get mediaPositionLaptop(): string | null;
|
|
54
|
+
set mediaPositionLaptop(value: string | null);
|
|
55
|
+
get mediaSrc(): string | null;
|
|
56
|
+
set mediaSrc(value: string | null);
|
|
57
|
+
get mediaSrcMobile(): string | null;
|
|
58
|
+
set mediaSrcMobile(value: string | null);
|
|
59
|
+
get mediaSrcTablet(): string | null;
|
|
60
|
+
set mediaSrcTablet(value: string | null);
|
|
61
|
+
get mediaSrcLaptop(): string | null;
|
|
62
|
+
set mediaSrcLaptop(value: string | null);
|
|
63
63
|
}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/Card.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "variable",
|
|
11
|
+
"name": "cardBackgroundColorValues",
|
|
12
|
+
"type": {
|
|
13
|
+
"text": "array"
|
|
14
|
+
},
|
|
15
|
+
"default": "[ '', 'container-default', 'container-light', ]"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "variable",
|
|
19
|
+
"name": "cardPaddingValues",
|
|
20
|
+
"type": {
|
|
21
|
+
"text": "array"
|
|
22
|
+
},
|
|
23
|
+
"default": "['', 's', 'm', 'l']"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"kind": "variable",
|
|
27
|
+
"name": "cardMediaLeftSizeValues",
|
|
28
|
+
"type": {
|
|
29
|
+
"text": "array"
|
|
30
|
+
},
|
|
31
|
+
"default": "['', 's', 'm']"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"kind": "variable",
|
|
35
|
+
"name": "cardMediaPositionValues",
|
|
36
|
+
"type": {
|
|
37
|
+
"text": "array"
|
|
38
|
+
},
|
|
39
|
+
"default": "['', 'top', 'left', 'background']"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"kind": "class",
|
|
43
|
+
"description": "",
|
|
44
|
+
"name": "Card",
|
|
45
|
+
"members": [
|
|
46
|
+
{
|
|
47
|
+
"kind": "field",
|
|
48
|
+
"name": "nativeName",
|
|
49
|
+
"type": {
|
|
50
|
+
"text": "string"
|
|
51
|
+
},
|
|
52
|
+
"static": true,
|
|
53
|
+
"default": "'a'"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "method",
|
|
57
|
+
"name": "template",
|
|
58
|
+
"privacy": "private"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"kind": "method",
|
|
62
|
+
"name": "configureCard"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "method",
|
|
66
|
+
"name": "#updateMediaPosition",
|
|
67
|
+
"privacy": "private",
|
|
68
|
+
"parameters": [
|
|
69
|
+
{
|
|
70
|
+
"name": "newValue",
|
|
71
|
+
"type": {
|
|
72
|
+
"text": "string"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "screenSize",
|
|
77
|
+
"optional": true,
|
|
78
|
+
"type": {
|
|
79
|
+
"text": "string"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"kind": "method",
|
|
86
|
+
"name": "#updateMedia",
|
|
87
|
+
"privacy": "private",
|
|
88
|
+
"parameters": [
|
|
89
|
+
{
|
|
90
|
+
"name": "newValue",
|
|
91
|
+
"type": {
|
|
92
|
+
"text": "string"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "screenSize",
|
|
97
|
+
"optional": true,
|
|
98
|
+
"type": {
|
|
99
|
+
"text": "string"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "method",
|
|
106
|
+
"name": "#updateBackgroundColor",
|
|
107
|
+
"privacy": "private",
|
|
108
|
+
"parameters": [
|
|
109
|
+
{
|
|
110
|
+
"name": "attrName",
|
|
111
|
+
"type": {
|
|
112
|
+
"text": "string"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "oldValue",
|
|
117
|
+
"type": {
|
|
118
|
+
"text": "string"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "newValue",
|
|
123
|
+
"type": {
|
|
124
|
+
"text": "string"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "attrValue",
|
|
129
|
+
"type": {
|
|
130
|
+
"text": "string[]"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"kind": "field",
|
|
137
|
+
"name": "$children",
|
|
138
|
+
"readonly": true
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"kind": "field",
|
|
142
|
+
"name": "$img",
|
|
143
|
+
"readonly": true
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"kind": "field",
|
|
147
|
+
"name": "$pictureSourceMobile",
|
|
148
|
+
"readonly": true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"kind": "field",
|
|
152
|
+
"name": "$pictureSourceTablet",
|
|
153
|
+
"readonly": true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"kind": "field",
|
|
157
|
+
"name": "$pictureSourceLaptop",
|
|
158
|
+
"readonly": true
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"kind": "field",
|
|
162
|
+
"name": "$stackContainer",
|
|
163
|
+
"readonly": true
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"kind": "field",
|
|
167
|
+
"name": "$container",
|
|
168
|
+
"readonly": true
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"kind": "field",
|
|
172
|
+
"name": "inverted"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"kind": "field",
|
|
176
|
+
"name": "backgroundColor"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "field",
|
|
180
|
+
"name": "backgroundSize"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"kind": "field",
|
|
184
|
+
"name": "backgroundPosition"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"kind": "field",
|
|
188
|
+
"name": "padding"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"kind": "field",
|
|
192
|
+
"name": "gradientContrastHelper"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"kind": "field",
|
|
196
|
+
"name": "overlayContrastHelper"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "field",
|
|
200
|
+
"name": "mediaLeftSize"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"kind": "field",
|
|
204
|
+
"name": "mediaLeftSizeMobile"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "field",
|
|
208
|
+
"name": "mediaLeftSizeTablet"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "field",
|
|
212
|
+
"name": "mediaLeftSizeLaptop"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"kind": "field",
|
|
216
|
+
"name": "mediaPosition"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"kind": "field",
|
|
220
|
+
"name": "mediaPositionMobile"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"kind": "field",
|
|
224
|
+
"name": "mediaPositionTablet"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "field",
|
|
228
|
+
"name": "mediaPositionLaptop"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"kind": "field",
|
|
232
|
+
"name": "mediaSrc"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"kind": "field",
|
|
236
|
+
"name": "mediaSrcMobile"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"kind": "field",
|
|
240
|
+
"name": "mediaSrcTablet"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"kind": "field",
|
|
244
|
+
"name": "mediaSrcLaptop"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"kind": "field",
|
|
248
|
+
"name": "innerHTML"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"attributes": [
|
|
252
|
+
{
|
|
253
|
+
"name": "inverted"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "background-color"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "background-size"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "background-position"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "contrast-helper-gradient"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "contrast-helper-overlay"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "media-position"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "media-position--mobile"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"name": "media-position--tablet"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "media-position--laptop"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "media-src"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "media-src--mobile"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "media-src--tablet"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "media-src--laptop"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"superclass": {
|
|
296
|
+
"name": "VerticallyExtendedElement",
|
|
297
|
+
"package": "@proximus/lavender-common"
|
|
298
|
+
},
|
|
299
|
+
"tagName": "px-card",
|
|
300
|
+
"customElement": true
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"exports": [
|
|
304
|
+
{
|
|
305
|
+
"kind": "js",
|
|
306
|
+
"name": "cardBackgroundColorValues",
|
|
307
|
+
"declaration": {
|
|
308
|
+
"name": "cardBackgroundColorValues",
|
|
309
|
+
"module": "src/Card.ts"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"kind": "js",
|
|
314
|
+
"name": "cardPaddingValues",
|
|
315
|
+
"declaration": {
|
|
316
|
+
"name": "cardPaddingValues",
|
|
317
|
+
"module": "src/Card.ts"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"kind": "js",
|
|
322
|
+
"name": "cardMediaLeftSizeValues",
|
|
323
|
+
"declaration": {
|
|
324
|
+
"name": "cardMediaLeftSizeValues",
|
|
325
|
+
"module": "src/Card.ts"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"kind": "js",
|
|
330
|
+
"name": "cardMediaPositionValues",
|
|
331
|
+
"declaration": {
|
|
332
|
+
"name": "cardMediaPositionValues",
|
|
333
|
+
"module": "src/Card.ts"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"kind": "js",
|
|
338
|
+
"name": "Card",
|
|
339
|
+
"declaration": {
|
|
340
|
+
"name": "Card",
|
|
341
|
+
"module": "src/Card.ts"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "custom-element-definition",
|
|
346
|
+
"name": "px-card",
|
|
347
|
+
"declaration": {
|
|
348
|
+
"name": "Card",
|
|
349
|
+
"module": "src/Card.ts"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"kind": "javascript-module",
|
|
356
|
+
"path": "src/card.css",
|
|
357
|
+
"declarations": [],
|
|
358
|
+
"exports": []
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"kind": "javascript-module",
|
|
362
|
+
"path": "src/index.ts",
|
|
363
|
+
"declarations": [],
|
|
364
|
+
"exports": [
|
|
365
|
+
{
|
|
366
|
+
"kind": "js",
|
|
367
|
+
"name": "*",
|
|
368
|
+
"declaration": {
|
|
369
|
+
"name": "*",
|
|
370
|
+
"module": "src/Card"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,320 +1,271 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
var
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
get mediaSrcLaptop() {
|
|
270
|
-
return this.getAttribute("media-src--laptop");
|
|
271
|
-
}
|
|
272
|
-
set mediaSrcLaptop(t) {
|
|
273
|
-
super._updateAttribute("media-src--laptop", t);
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
i = new WeakSet(), l = function(t, o) {
|
|
277
|
-
const e = o ? `direction--${o}` : "direction";
|
|
278
|
-
t === "left" ? (this.$stackContainer.setAttribute(e, "row"), o === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "row") : this.$stackContainer.removeAttribute("direction--desktop")) : (t === "top" || t === "null") && (this.$stackContainer.setAttribute(e, "column"), o === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "column") : this.$stackContainer.removeAttribute("direction--desktop"));
|
|
279
|
-
}, p = function(t, o) {
|
|
280
|
-
var e, a, c, d, u, h, g, f;
|
|
281
|
-
switch (o) {
|
|
282
|
-
case "mobile":
|
|
283
|
-
(this.mediaPosition === "background" || this.mediaPositionMobile === "background") && this.$container.setAttribute("background-image--mobile", t), t ? (e = this.$pictureSourceMobile) == null || e.setAttribute("srcset", t) : (a = this.$pictureSourceMobile) == null || a.removeAttribute("srcset");
|
|
284
|
-
break;
|
|
285
|
-
case "tablet":
|
|
286
|
-
(this.mediaPosition === "background" || this.mediaPositionTablet === "background") && this.$container.setAttribute("background-image--tablet", t), t ? (c = this.$pictureSourceTablet) == null || c.setAttribute("srcset", t) : (d = this.$pictureSourceTablet) == null || d.removeAttribute("srcset");
|
|
287
|
-
break;
|
|
288
|
-
case "laptop":
|
|
289
|
-
(this.mediaPosition === "background" || this.mediaPositionLaptop === "background") && this.$container.setAttribute("background-image--laptop", t), t ? (u = this.$pictureSourceLaptop) == null || u.setAttribute("srcset", t) : (h = this.$pictureSourceLaptop) == null || h.removeAttribute("srcset");
|
|
290
|
-
break;
|
|
291
|
-
default:
|
|
292
|
-
this.mediaPosition === "background" && this.$container.setAttribute("background-image", t), t ? (g = this.$img) == null || g.setAttribute("src", t) : (f = this.$img) == null || f.removeAttribute("src");
|
|
293
|
-
}
|
|
294
|
-
}, z = function(t, o, e, a) {
|
|
295
|
-
if (!S(a, e)) {
|
|
296
|
-
P(
|
|
297
|
-
`${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
298
|
-
);
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
const c = (d) => {
|
|
302
|
-
d !== null && d !== "" && d !== "default" && (this.$el.style.setProperty(
|
|
303
|
-
"--card-background-color-default",
|
|
304
|
-
`var(--px-color-background-${d}-default)`
|
|
305
|
-
), this.$el.style.setProperty(
|
|
306
|
-
"--card-background-color-inverted",
|
|
307
|
-
`var(--px-color-background-${d}-inverted)`
|
|
308
|
-
));
|
|
309
|
-
};
|
|
310
|
-
c(o), c(e);
|
|
311
|
-
}, m.nativeName = "a";
|
|
312
|
-
let b = m;
|
|
313
|
-
customElements.get("px-card") || customElements.define("px-card", b);
|
|
314
|
-
export {
|
|
315
|
-
b as Card,
|
|
316
|
-
C as cardBackgroundColorValues,
|
|
317
|
-
q as cardMediaLeftSizeValues,
|
|
318
|
-
R as cardMediaPositionValues,
|
|
319
|
-
w as cardPaddingValues
|
|
1
|
+
import { VerticallyExtendedElement as e, checkName as t, cssTokenBreakpoints as n, log as r } from "@proximus/lavender-common";
|
|
2
|
+
//#region src/card.css?inline
|
|
3
|
+
var i = ":host{--card-background-color-default:var(--px-color-background-container-light-default);--card-media-left-size-s:120px;--card-media-left-size-m:250px;--card-media-left-size:var(--card-media-left-size-s);display:block}:host *{box-sizing:border-box}:host picture{display:none}:host([media-position=background]) picture{display:none!important}:host(:not([media-position=background])) picture:has(img[src]){display:block}.card{height:100%;color:var(--px-color-text-neutral-default);--btn-transition:all .2s ease-in-out 0s;transition:var(--btn-transition);border-radius:var(--px-radius-main);outline-color:var(--px-color-border-focus-outline-default);outline-width:var(--px-focus-outline-mobile);border:var(--px-size-border-m) solid transparent;text-decoration:none;display:block;position:relative;overflow:hidden}.card .contrast-helper{z-index:1;pointer-events:none;display:none;position:absolute;inset:0}:host([contrast-helper-gradient]) :is(.card .contrast-helper){background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%);display:block}:host([contrast-helper-overlay]) :is(.card .contrast-helper){background-color:#ffffffb3;display:block}.card .card__content{z-index:2;flex-grow:1;position:relative}.card .card__content>px-vstack{height:100%}.card px-container{background-color:var(--card-background-color-default)}.card:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline-style:solid}.card:hover{border-color:var(--px-color-border-state-hover-default)}.card:hover px-container{background-color:var(--px-color-background-state-hover-bordered-default)}px-container{height:100%}::slotted([slot=title]){font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);font-size:var(--px-text-size-heading-xl-mobile);font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default)}::slotted([slot=content]){font-family:var(--px-font-family);line-height:var(--px-line-height-ratio-l);font-size:var(--px-text-size-body-m-mobile);font-weight:var(--px-font-weight-body);color:var(--px-color-text-neutral-default)}:host([media-left-size=s]) img{--card-media-left-size:var(--card-media-left-size-s)}:host([media-left-size=m]) img{--card-media-left-size:var(--card-media-left-size-m)}@media screen and (width<=48rem){.hidden--mobile,.shown--tablet,.shown--laptop{display:none}.hidden--tablet,.hidden--laptop,.shown--mobile{display:block}:host([media-left-size--mobile=m]) img{--card-media-left-size:var(--card-media-left-size-m)}:host([media-left-size--mobile=s]) img{--card-media-left-size:var(--card-media-left-size-s)}:host([media-position--mobile=background]) picture{display:none!important}:host(:not([media-position--mobile=background],[media-position=background])) picture:has(source:first-child[srcset]){display:block}:is(:host([media-position=top]),:host([media-position--mobile=top])) img{width:100%;height:100%;aspect-ratio:initial;object-fit:initial;display:block}:is(:host([media-position=left]:not([media-position--mobile=top])),:host([media-position--mobile=left])) img{aspect-ratio:1;height:100%;width:var(--card-media-left-size);object-fit:cover}:is(.media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile),.media-position-background--mobile) px-container{background-color:#0000}:is(.media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile),.media-position-background--mobile):hover px-container{background-color:#0000}}@media screen and (width>=48rem) and (width<=64rem){.hidden--tablet,.shown--mobile,.shown--laptop{display:none}.hidden--mobile,.hidden--laptop,.shown--tablet{display:block}:host([media-left-size--tablet=m]) img{--card-media-left-size:var(--card-media-left-size-m)}:host([media-left-size--tablet=s]) img{--card-media-left-size:var(--card-media-left-size-s)}:host([media-position--tablet=background]) picture{display:none!important}:host(:not([media-position--mobile=background],[media-position=background])) picture:has(source:nth-child(2)[srcset]){display:block}:is(:host([media-position=left]:not([media-position--tablet=top])),:host([media-position--tablet=left])) img{aspect-ratio:1;height:100%;width:var(--card-media-left-size);object-fit:cover}:is(:host([media-position=top]),:host([media-position--tablet=top])) img{width:100%;height:100%;aspect-ratio:initial;object-fit:initial;display:block}:is(.media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet),.media-position-background--tablet) px-container{background-color:#0000}:is(.media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet),.media-position-background--tablet):hover px-container{background-color:#0000}}@media screen and (width>=48rem){.card{outline-width:var(--px-focus-outline-tablet)}.card:focus-visible{outline-offset:var(--px-focus-offset-tablet)}::slotted([slot=title]){font-size:var(--px-text-size-heading-xl-tablet)}::slotted([slot=content]){font-size:var(--px-text-size-body-m-tablet)}}@media screen and (width>=64.0625rem){.hidden--laptop,.shown--mobile,.shown--tablet{display:none}.hidden--mobile,.hidden--tablet,.shown--laptop{display:block}:host([media-left-size--laptop=m]) img{--card-media-left-size:var(--card-media-left-size-m)}:host([media-left-size--laptop=s]) img{--card-media-left-size:var(--card-media-left-size-s)}:host([media-position--laptop=background]) picture{display:none!important}:host(:not([media-position--mobile=background],[media-position=background])) picture:has(source:nth-child(3)[srcset]){display:block}:is(:host([media-position=left]:not([media-position--laptop=top])),:host([media-position--laptop=left])) img{aspect-ratio:1;height:100%;width:var(--card-media-left-size);object-fit:cover}:is(:host([media-position=top]),:host([media-position--laptop=top])) img{width:100%;height:100%;aspect-ratio:initial;object-fit:initial;display:block}.card{outline-width:var(--px-focus-outline-laptop)}.card:focus-visible{outline-offset:var(--px-focus-offset-laptop)}::slotted([slot=title]){font-size:var(--px-text-size-heading-xl-laptop)}::slotted([slot=content]){font-size:var(--px-text-size-body-m-laptop)}img[src=null]{display:none}:is(.media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop),.media-position-background--laptop) px-container{background-color:#0000}:is(.media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop),.media-position-background--laptop):hover px-container{background-color:#0000}}:host([inverted]){--card-background-color-inverted:var(--px-color-background-container-light-inverted)}:host([inverted]) .card{color:var(--px-color-text-neutral-inverted);outline-color:var(--px-color-border-focus-outline-inverted)}:host([contrast-helper-gradient]) :is(:host([inverted]) .card .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}:host([contrast-helper-overlay]) :is(:host([inverted]) .card .contrast-helper){background-color:#0006}:host([inverted]) .card px-container{background-color:var(--card-background-color-inverted)}:host([inverted]) .card:hover{border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .card:hover px-container{background-color:var(--px-color-background-state-hover-bordered-inverted)}:host([inverted]) ::slotted([slot=title]){color:var(--px-color-text-brand-inverted)}:host([inverted]) ::slotted([slot=content]){color:var(--px-color-text-neutral-inverted)}@media screen and (width<=47.938rem){:is(:host([inverted]) .media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile),:host([inverted]) .media-position-background--mobile) px-container{background-color:#0000}:is(:host([inverted]) .media-position-background:not(.media-position-top--mobile,.media-position-left--mobile,.media-position-none--mobile),:host([inverted]) .media-position-background--mobile):hover px-container{background-color:#0000}}@media screen and (width>=48rem) and (width<=64rem){:is(:host([inverted]) .media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet),:host([inverted]) .media-position-background--tablet) px-container{background-color:#0000}:is(:host([inverted]) .media-position-background:not(.media-position-top--tablet,.media-position-left--tablet,.media-position-none--tablet),:host([inverted]) .media-position-background--tablet):hover px-container{background-color:#0000}}@media screen and (width>=64.0625rem){:is(:host([inverted]) .media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop),:host([inverted]) .media-position-background--laptop) px-container{background-color:#0000}:is(:host([inverted]) .media-position-background:not(.media-position-top--laptop,.media-position-left--laptop,.media-position-none--laptop),:host([inverted]) .media-position-background--laptop):hover px-container{background-color:#0000}}", a = new CSSStyleSheet();
|
|
4
|
+
a.replaceSync(i);
|
|
5
|
+
var o = [
|
|
6
|
+
"",
|
|
7
|
+
"container-default",
|
|
8
|
+
"container-light"
|
|
9
|
+
], s = [
|
|
10
|
+
"",
|
|
11
|
+
"s",
|
|
12
|
+
"m",
|
|
13
|
+
"l"
|
|
14
|
+
], c = [
|
|
15
|
+
"",
|
|
16
|
+
"s",
|
|
17
|
+
"m"
|
|
18
|
+
], l = [
|
|
19
|
+
"",
|
|
20
|
+
"top",
|
|
21
|
+
"left",
|
|
22
|
+
"background"
|
|
23
|
+
], u = (e, t, n) => `:host([${e}${n ? `--${n}` : ""}='${t}']) .card__content`, d = "px-padding", f = class extends e {
|
|
24
|
+
static {
|
|
25
|
+
this.nativeName = "a";
|
|
26
|
+
}
|
|
27
|
+
template() {
|
|
28
|
+
return "\n <a class=\"card\">\n <div class=\"contrast-helper\"></div>\n <px-container padding=\"none\" background-color=\"none\" border-radius=\"none\">\n <px-stack direction=\"column\" id=\"stack-container\" gap=\"none\">\n <picture>\n <source media=\"(max-width: 48rem)\" >\n <source media=\"(max-width: 64rem)\" >\n <source media=\"(min-width: 64rem)\" >\n <img loading=\"lazy\" alt=\"\" />\n </picture>\n <div class=\"card__content\">\n <px-vstack gap=\"default\">\n <px-vstack gap=\"s\" grow=\"1\">\n <slot name=\"title\"></slot>\n <slot name=\"content\"></slot>\n </px-vstack>\n <slot></slot>\n </px-vstack>\n </div>\n </px-stack>\n </px-container>\n </a>\n ";
|
|
29
|
+
}
|
|
30
|
+
constructor() {
|
|
31
|
+
super(a, n("padding", u, s, d, "--card__content-padding")), this.shadowRoot.innerHTML = this.template();
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
super.connectedCallback(), this.configureCard();
|
|
35
|
+
}
|
|
36
|
+
static get observedAttributes() {
|
|
37
|
+
return [
|
|
38
|
+
...super.observedAttributes,
|
|
39
|
+
"inverted",
|
|
40
|
+
"background-color",
|
|
41
|
+
"background-size",
|
|
42
|
+
"background-position",
|
|
43
|
+
"contrast-helper-gradient",
|
|
44
|
+
"contrast-helper-overlay",
|
|
45
|
+
"media-position",
|
|
46
|
+
"media-position--mobile",
|
|
47
|
+
"media-position--tablet",
|
|
48
|
+
"media-position--laptop",
|
|
49
|
+
"media-src",
|
|
50
|
+
"media-src--mobile",
|
|
51
|
+
"media-src--tablet",
|
|
52
|
+
"media-src--laptop"
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
attributeChangedCallback(e, t, n) {
|
|
56
|
+
if (t !== n) switch (e) {
|
|
57
|
+
case "inverted":
|
|
58
|
+
if (n === null || n === "") {
|
|
59
|
+
this.$container.setAttribute("inverted", "");
|
|
60
|
+
for (let e = 0; e < this.$children.length; e++) this.$children[e].setAttribute("inverted", "");
|
|
61
|
+
} else {
|
|
62
|
+
this.$container.removeAttribute("inverted");
|
|
63
|
+
for (let e = 0; e < this.$children.length; e++) this.$children[e].removeAttribute("inverted");
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case "background-color":
|
|
67
|
+
this.#n(e, t, n, o);
|
|
68
|
+
break;
|
|
69
|
+
case "background-size":
|
|
70
|
+
this.$container.setAttribute("background-size", n);
|
|
71
|
+
break;
|
|
72
|
+
case "background-position":
|
|
73
|
+
this.$container.setAttribute("background-position", n);
|
|
74
|
+
break;
|
|
75
|
+
case "media-position":
|
|
76
|
+
this.#e(n);
|
|
77
|
+
break;
|
|
78
|
+
case "media-position--mobile":
|
|
79
|
+
this.#e(n, "mobile");
|
|
80
|
+
break;
|
|
81
|
+
case "media-position--tablet":
|
|
82
|
+
this.#e(n, "tablet");
|
|
83
|
+
break;
|
|
84
|
+
case "media-position--laptop":
|
|
85
|
+
this.#e(n, "laptop");
|
|
86
|
+
break;
|
|
87
|
+
case "media-src":
|
|
88
|
+
this.#t(n);
|
|
89
|
+
break;
|
|
90
|
+
case "media-src--mobile":
|
|
91
|
+
this.#t(n, "mobile");
|
|
92
|
+
break;
|
|
93
|
+
case "media-src--tablet":
|
|
94
|
+
this.#t(n, "tablet");
|
|
95
|
+
break;
|
|
96
|
+
case "media-src--laptop":
|
|
97
|
+
this.#t(n, "laptop");
|
|
98
|
+
break;
|
|
99
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
configureCard() {
|
|
103
|
+
this.padding ||= "m", this.mediaPosition ||= "top", this.mediaPosition === "background" && (this.backgroundPosition ||= "center", this.backgroundSize ||= "cover");
|
|
104
|
+
}
|
|
105
|
+
#e(e, t) {
|
|
106
|
+
let n = t ? `direction--${t}` : "direction";
|
|
107
|
+
e === "left" ? (this.$stackContainer.setAttribute(n, "row"), t === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "row") : this.$stackContainer.removeAttribute("direction--desktop")) : (e === "top" || e === "null") && (this.$stackContainer.setAttribute(n, "column"), t === "laptop" ? this.$stackContainer.setAttribute("direction--desktop", "column") : this.$stackContainer.removeAttribute("direction--desktop"));
|
|
108
|
+
}
|
|
109
|
+
#t(e, t) {
|
|
110
|
+
switch (t) {
|
|
111
|
+
case "mobile":
|
|
112
|
+
(this.mediaPosition === "background" || this.mediaPositionMobile === "background") && this.$container.setAttribute("background-image--mobile", e), e ? this.$pictureSourceMobile?.setAttribute("srcset", e) : this.$pictureSourceMobile?.removeAttribute("srcset");
|
|
113
|
+
break;
|
|
114
|
+
case "tablet":
|
|
115
|
+
(this.mediaPosition === "background" || this.mediaPositionTablet === "background") && this.$container.setAttribute("background-image--tablet", e), e ? this.$pictureSourceTablet?.setAttribute("srcset", e) : this.$pictureSourceTablet?.removeAttribute("srcset");
|
|
116
|
+
break;
|
|
117
|
+
case "laptop":
|
|
118
|
+
(this.mediaPosition === "background" || this.mediaPositionLaptop === "background") && this.$container.setAttribute("background-image--laptop", e), e ? this.$pictureSourceLaptop?.setAttribute("srcset", e) : this.$pictureSourceLaptop?.removeAttribute("srcset");
|
|
119
|
+
break;
|
|
120
|
+
default: this.mediaPosition === "background" && this.$container.setAttribute("background-image", e), e ? this.$img?.setAttribute("src", e) : this.$img?.removeAttribute("src");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
#n(e, n, i, a) {
|
|
124
|
+
if (!t(a, i)) {
|
|
125
|
+
r(`"${i}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${a.join("\", \"")}".`);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let o = (e) => {
|
|
129
|
+
e !== null && e !== "" && e !== "default" && (this.$el.style.setProperty("--card-background-color-default", `var(--px-color-background-${e}-default)`), this.$el.style.setProperty("--card-background-color-inverted", `var(--px-color-background-${e}-inverted)`));
|
|
130
|
+
};
|
|
131
|
+
o(n), o(i);
|
|
132
|
+
}
|
|
133
|
+
get $children() {
|
|
134
|
+
return this.querySelectorAll("px-card > *");
|
|
135
|
+
}
|
|
136
|
+
get $img() {
|
|
137
|
+
return this.shadowRoot.querySelector("picture > img");
|
|
138
|
+
}
|
|
139
|
+
get $pictureSourceMobile() {
|
|
140
|
+
return this.shadowRoot.querySelector("picture > source:nth-child(1)");
|
|
141
|
+
}
|
|
142
|
+
get $pictureSourceTablet() {
|
|
143
|
+
return this.shadowRoot.querySelector("picture > source:nth-child(2)");
|
|
144
|
+
}
|
|
145
|
+
get $pictureSourceLaptop() {
|
|
146
|
+
return this.shadowRoot.querySelector("picture > source:nth-child(3)");
|
|
147
|
+
}
|
|
148
|
+
get $stackContainer() {
|
|
149
|
+
return this.shadowRoot.querySelector("#stack-container");
|
|
150
|
+
}
|
|
151
|
+
get $container() {
|
|
152
|
+
return this.shadowRoot.querySelector("px-container");
|
|
153
|
+
}
|
|
154
|
+
get inverted() {
|
|
155
|
+
return this.hasAttribute("inverted");
|
|
156
|
+
}
|
|
157
|
+
set inverted(e) {
|
|
158
|
+
this._updateBooleanAttribute("inverted", e);
|
|
159
|
+
}
|
|
160
|
+
get backgroundColor() {
|
|
161
|
+
return this.getAttribute("background-color");
|
|
162
|
+
}
|
|
163
|
+
set backgroundColor(e) {
|
|
164
|
+
this._updateAttribute("background-color", e);
|
|
165
|
+
}
|
|
166
|
+
get backgroundSize() {
|
|
167
|
+
return this.getAttribute("background-size");
|
|
168
|
+
}
|
|
169
|
+
set backgroundSize(e) {
|
|
170
|
+
this._updateAttribute("background-size", e);
|
|
171
|
+
}
|
|
172
|
+
get backgroundPosition() {
|
|
173
|
+
return this.getAttribute("background-position");
|
|
174
|
+
}
|
|
175
|
+
set backgroundPosition(e) {
|
|
176
|
+
this._updateAttribute("background-position", e);
|
|
177
|
+
}
|
|
178
|
+
get padding() {
|
|
179
|
+
return this.getAttribute("padding");
|
|
180
|
+
}
|
|
181
|
+
set padding(e) {
|
|
182
|
+
this._updateAttribute("padding", e);
|
|
183
|
+
}
|
|
184
|
+
get gradientContrastHelper() {
|
|
185
|
+
return this.hasAttribute("contrast-helper-gradient");
|
|
186
|
+
}
|
|
187
|
+
set gradientContrastHelper(e) {
|
|
188
|
+
this._updateBooleanAttribute("contrast-helper-gradient", e);
|
|
189
|
+
}
|
|
190
|
+
get overlayContrastHelper() {
|
|
191
|
+
return this.hasAttribute("contrast-helper-overlay");
|
|
192
|
+
}
|
|
193
|
+
set overlayContrastHelper(e) {
|
|
194
|
+
this._updateBooleanAttribute("contrast-helper-overlay", e);
|
|
195
|
+
}
|
|
196
|
+
get mediaLeftSize() {
|
|
197
|
+
return this.getAttribute("media-left-size");
|
|
198
|
+
}
|
|
199
|
+
set mediaLeftSize(e) {
|
|
200
|
+
this._updateAttribute("media-left-size", e);
|
|
201
|
+
}
|
|
202
|
+
get mediaLeftSizeMobile() {
|
|
203
|
+
return this.getAttribute("media-left-size--mobile");
|
|
204
|
+
}
|
|
205
|
+
set mediaLeftSizeMobile(e) {
|
|
206
|
+
this._updateAttribute("media-left-size--mobile", e);
|
|
207
|
+
}
|
|
208
|
+
get mediaLeftSizeTablet() {
|
|
209
|
+
return this.getAttribute("media-left-size--tablet");
|
|
210
|
+
}
|
|
211
|
+
set mediaLeftSizeTablet(e) {
|
|
212
|
+
this._updateAttribute("media-left-size--tablet", e);
|
|
213
|
+
}
|
|
214
|
+
get mediaLeftSizeLaptop() {
|
|
215
|
+
return this.getAttribute("media-left-size--laptop");
|
|
216
|
+
}
|
|
217
|
+
set mediaLeftSizeLaptop(e) {
|
|
218
|
+
this._updateAttribute("media-left-size--laptop", e);
|
|
219
|
+
}
|
|
220
|
+
get mediaPosition() {
|
|
221
|
+
return this.getAttribute("media-position");
|
|
222
|
+
}
|
|
223
|
+
set mediaPosition(e) {
|
|
224
|
+
this._updateAttribute("media-position", e);
|
|
225
|
+
}
|
|
226
|
+
get mediaPositionMobile() {
|
|
227
|
+
return this.getAttribute("media-position--mobile");
|
|
228
|
+
}
|
|
229
|
+
set mediaPositionMobile(e) {
|
|
230
|
+
this._updateAttribute("media-position--mobile", e);
|
|
231
|
+
}
|
|
232
|
+
get mediaPositionTablet() {
|
|
233
|
+
return this.getAttribute("media-position--tablet");
|
|
234
|
+
}
|
|
235
|
+
set mediaPositionTablet(e) {
|
|
236
|
+
this._updateAttribute("media-position--tablet", e);
|
|
237
|
+
}
|
|
238
|
+
get mediaPositionLaptop() {
|
|
239
|
+
return this.getAttribute("media-position--laptop");
|
|
240
|
+
}
|
|
241
|
+
set mediaPositionLaptop(e) {
|
|
242
|
+
this._updateAttribute("media-position--laptop", e);
|
|
243
|
+
}
|
|
244
|
+
get mediaSrc() {
|
|
245
|
+
return this.getAttribute("media-src");
|
|
246
|
+
}
|
|
247
|
+
set mediaSrc(e) {
|
|
248
|
+
this._updateAttribute("media-src", e);
|
|
249
|
+
}
|
|
250
|
+
get mediaSrcMobile() {
|
|
251
|
+
return this.getAttribute("media-src--mobile");
|
|
252
|
+
}
|
|
253
|
+
set mediaSrcMobile(e) {
|
|
254
|
+
this._updateAttribute("media-src--mobile", e);
|
|
255
|
+
}
|
|
256
|
+
get mediaSrcTablet() {
|
|
257
|
+
return this.getAttribute("media-src--tablet");
|
|
258
|
+
}
|
|
259
|
+
set mediaSrcTablet(e) {
|
|
260
|
+
this._updateAttribute("media-src--tablet", e);
|
|
261
|
+
}
|
|
262
|
+
get mediaSrcLaptop() {
|
|
263
|
+
return this.getAttribute("media-src--laptop");
|
|
264
|
+
}
|
|
265
|
+
set mediaSrcLaptop(e) {
|
|
266
|
+
this._updateAttribute("media-src--laptop", e);
|
|
267
|
+
}
|
|
320
268
|
};
|
|
269
|
+
customElements.get("px-card") || customElements.define("px-card", f);
|
|
270
|
+
//#endregion
|
|
271
|
+
export { f as Card, o as cardBackgroundColorValues, c as cardMediaLeftSizeValues, l as cardMediaPositionValues, s as cardPaddingValues };
|
|
@@ -0,0 +1,27 @@
|
|
|
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-card",
|
|
7
|
+
"description": "\n---\n",
|
|
8
|
+
"attributes": [
|
|
9
|
+
{ "name": "inverted", "values": [] },
|
|
10
|
+
{ "name": "background-color", "values": [] },
|
|
11
|
+
{ "name": "background-size", "values": [] },
|
|
12
|
+
{ "name": "background-position", "values": [] },
|
|
13
|
+
{ "name": "contrast-helper-gradient", "values": [] },
|
|
14
|
+
{ "name": "contrast-helper-overlay", "values": [] },
|
|
15
|
+
{ "name": "media-position", "values": [] },
|
|
16
|
+
{ "name": "media-position--mobile", "values": [] },
|
|
17
|
+
{ "name": "media-position--tablet", "values": [] },
|
|
18
|
+
{ "name": "media-position--laptop", "values": [] },
|
|
19
|
+
{ "name": "media-src", "values": [] },
|
|
20
|
+
{ "name": "media-src--mobile", "values": [] },
|
|
21
|
+
{ "name": "media-src--tablet", "values": [] },
|
|
22
|
+
{ "name": "media-src--laptop", "values": [] }
|
|
23
|
+
],
|
|
24
|
+
"references": []
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@proximus/lavender-card",
|
|
4
|
+
"version": "2.0.0-alpha.200",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "px-card",
|
|
11
|
+
"description": "\n---\n",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [
|
|
14
|
+
{ "name": "inverted", "value": { "type": "string" } },
|
|
15
|
+
{ "name": "background-color", "value": { "type": "string" } },
|
|
16
|
+
{ "name": "background-size", "value": { "type": "string" } },
|
|
17
|
+
{ "name": "background-position", "value": { "type": "string" } },
|
|
18
|
+
{
|
|
19
|
+
"name": "contrast-helper-gradient",
|
|
20
|
+
"value": { "type": "string" }
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "contrast-helper-overlay",
|
|
24
|
+
"value": { "type": "string" }
|
|
25
|
+
},
|
|
26
|
+
{ "name": "media-position", "value": { "type": "string" } },
|
|
27
|
+
{ "name": "media-position--mobile", "value": { "type": "string" } },
|
|
28
|
+
{ "name": "media-position--tablet", "value": { "type": "string" } },
|
|
29
|
+
{ "name": "media-position--laptop", "value": { "type": "string" } },
|
|
30
|
+
{ "name": "media-src", "value": { "type": "string" } },
|
|
31
|
+
{ "name": "media-src--mobile", "value": { "type": "string" } },
|
|
32
|
+
{ "name": "media-src--tablet", "value": { "type": "string" } },
|
|
33
|
+
{ "name": "media-src--laptop", "value": { "type": "string" } }
|
|
34
|
+
],
|
|
35
|
+
"events": [],
|
|
36
|
+
"js": {
|
|
37
|
+
"properties": [
|
|
38
|
+
{ "name": "$children" },
|
|
39
|
+
{ "name": "$img" },
|
|
40
|
+
{ "name": "$pictureSourceMobile" },
|
|
41
|
+
{ "name": "$pictureSourceTablet" },
|
|
42
|
+
{ "name": "$pictureSourceLaptop" },
|
|
43
|
+
{ "name": "$stackContainer" },
|
|
44
|
+
{ "name": "$container" },
|
|
45
|
+
{ "name": "inverted" },
|
|
46
|
+
{ "name": "backgroundColor" },
|
|
47
|
+
{ "name": "backgroundSize" },
|
|
48
|
+
{ "name": "backgroundPosition" },
|
|
49
|
+
{ "name": "padding" },
|
|
50
|
+
{ "name": "gradientContrastHelper" },
|
|
51
|
+
{ "name": "overlayContrastHelper" },
|
|
52
|
+
{ "name": "mediaLeftSize" },
|
|
53
|
+
{ "name": "mediaLeftSizeMobile" },
|
|
54
|
+
{ "name": "mediaLeftSizeTablet" },
|
|
55
|
+
{ "name": "mediaLeftSizeLaptop" },
|
|
56
|
+
{ "name": "mediaPosition" },
|
|
57
|
+
{ "name": "mediaPositionMobile" },
|
|
58
|
+
{ "name": "mediaPositionTablet" },
|
|
59
|
+
{ "name": "mediaPositionLaptop" },
|
|
60
|
+
{ "name": "mediaSrc" },
|
|
61
|
+
{ "name": "mediaSrcMobile" },
|
|
62
|
+
{ "name": "mediaSrcTablet" },
|
|
63
|
+
{ "name": "mediaSrcLaptop" },
|
|
64
|
+
{ "name": "innerHTML" }
|
|
65
|
+
],
|
|
66
|
+
"events": []
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"css": {
|
|
72
|
+
"properties": [],
|
|
73
|
+
"pseudo-elements": []
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-card",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.200",
|
|
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"
|