@proximus/lavender-header-minimal 1.4.8-beta.3
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/HeaderMinimal.d.ts +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +59 -0
- package/package.json +23 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WithExtraAttributes } from '@proximus/lavender-common';
|
|
2
|
+
import type { Section } from '@proximus/lavender-section';
|
|
3
|
+
export declare const styleSheet: CSSStyleSheet;
|
|
4
|
+
export declare class HeaderMinimal extends WithExtraAttributes {
|
|
5
|
+
internals: ElementInternals;
|
|
6
|
+
template: () => string;
|
|
7
|
+
constructor();
|
|
8
|
+
static get observedAttributes(): string[];
|
|
9
|
+
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
10
|
+
get $navigationContainer(): Section;
|
|
11
|
+
get inverted(): boolean;
|
|
12
|
+
set inverted(value: boolean);
|
|
13
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HeaderMinimal';
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { WithExtraAttributes as n } from "@proximus/lavender-common";
|
|
2
|
+
const r = ":host{display:block}:host *{box-sizing:border-box}", a = new CSSStyleSheet();
|
|
3
|
+
a.replaceSync(r);
|
|
4
|
+
class s extends n {
|
|
5
|
+
constructor() {
|
|
6
|
+
var e;
|
|
7
|
+
super(a), this.template = () => `
|
|
8
|
+
<div class="header-minimal">
|
|
9
|
+
<header>
|
|
10
|
+
<slot name="skip"></slot>
|
|
11
|
+
<px-section
|
|
12
|
+
id="navigation-container"
|
|
13
|
+
padding-inline="none"
|
|
14
|
+
padding-block="s"
|
|
15
|
+
background-color="surface-light"
|
|
16
|
+
border="m"
|
|
17
|
+
border-side="bottom"
|
|
18
|
+
>
|
|
19
|
+
<px-hstack gap="default" wrap="wrap" align-items="center">
|
|
20
|
+
<slot name="header-logo"></slot>
|
|
21
|
+
<px-spacer></px-spacer>
|
|
22
|
+
<slot name="user-language"></slot>
|
|
23
|
+
</px-hstack>
|
|
24
|
+
</px-section>
|
|
25
|
+
</header>
|
|
26
|
+
<slot name="main"></slot>
|
|
27
|
+
</div>
|
|
28
|
+
`, this.shadowRoot.innerHTML = this.template(), this.internals = (e = this.attachInternals) == null ? void 0 : e.call(this), this.role = "navigation", this.internals && (this.internals.role = "navigation");
|
|
29
|
+
}
|
|
30
|
+
static get observedAttributes() {
|
|
31
|
+
return [...super.observedAttributes, "inverted"];
|
|
32
|
+
}
|
|
33
|
+
attributeChangedCallback(e, t, i) {
|
|
34
|
+
if (t !== i)
|
|
35
|
+
switch (e) {
|
|
36
|
+
case "inverted":
|
|
37
|
+
this.inverted ? this.$navigationContainer.backgroundColor = "surface-dark" : this.$navigationContainer.backgroundColor = "surface-light";
|
|
38
|
+
break;
|
|
39
|
+
default:
|
|
40
|
+
super.attributeChangedCallback(e, t, i);
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
get $navigationContainer() {
|
|
45
|
+
var e;
|
|
46
|
+
return (e = this.shadowRoot) == null ? void 0 : e.querySelector("#navigation-container");
|
|
47
|
+
}
|
|
48
|
+
get inverted() {
|
|
49
|
+
return this.hasAttribute("inverted");
|
|
50
|
+
}
|
|
51
|
+
set inverted(e) {
|
|
52
|
+
e ? this.setAttribute("inverted", "") : this.removeAttribute("inverted");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
customElements.get("px-header-minimal") || customElements.define("px-header-minimal", s);
|
|
56
|
+
export {
|
|
57
|
+
s as HeaderMinimal,
|
|
58
|
+
a as styleSheet
|
|
59
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@proximus/lavender-header-minimal",
|
|
3
|
+
"version": "1.4.8-beta.3",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.es.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"transform-package-json": "node ../../../scripts/tranformPackageJson.js package.json dist/far/away",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
15
|
+
"test": "vitest run --coverage",
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"customElements": "dist/custom-elements.json",
|
|
22
|
+
"web-types": "./dist/web-types.json"
|
|
23
|
+
}
|