@proximus/lavender-common 1.0.0-alpha.79 → 1.0.0-alpha.81
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/common.d.ts +3 -1
- package/dist/index.es.js +99 -84
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -108,7 +108,9 @@ export declare const cssGridPlaceSelfValues: string[];
|
|
|
108
108
|
export declare const fontsizeValues: string[];
|
|
109
109
|
export declare const colorValues: string[];
|
|
110
110
|
export declare const fontweightValues: string[];
|
|
111
|
-
export declare const iconSizeValues:
|
|
111
|
+
export declare const iconSizeValues: readonly ["Xs", "S", "M", "L", "Xl"];
|
|
112
|
+
export declare const iconSizeValuesKC: string[];
|
|
113
|
+
export type IconSize = (typeof iconSizeValues)[number];
|
|
112
114
|
export declare const textalignValues: string[];
|
|
113
115
|
export declare const paddingValues: string[];
|
|
114
116
|
export declare const borderValues: string[];
|
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]),::slotted([order]){order:var(--order-value)}:host([hidden]),::slotted([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]),::slotted([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]),::slotted([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]),::slotted([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]),::slotted([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]),::slotted([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]),::slotted([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]),::slotted([order--desktop]){order:var(--order--desktop-value)!important}:host([hidden--desktop]),::slotted([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(i) {
|
|
3
|
+
const t = document.createElement(i), s = Object.getPrototypeOf(t);
|
|
4
4
|
return Object.getOwnPropertyNames(s);
|
|
5
5
|
}
|
|
6
6
|
const u = new CSSStyleSheet();
|
|
@@ -121,9 +121,9 @@ class p extends HTMLElement {
|
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
updateProperties(t, s, e,
|
|
125
|
-
if (
|
|
126
|
-
console.error(`${e} is not a valid value for ${
|
|
124
|
+
updateProperties(t, s, e, o) {
|
|
125
|
+
if (o && !this.checkName(o, e)) {
|
|
126
|
+
console.error(`${e} is not a valid value for ${o}`);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
const a = t.indexOf("--") > -1, l = a ? t.split("--")[0] : t;
|
|
@@ -403,7 +403,7 @@ class p extends HTMLElement {
|
|
|
403
403
|
this.setAttribute("order--desktop", t);
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
class
|
|
406
|
+
class v extends p {
|
|
407
407
|
static get observedAttributes() {
|
|
408
408
|
return [
|
|
409
409
|
...super.observedAttributes,
|
|
@@ -441,7 +441,7 @@ class k extends p {
|
|
|
441
441
|
return this.shadowRoot.querySelector(this.nativeName);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
const
|
|
444
|
+
const y = ["", "default", "none", "l"], d = [
|
|
445
445
|
"",
|
|
446
446
|
"default",
|
|
447
447
|
"auto",
|
|
@@ -494,7 +494,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
494
494
|
"10",
|
|
495
495
|
"11",
|
|
496
496
|
"12"
|
|
497
|
-
],
|
|
497
|
+
], w = [
|
|
498
498
|
"",
|
|
499
499
|
"default",
|
|
500
500
|
"auto",
|
|
@@ -502,7 +502,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
502
502
|
"end",
|
|
503
503
|
"center",
|
|
504
504
|
"stretch"
|
|
505
|
-
],
|
|
505
|
+
], A = [
|
|
506
506
|
"",
|
|
507
507
|
"default",
|
|
508
508
|
"inherit",
|
|
@@ -518,7 +518,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
518
518
|
"heading-l",
|
|
519
519
|
"heading-m",
|
|
520
520
|
"heading-s"
|
|
521
|
-
],
|
|
521
|
+
], S = [
|
|
522
522
|
"",
|
|
523
523
|
"default",
|
|
524
524
|
"inherit",
|
|
@@ -533,7 +533,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
533
533
|
"state-hover",
|
|
534
534
|
"state-active",
|
|
535
535
|
"state-disabled"
|
|
536
|
-
],
|
|
536
|
+
], $ = [
|
|
537
537
|
"",
|
|
538
538
|
"default",
|
|
539
539
|
"inherit",
|
|
@@ -541,7 +541,21 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
541
541
|
"title",
|
|
542
542
|
"title-large",
|
|
543
543
|
"subtitle"
|
|
544
|
-
],
|
|
544
|
+
], k = ["Xs", "S", "M", "L", "Xl"], x = [
|
|
545
|
+
"",
|
|
546
|
+
"default",
|
|
547
|
+
...k.map((i) => i.toLowerCase())
|
|
548
|
+
], j = ["", "default", "left", "center", "right"], C = [
|
|
549
|
+
"",
|
|
550
|
+
"none",
|
|
551
|
+
"3xs",
|
|
552
|
+
"2xs",
|
|
553
|
+
"xs",
|
|
554
|
+
"s",
|
|
555
|
+
"m",
|
|
556
|
+
"l",
|
|
557
|
+
"xl"
|
|
558
|
+
], M = ["", "none", "s", "m", "l"], L = ["", "none", "main", "pill"], T = [
|
|
545
559
|
"none",
|
|
546
560
|
"main",
|
|
547
561
|
"brand",
|
|
@@ -552,7 +566,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
552
566
|
"purpose-warning",
|
|
553
567
|
"purpose-error",
|
|
554
568
|
"purpose-unlimited"
|
|
555
|
-
],
|
|
569
|
+
], D = [
|
|
556
570
|
"",
|
|
557
571
|
"all",
|
|
558
572
|
"top",
|
|
@@ -561,7 +575,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
561
575
|
"left",
|
|
562
576
|
"block",
|
|
563
577
|
"inline"
|
|
564
|
-
],
|
|
578
|
+
], N = [
|
|
565
579
|
"",
|
|
566
580
|
"none",
|
|
567
581
|
"surface-light",
|
|
@@ -588,7 +602,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
588
602
|
"purpose-info",
|
|
589
603
|
"purpose-eco",
|
|
590
604
|
"purpose-notification"
|
|
591
|
-
],
|
|
605
|
+
], G = ["", "cover", "contain", "default"], O = ["", "none", "s", "m", "l", "xl"], q = [
|
|
592
606
|
"",
|
|
593
607
|
"default",
|
|
594
608
|
"title-4xl",
|
|
@@ -599,7 +613,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
599
613
|
"title-m",
|
|
600
614
|
"title-s",
|
|
601
615
|
"subtitle"
|
|
602
|
-
],
|
|
616
|
+
], E = [
|
|
603
617
|
"",
|
|
604
618
|
"purple-top-red",
|
|
605
619
|
"purple-top-magenta",
|
|
@@ -649,7 +663,7 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
649
663
|
"color-bottom-right-blue",
|
|
650
664
|
"color-bottom-right-turquoise",
|
|
651
665
|
"color-bottom-right-green"
|
|
652
|
-
],
|
|
666
|
+
], R = [
|
|
653
667
|
"none",
|
|
654
668
|
"2xs",
|
|
655
669
|
"xs",
|
|
@@ -659,14 +673,14 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
659
673
|
"heading-to-subtitle",
|
|
660
674
|
"heading-to-content",
|
|
661
675
|
"page-layout-between-sections"
|
|
662
|
-
],
|
|
676
|
+
], V = [
|
|
663
677
|
"",
|
|
664
678
|
"all",
|
|
665
679
|
"top",
|
|
666
680
|
"right",
|
|
667
681
|
"bottom",
|
|
668
682
|
"left"
|
|
669
|
-
],
|
|
683
|
+
], z = [
|
|
670
684
|
"",
|
|
671
685
|
"default",
|
|
672
686
|
"xs",
|
|
@@ -675,20 +689,20 @@ const v = ["", "default", "none", "l"], d = [
|
|
|
675
689
|
"l",
|
|
676
690
|
"xl"
|
|
677
691
|
];
|
|
678
|
-
function
|
|
692
|
+
function B(i) {
|
|
679
693
|
const t = document.createElement("style");
|
|
680
|
-
t.innerHTML =
|
|
694
|
+
t.innerHTML = i, document.head.appendChild(t);
|
|
681
695
|
}
|
|
682
|
-
function _(
|
|
683
|
-
return typeof
|
|
696
|
+
function _(i) {
|
|
697
|
+
return typeof i == "string" && (i === "false" || i === "0" || i === "null") || typeof i == "boolean" && !i;
|
|
684
698
|
}
|
|
685
|
-
function
|
|
699
|
+
function H() {
|
|
686
700
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
687
701
|
}
|
|
688
|
-
function
|
|
689
|
-
return
|
|
702
|
+
function P(i, t) {
|
|
703
|
+
return i.includes(t);
|
|
690
704
|
}
|
|
691
|
-
function
|
|
705
|
+
function F(i, t, s = !0) {
|
|
692
706
|
var e;
|
|
693
707
|
if ([
|
|
694
708
|
"aria-label",
|
|
@@ -724,53 +738,53 @@ function P(o, t, s = !0) {
|
|
|
724
738
|
"aria-invalid",
|
|
725
739
|
"aria-busy",
|
|
726
740
|
"aria-owns"
|
|
727
|
-
].forEach((
|
|
728
|
-
|
|
741
|
+
].forEach((o) => {
|
|
742
|
+
i.getAttribute(o) && (t.setAttribute(o, i.getAttribute(o)), i.removeAttribute(o));
|
|
729
743
|
}), s) {
|
|
730
|
-
const
|
|
731
|
-
t.setAttribute("id",
|
|
744
|
+
const o = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
745
|
+
t.setAttribute("id", o), i.setAttribute("aria-labelledby", o);
|
|
732
746
|
}
|
|
733
747
|
}
|
|
734
|
-
function
|
|
748
|
+
function X(i, t, s, e = "", o) {
|
|
735
749
|
const a = new CSSStyleSheet(), l = s.reduce(
|
|
736
750
|
(n, r) => n + `
|
|
737
|
-
${t(
|
|
738
|
-
${
|
|
739
|
-
${
|
|
751
|
+
${t(i, r)} {
|
|
752
|
+
${i}: var(--${e}-${r}-desktop);
|
|
753
|
+
${o ? `${o}:var(--${e}-${r}-desktop)` : ""}
|
|
740
754
|
}
|
|
741
755
|
/* Mobile only - max 767px */
|
|
742
756
|
@media only screen and (max-width: 47.938em) {
|
|
743
|
-
${t(
|
|
744
|
-
${
|
|
745
|
-
${
|
|
757
|
+
${t(i, r)} {
|
|
758
|
+
${i}: var(--${e}-${r}-mobile);
|
|
759
|
+
${o ? `${o}: var(--${e}-${r}-mobile)` : ""}
|
|
746
760
|
}
|
|
747
761
|
}
|
|
748
|
-
${t(
|
|
762
|
+
${t(i, r, "mobile")} {
|
|
749
763
|
/* Mobile only - max 767px */
|
|
750
764
|
@media only screen and (max-width: 47.938em) {
|
|
751
|
-
${
|
|
752
|
-
${
|
|
765
|
+
${i}: var(--${e}-${r}-mobile) !important;
|
|
766
|
+
${o ? `${o}: var(--${e}-${r}-mobile)` : ""}
|
|
753
767
|
}
|
|
754
768
|
}
|
|
755
|
-
${t(
|
|
769
|
+
${t(i, r, "tablet")} {
|
|
756
770
|
/* Tablet - min 768px max 1024px */
|
|
757
771
|
@media only screen and (min-width: 48em) and (max-width: 64em) {
|
|
758
|
-
${
|
|
759
|
-
${
|
|
772
|
+
${i}: var(--${e}-${r}-desktop) !important;
|
|
773
|
+
${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
|
|
760
774
|
}
|
|
761
775
|
}
|
|
762
|
-
${t(
|
|
776
|
+
${t(i, r, "laptop")} {
|
|
763
777
|
/* Laptop - 1025px*/
|
|
764
778
|
@media only screen and (min-width: 64.0625em) {
|
|
765
|
-
${
|
|
766
|
-
${
|
|
779
|
+
${i}: var(--${e}-${r}-desktop) !important;
|
|
780
|
+
${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
|
|
767
781
|
}
|
|
768
782
|
}
|
|
769
|
-
${t(
|
|
783
|
+
${t(i, r, "desktop")} {
|
|
770
784
|
/* Desktop - 1025px*/
|
|
771
785
|
@media only screen and (min-width: 64.0625em) {
|
|
772
|
-
${
|
|
773
|
-
${
|
|
786
|
+
${i}: var(--${e}-${r}-desktop) !important;
|
|
787
|
+
${o ? `${o}: var(--${e}-${r}-desktop)` : ""}
|
|
774
788
|
}
|
|
775
789
|
}`,
|
|
776
790
|
""
|
|
@@ -778,8 +792,8 @@ function F(o, t, s, e = "", i) {
|
|
|
778
792
|
return a.replaceSync(l), a;
|
|
779
793
|
}
|
|
780
794
|
class I {
|
|
781
|
-
constructor(t, s, e,
|
|
782
|
-
this.component = t, this.attributeName = s, this.cssVariable =
|
|
795
|
+
constructor(t, s, e, o) {
|
|
796
|
+
this.component = t, this.attributeName = s, this.cssVariable = o, 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(
|
|
783
797
|
this.component,
|
|
784
798
|
this.toCamelCase(this.attributeName),
|
|
785
799
|
{
|
|
@@ -811,10 +825,10 @@ class I {
|
|
|
811
825
|
}
|
|
812
826
|
}
|
|
813
827
|
setCSSProperty(t, s, e = !0) {
|
|
814
|
-
const [,
|
|
828
|
+
const [, o = ""] = t.split("--");
|
|
815
829
|
this.component.style.setProperty(
|
|
816
|
-
`${this.cssVariable}${e ? "-all" : ""}${
|
|
817
|
-
`${this._attributeValue(s,
|
|
830
|
+
`${this.cssVariable}${e ? "-all" : ""}${o ? `-${o}` : ""}`,
|
|
831
|
+
`${this._attributeValue(s, o)}`
|
|
818
832
|
);
|
|
819
833
|
}
|
|
820
834
|
setCSSProperties() {
|
|
@@ -836,12 +850,12 @@ class I {
|
|
|
836
850
|
e,
|
|
837
851
|
!1
|
|
838
852
|
);
|
|
839
|
-
const
|
|
853
|
+
const o = this.component.getAttribute(
|
|
840
854
|
this.attributeNameLaptop
|
|
841
855
|
);
|
|
842
|
-
|
|
856
|
+
o && this.setCSSProperty(
|
|
843
857
|
this.attributeNameLaptop,
|
|
844
|
-
|
|
858
|
+
o,
|
|
845
859
|
!1
|
|
846
860
|
);
|
|
847
861
|
const a = this.component.getAttribute(
|
|
@@ -859,38 +873,39 @@ class I {
|
|
|
859
873
|
}
|
|
860
874
|
export {
|
|
861
875
|
I as AttributeBreakpointHandlerDelegate,
|
|
862
|
-
|
|
876
|
+
v as PxElement,
|
|
863
877
|
p as WithExtraAttributes,
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
878
|
+
B as addGlobalStylesheet,
|
|
879
|
+
z as assetContainerImgWidthValues,
|
|
880
|
+
N as backgroundColorValues,
|
|
881
|
+
G as backgroundSizeValues,
|
|
882
|
+
T as borderColorValues,
|
|
883
|
+
L as borderRadiusValues,
|
|
884
|
+
D as borderSideValues,
|
|
885
|
+
M as borderValues,
|
|
886
|
+
O as boxShadowValues,
|
|
887
|
+
P as checkName,
|
|
888
|
+
S as colorValues,
|
|
875
889
|
c as cssGridAlignSelfValues,
|
|
876
890
|
f as cssGridColSpanValues,
|
|
877
891
|
g as cssGridJustifySelfValues,
|
|
878
892
|
m as cssGridOrderValues,
|
|
879
|
-
|
|
880
|
-
|
|
893
|
+
w as cssGridPlaceSelfValues,
|
|
894
|
+
X as cssTokenBreakpoints,
|
|
881
895
|
d as flexboxAlignSelfValues,
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
896
|
+
A as fontsizeValues,
|
|
897
|
+
$ as fontweightValues,
|
|
898
|
+
R as gapValues,
|
|
885
899
|
h as getSupportedAttributeNames,
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
900
|
+
H as getViewportFormat,
|
|
901
|
+
E as gradientValues,
|
|
902
|
+
y as gridGapValues,
|
|
903
|
+
q as headingValues,
|
|
904
|
+
k as iconSizeValues,
|
|
905
|
+
x as iconSizeValuesKC,
|
|
891
906
|
_ as isFalsy,
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
907
|
+
V as noBorderRadiusValues,
|
|
908
|
+
C as paddingValues,
|
|
909
|
+
j as textalignValues,
|
|
910
|
+
F as transferAccessibilityAttributes
|
|
896
911
|
};
|