@proximus/lavender-common 0.1.0-alpha.61 → 1.0.0-alpha.62
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.js +74 -68
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ function d(o) {
|
|
|
5
5
|
}
|
|
6
6
|
const b = new CSSStyleSheet();
|
|
7
7
|
b.replaceSync(u);
|
|
8
|
-
class
|
|
8
|
+
class p extends HTMLElement {
|
|
9
9
|
static get observedAttributes() {
|
|
10
10
|
return [
|
|
11
11
|
"grow",
|
|
@@ -58,7 +58,7 @@ class n extends HTMLElement {
|
|
|
58
58
|
];
|
|
59
59
|
}
|
|
60
60
|
attributeChangedCallback(t, s, e) {
|
|
61
|
-
if (
|
|
61
|
+
if (p.observedAttributes.indexOf(t) !== -1)
|
|
62
62
|
switch (t) {
|
|
63
63
|
case "grow":
|
|
64
64
|
case "grow--mobile":
|
|
@@ -122,32 +122,32 @@ class n extends HTMLElement {
|
|
|
122
122
|
console.error(`Bad ${t} value for`, this.$el);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
const a = t.indexOf("--") > -1, r = a ? t.split("--")[0] : t,
|
|
125
|
+
const a = t.indexOf("--") > -1, r = a ? t.split("--")[0] : t, n = [];
|
|
126
126
|
if (!a)
|
|
127
|
-
this.getAttribute(r + "--mobile") ||
|
|
128
|
-
|
|
127
|
+
this.getAttribute(r + "--mobile") || n.push("mobile"), this.getAttribute(r + "--tablet") || n.push("tablet"), this.getAttribute(r + "--laptop") || n.push("laptop"), this.getAttribute(r + "--desktop") || n.push("desktop"), n.forEach((l) => {
|
|
128
|
+
p.prototype.updateStyle.call(
|
|
129
129
|
this,
|
|
130
130
|
r,
|
|
131
|
-
|
|
131
|
+
l,
|
|
132
132
|
s
|
|
133
|
-
),
|
|
133
|
+
), p.prototype.updateStyle.call(
|
|
134
134
|
this,
|
|
135
135
|
r,
|
|
136
|
-
|
|
136
|
+
l,
|
|
137
137
|
e
|
|
138
138
|
);
|
|
139
139
|
});
|
|
140
140
|
else {
|
|
141
|
-
const
|
|
142
|
-
|
|
141
|
+
const l = t.split("--")[1];
|
|
142
|
+
p.prototype.updateStyle.call(
|
|
143
143
|
this,
|
|
144
144
|
r,
|
|
145
|
-
|
|
145
|
+
l,
|
|
146
146
|
s
|
|
147
|
-
),
|
|
147
|
+
), p.prototype.updateStyle.call(
|
|
148
148
|
this,
|
|
149
149
|
r,
|
|
150
|
-
|
|
150
|
+
l,
|
|
151
151
|
e
|
|
152
152
|
);
|
|
153
153
|
}
|
|
@@ -409,7 +409,7 @@ class n extends HTMLElement {
|
|
|
409
409
|
this.setAttribute("order--desktop", t);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
class k extends
|
|
412
|
+
class k extends p {
|
|
413
413
|
static get observedAttributes() {
|
|
414
414
|
return [
|
|
415
415
|
...super.observedAttributes,
|
|
@@ -523,7 +523,7 @@ const y = [
|
|
|
523
523
|
"heading-l",
|
|
524
524
|
"heading-m",
|
|
525
525
|
"heading-s"
|
|
526
|
-
],
|
|
526
|
+
], v = [
|
|
527
527
|
"",
|
|
528
528
|
"default",
|
|
529
529
|
"inherit",
|
|
@@ -541,7 +541,7 @@ const y = [
|
|
|
541
541
|
"purpose-error",
|
|
542
542
|
"purpose-unlimited",
|
|
543
543
|
"purpose-promo"
|
|
544
|
-
],
|
|
544
|
+
], S = [
|
|
545
545
|
"",
|
|
546
546
|
"default",
|
|
547
547
|
"inherit",
|
|
@@ -549,7 +549,7 @@ const y = [
|
|
|
549
549
|
"bold",
|
|
550
550
|
"extrabold",
|
|
551
551
|
"light"
|
|
552
|
-
],
|
|
552
|
+
], $ = [
|
|
553
553
|
"",
|
|
554
554
|
"default",
|
|
555
555
|
"2xs",
|
|
@@ -559,7 +559,7 @@ const y = [
|
|
|
559
559
|
"l",
|
|
560
560
|
"xl",
|
|
561
561
|
"2xl"
|
|
562
|
-
], j = ["", "default", "left", "center", "right"],
|
|
562
|
+
], j = ["", "default", "left", "center", "right"], x = ["", "none", "2xs", "xs", "s", "m", "l"], C = ["", "none", "s", "m", "l"], M = ["", "none", "main", "pill"], L = [
|
|
563
563
|
"none",
|
|
564
564
|
"container-main",
|
|
565
565
|
"container-brand",
|
|
@@ -570,7 +570,7 @@ const y = [
|
|
|
570
570
|
"purpose-warning",
|
|
571
571
|
"purpose-error",
|
|
572
572
|
"purpose-unlimited"
|
|
573
|
-
],
|
|
573
|
+
], T = [
|
|
574
574
|
"",
|
|
575
575
|
"all",
|
|
576
576
|
"top",
|
|
@@ -579,7 +579,7 @@ const y = [
|
|
|
579
579
|
"left",
|
|
580
580
|
"block",
|
|
581
581
|
"inline"
|
|
582
|
-
],
|
|
582
|
+
], D = [
|
|
583
583
|
"",
|
|
584
584
|
"none",
|
|
585
585
|
"container-neutral-bare",
|
|
@@ -606,7 +606,7 @@ const y = [
|
|
|
606
606
|
"purpose-info",
|
|
607
607
|
"purpose-eco",
|
|
608
608
|
"purpose-notification"
|
|
609
|
-
],
|
|
609
|
+
], N = ["", "cover", "contain", "default"], G = ["", "none", "s", "m", "l", "xl"], O = [
|
|
610
610
|
"",
|
|
611
611
|
"default",
|
|
612
612
|
"title-4xl",
|
|
@@ -617,7 +617,7 @@ const y = [
|
|
|
617
617
|
"title-m",
|
|
618
618
|
"title-s",
|
|
619
619
|
"subtitle"
|
|
620
|
-
],
|
|
620
|
+
], q = [
|
|
621
621
|
"",
|
|
622
622
|
"purple-top-red",
|
|
623
623
|
"purple-top-magenta",
|
|
@@ -667,7 +667,7 @@ const y = [
|
|
|
667
667
|
"color-bottom-right-blue",
|
|
668
668
|
"color-bottom-right-turquoise",
|
|
669
669
|
"color-bottom-right-green"
|
|
670
|
-
],
|
|
670
|
+
], V = [
|
|
671
671
|
"after-element-none",
|
|
672
672
|
"after-element-2xs",
|
|
673
673
|
"after-element-xs",
|
|
@@ -682,35 +682,35 @@ const y = [
|
|
|
682
682
|
"inside-section-default",
|
|
683
683
|
"inside-section-l",
|
|
684
684
|
"between-sections"
|
|
685
|
-
],
|
|
685
|
+
], B = [
|
|
686
686
|
"",
|
|
687
687
|
"all",
|
|
688
688
|
"top",
|
|
689
689
|
"right",
|
|
690
690
|
"bottom",
|
|
691
691
|
"left"
|
|
692
|
-
],
|
|
692
|
+
], R = [
|
|
693
693
|
"",
|
|
694
694
|
"default",
|
|
695
695
|
"xs",
|
|
696
696
|
"s",
|
|
697
697
|
"l",
|
|
698
698
|
"2xl"
|
|
699
|
-
],
|
|
700
|
-
function
|
|
699
|
+
], z = ["", "default", "s", "m", "l"];
|
|
700
|
+
function H(o) {
|
|
701
701
|
const t = document.createElement("style");
|
|
702
702
|
t.innerHTML = o, document.head.appendChild(t);
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function E(o) {
|
|
705
705
|
return typeof o == "string" && (o === "false" || o === "0" || o === "null") || typeof o == "boolean" && !o;
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function F() {
|
|
708
708
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function I(o, t) {
|
|
711
711
|
return o.includes(t);
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function J(o, t) {
|
|
714
714
|
var e;
|
|
715
715
|
[
|
|
716
716
|
"aria-label",
|
|
@@ -752,40 +752,46 @@ function I(o, t) {
|
|
|
752
752
|
const s = `px-${((e = t.localName) == null ? void 0 : e.toLowerCase()) ?? "component"}-${Math.random().toString(36).substring(2, 15)}`;
|
|
753
753
|
t.setAttribute("id", s), o.setAttribute("aria-labelledby", s);
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
const
|
|
757
|
-
(
|
|
755
|
+
function U(o, t, s, e = "", i) {
|
|
756
|
+
const a = new CSSStyleSheet(), r = s.reduce(
|
|
757
|
+
(n, l) => n + `
|
|
758
758
|
${t(o, l)} {
|
|
759
|
-
|
|
760
|
-
@media only screen and (max-width: 768px) {
|
|
759
|
+
@media only screen and (max-width: 767px) {
|
|
761
760
|
${o}: var(--${e}-${l}-mobile);
|
|
761
|
+
${i ? `${i}: var(--${e}-${l}-mobile)` : ""}
|
|
762
762
|
}
|
|
763
|
+
${o}: var(--${e}-${l}-desktop);
|
|
764
|
+
${i ? `${i}:var(--${e}-${l}-desktop)` : ""}
|
|
763
765
|
}
|
|
764
766
|
${t(o, l, "mobile")} {
|
|
765
|
-
@media only screen and (max-width:
|
|
767
|
+
@media only screen and (max-width: 767px) {
|
|
766
768
|
${o}: var(--${e}-${l}-mobile) !important;
|
|
769
|
+
${i ? `${i}: var(--${e}-${l}-mobile)` : ""}
|
|
767
770
|
}
|
|
768
771
|
}
|
|
769
772
|
${t(o, l, "tablet")} {
|
|
770
|
-
@media only screen and (min-width:
|
|
771
|
-
${o}: var(--${e}-${l}-
|
|
773
|
+
@media only screen and (min-width: 768px) {
|
|
774
|
+
${o}: var(--${e}-${l}-desktop) !important;
|
|
775
|
+
${i ? `${i}: var(--${e}-${l}-desktop)` : ""}
|
|
772
776
|
}
|
|
773
777
|
}
|
|
774
778
|
${t(o, l, "laptop")} {
|
|
775
|
-
@media only screen and (min-width:
|
|
776
|
-
${o}: var(--${e}-${l}-
|
|
779
|
+
@media only screen and (min-width: 768px) {
|
|
780
|
+
${o}: var(--${e}-${l}-desktop) !important;
|
|
781
|
+
${i ? `${i}: var(--${e}-${l}-desktop)` : ""}
|
|
777
782
|
}
|
|
778
783
|
}
|
|
779
784
|
${t(o, l, "desktop")} {
|
|
780
|
-
@media only screen and (min-width:
|
|
785
|
+
@media only screen and (min-width: 768px) {
|
|
781
786
|
${o}: var(--${e}-${l}-desktop) !important;
|
|
787
|
+
${i ? `${i}: var(--${e}-${l}-desktop)` : ""}
|
|
782
788
|
}
|
|
783
789
|
}`,
|
|
784
790
|
""
|
|
785
791
|
);
|
|
786
|
-
return
|
|
792
|
+
return a.replaceSync(r), a;
|
|
787
793
|
}
|
|
788
|
-
class
|
|
794
|
+
class K {
|
|
789
795
|
constructor(t, s, e, i) {
|
|
790
796
|
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(
|
|
791
797
|
this.component,
|
|
@@ -866,40 +872,40 @@ class U {
|
|
|
866
872
|
}
|
|
867
873
|
}
|
|
868
874
|
export {
|
|
869
|
-
|
|
875
|
+
K as AttributeBreakpointHandlerDelegate,
|
|
870
876
|
k as PxElement,
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
877
|
+
p as WithExtraAttributes,
|
|
878
|
+
H as addGlobalStylesheet,
|
|
879
|
+
R as assetContainerIconSizeValues,
|
|
880
|
+
z as assetContainerImgWidthValues,
|
|
881
|
+
D as backgroundColorValues,
|
|
882
|
+
N as backgroundSizeValues,
|
|
883
|
+
L as borderColorValues,
|
|
884
|
+
M as borderRadiusValues,
|
|
885
|
+
T as borderSideValues,
|
|
880
886
|
C as borderValues,
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
887
|
+
G as boxShadowValues,
|
|
888
|
+
I as checkName,
|
|
889
|
+
v as colorValues,
|
|
884
890
|
c as cssGridAlignSelfValues,
|
|
885
891
|
f as cssGridColSpanValues,
|
|
886
892
|
g as cssGridJustifySelfValues,
|
|
887
893
|
m as cssGridOrderValues,
|
|
888
894
|
A as cssGridPlaceSelfValues,
|
|
889
|
-
|
|
895
|
+
U as cssTokenBreakpoints,
|
|
890
896
|
h as flexboxAlignSelfValues,
|
|
891
897
|
w as fontsizeValues,
|
|
892
|
-
|
|
893
|
-
|
|
898
|
+
S as fontweightValues,
|
|
899
|
+
V as gapValues,
|
|
894
900
|
d as getSupportedAttributeNames,
|
|
895
|
-
|
|
896
|
-
|
|
901
|
+
F as getViewportFormat,
|
|
902
|
+
q as gradientValues,
|
|
897
903
|
y as gridGapValues,
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
904
|
+
O as headingValues,
|
|
905
|
+
$ as iconSizeValues,
|
|
906
|
+
E as isFalsy,
|
|
907
|
+
B as noBorderRadiusValues,
|
|
908
|
+
x as paddingValues,
|
|
903
909
|
j as textalignValues,
|
|
904
|
-
|
|
910
|
+
J as transferAccessibilityAttributes
|
|
905
911
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0-alpha.62",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "ea5946118576717674836f6a121d6daea77d2a09",
|
|
28
28
|
"lerna": {
|
|
29
29
|
"command": {
|
|
30
30
|
"publish": {
|