@proximus/lavender-layout 1.4.1 → 1.4.2-beta.1
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/Spacer.d.ts +3 -0
- package/dist/index.es.js +9 -3
- package/package.json +1 -1
package/dist/Spacer.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare class Spacer extends HTMLElement {
|
|
2
2
|
private resizeObserver?;
|
|
3
|
+
private intersectionObserver?;
|
|
3
4
|
private recheckHandle?;
|
|
4
5
|
private isZeroSized;
|
|
5
6
|
private growValue;
|
|
@@ -15,4 +16,6 @@ export declare class Spacer extends HTMLElement {
|
|
|
15
16
|
private recalculateVisibility;
|
|
16
17
|
private handleSizeChange;
|
|
17
18
|
private updateParticipation;
|
|
19
|
+
get nogap(): boolean;
|
|
20
|
+
set nogap(value: boolean);
|
|
18
21
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -369,15 +369,15 @@ class $ extends HTMLElement {
|
|
|
369
369
|
super(), this.isZeroSized = !1, this.growValue = "1", this.isVertical = !1;
|
|
370
370
|
}
|
|
371
371
|
static get observedAttributes() {
|
|
372
|
-
return ["grow"];
|
|
372
|
+
return ["grow", "nogap"];
|
|
373
373
|
}
|
|
374
374
|
attributeChangedCallback(t, i, e) {
|
|
375
375
|
t === "grow" && (this.growValue = e || "1", this.isZeroSized || (this.style.flexGrow = this.growValue), this.scheduleRecheck());
|
|
376
376
|
}
|
|
377
377
|
connectedCallback() {
|
|
378
|
-
this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.resizeObserver = new ResizeObserver(() => {
|
|
378
|
+
this.growValue = this.getAttribute("grow") || "1", this.style.flexGrow = this.growValue, this.nogap && (this.resizeObserver = new ResizeObserver(() => {
|
|
379
379
|
this.handleSizeChange();
|
|
380
|
-
}), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck();
|
|
380
|
+
}), this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column", this.resizeObserver.observe(this), this.scheduleRecheck());
|
|
381
381
|
}
|
|
382
382
|
disconnectedCallback() {
|
|
383
383
|
var t;
|
|
@@ -404,6 +404,12 @@ class $ extends HTMLElement {
|
|
|
404
404
|
updateParticipation() {
|
|
405
405
|
this.isZeroSized ? (this.style.display = "none", this.style.flexGrow = "0") : (this.style.display = "", this.style.flexGrow = this.growValue);
|
|
406
406
|
}
|
|
407
|
+
get nogap() {
|
|
408
|
+
return this.hasAttribute("nogap");
|
|
409
|
+
}
|
|
410
|
+
set nogap(t) {
|
|
411
|
+
t ? this.setAttribute("nogap", "") : this.removeAttribute("nogap");
|
|
412
|
+
}
|
|
407
413
|
}
|
|
408
414
|
customElements.get("px-spacer") || customElements.define("px-spacer", $);
|
|
409
415
|
const S = ":host{display:block;box-sizing:border-box}slot[name=body-container]{min-height:100vh}#image-sticky-box{margin-top:-2.5em}", g = new CSSStyleSheet();
|