@proximus/lavender-layout 2.0.0-alpha.26 → 2.0.0-alpha.28
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 +18 -15
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WithExtraAttributes as d, AttributeBreakpointHandlerDelegate as u, gapValues as b, checkName as
|
|
2
|
-
const m = ':host{display:block}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.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 (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)}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@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)}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@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))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}',
|
|
3
|
-
|
|
1
|
+
import { WithExtraAttributes as d, AttributeBreakpointHandlerDelegate as u, gapValues as b, checkName as x, log as c, backgroundColorValues as f } from "@proximus/lavender-common";
|
|
2
|
+
const m = ':host{display:block}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-mobile) - var(--host-gap--mobile))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-mobile) + var(--px-focus-offset-mobile))}.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 (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)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-tablet) - var(--host-gap--tablet))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-tablet) + var(--px-focus-offset-tablet))}}@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)}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-laptop) - var(--host-gap--laptop))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-laptop) + var(--px-focus-offset-laptop))}}@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))}:host ::slotted(px-h1[auto-spacing]),:host ::slotted(px-h2[auto-spacing]),:host ::slotted(px-h3[auto-spacing]),:host ::slotted(px-h4[auto-spacing]),:host ::slotted(px-h5[auto-spacing]),:host ::slotted(px-h6[auto-spacing]){margin-bottom:calc(var(--px-spacing-heading-to-content-desktop) - var(--host-gap--desktop))}:host([overflow-x="auto"]){margin:calc(calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop)) * -1)}:host([overflow-x="auto"]) .flex-container{padding:calc(var(--px-focus-outline-desktop) + var(--px-focus-offset-desktop))}}', h = new CSSStyleSheet();
|
|
3
|
+
h.replaceSync(m);
|
|
4
4
|
const v = [
|
|
5
5
|
"",
|
|
6
6
|
"default",
|
|
@@ -28,7 +28,7 @@ const v = [
|
|
|
28
28
|
], y = ["", "default", "nowrap", "wrap", "wrap-reverse"], A = ["", "visible", "hidden", "scroll", "auto"];
|
|
29
29
|
class l extends d {
|
|
30
30
|
constructor() {
|
|
31
|
-
super(
|
|
31
|
+
super(h), this.overflowXAttributeDelegate = new u(
|
|
32
32
|
this,
|
|
33
33
|
"overflow-x",
|
|
34
34
|
(t) => t,
|
|
@@ -130,8 +130,8 @@ class l extends d {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
updateOverflowX(t, i, e, o) {
|
|
133
|
-
if (!
|
|
134
|
-
|
|
133
|
+
if (!x(o, e)) {
|
|
134
|
+
c(
|
|
135
135
|
`${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
136
136
|
);
|
|
137
137
|
return;
|
|
@@ -143,11 +143,11 @@ class l extends d {
|
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
updateFlexProperties(t, i, e, o) {
|
|
146
|
-
this.checkName(o, e) ||
|
|
146
|
+
this.checkName(o, e) || c(
|
|
147
147
|
`${e} is not an allowed ${t} value for ${this.tagName.toLowerCase()}`
|
|
148
148
|
);
|
|
149
|
-
const
|
|
150
|
-
if (!
|
|
149
|
+
const p = t.indexOf("--") > -1, a = p ? t.split("--")[0] : t, s = [];
|
|
150
|
+
if (!p)
|
|
151
151
|
this.getAttribute(a + "--mobile") || s.push("mobile"), this.getAttribute(a + "--tablet") || s.push("tablet"), this.getAttribute(a + "--laptop") || s.push("laptop"), this.getAttribute(a + "--desktop") || s.push("desktop"), s.forEach((r) => {
|
|
152
152
|
this.updateStyle(a, r, i, o), this.updateStyle(a, r, e, o);
|
|
153
153
|
});
|
|
@@ -157,10 +157,13 @@ class l extends d {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
updateStyle(t, i, e, o) {
|
|
160
|
-
e && (t === "gap" && o && o.includes(e) ? this.$el.style.setProperty(
|
|
160
|
+
e && (t === "gap" && o && o.includes(e) ? (this.$el.style.setProperty(
|
|
161
161
|
`--flex-${t}--${i}-value`,
|
|
162
162
|
`var(--px-spacing-${e}-${i === "laptop" ? "desktop" : i})`
|
|
163
|
-
)
|
|
163
|
+
), this.style.setProperty(
|
|
164
|
+
`--host-gap--${i}`,
|
|
165
|
+
`var(--px-spacing-${e}-${i === "laptop" ? "desktop" : i})`
|
|
166
|
+
)) : this.$el.style.setProperty(
|
|
164
167
|
`--flex-${t}--${i}-value`,
|
|
165
168
|
e
|
|
166
169
|
));
|
|
@@ -416,11 +419,11 @@ class S extends HTMLElement {
|
|
|
416
419
|
}
|
|
417
420
|
}
|
|
418
421
|
customElements.get("px-spacer") || customElements.define("px-spacer", S);
|
|
419
|
-
const j = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}",
|
|
420
|
-
|
|
422
|
+
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();
|
|
423
|
+
g.replaceSync(j);
|
|
421
424
|
class z extends d {
|
|
422
425
|
constructor() {
|
|
423
|
-
super(
|
|
426
|
+
super(g), this.template = (t) => `
|
|
424
427
|
<px-container border-radius="none" padding="none">
|
|
425
428
|
<px-vstack>
|
|
426
429
|
<px-container id="header-container" border-radius="none">
|
|
@@ -597,7 +600,7 @@ class z extends d {
|
|
|
597
600
|
case "background-color":
|
|
598
601
|
this.$bodyContainer.setAttribute(
|
|
599
602
|
"background-color",
|
|
600
|
-
|
|
603
|
+
f.indexOf(e) > 0 ? e : "none"
|
|
601
604
|
);
|
|
602
605
|
break;
|
|
603
606
|
case "padding-vertical":
|