@proximus/lavender-common 1.0.0-alpha.69 → 1.0.0-alpha.71
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 +63 -71
- 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(r) {
|
|
3
|
+
const t = document.createElement(r), 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
|
}
|
|
@@ -517,38 +517,29 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
517
517
|
"default",
|
|
518
518
|
"inherit",
|
|
519
519
|
"brand",
|
|
520
|
-
"
|
|
521
|
-
"
|
|
522
|
-
"state-active",
|
|
523
|
-
"state-disabled",
|
|
524
|
-
"body-neutral-strong",
|
|
525
|
-
"body-neutral-weak",
|
|
526
|
-
"heading-brand",
|
|
527
|
-
"heading-neutral",
|
|
520
|
+
"neutral",
|
|
521
|
+
"dimmed",
|
|
528
522
|
"purpose-success",
|
|
529
523
|
"purpose-warning",
|
|
530
524
|
"purpose-error",
|
|
531
525
|
"purpose-unlimited",
|
|
532
|
-
"purpose-promo"
|
|
526
|
+
"purpose-promo",
|
|
527
|
+
"state-hover",
|
|
528
|
+
"state-active",
|
|
529
|
+
"state-disabled",
|
|
530
|
+
"neutral",
|
|
531
|
+
"dimmed",
|
|
532
|
+
"heading-brand",
|
|
533
|
+
"heading-neutral"
|
|
533
534
|
], S = [
|
|
534
535
|
"",
|
|
535
536
|
"default",
|
|
536
537
|
"inherit",
|
|
537
|
-
"
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
"
|
|
541
|
-
], $ = [
|
|
542
|
-
"",
|
|
543
|
-
"default",
|
|
544
|
-
"2xs",
|
|
545
|
-
"xs",
|
|
546
|
-
"s",
|
|
547
|
-
"m",
|
|
548
|
-
"l",
|
|
549
|
-
"xl",
|
|
550
|
-
"2xl"
|
|
551
|
-
], x = ["", "default", "left", "center", "right"], j = ["", "none", "2xs", "xs", "s", "m", "l"], C = ["", "none", "s", "m", "l"], M = ["", "none", "main", "pill"], L = [
|
|
538
|
+
"body",
|
|
539
|
+
"title",
|
|
540
|
+
"title-large",
|
|
541
|
+
"subtitle"
|
|
542
|
+
], $ = ["", "default", "xs", "s", "m", "l", "xl"], x = ["", "default", "left", "center", "right"], j = ["", "none", "3xs", "2xs", "xs", "s", "m", "l"], C = ["", "none", "s", "m", "l"], M = ["", "none", "main", "pill"], L = [
|
|
552
543
|
"none",
|
|
553
544
|
"main",
|
|
554
545
|
"brand",
|
|
@@ -580,13 +571,13 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
580
571
|
"surface-brand-light",
|
|
581
572
|
"container-primary",
|
|
582
573
|
"container-secondary",
|
|
574
|
+
"container-light",
|
|
575
|
+
"container-default",
|
|
576
|
+
"container-strong",
|
|
583
577
|
"state-hover",
|
|
584
578
|
"state-hover-bordered",
|
|
585
579
|
"state-active",
|
|
586
580
|
"state-disabled",
|
|
587
|
-
"container-default",
|
|
588
|
-
"container-light",
|
|
589
|
-
"container-strong",
|
|
590
581
|
"purpose-success",
|
|
591
582
|
"purpose-warning",
|
|
592
583
|
"purpose-error",
|
|
@@ -681,22 +672,22 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
681
672
|
"l",
|
|
682
673
|
"2xl"
|
|
683
674
|
], R = ["", "default", "s", "m", "l"];
|
|
684
|
-
function z(
|
|
675
|
+
function z(r) {
|
|
685
676
|
const t = document.createElement("style");
|
|
686
|
-
t.innerHTML =
|
|
677
|
+
t.innerHTML = r, document.head.appendChild(t);
|
|
687
678
|
}
|
|
688
|
-
function _(
|
|
689
|
-
return typeof
|
|
679
|
+
function _(r) {
|
|
680
|
+
return typeof r == "string" && (r === "false" || r === "0" || r === "null") || typeof r == "boolean" && !r;
|
|
690
681
|
}
|
|
691
682
|
function H() {
|
|
692
683
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
693
684
|
}
|
|
694
|
-
function P(
|
|
695
|
-
return
|
|
685
|
+
function P(r, t) {
|
|
686
|
+
return r.includes(t);
|
|
696
687
|
}
|
|
697
|
-
function F(
|
|
688
|
+
function F(r, t, s = !0) {
|
|
698
689
|
var e;
|
|
699
|
-
[
|
|
690
|
+
if ([
|
|
700
691
|
"aria-label",
|
|
701
692
|
"aria-labelledby",
|
|
702
693
|
"aria-describedby",
|
|
@@ -730,45 +721,46 @@ function F(i, t) {
|
|
|
730
721
|
"aria-invalid",
|
|
731
722
|
"aria-busy",
|
|
732
723
|
"aria-owns"
|
|
733
|
-
].forEach((
|
|
734
|
-
|
|
735
|
-
})
|
|
736
|
-
|
|
737
|
-
|
|
724
|
+
].forEach((i) => {
|
|
725
|
+
r.getAttribute(i) && (t.setAttribute(i, r.getAttribute(i)), r.removeAttribute(i));
|
|
726
|
+
}), s) {
|
|
727
|
+
const i = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
728
|
+
t.setAttribute("id", i), r.setAttribute("aria-labelledby", i);
|
|
729
|
+
}
|
|
738
730
|
}
|
|
739
|
-
function I(
|
|
731
|
+
function I(r, t, s, e = "", i) {
|
|
740
732
|
const a = new CSSStyleSheet(), l = s.reduce(
|
|
741
|
-
(n,
|
|
742
|
-
${t(
|
|
733
|
+
(n, o) => n + `
|
|
734
|
+
${t(r, o)} {
|
|
743
735
|
@media only screen and (max-width: 767px) {
|
|
744
|
-
${
|
|
745
|
-
${
|
|
736
|
+
${r}: var(--${e}-${o}-mobile);
|
|
737
|
+
${i ? `${i}: var(--${e}-${o}-mobile)` : ""}
|
|
746
738
|
}
|
|
747
|
-
${
|
|
748
|
-
${
|
|
739
|
+
${r}: var(--${e}-${o}-desktop);
|
|
740
|
+
${i ? `${i}:var(--${e}-${o}-desktop)` : ""}
|
|
749
741
|
}
|
|
750
|
-
${t(
|
|
742
|
+
${t(r, o, "mobile")} {
|
|
751
743
|
@media only screen and (max-width: 767px) {
|
|
752
|
-
${
|
|
753
|
-
${
|
|
744
|
+
${r}: var(--${e}-${o}-mobile) !important;
|
|
745
|
+
${i ? `${i}: var(--${e}-${o}-mobile)` : ""}
|
|
754
746
|
}
|
|
755
747
|
}
|
|
756
|
-
${t(
|
|
748
|
+
${t(r, o, "tablet")} {
|
|
757
749
|
@media only screen and (min-width: 768px) and (max-width: 1024px) {
|
|
758
|
-
${
|
|
759
|
-
${
|
|
750
|
+
${r}: var(--${e}-${o}-desktop) !important;
|
|
751
|
+
${i ? `${i}: var(--${e}-${o}-desktop)` : ""}
|
|
760
752
|
}
|
|
761
753
|
}
|
|
762
|
-
${t(
|
|
754
|
+
${t(r, o, "laptop")} {
|
|
763
755
|
@media only screen and (min-width: 768px) {
|
|
764
|
-
${
|
|
765
|
-
${
|
|
756
|
+
${r}: var(--${e}-${o}-desktop) !important;
|
|
757
|
+
${i ? `${i}: var(--${e}-${o}-desktop)` : ""}
|
|
766
758
|
}
|
|
767
759
|
}
|
|
768
|
-
${t(
|
|
760
|
+
${t(r, o, "desktop")} {
|
|
769
761
|
@media only screen and (min-width: 768px) {
|
|
770
|
-
${
|
|
771
|
-
${
|
|
762
|
+
${r}: var(--${e}-${o}-desktop) !important;
|
|
763
|
+
${i ? `${i}: var(--${e}-${o}-desktop)` : ""}
|
|
772
764
|
}
|
|
773
765
|
}`,
|
|
774
766
|
""
|
|
@@ -776,8 +768,8 @@ function I(i, t, s, e = "", o) {
|
|
|
776
768
|
return a.replaceSync(l), a;
|
|
777
769
|
}
|
|
778
770
|
class J {
|
|
779
|
-
constructor(t, s, e,
|
|
780
|
-
this.component = t, this.attributeName = s, this.cssVariable =
|
|
771
|
+
constructor(t, s, e, i) {
|
|
772
|
+
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
773
|
this.component,
|
|
782
774
|
this.toCamelCase(this.attributeName),
|
|
783
775
|
{
|
|
@@ -809,10 +801,10 @@ class J {
|
|
|
809
801
|
}
|
|
810
802
|
}
|
|
811
803
|
setCSSProperty(t, s, e = !0) {
|
|
812
|
-
const [,
|
|
804
|
+
const [, i = ""] = t.split("--");
|
|
813
805
|
this.component.style.setProperty(
|
|
814
|
-
`${this.cssVariable}${e ? "-all" : ""}${
|
|
815
|
-
`${this._attributeValue(s,
|
|
806
|
+
`${this.cssVariable}${e ? "-all" : ""}${i ? `-${i}` : ""}`,
|
|
807
|
+
`${this._attributeValue(s, i)}`
|
|
816
808
|
);
|
|
817
809
|
}
|
|
818
810
|
setCSSProperties() {
|
|
@@ -834,12 +826,12 @@ class J {
|
|
|
834
826
|
e,
|
|
835
827
|
!1
|
|
836
828
|
);
|
|
837
|
-
const
|
|
829
|
+
const i = this.component.getAttribute(
|
|
838
830
|
this.attributeNameLaptop
|
|
839
831
|
);
|
|
840
|
-
|
|
832
|
+
i && this.setCSSProperty(
|
|
841
833
|
this.attributeNameLaptop,
|
|
842
|
-
|
|
834
|
+
i,
|
|
843
835
|
!1
|
|
844
836
|
);
|
|
845
837
|
const a = this.component.getAttribute(
|