@proximus/lavender-common 1.3.0 → 1.4.1-alpha.10
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 +1 -2
- package/dist/index.es.js +37 -33
- package/package.json +1 -1
package/dist/common.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ export declare class WithExtraAttributes extends HTMLElement {
|
|
|
9
9
|
checkName<T extends readonly string[]>(values: T, value: string): boolean;
|
|
10
10
|
get $el(): Element;
|
|
11
11
|
get $parentElementName(): string;
|
|
12
|
-
get
|
|
13
|
-
get isStack(): boolean;
|
|
12
|
+
get isInsideGridOrStack(): boolean;
|
|
14
13
|
get grow(): string;
|
|
15
14
|
set grow(value: string);
|
|
16
15
|
get growMobile(): string;
|
package/dist/index.es.js
CHANGED
|
@@ -68,6 +68,7 @@ class p extends HTMLElement {
|
|
|
68
68
|
];
|
|
69
69
|
}
|
|
70
70
|
attributeChangedCallback(t, s, e) {
|
|
71
|
+
var o;
|
|
71
72
|
if (p.observedAttributes.indexOf(t) !== -1)
|
|
72
73
|
switch (t) {
|
|
73
74
|
case "grow":
|
|
@@ -96,7 +97,7 @@ class p extends HTMLElement {
|
|
|
96
97
|
t,
|
|
97
98
|
s,
|
|
98
99
|
e,
|
|
99
|
-
this.
|
|
100
|
+
((o = this.parentElement) == null ? void 0 : o.localName) === "px-grid" ? g : c
|
|
100
101
|
);
|
|
101
102
|
break;
|
|
102
103
|
case "justify-self":
|
|
@@ -168,11 +169,18 @@ class p extends HTMLElement {
|
|
|
168
169
|
var t;
|
|
169
170
|
return (t = this.parentElement) == null ? void 0 : t.tagName.toLowerCase();
|
|
170
171
|
}
|
|
171
|
-
get
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
get isInsideGridOrStack() {
|
|
173
|
+
let t = this.parentElement;
|
|
174
|
+
for (; t; ) {
|
|
175
|
+
if (t.localName === "px-grid" || t.localName === "px-stack" && (t == null ? void 0 : t.getAttribute("direction")) === "row")
|
|
176
|
+
return !0;
|
|
177
|
+
if (window.getComputedStyle(t).display === "contents") {
|
|
178
|
+
t = t.parentElement;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
return !1;
|
|
176
184
|
}
|
|
177
185
|
get grow() {
|
|
178
186
|
return this.getAttribute("grow");
|
|
@@ -423,25 +431,21 @@ class y extends p {
|
|
|
423
431
|
super.attributeChangedCallback(t, s, e), e === null ? this.$el.toggleAttribute(t) : this.$el.setAttribute(t, e);
|
|
424
432
|
}
|
|
425
433
|
connectedCallback() {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
if (!(s === "constructor" || this.accessorExclusions.includes(s)))
|
|
434
|
+
for (const t of b(this.nativeName))
|
|
435
|
+
if (!(t === "constructor" || this.accessorExclusions.includes(t)))
|
|
429
436
|
try {
|
|
430
|
-
Object.defineProperty(this,
|
|
437
|
+
Object.defineProperty(this, t, {
|
|
431
438
|
get() {
|
|
432
|
-
return this.$el[
|
|
439
|
+
return this.$el[t];
|
|
433
440
|
},
|
|
434
|
-
set(
|
|
435
|
-
this.$el[
|
|
441
|
+
set(s) {
|
|
442
|
+
this.$el[t] !== s && (this.$el[t] = s);
|
|
436
443
|
}
|
|
437
444
|
});
|
|
438
|
-
} catch (
|
|
439
|
-
console.warn(`Could not create property ${
|
|
445
|
+
} catch (s) {
|
|
446
|
+
console.warn(`Could not create property ${t} for`, this.$el, s);
|
|
440
447
|
}
|
|
441
|
-
|
|
442
|
-
const s = (t = this.parentElement) == null ? void 0 : t.getAttribute("direction");
|
|
443
|
-
this.$el.style.display = "block", (this.isGrid || this.isStack && s === "row") && (this.$el.style.height = "100%");
|
|
444
|
-
}
|
|
448
|
+
this.isInsideGridOrStack && (this.$el.style.display = "block", this.$el.style.height = "100%");
|
|
445
449
|
}
|
|
446
450
|
get $el() {
|
|
447
451
|
return this.shadowRoot.querySelector(this.nativeName);
|
|
@@ -567,7 +571,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
567
571
|
"m",
|
|
568
572
|
"l",
|
|
569
573
|
"xl"
|
|
570
|
-
], M = ["", "none", "s", "m", "l"], T = ["", "none", "main", "pill"],
|
|
574
|
+
], M = ["", "none", "s", "m", "l"], T = ["", "none", "main", "pill"], N = [
|
|
571
575
|
"none",
|
|
572
576
|
"main",
|
|
573
577
|
"brand",
|
|
@@ -578,7 +582,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
578
582
|
"purpose-warning",
|
|
579
583
|
"purpose-error",
|
|
580
584
|
"purpose-unlimited"
|
|
581
|
-
],
|
|
585
|
+
], D = [
|
|
582
586
|
"",
|
|
583
587
|
"all",
|
|
584
588
|
"top",
|
|
@@ -615,7 +619,7 @@ const w = ["", "default", "none", "l"], c = [
|
|
|
615
619
|
"purpose-eco",
|
|
616
620
|
"purpose-notification",
|
|
617
621
|
"footer"
|
|
618
|
-
],
|
|
622
|
+
], q = ["", "cover", "contain", "default"], E = ["", "none", "s", "m", "l", "xl"], G = [
|
|
619
623
|
"",
|
|
620
624
|
"default",
|
|
621
625
|
"title-4xl",
|
|
@@ -712,10 +716,10 @@ function z(i) {
|
|
|
712
716
|
function H() {
|
|
713
717
|
return window.matchMedia("only screen and (min-width: 768px)").matches ? "tablet" : window.matchMedia("only screen and (min-width: 1025px)").matches ? "laptop" : "mobile";
|
|
714
718
|
}
|
|
715
|
-
function
|
|
719
|
+
function I(i, t) {
|
|
716
720
|
return i.includes(t);
|
|
717
721
|
}
|
|
718
|
-
function
|
|
722
|
+
function F(i, t, s = !0) {
|
|
719
723
|
var e;
|
|
720
724
|
if ([
|
|
721
725
|
"aria-label",
|
|
@@ -758,7 +762,7 @@ function X(i, t, s = !0) {
|
|
|
758
762
|
t.setAttribute("id", o), i.setAttribute("aria-labelledby", o);
|
|
759
763
|
}
|
|
760
764
|
}
|
|
761
|
-
function
|
|
765
|
+
function X(i, t, s, e = "", o) {
|
|
762
766
|
const a = new CSSStyleSheet(), l = s.reduce(
|
|
763
767
|
(n, r) => n + `
|
|
764
768
|
${t(i, r)} {
|
|
@@ -891,20 +895,20 @@ export {
|
|
|
891
895
|
V as addGlobalStylesheet,
|
|
892
896
|
R as assetContainerImgWidthValues,
|
|
893
897
|
O as backgroundColorValues,
|
|
894
|
-
|
|
895
|
-
|
|
898
|
+
q as backgroundSizeValues,
|
|
899
|
+
N as borderColorValues,
|
|
896
900
|
T as borderRadiusValues,
|
|
897
|
-
|
|
901
|
+
D as borderSideValues,
|
|
898
902
|
M as borderValues,
|
|
899
|
-
|
|
900
|
-
|
|
903
|
+
E as boxShadowValues,
|
|
904
|
+
I as checkName,
|
|
901
905
|
$ as colorValues,
|
|
902
906
|
g as cssGridAlignSelfValues,
|
|
903
907
|
m as cssGridColSpanValues,
|
|
904
908
|
f as cssGridJustifySelfValues,
|
|
905
909
|
k as cssGridOrderValues,
|
|
906
910
|
A as cssGridPlaceSelfValues,
|
|
907
|
-
|
|
911
|
+
X as cssTokenBreakpoints,
|
|
908
912
|
c as flexboxAlignSelfValues,
|
|
909
913
|
S as fontsizeValues,
|
|
910
914
|
x as fontweightValues,
|
|
@@ -914,12 +918,12 @@ export {
|
|
|
914
918
|
H as getViewportFormat,
|
|
915
919
|
P as gradientValues,
|
|
916
920
|
w as gridGapValues,
|
|
917
|
-
|
|
921
|
+
G as headingValues,
|
|
918
922
|
v as iconSizeValues,
|
|
919
923
|
j as iconSizeValuesKC,
|
|
920
924
|
z as isFalsy,
|
|
921
925
|
B as noBorderRadiusValues,
|
|
922
926
|
L as paddingValues,
|
|
923
927
|
C as textalignValues,
|
|
924
|
-
|
|
928
|
+
F as transferAccessibilityAttributes
|
|
925
929
|
};
|