@proximus/lavender-light 2.0.0-alpha.69 → 2.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.
|
@@ -84,6 +84,7 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
84
84
|
];
|
|
85
85
|
}
|
|
86
86
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
87
|
+
var _a;
|
|
87
88
|
if (WithExtraAttributes.observedAttributes.indexOf(name) === -1) {
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
@@ -114,7 +115,7 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
114
115
|
name,
|
|
115
116
|
oldValue,
|
|
116
117
|
newValue,
|
|
117
|
-
this.
|
|
118
|
+
((_a = this.parentElement) == null ? void 0 : _a.localName) === "px-grid" ? cssGridAlignSelfValues : flexboxAlignSelfValues
|
|
118
119
|
);
|
|
119
120
|
break;
|
|
120
121
|
case "justify-self":
|
|
@@ -193,11 +194,19 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
193
194
|
var _a;
|
|
194
195
|
return (_a = this.parentElement) == null ? void 0 : _a.tagName.toLowerCase();
|
|
195
196
|
}
|
|
196
|
-
get
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
get isInsideGridOrStack() {
|
|
198
|
+
let parent = this.parentElement;
|
|
199
|
+
while (parent) {
|
|
200
|
+
if (parent.localName === "px-grid" || parent.localName === "px-stack" && (parent == null ? void 0 : parent.getAttribute("direction")) === "row") {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
if (window.getComputedStyle(parent).display === "contents") {
|
|
204
|
+
parent = parent.parentElement;
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
return false;
|
|
201
210
|
}
|
|
202
211
|
get grow() {
|
|
203
212
|
return this.getAttribute("grow");
|
|
@@ -456,7 +465,6 @@ class PxElement extends WithExtraAttributes {
|
|
|
456
465
|
}
|
|
457
466
|
}
|
|
458
467
|
connectedCallback() {
|
|
459
|
-
var _a;
|
|
460
468
|
for (const name of getSupportedPropertyNames(this.nativeName)) {
|
|
461
469
|
if (name === "constructor" || this.accessorExclusions.includes(name)) {
|
|
462
470
|
continue;
|
|
@@ -476,12 +484,9 @@ class PxElement extends WithExtraAttributes {
|
|
|
476
484
|
console.warn(`Could not create property ${name} for`, this.$el, e);
|
|
477
485
|
}
|
|
478
486
|
}
|
|
479
|
-
if (this.
|
|
480
|
-
const parentDirection = (_a = this.parentElement) == null ? void 0 : _a.getAttribute("direction");
|
|
487
|
+
if (this.isInsideGridOrStack) {
|
|
481
488
|
this.$el.style.display = "block";
|
|
482
|
-
|
|
483
|
-
this.$el.style.height = "100%";
|
|
484
|
-
}
|
|
489
|
+
this.$el.style.height = "100%";
|
|
485
490
|
}
|
|
486
491
|
}
|
|
487
492
|
get $el() {
|