@swisspost/design-system-components 9.0.0-next.23 → 9.0.0-next.25
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/cjs/{index-5acef487.js → index-d6bf2c66.js} +1 -5
- package/dist/cjs/index.cjs.js +22 -22
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-fdebc7ce.js → package-c7d204b7.js} +1 -1
- package/dist/cjs/{post-accordion-d6ddb379.js → post-accordion-17294430.js} +2 -2
- package/dist/cjs/{post-accordion-item-61aed72f.js → post-accordion-item-da4339cd.js} +2 -2
- package/dist/cjs/post-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/{post-avatar-b5d6aaa9.js → post-avatar-4406be64.js} +2 -2
- package/dist/cjs/post-avatar.cjs.entry.js +3 -3
- package/dist/cjs/{post-back-to-top-80cbf486.js → post-back-to-top-7ce45d24.js} +5 -5
- package/dist/cjs/post-back-to-top.cjs.entry.js +4 -4
- package/dist/cjs/{post-banner-72f433b1.js → post-banner-d7e1b7d5.js} +2 -2
- package/dist/cjs/post-banner.cjs.entry.js +3 -3
- package/dist/cjs/{post-breadcrumb-63107527.js → post-breadcrumb-6a5984b4.js} +2 -2
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumb.cjs.entry.js +3 -3
- package/dist/cjs/{post-card-control-dfb221d5.js → post-card-control-8071448c.js} +2 -2
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +4 -4
- package/dist/cjs/{post-collapsible-trigger-e24eae7e.js → post-collapsible-trigger-b0d3df22.js} +2 -2
- package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -3
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/{post-footer-cfa3cc4c.js → post-footer-f38ef472.js} +2 -2
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/{post-linkarea-9e808259.js → post-linkarea-3a0f8a49.js} +2 -2
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/{post-menu-item-0e147e2c.js → post-menu-item-107b6d80.js} +2 -2
- package/dist/cjs/{post-popover-bddabf57.js → post-popover-7f47ee07.js} +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-f4c48349.js → post-rating-8981e238.js} +2 -2
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-header-246cd064.js → post-tab-header-f89119cb.js} +2 -2
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-0e494e5c.js → post-tab-panel-665c1400.js} +2 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-3ead6ac7.js → post-tabs-579f5e97.js} +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tag-f62abd13.js → post-tag-b13a44ae.js} +2 -2
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-togglebutton-63708f9f.js → post-togglebutton-241c1868.js} +136 -94
- package/dist/cjs/{post-tooltip-2f80afc8.js → post-tooltip-bedfc58a.js} +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/{slide-8ae17ee4.js → slide-cd1f09b3.js} +6 -6
- package/dist/collection/animations/slide.js +6 -6
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +2 -2
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +75 -54
- package/dist/collection/components/post-language-option/post-language-option.js +23 -1
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +61 -33
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-back-to-top2.js +3 -3
- package/dist/components/post-header2.js +77 -56
- package/dist/components/post-language-option2.js +9 -1
- package/dist/components/post-language-switch2.js +48 -35
- package/dist/components/post-mainnavigation2.js +1 -1
- package/dist/components/slide.js +7 -7
- package/dist/docs.json +27 -2
- package/dist/esm/{index-40846676.js → index-3419e46d.js} +1 -5
- package/dist/esm/index.js +22 -22
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-6dd1a273.js +3 -0
- package/dist/esm/{post-accordion-72896a6b.js → post-accordion-0a3d5cb5.js} +2 -2
- package/dist/esm/{post-accordion-item-42446f00.js → post-accordion-item-7cd61396.js} +2 -2
- package/dist/esm/post-accordion-item.entry.js +3 -3
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/{post-avatar-3d552832.js → post-avatar-887e552c.js} +2 -2
- package/dist/esm/post-avatar.entry.js +3 -3
- package/dist/esm/{post-back-to-top-dbfe00b0.js → post-back-to-top-04066434.js} +5 -5
- package/dist/esm/post-back-to-top.entry.js +4 -4
- package/dist/esm/{post-banner-3ec35c25.js → post-banner-244b9664.js} +2 -2
- package/dist/esm/post-banner.entry.js +3 -3
- package/dist/esm/{post-breadcrumb-640a1b7a.js → post-breadcrumb-9b85c503.js} +2 -2
- package/dist/esm/post-breadcrumb-item_2.entry.js +3 -3
- package/dist/esm/post-breadcrumb.entry.js +3 -3
- package/dist/esm/{post-card-control-549f9ac0.js → post-card-control-1329dcfe.js} +2 -2
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-closebutton_15.entry.js +4 -4
- package/dist/esm/{post-collapsible-trigger-76749a79.js → post-collapsible-trigger-d2b5247c.js} +2 -2
- package/dist/esm/post-collapsible_2.entry.js +3 -3
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/{post-footer-2fb4d20e.js → post-footer-dd62137f.js} +2 -2
- package/dist/esm/post-footer.entry.js +3 -3
- package/dist/esm/{post-linkarea-d7dbf30c.js → post-linkarea-a32d5a77.js} +2 -2
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/{post-menu-item-80d44823.js → post-menu-item-2951453a.js} +2 -2
- package/dist/esm/{post-popover-1fb2446b.js → post-popover-7aa09133.js} +2 -2
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-e9a95e85.js → post-rating-b8974582.js} +2 -2
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/{post-tab-header-aa2be14d.js → post-tab-header-8eae9acf.js} +2 -2
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-15f4254a.js → post-tab-panel-e3368b04.js} +2 -2
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-07612298.js → post-tabs-7adeaf6b.js} +2 -2
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tag-b9d3bb0f.js → post-tag-441d043f.js} +2 -2
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-togglebutton-5f0e2508.js → post-togglebutton-a0510987.js} +136 -94
- package/dist/esm/{post-tooltip-b1309328.js → post-tooltip-8295268a.js} +2 -2
- package/dist/esm/post-tooltip.entry.js +3 -3
- package/dist/esm/{slide-62768431.js → slide-cd2850ee.js} +7 -7
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/{p-33963539.js → p-09468501.js} +1 -1
- package/dist/post-components/{p-819f6f7e.js → p-195f8cd8.js} +1 -1
- package/dist/post-components/{p-f1995b47.js → p-1a1b3072.js} +1 -1
- package/dist/post-components/{p-b6e041ee.js → p-1cbde7fe.js} +1 -1
- package/dist/post-components/{p-d993dd37.js → p-1e3dd5bd.js} +1 -1
- package/dist/post-components/{p-4f6694d4.js → p-1e73add7.js} +1 -1
- package/dist/post-components/{p-b1b5248c.js → p-21e1cb32.js} +1 -1
- package/dist/post-components/p-2443adcb.js +1 -0
- package/dist/post-components/{p-7c08cad2.js → p-2e9f4062.js} +1 -1
- package/dist/post-components/{p-b559d89c.js → p-3b748f3e.js} +1 -1
- package/dist/post-components/p-3b7cfd1b.entry.js +1 -0
- package/dist/post-components/{p-b5f43c76.entry.js → p-3d1f93a6.entry.js} +1 -1
- package/dist/post-components/p-41f255ec.entry.js +1 -0
- package/dist/post-components/{p-745ce238.js → p-4eb71e30.js} +1 -1
- package/dist/post-components/{p-ff95dcd3.js → p-5c758f41.js} +2 -2
- package/dist/post-components/p-5c813ccf.entry.js +1 -0
- package/dist/post-components/p-62e18265.entry.js +1 -0
- package/dist/post-components/{p-530bedb1.js → p-69841b90.js} +1 -1
- package/dist/post-components/{p-bbf9ba02.js → p-6beffad5.js} +1 -1
- package/dist/post-components/p-792c167c.entry.js +1 -0
- package/dist/post-components/p-8bdf6637.entry.js +1 -0
- package/dist/post-components/p-94bceea9.entry.js +1 -0
- package/dist/post-components/p-9a4dd70a.entry.js +1 -0
- package/dist/post-components/p-9b052461.js +1 -0
- package/dist/post-components/p-9fc68ef1.entry.js +1 -0
- package/dist/post-components/p-a9fc29db.entry.js +1 -0
- package/dist/post-components/{p-9f986e3d.js → p-ae1aa734.js} +1 -1
- package/dist/post-components/p-af6ace51.entry.js +1 -0
- package/dist/post-components/p-b46777b6.entry.js +1 -0
- package/dist/post-components/p-bb5ae350.js +1 -0
- package/dist/post-components/p-c75bad27.entry.js +1 -0
- package/dist/post-components/{p-75627a39.js → p-d81ae8cb.js} +1 -1
- package/dist/post-components/{p-534ca692.js → p-e0241c1d.js} +1 -1
- package/dist/post-components/p-ee0c1389.entry.js +1 -0
- package/dist/post-components/p-ef47cf27.entry.js +1 -0
- package/dist/post-components/{p-eba6a679.js → p-f0a232d7.js} +1 -1
- package/dist/post-components/{p-7b526da4.js → p-f2451c8b.js} +1 -1
- package/dist/post-components/p-f9a01f1e.entry.js +1 -0
- package/dist/post-components/p-fbe39ef0.entry.js +1 -0
- package/dist/post-components/{p-88b5add2.js → p-fc4c553c.js} +1 -1
- package/dist/post-components/{p-e2da4e76.entry.js → p-fd03e4f7.entry.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-header/post-header.d.ts +10 -7
- package/dist/types/components/post-language-option/post-language-option.d.ts +4 -0
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +11 -3
- package/dist/types/components.d.ts +5 -0
- package/loaders/package.js +1 -1
- package/loaders/post-back-to-top.js +3 -3
- package/loaders/post-header.js +77 -56
- package/loaders/post-language-option.js +9 -1
- package/loaders/post-language-switch.js +48 -35
- package/loaders/post-mainnavigation.js +1 -1
- package/loaders/slide.js +7 -7
- package/package.json +3 -3
- package/dist/esm/package-30b5445a.js +0 -3
- package/dist/post-components/p-32caa5d5.entry.js +0 -1
- package/dist/post-components/p-3994c72c.entry.js +0 -1
- package/dist/post-components/p-442957b7.entry.js +0 -1
- package/dist/post-components/p-449caeba.entry.js +0 -1
- package/dist/post-components/p-4af6dbed.js +0 -1
- package/dist/post-components/p-513e4b41.entry.js +0 -1
- package/dist/post-components/p-5556960c.entry.js +0 -1
- package/dist/post-components/p-590c8681.entry.js +0 -1
- package/dist/post-components/p-68e0803e.entry.js +0 -1
- package/dist/post-components/p-6be78a63.entry.js +0 -1
- package/dist/post-components/p-8891c692.entry.js +0 -1
- package/dist/post-components/p-a1cbef0b.entry.js +0 -1
- package/dist/post-components/p-b54c207a.js +0 -1
- package/dist/post-components/p-ca01c184.js +0 -1
- package/dist/post-components/p-d9e7aec4.entry.js +0 -1
- package/dist/post-components/p-da18066a.entry.js +0 -1
- package/dist/post-components/p-e3d794b1.entry.js +0 -1
- package/dist/post-components/p-f175148d.entry.js +0 -1
- package/dist/post-components/p-f5a940f4.entry.js +0 -1
- package/dist/post-components/p-fcb60a95.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-
|
|
1
|
+
import{p as e,b as a}from"./p-5c758f41.js";export{s as setNonce}from"./p-5c758f41.js";import{g as l}from"./p-e1255160.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-9fc68ef1",[[1,"post-breadcrumb",{homeUrl:[1,"home-url"],homeText:[1,"home-text"],breadcrumbItems:[32],isConcatenated:[32],lastWindowWidth:[32]},null,{homeUrl:["validateUrl"]}]]],["p-94bceea9",[[1,"post-footer",{label:[1],isMobile:[32]}]]],["p-792c167c",[[1,"post-back-to-top",{label:[1],belowFold:[32]},null,{belowFold:["watchBelowFold"],label:["validateLabel"]}]]],["p-8bdf6637",[[1,"post-banner",{dismissible:[4],dismissLabel:[1,"dismiss-label"],icon:[1],type:[1],bannerId:[32],classes:[32],hasActions:[32],hasHeading:[32],onDismissButtonClick:[32],dismiss:[64]},null,{dismissible:["validateDismissible"],dismissLabel:["validateDismissLabel"],icon:["validateIcon"],type:["validateType"]}]]],["p-9a4dd70a",[[65,"post-card-control",{label:[1],description:[1],type:[1],name:[1],value:[1],checked:[1028],disabled:[1028],validity:[1025],icon:[1],focused:[32],reset:[64],groupReset:[64]},null,{label:["validateControlLabel"],type:["validateControlType"],checked:["updateControlChecked"],disabled:["updateControlDisabled"]}]]],["p-ee0c1389",[[1,"post-popover",{placement:[1],closeButtonCaption:[1,"close-button-caption"],arrow:[4],show:[64],hide:[64],toggle:[64]}]]],["p-3b7cfd1b",[[1,"post-rating",{label:[1],stars:[2],currentRating:[1026,"current-rating"],readonly:[4],hoveredIndex:[32]}]]],["p-5c813ccf",[[1,"post-tag",{variant:[1],size:[1],icon:[1],classes:[32]},null,{variant:["variantChanged"],size:["sizeChanged"]}]]],["p-ef47cf27",[[1,"post-tooltip",{placement:[1],arrow:[4],delayed:[4],show:[64],hide:[64],toggle:[64]},null,{delayed:["validateDelayed"]}]]],["p-fbe39ef0",[[1,"post-accordion",{headingLevel:[2,"heading-level"],multiple:[4],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"postToggle","collapseToggleHandler"]],{headingLevel:["validateHeadingLevel"]}]]],["p-62e18265",[[1,"post-avatar",{firstname:[1],lastname:[1],userid:[1],email:[1],slottedImage:[32],avatarType:[32],imageUrl:[32],imageAlt:[32],initials:[32]},null,{firstname:["validateFirstname"]}]]],["p-41f255ec",[[4,"post-linkarea"]]],["p-af6ace51",[[1,"post-tab-header",{panel:[1],tabId:[32]},null,{panel:["validateFor"]}]]],["p-c75bad27",[[1,"post-tab-panel",{name:[1],panelId:[32]}]]],["p-a9fc29db",[[1,"post-tabs",{activePanel:[1,"active-panel"],show:[64]}]]],["p-3d1f93a6",[[1,"post-collapsible",{collapsed:[1028],toggle:[64]},null,{collapsed:["collapsedChange"]}],[0,"post-collapsible-trigger",{for:[1],update:[64]},null,{for:["setAriaAttributes"]}]]],["p-fd03e4f7",[[1,"post-language-switch",{caption:[1],description:[1],variant:[1],activeLang:[32]},[[0,"postChange","handlePostChange"],[0,"postLanguageOptionInitiallyActive","handleInitiallyActive"]],{caption:["validateCaption"],description:["validateDescription"],variant:["validateVariant"]}],[4,"post-closebutton"],[4,"post-mainnavigation",{canScrollLeft:[32],canScrollRight:[32],translationAmount:[32]},[[9,"mouseup","stopScrolling"]],{translationAmount:["onTranslateAmountChanges"]}],[1,"post-header",{device:[32],mobileMenuExtended:[32],megadropdownOpen:[32],toggleMobileMenu:[64]},null,{mobileMenuExtended:["frozeBody"]}],[4,"post-language-option",{code:[1],active:[1540],variant:[1],name:[1],url:[1],select:[64]},null,{code:["validateCode"],active:["validateActiveProp"],name:["validateName"],url:["validateUrl"]}],[4,"post-list",{titleHidden:[4,"title-hidden"],horizontal:[516],titleId:[32]}],[1,"post-list-item"],[1,"post-logo",{url:[1]},null,{url:["validateUrl"]}],[4,"post-megadropdown",{device:[32],isVisible:[32],animationClass:[32],toggle:[64],show:[64],hide:[64],focusFirst:[64]}],[4,"post-megadropdown-trigger",{for:[1],ariaExpanded:[32]},null,{for:["validateControlFor"]}],[1,"post-togglebutton",{toggled:[1028]},null,{toggled:["validateToggled"]}],[1,"post-menu",{placement:[1],isVisible:[32],toggle:[64],show:[64],hide:[64]}],[4,"post-menu-trigger",{for:[1],ariaExpanded:[32]},null,{for:["validateControlFor"]}],[4,"post-popovercontainer",{manualClose:[4,"manual-close"],placement:[1],edgeGap:[2,"edge-gap"],arrow:[4],safeSpace:[513,"safe-space"],show:[64],hide:[64],toggle:[64]}],[1,"post-icon",{animation:[1],base:[1],flipH:[4,"flip-h"],flipV:[4,"flip-v"],name:[1],rotate:[2],scale:[2]},null,{animation:["validateAnimation"],base:["validateBase"],flipH:["validateFlipH"],flipV:["validateFlipV"],name:["validateName"],rotate:["validateRotate"],scale:["validateScale"]}]]],["p-f9a01f1e",[[1,"post-accordion-item",{collapsed:[1028],headingLevel:[2,"heading-level"],id:[32],slottedLogo:[32],toggle:[64]},[[2,"postToggle","onCollapseToggle"]],{headingLevel:["validateHeadingLevel"]}]]],["p-b46777b6",[[1,"post-breadcrumb-item",{url:[1],fullUrl:[32]},null,{url:["validateUrl"]}],[4,"post-menu-item"]]]],e))));
|
|
@@ -12,15 +12,12 @@ export type DEVICE_SIZE = 'mobile' | 'tablet' | 'desktop' | null;
|
|
|
12
12
|
export declare class PostHeader {
|
|
13
13
|
private firstFocusableEl;
|
|
14
14
|
private lastFocusableEl;
|
|
15
|
-
private scrollListenerElement;
|
|
16
|
-
private overflowElement;
|
|
17
15
|
private mobileMenu;
|
|
18
16
|
private mobileMenuAnimation;
|
|
19
|
-
private readonly throttledScroll;
|
|
20
17
|
private readonly throttledResize;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
private scrollParentResizeObserver;
|
|
19
|
+
private localHeaderResizeObserver;
|
|
20
|
+
get scrollParent(): HTMLElement;
|
|
24
21
|
host: HTMLPostHeaderElement;
|
|
25
22
|
device: DEVICE_SIZE;
|
|
26
23
|
mobileMenuExtended: boolean;
|
|
@@ -30,17 +27,23 @@ export declare class PostHeader {
|
|
|
30
27
|
* An event emitted when the device has changed
|
|
31
28
|
*/
|
|
32
29
|
postUpdateDevice: EventEmitter<DEVICE_SIZE>;
|
|
30
|
+
componentWillRender(): void;
|
|
31
|
+
componentDidLoad(): void;
|
|
32
|
+
disconnectedCallback(): void;
|
|
33
33
|
/**
|
|
34
34
|
* Toggles the mobile navigation.
|
|
35
35
|
*/
|
|
36
36
|
toggleMobileMenu(): Promise<void>;
|
|
37
|
+
private megedropdownStateHandler;
|
|
37
38
|
private getFocusableElements;
|
|
38
39
|
private keyboardHandler;
|
|
39
|
-
private getScrollParent;
|
|
40
40
|
private handleScrollEvent;
|
|
41
41
|
private updateLocalHeaderHeight;
|
|
42
|
+
private updateScrollParentHeight;
|
|
42
43
|
private handleLinkClick;
|
|
43
44
|
private handleResize;
|
|
45
|
+
private handleScrollParentResize;
|
|
46
|
+
private handleLocalHeaderResize;
|
|
44
47
|
private switchLanguageSwitchMode;
|
|
45
48
|
private renderNavigation;
|
|
46
49
|
render(): any;
|
|
@@ -35,6 +35,10 @@ export declare class PostLanguageOption {
|
|
|
35
35
|
* An event emitted when the language option is clicked. The payload is the ISO 639 code of the language.
|
|
36
36
|
*/
|
|
37
37
|
postChange: EventEmitter<string>;
|
|
38
|
+
/**
|
|
39
|
+
* An event emitted when the language option is initially active. The payload is the ISO 639 code of the language.
|
|
40
|
+
*/
|
|
41
|
+
postLanguageOptionInitiallyActive: EventEmitter<string>;
|
|
38
42
|
/**
|
|
39
43
|
* Selects the language option programmatically.
|
|
40
44
|
*/
|
|
@@ -20,10 +20,18 @@ export declare class PostLanguageSwitch {
|
|
|
20
20
|
* The active language of the language switch
|
|
21
21
|
*/
|
|
22
22
|
activeLang: string;
|
|
23
|
-
connectedCallback(): void;
|
|
24
|
-
private updateChildrenVariant;
|
|
25
|
-
componentWillUpdate(): void;
|
|
26
23
|
componentDidLoad(): void;
|
|
24
|
+
handlePostChange(event: CustomEvent<string>): void;
|
|
25
|
+
/**
|
|
26
|
+
* Handles cases where the language switch is being rendered before options are available
|
|
27
|
+
* @param event Initially emitted by <post-langauge-option>
|
|
28
|
+
*/
|
|
29
|
+
handleInitiallyActive(event: CustomEvent<string>): void;
|
|
30
|
+
private get languageOptions();
|
|
31
|
+
private get activeLanguageOption();
|
|
32
|
+
private handleSlotChange;
|
|
33
|
+
private updateActiveLanguage;
|
|
34
|
+
private updateChildrenVariant;
|
|
27
35
|
private menuId;
|
|
28
36
|
private renderList;
|
|
29
37
|
private renderDropdown;
|
|
@@ -679,6 +679,7 @@ declare global {
|
|
|
679
679
|
};
|
|
680
680
|
interface HTMLPostLanguageOptionElementEventMap {
|
|
681
681
|
"postChange": string;
|
|
682
|
+
"postLanguageOptionInitiallyActive": string;
|
|
682
683
|
}
|
|
683
684
|
interface HTMLPostLanguageOptionElement extends Components.PostLanguageOption, HTMLStencilElement {
|
|
684
685
|
addEventListener<K extends keyof HTMLPostLanguageOptionElementEventMap>(type: K, listener: (this: HTMLPostLanguageOptionElement, ev: PostLanguageOptionCustomEvent<HTMLPostLanguageOptionElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1121,6 +1122,10 @@ declare namespace LocalJSX {
|
|
|
1121
1122
|
* An event emitted when the language option is clicked. The payload is the ISO 639 code of the language.
|
|
1122
1123
|
*/
|
|
1123
1124
|
"onPostChange"?: (event: PostLanguageOptionCustomEvent<string>) => void;
|
|
1125
|
+
/**
|
|
1126
|
+
* An event emitted when the language option is initially active. The payload is the ISO 639 code of the language.
|
|
1127
|
+
*/
|
|
1128
|
+
"onPostLanguageOptionInitiallyActive"?: (event: PostLanguageOptionCustomEvent<string>) => void;
|
|
1124
1129
|
/**
|
|
1125
1130
|
* The URL used for the href attribute of the internal anchor. This field is optional; if not provided, a button will be used internally instead of an anchor.
|
|
1126
1131
|
*/
|
package/loaders/package.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as
|
|
2
|
+
import { s as slideDown, a as slideUp } from './slide.js';
|
|
3
3
|
import { v as version } from './package.js';
|
|
4
4
|
import { c as checkType } from './check-type.js';
|
|
5
5
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
@@ -27,10 +27,10 @@ const PostBackToTop$1 = /*@__PURE__*/ proxyCustomElement(class PostBackToTop ext
|
|
|
27
27
|
// Watch for changes in belowFold
|
|
28
28
|
watchBelowFold(newValue) {
|
|
29
29
|
if (newValue) {
|
|
30
|
-
|
|
30
|
+
slideDown(this.host, this.translateY);
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
|
|
33
|
+
slideUp(this.host, this.translateY);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
scrollToTop() {
|
package/loaders/post-header.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as slideUp, s as slideDown } from './slide.js';
|
|
4
4
|
import { g as getFocusableChildren } from './get-focusable-children.js';
|
|
5
5
|
|
|
6
6
|
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
@@ -137,7 +137,7 @@ function throttle (delay, callback, options) {
|
|
|
137
137
|
return wrapper;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative}:host(:not(:has([slot=title]))) .local-header{padding-block-start:0}:host(:not(:has([slot=title]))) .local-sub{display:none}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--global-header-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:3;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:12px;inset-block-start:calc((var(--global-header-height) - var(--global-header-reduced-height))*-1)}}.global-sub{display:flex;align-items:center;gap:24px}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--global-header-height);width:var(--global-header-height);min-height:var(--global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{height:calc(var(--global-header-height) - var(--header-scroll-top))}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-left:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--local-header-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;bottom:-1px;z-index:1}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:calc(-1*(var(--local-header-height) - var(--main-navigation-height)) + var(--global-header-reduced-height));padding-block-start:18px;box-shadow:var(--post-device-elevation-300)}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--global-header-height);padding-block:12px;flex-wrap:wrap;gap:16px}.local-header.local-header-mobile-extended::after{bottom:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-sub{margin-inline-end:16px}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}::slotted(h1){margin:0 !important;flex-shrink:10;z-index:3}@media screen and (min-width: 600px){::slotted(h1){margin-inline-start:12px !important}}@media screen and (max-width: 599.98px){::slotted(h1){margin-inline-start:8px !important}}@media screen and (min-width: 1024px){::slotted(h1){font-size:28px !important;line-height:34px !important}}@media screen and (max-width: 1023.98px){::slotted(h1){font-size:20px !important;max-width:calc(100vw - 8px - 16px)}}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:fixed;z-index:1;inset-inline:0;
|
|
140
|
+
const postHeaderCss = "*,::before,::after{box-sizing:border-box}:host{z-index:1020;position:relative}:host(:not(:has([slot=title]))) .local-header{padding-block-start:0}:host(:not(:has([slot=title]))) .local-sub{display:none}.d-flex{display:flex}.space-between{justify-content:space-between}.global-header{background-color:#fc0;display:flex;justify-content:space-between;position:sticky;padding-inline:4px;height:var(--global-header-height)}@media screen and (max-width: 1023.98px){.global-header{z-index:3;inset-block-start:0}}@media screen and (min-width: 1024px){.global-header{z-index:5;padding-inline-end:12px;inset-block-start:calc((var(--global-header-height) - var(--global-header-reduced-height))*-1)}}.global-sub{display:flex;align-items:center;gap:24px}.align-end{align-items:flex-end}.logo{flex:1 0 auto;height:var(--global-header-height);width:var(--global-header-height);min-height:var(--global-header-reduced-height);align-self:flex-end}@media screen and (min-width: 1024px){.logo{height:calc(var(--global-header-height) - var(--header-scroll-top))}}::slotted(ul){margin-block:0 !important;list-style:none;display:flex;padding-left:0;gap:1rem;flex-shrink:0 !important}.local-header{display:flex;position:sticky;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;min-height:var(--local-header-min-height);background:#fff;transition:box-shadow .2s ease-in-out}.local-header::after{content:\"\";position:absolute;width:100%;height:1px;background-color:#e1e0dc;bottom:-1px;z-index:1}@media screen and (min-width: 1024px){.local-header{z-index:3;inset-block-start:calc(-1*(var(--local-header-height) - var(--main-navigation-height)) + var(--global-header-reduced-height));padding-block-start:18px;box-shadow:var(--post-device-elevation-300)}}@media screen and (max-width: 1023.98px){.local-header{z-index:2;inset-block-start:var(--global-header-height);padding-block:12px;flex-wrap:wrap;gap:16px}.local-header.local-header-mobile-extended::after{bottom:0}.local-header:not(.local-header-mobile-extended){box-shadow:var(--post-device-elevation-300)}}.local-sub{margin-inline-end:16px}::slotted(.list-inline){margin:0 !important;z-index:3 !important;position:relative !important}::slotted(h1){margin:0 !important;flex-shrink:10;z-index:3}@media screen and (min-width: 600px){::slotted(h1){margin-inline-start:12px !important}}@media screen and (max-width: 599.98px){::slotted(h1){margin-inline-start:8px !important}}@media screen and (min-width: 1024px){::slotted(h1){font-size:28px !important;line-height:34px !important}}@media screen and (max-width: 1023.98px){::slotted(h1){font-size:20px !important;max-width:calc(100vw - 8px - 16px)}}@media screen and (min-width: 1024px){.mobile-toggle{display:none}}.navigation{width:100%}@media screen and (min-width: 1024px){.navigation{inset-block-start:var(--global-header-reduced-height)}.navigation::before{display:block;content:\"\";position:absolute;inset:0;z-index:2;background:#fff}}@media screen and (max-width: 1023.98px){.navigation{position:fixed;z-index:1;inset-inline:0;inset-block-start:var(--header-height);overflow:hidden}::slotted(post-mainnavigation),.navigation-footer{display:none;flex-direction:column;padding-block:16px 24px;padding-inline:32px}.navigation.extended ::slotted(post-mainnavigation),.navigation.extended .navigation-footer{display:flex}.navigation.extended>div{display:flex;flex-direction:column;height:calc(100dvh - var(--header-height))}.navigation.extended.scroll-y>div{overflow-y:auto;overflow-x:hidden}.navigation.extended ::slotted(post-mainnavigation){flex-grow:1 !important}::slotted(post-mainnavigation){background-color:#fafafa;gap:32px}.navigation-footer{background-color:#f0efed;gap:24px}}@media screen and (max-width: 599.98px){::slotted(post-mainnavigation),.navigation-footer{padding-inline:16px}}";
|
|
141
141
|
const PostHeaderStyle0 = postHeaderCss;
|
|
142
142
|
|
|
143
143
|
const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
|
|
@@ -152,59 +152,75 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
152
152
|
}
|
|
153
153
|
firstFocusableEl;
|
|
154
154
|
lastFocusableEl;
|
|
155
|
-
scrollListenerElement = null;
|
|
156
|
-
overflowElement = null;
|
|
157
155
|
mobileMenu;
|
|
158
156
|
mobileMenuAnimation;
|
|
159
|
-
throttledScroll = () => this.handleScrollEvent();
|
|
160
157
|
throttledResize = throttle(50, () => this.handleResize());
|
|
158
|
+
scrollParentResizeObserver;
|
|
159
|
+
localHeaderResizeObserver;
|
|
160
|
+
get scrollParent() {
|
|
161
|
+
let element = this.host.parentElement;
|
|
162
|
+
while (element) {
|
|
163
|
+
const hasScrollParentAttr = element.hasAttribute('data-is-post-header-scroll-parent');
|
|
164
|
+
const overflow = getComputedStyle(element).overflowY;
|
|
165
|
+
if (hasScrollParentAttr || ['auto', 'scroll'].includes(overflow)) {
|
|
166
|
+
return element;
|
|
167
|
+
}
|
|
168
|
+
element = element.parentElement;
|
|
169
|
+
}
|
|
170
|
+
return document.documentElement;
|
|
171
|
+
}
|
|
172
|
+
get host() { return this; }
|
|
173
|
+
frozeBody(isMobileMenuExtended) {
|
|
174
|
+
if (isMobileMenuExtended) {
|
|
175
|
+
this.scrollParent.setAttribute('data-is-post-header-scroll-parent', '');
|
|
176
|
+
this.scrollParent.style.overflow = 'hidden';
|
|
177
|
+
this.host.addEventListener('keydown', this.keyboardHandler.bind(this));
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
this.scrollParent.style.overflow = '';
|
|
181
|
+
this.scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
182
|
+
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* An event emitted when the device has changed
|
|
187
|
+
*/
|
|
188
|
+
postUpdateDevice;
|
|
161
189
|
componentWillRender() {
|
|
162
|
-
this.scrollListenerElement = this.getScrollParent();
|
|
163
|
-
this.overflowElement =
|
|
164
|
-
this.scrollListenerElement === document
|
|
165
|
-
? document.documentElement
|
|
166
|
-
: this.scrollListenerElement;
|
|
167
|
-
this.scrollListenerElement.addEventListener('scroll', this.throttledScroll, { passive: true });
|
|
168
190
|
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
191
|
+
window.addEventListener('scroll', this.handleScrollEvent.bind(this), {
|
|
192
|
+
passive: true,
|
|
193
|
+
});
|
|
194
|
+
this.scrollParent.addEventListener('scroll', this.handleScrollEvent.bind(this), {
|
|
195
|
+
passive: true,
|
|
196
|
+
});
|
|
169
197
|
this.handleResize();
|
|
170
198
|
this.handleScrollEvent();
|
|
171
199
|
this.getFocusableElements();
|
|
172
200
|
}
|
|
173
201
|
componentDidLoad() {
|
|
174
|
-
this.updateLocalHeaderHeight();
|
|
175
202
|
// Check if the mega dropdown is expanded
|
|
176
|
-
document.addEventListener('postToggleMegadropdown', (
|
|
177
|
-
this.megadropdownOpen = event.detail.isVisible;
|
|
178
|
-
});
|
|
203
|
+
document.addEventListener('postToggleMegadropdown', this.megedropdownStateHandler.bind(this));
|
|
179
204
|
this.host.addEventListener('click', this.handleLinkClick.bind(this));
|
|
205
|
+
this.handleScrollParentResize();
|
|
206
|
+
this.handleLocalHeaderResize();
|
|
180
207
|
}
|
|
181
208
|
// Clean up possible side effects when post-header is disconnected
|
|
182
209
|
disconnectedCallback() {
|
|
183
210
|
this.mobileMenuExtended = false;
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
|
|
187
|
-
|
|
211
|
+
this.scrollParent.style.overflow = '';
|
|
212
|
+
this.scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
213
|
+
window.removeEventListener('resize', this.throttledResize);
|
|
214
|
+
window.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
215
|
+
this.scrollParent.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
216
|
+
document.removeEventListener('postToggleMegadropdown', this.megedropdownStateHandler.bind(this));
|
|
217
|
+
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
188
218
|
this.host.removeEventListener('click', this.handleLinkClick.bind(this));
|
|
219
|
+
if (this.scrollParentResizeObserver)
|
|
220
|
+
this.scrollParentResizeObserver.disconnect();
|
|
221
|
+
if (this.localHeaderResizeObserver)
|
|
222
|
+
this.localHeaderResizeObserver.disconnect();
|
|
189
223
|
}
|
|
190
|
-
get host() { return this; }
|
|
191
|
-
frozeBody(isMobileMenuExtended) {
|
|
192
|
-
this.overflowElement.style.overflow = isMobileMenuExtended ? 'hidden' : '';
|
|
193
|
-
if (isMobileMenuExtended) {
|
|
194
|
-
this.host.addEventListener('keydown', e => {
|
|
195
|
-
this.keyboardHandler(e);
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
this.host.removeEventListener('keydown', e => {
|
|
200
|
-
this.keyboardHandler(e);
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* An event emitted when the device has changed
|
|
206
|
-
*/
|
|
207
|
-
postUpdateDevice;
|
|
208
224
|
/**
|
|
209
225
|
* Toggles the mobile navigation.
|
|
210
226
|
*/
|
|
@@ -224,6 +240,9 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
224
240
|
if (!this.mobileMenuExtended)
|
|
225
241
|
await this.mobileMenuAnimation.finished;
|
|
226
242
|
}
|
|
243
|
+
megedropdownStateHandler(event) {
|
|
244
|
+
this.megadropdownOpen = event.detail.isVisible;
|
|
245
|
+
}
|
|
227
246
|
// Get all the focusable elements in the post-header mobile menu
|
|
228
247
|
getFocusableElements() {
|
|
229
248
|
// Get elements in the correct order (different as the DOM order)
|
|
@@ -254,25 +273,15 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
254
273
|
}
|
|
255
274
|
}
|
|
256
275
|
}
|
|
257
|
-
getScrollParent() {
|
|
258
|
-
let parent = this.host.parentElement;
|
|
259
|
-
if (parent.tagName === 'BODY') {
|
|
260
|
-
parent = document;
|
|
261
|
-
}
|
|
262
|
-
return parent;
|
|
263
|
-
}
|
|
264
276
|
handleScrollEvent() {
|
|
265
|
-
|
|
266
|
-
const st = Math.max(0, this.scrollListenerElement instanceof Document
|
|
267
|
-
? this.scrollListenerElement.documentElement.scrollTop
|
|
268
|
-
: this.scrollListenerElement.scrollTop);
|
|
269
|
-
this.host.style.setProperty('--header-scroll-top', `${st}px`);
|
|
277
|
+
this.host.style.setProperty('--header-scroll-top', `${this.scrollParent.scrollTop}px`);
|
|
270
278
|
}
|
|
271
279
|
updateLocalHeaderHeight() {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
280
|
+
const localHeaderHeight = this.host.shadowRoot.querySelector('.local-header')?.clientHeight || 0;
|
|
281
|
+
this.host.style.setProperty('--local-header-height', `${localHeaderHeight}px`);
|
|
282
|
+
}
|
|
283
|
+
updateScrollParentHeight() {
|
|
284
|
+
this.host.style.setProperty('--header-scroll-parent-height', `${this.scrollParent.clientHeight}px`);
|
|
276
285
|
}
|
|
277
286
|
handleLinkClick(event) {
|
|
278
287
|
const target = event.target;
|
|
@@ -309,7 +318,6 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
309
318
|
this.toggleMobileMenu();
|
|
310
319
|
this.mobileMenuAnimation.finish(); // no animation
|
|
311
320
|
}
|
|
312
|
-
this.updateLocalHeaderHeight();
|
|
313
321
|
// Apply only on change for doing work only when necessary
|
|
314
322
|
if (newDevice !== previousDevice) {
|
|
315
323
|
this.device = newDevice;
|
|
@@ -319,6 +327,19 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
319
327
|
});
|
|
320
328
|
}
|
|
321
329
|
}
|
|
330
|
+
handleScrollParentResize() {
|
|
331
|
+
if (this.scrollParent) {
|
|
332
|
+
this.scrollParentResizeObserver = new ResizeObserver(this.updateScrollParentHeight.bind(this));
|
|
333
|
+
this.scrollParentResizeObserver.observe(this.scrollParent);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
handleLocalHeaderResize() {
|
|
337
|
+
const localHeader = this.host.shadowRoot.querySelector('.local-header');
|
|
338
|
+
if (localHeader) {
|
|
339
|
+
this.localHeaderResizeObserver = new ResizeObserver(this.updateLocalHeaderHeight.bind(this));
|
|
340
|
+
this.localHeaderResizeObserver.observe(localHeader);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
322
343
|
switchLanguageSwitchMode() {
|
|
323
344
|
const variant = this.device === 'desktop' ? 'menu' : 'list';
|
|
324
345
|
Array.from(this.host.querySelectorAll('post-language-switch')).forEach(languageSwitch => {
|
|
@@ -333,10 +354,10 @@ const PostHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends H
|
|
|
333
354
|
if (!this.megadropdownOpen) {
|
|
334
355
|
navigationClasses.push('scroll-y');
|
|
335
356
|
}
|
|
336
|
-
return (h("div", { ref: el => (this.mobileMenu = el)
|
|
357
|
+
return (h("div", { class: navigationClasses.join(' ') }, h("div", { ref: el => (this.mobileMenu = el) }, h("slot", { name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (h("div", { class: "navigation-footer" }, h("slot", { name: "meta-navigation" }), h("slot", { name: "post-language-switch" }))))));
|
|
337
358
|
}
|
|
338
359
|
render() {
|
|
339
|
-
return (h(Host, { key: '
|
|
360
|
+
return (h(Host, { key: '859829bf3a75e13fc6f2501806167936be900f1b', version: version }, h("div", { key: '06dba64e897db49bd4a8db56786af8daf24b17ed', class: "global-header" }, h("div", { key: 'ad8187bf4cef41ea869109515192349eac5bb896', class: "global-sub" }, h("div", { key: '629afbf9b084e66665b407d597df17cef57d3c8a', class: "logo" }, h("slot", { key: '33f0d3d3ed83057b0a6e235aaf3313a8bf5347ed', name: "post-logo" }))), h("div", { key: '9acf53aa0bb748678436baaf9023cba4a65fddec', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '44d42df5a0c25b9892800eeb7bba8cd445a39bef', name: "meta-navigation" }), h("slot", { key: '2d0732014f827e989ce90ea1262e7957933bfb15', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: 'f56457752c256e0b620f473e63b9ca6b9fe16efa', name: "post-language-switch" }), h("div", { key: 'b570047b4492e461ace9676e8ae3e63461f9c7ce', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '681840ffdee4e11d68eb16ecddcf1869a0cfd691', name: "post-togglebutton" })))), h("div", { key: 'e90406e7508603222e8ab37bf790bb8a3ecc9614', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '0115ccd0047409e5a10219ea61c6c09996711e1b', name: "title" }), h("div", { key: '2bd5d0e83650c30de7cd7628f324d726337a28b2', class: "local-sub" }, h("slot", { key: '0578b7fc28a6caa821d131b43b031036250750a8', name: "local-controls" }), h("slot", { key: 'c5ddceb8c56c76a31657633890e8562981e34249' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
340
361
|
}
|
|
341
362
|
static get watchers() { return {
|
|
342
363
|
"mobileMenuExtended": ["frozeBody"]
|
|
@@ -11,6 +11,7 @@ const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
|
|
|
11
11
|
super();
|
|
12
12
|
this.__registerHost();
|
|
13
13
|
this.postChange = createEvent(this, "postChange", 7);
|
|
14
|
+
this.postLanguageOptionInitiallyActive = createEvent(this, "postLanguageOptionInitiallyActive", 7);
|
|
14
15
|
this.code = undefined;
|
|
15
16
|
this.active = undefined;
|
|
16
17
|
this.variant = undefined;
|
|
@@ -38,11 +39,18 @@ const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
|
|
|
38
39
|
if (!this.name && this.isNameRequired()) {
|
|
39
40
|
throw new Error('The "name" property of the post-language-option component is required when the full language name is not displayed.');
|
|
40
41
|
}
|
|
42
|
+
if (this.active) {
|
|
43
|
+
this.postLanguageOptionInitiallyActive.emit(this.code);
|
|
44
|
+
}
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
47
|
* An event emitted when the language option is clicked. The payload is the ISO 639 code of the language.
|
|
44
48
|
*/
|
|
45
49
|
postChange;
|
|
50
|
+
/**
|
|
51
|
+
* An event emitted when the language option is initially active. The payload is the ISO 639 code of the language.
|
|
52
|
+
*/
|
|
53
|
+
postLanguageOptionInitiallyActive;
|
|
46
54
|
/**
|
|
47
55
|
* Selects the language option programmatically.
|
|
48
56
|
*/
|
|
@@ -63,7 +71,7 @@ const PostLanguageOption$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
|
|
|
63
71
|
this.emitChange();
|
|
64
72
|
}
|
|
65
73
|
};
|
|
66
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '23bf186d9cc718b2697cbc5bc54b44f6c9ead54f', "data-version": version, role: this.variant ? `${this.variant}item` : null }, this.url ? (h("a", { "aria-current": this.active ? 'page' : undefined, "aria-label": this.name, href: this.url, hrefLang: lang, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null))) : (h("button", { "aria-current": this.active ? 'true' : undefined, "aria-label": this.name, lang: lang, onClick: () => this.emitChange(), onKeyDown: emitOnKeyDown }, h("slot", null)))));
|
|
67
75
|
}
|
|
68
76
|
static get watchers() { return {
|
|
69
77
|
"code": ["validateCode"],
|
|
@@ -10,7 +10,7 @@ import { c as checkType } from './check-type.js';
|
|
|
10
10
|
|
|
11
11
|
const SWITCH_VARIANTS = ['list', 'menu'];
|
|
12
12
|
|
|
13
|
-
const postLanguageSwitchCss = ":host{display:flex !important;flex-wrap:wrap;gap:.5rem}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-dropdown-container>*{width:100%}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:
|
|
13
|
+
const postLanguageSwitchCss = ":host{display:flex !important;flex-wrap:wrap;gap:.5rem}.post-language-switch-dropdown-container{display:flex;flex-direction:column}.post-language-switch-dropdown-container>*{width:100%}.post-language-switch-trigger{cursor:pointer;text-transform:uppercase;padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-decoration:none;display:inline-flex;align-items:center;gap:6px;border-radius:24px;font-size:16px;padding:3px 10px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger{background-color:ButtonFace !important}.post-language-switch-trigger:hover{background-color:Highlight !important}}.post-language-switch-trigger{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.post-language-switch-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.post-language-switch-trigger:not(:disabled):hover,.post-language-switch-trigger.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.post-language-switch-trigger post-icon{height:24px;width:24px}.post-language-switch-trigger[aria-expanded=true]{background-color:#050400;color:#fff}.post-language-switch-trigger[aria-expanded=true] post-icon{transform:rotate(180deg)}.post-language-switch-trigger[aria-expanded=true]:hover{background-color:#504f4b;color:#fff}";
|
|
14
14
|
const PostLanguageSwitchStyle0 = postLanguageSwitchCss;
|
|
15
15
|
|
|
16
16
|
const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguageSwitch extends HTMLElement {
|
|
@@ -32,52 +32,65 @@ const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
|
|
|
32
32
|
}
|
|
33
33
|
validateVariant() {
|
|
34
34
|
checkEmptyOrOneOf(this, 'variant', SWITCH_VARIANTS);
|
|
35
|
-
}
|
|
36
|
-
connectedCallback() {
|
|
37
|
-
this.updateChildrenVariant();
|
|
38
|
-
// Get the active language based on children's active state
|
|
39
|
-
const activeLanguageOption = this.host.querySelector('post-language-option[active]:not([active="false"])');
|
|
40
|
-
if (activeLanguageOption)
|
|
41
|
-
this.activeLang = activeLanguageOption.getAttribute('code');
|
|
42
|
-
}
|
|
43
|
-
// Update post-language-option variant to have the correct style
|
|
44
|
-
updateChildrenVariant() {
|
|
45
|
-
this.host.querySelectorAll('post-language-option').forEach(el => {
|
|
46
|
-
el.setAttribute('variant', this.variant);
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
componentWillUpdate() {
|
|
50
35
|
this.updateChildrenVariant();
|
|
51
36
|
}
|
|
52
37
|
componentDidLoad() {
|
|
53
38
|
this.validateCaption();
|
|
54
39
|
this.validateDescription();
|
|
55
40
|
this.validateVariant();
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const menu = this.host.shadowRoot.querySelector('post-menu');
|
|
71
|
-
menu.hide();
|
|
41
|
+
// Initially set variants and active language
|
|
42
|
+
// Handles cases where the language-switch is rendered after the language-options have been rendered
|
|
43
|
+
this.updateChildrenVariant();
|
|
44
|
+
this.updateActiveLanguage();
|
|
45
|
+
}
|
|
46
|
+
handlePostChange(event) {
|
|
47
|
+
this.activeLang = event.detail;
|
|
48
|
+
// Update the active state in the children post-language-option components
|
|
49
|
+
this.languageOptions.forEach(lang => {
|
|
50
|
+
if (lang.code && lang.code === this.activeLang) {
|
|
51
|
+
lang.setAttribute('active', '');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
lang.removeAttribute('active');
|
|
72
55
|
}
|
|
73
56
|
});
|
|
57
|
+
// Hides the dropdown when an option has been clicked
|
|
58
|
+
if (this.variant === 'menu') {
|
|
59
|
+
const menu = this.host.shadowRoot.querySelector('post-menu');
|
|
60
|
+
menu.hide();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Handles cases where the language switch is being rendered before options are available
|
|
65
|
+
* @param event Initially emitted by <post-langauge-option>
|
|
66
|
+
*/
|
|
67
|
+
handleInitiallyActive(event) {
|
|
68
|
+
this.activeLang = event.detail;
|
|
69
|
+
}
|
|
70
|
+
get languageOptions() {
|
|
71
|
+
return this.host.querySelectorAll('post-language-option');
|
|
72
|
+
}
|
|
73
|
+
get activeLanguageOption() {
|
|
74
|
+
return this.host.querySelector('post-language-option[active]:not([active="false"])');
|
|
75
|
+
}
|
|
76
|
+
handleSlotChange() {
|
|
77
|
+
this.updateActiveLanguage();
|
|
78
|
+
}
|
|
79
|
+
updateActiveLanguage() {
|
|
80
|
+
this.activeLang = this.activeLanguageOption.getAttribute('code');
|
|
81
|
+
}
|
|
82
|
+
// Update post-language-option variant to have the correct style
|
|
83
|
+
updateChildrenVariant() {
|
|
84
|
+
this.languageOptions.forEach(el => {
|
|
85
|
+
el.setAttribute('variant', this.variant);
|
|
86
|
+
});
|
|
74
87
|
}
|
|
75
88
|
menuId = `p${nanoid(11)}`;
|
|
76
89
|
renderList() {
|
|
77
|
-
return (h(Host, { "data-version": version, role: "list", "aria-label": this.caption }, h("div", { class: "post-language-switch-list", role: "group", "aria-label": this.description }, h("slot",
|
|
90
|
+
return (h(Host, { "data-version": version, role: "list", "aria-label": this.caption }, h("div", { class: "post-language-switch-list", role: "group", "aria-label": this.description }, h("slot", { onSlotchange: () => this.handleSlotChange() }))));
|
|
78
91
|
}
|
|
79
92
|
renderDropdown() {
|
|
80
|
-
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger", "aria-label": this.description }, this.activeLang, h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container", "aria-label": this.caption }, h("slot",
|
|
93
|
+
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger", "aria-label": this.description }, this.activeLang, h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container", "aria-label": this.caption }, h("slot", { onSlotchange: () => this.handleSlotChange() }))));
|
|
81
94
|
}
|
|
82
95
|
render() {
|
|
83
96
|
return this.variant === 'list' ? this.renderList() : this.renderDropdown();
|
|
@@ -93,7 +106,7 @@ const PostLanguageSwitch$1 = /*@__PURE__*/ proxyCustomElement(class PostLanguage
|
|
|
93
106
|
"description": [1],
|
|
94
107
|
"variant": [1],
|
|
95
108
|
"activeLang": [32]
|
|
96
|
-
},
|
|
109
|
+
}, [[0, "postChange", "handlePostChange"], [0, "postLanguageOptionInitiallyActive", "handleInitiallyActive"]], {
|
|
97
110
|
"caption": ["validateCaption"],
|
|
98
111
|
"description": ["validateDescription"],
|
|
99
112
|
"variant": ["validateVariant"]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$2 } from './post-icon2.js';
|
|
3
3
|
|
|
4
|
-
const postMainnavigationCss = "post-mainnavigation post-list-item>a{text-decoration:none;border-radius:0}post-mainnavigation post-list-item post-megadropdown-trigger button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-align:start}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button{background-color:ButtonFace !important}post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:Highlight !important}}post-mainnavigation post-list-item post-megadropdown-trigger button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item post-megadropdown-trigger button{flex:0 0 fit-content;white-space:nowrap;display:flex;align-items:center;justify-content:space-between}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}post-mainnavigation post-list-item>a:focus-visible,post-mainnavigation post-list-item post-megadropdown-trigger button:focus-visible{border-radius:4px}post-mainnavigation .back-button post-icon{transform:rotate(180deg)}@media screen and (max-width: 1023.98px){post-mainnavigation .back-button{font-size:16px}}@media screen and (max-width: 599.98px){post-mainnavigation .back-button{font-size:14px}}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{content:\"\";mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 13.2-7.5 7.6-7.6-7.6.9-.9 6.6 6.6 6.6-6.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;height:24px;width:24px}@media screen and (min-width: 1024px){post-mainnavigation{display:block}post-mainnavigation nav{max-width:100%;background:#fff;max-height:var(--main-navigation-height);user-select:none;transition:margin 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation .left-scroll-button,post-mainnavigation .right-scroll-button{z-index:4;position:absolute;inset-block-end:0;overflow:hidden}post-mainnavigation .left-scroll-button button,post-mainnavigation .right-scroll-button button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;background:#fff;padding:16px;box-shadow:var(--post-device-elevation-500);line-height:100%;height:var(--main-navigation-height)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){post-mainnavigation .left-scroll-button button,post-mainnavigation .right-scroll-button button{background-color:ButtonFace !important}post-mainnavigation .left-scroll-button button:hover,post-mainnavigation .right-scroll-button button:hover{background-color:Highlight !important}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button button post-icon,post-mainnavigation .right-scroll-button button post-icon{font-size:1rem}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button.d-none,post-mainnavigation .right-scroll-button.d-none{display:none}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button{inset-inline-start:0;padding-inline-end:2rem}}@media screen and (min-width: 1024px){post-mainnavigation .right-scroll-button{inset-inline-end:0;padding-inline-start:2rem}}@media screen and (min-width: 1024px){post-mainnavigation post-list>[role=list]{flex-direction:row;max-width:100vw}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{position:sticky;padding-inline:12px;height:var(--main-navigation-height);gap:4px;font-size:16px;z-index:4}post-mainnavigation post-list-item>a .nav-el-active,post-mainnavigation post-list-item>button .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-active{font-weight:700;text-align:center;opacity:0}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{position:absolute;opacity:1;text-align:center;width:100%;left:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff;font-weight:700}post-mainnavigation post-list-item>a.selected .nav-el-active,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item>button.selected .nav-el-active,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-active{opacity:1}post-mainnavigation post-list-item>a.selected .nav-el-inactive,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item>button.selected .nav-el-inactive,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-inactive{opacity:0}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}}@media screen and (min-width: 1024px)and (max-width: 599.98px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{font-size:14px}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline-end:12px;transition:border-block-end-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{width:calc(100% - 28px)}post-mainnavigation post-list-item>button::after,post-mainnavigation post-list-item post-megadropdown-trigger button::after{transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button.selected::after,post-mainnavigation post-list-item>button[aria-expanded=true]::after,post-mainnavigation post-list-item post-megadropdown-trigger button.selected::after,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]::after{transform:rotate(180deg)}}@media screen and (min-width: 1024px){post-mainnavigation post-megadropdown button:not(.btn-icon-close),post-mainnavigation post-megadropdown a{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-megadropdown button:not(.btn-icon-close)::before,post-mainnavigation post-megadropdown a::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-megadropdown button:not(.btn-icon-close).selected,post-mainnavigation post-megadropdown button:not(.btn-icon-close)[aria-expanded=true],post-mainnavigation post-megadropdown a.selected,post-mainnavigation post-megadropdown a[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover,post-mainnavigation post-megadropdown a:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover::before,post-mainnavigation post-megadropdown a:hover::before{background-color:#504f4b}}@media screen and (min-width: 1024px){post-mainnavigation [slot=back-button]{display:none}}@media screen and (max-width: 1023.98px){post-mainnavigation nav{transform:none !important}post-mainnavigation .left-scroll-button,post-mainnavigation .right-scroll-button{display:none}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-list-item>a::before,post-mainnavigation post-list-item>button::before,post-mainnavigation post-list-item post-megadropdown-trigger button::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-list-item>a:hover::before,post-mainnavigation post-list-item>button:hover::before,post-mainnavigation post-list-item post-megadropdown-trigger button:hover::before{background-color:#504f4b}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{display:none}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{transform:rotate(-90deg)}}post-mainnavigation .back-button .btn{padding-inline:0}";
|
|
4
|
+
const postMainnavigationCss = "post-mainnavigation post-list-item>a{text-decoration:none;border-radius:0}post-mainnavigation post-list-item post-megadropdown-trigger button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-align:start}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button{background-color:ButtonFace !important}post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:Highlight !important}}post-mainnavigation post-list-item post-megadropdown-trigger button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item post-megadropdown-trigger button{flex:0 0 fit-content;white-space:nowrap;display:flex;align-items:center;justify-content:space-between}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}post-mainnavigation post-list-item>a:focus-visible,post-mainnavigation post-list-item post-megadropdown-trigger button:focus-visible{border-radius:4px}post-mainnavigation .back-button post-icon{transform:rotate(180deg)}@media screen and (max-width: 1023.98px){post-mainnavigation .back-button{font-size:16px}}@media screen and (max-width: 599.98px){post-mainnavigation .back-button{font-size:14px}}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{content:\"\";mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 13.2-7.5 7.6-7.6-7.6.9-.9 6.6 6.6 6.6-6.6z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;height:24px;width:24px}@media screen and (min-width: 1024px){post-mainnavigation{display:block;overflow-x:hidden}post-mainnavigation nav{max-width:100%;background:#fff;max-height:var(--main-navigation-height);user-select:none;transition:margin 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation .left-scroll-button,post-mainnavigation .right-scroll-button{z-index:4;position:absolute;inset-block-end:0;overflow:hidden}post-mainnavigation .left-scroll-button button,post-mainnavigation .right-scroll-button button{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;background:#fff;padding:16px;box-shadow:var(--post-device-elevation-500);line-height:100%;height:var(--main-navigation-height)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){post-mainnavigation .left-scroll-button button,post-mainnavigation .right-scroll-button button{background-color:ButtonFace !important}post-mainnavigation .left-scroll-button button:hover,post-mainnavigation .right-scroll-button button:hover{background-color:Highlight !important}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button button post-icon,post-mainnavigation .right-scroll-button button post-icon{font-size:1rem}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button.d-none,post-mainnavigation .right-scroll-button.d-none{display:none}}@media screen and (min-width: 1024px){post-mainnavigation .left-scroll-button{inset-inline-start:0;padding-inline-end:2rem}}@media screen and (min-width: 1024px){post-mainnavigation .right-scroll-button{inset-inline-end:0;padding-inline-start:2rem}}@media screen and (min-width: 1024px){post-mainnavigation post-list>[role=list]{flex-direction:row;max-width:100vw}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{position:sticky;padding-inline:12px;height:var(--main-navigation-height);gap:4px;font-size:16px;z-index:4}post-mainnavigation post-list-item>a .nav-el-active,post-mainnavigation post-list-item>button .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-active{font-weight:700;text-align:center;opacity:0}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{position:absolute;opacity:1;text-align:center;width:100%;left:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff;font-weight:700}post-mainnavigation post-list-item>a.selected .nav-el-active,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item>button.selected .nav-el-active,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-active,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-active{opacity:1}post-mainnavigation post-list-item>a.selected .nav-el-inactive,post-mainnavigation post-list-item>a[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item>button.selected .nav-el-inactive,post-mainnavigation post-list-item>button[aria-expanded=true] .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button.selected .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true] .nav-el-inactive{opacity:0}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}}@media screen and (min-width: 1024px)and (max-width: 599.98px){post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{font-size:14px}}@media screen and (min-width: 1024px){post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline-end:12px;transition:border-block-end-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{width:calc(100% - 28px)}post-mainnavigation post-list-item>button::after,post-mainnavigation post-list-item post-megadropdown-trigger button::after{transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button.selected::after,post-mainnavigation post-list-item>button[aria-expanded=true]::after,post-mainnavigation post-list-item post-megadropdown-trigger button.selected::after,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]::after{transform:rotate(180deg)}}@media screen and (min-width: 1024px){post-mainnavigation post-megadropdown button:not(.btn-icon-close),post-mainnavigation post-megadropdown a{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-megadropdown button:not(.btn-icon-close)::before,post-mainnavigation post-megadropdown a::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-megadropdown button:not(.btn-icon-close).selected,post-mainnavigation post-megadropdown button:not(.btn-icon-close)[aria-expanded=true],post-mainnavigation post-megadropdown a.selected,post-mainnavigation post-megadropdown a[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover,post-mainnavigation post-megadropdown a:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-megadropdown button:not(.btn-icon-close):hover::before,post-mainnavigation post-megadropdown a:hover::before{background-color:#504f4b}}@media screen and (min-width: 1024px){post-mainnavigation [slot=back-button]{display:none}}@media screen and (max-width: 1023.98px){post-mainnavigation nav{transform:none !important}post-mainnavigation .left-scroll-button,post-mainnavigation .right-scroll-button{display:none}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative}post-mainnavigation post-list-item>a::before,post-mainnavigation post-list-item>button::before,post-mainnavigation post-list-item post-megadropdown-trigger button::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{background-color:#050400;color:#fff}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{background-color:#504f4b;color:#fff}post-mainnavigation post-list-item>a:hover::before,post-mainnavigation post-list-item>button:hover::before,post-mainnavigation post-list-item post-megadropdown-trigger button:hover::before{background-color:#504f4b}post-mainnavigation post-list-item>a .nav-el-inactive,post-mainnavigation post-list-item>button .nav-el-inactive,post-mainnavigation post-list-item post-megadropdown-trigger button .nav-el-inactive{display:none}post-mainnavigation>button::after,post-mainnavigation post-megadropdown-trigger button::after{transform:rotate(-90deg)}}post-mainnavigation .back-button .btn{padding-inline:0}";
|
|
5
5
|
const PostMainnavigationStyle0 = postMainnavigationCss;
|
|
6
6
|
|
|
7
7
|
const SCROLL_REPEAT_INTERVAL = 100; // Interval for repeated scrolling when holding down scroll button
|