@proximus/lavender-banner 2.0.0-alpha.2 → 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/Banner.d.ts +26 -21
- package/dist/custom-elements.json +238 -0
- package/dist/index.es.js +534 -250
- package/dist/vscode.css-custom-data.json +6 -0
- package/dist/vscode.html-custom-data.json +29 -0
- package/dist/web-types.json +81 -0
- package/package.json +2 -2
package/dist/Banner.d.ts
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
|
-
import { Container } from '@proximus/lavender-container';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import type { Container } from '@proximus/lavender-container';
|
|
2
|
+
import '@proximus/lavender-container';
|
|
3
|
+
import type { Grid } from '@proximus/lavender-grid';
|
|
4
|
+
import '@proximus/lavender-grid';
|
|
5
|
+
import { VerticallyExtendedElement } from '@proximus/lavender-common';
|
|
6
|
+
export declare class Banner extends VerticallyExtendedElement<HTMLDivElement> {
|
|
7
|
+
#private;
|
|
5
8
|
static nativeName: string;
|
|
9
|
+
observer: MutationObserver;
|
|
6
10
|
private template;
|
|
7
11
|
constructor();
|
|
8
12
|
static get observedAttributes(): string[];
|
|
9
13
|
connectedCallback(): void;
|
|
10
14
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
15
|
+
disconnectedCallback(): void;
|
|
11
16
|
createGridTemplateAreas(): void;
|
|
12
|
-
createGridding(): void;
|
|
17
|
+
createGridding(value?: string): void;
|
|
13
18
|
get $grid(): Grid;
|
|
14
19
|
get $container(): Container;
|
|
15
20
|
get $children(): NodeListOf<Element>;
|
|
16
|
-
get backgroundColor(): string;
|
|
17
|
-
set backgroundColor(value: string);
|
|
18
|
-
get gradient(): string;
|
|
19
|
-
set gradient(value: string);
|
|
20
|
-
get backgroundImage(): string;
|
|
21
|
-
set backgroundImage(value: string);
|
|
22
|
-
get backgroundImageMobile(): string;
|
|
23
|
-
set backgroundImageMobile(value: string);
|
|
24
|
-
get backgroundImageTablet(): string;
|
|
25
|
-
set backgroundImageTablet(value: string);
|
|
26
|
-
get backgroundImageLaptop(): string;
|
|
27
|
-
set backgroundImageLaptop(value: string);
|
|
28
|
-
get backgroundSize(): string;
|
|
29
|
-
set backgroundSize(value: string);
|
|
30
|
-
get backgroundPosition(): string;
|
|
31
|
-
set backgroundPosition(value: string);
|
|
21
|
+
get backgroundColor(): string | null;
|
|
22
|
+
set backgroundColor(value: string | null);
|
|
23
|
+
get gradient(): string | null;
|
|
24
|
+
set gradient(value: string | null);
|
|
25
|
+
get backgroundImage(): string | null;
|
|
26
|
+
set backgroundImage(value: string | null);
|
|
27
|
+
get backgroundImageMobile(): string | null;
|
|
28
|
+
set backgroundImageMobile(value: string | null);
|
|
29
|
+
get backgroundImageTablet(): string | null;
|
|
30
|
+
set backgroundImageTablet(value: string | null);
|
|
31
|
+
get backgroundImageLaptop(): string | null;
|
|
32
|
+
set backgroundImageLaptop(value: string | null);
|
|
33
|
+
get backgroundSize(): string | null;
|
|
34
|
+
set backgroundSize(value: string | null);
|
|
35
|
+
get backgroundPosition(): string | null;
|
|
36
|
+
set backgroundPosition(value: string | null);
|
|
32
37
|
get gradientContrastHelper(): boolean;
|
|
33
38
|
set gradientContrastHelper(value: boolean);
|
|
34
39
|
get overlayContrastHelper(): boolean;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/Banner.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "",
|
|
12
|
+
"name": "Banner",
|
|
13
|
+
"members": [
|
|
14
|
+
{
|
|
15
|
+
"kind": "field",
|
|
16
|
+
"name": "nativeName",
|
|
17
|
+
"type": {
|
|
18
|
+
"text": "string"
|
|
19
|
+
},
|
|
20
|
+
"static": true,
|
|
21
|
+
"default": "'div'"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"kind": "field",
|
|
25
|
+
"name": "observer",
|
|
26
|
+
"default": "new MutationObserver(() => { this.createGridTemplateAreas(); this.createGridding(); })"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "field",
|
|
30
|
+
"name": "template",
|
|
31
|
+
"privacy": "private"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"kind": "method",
|
|
35
|
+
"name": "#applyReducedPadding",
|
|
36
|
+
"privacy": "private"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"kind": "method",
|
|
40
|
+
"name": "createGridTemplateAreas"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "method",
|
|
44
|
+
"name": "createGridding",
|
|
45
|
+
"parameters": [
|
|
46
|
+
{
|
|
47
|
+
"name": "value",
|
|
48
|
+
"optional": true,
|
|
49
|
+
"type": {
|
|
50
|
+
"text": "string"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "field",
|
|
57
|
+
"name": "$grid",
|
|
58
|
+
"readonly": true
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"kind": "field",
|
|
62
|
+
"name": "$container",
|
|
63
|
+
"readonly": true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "field",
|
|
67
|
+
"name": "$children",
|
|
68
|
+
"readonly": true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"kind": "field",
|
|
72
|
+
"name": "backgroundColor"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"kind": "field",
|
|
76
|
+
"name": "gradient"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"kind": "field",
|
|
80
|
+
"name": "backgroundImage"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "field",
|
|
84
|
+
"name": "backgroundImageMobile"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "field",
|
|
88
|
+
"name": "backgroundImageTablet"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"kind": "field",
|
|
92
|
+
"name": "backgroundImageLaptop"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"kind": "field",
|
|
96
|
+
"name": "backgroundSize"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "field",
|
|
100
|
+
"name": "backgroundPosition"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"kind": "field",
|
|
104
|
+
"name": "gradientContrastHelper"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"kind": "field",
|
|
108
|
+
"name": "overlayContrastHelper"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"kind": "field",
|
|
112
|
+
"name": "inverted"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "field",
|
|
116
|
+
"name": "reduced"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"kind": "field",
|
|
120
|
+
"name": "hasGridding"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"kind": "field",
|
|
124
|
+
"name": "hasGriddingMobile"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "field",
|
|
128
|
+
"name": "hasGriddingTablet"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "field",
|
|
132
|
+
"name": "hasGriddingLaptop"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "field",
|
|
136
|
+
"name": "innerHTML"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"attributes": [
|
|
140
|
+
{
|
|
141
|
+
"name": "background-color"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "background-gradient"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "background-image"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "background-image--mobile"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "background-image--tablet"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "background-image--laptop"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "background-size"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "background-position"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "contrast-helper-gradient"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"name": "contrast-helper-overlay"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "has-gridding"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "has-gridding--mobile"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "has-gridding--tablet"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "has-gridding--laptop"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "reduced"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "inverted"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"superclass": {
|
|
190
|
+
"name": "VerticallyExtendedElement",
|
|
191
|
+
"package": "@proximus/lavender-common"
|
|
192
|
+
},
|
|
193
|
+
"tagName": "px-banner",
|
|
194
|
+
"customElement": true
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"exports": [
|
|
198
|
+
{
|
|
199
|
+
"kind": "js",
|
|
200
|
+
"name": "Banner",
|
|
201
|
+
"declaration": {
|
|
202
|
+
"name": "Banner",
|
|
203
|
+
"module": "src/Banner.ts"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "custom-element-definition",
|
|
208
|
+
"name": "px-banner",
|
|
209
|
+
"declaration": {
|
|
210
|
+
"name": "Banner",
|
|
211
|
+
"module": "src/Banner.ts"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"kind": "javascript-module",
|
|
218
|
+
"path": "src/banner.css",
|
|
219
|
+
"declarations": [],
|
|
220
|
+
"exports": []
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"kind": "javascript-module",
|
|
224
|
+
"path": "src/index.ts",
|
|
225
|
+
"declarations": [],
|
|
226
|
+
"exports": [
|
|
227
|
+
{
|
|
228
|
+
"kind": "js",
|
|
229
|
+
"name": "*",
|
|
230
|
+
"declaration": {
|
|
231
|
+
"name": "*",
|
|
232
|
+
"module": "src/Banner"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
package/dist/index.es.js
CHANGED
|
@@ -1,252 +1,536 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
-
|
|
1
|
+
import "@proximus/lavender-container";
|
|
2
|
+
import { PxElement as e, VerticallyExtendedElement as t, backgroundColorValues as n, backgroundSizeValues as r, cssTokenBreakpoints as i, gapValues as a, gradientValues as o, log as s } from "@proximus/lavender-common";
|
|
3
|
+
//#region src/banner.css?inline
|
|
4
|
+
var c = ":host{position:relative}:host,:host>*{box-sizing:border-box;display:block}.banner{height:100%;min-height:8rem;position:relative}.banner[reduced]{min-height:5rem}px-container{height:100%}.banner-content{row-gap:var(--px-spacing-s-mobile);z-index:2;grid-template-rows:minmax(0,auto);grid-template-columns:1fr;display:grid;position:relative}[reduced] .banner-content{column-gap:var(--px-spacing-default-mobile);grid-template-columns:min-content minmax(0,1fr)}::slotted([slot=tag]){grid-area:tag}::slotted([slot=media]){grid-area:media;align-self:start}::slotted([slot=title]){grid-area:title}::slotted([slot=description]){grid-area:description}::slotted([slot=content]){grid-area:content}::slotted([slot=action]){z-index:2;grid-area:action}:host(:not([reduced])) ::slotted([slot=action]){margin-top:calc(var(--px-spacing-default-mobile) - var(--px-spacing-s-mobile))}.contrast-helper{z-index:1;pointer-events:none;border-radius:var(--px-radius-main);display:none;position:absolute;inset:0}[contrast-helper-gradient] .contrast-helper{background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%);display:block}[inverted] :is([contrast-helper-gradient] .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}[contrast-helper-overlay] .contrast-helper{background-color:#ffffffb3;display:block}[inverted] :is([contrast-helper-overlay] .contrast-helper){background-color:#0006}@media screen and (width>=48rem){.banner-content{row-gap:var(--px-spacing-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot=action]){margin-top:calc(var(--px-spacing-default-desktop) - var(--px-spacing-s-desktop))}}@media screen and (width>=64.0625rem){.banner-content{row-gap:var(--px-spacing-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot=action]){margin-top:calc(var(--px-spacing-default-desktop) - var(--px-spacing-s-desktop))}}", l = ":host{--grid-cols:initial;--grid-cols--mobile:initial;--grid-cols--tablet:initial;--grid-cols--laptop:initial;--grid-cols--desktop:initial;--justify-content:initial;--justify-items:initial;--align-content:initial;--align-items:initial;display:block}.grid{grid-template-columns:repeat(var(--grid-cols), minmax(0, 1fr));justify-content:var(--justify-content);justify-items:var(--justify-items);align-content:var(--align-content);align-items:var(--align-items);display:grid}.justify-content-normal{justify-content:normal}.justify-content-start{justify-content:start}.justify-content-end{justify-content:end}.justify-content-center{justify-content:center}.justify-content-space-between{justify-content:space-between}.justify-content-space-around{justify-content:space-around}.justify-content-space-evenly{justify-content:space-evenly}.justify-content-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.align-content-normal{align-content:normal}.align-content-start{align-content:start}.align-content-end{align-content:end}.align-content-center{align-content:center}.align-content-space-between{align-content:space-between}.align-content-space-around{align-content:space-around}.align-content-space-evenly{align-content:space-evenly}.align-content-stretch{align-content:stretch}.align-items-start{align-items:start}.align-items-end{align-items:end}.align-items-center{align-items:center}.align-items-stretch{align-items:stretch}@media screen and (width<=47.938rem){.grid{grid-template-columns:repeat(var(--grid-cols--mobile,var(--grid-cols)), minmax(0, 1fr))}.justify-content-normal-mobile{justify-content:normal}.justify-content-start-mobile{justify-content:start}.justify-content-end-mobile{justify-content:end}.justify-content-center-mobile{justify-content:center}.justify-content-space-between-mobile{justify-content:space-between}.justify-content-space-around-mobile{justify-content:space-around}.justify-content-space-evenly-mobile{justify-content:space-evenly}.justify-content-stretch-mobile{justify-content:stretch}.justify-items-start-mobile{justify-items:start}.justify-items-end-mobile{justify-items:end}.justify-items-center-mobile{justify-items:center}.justify-items-stretch-mobile{justify-items:stretch}.align-content-normal-mobile{align-content:normal}.align-content-start-mobile{align-content:start}.align-content-end-mobile{align-content:end}.align-content-center-mobile{align-content:center}.align-content-space-between-mobile{align-content:space-between}.align-content-space-around-mobile{align-content:space-around}.align-content-space-evenly-mobile{align-content:space-evenly}.align-content-stretch-mobile{align-content:stretch}.align-items-start-mobile{align-items:start}.align-items-end-mobile{align-items:end}.align-items-center-mobile{align-items:center}.align-items-stretch-mobile{align-items:stretch}}@media screen and (width>=48rem) and (width<=64rem){.grid{grid-template-columns:repeat(var(--grid-cols--tablet,var(--grid-cols)), minmax(0, 1fr))}.justify-content-normal-tablet{justify-content:normal}.justify-content-start-tablet{justify-content:start}.justify-content-end-tablet{justify-content:end}.justify-content-center-tablet{justify-content:center}.justify-content-space-between-tablet{justify-content:space-between}.justify-content-space-around-tablet{justify-content:space-around}.justify-content-space-evenly-tablet{justify-content:space-evenly}.justify-content-stretch-tablet{justify-content:stretch}.justify-items-start-tablet{justify-items:start}.justify-items-end-tablet{justify-items:end}.justify-items-center-tablet{justify-items:center}.justify-items-stretch-tablet{justify-items:stretch}.align-content-normal-tablet{align-content:normal}.align-content-start-tablet{align-content:start}.align-content-end-tablet{align-content:end}.align-content-center-tablet{align-content:center}.align-content-space-between-tablet{align-content:space-between}.align-content-space-around-tablet{align-content:space-around}.align-content-space-evenly-tablet{align-content:space-evenly}.align-content-stretch-tablet{align-content:stretch}.align-items-start-tablet{align-items:start}.align-items-end-tablet{align-items:end}.align-items-center-tablet{align-items:center}.align-items-stretch-tablet{align-items:stretch}}@media screen and (width>=64.0625rem){.grid{grid-template-columns:repeat(var(--grid-cols--laptop,var(--grid-cols)), minmax(0, 1fr))}.justify-content-normal-laptop{justify-content:normal}.justify-content-start-laptop{justify-content:start}.justify-content-end-laptop{justify-content:end}.justify-content-center-laptop{justify-content:center}.justify-content-space-between-laptop{justify-content:space-between}.justify-content-space-around-laptop{justify-content:space-around}.justify-content-space-evenly-laptop{justify-content:space-evenly}.justify-content-stretch-laptop{justify-content:stretch}.justify-items-start-laptop{justify-items:start}.justify-items-end-laptop{justify-items:end}.justify-items-center-laptop{justify-items:center}.justify-items-stretch-laptop{justify-items:stretch}.align-content-normal-laptop{align-content:normal}.align-content-start-laptop{align-content:start}.align-content-end-laptop{align-content:end}.align-content-center-laptop{align-content:center}.align-content-space-between-laptop{align-content:space-between}.align-content-space-around-laptop{align-content:space-around}.align-content-space-evenly-laptop{align-content:space-evenly}.align-content-stretch-laptop{align-content:stretch}.align-items-start-laptop{align-items:start}.align-items-end-laptop{align-items:end}.align-items-center-laptop{align-items:center}.align-items-stretch-laptop{align-items:stretch}}", u = new CSSStyleSheet();
|
|
5
|
+
u.replaceSync(l);
|
|
6
|
+
var d = [
|
|
7
|
+
"1",
|
|
8
|
+
"2",
|
|
9
|
+
"3",
|
|
10
|
+
"4",
|
|
11
|
+
"5",
|
|
12
|
+
"6",
|
|
13
|
+
"7",
|
|
14
|
+
"8",
|
|
15
|
+
"9",
|
|
16
|
+
"10",
|
|
17
|
+
"11",
|
|
18
|
+
"12"
|
|
19
|
+
], f = [
|
|
20
|
+
"",
|
|
21
|
+
"start",
|
|
22
|
+
"end",
|
|
23
|
+
"center",
|
|
24
|
+
"space-between",
|
|
25
|
+
"space-around",
|
|
26
|
+
"space-evenly",
|
|
27
|
+
"stretch"
|
|
28
|
+
], p = [
|
|
29
|
+
"",
|
|
30
|
+
"start",
|
|
31
|
+
"end",
|
|
32
|
+
"center",
|
|
33
|
+
"stretch"
|
|
34
|
+
], m = i("gap", (e, t, n) => `:host([${e}${n ? `--${n}` : ""}='${t}']) .grid`, a, "px-spacing", "--grid-gap"), h = class extends e {
|
|
35
|
+
static {
|
|
36
|
+
this.nativeName = "div";
|
|
37
|
+
}
|
|
38
|
+
constructor() {
|
|
39
|
+
super(u, m), this.template = () => "<div class=\"grid\">\n <slot></slot>\n </div>", this.shadowRoot.innerHTML = this.template();
|
|
40
|
+
}
|
|
41
|
+
static get observedAttributes() {
|
|
42
|
+
return [
|
|
43
|
+
...super.observedAttributes,
|
|
44
|
+
"grid-cols",
|
|
45
|
+
"grid-cols--mobile",
|
|
46
|
+
"grid-cols--tablet",
|
|
47
|
+
"grid-cols--laptop",
|
|
48
|
+
"justify-content",
|
|
49
|
+
"justify-items",
|
|
50
|
+
"align-content",
|
|
51
|
+
"align-items",
|
|
52
|
+
"justify-content--mobile",
|
|
53
|
+
"justify-items--mobile",
|
|
54
|
+
"align-content--mobile",
|
|
55
|
+
"align-items--mobile",
|
|
56
|
+
"justify-content--tablet",
|
|
57
|
+
"justify-items--tablet",
|
|
58
|
+
"align-content--tablet",
|
|
59
|
+
"align-items--tablet",
|
|
60
|
+
"justify-content--laptop",
|
|
61
|
+
"justify-items--laptop",
|
|
62
|
+
"align-content--laptop",
|
|
63
|
+
"align-items--laptop",
|
|
64
|
+
"justify-content--desktop",
|
|
65
|
+
"justify-items--desktop",
|
|
66
|
+
"align-content--desktop",
|
|
67
|
+
"align-items--desktop"
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
connectedCallback() {
|
|
71
|
+
this.gap ||= "default", this.alignItems ||= "stretch";
|
|
72
|
+
}
|
|
73
|
+
attributeChangedCallback(e, t, n) {
|
|
74
|
+
if (t !== n) switch (e) {
|
|
75
|
+
case "grid-cols":
|
|
76
|
+
case "grid-cols--mobile":
|
|
77
|
+
case "grid-cols--tablet":
|
|
78
|
+
case "grid-cols--laptop":
|
|
79
|
+
this.updateAttribute(e, t, n, d);
|
|
80
|
+
break;
|
|
81
|
+
case "justify-content":
|
|
82
|
+
case "align-content":
|
|
83
|
+
case "justify-content--mobile":
|
|
84
|
+
case "align-content--mobile":
|
|
85
|
+
case "justify-content--tablet":
|
|
86
|
+
case "align-content--tablet":
|
|
87
|
+
case "justify-content--laptop":
|
|
88
|
+
case "align-content--laptop":
|
|
89
|
+
case "justify-content--desktop":
|
|
90
|
+
case "align-content--desktop":
|
|
91
|
+
this.updateAttribute(e, t, n, f);
|
|
92
|
+
break;
|
|
93
|
+
case "justify-items":
|
|
94
|
+
case "align-items":
|
|
95
|
+
case "justify-items--mobile":
|
|
96
|
+
case "align-items--mobile":
|
|
97
|
+
case "justify-items--tablet":
|
|
98
|
+
case "align-items--tablet":
|
|
99
|
+
case "justify-items--laptop":
|
|
100
|
+
case "align-items--laptop":
|
|
101
|
+
case "justify-items--desktop":
|
|
102
|
+
case "align-items--desktop":
|
|
103
|
+
this.updateAttribute(e, t, n, p);
|
|
104
|
+
break;
|
|
105
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
updateGap(e, t, n) {
|
|
109
|
+
if (!this.checkName(n, t)) {
|
|
110
|
+
s(`"${t}" is not a valid gap value for ${this.tagName.toLowerCase()}. Allowed values are: "${n.join("\", \"")}".`);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let r = (e) => {
|
|
114
|
+
e !== null && e !== "" && e !== "default" && (this.$el.style.setProperty("--grid-gap--mobile", `var(--px-spacing-${e}-mobile)`), this.$el.style.setProperty("--grid-gap--tablet", `var(--px-spacing-${e}-tablet)`), this.$el.style.setProperty("--grid-gap--laptop", `var(--px-spacing-${e}-laptop)`));
|
|
115
|
+
};
|
|
116
|
+
r(e), r(t);
|
|
117
|
+
}
|
|
118
|
+
updateAttribute(e, t, n, r) {
|
|
119
|
+
this.checkName(r, n) ? e === "grid-cols" || e === "grid-cols--mobile" || e === "grid-cols--tablet" || e === "grid-cols--laptop" || e === "grid-cols--desktop" ? this.$el.style.setProperty(`--${e}`, n) : (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`${e}-${t}`), n !== null && n !== "" && n !== "default" && this.$el.classList.toggle(`${e}-${n}`)) : s(`"${n}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${r.join("\", \"")}".`);
|
|
120
|
+
}
|
|
121
|
+
get gap() {
|
|
122
|
+
return this.getAttribute("gap");
|
|
123
|
+
}
|
|
124
|
+
set gap(e) {
|
|
125
|
+
this._updateAttribute("gap", e);
|
|
126
|
+
}
|
|
127
|
+
get gapMobile() {
|
|
128
|
+
return this.getAttribute("gap--mobile");
|
|
129
|
+
}
|
|
130
|
+
set gapMobile(e) {
|
|
131
|
+
this._updateAttribute("gap--mobile", e);
|
|
132
|
+
}
|
|
133
|
+
get gapTablet() {
|
|
134
|
+
return this.getAttribute("gap--tablet");
|
|
135
|
+
}
|
|
136
|
+
set gapTablet(e) {
|
|
137
|
+
this._updateAttribute("gap--tablet", e);
|
|
138
|
+
}
|
|
139
|
+
get gapLaptop() {
|
|
140
|
+
return this.getAttribute("gap--laptop");
|
|
141
|
+
}
|
|
142
|
+
set gapLaptop(e) {
|
|
143
|
+
this._updateAttribute("gap--laptop", e);
|
|
144
|
+
}
|
|
145
|
+
get gridCols() {
|
|
146
|
+
return this.getAttribute("grid-cols");
|
|
147
|
+
}
|
|
148
|
+
set gridCols(e) {
|
|
149
|
+
this._updateAttribute("grid-cols", e);
|
|
150
|
+
}
|
|
151
|
+
get gridColsMobile() {
|
|
152
|
+
return this.getAttribute("grid-cols--mobile");
|
|
153
|
+
}
|
|
154
|
+
set gridColsMobile(e) {
|
|
155
|
+
this._updateAttribute("grid-cols--mobile", e);
|
|
156
|
+
}
|
|
157
|
+
get gridColsTablet() {
|
|
158
|
+
return this.getAttribute("grid-cols--tablet");
|
|
159
|
+
}
|
|
160
|
+
set gridColsTablet(e) {
|
|
161
|
+
this._updateAttribute("grid-cols--tablet", e);
|
|
162
|
+
}
|
|
163
|
+
get gridColsLaptop() {
|
|
164
|
+
return this.getAttribute("grid-cols--laptop");
|
|
165
|
+
}
|
|
166
|
+
set gridColsLaptop(e) {
|
|
167
|
+
this._updateAttribute("grid-cols--laptop", e);
|
|
168
|
+
}
|
|
169
|
+
get justifyContent() {
|
|
170
|
+
return this.getAttribute("justify-content");
|
|
171
|
+
}
|
|
172
|
+
set justifyContent(e) {
|
|
173
|
+
this._updateAttribute("justify-content", e);
|
|
174
|
+
}
|
|
175
|
+
get justifyItems() {
|
|
176
|
+
return this.getAttribute("justify-items");
|
|
177
|
+
}
|
|
178
|
+
set justifyItems(e) {
|
|
179
|
+
this._updateAttribute("justify-items", e);
|
|
180
|
+
}
|
|
181
|
+
get alignContent() {
|
|
182
|
+
return this.getAttribute("align-content");
|
|
183
|
+
}
|
|
184
|
+
set alignContent(e) {
|
|
185
|
+
this._updateAttribute("align-content", e);
|
|
186
|
+
}
|
|
187
|
+
get alignItems() {
|
|
188
|
+
return this.getAttribute("align-items");
|
|
189
|
+
}
|
|
190
|
+
set alignItems(e) {
|
|
191
|
+
this._updateAttribute("align-items", e);
|
|
192
|
+
}
|
|
193
|
+
get justifyContentMobile() {
|
|
194
|
+
return this.getAttribute("justify-content--mobile");
|
|
195
|
+
}
|
|
196
|
+
set justifyContentMobile(e) {
|
|
197
|
+
this._updateAttribute("justify-content--mobile", e);
|
|
198
|
+
}
|
|
199
|
+
get justifyItemsMobile() {
|
|
200
|
+
return this.getAttribute("justify-items--mobile");
|
|
201
|
+
}
|
|
202
|
+
set justifyItemsMobile(e) {
|
|
203
|
+
this._updateAttribute("justify-items--mobile", e);
|
|
204
|
+
}
|
|
205
|
+
get alignContentMobile() {
|
|
206
|
+
return this.getAttribute("align-content--mobile");
|
|
207
|
+
}
|
|
208
|
+
set alignContentMobile(e) {
|
|
209
|
+
this._updateAttribute("align-content--mobile", e);
|
|
210
|
+
}
|
|
211
|
+
get alignItemsMobile() {
|
|
212
|
+
return this.getAttribute("align-items--mobile");
|
|
213
|
+
}
|
|
214
|
+
set alignItemsMobile(e) {
|
|
215
|
+
this._updateAttribute("align-items--mobile", e);
|
|
216
|
+
}
|
|
217
|
+
get justifyContentTablet() {
|
|
218
|
+
return this.getAttribute("justify-content--tablet");
|
|
219
|
+
}
|
|
220
|
+
set justifyContentTablet(e) {
|
|
221
|
+
this._updateAttribute("justify-content--tablet", e);
|
|
222
|
+
}
|
|
223
|
+
get justifyItemsTablet() {
|
|
224
|
+
return this.getAttribute("justify-items--tablet");
|
|
225
|
+
}
|
|
226
|
+
set justifyItemsTablet(e) {
|
|
227
|
+
this._updateAttribute("justify-items--tablet", e);
|
|
228
|
+
}
|
|
229
|
+
get alignContentTablet() {
|
|
230
|
+
return this.getAttribute("align-content--tablet");
|
|
231
|
+
}
|
|
232
|
+
set alignContentTablet(e) {
|
|
233
|
+
this._updateAttribute("align-content--tablet", e);
|
|
234
|
+
}
|
|
235
|
+
get alignItemsTablet() {
|
|
236
|
+
return this.getAttribute("align-items--tablet");
|
|
237
|
+
}
|
|
238
|
+
set alignItemsTablet(e) {
|
|
239
|
+
this._updateAttribute("align-items--tablet", e);
|
|
240
|
+
}
|
|
241
|
+
get justifyContentLaptop() {
|
|
242
|
+
return this.getAttribute("justify-content--laptop");
|
|
243
|
+
}
|
|
244
|
+
set justifyContentLaptop(e) {
|
|
245
|
+
this._updateAttribute("justify-content--laptop", e);
|
|
246
|
+
}
|
|
247
|
+
get justifyItemsLaptop() {
|
|
248
|
+
return this.getAttribute("justify-items--laptop");
|
|
249
|
+
}
|
|
250
|
+
set justifyItemsLaptop(e) {
|
|
251
|
+
this._updateAttribute("justify-items--laptop", e);
|
|
252
|
+
}
|
|
253
|
+
get alignContentLaptop() {
|
|
254
|
+
return this.getAttribute("align-content--laptop");
|
|
255
|
+
}
|
|
256
|
+
set alignContentLaptop(e) {
|
|
257
|
+
this._updateAttribute("align-content--laptop", e);
|
|
258
|
+
}
|
|
259
|
+
get alignItemsLaptop() {
|
|
260
|
+
return this.getAttribute("align-items--laptop");
|
|
261
|
+
}
|
|
262
|
+
set alignItemsLaptop(e) {
|
|
263
|
+
this._updateAttribute("align-items--laptop", e);
|
|
264
|
+
}
|
|
265
|
+
get justifyContentDesktop() {
|
|
266
|
+
return this.getAttribute("justify-content--desktop");
|
|
267
|
+
}
|
|
268
|
+
set justifyContentDesktop(e) {
|
|
269
|
+
this._updateAttribute("justify-content--desktop", e);
|
|
270
|
+
}
|
|
271
|
+
get justifyItemsDesktop() {
|
|
272
|
+
return this.getAttribute("justify-items--desktop");
|
|
273
|
+
}
|
|
274
|
+
set justifyItemsDesktop(e) {
|
|
275
|
+
this._updateAttribute("justify-items--desktop", e);
|
|
276
|
+
}
|
|
277
|
+
get alignContentDesktop() {
|
|
278
|
+
return this.getAttribute("align-content--desktop");
|
|
279
|
+
}
|
|
280
|
+
set alignContentDesktop(e) {
|
|
281
|
+
this._updateAttribute("align-content--desktop", e);
|
|
282
|
+
}
|
|
283
|
+
get alignItemsDesktop() {
|
|
284
|
+
return this.getAttribute("align-items--desktop");
|
|
285
|
+
}
|
|
286
|
+
set alignItemsDesktop(e) {
|
|
287
|
+
this._updateAttribute("align-items--desktop", e);
|
|
288
|
+
}
|
|
246
289
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
290
|
+
customElements.get("px-grid") || customElements.define("px-grid", h);
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/Banner.ts
|
|
293
|
+
var g = new CSSStyleSheet();
|
|
294
|
+
g.replaceSync(c);
|
|
295
|
+
var _ = class extends t {
|
|
296
|
+
static {
|
|
297
|
+
this.nativeName = "div";
|
|
298
|
+
}
|
|
299
|
+
constructor() {
|
|
300
|
+
super(g), this.observer = new MutationObserver(() => {
|
|
301
|
+
this.createGridTemplateAreas(), this.createGridding();
|
|
302
|
+
}), this.template = () => "<div class=\"banner\">\n <div class=\"contrast-helper\"></div>\n <px-container class=\"banner-container\" padding--mobile=\"m\" border-radius=\"main\" >\n <px-vstack>\n <px-grid gap=\"none\">\n <px-container padding=\"none\" background-color=\"none\">\n <div class=\"banner-content\">\n <slot name=\"tag\"></slot>\n <slot name=\"media\"></slot>\n <slot name=\"title\"></slot>\n <slot name=\"description\"></slot>\n <slot name=\"content\"></slot>\n </div>\n </px-container>\n </px-grid>\n <slot name=\"action\"></slot>\n </px-vstack>\n </px-container>\n </div>", this.shadowRoot.innerHTML = this.template();
|
|
303
|
+
}
|
|
304
|
+
static get observedAttributes() {
|
|
305
|
+
return [
|
|
306
|
+
...super.observedAttributes,
|
|
307
|
+
"background-color",
|
|
308
|
+
"background-gradient",
|
|
309
|
+
"background-image",
|
|
310
|
+
"background-image--mobile",
|
|
311
|
+
"background-image--tablet",
|
|
312
|
+
"background-image--laptop",
|
|
313
|
+
"background-size",
|
|
314
|
+
"background-position",
|
|
315
|
+
"contrast-helper-gradient",
|
|
316
|
+
"contrast-helper-overlay",
|
|
317
|
+
"has-gridding",
|
|
318
|
+
"has-gridding--mobile",
|
|
319
|
+
"has-gridding--tablet",
|
|
320
|
+
"has-gridding--laptop",
|
|
321
|
+
"reduced",
|
|
322
|
+
"inverted"
|
|
323
|
+
];
|
|
324
|
+
}
|
|
325
|
+
connectedCallback() {
|
|
326
|
+
super.connectedCallback?.(), this.#e(), this.createGridTemplateAreas(), this.createGridding(), this.observer.observe(this, {
|
|
327
|
+
childList: !0,
|
|
328
|
+
subtree: !0
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
#e() {
|
|
332
|
+
this.$container.setAttribute("padding", this.reduced ? "m" : "l");
|
|
333
|
+
}
|
|
334
|
+
attributeChangedCallback(e, t, i) {
|
|
335
|
+
if (t !== i) switch (e) {
|
|
336
|
+
case "background-color":
|
|
337
|
+
this.$container.backgroundColor = n.indexOf(i) > 0 ? i : "none";
|
|
338
|
+
break;
|
|
339
|
+
case "background-gradient":
|
|
340
|
+
this.$container.gradient = o.indexOf(i) > 0 ? i : "none";
|
|
341
|
+
break;
|
|
342
|
+
case "background-image":
|
|
343
|
+
this.$container.backgroundImage = i;
|
|
344
|
+
break;
|
|
345
|
+
case "background-image--mobile":
|
|
346
|
+
this.$container.backgroundImageMobile = i;
|
|
347
|
+
break;
|
|
348
|
+
case "background-image--tablet":
|
|
349
|
+
this.$container.backgroundImageTablet = i;
|
|
350
|
+
break;
|
|
351
|
+
case "background-image--laptop":
|
|
352
|
+
this.$container.backgroundImageLaptop = i;
|
|
353
|
+
break;
|
|
354
|
+
case "background-size":
|
|
355
|
+
this.$container.backgroundSize = r.indexOf(i) > 0 ? i : "";
|
|
356
|
+
break;
|
|
357
|
+
case "background-position":
|
|
358
|
+
this.$container.backgroundPosition = i;
|
|
359
|
+
break;
|
|
360
|
+
case "reduced":
|
|
361
|
+
this.$el.toggleAttribute("reduced", i !== null), this.isConnected && this.#e(), this.createGridTemplateAreas();
|
|
362
|
+
break;
|
|
363
|
+
case "has-gridding":
|
|
364
|
+
case "has-gridding--mobile":
|
|
365
|
+
case "has-gridding--tablet":
|
|
366
|
+
case "has-gridding--laptop":
|
|
367
|
+
this.createGridding(i);
|
|
368
|
+
break;
|
|
369
|
+
case "inverted":
|
|
370
|
+
for (let e = 0; e < this.$children.length; e++) this.$children[e].hasAttribute("inverted") || this.$children[e].toggleAttribute("inverted");
|
|
371
|
+
this.$el.toggleAttribute("inverted", i !== null);
|
|
372
|
+
break;
|
|
373
|
+
default: super.attributeChangedCallback(e, t, i);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
disconnectedCallback() {
|
|
377
|
+
this.observer.disconnect();
|
|
378
|
+
}
|
|
379
|
+
createGridTemplateAreas() {
|
|
380
|
+
let e = this.shadowRoot.querySelector(".banner-content"), t = [
|
|
381
|
+
"tag",
|
|
382
|
+
"media",
|
|
383
|
+
"title",
|
|
384
|
+
"description",
|
|
385
|
+
"content",
|
|
386
|
+
"action"
|
|
387
|
+
], n = "";
|
|
388
|
+
this.reduced ? t.forEach((e) => {
|
|
389
|
+
let t = this.shadowRoot.querySelector(`slot[name="${e}"]`);
|
|
390
|
+
if (t && t.assignedElements().length > 0) {
|
|
391
|
+
if (e === "media") return;
|
|
392
|
+
n += `'media ${e}'\n`;
|
|
393
|
+
}
|
|
394
|
+
}) : t.forEach((e) => {
|
|
395
|
+
let t = this.shadowRoot.querySelector(`slot[name="${e}"]`);
|
|
396
|
+
t && t.assignedElements().length > 0 && (n += `'${e}'\n`);
|
|
397
|
+
}), n ||= "'content'", e.style.gridTemplateAreas = n;
|
|
398
|
+
}
|
|
399
|
+
createGridding(e) {
|
|
400
|
+
let t = [
|
|
401
|
+
{
|
|
402
|
+
prop: "hasGridding",
|
|
403
|
+
gridAttr: "grid-cols",
|
|
404
|
+
attr: "col-span"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
prop: "hasGriddingMobile",
|
|
408
|
+
gridAttr: "grid-cols--mobile",
|
|
409
|
+
attr: "col-span--mobile"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
prop: "hasGriddingTablet",
|
|
413
|
+
gridAttr: "grid-cols--tablet",
|
|
414
|
+
attr: "col-span--tablet"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
prop: "hasGriddingLaptop",
|
|
418
|
+
gridAttr: "grid-cols--laptop",
|
|
419
|
+
attr: "col-span--laptop"
|
|
420
|
+
}
|
|
421
|
+
], n = this.shadowRoot.querySelector("px-grid > px-container");
|
|
422
|
+
e === null ? t.forEach(({ gridAttr: e, attr: t }) => {
|
|
423
|
+
this.$grid.setAttribute(e, "1"), n.setAttribute(t, "1");
|
|
424
|
+
}) : t.forEach(({ prop: e, gridAttr: t, attr: r }) => {
|
|
425
|
+
this[e] && (this.$grid.setAttribute(t, "3"), n.setAttribute(r, "2"));
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
get $grid() {
|
|
429
|
+
return this.shadowRoot.querySelector("px-grid");
|
|
430
|
+
}
|
|
431
|
+
get $container() {
|
|
432
|
+
return this.shadowRoot.querySelector(".banner-container");
|
|
433
|
+
}
|
|
434
|
+
get $children() {
|
|
435
|
+
return this.querySelectorAll("px-banner > *");
|
|
436
|
+
}
|
|
437
|
+
get backgroundColor() {
|
|
438
|
+
return this.getAttribute("background-color");
|
|
439
|
+
}
|
|
440
|
+
set backgroundColor(e) {
|
|
441
|
+
this._updateAttribute("background-color", e);
|
|
442
|
+
}
|
|
443
|
+
get gradient() {
|
|
444
|
+
return this.getAttribute("background-gradient");
|
|
445
|
+
}
|
|
446
|
+
set gradient(e) {
|
|
447
|
+
this._updateAttribute("background-gradient", e);
|
|
448
|
+
}
|
|
449
|
+
get backgroundImage() {
|
|
450
|
+
return this.getAttribute("background-image");
|
|
451
|
+
}
|
|
452
|
+
set backgroundImage(e) {
|
|
453
|
+
this._updateAttribute("background-image", e);
|
|
454
|
+
}
|
|
455
|
+
get backgroundImageMobile() {
|
|
456
|
+
return this.getAttribute("background-image--mobile");
|
|
457
|
+
}
|
|
458
|
+
set backgroundImageMobile(e) {
|
|
459
|
+
this._updateAttribute("background-image--mobile", e);
|
|
460
|
+
}
|
|
461
|
+
get backgroundImageTablet() {
|
|
462
|
+
return this.getAttribute("background-image--tablet");
|
|
463
|
+
}
|
|
464
|
+
set backgroundImageTablet(e) {
|
|
465
|
+
this._updateAttribute("background-image--tablet", e);
|
|
466
|
+
}
|
|
467
|
+
get backgroundImageLaptop() {
|
|
468
|
+
return this.getAttribute("background-image--laptop");
|
|
469
|
+
}
|
|
470
|
+
set backgroundImageLaptop(e) {
|
|
471
|
+
this._updateAttribute("background-image--laptop", e);
|
|
472
|
+
}
|
|
473
|
+
get backgroundSize() {
|
|
474
|
+
return this.getAttribute("background-size");
|
|
475
|
+
}
|
|
476
|
+
set backgroundSize(e) {
|
|
477
|
+
this._updateAttribute("background-size", e);
|
|
478
|
+
}
|
|
479
|
+
get backgroundPosition() {
|
|
480
|
+
return this.getAttribute("background-position");
|
|
481
|
+
}
|
|
482
|
+
set backgroundPosition(e) {
|
|
483
|
+
this._updateAttribute("background-position", e);
|
|
484
|
+
}
|
|
485
|
+
get gradientContrastHelper() {
|
|
486
|
+
return this.hasAttribute("contrast-helper-gradient");
|
|
487
|
+
}
|
|
488
|
+
set gradientContrastHelper(e) {
|
|
489
|
+
this._updateBooleanAttribute("contrast-helper-gradient", e);
|
|
490
|
+
}
|
|
491
|
+
get overlayContrastHelper() {
|
|
492
|
+
return this.hasAttribute("contrast-helper-overlay");
|
|
493
|
+
}
|
|
494
|
+
set overlayContrastHelper(e) {
|
|
495
|
+
this._updateBooleanAttribute("contrast-helper-overlay", e);
|
|
496
|
+
}
|
|
497
|
+
get inverted() {
|
|
498
|
+
return this.hasAttribute("inverted");
|
|
499
|
+
}
|
|
500
|
+
set inverted(e) {
|
|
501
|
+
this._updateBooleanAttribute("inverted", e);
|
|
502
|
+
}
|
|
503
|
+
get reduced() {
|
|
504
|
+
return this.hasAttribute("reduced");
|
|
505
|
+
}
|
|
506
|
+
set reduced(e) {
|
|
507
|
+
this._updateBooleanAttribute("reduced", e);
|
|
508
|
+
}
|
|
509
|
+
get hasGridding() {
|
|
510
|
+
return this.hasAttribute("has-gridding");
|
|
511
|
+
}
|
|
512
|
+
set hasGridding(e) {
|
|
513
|
+
this._updateBooleanAttribute("has-gridding", e);
|
|
514
|
+
}
|
|
515
|
+
get hasGriddingMobile() {
|
|
516
|
+
return this.hasAttribute("has-gridding--mobile");
|
|
517
|
+
}
|
|
518
|
+
set hasGriddingMobile(e) {
|
|
519
|
+
this._updateBooleanAttribute("has-gridding--mobile", e);
|
|
520
|
+
}
|
|
521
|
+
get hasGriddingTablet() {
|
|
522
|
+
return this.hasAttribute("has-gridding--tablet");
|
|
523
|
+
}
|
|
524
|
+
set hasGriddingTablet(e) {
|
|
525
|
+
this._updateBooleanAttribute("has-gridding--tablet", e);
|
|
526
|
+
}
|
|
527
|
+
get hasGriddingLaptop() {
|
|
528
|
+
return this.hasAttribute("has-gridding--laptop");
|
|
529
|
+
}
|
|
530
|
+
set hasGriddingLaptop(e) {
|
|
531
|
+
this._updateBooleanAttribute("has-gridding--laptop", e);
|
|
532
|
+
}
|
|
252
533
|
};
|
|
534
|
+
customElements.get("px-banner") || customElements.define("px-banner", _);
|
|
535
|
+
//#endregion
|
|
536
|
+
export { _ as Banner };
|
|
@@ -0,0 +1,29 @@
|
|
|
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-banner",
|
|
7
|
+
"description": "\n---\n",
|
|
8
|
+
"attributes": [
|
|
9
|
+
{ "name": "background-color", "values": [] },
|
|
10
|
+
{ "name": "background-gradient", "values": [] },
|
|
11
|
+
{ "name": "background-image", "values": [] },
|
|
12
|
+
{ "name": "background-image--mobile", "values": [] },
|
|
13
|
+
{ "name": "background-image--tablet", "values": [] },
|
|
14
|
+
{ "name": "background-image--laptop", "values": [] },
|
|
15
|
+
{ "name": "background-size", "values": [] },
|
|
16
|
+
{ "name": "background-position", "values": [] },
|
|
17
|
+
{ "name": "contrast-helper-gradient", "values": [] },
|
|
18
|
+
{ "name": "contrast-helper-overlay", "values": [] },
|
|
19
|
+
{ "name": "has-gridding", "values": [] },
|
|
20
|
+
{ "name": "has-gridding--mobile", "values": [] },
|
|
21
|
+
{ "name": "has-gridding--tablet", "values": [] },
|
|
22
|
+
{ "name": "has-gridding--laptop", "values": [] },
|
|
23
|
+
{ "name": "reduced", "values": [] },
|
|
24
|
+
{ "name": "inverted", "values": [] }
|
|
25
|
+
],
|
|
26
|
+
"references": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
|
+
"name": "@proximus/lavender-banner",
|
|
4
|
+
"version": "2.0.0-alpha.200",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
10
|
+
"name": "px-banner",
|
|
11
|
+
"description": "\n---\n",
|
|
12
|
+
"doc-url": "",
|
|
13
|
+
"attributes": [
|
|
14
|
+
{ "name": "background-color", "value": { "type": "string" } },
|
|
15
|
+
{ "name": "background-gradient", "value": { "type": "string" } },
|
|
16
|
+
{ "name": "background-image", "value": { "type": "string" } },
|
|
17
|
+
{
|
|
18
|
+
"name": "background-image--mobile",
|
|
19
|
+
"value": { "type": "string" }
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "background-image--tablet",
|
|
23
|
+
"value": { "type": "string" }
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "background-image--laptop",
|
|
27
|
+
"value": { "type": "string" }
|
|
28
|
+
},
|
|
29
|
+
{ "name": "background-size", "value": { "type": "string" } },
|
|
30
|
+
{ "name": "background-position", "value": { "type": "string" } },
|
|
31
|
+
{
|
|
32
|
+
"name": "contrast-helper-gradient",
|
|
33
|
+
"value": { "type": "string" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "contrast-helper-overlay",
|
|
37
|
+
"value": { "type": "string" }
|
|
38
|
+
},
|
|
39
|
+
{ "name": "has-gridding", "value": { "type": "string" } },
|
|
40
|
+
{ "name": "has-gridding--mobile", "value": { "type": "string" } },
|
|
41
|
+
{ "name": "has-gridding--tablet", "value": { "type": "string" } },
|
|
42
|
+
{ "name": "has-gridding--laptop", "value": { "type": "string" } },
|
|
43
|
+
{ "name": "reduced", "value": { "type": "string" } },
|
|
44
|
+
{ "name": "inverted", "value": { "type": "string" } }
|
|
45
|
+
],
|
|
46
|
+
"events": [],
|
|
47
|
+
"js": {
|
|
48
|
+
"properties": [
|
|
49
|
+
{ "name": "observer" },
|
|
50
|
+
{ "name": "$grid" },
|
|
51
|
+
{ "name": "$container" },
|
|
52
|
+
{ "name": "$children" },
|
|
53
|
+
{ "name": "backgroundColor" },
|
|
54
|
+
{ "name": "gradient" },
|
|
55
|
+
{ "name": "backgroundImage" },
|
|
56
|
+
{ "name": "backgroundImageMobile" },
|
|
57
|
+
{ "name": "backgroundImageTablet" },
|
|
58
|
+
{ "name": "backgroundImageLaptop" },
|
|
59
|
+
{ "name": "backgroundSize" },
|
|
60
|
+
{ "name": "backgroundPosition" },
|
|
61
|
+
{ "name": "gradientContrastHelper" },
|
|
62
|
+
{ "name": "overlayContrastHelper" },
|
|
63
|
+
{ "name": "inverted" },
|
|
64
|
+
{ "name": "reduced" },
|
|
65
|
+
{ "name": "hasGridding" },
|
|
66
|
+
{ "name": "hasGriddingMobile" },
|
|
67
|
+
{ "name": "hasGriddingTablet" },
|
|
68
|
+
{ "name": "hasGriddingLaptop" },
|
|
69
|
+
{ "name": "innerHTML" }
|
|
70
|
+
],
|
|
71
|
+
"events": []
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"css": {
|
|
77
|
+
"properties": [],
|
|
78
|
+
"pseudo-elements": []
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-banner",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.200",
|
|
4
4
|
"description": "",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"clean": "rm -rf dist",
|
|
12
12
|
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
13
13
|
"test": "vitest run --coverage",
|
|
14
|
-
"wc-manifest": "cem analyze --globs \"src/*\" --config
|
|
14
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": {
|
|
17
17
|
"access": "public"
|