@proximus/lavender-grid 1.0.0-alpha.13 → 1.0.0-alpha.15
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/PxGrid.es.js +46 -224
- package/package.json +5 -3
package/dist/PxGrid.es.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { PxElement as
|
|
2
|
-
const d = ":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}.grid{display:grid;gap:var(--px-spacing-component-default-horizontal);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)}.gap-expanded{gap:var(--px-spacing-component-expanded-horizontal)}.gap-none{gap:0!important}.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 only screen and (max-width: 767px){.grid{gap:var(--px-spacing-component-default-horizontal-mobile);grid-template-columns:repeat(var(--grid-cols--mobile, var(--grid-cols)),minmax(0,1fr))}.gap-expanded{gap:var(--px-spacing-component-expanded-horizontal-mobile)}.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 only screen and (min-width: 768px) and (max-width: 1024px){.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 only screen and (min-width: 1025px){.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}}", g = '::slotted([col-span="1"]){grid-column:span 1 / span 1}::slotted([col-span="2"]){grid-column:span 2 / span 2}::slotted([col-span="3"]){grid-column:span 3 / span 3}::slotted([col-span="4"]){grid-column:span 4 / span 4}::slotted([col-span="5"]){grid-column:span 5 / span 5}::slotted([col-span="6"]){grid-column:span 6 / span 6}::slotted([col-span="7"]){grid-column:span 7 / span 7}::slotted([col-span="8"]){grid-column:span 8 / span 8}::slotted([col-span="9"]){grid-column:span 9 / span 9}::slotted([col-span="10"]){grid-column:span 10 / span 10}::slotted([col-span="11"]){grid-column:span 11 / span 11}::slotted([col-span="12"]){grid-column:span 12 / span 12}::slotted([col-span="full"]){grid-column:1 / -1}::slotted([order="1"]){order:1}::slotted([order="2"]){order:2}::slotted([order="3"]){order:3}::slotted([order="4"]){order:4}::slotted([order="5"]){order:5}::slotted([order="6"]){order:6}::slotted([order="first"]){order:-9999}::slotted([order="last"]){order:9999}::slotted([order="none"]){order:0}::slotted([justify-self="auto"]){justify-self:auto}::slotted([justify-self="start"]){justify-self:start}::slotted([justify-self="end"]){justify-self:end}::slotted([justify-self="center"]){justify-self:center}::slotted([justify-self="stretch"]){justify-self:stretch}::slotted([align-self="auto"]){align-self:auto}::slotted([align-self="start"]){align-self:start}::slotted([align-self="end"]){align-self:end}::slotted([align-self="center"]){align-self:center}::slotted([align-self="stretch"]){align-self:stretch}::slotted([place-self="auto"]){place-self:auto}::slotted([place-self="start"]){place-self:start}::slotted([place-self="end"]){place-self:end}::slotted([place-self="center"]){place-self:center}::slotted([place-self="stretch"]){place-self:stretch}@media only screen and (max-width: 767px){::slotted([col--mobile="auto"]){grid-column:auto}::slotted([col-span--mobile="1"]){grid-column:span 1 / span 1}::slotted([col-span--mobile="2"]){grid-column:span 2 / span 2}::slotted([col-span--mobile="3"]){grid-column:span 3 / span 3}::slotted([col-span--mobile="4"]){grid-column:span 4 / span 4}::slotted([col-span--mobile="5"]){grid-column:span 5 / span 5}::slotted([col-span--mobile="6"]){grid-column:span 6 / span 6}::slotted([col-span--mobile="7"]){grid-column:span 7 / span 7}::slotted([col-span--mobile="8"]){grid-column:span 8 / span 8}::slotted([col-span--mobile="9"]){grid-column:span 9 / span 9}::slotted([col-span--mobile="10"]){grid-column:span 10 / span 10}::slotted([col-span--mobile="11"]){grid-column:span 11 / span 11}::slotted([col-span--mobile="12"]){grid-column:span 12 / span 12}::slotted([col-span--mobile="full"]){grid-column:1 / -1}::slotted([order--mobile="1"]){order:1}::slotted([order--mobile="2"]){order:2}::slotted([order--mobile="3"]){order:3}::slotted([order--mobile="4"]){order:4}::slotted([order--mobile="5"]){order:5}::slotted([order--mobile="6"]){order:6}::slotted([order--mobile="first"]){order:-9999}::slotted([order--mobile="last"]){order:9999}::slotted([order--mobile="none"]){order:0}::slotted([justify-self--mobile="auto"]){justify-self:auto}::slotted([justify-self--mobile="start"]){justify-self:start}::slotted([justify-self--mobile="end"]){justify-self:end}::slotted([justify-self--mobile="center"]){justify-self:center}::slotted([justify-self--mobile="stretch"]){justify-self:stretch}::slotted([align-self--mobile="auto"]){align-self:auto}::slotted([align-self--mobile="start"]){align-self:start}::slotted([align-self--mobile="end"]){align-self:end}::slotted([align-self--mobile="center"]){align-self:center}::slotted([align-self--mobile="stretch"]){align-self:stretch}::slotted([place-self--mobile="auto"]){place-self:auto}::slotted([place-self--mobile="start"]){place-self:start}::slotted([place-self--mobile="end"]){place-self:end}::slotted([place-self--mobile="center"]){place-self:center}::slotted([place-self--mobile="stretch"]){place-self:stretch}}@media only screen and (min-width: 768px) and (max-width: 1024px){::slotted([col--tablet="auto"]){grid-column:auto}::slotted([col-span--tablet="1"]){grid-column:span 1 / span 1}::slotted([col-span--tablet="2"]){grid-column:span 2 / span 2}::slotted([col-span--tablet="3"]){grid-column:span 3 / span 3}::slotted([col-span--tablet="4"]){grid-column:span 4 / span 4}::slotted([col-span--tablet="5"]){grid-column:span 5 / span 5}::slotted([col-span--tablet="6"]){grid-column:span 6 / span 6}::slotted([col-span--tablet="7"]){grid-column:span 7 / span 7}::slotted([col-span--tablet="8"]){grid-column:span 8 / span 8}::slotted([col-span--tablet="9"]){grid-column:span 9 / span 9}::slotted([col-span--tablet="10"]){grid-column:span 10 / span 10}::slotted([col-span--tablet="11"]){grid-column:span 11 / span 11}::slotted([col-span--tablet="12"]){grid-column:span 12 / span 12}::slotted([col-span--tablet="full"]){grid-column:1 / -1}::slotted([order--tablet="1"]){order:1}::slotted([order--tablet="2"]){order:2}::slotted([order--tablet="3"]){order:3}::slotted([order--tablet="4"]){order:4}::slotted([order--tablet="5"]){order:5}::slotted([order--tablet="6"]){order:6}::slotted([order--tablet="first"]){order:-9999}::slotted([order--tablet="last"]){order:9999}::slotted([order--tablet="none"]){order:0}::slotted([justify-self--tablet="auto"]){justify-self:auto}::slotted([justify-self--tablet="start"]){justify-self:start}::slotted([justify-self--tablet="end"]){justify-self:end}::slotted([justify-self--tablet="center"]){justify-self:center}::slotted([justify-self--tablet="stretch"]){justify-self:stretch}::slotted([align-self--tablet="auto"]){align-self:auto}::slotted([align-self--tablet="start"]){align-self:start}::slotted([align-self--tablet="end"]){align-self:end}::slotted([align-self--tablet="center"]){align-self:center}::slotted([align-self--tablet="stretch"]){align-self:stretch}::slotted([place-self--tablet="auto"]){place-self:auto}::slotted([place-self--tablet="start"]){place-self:start}::slotted([place-self--tablet="end"]){place-self:end}::slotted([place-self--tablet="center"]){place-self:center}::slotted([place-self--tablet="stretch"]){place-self:stretch}}@media only screen and (min-width: 1025px){::slotted([col--laptop="auto"]){grid-column:auto}::slotted([col-span--laptop="1"]){grid-column:span 1 / span 1}::slotted([col-span--laptop="2"]){grid-column:span 2 / span 2}::slotted([col-span--laptop="3"]){grid-column:span 3 / span 3}::slotted([col-span--laptop="4"]){grid-column:span 4 / span 4}::slotted([col-span--laptop="5"]){grid-column:span 5 / span 5}::slotted([col-span--laptop="6"]){grid-column:span 6 / span 6}::slotted([col-span--laptop="7"]){grid-column:span 7 / span 7}::slotted([col-span--laptop="8"]){grid-column:span 8 / span 8}::slotted([col-span--laptop="9"]){grid-column:span 9 / span 9}::slotted([col-span--laptop="10"]){grid-column:span 10 / span 10}::slotted([col-span--laptop="11"]){grid-column:span 11 / span 11}::slotted([col-span--laptop="12"]){grid-column:span 12 / span 12}::slotted([col-span--laptop="full"]){grid-column:1 / -1}::slotted([justify-self--laptop="auto"]){justify-self:auto}::slotted([justify-self--laptop="start"]){justify-self:start}::slotted([justify-self--laptop="end"]){justify-self:end}::slotted([justify-self--laptop="center"]){justify-self:center}::slotted([justify-self--laptop="stretch"]){justify-self:stretch}::slotted([align-self--laptop="auto"]){align-self:auto}::slotted([align-self--laptop="start"]){align-self:start}::slotted([align-self--laptop="end"]){align-self:end}::slotted([align-self--laptop="center"]){align-self:center}::slotted([align-self--laptop="stretch"]){align-self:stretch}::slotted([place-self--laptop="auto"]){place-self:auto}::slotted([place-self--laptop="start"]){place-self:start}::slotted([place-self--laptop="end"]){place-self:end}::slotted([place-self--laptop="center"]){place-self:center}::slotted([place-self--laptop="stretch"]){place-self:stretch}}', a = new CSSStyleSheet();
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
r.replaceSync(g);
|
|
6
|
-
const f = [
|
|
1
|
+
import { PxElement as c, gridGapValues as r } from "@proximus/lavender-common";
|
|
2
|
+
const g = ":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}.grid{display:grid;gap:var(--grid-gap--mobile, var(--px-spacing-inside-section-default-mobile));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)}@media screen and (min-width: 768px){.grid{gap:var( --grid-gap--tablet, var(--px-spacing-inside-section-default-tablet) )}}@media screen and (min-width: 1025px){.grid{gap:var( --grid-gap--laptop, var(--px-spacing-inside-section-default-desktop) )}}.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 only screen and (max-width: 767px){.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 only screen and (min-width: 768px) and (max-width: 1024px){.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 only screen and (min-width: 1025px){.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}}", o = new CSSStyleSheet();
|
|
3
|
+
o.replaceSync(g);
|
|
4
|
+
const u = [
|
|
7
5
|
"1",
|
|
8
6
|
"2",
|
|
9
7
|
"3",
|
|
@@ -16,7 +14,7 @@ const f = [
|
|
|
16
14
|
"10",
|
|
17
15
|
"11",
|
|
18
16
|
"12"
|
|
19
|
-
],
|
|
17
|
+
], p = [
|
|
20
18
|
"",
|
|
21
19
|
"start",
|
|
22
20
|
"end",
|
|
@@ -25,9 +23,9 @@ const f = [
|
|
|
25
23
|
"space-around",
|
|
26
24
|
"space-evenly",
|
|
27
25
|
"stretch"
|
|
28
|
-
], m = ["", "start", "end", "center"],
|
|
26
|
+
], m = ["", "start", "end", "center", "stretch"], l = class l extends c {
|
|
29
27
|
constructor() {
|
|
30
|
-
super(
|
|
28
|
+
super(o), this.template = () => `<div class="grid">
|
|
31
29
|
<slot></slot>
|
|
32
30
|
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
33
31
|
}
|
|
@@ -62,19 +60,19 @@ const f = [
|
|
|
62
60
|
];
|
|
63
61
|
}
|
|
64
62
|
connectedCallback() {
|
|
65
|
-
super.connectedCallback(), this.alignItems || (this.alignItems = "stretch");
|
|
63
|
+
super.connectedCallback(), this.gap || (this.gap = "inside-section-default"), this.alignItems || (this.alignItems = "stretch");
|
|
66
64
|
}
|
|
67
|
-
attributeChangedCallback(t,
|
|
68
|
-
if (
|
|
65
|
+
attributeChangedCallback(t, e, n) {
|
|
66
|
+
if (e !== n)
|
|
69
67
|
switch (t) {
|
|
70
68
|
case "gap":
|
|
71
|
-
this.
|
|
69
|
+
this.updateGap(e, n, r);
|
|
72
70
|
break;
|
|
73
71
|
case "grid-cols":
|
|
74
72
|
case "grid-cols--mobile":
|
|
75
73
|
case "grid-cols--tablet":
|
|
76
74
|
case "grid-cols--laptop":
|
|
77
|
-
this.updateAttribute(t,
|
|
75
|
+
this.updateAttribute(t, e, n, u);
|
|
78
76
|
break;
|
|
79
77
|
case "justify-content":
|
|
80
78
|
case "align-content":
|
|
@@ -88,9 +86,9 @@ const f = [
|
|
|
88
86
|
case "align-content--desktop":
|
|
89
87
|
this.updateAttribute(
|
|
90
88
|
t,
|
|
91
|
-
s,
|
|
92
89
|
e,
|
|
93
|
-
|
|
90
|
+
n,
|
|
91
|
+
p
|
|
94
92
|
);
|
|
95
93
|
break;
|
|
96
94
|
case "justify-items":
|
|
@@ -105,23 +103,42 @@ const f = [
|
|
|
105
103
|
case "align-items--desktop":
|
|
106
104
|
this.updateAttribute(
|
|
107
105
|
t,
|
|
108
|
-
s,
|
|
109
106
|
e,
|
|
107
|
+
n,
|
|
110
108
|
m
|
|
111
109
|
);
|
|
112
110
|
break;
|
|
113
111
|
default:
|
|
114
|
-
super.attributeChangedCallback(t,
|
|
112
|
+
super.attributeChangedCallback(t, e, n);
|
|
115
113
|
break;
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
|
-
|
|
119
|
-
this.checkName(
|
|
120
|
-
|
|
116
|
+
updateGap(t, e, n) {
|
|
117
|
+
if (!this.checkName(n, e)) {
|
|
118
|
+
console.error("Bad gap value for", this.$el);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const s = (i) => {
|
|
122
|
+
i !== null && i !== "" && i !== "default" && (this.$el.style.setProperty(
|
|
123
|
+
"--grid-gap--mobile",
|
|
124
|
+
`var(--px-spacing-${i}-mobile)`
|
|
125
|
+
), this.$el.style.setProperty(
|
|
126
|
+
"--grid-gap--tablet",
|
|
127
|
+
`var(--px-spacing-${i}-tablet)`
|
|
128
|
+
), this.$el.style.setProperty(
|
|
129
|
+
"--grid-gap--laptop",
|
|
130
|
+
`var(--px-spacing-${i}-desktop)`
|
|
131
|
+
));
|
|
132
|
+
};
|
|
133
|
+
s(t), s(e);
|
|
134
|
+
}
|
|
135
|
+
updateAttribute(t, e, n, s) {
|
|
136
|
+
this.checkName(s, n) ? t === "grid-cols" || t === "grid-cols--mobile" || t === "grid-cols--tablet" || t === "grid-cols--laptop" ? this.$el.style.setProperty(`--${t}`, n) : (e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), n !== null && n !== "" && n !== "default" && this.$el.classList.toggle(`${t}-${n}`)) : console.error(
|
|
137
|
+
`${n} is not an allowed ${t} value for ${this.$el}`
|
|
121
138
|
);
|
|
122
139
|
}
|
|
123
|
-
checkName(t,
|
|
124
|
-
return t.includes(
|
|
140
|
+
checkName(t, e) {
|
|
141
|
+
return t.includes(e);
|
|
125
142
|
}
|
|
126
143
|
get gap() {
|
|
127
144
|
return this.getAttribute("gap");
|
|
@@ -274,207 +291,12 @@ const f = [
|
|
|
274
291
|
this.setAttribute("align-items--desktop", t);
|
|
275
292
|
}
|
|
276
293
|
};
|
|
277
|
-
|
|
278
|
-
let
|
|
279
|
-
customElements.define("px-grid",
|
|
280
|
-
const o = class o extends l {
|
|
281
|
-
constructor() {
|
|
282
|
-
super(), this.template = () => `<div class="grid-item">
|
|
283
|
-
<slot></slot>
|
|
284
|
-
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
285
|
-
}
|
|
286
|
-
static get observedAttributes() {
|
|
287
|
-
return [
|
|
288
|
-
...super.observedAttributes,
|
|
289
|
-
"col-span",
|
|
290
|
-
"col-span--mobile",
|
|
291
|
-
"col-span--tablet",
|
|
292
|
-
"col-span--laptop",
|
|
293
|
-
"col-span--desktop",
|
|
294
|
-
"justify-self",
|
|
295
|
-
"align-self",
|
|
296
|
-
"place-self",
|
|
297
|
-
"justify-self--mobile",
|
|
298
|
-
"align-self--mobile",
|
|
299
|
-
"place-self--mobile",
|
|
300
|
-
"justify-self--tablet",
|
|
301
|
-
"align-self--tablet",
|
|
302
|
-
"place-self--tablet",
|
|
303
|
-
"justify-self--laptop",
|
|
304
|
-
"align-self--laptop",
|
|
305
|
-
"place-self--laptop",
|
|
306
|
-
"justify-self--desktop",
|
|
307
|
-
"align-self--desktop",
|
|
308
|
-
"place-self--desktop",
|
|
309
|
-
"order",
|
|
310
|
-
"order--mobile",
|
|
311
|
-
"order--tablet",
|
|
312
|
-
"order--laptop",
|
|
313
|
-
"order--desktop"
|
|
314
|
-
];
|
|
315
|
-
}
|
|
316
|
-
connectedCallback() {
|
|
317
|
-
var t;
|
|
318
|
-
super.connectedCallback(), ((t = this.parentElement) == null ? void 0 : t.getAttribute("align-items")) === "stretch" && (this.$el.style.height = "100%");
|
|
319
|
-
}
|
|
320
|
-
get colSpan() {
|
|
321
|
-
return this.getAttribute("col-span");
|
|
322
|
-
}
|
|
323
|
-
set colSpan(t) {
|
|
324
|
-
this.setAttribute("col-span", t);
|
|
325
|
-
}
|
|
326
|
-
get colSpanMobile() {
|
|
327
|
-
return this.getAttribute("col-span--mobile");
|
|
328
|
-
}
|
|
329
|
-
set colSpanMobile(t) {
|
|
330
|
-
this.setAttribute("col-span--mobile", t);
|
|
331
|
-
}
|
|
332
|
-
get colSpanTablet() {
|
|
333
|
-
return this.getAttribute("col-span--tablet");
|
|
334
|
-
}
|
|
335
|
-
set colSpanTablet(t) {
|
|
336
|
-
this.setAttribute("col-span--tablet", t);
|
|
337
|
-
}
|
|
338
|
-
get colSpanLaptop() {
|
|
339
|
-
return this.getAttribute("col-span--laptop");
|
|
340
|
-
}
|
|
341
|
-
set colSpanLaptop(t) {
|
|
342
|
-
this.setAttribute("col-span--laptop", t);
|
|
343
|
-
}
|
|
344
|
-
get colSpanDesktop() {
|
|
345
|
-
return this.getAttribute("col-span--desktop");
|
|
346
|
-
}
|
|
347
|
-
set colSpanDesktop(t) {
|
|
348
|
-
this.setAttribute("col-span--desktop", t);
|
|
349
|
-
}
|
|
350
|
-
get justifySelf() {
|
|
351
|
-
return this.getAttribute("justify-self");
|
|
352
|
-
}
|
|
353
|
-
set justifySelf(t) {
|
|
354
|
-
this.setAttribute("justify-self", t);
|
|
355
|
-
}
|
|
356
|
-
get alignSelf() {
|
|
357
|
-
return this.getAttribute("align-self");
|
|
358
|
-
}
|
|
359
|
-
set alignSelf(t) {
|
|
360
|
-
this.setAttribute("align-self", t);
|
|
361
|
-
}
|
|
362
|
-
get placeSelf() {
|
|
363
|
-
return this.getAttribute("place-self");
|
|
364
|
-
}
|
|
365
|
-
set placeSelf(t) {
|
|
366
|
-
this.setAttribute("place-self", t);
|
|
367
|
-
}
|
|
368
|
-
get justifySelfMobile() {
|
|
369
|
-
return this.getAttribute("justify-self--mobile");
|
|
370
|
-
}
|
|
371
|
-
set justifySelfMobile(t) {
|
|
372
|
-
this.setAttribute("justify-self--mobile", t);
|
|
373
|
-
}
|
|
374
|
-
get alignSelfMobile() {
|
|
375
|
-
return this.getAttribute("align-self--mobile");
|
|
376
|
-
}
|
|
377
|
-
set alignSelfMobile(t) {
|
|
378
|
-
this.setAttribute("align-self--mobile", t);
|
|
379
|
-
}
|
|
380
|
-
get placeSelfMobile() {
|
|
381
|
-
return this.getAttribute("place-self--mobile");
|
|
382
|
-
}
|
|
383
|
-
set placeSelfMobile(t) {
|
|
384
|
-
this.setAttribute("place-self--mobile", t);
|
|
385
|
-
}
|
|
386
|
-
get justifySelfTablet() {
|
|
387
|
-
return this.getAttribute("justify-self--tablet");
|
|
388
|
-
}
|
|
389
|
-
set justifySelfTablet(t) {
|
|
390
|
-
this.setAttribute("justify-self--tablet", t);
|
|
391
|
-
}
|
|
392
|
-
get alignSelfTablet() {
|
|
393
|
-
return this.getAttribute("align-self--tablet");
|
|
394
|
-
}
|
|
395
|
-
set alignSelfTablet(t) {
|
|
396
|
-
this.setAttribute("align-self--tablet", t);
|
|
397
|
-
}
|
|
398
|
-
get placeSelfTablet() {
|
|
399
|
-
return this.getAttribute("place-self--tablet");
|
|
400
|
-
}
|
|
401
|
-
set placeSelfTablet(t) {
|
|
402
|
-
this.setAttribute("place-self--tablet", t);
|
|
403
|
-
}
|
|
404
|
-
get justifySelfLaptop() {
|
|
405
|
-
return this.getAttribute("justify-self--laptop");
|
|
406
|
-
}
|
|
407
|
-
set justifySelfLaptop(t) {
|
|
408
|
-
this.setAttribute("justify-self--laptop", t);
|
|
409
|
-
}
|
|
410
|
-
get alignSelfLaptop() {
|
|
411
|
-
return this.getAttribute("align-self--laptop");
|
|
412
|
-
}
|
|
413
|
-
set alignSelfLaptop(t) {
|
|
414
|
-
this.setAttribute("align-self--laptop", t);
|
|
415
|
-
}
|
|
416
|
-
get placeSelfLaptop() {
|
|
417
|
-
return this.getAttribute("place-self--laptop");
|
|
418
|
-
}
|
|
419
|
-
set placeSelfLaptop(t) {
|
|
420
|
-
this.setAttribute("place-self--laptop", t);
|
|
421
|
-
}
|
|
422
|
-
get justifySelfDesktop() {
|
|
423
|
-
return this.getAttribute("justify-self--desktop");
|
|
424
|
-
}
|
|
425
|
-
set justifySelfDesktop(t) {
|
|
426
|
-
this.setAttribute("justify-self--desktop", t);
|
|
427
|
-
}
|
|
428
|
-
get alignSelfDesktop() {
|
|
429
|
-
return this.getAttribute("align-self--desktop");
|
|
430
|
-
}
|
|
431
|
-
set alignSelfDesktop(t) {
|
|
432
|
-
this.setAttribute("align-self--desktop", t);
|
|
433
|
-
}
|
|
434
|
-
get placeSelfDesktop() {
|
|
435
|
-
return this.getAttribute("place-self--desktop");
|
|
436
|
-
}
|
|
437
|
-
set placeSelfDesktop(t) {
|
|
438
|
-
this.setAttribute("place-self--desktop", t);
|
|
439
|
-
}
|
|
440
|
-
get order() {
|
|
441
|
-
return this.getAttribute("order");
|
|
442
|
-
}
|
|
443
|
-
set order(t) {
|
|
444
|
-
this.setAttribute("order", t);
|
|
445
|
-
}
|
|
446
|
-
get orderMobile() {
|
|
447
|
-
return this.getAttribute("order--mobile");
|
|
448
|
-
}
|
|
449
|
-
set orderMobile(t) {
|
|
450
|
-
this.setAttribute("order--mobile", t);
|
|
451
|
-
}
|
|
452
|
-
get orderTablet() {
|
|
453
|
-
return this.getAttribute("order--tablet");
|
|
454
|
-
}
|
|
455
|
-
set orderTablet(t) {
|
|
456
|
-
this.setAttribute("order--tablet", t);
|
|
457
|
-
}
|
|
458
|
-
get orderLaptop() {
|
|
459
|
-
return this.getAttribute("order--laptop");
|
|
460
|
-
}
|
|
461
|
-
set orderLaptop(t) {
|
|
462
|
-
this.setAttribute("order--laptop", t);
|
|
463
|
-
}
|
|
464
|
-
get orderDesktop() {
|
|
465
|
-
return this.getAttribute("order--desktop");
|
|
466
|
-
}
|
|
467
|
-
set orderDesktop(t) {
|
|
468
|
-
this.setAttribute("order--desktop", t);
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
o.nativeName = "div";
|
|
472
|
-
let n = o;
|
|
473
|
-
customElements.define("px-grid-item", n);
|
|
294
|
+
l.nativeName = "div";
|
|
295
|
+
let a = l;
|
|
296
|
+
customElements.define("px-grid", a);
|
|
474
297
|
export {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
f as gridColsValues,
|
|
298
|
+
a as Grid,
|
|
299
|
+
p as contentAlignmentValues,
|
|
300
|
+
u as gridColsValues,
|
|
479
301
|
m as itemsAlignmentValues
|
|
480
302
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-grid",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
"CHANGELOG.md",
|
|
22
22
|
"package.json",
|
|
23
23
|
"dist/*.js",
|
|
24
|
-
"dist
|
|
24
|
+
"dist/*.cjs",
|
|
25
|
+
"dist/css/**/*.css",
|
|
26
|
+
"dist/js/**/*.js"
|
|
25
27
|
]
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
},
|
|
29
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "b8dcbe6979ae4c984cf44a4ce6d86b087446e711"
|
|
30
32
|
}
|