@proximus/lavender-header-minimal 2.0.0-alpha.168 → 2.0.0-alpha.170
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.es.js +34 -61
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,62 +1,35 @@
|
|
|
1
|
-
import { WithExtraAttributes as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
static get observedAttributes() {
|
|
34
|
-
return [...super.observedAttributes, "inverted"];
|
|
35
|
-
}
|
|
36
|
-
attributeChangedCallback(e, t, i) {
|
|
37
|
-
if (t !== i)
|
|
38
|
-
switch (e) {
|
|
39
|
-
case "inverted":
|
|
40
|
-
this.inverted ? this.$navigationContainer.backgroundColor = "surface-dark" : this.$navigationContainer.backgroundColor = "surface-light";
|
|
41
|
-
break;
|
|
42
|
-
default:
|
|
43
|
-
super.attributeChangedCallback(e, t, i);
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
get $navigationContainer() {
|
|
48
|
-
var e;
|
|
49
|
-
return (e = this.shadowRoot) == null ? void 0 : e.querySelector("#navigation-container");
|
|
50
|
-
}
|
|
51
|
-
get inverted() {
|
|
52
|
-
return this.hasAttribute("inverted");
|
|
53
|
-
}
|
|
54
|
-
set inverted(e) {
|
|
55
|
-
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
customElements.get("px-header-minimal") || customElements.define("px-header-minimal", s);
|
|
59
|
-
export {
|
|
60
|
-
s as HeaderMinimal,
|
|
61
|
-
a as styleSheet
|
|
1
|
+
import { WithExtraAttributes as e } from "@proximus/lavender-common";
|
|
2
|
+
//#region src/header-minimal.css?inline
|
|
3
|
+
var t = ":host{display:block}:host *{box-sizing:border-box}", n = new CSSStyleSheet();
|
|
4
|
+
n.replaceSync(t);
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(n), this.template = () => "\n <div class=\"header-minimal\">\n <header>\n <slot name=\"skip\"></slot>\n <px-section \n id=\"navigation-container\" \n padding-inline=\"none\"\n padding-block=\"s\"\n background-color=\"surface-light\"\n border=\"m\"\n border-side=\"bottom\"\n >\n <px-hstack gap=\"default\" wrap=\"wrap\" align-items=\"center\">\n <slot name=\"header-logo\"></slot>\n <px-spacer></px-spacer>\n <slot name=\"user-language\"></slot>\n </px-hstack>\n </px-section>\n </header>\n <slot name=\"main\"></slot>\n </div>\n ", this.shadowRoot.innerHTML = this.template(), this.internals = this.attachInternals?.(), this.internals && (this.internals.role = "navigation");
|
|
8
|
+
}
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
this.role = "navigation";
|
|
11
|
+
}
|
|
12
|
+
static get observedAttributes() {
|
|
13
|
+
return [...super.observedAttributes, "inverted"];
|
|
14
|
+
}
|
|
15
|
+
attributeChangedCallback(e, t, n) {
|
|
16
|
+
if (t !== n) switch (e) {
|
|
17
|
+
case "inverted":
|
|
18
|
+
this.inverted ? this.$navigationContainer.backgroundColor = "surface-dark" : this.$navigationContainer.backgroundColor = "surface-light";
|
|
19
|
+
break;
|
|
20
|
+
default: super.attributeChangedCallback(e, t, n);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
get $navigationContainer() {
|
|
24
|
+
return this.shadowRoot?.querySelector("#navigation-container");
|
|
25
|
+
}
|
|
26
|
+
get inverted() {
|
|
27
|
+
return this.hasAttribute("inverted");
|
|
28
|
+
}
|
|
29
|
+
set inverted(e) {
|
|
30
|
+
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
31
|
+
}
|
|
62
32
|
};
|
|
33
|
+
customElements.get("px-header-minimal") || customElements.define("px-header-minimal", r);
|
|
34
|
+
//#endregion
|
|
35
|
+
export { r as HeaderMinimal, n as styleSheet };
|