@proximus/lavender-header 1.4.15-alpha.7 → 1.4.15-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/Header.d.ts +16 -0
- package/dist/index.es.js +9 -1
- package/package.json +1 -1
package/dist/Header.d.ts
CHANGED
|
@@ -9,6 +9,20 @@ import type { Dropdown } from '@proximus/lavender-dropdown';
|
|
|
9
9
|
import type { Stack } from '@proximus/lavender-layout';
|
|
10
10
|
import type { ButtonIcon } from '@proximus/lavender-button-icon';
|
|
11
11
|
import type { HeaderEventMap } from './events.ts';
|
|
12
|
+
/**
|
|
13
|
+
* Site header, wrapping the whole page: the page body itself is projected
|
|
14
|
+
* through the `main` slot.
|
|
15
|
+
*
|
|
16
|
+
* @slot skip - Slot for the skip link, e.g. `px-a[variant="skip-link"]`.
|
|
17
|
+
* @slot target-group - Slot for the segment `px-dropdown`.
|
|
18
|
+
* @slot user-language - Slot for the language `px-dropdown`.
|
|
19
|
+
* @slot header-logo - Slot for the logo link.
|
|
20
|
+
* @slot header-entries - Slot for the `px-header-item` navigation entries, which assign themselves to it.
|
|
21
|
+
* @slot header-actions - Slot for the `px-action-link` / `px-action-button` actions, which assign themselves to it.
|
|
22
|
+
* @slot header-panels - Slot for the `px-mdd` panels and the `px-header-mobile-menu`.
|
|
23
|
+
* @slot main - Slot for the page content.
|
|
24
|
+
* @slot editor - Slot for CMS authoring chrome. A page editor such as Magnolia injects its controls as direct children of `px-header`; without a slot they stay in the DOM but are never projected. Assign them to this slot to keep them visible.
|
|
25
|
+
*/
|
|
12
26
|
export declare class Header extends WithExtraAttributes {
|
|
13
27
|
#private;
|
|
14
28
|
internals: ElementInternals;
|
|
@@ -20,6 +34,8 @@ export declare class Header extends WithExtraAttributes {
|
|
|
20
34
|
static get observedAttributes(): string[];
|
|
21
35
|
attributeChangedCallback(attrName: string, oldValue: string, newValue: string): void;
|
|
22
36
|
get $backdropFilter(): HTMLDivElement;
|
|
37
|
+
/** Landing zone for CMS authoring chrome, see the `editor` slot. */
|
|
38
|
+
get $editorSlot(): HTMLSlotElement;
|
|
23
39
|
get $burgerMenu(): ButtonIcon;
|
|
24
40
|
get $slotMain(): HTMLSlotElement;
|
|
25
41
|
get $targetGroupDropdown(): Dropdown | null;
|
package/dist/index.es.js
CHANGED
|
@@ -342,7 +342,7 @@ var te = class extends HTMLElement {
|
|
|
342
342
|
customElements.get("px-mdd-a") || customElements.define("px-mdd-a", te);
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/header.css?inline
|
|
345
|
-
var ne = "#navigation-container{border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}#dropdown-zone--desktop{display:none}#primary-navigation{margin:0;padding:0;display:none}#primary-navigation div,#primary-navigation px-hstack{height:100%}#panel-container{z-index:999;position:absolute;top:0;left:0;right:0}#backdrop-filter{z-index:998;-webkit-backdrop-filter:saturate(180%)blur(15px);backdrop-filter:saturate(180%)blur(15px);background:#0000004d;width:100vw;height:100%;display:none;position:absolute;left:0}::slotted([slot=header-logo]){--px-size-icon-l:1.9rem;--px-size-icon-xl:1.9rem}@media screen and (width>=64.0625rem){#primary-navigation{display:block}#panel-container{top:auto}#dropdown-zone--desktop{justify-content:space-between;align-items:center;display:flex}#dropdown-zone--desktop ::slotted([slot=target-group]),#dropdown-zone--desktop ::slotted([slot=user-language]){margin-bottom:var(--px-spacing-s-laptop)}::slotted([slot=header-actions]){margin-bottom:var(--px-padding-s-laptop)}::slotted([slot=header-logo]){--px-size-icon-l:3.2rem;--px-size-icon-xl:3.2rem;margin-left:-.1rem}}@media screen and (width>=90.0625rem){#dropdown-zone--desktop ::slotted([slot=target-group]),#dropdown-zone--desktop ::slotted([slot=user-language]){margin-bottom:var(--px-spacing-s-desktop)}::slotted([slot=header-actions]){margin-bottom:var(--px-padding-s-desktop)}}";
|
|
345
|
+
var ne = "#navigation-container{border-bottom:var(--px-size-border-m) solid var(--px-color-border-main-default)}#editor-slot{z-index:1000;position:relative}#dropdown-zone--desktop{display:none}#primary-navigation{margin:0;padding:0;display:none}#primary-navigation div,#primary-navigation px-hstack{height:100%}#panel-container{z-index:999;position:absolute;top:0;left:0;right:0}#backdrop-filter{z-index:998;-webkit-backdrop-filter:saturate(180%)blur(15px);backdrop-filter:saturate(180%)blur(15px);background:#0000004d;width:100vw;height:100%;display:none;position:absolute;left:0}::slotted([slot=header-logo]){--px-size-icon-l:1.9rem;--px-size-icon-xl:1.9rem}@media screen and (width>=64.0625rem){#primary-navigation{display:block}#panel-container{top:auto}#dropdown-zone--desktop{justify-content:space-between;align-items:center;display:flex}#dropdown-zone--desktop ::slotted([slot=target-group]),#dropdown-zone--desktop ::slotted([slot=user-language]){margin-bottom:var(--px-spacing-s-laptop)}::slotted([slot=header-actions]){margin-bottom:var(--px-padding-s-laptop)}::slotted([slot=header-logo]){--px-size-icon-l:3.2rem;--px-size-icon-xl:3.2rem;margin-left:-.1rem}}@media screen and (width>=90.0625rem){#dropdown-zone--desktop ::slotted([slot=target-group]),#dropdown-zone--desktop ::slotted([slot=user-language]){margin-bottom:var(--px-spacing-s-desktop)}::slotted([slot=header-actions]){margin-bottom:var(--px-padding-s-desktop)}}";
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region ../../../node_modules/lodash-es/isObject.js
|
|
348
348
|
function w(e) {
|
|
@@ -480,6 +480,11 @@ var _e = "Menu", q = class extends t {
|
|
|
480
480
|
constructor() {
|
|
481
481
|
super(K), this.template = `
|
|
482
482
|
<div>
|
|
483
|
+
<!-- Landing zone for CMS authoring chrome. Elements injected by a CMS
|
|
484
|
+
page editor (Magnolia editor bars, placeholders...) end up as direct
|
|
485
|
+
children of px-header. Without a matching slot they stay in the DOM
|
|
486
|
+
but are never projected, so the controls become invisible. -->
|
|
487
|
+
<div id="editor-slot"><slot name="editor"></slot></div>
|
|
483
488
|
<header>
|
|
484
489
|
<slot name="skip"></slot>
|
|
485
490
|
<px-section
|
|
@@ -623,6 +628,9 @@ var _e = "Menu", q = class extends t {
|
|
|
623
628
|
get $backdropFilter() {
|
|
624
629
|
return this.shadowRoot.querySelector("#backdrop-filter");
|
|
625
630
|
}
|
|
631
|
+
get $editorSlot() {
|
|
632
|
+
return this.shadowRoot.querySelector("slot[name=\"editor\"]");
|
|
633
|
+
}
|
|
626
634
|
get $burgerMenu() {
|
|
627
635
|
return this.shadowRoot.querySelector("#burger-menu");
|
|
628
636
|
}
|