@proximus/lavender-layout 1.1.0-alpha.2 → 1.1.0-alpha.20
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/index.es.js +598 -0
- package/package.json +7 -27
- package/dist/index.js +0 -607
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
import { WithExtraAttributes as c, AttributeBreakpointHandlerDelegate as b, gapValues as u, checkName as h, backgroundColorValues as x } from "@proximus/lavender-common";
|
|
2
|
+
const f = ":host{display:block}.flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value);overflow-x:var(--overflow-x-all)}@media only screen and (min-width: 48em) and (max-width: 47.9375em){.flex-container{overflow-x:var(--overflow-x-all-mobile, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 48em){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}}@media only screen and (min-width: 48em) and (max-width: 64em){.flex-container{overflow-x:var(--overflow-x-all-tablet, var(--overflow-x-all));scrollbar-width:none}.flex-container::-webkit-scrollbar{display:none}}@media only screen and (min-width: 64.0625em){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.flex-container{overflow-x:var(--overflow-x-all-laptop, var(--overflow-x-all))}}@media only screen and (min-width: 90.0625em){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value);overflow-x:var(--overflow-x-all-desktop, var(--overflow-x-all))}}", d = new CSSStyleSheet();
|
|
3
|
+
d.replaceSync(f);
|
|
4
|
+
const m = [
|
|
5
|
+
"",
|
|
6
|
+
"default",
|
|
7
|
+
"row",
|
|
8
|
+
"row-reverse",
|
|
9
|
+
"column",
|
|
10
|
+
"column-reverse"
|
|
11
|
+
], v = [
|
|
12
|
+
"",
|
|
13
|
+
"default",
|
|
14
|
+
"stretch",
|
|
15
|
+
"flex-start",
|
|
16
|
+
"flex-end",
|
|
17
|
+
"center",
|
|
18
|
+
"baseline"
|
|
19
|
+
], k = [
|
|
20
|
+
"",
|
|
21
|
+
"default",
|
|
22
|
+
"flex-start",
|
|
23
|
+
"flex-end",
|
|
24
|
+
"center",
|
|
25
|
+
"space-between",
|
|
26
|
+
"space-around",
|
|
27
|
+
"space-evenly"
|
|
28
|
+
], w = ["", "default", "nowrap", "wrap", "wrap-reverse"], y = ["", "visible", "hidden", "scroll", "auto"];
|
|
29
|
+
class l extends c {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(d), this.overflowXAttributeDelegate = new b(
|
|
32
|
+
this,
|
|
33
|
+
"overflow-x",
|
|
34
|
+
(t) => t,
|
|
35
|
+
"--overflow-x"
|
|
36
|
+
), this.template = `<div class="flex-container">
|
|
37
|
+
<slot></slot>
|
|
38
|
+
</div>`, this.shadowRoot.innerHTML = this.template;
|
|
39
|
+
}
|
|
40
|
+
connectedCallback() {
|
|
41
|
+
this.hasAttribute("direction") || (this.direction = "row"), this.hasAttribute("gap") || (this.gap = "none"), this.hasAttribute("align-items") || (this.alignItems = "stretch"), this.hasAttribute("justify-content") || (this.justifyContent = "flex-start"), this.hasAttribute("wrap") || (this.wrap = "nowrap"), this.hasAttribute("overflow-x") || this.overflowXAttributeDelegate.init("visible");
|
|
42
|
+
}
|
|
43
|
+
static get observedAttributes() {
|
|
44
|
+
return [
|
|
45
|
+
...super.observedAttributes,
|
|
46
|
+
"direction",
|
|
47
|
+
"direction--mobile",
|
|
48
|
+
"direction--tablet",
|
|
49
|
+
"direction--laptop",
|
|
50
|
+
"direction--desktop",
|
|
51
|
+
"gap",
|
|
52
|
+
"gap--mobile",
|
|
53
|
+
"gap--tablet",
|
|
54
|
+
"gap--laptop",
|
|
55
|
+
"gap--desktop",
|
|
56
|
+
"justify-content",
|
|
57
|
+
"justify-content--mobile",
|
|
58
|
+
"justify-content--tablet",
|
|
59
|
+
"justify-content--laptop",
|
|
60
|
+
"justify-content--desktop",
|
|
61
|
+
"align-items",
|
|
62
|
+
"align-items--mobile",
|
|
63
|
+
"align-items--tablet",
|
|
64
|
+
"align-items--laptop",
|
|
65
|
+
"align-items--desktop",
|
|
66
|
+
"wrap",
|
|
67
|
+
"wrap--mobile",
|
|
68
|
+
"wrap--tablet",
|
|
69
|
+
"wrap--laptop",
|
|
70
|
+
"wrap--desktop",
|
|
71
|
+
"overflow-x",
|
|
72
|
+
"overflow-x--mobile",
|
|
73
|
+
"overflow-x--tablet",
|
|
74
|
+
"overflow-x--laptop",
|
|
75
|
+
"overflow-x--desktop"
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
attributeChangedCallback(t, i, e) {
|
|
79
|
+
switch (t) {
|
|
80
|
+
case "gap":
|
|
81
|
+
case "gap--mobile":
|
|
82
|
+
case "gap--tablet":
|
|
83
|
+
case "gap--laptop":
|
|
84
|
+
case "gap--desktop":
|
|
85
|
+
this.updateFlexProperties(t, i, e, u);
|
|
86
|
+
break;
|
|
87
|
+
case "justify-content":
|
|
88
|
+
case "justify-content--mobile":
|
|
89
|
+
case "justify-content--tablet":
|
|
90
|
+
case "justify-content--laptop":
|
|
91
|
+
case "justify-content--desktop":
|
|
92
|
+
this.updateFlexProperties(
|
|
93
|
+
t,
|
|
94
|
+
i,
|
|
95
|
+
e,
|
|
96
|
+
k
|
|
97
|
+
);
|
|
98
|
+
break;
|
|
99
|
+
case "align-items":
|
|
100
|
+
case "align-items--mobile":
|
|
101
|
+
case "align-items--tablet":
|
|
102
|
+
case "align-items--laptop":
|
|
103
|
+
case "align-items--desktop":
|
|
104
|
+
this.updateFlexProperties(t, i, e, v);
|
|
105
|
+
break;
|
|
106
|
+
case "wrap":
|
|
107
|
+
case "wrap--mobile":
|
|
108
|
+
case "wrap--tablet":
|
|
109
|
+
case "wrap--laptop":
|
|
110
|
+
case "wrap--desktop":
|
|
111
|
+
this.updateFlexProperties(t, i, e, w);
|
|
112
|
+
break;
|
|
113
|
+
case "direction":
|
|
114
|
+
case "direction--mobile":
|
|
115
|
+
case "direction--tablet":
|
|
116
|
+
case "direction--laptop":
|
|
117
|
+
case "direction--desktop":
|
|
118
|
+
this.updateFlexProperties(t, i, e, m);
|
|
119
|
+
break;
|
|
120
|
+
case "overflow-x":
|
|
121
|
+
case "overflow-x--mobile":
|
|
122
|
+
case "overflow-x--tablet":
|
|
123
|
+
case "overflow-x--laptop":
|
|
124
|
+
case "overflow-x--desktop":
|
|
125
|
+
this.updateOverflowX(t, i, e, y);
|
|
126
|
+
break;
|
|
127
|
+
default:
|
|
128
|
+
super.attributeChangedCallback(t, i, e);
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
updateOverflowX(t, i, e, o) {
|
|
133
|
+
if (!h(o, e)) {
|
|
134
|
+
console.error(`${e} is not an allowed ${t} value`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
this.overflowXAttributeDelegate.attributeChangedCallback(
|
|
138
|
+
t,
|
|
139
|
+
i,
|
|
140
|
+
e
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
updateFlexProperties(t, i, e, o) {
|
|
144
|
+
this.checkName(o, e) || console.error(`${e} is not a valid value for ${o}`);
|
|
145
|
+
const p = t.indexOf("--") > -1, a = p ? t.split("--")[0] : t, r = [];
|
|
146
|
+
if (!p)
|
|
147
|
+
this.getAttribute(a + "--mobile") || r.push("mobile"), this.getAttribute(a + "--tablet") || r.push("tablet"), this.getAttribute(a + "--laptop") || r.push("laptop"), this.getAttribute(a + "--desktop") || r.push("desktop"), r.forEach((s) => {
|
|
148
|
+
this.updateStyle(a, s, i, o), this.updateStyle(a, s, e, o);
|
|
149
|
+
});
|
|
150
|
+
else {
|
|
151
|
+
const s = t.split("--")[1];
|
|
152
|
+
this.updateStyle(a, s, i, o), this.updateStyle(a, s, e, o);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
updateStyle(t, i, e, o) {
|
|
156
|
+
e && (t === "gap" && o && o.includes(e) ? this.$el.style.setProperty(
|
|
157
|
+
`--flex-${t}--${i}-value`,
|
|
158
|
+
`var(--px-spacing-${e}-${i === "laptop" ? "desktop" : i})`
|
|
159
|
+
) : this.$el.style.setProperty(
|
|
160
|
+
`--flex-${t}--${i}-value`,
|
|
161
|
+
e
|
|
162
|
+
));
|
|
163
|
+
}
|
|
164
|
+
checkName(t, i) {
|
|
165
|
+
return t.includes(i);
|
|
166
|
+
}
|
|
167
|
+
get direction() {
|
|
168
|
+
return this.getAttribute("direction");
|
|
169
|
+
}
|
|
170
|
+
set direction(t) {
|
|
171
|
+
this.setAttribute("direction", t);
|
|
172
|
+
}
|
|
173
|
+
get directionMobile() {
|
|
174
|
+
return this.getAttribute("direction--mobile");
|
|
175
|
+
}
|
|
176
|
+
set directionMobile(t) {
|
|
177
|
+
this.setAttribute("direction--mobile", t);
|
|
178
|
+
}
|
|
179
|
+
get directionTablet() {
|
|
180
|
+
return this.getAttribute("direction--tablet");
|
|
181
|
+
}
|
|
182
|
+
set directionTablet(t) {
|
|
183
|
+
this.setAttribute("direction--tablet", t);
|
|
184
|
+
}
|
|
185
|
+
get directionLaptop() {
|
|
186
|
+
return this.getAttribute("direction--laptop");
|
|
187
|
+
}
|
|
188
|
+
set directionLaptop(t) {
|
|
189
|
+
this.setAttribute("direction--laptop", t);
|
|
190
|
+
}
|
|
191
|
+
get directionDesktop() {
|
|
192
|
+
return this.getAttribute("direction--desktop");
|
|
193
|
+
}
|
|
194
|
+
set directionDesktop(t) {
|
|
195
|
+
this.setAttribute("direction--desktop", t);
|
|
196
|
+
}
|
|
197
|
+
get gap() {
|
|
198
|
+
return this.getAttribute("gap");
|
|
199
|
+
}
|
|
200
|
+
set gap(t) {
|
|
201
|
+
this.setAttribute("gap", t);
|
|
202
|
+
}
|
|
203
|
+
get gapMobile() {
|
|
204
|
+
return this.getAttribute("gap--mobile");
|
|
205
|
+
}
|
|
206
|
+
set gapMobile(t) {
|
|
207
|
+
this.setAttribute("gap--mobile", t);
|
|
208
|
+
}
|
|
209
|
+
get gapTablet() {
|
|
210
|
+
return this.getAttribute("gap--tablet");
|
|
211
|
+
}
|
|
212
|
+
set gapTablet(t) {
|
|
213
|
+
this.setAttribute("gap--tablet", t);
|
|
214
|
+
}
|
|
215
|
+
get gapLaptop() {
|
|
216
|
+
return this.getAttribute("gap--laptop");
|
|
217
|
+
}
|
|
218
|
+
set gapLaptop(t) {
|
|
219
|
+
this.setAttribute("gap--laptop", t);
|
|
220
|
+
}
|
|
221
|
+
get justifyContent() {
|
|
222
|
+
return this.getAttribute("justify-content");
|
|
223
|
+
}
|
|
224
|
+
set justifyContent(t) {
|
|
225
|
+
this.setAttribute("justify-content", t);
|
|
226
|
+
}
|
|
227
|
+
get justifyContentMobile() {
|
|
228
|
+
return this.getAttribute("justify-content--mobile");
|
|
229
|
+
}
|
|
230
|
+
set justifyContentMobile(t) {
|
|
231
|
+
this.setAttribute("justify-content--mobile", t);
|
|
232
|
+
}
|
|
233
|
+
get justifyContentTablet() {
|
|
234
|
+
return this.getAttribute("justify-content--tablet");
|
|
235
|
+
}
|
|
236
|
+
set justifyContentTablet(t) {
|
|
237
|
+
this.setAttribute("justify-content--tablet", t);
|
|
238
|
+
}
|
|
239
|
+
get justifyContentLaptop() {
|
|
240
|
+
return this.getAttribute("justify-content--laptop");
|
|
241
|
+
}
|
|
242
|
+
set justifyContentLaptop(t) {
|
|
243
|
+
this.setAttribute("justify-content--laptop", t);
|
|
244
|
+
}
|
|
245
|
+
get justifyContentDesktop() {
|
|
246
|
+
return this.getAttribute("justify-content--desktop");
|
|
247
|
+
}
|
|
248
|
+
set justifyContentDesktop(t) {
|
|
249
|
+
this.setAttribute("justify-content--desktop", t);
|
|
250
|
+
}
|
|
251
|
+
get alignItems() {
|
|
252
|
+
return this.getAttribute("align-items");
|
|
253
|
+
}
|
|
254
|
+
set alignItems(t) {
|
|
255
|
+
this.setAttribute("align-items", t);
|
|
256
|
+
}
|
|
257
|
+
get alignItemsMobile() {
|
|
258
|
+
return this.getAttribute("align-items--mobile");
|
|
259
|
+
}
|
|
260
|
+
set alignItemsMobile(t) {
|
|
261
|
+
this.setAttribute("align-items--mobile", t);
|
|
262
|
+
}
|
|
263
|
+
get alignItemsTablet() {
|
|
264
|
+
return this.getAttribute("align-items--tablet");
|
|
265
|
+
}
|
|
266
|
+
set alignItemsTablet(t) {
|
|
267
|
+
this.setAttribute("align-items--tablet", t);
|
|
268
|
+
}
|
|
269
|
+
get alignItemsLaptop() {
|
|
270
|
+
return this.getAttribute("align-items--laptop");
|
|
271
|
+
}
|
|
272
|
+
set alignItemsLaptop(t) {
|
|
273
|
+
this.setAttribute("align-items--laptop", t);
|
|
274
|
+
}
|
|
275
|
+
get alignItemsDesktop() {
|
|
276
|
+
return this.getAttribute("align-items--desktop");
|
|
277
|
+
}
|
|
278
|
+
set alignItemsDesktop(t) {
|
|
279
|
+
this.setAttribute("align-items--desktop", t);
|
|
280
|
+
}
|
|
281
|
+
get wrap() {
|
|
282
|
+
return this.getAttribute("wrap");
|
|
283
|
+
}
|
|
284
|
+
set wrap(t) {
|
|
285
|
+
this.setAttribute("wrap", t);
|
|
286
|
+
}
|
|
287
|
+
get wrapMobile() {
|
|
288
|
+
return this.getAttribute("wrap--mobile");
|
|
289
|
+
}
|
|
290
|
+
set wrapMobile(t) {
|
|
291
|
+
this.setAttribute("wrap--mobile", t);
|
|
292
|
+
}
|
|
293
|
+
get wrapTablet() {
|
|
294
|
+
return this.getAttribute("wrap--tablet");
|
|
295
|
+
}
|
|
296
|
+
set wrapTablet(t) {
|
|
297
|
+
this.setAttribute("wrap--tablet", t);
|
|
298
|
+
}
|
|
299
|
+
get wrapLaptop() {
|
|
300
|
+
return this.getAttribute("wrap--laptop");
|
|
301
|
+
}
|
|
302
|
+
set wrapLaptop(t) {
|
|
303
|
+
this.setAttribute("wrap--laptop", t);
|
|
304
|
+
}
|
|
305
|
+
get wrapDesktop() {
|
|
306
|
+
return this.getAttribute("wrap--desktop");
|
|
307
|
+
}
|
|
308
|
+
set wrapDesktop(t) {
|
|
309
|
+
this.setAttribute("wrap--desktop", t);
|
|
310
|
+
}
|
|
311
|
+
get overflowX() {
|
|
312
|
+
return this.getAttribute("overflow-x");
|
|
313
|
+
}
|
|
314
|
+
set overflowX(t) {
|
|
315
|
+
this.setAttribute("overflow-x", t);
|
|
316
|
+
}
|
|
317
|
+
get overflowXMobile() {
|
|
318
|
+
return this.getAttribute("overflow-x--mobile");
|
|
319
|
+
}
|
|
320
|
+
set overflowXMobile(t) {
|
|
321
|
+
this.setAttribute("overflow-x--mobile", t);
|
|
322
|
+
}
|
|
323
|
+
get overflowXTablet() {
|
|
324
|
+
return this.getAttribute("overflow-x--tablet");
|
|
325
|
+
}
|
|
326
|
+
set overflowXTablet(t) {
|
|
327
|
+
this.setAttribute("overflow-x--tablet", t);
|
|
328
|
+
}
|
|
329
|
+
get overflowXLaptop() {
|
|
330
|
+
return this.getAttribute("overflow-x--laptop");
|
|
331
|
+
}
|
|
332
|
+
set overflowXLaptop(t) {
|
|
333
|
+
this.setAttribute("overflow-x--laptop", t);
|
|
334
|
+
}
|
|
335
|
+
get overflowXDesktop() {
|
|
336
|
+
return this.getAttribute("overflow-x--desktop");
|
|
337
|
+
}
|
|
338
|
+
set overflowXDesktop(t) {
|
|
339
|
+
this.setAttribute("overflow-x--desktop", t);
|
|
340
|
+
}
|
|
341
|
+
get $el() {
|
|
342
|
+
return this.shadowRoot.querySelector(".flex-container");
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
customElements.get("px-stack") || customElements.define("px-stack", l);
|
|
346
|
+
class A extends l {
|
|
347
|
+
constructor() {
|
|
348
|
+
super();
|
|
349
|
+
}
|
|
350
|
+
connectedCallback() {
|
|
351
|
+
super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
customElements.get("px-vstack") || customElements.define("px-vstack", A);
|
|
355
|
+
class C extends l {
|
|
356
|
+
constructor() {
|
|
357
|
+
super();
|
|
358
|
+
}
|
|
359
|
+
connectedCallback() {
|
|
360
|
+
super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
customElements.get("px-hstack") || customElements.define("px-hstack", C);
|
|
364
|
+
class $ extends HTMLElement {
|
|
365
|
+
constructor() {
|
|
366
|
+
super();
|
|
367
|
+
}
|
|
368
|
+
static get observedAttributes() {
|
|
369
|
+
return ["grow"];
|
|
370
|
+
}
|
|
371
|
+
attributeChangedCallback(t, i, e) {
|
|
372
|
+
t === "grow" && (this.style.flexGrow = e);
|
|
373
|
+
}
|
|
374
|
+
connectedCallback() {
|
|
375
|
+
this.style.flexGrow = this.getAttribute("grow") || "1";
|
|
376
|
+
}
|
|
377
|
+
get grow() {
|
|
378
|
+
return this.getAttribute("grow");
|
|
379
|
+
}
|
|
380
|
+
set grow(t) {
|
|
381
|
+
this.setAttribute("grow", t);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
customElements.define("px-spacer", $);
|
|
385
|
+
const j = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", g = new CSSStyleSheet();
|
|
386
|
+
g.replaceSync(j);
|
|
387
|
+
class S extends c {
|
|
388
|
+
constructor() {
|
|
389
|
+
super(g), this.template = (t) => `
|
|
390
|
+
<px-container border-radius="none" padding="none">
|
|
391
|
+
<px-vstack>
|
|
392
|
+
<px-container id="header-container" border-radius="none">
|
|
393
|
+
<px-hstack>
|
|
394
|
+
<px-spacer></px-spacer>
|
|
395
|
+
<px-vstack
|
|
396
|
+
id="header-vstack-container"
|
|
397
|
+
gap="1rem"
|
|
398
|
+
grow="${this.grow}"
|
|
399
|
+
basis="${this.basis}"
|
|
400
|
+
>
|
|
401
|
+
<slot name="header-container"></slot>
|
|
402
|
+
</px-vstack>
|
|
403
|
+
<px-spacer></px-spacer>
|
|
404
|
+
</px-hstack>
|
|
405
|
+
</px-container>
|
|
406
|
+
<px-container
|
|
407
|
+
id="image-container"
|
|
408
|
+
border-radius="none"
|
|
409
|
+
padding="none"
|
|
410
|
+
padding-top="xl"
|
|
411
|
+
id="image-box"
|
|
412
|
+
background-size="cover"
|
|
413
|
+
background-position="top center"
|
|
414
|
+
padding-bottom="xl"
|
|
415
|
+
border-radius="none"
|
|
416
|
+
bgimg="${this.backgroundImage}"
|
|
417
|
+
>
|
|
418
|
+
<px-hstack>
|
|
419
|
+
<px-spacer></px-spacer>
|
|
420
|
+
<px-vstack grow="${this.grow}" basis="${this.basis}">
|
|
421
|
+
<slot name="image-container"></slot>
|
|
422
|
+
</px-vstack>
|
|
423
|
+
<px-spacer></px-spacer>
|
|
424
|
+
</px-hstack>
|
|
425
|
+
</px-container>
|
|
426
|
+
${t ? ` <px-hstack>
|
|
427
|
+
<px-spacer></px-spacer>
|
|
428
|
+
<px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
|
|
429
|
+
<px-vstack gap="1rem">
|
|
430
|
+
<slot name="image-sticky-container"></slot>
|
|
431
|
+
</px-vstack>
|
|
432
|
+
</px-container>
|
|
433
|
+
<px-spacer></px-spacer>
|
|
434
|
+
</px-hstack>` : ""}
|
|
435
|
+
<px-container
|
|
436
|
+
id="body-container"
|
|
437
|
+
id="main"
|
|
438
|
+
background-color="${this.backgroundColor}"
|
|
439
|
+
padding="none"
|
|
440
|
+
padding-top="xl"
|
|
441
|
+
padding-bottom="xl"
|
|
442
|
+
>
|
|
443
|
+
<px-hstack>
|
|
444
|
+
<px-spacer></px-spacer>
|
|
445
|
+
<px-vstack
|
|
446
|
+
id="body-vstack-container"
|
|
447
|
+
gap="3rem"
|
|
448
|
+
grow="${this.grow}"
|
|
449
|
+
basis="${this.basis}"
|
|
450
|
+
>
|
|
451
|
+
<slot name="body-container"></slot>
|
|
452
|
+
</px-vstack>
|
|
453
|
+
<px-spacer></px-spacer>
|
|
454
|
+
</px-hstack>
|
|
455
|
+
</px-container>
|
|
456
|
+
<px-container
|
|
457
|
+
id="contact-container"
|
|
458
|
+
border-radius="none"
|
|
459
|
+
id="main"
|
|
460
|
+
background-color="surface-default"
|
|
461
|
+
padding="none"
|
|
462
|
+
padding-top="xl"
|
|
463
|
+
padding-bottom="xl"
|
|
464
|
+
>
|
|
465
|
+
<px-hstack>
|
|
466
|
+
<px-spacer></px-spacer>
|
|
467
|
+
<px-vstack gap="3rem" grow="${this.grow}" basis="${this.basis}">
|
|
468
|
+
<slot name="contact-container"></slot>
|
|
469
|
+
</px-vstack>
|
|
470
|
+
<px-spacer></px-spacer>
|
|
471
|
+
</px-hstack>
|
|
472
|
+
</px-container>
|
|
473
|
+
<px-container
|
|
474
|
+
id="footer-container"
|
|
475
|
+
background-color="none"
|
|
476
|
+
border-radius="none"
|
|
477
|
+
style="background-color: rgb(108, 66, 156)"
|
|
478
|
+
padding-top="xl"
|
|
479
|
+
padding-bottom="xl"
|
|
480
|
+
>
|
|
481
|
+
<px-hstack>
|
|
482
|
+
<px-spacer></px-spacer>
|
|
483
|
+
<px-vstack gap="3rem" grow="${this.grow}" basis="${this.basis}">
|
|
484
|
+
<slot name="footer-container"></slot>
|
|
485
|
+
</px-vstack>
|
|
486
|
+
<px-spacer></px-spacer>
|
|
487
|
+
</px-hstack>
|
|
488
|
+
</px-container>
|
|
489
|
+
</px-vstack>
|
|
490
|
+
</px-container>
|
|
491
|
+
`, this.shadowRoot.innerHTML = this.template(!!this.$imageStickySlot);
|
|
492
|
+
}
|
|
493
|
+
static get observedAttributes() {
|
|
494
|
+
return [
|
|
495
|
+
...super.observedAttributes,
|
|
496
|
+
"background-image",
|
|
497
|
+
"gap",
|
|
498
|
+
"background-color",
|
|
499
|
+
"padding-vertical",
|
|
500
|
+
"padding-horizontal"
|
|
501
|
+
];
|
|
502
|
+
}
|
|
503
|
+
get $wideImage() {
|
|
504
|
+
return this.shadowRoot.querySelector("#image-box");
|
|
505
|
+
}
|
|
506
|
+
get $bodyVStackContainer() {
|
|
507
|
+
return this.shadowRoot.querySelector("#header-vstack-container");
|
|
508
|
+
}
|
|
509
|
+
get $bodyContainer() {
|
|
510
|
+
return this.shadowRoot.querySelector("#body-container");
|
|
511
|
+
}
|
|
512
|
+
get $contactContainer() {
|
|
513
|
+
return this.shadowRoot.querySelector("#contact-container");
|
|
514
|
+
}
|
|
515
|
+
get $footerContainer() {
|
|
516
|
+
return this.shadowRoot.querySelector("#footer-container");
|
|
517
|
+
}
|
|
518
|
+
get $headerContainer() {
|
|
519
|
+
return this.shadowRoot.querySelector("#header-container");
|
|
520
|
+
}
|
|
521
|
+
get $imageContainer() {
|
|
522
|
+
return this.shadowRoot.querySelector("#image-container");
|
|
523
|
+
}
|
|
524
|
+
get backgroundImage() {
|
|
525
|
+
return this.getAttribute("background-image");
|
|
526
|
+
}
|
|
527
|
+
get $imageStickySlot() {
|
|
528
|
+
return this.querySelector('*[slot="image-sticky-container"]');
|
|
529
|
+
}
|
|
530
|
+
get $main() {
|
|
531
|
+
return this.shadowRoot.querySelector("#main");
|
|
532
|
+
}
|
|
533
|
+
get backgroundColor() {
|
|
534
|
+
return this.getAttribute("background-color") || "none";
|
|
535
|
+
}
|
|
536
|
+
get paddingVertical() {
|
|
537
|
+
return this.getAttribute("padding-vertical");
|
|
538
|
+
}
|
|
539
|
+
get paddingHorizontal() {
|
|
540
|
+
return this.getAttribute("padding-horizontal");
|
|
541
|
+
}
|
|
542
|
+
set paddingVertical(t) {
|
|
543
|
+
this.setAttribute("padding-vertical", t);
|
|
544
|
+
}
|
|
545
|
+
set paddingHorizontal(t) {
|
|
546
|
+
this.setAttribute("padding-horizontal", t);
|
|
547
|
+
}
|
|
548
|
+
get gap() {
|
|
549
|
+
return this.getAttribute("gap");
|
|
550
|
+
}
|
|
551
|
+
connectedCallback() {
|
|
552
|
+
this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
|
|
553
|
+
}
|
|
554
|
+
attributeChangedCallback(t, i, e) {
|
|
555
|
+
if (i !== e)
|
|
556
|
+
switch (t) {
|
|
557
|
+
case "background-image":
|
|
558
|
+
this.$imageContainer.setAttribute("background-image", e);
|
|
559
|
+
break;
|
|
560
|
+
case "gap":
|
|
561
|
+
this.$bodyVStackContainer.setAttribute("gap", e);
|
|
562
|
+
break;
|
|
563
|
+
case "background-color":
|
|
564
|
+
this.$bodyContainer.setAttribute(
|
|
565
|
+
"background-color",
|
|
566
|
+
x.indexOf(e) > 0 ? e : "none"
|
|
567
|
+
);
|
|
568
|
+
break;
|
|
569
|
+
case "padding-vertical":
|
|
570
|
+
this.handlePaddingVerticalChange(e);
|
|
571
|
+
break;
|
|
572
|
+
case "padding-horizontal":
|
|
573
|
+
this.handlePaddingHorizontalChange(e);
|
|
574
|
+
break;
|
|
575
|
+
default:
|
|
576
|
+
super.attributeChangedCallback(t, i, e);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
handlePaddingVerticalChange(t) {
|
|
580
|
+
this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
|
|
581
|
+
}
|
|
582
|
+
handlePaddingHorizontalChange(t) {
|
|
583
|
+
this.$headerContainer.paddingLeft = t, this.$headerContainer.paddingRight = t, this.$bodyContainer.paddingLeft = t, this.$bodyContainer.paddingRight = t, this.$contactContainer.paddingLeft = t, this.$contactContainer.paddingRight = t, this.$footerContainer.paddingLeft = t, this.$footerContainer.paddingRight = t, this.$imageContainer.paddingLeft = t, this.$imageContainer.paddingRight = t;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
customElements.get("px-page") === void 0 && customElements.define("px-page", S);
|
|
587
|
+
export {
|
|
588
|
+
C as HStack,
|
|
589
|
+
S as Page,
|
|
590
|
+
$ as Spacer,
|
|
591
|
+
l as Stack,
|
|
592
|
+
A as VStack,
|
|
593
|
+
v as alignItemsValues,
|
|
594
|
+
m as directionValues,
|
|
595
|
+
k as justifyContentValues,
|
|
596
|
+
y as overflowValues,
|
|
597
|
+
w as wrapValues
|
|
598
|
+
};
|
package/package.json
CHANGED
|
@@ -1,40 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-layout",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.20",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": {
|
|
8
|
-
"types": "./src/index.ts",
|
|
9
|
-
"development": "./src/index.ts",
|
|
10
|
-
"default": "./dist/index.js"
|
|
11
|
-
},
|
|
12
|
-
"./src/*.css": {
|
|
13
|
-
"development": "src/*.css"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
5
|
+
"main": "dist/index.es.js",
|
|
16
6
|
"files": [
|
|
17
|
-
"dist
|
|
7
|
+
"dist"
|
|
18
8
|
],
|
|
19
9
|
"type": "module",
|
|
20
10
|
"scripts": {
|
|
21
|
-
"
|
|
11
|
+
"transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
|
|
12
|
+
"clean": "rm -rf dist",
|
|
13
|
+
"build": "npm run clean && tsc && NODE_ENV=development vite build && npm run transform-package-json",
|
|
22
14
|
"test": "vitest run --coverage"
|
|
23
15
|
},
|
|
24
16
|
"publishConfig": {
|
|
25
17
|
"access": "public"
|
|
26
18
|
},
|
|
27
|
-
"gitHead": "
|
|
28
|
-
"lerna": {
|
|
29
|
-
"command": {
|
|
30
|
-
"publish": {
|
|
31
|
-
"assets": [
|
|
32
|
-
"CHANGELOG.md",
|
|
33
|
-
"package.json",
|
|
34
|
-
"dist/*.js",
|
|
35
|
-
"dist/css/**/*.css"
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
19
|
+
"gitHead": "460ebd4c7e0171baabc0871a7058f475b5c9adbb"
|
|
40
20
|
}
|
package/dist/index.js
DELETED
|
@@ -1,607 +0,0 @@
|
|
|
1
|
-
import { WithFlexAttributes as o, bgColorValues as p } from "@proximus/lavender-common";
|
|
2
|
-
const c = ".flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction-mobile-value);gap:var(--flex-gap-mobile-value);flex-wrap:var(--flex-wrap-mobile-value);justify-content:var(--flex-justify-content-mobile-value);align-items:var(--flex-align-items-mobile-value)}@media screen and (min-width: 768px){.flex-container{flex-direction:var(--flex-direction-tablet-value);gap:var(--flex-gap-tablet-value);flex-wrap:var(--flex-wrap-tablet-value);justify-content:var(--flex-justify-content-tablet-value);align-items:var(--flex-align-items-tablet-value)}}@media screen and (min-width: 1025px){.flex-container{flex-direction:var(--flex-direction-laptop-value);gap:var(--flex-gap-laptop-value);flex-wrap:var(--flex-wrap-laptop-value);justify-content:var(--flex-justify-content-laptop-value);align-items:var(--flex-align-items-laptop-value)}}@media screen and (min-width: 1441px){.flex-container{flex-direction:var(--flex-direction-desktop-value);gap:var(--flex-gap-desktop-value);flex-wrap:var(--flex-wrap-desktop-value);justify-content:var(--flex-justify-content-desktop-value);align-items:var(--flex-align-items-desktop-value)}}", s = new CSSStyleSheet();
|
|
3
|
-
s.replaceSync(c);
|
|
4
|
-
const g = [
|
|
5
|
-
// Vertical
|
|
6
|
-
"between-section-vertical",
|
|
7
|
-
"between-options-vertical",
|
|
8
|
-
"under-text-vertical",
|
|
9
|
-
"display-to-subtitle-vertical",
|
|
10
|
-
"under-display-vertical",
|
|
11
|
-
"component-default-vertical",
|
|
12
|
-
"component-expanded-vertical",
|
|
13
|
-
"between-section-vertical-mobile",
|
|
14
|
-
"between-options-vertical-mobile",
|
|
15
|
-
"under-text-vertical-mobile",
|
|
16
|
-
"display-to-subtitle-vertical-mobile",
|
|
17
|
-
"under-display-vertical-mobile",
|
|
18
|
-
"component-default-vertical-mobile",
|
|
19
|
-
"component-expanded-vertical-mobile",
|
|
20
|
-
// Horizontal
|
|
21
|
-
"between-icon-horizontal",
|
|
22
|
-
"text-to-icon-compact-horizontal",
|
|
23
|
-
"text-to-icon-horizontal",
|
|
24
|
-
"component-compact-horizontal",
|
|
25
|
-
"component-default-horizontal",
|
|
26
|
-
"component-expanded-horizontal",
|
|
27
|
-
"between-icon-horizontal-mobile",
|
|
28
|
-
"text-to-icon-compact-horizontal-mobile",
|
|
29
|
-
"text-to-icon-horizontal-mobile",
|
|
30
|
-
"component-compact-horizontal-mobile",
|
|
31
|
-
"component-default-horizontal-mobile"
|
|
32
|
-
];
|
|
33
|
-
class r extends o {
|
|
34
|
-
constructor() {
|
|
35
|
-
super(s), this.template = `<div class="flex-container">
|
|
36
|
-
<slot></slot>
|
|
37
|
-
</div>`, this.shadowRoot.innerHTML = this.template;
|
|
38
|
-
}
|
|
39
|
-
connectedCallback() {
|
|
40
|
-
this.hasAttribute("direction") || (this.direction = "row");
|
|
41
|
-
}
|
|
42
|
-
static get observedAttributes() {
|
|
43
|
-
return [
|
|
44
|
-
...super.observedAttributes,
|
|
45
|
-
"direction",
|
|
46
|
-
"direction-mobile",
|
|
47
|
-
"direction-tablet",
|
|
48
|
-
"direction-laptop",
|
|
49
|
-
"direction-desktop",
|
|
50
|
-
"gap",
|
|
51
|
-
"gap-mobile",
|
|
52
|
-
"gap-tablet",
|
|
53
|
-
"gap-laptop",
|
|
54
|
-
"gap-desktop",
|
|
55
|
-
"justify-content",
|
|
56
|
-
"justify-content-mobile",
|
|
57
|
-
"justify-content-tablet",
|
|
58
|
-
"justify-content-laptop",
|
|
59
|
-
"justify-content-desktop",
|
|
60
|
-
"align-items",
|
|
61
|
-
"align-items-mobile",
|
|
62
|
-
"align-items-tablet",
|
|
63
|
-
"align-items-laptop",
|
|
64
|
-
"align-items-desktop",
|
|
65
|
-
"wrap",
|
|
66
|
-
"wrap-mobile",
|
|
67
|
-
"wrap-tablet",
|
|
68
|
-
"wrap-laptop",
|
|
69
|
-
"wrap-desktop"
|
|
70
|
-
];
|
|
71
|
-
}
|
|
72
|
-
attributeChangedCallback(t, i, e) {
|
|
73
|
-
if (t.indexOf("direction") > -1 && !["column", "row"].includes(e))
|
|
74
|
-
throw new Error("Invalid direction");
|
|
75
|
-
switch (t) {
|
|
76
|
-
case "gap":
|
|
77
|
-
this.$el.style.getPropertyValue("--flex-gap-mobile-value") || this.$el.style.setProperty(
|
|
78
|
-
"--flex-gap-mobile-value",
|
|
79
|
-
this.getGapCSSVariable(e)
|
|
80
|
-
), this.$el.style.getPropertyValue("--flex-gap-tablet-value") || this.$el.style.setProperty(
|
|
81
|
-
"--flex-gap-tablet-value",
|
|
82
|
-
this.getGapCSSVariable(e)
|
|
83
|
-
), this.$el.style.getPropertyValue("--flex-gap-laptop-value") || this.$el.style.setProperty(
|
|
84
|
-
"--flex-gap-laptop-value",
|
|
85
|
-
this.getGapCSSVariable(e)
|
|
86
|
-
), this.$el.style.getPropertyValue("--flex-gap-desktop-value") || this.$el.style.setProperty(
|
|
87
|
-
"--flex-gap-desktop-value",
|
|
88
|
-
this.getGapCSSVariable(e)
|
|
89
|
-
);
|
|
90
|
-
break;
|
|
91
|
-
case "gap-mobile":
|
|
92
|
-
case "gap-tablet":
|
|
93
|
-
case "gap-laptop":
|
|
94
|
-
case "gap-desktop":
|
|
95
|
-
this.$el.style.setProperty(
|
|
96
|
-
`--flex-${t}-value`,
|
|
97
|
-
this.getGapCSSVariable(e)
|
|
98
|
-
);
|
|
99
|
-
break;
|
|
100
|
-
case "direction":
|
|
101
|
-
this.$el.style.getPropertyValue("--flex-direction-mobile-value") || this.$el.style.setProperty("--flex-direction-mobile-value", e), this.$el.style.getPropertyValue("--flex-direction-tablet-value") || this.$el.style.setProperty("--flex-direction-tablet-value", e), this.$el.style.getPropertyValue("--flex-direction-laptop-value") || this.$el.style.setProperty("--flex-direction-laptop-value", e), this.$el.style.getPropertyValue("--flex-direction-desktop-value") || this.$el.style.setProperty(
|
|
102
|
-
"--flex-direction-desktop-value",
|
|
103
|
-
e
|
|
104
|
-
);
|
|
105
|
-
break;
|
|
106
|
-
case "justify-content":
|
|
107
|
-
this.$el.style.getPropertyValue(
|
|
108
|
-
"--flex-justify-content-mobile-value"
|
|
109
|
-
) || this.$el.style.setProperty(
|
|
110
|
-
"--flex-justify-content-mobile-value",
|
|
111
|
-
e
|
|
112
|
-
), this.$el.style.getPropertyValue(
|
|
113
|
-
"--flex-justify-content-tablet-value"
|
|
114
|
-
) || this.$el.style.setProperty(
|
|
115
|
-
"--flex-justify-content-tablet-value",
|
|
116
|
-
e
|
|
117
|
-
), this.$el.style.getPropertyValue(
|
|
118
|
-
"--flex-justify-content-laptop-value"
|
|
119
|
-
) || this.$el.style.setProperty(
|
|
120
|
-
"--flex-justify-content-laptop-value",
|
|
121
|
-
e
|
|
122
|
-
), this.$el.style.getPropertyValue(
|
|
123
|
-
"--flex-justify-content-desktop-value"
|
|
124
|
-
) || this.$el.style.setProperty(
|
|
125
|
-
"--flex-justify-content-desktop-value",
|
|
126
|
-
e
|
|
127
|
-
);
|
|
128
|
-
break;
|
|
129
|
-
case "align-items":
|
|
130
|
-
this.$el.style.getPropertyValue("--flex-align-items-mobile-value") || this.$el.style.setProperty(
|
|
131
|
-
"--flex-align-items-mobile-value",
|
|
132
|
-
e
|
|
133
|
-
), this.$el.style.getPropertyValue("--flex-align-items-tablet-value") || this.$el.style.setProperty(
|
|
134
|
-
"--flex-align-items-tablet-value",
|
|
135
|
-
e
|
|
136
|
-
), this.$el.style.getPropertyValue("--flex-align-items-laptop-value") || this.$el.style.setProperty(
|
|
137
|
-
"--flex-align-items-laptop-value",
|
|
138
|
-
e
|
|
139
|
-
), this.$el.style.getPropertyValue("--flex-align-items-desktop-value") || this.$el.style.setProperty(
|
|
140
|
-
"--flex-align-items-desktop-value",
|
|
141
|
-
e
|
|
142
|
-
);
|
|
143
|
-
break;
|
|
144
|
-
case "wrap":
|
|
145
|
-
this.$el.style.getPropertyValue("--flex-wrap-mobile-value") || this.$el.style.setProperty("--flex-wrap-mobile-value", e), this.$el.style.getPropertyValue("--flex-wrap-tablet-value") || this.$el.style.setProperty("--flex-wrap-tablet-value", e), this.$el.style.getPropertyValue("--flex-wrap-laptop-value") || this.$el.style.setProperty("--flex-wrap-laptop-value", e), this.$el.style.getPropertyValue("--flex-wrap-desktop-value") || this.$el.style.setProperty("--flex-wrap-desktop-value", e);
|
|
146
|
-
break;
|
|
147
|
-
case "direction-mobile":
|
|
148
|
-
case "direction-tablet":
|
|
149
|
-
case "direction-laptop":
|
|
150
|
-
case "direction-desktop":
|
|
151
|
-
case "justify-content-mobile":
|
|
152
|
-
case "justify-content-tablet":
|
|
153
|
-
case "justify-content-laptop":
|
|
154
|
-
case "justify-content-desktop":
|
|
155
|
-
case "align-items-mobile":
|
|
156
|
-
case "align-items-tablet":
|
|
157
|
-
case "align-items-laptop":
|
|
158
|
-
case "align-items-desktop":
|
|
159
|
-
case "wrap-mobile":
|
|
160
|
-
case "wrap-tablet":
|
|
161
|
-
case "wrap-laptop":
|
|
162
|
-
case "wrap-desktop":
|
|
163
|
-
this.$el.style.setProperty(`--flex-${t}-value`, e);
|
|
164
|
-
break;
|
|
165
|
-
default:
|
|
166
|
-
super.attributeChangedCallback(t, i, e);
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
getGapCSSVariable(t) {
|
|
171
|
-
return g.includes(t) ? `var(--px-spacing-${t})` : t;
|
|
172
|
-
}
|
|
173
|
-
get direction() {
|
|
174
|
-
return this.getAttribute("direction");
|
|
175
|
-
}
|
|
176
|
-
set direction(t) {
|
|
177
|
-
this.setAttribute("direction", t);
|
|
178
|
-
}
|
|
179
|
-
get directionMobile() {
|
|
180
|
-
return this.getAttribute("direction-mobile");
|
|
181
|
-
}
|
|
182
|
-
set directionMobile(t) {
|
|
183
|
-
this.setAttribute("direction-mobile", t);
|
|
184
|
-
}
|
|
185
|
-
get directionTablet() {
|
|
186
|
-
return this.getAttribute("direction-tablet");
|
|
187
|
-
}
|
|
188
|
-
set directionTablet(t) {
|
|
189
|
-
this.setAttribute("direction-tablet", t);
|
|
190
|
-
}
|
|
191
|
-
get directionLaptop() {
|
|
192
|
-
return this.getAttribute("direction-laptop");
|
|
193
|
-
}
|
|
194
|
-
set directionLaptop(t) {
|
|
195
|
-
this.setAttribute("direction-laptop", t);
|
|
196
|
-
}
|
|
197
|
-
get directionDesktop() {
|
|
198
|
-
return this.getAttribute("direction-desktop");
|
|
199
|
-
}
|
|
200
|
-
set directionDesktop(t) {
|
|
201
|
-
this.setAttribute("direction-desktop", t);
|
|
202
|
-
}
|
|
203
|
-
get gap() {
|
|
204
|
-
return this.getAttribute("gap");
|
|
205
|
-
}
|
|
206
|
-
set gap(t) {
|
|
207
|
-
this.setAttribute("gap", t);
|
|
208
|
-
}
|
|
209
|
-
get gapMobile() {
|
|
210
|
-
return this.getAttribute("gap-mobile");
|
|
211
|
-
}
|
|
212
|
-
set gapMobile(t) {
|
|
213
|
-
this.setAttribute("gap-mobile", t);
|
|
214
|
-
}
|
|
215
|
-
get gapTablet() {
|
|
216
|
-
return this.getAttribute("gap-tablet");
|
|
217
|
-
}
|
|
218
|
-
set gapTablet(t) {
|
|
219
|
-
this.setAttribute("gap-tablet", t);
|
|
220
|
-
}
|
|
221
|
-
get gapLaptop() {
|
|
222
|
-
return this.getAttribute("gap-laptop");
|
|
223
|
-
}
|
|
224
|
-
set gapLaptop(t) {
|
|
225
|
-
this.setAttribute("gap-laptop", t);
|
|
226
|
-
}
|
|
227
|
-
get justifyContent() {
|
|
228
|
-
return this.getAttribute("justify-content");
|
|
229
|
-
}
|
|
230
|
-
set justifyContent(t) {
|
|
231
|
-
this.setAttribute("justify-content", t);
|
|
232
|
-
}
|
|
233
|
-
get justifyContentMobile() {
|
|
234
|
-
return this.getAttribute("justify-content-mobile");
|
|
235
|
-
}
|
|
236
|
-
set justifyContentMobile(t) {
|
|
237
|
-
this.setAttribute("justify-content-mobile", t);
|
|
238
|
-
}
|
|
239
|
-
get justifyContentTablet() {
|
|
240
|
-
return this.getAttribute("justify-content-tablet");
|
|
241
|
-
}
|
|
242
|
-
set justifyContentTablet(t) {
|
|
243
|
-
this.setAttribute("justify-content-tablet", t);
|
|
244
|
-
}
|
|
245
|
-
get justifyContentLaptop() {
|
|
246
|
-
return this.getAttribute("justify-content-laptop");
|
|
247
|
-
}
|
|
248
|
-
set justifyContentLaptop(t) {
|
|
249
|
-
this.setAttribute("justify-content-laptop", t);
|
|
250
|
-
}
|
|
251
|
-
get justifyContentDesktop() {
|
|
252
|
-
return this.getAttribute("justify-content-desktop");
|
|
253
|
-
}
|
|
254
|
-
set justifyContentDesktop(t) {
|
|
255
|
-
this.setAttribute("justify-content-desktop", t);
|
|
256
|
-
}
|
|
257
|
-
get alignItems() {
|
|
258
|
-
return this.getAttribute("align-items");
|
|
259
|
-
}
|
|
260
|
-
set alignItems(t) {
|
|
261
|
-
this.setAttribute("align-items", t);
|
|
262
|
-
}
|
|
263
|
-
get alignItemsMobile() {
|
|
264
|
-
return this.getAttribute("align-items-mobile");
|
|
265
|
-
}
|
|
266
|
-
set alignItemsMobile(t) {
|
|
267
|
-
this.setAttribute("align-items-mobile", t);
|
|
268
|
-
}
|
|
269
|
-
get alignItemsTablet() {
|
|
270
|
-
return this.getAttribute("align-items-tablet");
|
|
271
|
-
}
|
|
272
|
-
set alignItemsTablet(t) {
|
|
273
|
-
this.setAttribute("align-items-tablet", t);
|
|
274
|
-
}
|
|
275
|
-
get alignItemsLaptop() {
|
|
276
|
-
return this.getAttribute("align-items-laptop");
|
|
277
|
-
}
|
|
278
|
-
set alignItemsLaptop(t) {
|
|
279
|
-
this.setAttribute("align-items-laptop", t);
|
|
280
|
-
}
|
|
281
|
-
get alignItemsDesktop() {
|
|
282
|
-
return this.getAttribute("align-items-desktop");
|
|
283
|
-
}
|
|
284
|
-
set alignItemsDesktop(t) {
|
|
285
|
-
this.setAttribute("align-items-desktop", t);
|
|
286
|
-
}
|
|
287
|
-
get wrap() {
|
|
288
|
-
return this.getAttribute("wrap");
|
|
289
|
-
}
|
|
290
|
-
set wrap(t) {
|
|
291
|
-
this.setAttribute("wrap", t);
|
|
292
|
-
}
|
|
293
|
-
get wrapMobile() {
|
|
294
|
-
return this.getAttribute("wrap-mobile");
|
|
295
|
-
}
|
|
296
|
-
set wrapMobile(t) {
|
|
297
|
-
this.setAttribute("wrap-mobile", t);
|
|
298
|
-
}
|
|
299
|
-
get wrapTablet() {
|
|
300
|
-
return this.getAttribute("wrap-tablet");
|
|
301
|
-
}
|
|
302
|
-
set wrapTablet(t) {
|
|
303
|
-
this.setAttribute("wrap-tablet", t);
|
|
304
|
-
}
|
|
305
|
-
get wrapLaptop() {
|
|
306
|
-
return this.getAttribute("wrap-laptop");
|
|
307
|
-
}
|
|
308
|
-
set wrapLaptop(t) {
|
|
309
|
-
this.setAttribute("wrap-laptop", t);
|
|
310
|
-
}
|
|
311
|
-
get wrapDesktop() {
|
|
312
|
-
return this.getAttribute("wrap-desktop");
|
|
313
|
-
}
|
|
314
|
-
set wrapDesktop(t) {
|
|
315
|
-
this.setAttribute("wrap-desktop", t);
|
|
316
|
-
}
|
|
317
|
-
get $el() {
|
|
318
|
-
return this.shadowRoot.querySelector(".flex-container");
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
customElements.get("px-stack") || customElements.define("px-stack", r);
|
|
322
|
-
class d extends r {
|
|
323
|
-
constructor() {
|
|
324
|
-
super();
|
|
325
|
-
}
|
|
326
|
-
connectedCallback() {
|
|
327
|
-
super.connectedCallback(), this.direction = "column", this.directionMobile = "column", this.directionTablet = "column", this.directionLaptop = "column", this.directionDesktop = "column";
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
customElements.get("px-vstack") || customElements.define("px-vstack", d);
|
|
331
|
-
class b extends r {
|
|
332
|
-
constructor() {
|
|
333
|
-
super();
|
|
334
|
-
}
|
|
335
|
-
connectedCallback() {
|
|
336
|
-
super.connectedCallback(), this.direction = "row", this.directionMobile = "row", this.directionTablet = "row", this.directionLaptop = "row", this.directionDesktop = "row";
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
customElements.get("px-hstack") || customElements.define("px-hstack", b);
|
|
340
|
-
class u extends HTMLElement {
|
|
341
|
-
constructor() {
|
|
342
|
-
super();
|
|
343
|
-
}
|
|
344
|
-
static get observedAttributes() {
|
|
345
|
-
return ["grow"];
|
|
346
|
-
}
|
|
347
|
-
attributeChangedCallback(t, i, e) {
|
|
348
|
-
t === "grow" && (this.style.flexGrow = e);
|
|
349
|
-
}
|
|
350
|
-
connectedCallback() {
|
|
351
|
-
this.style.flexGrow = this.getAttribute("grow") || "1";
|
|
352
|
-
}
|
|
353
|
-
get grow() {
|
|
354
|
-
return this.getAttribute("grow");
|
|
355
|
-
}
|
|
356
|
-
set grow(t) {
|
|
357
|
-
this.setAttribute("grow", t);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
customElements.define("px-spacer", u);
|
|
361
|
-
const h = "slot[name=heading]{display:block;margin-top:1rem;margin-bottom:1rem}", n = new CSSStyleSheet();
|
|
362
|
-
n.replaceSync(h);
|
|
363
|
-
class m extends o {
|
|
364
|
-
constructor() {
|
|
365
|
-
super(n), this.template = `
|
|
366
|
-
<section>
|
|
367
|
-
<slot name="heading"></slot>
|
|
368
|
-
<px-stack direction="column" gap="1rem">
|
|
369
|
-
<slot></slot>
|
|
370
|
-
</px-stack>
|
|
371
|
-
</section>`, this.shadowRoot.innerHTML = this.template;
|
|
372
|
-
}
|
|
373
|
-
static get observedAttributes() {
|
|
374
|
-
return [...super.observedAttributes, "gap"];
|
|
375
|
-
}
|
|
376
|
-
attributeChangedCallback(t, i, e) {
|
|
377
|
-
if (t === "gap" && i !== e) {
|
|
378
|
-
this.$el.gap = e;
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
super.attributeChangedCallback(t, i, e);
|
|
382
|
-
}
|
|
383
|
-
get gap() {
|
|
384
|
-
return this.getAttribute("gap");
|
|
385
|
-
}
|
|
386
|
-
set gap(t) {
|
|
387
|
-
this.setAttribute("gap", t);
|
|
388
|
-
}
|
|
389
|
-
get $el() {
|
|
390
|
-
return this.shadowRoot.querySelector('px-stack[direction="column"]');
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
customElements.define("px-section-damien", m);
|
|
394
|
-
const x = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5rem}", l = new CSSStyleSheet();
|
|
395
|
-
l.replaceSync(x);
|
|
396
|
-
class f extends o {
|
|
397
|
-
constructor() {
|
|
398
|
-
super(l), this.template = (t) => `
|
|
399
|
-
<px-container border-radius="none" padding="none">
|
|
400
|
-
<px-vstack>
|
|
401
|
-
<px-container id="header-container" border-radius="none">
|
|
402
|
-
<px-hstack>
|
|
403
|
-
<px-spacer></px-spacer>
|
|
404
|
-
<px-vstack
|
|
405
|
-
id="header-vstack-container"
|
|
406
|
-
gap="1rem"
|
|
407
|
-
grow="${this.grow}"
|
|
408
|
-
basis="${this.basis}"
|
|
409
|
-
>
|
|
410
|
-
<slot name="header-container"></slot>
|
|
411
|
-
</px-vstack>
|
|
412
|
-
<px-spacer></px-spacer>
|
|
413
|
-
</px-hstack>
|
|
414
|
-
</px-container>
|
|
415
|
-
<px-container
|
|
416
|
-
id="image-container"
|
|
417
|
-
border-radius="none"
|
|
418
|
-
padding="none"
|
|
419
|
-
padding-top="xl"
|
|
420
|
-
id="image-box"
|
|
421
|
-
background-size="cover"
|
|
422
|
-
background-position="top center"
|
|
423
|
-
padding-bottom="xl"
|
|
424
|
-
border-radius="none"
|
|
425
|
-
bgimg="${this.backgroundImage}"
|
|
426
|
-
>
|
|
427
|
-
<px-hstack>
|
|
428
|
-
<px-spacer></px-spacer>
|
|
429
|
-
<px-vstack grow="${this.grow}" basis="${this.basis}">
|
|
430
|
-
<slot name="image-container"></slot>
|
|
431
|
-
</px-vstack>
|
|
432
|
-
<px-spacer></px-spacer>
|
|
433
|
-
</px-hstack>
|
|
434
|
-
</px-container>
|
|
435
|
-
${t ? ` <px-hstack>
|
|
436
|
-
<px-spacer></px-spacer>
|
|
437
|
-
<px-container border-radius="none" box-shadow="xl" id="image-sticky-box" border="s" grow="${this.grow}" basis="${this.basis}" border-radius="m">
|
|
438
|
-
<px-vstack gap="1rem">
|
|
439
|
-
<slot name="image-sticky-container"></slot>
|
|
440
|
-
</px-vstack>
|
|
441
|
-
</px-container>
|
|
442
|
-
<px-spacer></px-spacer>
|
|
443
|
-
</px-hstack>` : ""}
|
|
444
|
-
<px-container
|
|
445
|
-
id="body-container"
|
|
446
|
-
id="main"
|
|
447
|
-
background-color="${this.backgroundColor}"
|
|
448
|
-
padding="none"
|
|
449
|
-
padding-top="xl"
|
|
450
|
-
padding-bottom="xl"
|
|
451
|
-
>
|
|
452
|
-
<px-hstack>
|
|
453
|
-
<px-spacer></px-spacer>
|
|
454
|
-
<px-vstack
|
|
455
|
-
id="body-vstack-container"
|
|
456
|
-
gap="3rem"
|
|
457
|
-
grow="${this.grow}"
|
|
458
|
-
basis="${this.basis}"
|
|
459
|
-
>
|
|
460
|
-
<slot name="body-container"></slot>
|
|
461
|
-
</px-vstack>
|
|
462
|
-
<px-spacer></px-spacer>
|
|
463
|
-
</px-hstack>
|
|
464
|
-
</px-container>
|
|
465
|
-
<px-container
|
|
466
|
-
id="contact-container"
|
|
467
|
-
border-radius="none"
|
|
468
|
-
id="main"
|
|
469
|
-
background-color="weak"
|
|
470
|
-
padding="none"
|
|
471
|
-
padding-top="xl"
|
|
472
|
-
padding-bottom="xl"
|
|
473
|
-
>
|
|
474
|
-
<px-hstack>
|
|
475
|
-
<px-spacer></px-spacer>
|
|
476
|
-
<px-vstack gap="3rem" grow="${this.grow}" basis="${this.basis}">
|
|
477
|
-
<slot name="contact-container"></slot>
|
|
478
|
-
</px-vstack>
|
|
479
|
-
<px-spacer></px-spacer>
|
|
480
|
-
</px-hstack>
|
|
481
|
-
</px-container>
|
|
482
|
-
<px-container
|
|
483
|
-
id="footer-container"
|
|
484
|
-
background-color="none"
|
|
485
|
-
border-radius="none"
|
|
486
|
-
style="background-color: rgb(108, 66, 156)"
|
|
487
|
-
padding-top="xl"
|
|
488
|
-
padding-bottom="xl"
|
|
489
|
-
>
|
|
490
|
-
<px-hstack>
|
|
491
|
-
<px-spacer></px-spacer>
|
|
492
|
-
<px-vstack gap="3rem" grow="${this.grow}" basis="${this.basis}">
|
|
493
|
-
<slot name="footer-container"></slot>
|
|
494
|
-
</px-vstack>
|
|
495
|
-
<px-spacer></px-spacer>
|
|
496
|
-
</px-hstack>
|
|
497
|
-
</px-container>
|
|
498
|
-
</px-vstack>
|
|
499
|
-
</px-container>
|
|
500
|
-
`, this.shadowRoot.innerHTML = this.template(!!this.$imageStickySlot);
|
|
501
|
-
}
|
|
502
|
-
static get observedAttributes() {
|
|
503
|
-
return [
|
|
504
|
-
...super.observedAttributes,
|
|
505
|
-
"background-image",
|
|
506
|
-
"gap",
|
|
507
|
-
"background-color",
|
|
508
|
-
"padding-vertical",
|
|
509
|
-
"padding-horizontal"
|
|
510
|
-
];
|
|
511
|
-
}
|
|
512
|
-
get $wideImage() {
|
|
513
|
-
return this.shadowRoot.querySelector("#image-box");
|
|
514
|
-
}
|
|
515
|
-
get $bodyVStackContainer() {
|
|
516
|
-
return this.shadowRoot.querySelector("#header-vstack-container");
|
|
517
|
-
}
|
|
518
|
-
get $bodyContainer() {
|
|
519
|
-
return this.shadowRoot.querySelector("#body-container");
|
|
520
|
-
}
|
|
521
|
-
get $contactContainer() {
|
|
522
|
-
return this.shadowRoot.querySelector("#contact-container");
|
|
523
|
-
}
|
|
524
|
-
get $footerContainer() {
|
|
525
|
-
return this.shadowRoot.querySelector("#footer-container");
|
|
526
|
-
}
|
|
527
|
-
get $headerContainer() {
|
|
528
|
-
return this.shadowRoot.querySelector("#header-container");
|
|
529
|
-
}
|
|
530
|
-
get $imageContainer() {
|
|
531
|
-
return this.shadowRoot.querySelector("#image-container");
|
|
532
|
-
}
|
|
533
|
-
get backgroundImage() {
|
|
534
|
-
return this.getAttribute("background-image");
|
|
535
|
-
}
|
|
536
|
-
get $imageStickySlot() {
|
|
537
|
-
return this.querySelector('*[slot="image-sticky-container"]');
|
|
538
|
-
}
|
|
539
|
-
get $main() {
|
|
540
|
-
return this.shadowRoot.querySelector("#main");
|
|
541
|
-
}
|
|
542
|
-
get backgroundColor() {
|
|
543
|
-
return this.getAttribute("background-color") || "none";
|
|
544
|
-
}
|
|
545
|
-
get paddingVertical() {
|
|
546
|
-
return this.getAttribute("padding-vertical");
|
|
547
|
-
}
|
|
548
|
-
get paddingHorizontal() {
|
|
549
|
-
return this.getAttribute("padding-horizontal");
|
|
550
|
-
}
|
|
551
|
-
set paddingVertical(t) {
|
|
552
|
-
this.setAttribute("padding-vertical", t);
|
|
553
|
-
}
|
|
554
|
-
set paddingHorizontal(t) {
|
|
555
|
-
this.setAttribute("padding-horizontal", t);
|
|
556
|
-
}
|
|
557
|
-
get gap() {
|
|
558
|
-
return this.getAttribute("gap");
|
|
559
|
-
}
|
|
560
|
-
connectedCallback() {
|
|
561
|
-
this.handlePaddingVerticalChange(this.paddingVertical), this.handlePaddingHorizontalChange(this.paddingHorizontal);
|
|
562
|
-
}
|
|
563
|
-
attributeChangedCallback(t, i, e) {
|
|
564
|
-
if (i !== e)
|
|
565
|
-
switch (t) {
|
|
566
|
-
case "background-image":
|
|
567
|
-
this.$imageContainer.setAttribute(
|
|
568
|
-
"background-image-mobile",
|
|
569
|
-
e
|
|
570
|
-
);
|
|
571
|
-
break;
|
|
572
|
-
case "gap":
|
|
573
|
-
this.$bodyVStackContainer.setAttribute("gap", e);
|
|
574
|
-
break;
|
|
575
|
-
case "background-color":
|
|
576
|
-
this.$bodyContainer.setAttribute(
|
|
577
|
-
"background-color",
|
|
578
|
-
p.indexOf(e) > 0 ? e : "none"
|
|
579
|
-
);
|
|
580
|
-
break;
|
|
581
|
-
case "padding-vertical":
|
|
582
|
-
this.handlePaddingVerticalChange(e);
|
|
583
|
-
break;
|
|
584
|
-
case "padding-horizontal":
|
|
585
|
-
this.handlePaddingHorizontalChange(e);
|
|
586
|
-
break;
|
|
587
|
-
default:
|
|
588
|
-
super.attributeChangedCallback(t, i, e);
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
handlePaddingVerticalChange(t) {
|
|
592
|
-
this.$headerContainer.setAttribute("padding-top", t), this.$footerContainer.setAttribute("padding-bottom", t);
|
|
593
|
-
}
|
|
594
|
-
handlePaddingHorizontalChange(t) {
|
|
595
|
-
this.$headerContainer.paddingLeft = t, this.$headerContainer.paddingRight = t, this.$bodyContainer.paddingLeft = t, this.$bodyContainer.paddingRight = t, this.$contactContainer.paddingLeft = t, this.$contactContainer.paddingRight = t, this.$footerContainer.paddingLeft = t, this.$footerContainer.paddingRight = t, this.$imageContainer.paddingLeft = t, this.$imageContainer.paddingRight = t;
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
customElements.get("px-page") === void 0 && customElements.define("px-page", f);
|
|
599
|
-
export {
|
|
600
|
-
b as HStack,
|
|
601
|
-
f as Page,
|
|
602
|
-
m as Section,
|
|
603
|
-
u as Spacer,
|
|
604
|
-
r as Stack,
|
|
605
|
-
d as VStack,
|
|
606
|
-
g as gapValues
|
|
607
|
-
};
|