@proximus/lavender-banner 1.4.5-beta.1 → 1.4.5-beta.2
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/Banner.d.ts +2 -0
- package/dist/index.es.js +12 -4
- package/package.json +1 -1
package/dist/Banner.d.ts
CHANGED
|
@@ -5,11 +5,13 @@ import '@proximus/lavender-grid';
|
|
|
5
5
|
import { VerticallyExtendedElement } from '@proximus/lavender-common';
|
|
6
6
|
export declare class Banner extends VerticallyExtendedElement<HTMLDivElement> {
|
|
7
7
|
static nativeName: string;
|
|
8
|
+
observer: MutationObserver;
|
|
8
9
|
private template;
|
|
9
10
|
constructor();
|
|
10
11
|
static get observedAttributes(): string[];
|
|
11
12
|
connectedCallback(): void;
|
|
12
13
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
13
15
|
createGridTemplateAreas(): void;
|
|
14
16
|
createGridding(value?: string): void;
|
|
15
17
|
get $grid(): Grid;
|
package/dist/index.es.js
CHANGED
|
@@ -24,15 +24,15 @@ const C = [
|
|
|
24
24
|
"space-around",
|
|
25
25
|
"space-evenly",
|
|
26
26
|
"stretch"
|
|
27
|
-
], $ = ["", "start", "end", "center", "stretch"], I = (u, t, i) => `:host([${u}${i ? `--${i}` : ""}='${t}']) .grid`,
|
|
27
|
+
], $ = ["", "start", "end", "center", "stretch"], I = (u, t, i) => `:host([${u}${i ? `--${i}` : ""}='${t}']) .grid`, T = "px-spacing", S = b(
|
|
28
28
|
"gap",
|
|
29
29
|
I,
|
|
30
30
|
m,
|
|
31
|
-
|
|
31
|
+
T,
|
|
32
32
|
"--grid-gap"
|
|
33
33
|
), o = class o extends h {
|
|
34
34
|
constructor() {
|
|
35
|
-
super(g,
|
|
35
|
+
super(g, S), this.template = () => `<div class="grid">
|
|
36
36
|
<slot></slot>
|
|
37
37
|
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
38
38
|
}
|
|
@@ -362,7 +362,12 @@ const l = class l extends f {
|
|
|
362
362
|
}
|
|
363
363
|
connectedCallback() {
|
|
364
364
|
var t;
|
|
365
|
-
(t = super.connectedCallback) == null || t.call(this), this.createGridTemplateAreas(), this.createGridding()
|
|
365
|
+
(t = super.connectedCallback) == null || t.call(this), this.createGridTemplateAreas(), this.createGridding(), this.observer = new MutationObserver(() => {
|
|
366
|
+
this.createGridTemplateAreas(), this.createGridding();
|
|
367
|
+
}), this.observer.observe(this, {
|
|
368
|
+
childList: !0,
|
|
369
|
+
subtree: !0
|
|
370
|
+
});
|
|
366
371
|
}
|
|
367
372
|
attributeChangedCallback(t, i, e) {
|
|
368
373
|
if (i !== e)
|
|
@@ -410,6 +415,9 @@ const l = class l extends f {
|
|
|
410
415
|
break;
|
|
411
416
|
}
|
|
412
417
|
}
|
|
418
|
+
disconnectedCallback() {
|
|
419
|
+
this.observer.disconnect();
|
|
420
|
+
}
|
|
413
421
|
createGridTemplateAreas() {
|
|
414
422
|
const t = this.shadowRoot.querySelector(
|
|
415
423
|
".banner-content"
|