@proximus/lavender-common 1.0.0-alpha.69 → 1.0.0-alpha.70
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 +44 -43
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const b = ":host([grow]){flex-grow:var(--grow-value)}:host([shrink]){flex-shrink:var(--shrink-value)}:host([basis]){flex-basis:var(--basis-value)}:host([align-self]){align-self:var(--align-self-value)}:host([col-span]){grid-column:span var(--col-span-value) / span var(--col-span-value)}:host([justify-self]){justify-self:var(--justify-value)}:host([order]){order:var(--order-value)}:host([hidden]){display:none}::slotted(*[shown--sr]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media screen and (max-width: 767px){:host([hidden--mobile]){display:none}:host([grow--mobile]){flex-grow:var(--grow--mobile-value)!important}:host([shrink--mobile]){flex-shrink:var(--shrink--mobile-value)!important}:host([basis--mobile]){flex-basis:var(--basis--mobile-value)!important}:host([align-self--mobile]){align-self:var(--align-self--mobile-value)!important}:host([col-span--mobile]){grid-column:span var(--col-span--mobile-value) / span var(--col-span--mobile-value)!important}:host([justify-self--mobile]){justify-self:var(--justify-self--mobile-value)!important}:host([order--mobile]){order:var(--order--mobile-value)!important}::slotted(*[shown--sr--mobile]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 768px) and (max-width: 1024px){:host([hidden--tablet]){display:none}:host([grow--tablet]){flex-grow:var(--grow--tablet-value)!important}:host([shrink--tablet]){flex-shrink:var(--shrink--tablet-value)!important}:host([basis--tablet]){flex-basis:var(--basis--tablet-value)!important}:host([align-self--tablet]){align-self:var(--align-self--tablet-value)!important}:host([col-span--tablet]){grid-column:span var(--col-span--tablet-value) / span var(--col-span--tablet-value)!important}:host([justify-self--tablet]){justify-self:var(--justify-self--tablet-value)!important}:host([order--tablet]){order:var(--order--tablet-value)!important}::slotted(*[shown--sr--tablet]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px){::slotted(*[shown--sr--laptop]){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}}@media screen and (min-width: 1025px) and (max-width: 1440px){:host([hidden--laptop]){display:none!important}:host([grow--laptop]){flex-grow:var(--grow--laptop-value)!important}:host([shrink--laptop]){flex-shrink:var(--shrink--laptop-value)!important}:host([basis--laptop]){flex-basis:var(--basis--laptop-value)!important}:host([align-self--laptop]){align-self:var(--align-self--laptop-value)!important}:host([col-span--laptop]){grid-column:span var(--col-span--laptop-value) / span var(--col-span--laptop-value)!important}:host([justify-self--laptop]){justify-self:var(--justify-self--laptop-value)!important}:host([order--laptop]){order:var(--order--laptop-value)!important}}@media screen and (min-width: 1441px){:host([col-span--desktop]){grid-column:span var(--col-span--desktop-value) / span var(--col-span--desktop-value)!important}:host([justify-self--desktop]){justify-self:var(--justify-self--desktop-value)!important}:host([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]){display:none!important}:host([grow--desktop]){flex-grow:var(--grow--desktop-value)!important}:host([shrink--desktop]){flex-shrink:var(--shrink--desktop-value)!important}:host([basis--desktop]){flex-basis:var(--basis--desktop-value)!important}:host([align-self--desktop]){align-self:var(--align-self--desktop-value)!important}}";
|
|
2
|
-
function h(
|
|
3
|
-
const t = document.createElement(
|
|
2
|
+
function h(o) {
|
|
3
|
+
const t = document.createElement(o), s = Object.getPrototypeOf(t);
|
|
4
4
|
return Object.getOwnPropertyNames(s);
|
|
5
5
|
}
|
|
6
6
|
const u = new CSSStyleSheet();
|
|
@@ -117,8 +117,8 @@ class p extends HTMLElement {
|
|
|
117
117
|
break;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
updateProperties(t, s, e,
|
|
121
|
-
if (
|
|
120
|
+
updateProperties(t, s, e, i) {
|
|
121
|
+
if (i && !this.checkName(i, e)) {
|
|
122
122
|
console.error(`Bad ${t} value for`, this.$el);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
@@ -681,22 +681,22 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
681
681
|
"l",
|
|
682
682
|
"2xl"
|
|
683
683
|
], R = ["", "default", "s", "m", "l"];
|
|
684
|
-
function z(
|
|
684
|
+
function z(o) {
|
|
685
685
|
const t = document.createElement("style");
|
|
686
|
-
t.innerHTML =
|
|
686
|
+
t.innerHTML = o, document.head.appendChild(t);
|
|
687
687
|
}
|
|
688
|
-
function _(
|
|
689
|
-
return typeof
|
|
688
|
+
function _(o) {
|
|
689
|
+
return typeof o == "string" && (o === "false" || o === "0" || o === "null") || typeof o == "boolean" && !o;
|
|
690
690
|
}
|
|
691
691
|
function H() {
|
|
692
692
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
693
693
|
}
|
|
694
|
-
function P(
|
|
695
|
-
return
|
|
694
|
+
function P(o, t) {
|
|
695
|
+
return o.includes(t);
|
|
696
696
|
}
|
|
697
|
-
function F(
|
|
697
|
+
function F(o, t, s = !0) {
|
|
698
698
|
var e;
|
|
699
|
-
[
|
|
699
|
+
if ([
|
|
700
700
|
"aria-label",
|
|
701
701
|
"aria-labelledby",
|
|
702
702
|
"aria-describedby",
|
|
@@ -730,45 +730,46 @@ function F(i, t) {
|
|
|
730
730
|
"aria-invalid",
|
|
731
731
|
"aria-busy",
|
|
732
732
|
"aria-owns"
|
|
733
|
-
].forEach((
|
|
734
|
-
|
|
735
|
-
})
|
|
736
|
-
|
|
737
|
-
|
|
733
|
+
].forEach((i) => {
|
|
734
|
+
o.getAttribute(i) && (t.setAttribute(i, o.getAttribute(i)), o.removeAttribute(i));
|
|
735
|
+
}), s) {
|
|
736
|
+
const i = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
737
|
+
t.setAttribute("id", i), o.setAttribute("aria-labelledby", i);
|
|
738
|
+
}
|
|
738
739
|
}
|
|
739
|
-
function I(
|
|
740
|
+
function I(o, t, s, e = "", i) {
|
|
740
741
|
const a = new CSSStyleSheet(), l = s.reduce(
|
|
741
742
|
(n, r) => n + `
|
|
742
|
-
${t(
|
|
743
|
+
${t(o, r)} {
|
|
743
744
|
@media only screen and (max-width: 767px) {
|
|
744
|
-
${
|
|
745
|
-
${
|
|
745
|
+
${o}: var(--${e}-${r}-mobile);
|
|
746
|
+
${i ? `${i}: var(--${e}-${r}-mobile)` : ""}
|
|
746
747
|
}
|
|
747
|
-
${
|
|
748
|
-
${
|
|
748
|
+
${o}: var(--${e}-${r}-desktop);
|
|
749
|
+
${i ? `${i}:var(--${e}-${r}-desktop)` : ""}
|
|
749
750
|
}
|
|
750
|
-
${t(
|
|
751
|
+
${t(o, r, "mobile")} {
|
|
751
752
|
@media only screen and (max-width: 767px) {
|
|
752
|
-
${
|
|
753
|
-
${
|
|
753
|
+
${o}: var(--${e}-${r}-mobile) !important;
|
|
754
|
+
${i ? `${i}: var(--${e}-${r}-mobile)` : ""}
|
|
754
755
|
}
|
|
755
756
|
}
|
|
756
|
-
${t(
|
|
757
|
+
${t(o, r, "tablet")} {
|
|
757
758
|
@media only screen and (min-width: 768px) and (max-width: 1024px) {
|
|
758
|
-
${
|
|
759
|
-
${
|
|
759
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
760
|
+
${i ? `${i}: var(--${e}-${r}-desktop)` : ""}
|
|
760
761
|
}
|
|
761
762
|
}
|
|
762
|
-
${t(
|
|
763
|
+
${t(o, r, "laptop")} {
|
|
763
764
|
@media only screen and (min-width: 768px) {
|
|
764
|
-
${
|
|
765
|
-
${
|
|
765
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
766
|
+
${i ? `${i}: var(--${e}-${r}-desktop)` : ""}
|
|
766
767
|
}
|
|
767
768
|
}
|
|
768
|
-
${t(
|
|
769
|
+
${t(o, r, "desktop")} {
|
|
769
770
|
@media only screen and (min-width: 768px) {
|
|
770
|
-
${
|
|
771
|
-
${
|
|
771
|
+
${o}: var(--${e}-${r}-desktop) !important;
|
|
772
|
+
${i ? `${i}: var(--${e}-${r}-desktop)` : ""}
|
|
772
773
|
}
|
|
773
774
|
}`,
|
|
774
775
|
""
|
|
@@ -776,8 +777,8 @@ function I(i, t, s, e = "", o) {
|
|
|
776
777
|
return a.replaceSync(l), a;
|
|
777
778
|
}
|
|
778
779
|
class J {
|
|
779
|
-
constructor(t, s, e,
|
|
780
|
-
this.component = t, this.attributeName = s, this.cssVariable =
|
|
780
|
+
constructor(t, s, e, i) {
|
|
781
|
+
this.component = t, this.attributeName = s, this.cssVariable = i, this.attributeNameMobile = `${this.attributeName}--mobile`, this.attributeNameTablet = `${this.attributeName}--tablet`, this.attributeNameLaptop = `${this.attributeName}--laptop`, this.attributeNameDesktop = `${this.attributeName}--desktop`, this._attributeValue = e, Object.defineProperty(
|
|
781
782
|
this.component,
|
|
782
783
|
this.toCamelCase(this.attributeName),
|
|
783
784
|
{
|
|
@@ -809,10 +810,10 @@ class J {
|
|
|
809
810
|
}
|
|
810
811
|
}
|
|
811
812
|
setCSSProperty(t, s, e = !0) {
|
|
812
|
-
const [,
|
|
813
|
+
const [, i = ""] = t.split("--");
|
|
813
814
|
this.component.style.setProperty(
|
|
814
|
-
`${this.cssVariable}${e ? "-all" : ""}${
|
|
815
|
-
`${this._attributeValue(s,
|
|
815
|
+
`${this.cssVariable}${e ? "-all" : ""}${i ? `-${i}` : ""}`,
|
|
816
|
+
`${this._attributeValue(s, i)}`
|
|
816
817
|
);
|
|
817
818
|
}
|
|
818
819
|
setCSSProperties() {
|
|
@@ -834,12 +835,12 @@ class J {
|
|
|
834
835
|
e,
|
|
835
836
|
!1
|
|
836
837
|
);
|
|
837
|
-
const
|
|
838
|
+
const i = this.component.getAttribute(
|
|
838
839
|
this.attributeNameLaptop
|
|
839
840
|
);
|
|
840
|
-
|
|
841
|
+
i && this.setCSSProperty(
|
|
841
842
|
this.attributeNameLaptop,
|
|
842
|
-
|
|
843
|
+
i,
|
|
843
844
|
!1
|
|
844
845
|
);
|
|
845
846
|
const a = this.component.getAttribute(
|