@swisspost/design-system-components 9.0.0-next.25 → 9.0.0-next.27
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.cjs.js +20 -20
- package/dist/cjs/{package-c7d204b7.js → package-9cf8a0c0.js} +1 -1
- package/dist/cjs/{post-accordion-17294430.js → post-accordion-0c2b22de.js} +1 -1
- package/dist/cjs/{post-accordion-item-da4339cd.js → post-accordion-item-0406f5d1.js} +1 -1
- package/dist/cjs/post-accordion-item.cjs.entry.js +2 -2
- package/dist/cjs/post-accordion.cjs.entry.js +2 -2
- package/dist/cjs/{post-avatar-4406be64.js → post-avatar-1a8d1d89.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/{post-back-to-top-7ce45d24.js → post-back-to-top-ad7e72ff.js} +1 -1
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/{post-banner-d7e1b7d5.js → post-banner-808c8133.js} +1 -1
- package/dist/cjs/post-banner.cjs.entry.js +2 -2
- package/dist/cjs/{post-breadcrumb-6a5984b4.js → post-breadcrumb-a13449c1.js} +1 -1
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +2 -2
- package/dist/cjs/post-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/{post-card-control-8071448c.js → post-card-control-77e137dc.js} +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_15.cjs.entry.js +2 -2
- package/dist/cjs/{post-collapsible-trigger-b0d3df22.js → post-collapsible-trigger-8771476a.js} +1 -1
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
- package/dist/cjs/{post-footer-f38ef472.js → post-footer-b0b17145.js} +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +2 -2
- package/dist/cjs/{post-linkarea-3a0f8a49.js → post-linkarea-b9537644.js} +1 -1
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-item-107b6d80.js → post-menu-item-9cb418ca.js} +1 -1
- package/dist/cjs/{post-popover-7f47ee07.js → post-popover-fa272852.js} +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-8981e238.js → post-rating-2b2cb15d.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-f89119cb.js → post-tab-header-9fe90c68.js} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-665c1400.js → post-tab-panel-1684d593.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-579f5e97.js → post-tabs-1f41e858.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-b13a44ae.js → post-tag-c456d90b.js} +1 -1
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-togglebutton-241c1868.js → post-togglebutton-4f3e0976.js} +17 -13
- package/dist/cjs/{post-tooltip-bedfc58a.js → post-tooltip-bae7ee46.js} +1 -1
- package/dist/cjs/post-tooltip.cjs.entry.js +2 -2
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +15 -11
- package/dist/components/package.js +1 -1
- package/dist/components/post-header2.js +16 -12
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +20 -20
- package/dist/esm/package-f5f8e879.js +3 -0
- package/dist/esm/{post-accordion-0a3d5cb5.js → post-accordion-317dbe7e.js} +1 -1
- package/dist/esm/{post-accordion-item-7cd61396.js → post-accordion-item-5d1b4d58.js} +1 -1
- package/dist/esm/post-accordion-item.entry.js +2 -2
- package/dist/esm/post-accordion.entry.js +2 -2
- package/dist/esm/{post-avatar-887e552c.js → post-avatar-db4e7dfe.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/{post-back-to-top-04066434.js → post-back-to-top-56edc0cb.js} +1 -1
- package/dist/esm/post-back-to-top.entry.js +2 -2
- package/dist/esm/{post-banner-244b9664.js → post-banner-3363f6ca.js} +1 -1
- package/dist/esm/post-banner.entry.js +2 -2
- package/dist/esm/{post-breadcrumb-9b85c503.js → post-breadcrumb-d36a58fe.js} +1 -1
- package/dist/esm/post-breadcrumb-item_2.entry.js +2 -2
- package/dist/esm/post-breadcrumb.entry.js +2 -2
- package/dist/esm/{post-card-control-1329dcfe.js → post-card-control-01b26f14.js} +1 -1
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_15.entry.js +2 -2
- package/dist/esm/{post-collapsible-trigger-d2b5247c.js → post-collapsible-trigger-129cb03c.js} +1 -1
- package/dist/esm/post-collapsible_2.entry.js +2 -2
- package/dist/esm/{post-footer-dd62137f.js → post-footer-16975a8b.js} +1 -1
- package/dist/esm/post-footer.entry.js +2 -2
- package/dist/esm/{post-linkarea-a32d5a77.js → post-linkarea-4e80fa68.js} +1 -1
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/{post-menu-item-2951453a.js → post-menu-item-6b1c6d97.js} +1 -1
- package/dist/esm/{post-popover-7aa09133.js → post-popover-c0be9a01.js} +1 -1
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-b8974582.js → post-rating-0a703f5f.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-8eae9acf.js → post-tab-header-e84a8bbc.js} +1 -1
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-e3368b04.js → post-tab-panel-8fcce852.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-7adeaf6b.js → post-tabs-a79dd589.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-441d043f.js → post-tag-b36a49e8.js} +1 -1
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-togglebutton-a0510987.js → post-togglebutton-d1736d7e.js} +17 -13
- package/dist/esm/{post-tooltip-8295268a.js → post-tooltip-91b0d59c.js} +1 -1
- package/dist/esm/post-tooltip.entry.js +2 -2
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/{p-1a1b3072.js → p-05aafa59.js} +1 -1
- package/dist/post-components/{p-2e9f4062.js → p-13f55660.js} +1 -1
- package/dist/post-components/{p-f2451c8b.js → p-184194f6.js} +1 -1
- package/dist/post-components/{p-1cbde7fe.js → p-1ce770a4.js} +1 -1
- package/dist/post-components/{p-fd03e4f7.entry.js → p-294a2a02.entry.js} +1 -1
- package/dist/post-components/p-3df87c0f.entry.js +1 -0
- package/dist/post-components/p-3fb27af8.entry.js +1 -0
- package/dist/post-components/p-4a3b4622.entry.js +1 -0
- package/dist/post-components/p-4e63b8c5.entry.js +1 -0
- package/dist/post-components/p-4edd87cd.entry.js +1 -0
- package/dist/post-components/p-508df448.entry.js +1 -0
- package/dist/post-components/{p-fc4c553c.js → p-50e59106.js} +1 -1
- package/dist/post-components/p-56385120.entry.js +1 -0
- package/dist/post-components/{p-1e3dd5bd.js → p-567947cb.js} +1 -1
- package/dist/post-components/p-5a0e93e1.entry.js +1 -0
- package/dist/post-components/p-5f39bad2.entry.js +1 -0
- package/dist/post-components/p-61c6163d.entry.js +1 -0
- package/dist/post-components/p-680fa79f.js +1 -0
- package/dist/post-components/p-7303cf62.entry.js +1 -0
- package/dist/post-components/{p-ae1aa734.js → p-7c62736e.js} +1 -1
- package/dist/post-components/p-7c90497e.js +1 -0
- package/dist/post-components/{p-6beffad5.js → p-7d0485dd.js} +1 -1
- package/dist/post-components/{p-1e73add7.js → p-84e36629.js} +1 -1
- package/dist/post-components/p-89b6df16.entry.js +1 -0
- package/dist/post-components/{p-f0a232d7.js → p-944aa9cf.js} +1 -1
- package/dist/post-components/{p-195f8cd8.js → p-9459fcb6.js} +1 -1
- package/dist/post-components/{p-3d1f93a6.entry.js → p-a82cec53.entry.js} +1 -1
- package/dist/post-components/{p-21e1cb32.js → p-a95070d0.js} +1 -1
- package/dist/post-components/{p-e0241c1d.js → p-ae2347e9.js} +1 -1
- package/dist/post-components/p-b3f51771.entry.js +1 -0
- package/dist/post-components/{p-d81ae8cb.js → p-c2dbd7a1.js} +1 -1
- package/dist/post-components/p-c7bb0317.entry.js +1 -0
- package/dist/post-components/{p-09468501.js → p-c94d2e70.js} +1 -1
- package/dist/post-components/p-ce88568e.entry.js +1 -0
- package/dist/post-components/p-d489cb8f.js +1 -0
- package/dist/post-components/p-e33d83f4.entry.js +1 -0
- package/dist/post-components/{p-69841b90.js → p-e3514559.js} +1 -1
- package/dist/post-components/p-f186908f.entry.js +1 -0
- package/dist/post-components/{p-3b748f3e.js → p-f9b3addd.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-header.js +16 -12
- package/package.json +3 -3
- package/dist/esm/package-6dd1a273.js +0 -3
- package/dist/post-components/p-2443adcb.js +0 -1
- package/dist/post-components/p-3b7cfd1b.entry.js +0 -1
- package/dist/post-components/p-41f255ec.entry.js +0 -1
- package/dist/post-components/p-4eb71e30.js +0 -1
- package/dist/post-components/p-5c813ccf.entry.js +0 -1
- package/dist/post-components/p-62e18265.entry.js +0 -1
- package/dist/post-components/p-792c167c.entry.js +0 -1
- package/dist/post-components/p-8bdf6637.entry.js +0 -1
- package/dist/post-components/p-94bceea9.entry.js +0 -1
- package/dist/post-components/p-9a4dd70a.entry.js +0 -1
- package/dist/post-components/p-9fc68ef1.entry.js +0 -1
- package/dist/post-components/p-a9fc29db.entry.js +0 -1
- package/dist/post-components/p-af6ace51.entry.js +0 -1
- package/dist/post-components/p-b46777b6.entry.js +0 -1
- package/dist/post-components/p-bb5ae350.js +0 -1
- package/dist/post-components/p-c75bad27.entry.js +0 -1
- package/dist/post-components/p-ee0c1389.entry.js +0 -1
- package/dist/post-components/p-ef47cf27.entry.js +0 -1
- package/dist/post-components/p-f9a01f1e.entry.js +0 -1
- package/dist/post-components/p-fbe39ef0.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-d6bf2c66.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-9cf8a0c0.js');
|
|
5
5
|
const slide = require('./slide-cd1f09b3.js');
|
|
6
6
|
const index$1 = require('./index-23e36ff7.js');
|
|
7
7
|
const checkNonEmpty = require('./check-non-empty-bd99d236.js');
|
|
@@ -188,7 +188,7 @@ function getFocusableChildren(element) {
|
|
|
188
188
|
return visibleFocusableChildren;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
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}
|
|
191
|
+
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 (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@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}@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}}";
|
|
192
192
|
const PostHeaderStyle0 = postHeaderCss;
|
|
193
193
|
|
|
194
194
|
const PostHeader = class {
|
|
@@ -207,11 +207,13 @@ const PostHeader = class {
|
|
|
207
207
|
scrollParentResizeObserver;
|
|
208
208
|
localHeaderResizeObserver;
|
|
209
209
|
get scrollParent() {
|
|
210
|
+
const frozenScrollParent = document.querySelector('[data-is-post-header-scroll-parent]');
|
|
211
|
+
if (frozenScrollParent)
|
|
212
|
+
return frozenScrollParent;
|
|
210
213
|
let element = this.host.parentElement;
|
|
211
214
|
while (element) {
|
|
212
|
-
const hasScrollParentAttr = element.hasAttribute('data-is-post-header-scroll-parent');
|
|
213
215
|
const overflow = getComputedStyle(element).overflowY;
|
|
214
|
-
if (
|
|
216
|
+
if (['auto', 'scroll'].includes(overflow)) {
|
|
215
217
|
return element;
|
|
216
218
|
}
|
|
217
219
|
element = element.parentElement;
|
|
@@ -220,14 +222,15 @@ const PostHeader = class {
|
|
|
220
222
|
}
|
|
221
223
|
get host() { return index.getElement(this); }
|
|
222
224
|
frozeBody(isMobileMenuExtended) {
|
|
225
|
+
const scrollParent = this.scrollParent;
|
|
223
226
|
if (isMobileMenuExtended) {
|
|
224
|
-
|
|
225
|
-
|
|
227
|
+
scrollParent.setAttribute('data-is-post-header-scroll-parent', '');
|
|
228
|
+
scrollParent.style.overflow = 'hidden';
|
|
226
229
|
this.host.addEventListener('keydown', this.keyboardHandler.bind(this));
|
|
227
230
|
}
|
|
228
231
|
else {
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
scrollParent.style.overflow = '';
|
|
233
|
+
scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
231
234
|
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
232
235
|
}
|
|
233
236
|
}
|
|
@@ -256,12 +259,10 @@ const PostHeader = class {
|
|
|
256
259
|
}
|
|
257
260
|
// Clean up possible side effects when post-header is disconnected
|
|
258
261
|
disconnectedCallback() {
|
|
259
|
-
|
|
260
|
-
this.scrollParent.style.overflow = '';
|
|
261
|
-
this.scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
262
|
+
const scrollParent = this.scrollParent;
|
|
262
263
|
window.removeEventListener('resize', this.throttledResize);
|
|
263
264
|
window.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
264
|
-
|
|
265
|
+
scrollParent.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
265
266
|
document.removeEventListener('postToggleMegadropdown', this.megedropdownStateHandler.bind(this));
|
|
266
267
|
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
267
268
|
this.host.removeEventListener('click', this.handleLinkClick.bind(this));
|
|
@@ -269,6 +270,9 @@ const PostHeader = class {
|
|
|
269
270
|
this.scrollParentResizeObserver.disconnect();
|
|
270
271
|
if (this.localHeaderResizeObserver)
|
|
271
272
|
this.localHeaderResizeObserver.disconnect();
|
|
273
|
+
this.mobileMenuExtended = false;
|
|
274
|
+
scrollParent.style.overflow = '';
|
|
275
|
+
scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
272
276
|
}
|
|
273
277
|
/**
|
|
274
278
|
* Toggles the mobile navigation.
|
|
@@ -406,7 +410,7 @@ const PostHeader = class {
|
|
|
406
410
|
return (index.h("div", { class: navigationClasses.join(' ') }, index.h("div", { ref: el => (this.mobileMenu = el) }, index.h("slot", { name: "post-mainnavigation" }), (this.device === 'mobile' || this.device === 'tablet') && (index.h("div", { class: "navigation-footer" }, index.h("slot", { name: "meta-navigation" }), index.h("slot", { name: "post-language-switch" }))))));
|
|
407
411
|
}
|
|
408
412
|
render() {
|
|
409
|
-
return (index.h(index.Host, { key: '
|
|
413
|
+
return (index.h(index.Host, { key: '866b6378652ff5860c8b046f249411941e3510ca', version: _package.version }, index.h("div", { key: '4f834e011faf12f0e9629c442172153a5d710f6a', class: "global-header" }, index.h("div", { key: '16acea9aa91b071f4ee25b00e19a0d23f5765ffa', class: "global-sub" }, index.h("div", { key: '1aea872a00166aeada3538f25c8d5b1afb0595a5', class: "logo" }, index.h("slot", { key: '343ed3f016295d025196841260fc501795f211ec', name: "post-logo" }))), index.h("div", { key: '47e2d3df5973d8cf542051c9da6b2b7f077d202c', class: "global-sub" }, this.device === 'desktop' && index.h("slot", { key: '2000cf588d06f28b1d25bca60842d05e01635e7c', name: "meta-navigation" }), index.h("slot", { key: '40d62c75e080bbee36b4a5f75ee0d6a727b0153a', name: "global-controls" }), this.device === 'desktop' && index.h("slot", { key: '531b27a3332a6f91491b0e04efce42037edf7384', name: "post-language-switch" }), index.h("div", { key: '427b869f050400509ec17b1ed8aa539a3efb8fef', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, index.h("slot", { key: '3d824c0b31cc55f4279944e02c4fa3f26bce9b7e', name: "post-togglebutton" })))), index.h("div", { key: 'bd23ea8c42abf93d343f4579b1a433d7224a3631', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, index.h("slot", { key: '25ee29386c66395371dd1fa7c61794fefc220b85', name: "title" }), index.h("div", { key: 'e8b11280d2664a8d19935fe7fc095830d0ff4a1c', class: "local-sub" }, index.h("slot", { key: 'af10ad2f82146d10af525dd6a83871f428d09953', name: "local-controls" }), index.h("slot", { key: '311f3b2ef20794fae57d8354bd4a06552e90703e' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
410
414
|
}
|
|
411
415
|
static get watchers() { return {
|
|
412
416
|
"mobileMenuExtended": ["frozeBody"]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-d6bf2c66.js');
|
|
4
|
-
const _package = require('./package-
|
|
4
|
+
const _package = require('./package-9cf8a0c0.js');
|
|
5
5
|
const attributeObserver = require('./attribute-observer-6d8b886b.js');
|
|
6
6
|
const index$1 = require('./index-23e36ff7.js');
|
|
7
7
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const postTooltip = require('./post-tooltip-
|
|
5
|
+
const postTooltip = require('./post-tooltip-bae7ee46.js');
|
|
6
6
|
require('./index-d6bf2c66.js');
|
|
7
|
-
require('./package-
|
|
7
|
+
require('./package-9cf8a0c0.js');
|
|
8
8
|
require('./attribute-observer-6d8b886b.js');
|
|
9
9
|
require('./index-23e36ff7.js');
|
|
10
10
|
require('./constants-238701d3.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,::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}
|
|
1
|
+
*,::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(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@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}@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}}
|
|
@@ -26,11 +26,13 @@ export class PostHeader {
|
|
|
26
26
|
scrollParentResizeObserver;
|
|
27
27
|
localHeaderResizeObserver;
|
|
28
28
|
get scrollParent() {
|
|
29
|
+
const frozenScrollParent = document.querySelector('[data-is-post-header-scroll-parent]');
|
|
30
|
+
if (frozenScrollParent)
|
|
31
|
+
return frozenScrollParent;
|
|
29
32
|
let element = this.host.parentElement;
|
|
30
33
|
while (element) {
|
|
31
|
-
const hasScrollParentAttr = element.hasAttribute('data-is-post-header-scroll-parent');
|
|
32
34
|
const overflow = getComputedStyle(element).overflowY;
|
|
33
|
-
if (
|
|
35
|
+
if (['auto', 'scroll'].includes(overflow)) {
|
|
34
36
|
return element;
|
|
35
37
|
}
|
|
36
38
|
element = element.parentElement;
|
|
@@ -39,14 +41,15 @@ export class PostHeader {
|
|
|
39
41
|
}
|
|
40
42
|
host;
|
|
41
43
|
frozeBody(isMobileMenuExtended) {
|
|
44
|
+
const scrollParent = this.scrollParent;
|
|
42
45
|
if (isMobileMenuExtended) {
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
scrollParent.setAttribute('data-is-post-header-scroll-parent', '');
|
|
47
|
+
scrollParent.style.overflow = 'hidden';
|
|
45
48
|
this.host.addEventListener('keydown', this.keyboardHandler.bind(this));
|
|
46
49
|
}
|
|
47
50
|
else {
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
scrollParent.style.overflow = '';
|
|
52
|
+
scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
50
53
|
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
51
54
|
}
|
|
52
55
|
}
|
|
@@ -75,12 +78,10 @@ export class PostHeader {
|
|
|
75
78
|
}
|
|
76
79
|
// Clean up possible side effects when post-header is disconnected
|
|
77
80
|
disconnectedCallback() {
|
|
78
|
-
|
|
79
|
-
this.scrollParent.style.overflow = '';
|
|
80
|
-
this.scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
81
|
+
const scrollParent = this.scrollParent;
|
|
81
82
|
window.removeEventListener('resize', this.throttledResize);
|
|
82
83
|
window.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
83
|
-
|
|
84
|
+
scrollParent.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
84
85
|
document.removeEventListener('postToggleMegadropdown', this.megedropdownStateHandler.bind(this));
|
|
85
86
|
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
86
87
|
this.host.removeEventListener('click', this.handleLinkClick.bind(this));
|
|
@@ -88,6 +89,9 @@ export class PostHeader {
|
|
|
88
89
|
this.scrollParentResizeObserver.disconnect();
|
|
89
90
|
if (this.localHeaderResizeObserver)
|
|
90
91
|
this.localHeaderResizeObserver.disconnect();
|
|
92
|
+
this.mobileMenuExtended = false;
|
|
93
|
+
scrollParent.style.overflow = '';
|
|
94
|
+
scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
91
95
|
}
|
|
92
96
|
/**
|
|
93
97
|
* Toggles the mobile navigation.
|
|
@@ -225,7 +229,7 @@ export class PostHeader {
|
|
|
225
229
|
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" }))))));
|
|
226
230
|
}
|
|
227
231
|
render() {
|
|
228
|
-
return (h(Host, { key: '
|
|
232
|
+
return (h(Host, { key: '866b6378652ff5860c8b046f249411941e3510ca', version: version }, h("div", { key: '4f834e011faf12f0e9629c442172153a5d710f6a', class: "global-header" }, h("div", { key: '16acea9aa91b071f4ee25b00e19a0d23f5765ffa', class: "global-sub" }, h("div", { key: '1aea872a00166aeada3538f25c8d5b1afb0595a5', class: "logo" }, h("slot", { key: '343ed3f016295d025196841260fc501795f211ec', name: "post-logo" }))), h("div", { key: '47e2d3df5973d8cf542051c9da6b2b7f077d202c', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '2000cf588d06f28b1d25bca60842d05e01635e7c', name: "meta-navigation" }), h("slot", { key: '40d62c75e080bbee36b4a5f75ee0d6a727b0153a', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '531b27a3332a6f91491b0e04efce42037edf7384', name: "post-language-switch" }), h("div", { key: '427b869f050400509ec17b1ed8aa539a3efb8fef', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '3d824c0b31cc55f4279944e02c4fa3f26bce9b7e', name: "post-togglebutton" })))), h("div", { key: 'bd23ea8c42abf93d343f4579b1a433d7224a3631', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '25ee29386c66395371dd1fa7c61794fefc220b85', name: "title" }), h("div", { key: 'e8b11280d2664a8d19935fe7fc095830d0ff4a1c', class: "local-sub" }, h("slot", { key: 'af10ad2f82146d10af525dd6a83871f428d09953', name: "local-controls" }), h("slot", { key: '311f3b2ef20794fae57d8354bd4a06552e90703e' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
229
233
|
}
|
|
230
234
|
static get is() { return "post-header"; }
|
|
231
235
|
static get encapsulation() { return "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}
|
|
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 (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.local-header::after{background-color:Highlight}}@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}@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 = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTMLElement {
|
|
@@ -158,11 +158,13 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
158
158
|
scrollParentResizeObserver;
|
|
159
159
|
localHeaderResizeObserver;
|
|
160
160
|
get scrollParent() {
|
|
161
|
+
const frozenScrollParent = document.querySelector('[data-is-post-header-scroll-parent]');
|
|
162
|
+
if (frozenScrollParent)
|
|
163
|
+
return frozenScrollParent;
|
|
161
164
|
let element = this.host.parentElement;
|
|
162
165
|
while (element) {
|
|
163
|
-
const hasScrollParentAttr = element.hasAttribute('data-is-post-header-scroll-parent');
|
|
164
166
|
const overflow = getComputedStyle(element).overflowY;
|
|
165
|
-
if (
|
|
167
|
+
if (['auto', 'scroll'].includes(overflow)) {
|
|
166
168
|
return element;
|
|
167
169
|
}
|
|
168
170
|
element = element.parentElement;
|
|
@@ -171,14 +173,15 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
171
173
|
}
|
|
172
174
|
get host() { return this; }
|
|
173
175
|
frozeBody(isMobileMenuExtended) {
|
|
176
|
+
const scrollParent = this.scrollParent;
|
|
174
177
|
if (isMobileMenuExtended) {
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
scrollParent.setAttribute('data-is-post-header-scroll-parent', '');
|
|
179
|
+
scrollParent.style.overflow = 'hidden';
|
|
177
180
|
this.host.addEventListener('keydown', this.keyboardHandler.bind(this));
|
|
178
181
|
}
|
|
179
182
|
else {
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
scrollParent.style.overflow = '';
|
|
184
|
+
scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
182
185
|
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
183
186
|
}
|
|
184
187
|
}
|
|
@@ -207,12 +210,10 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
207
210
|
}
|
|
208
211
|
// Clean up possible side effects when post-header is disconnected
|
|
209
212
|
disconnectedCallback() {
|
|
210
|
-
|
|
211
|
-
this.scrollParent.style.overflow = '';
|
|
212
|
-
this.scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
213
|
+
const scrollParent = this.scrollParent;
|
|
213
214
|
window.removeEventListener('resize', this.throttledResize);
|
|
214
215
|
window.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
215
|
-
|
|
216
|
+
scrollParent.removeEventListener('scroll', this.handleScrollEvent.bind(this));
|
|
216
217
|
document.removeEventListener('postToggleMegadropdown', this.megedropdownStateHandler.bind(this));
|
|
217
218
|
this.host.removeEventListener('keydown', this.keyboardHandler.bind(this));
|
|
218
219
|
this.host.removeEventListener('click', this.handleLinkClick.bind(this));
|
|
@@ -220,6 +221,9 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
220
221
|
this.scrollParentResizeObserver.disconnect();
|
|
221
222
|
if (this.localHeaderResizeObserver)
|
|
222
223
|
this.localHeaderResizeObserver.disconnect();
|
|
224
|
+
this.mobileMenuExtended = false;
|
|
225
|
+
scrollParent.style.overflow = '';
|
|
226
|
+
scrollParent.removeAttribute('data-is-post-header-scroll-parent');
|
|
223
227
|
}
|
|
224
228
|
/**
|
|
225
229
|
* Toggles the mobile navigation.
|
|
@@ -357,7 +361,7 @@ const PostHeader = /*@__PURE__*/ proxyCustomElement(class PostHeader extends HTM
|
|
|
357
361
|
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" }))))));
|
|
358
362
|
}
|
|
359
363
|
render() {
|
|
360
|
-
return (h(Host, { key: '
|
|
364
|
+
return (h(Host, { key: '866b6378652ff5860c8b046f249411941e3510ca', version: version }, h("div", { key: '4f834e011faf12f0e9629c442172153a5d710f6a', class: "global-header" }, h("div", { key: '16acea9aa91b071f4ee25b00e19a0d23f5765ffa', class: "global-sub" }, h("div", { key: '1aea872a00166aeada3538f25c8d5b1afb0595a5', class: "logo" }, h("slot", { key: '343ed3f016295d025196841260fc501795f211ec', name: "post-logo" }))), h("div", { key: '47e2d3df5973d8cf542051c9da6b2b7f077d202c', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: '2000cf588d06f28b1d25bca60842d05e01635e7c', name: "meta-navigation" }), h("slot", { key: '40d62c75e080bbee36b4a5f75ee0d6a727b0153a', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '531b27a3332a6f91491b0e04efce42037edf7384', name: "post-language-switch" }), h("div", { key: '427b869f050400509ec17b1ed8aa539a3efb8fef', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: '3d824c0b31cc55f4279944e02c4fa3f26bce9b7e', name: "post-togglebutton" })))), h("div", { key: 'bd23ea8c42abf93d343f4579b1a433d7224a3631', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '25ee29386c66395371dd1fa7c61794fefc220b85', name: "title" }), h("div", { key: 'e8b11280d2664a8d19935fe7fc095830d0ff4a1c', class: "local-sub" }, h("slot", { key: 'af10ad2f82146d10af525dd6a83871f428d09953', name: "local-controls" }), h("slot", { key: '311f3b2ef20794fae57d8354bd4a06552e90703e' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
361
365
|
}
|
|
362
366
|
static get watchers() { return {
|
|
363
367
|
"mobileMenuExtended": ["frozeBody"]
|
package/dist/docs.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export { P as PostAccordion } from './post-accordion-
|
|
2
|
-
export { P as PostAccordionItem } from './post-accordion-item-
|
|
3
|
-
export { P as PostAvatar } from './post-avatar-
|
|
4
|
-
export { P as PostBackToTop } from './post-back-to-top-
|
|
5
|
-
export { P as PostBanner } from './post-banner-
|
|
6
|
-
export { P as PostBreadcrumb } from './post-breadcrumb-
|
|
7
|
-
export { P as PostBreadcrumbItem, a as PostMenuItem } from './post-menu-item-
|
|
8
|
-
export { P as PostCardControl } from './post-card-control-
|
|
9
|
-
export { P as PostClosebutton, a as PostHeader, b as PostIcon, c as PostLanguageOption, d as PostLanguageSwitch, e as PostList, f as PostListItem, g as PostLogo, h as PostMainnavigation, i as PostMegadropdown, j as PostMegadropdownTrigger, k as PostMenu, l as PostMenuTrigger, m as PostPopovercontainer, n as PostTogglebutton } from './post-togglebutton-
|
|
10
|
-
export { P as PostCollapsible, a as PostCollapsibleTrigger } from './post-collapsible-trigger-
|
|
11
|
-
export { P as PostFooter } from './post-footer-
|
|
12
|
-
export { P as PostLinkarea } from './post-linkarea-
|
|
13
|
-
export { P as PostPopover } from './post-popover-
|
|
14
|
-
export { P as PostRating } from './post-rating-
|
|
15
|
-
export { P as PostTabs } from './post-tabs-
|
|
16
|
-
export { P as PostTabHeader } from './post-tab-header-
|
|
17
|
-
export { P as PostTabPanel } from './post-tab-panel-
|
|
18
|
-
export { P as PostTag } from './post-tag-
|
|
19
|
-
export { P as PostTooltip } from './post-tooltip-
|
|
1
|
+
export { P as PostAccordion } from './post-accordion-317dbe7e.js';
|
|
2
|
+
export { P as PostAccordionItem } from './post-accordion-item-5d1b4d58.js';
|
|
3
|
+
export { P as PostAvatar } from './post-avatar-db4e7dfe.js';
|
|
4
|
+
export { P as PostBackToTop } from './post-back-to-top-56edc0cb.js';
|
|
5
|
+
export { P as PostBanner } from './post-banner-3363f6ca.js';
|
|
6
|
+
export { P as PostBreadcrumb } from './post-breadcrumb-d36a58fe.js';
|
|
7
|
+
export { P as PostBreadcrumbItem, a as PostMenuItem } from './post-menu-item-6b1c6d97.js';
|
|
8
|
+
export { P as PostCardControl } from './post-card-control-01b26f14.js';
|
|
9
|
+
export { P as PostClosebutton, a as PostHeader, b as PostIcon, c as PostLanguageOption, d as PostLanguageSwitch, e as PostList, f as PostListItem, g as PostLogo, h as PostMainnavigation, i as PostMegadropdown, j as PostMegadropdownTrigger, k as PostMenu, l as PostMenuTrigger, m as PostPopovercontainer, n as PostTogglebutton } from './post-togglebutton-d1736d7e.js';
|
|
10
|
+
export { P as PostCollapsible, a as PostCollapsibleTrigger } from './post-collapsible-trigger-129cb03c.js';
|
|
11
|
+
export { P as PostFooter } from './post-footer-16975a8b.js';
|
|
12
|
+
export { P as PostLinkarea } from './post-linkarea-4e80fa68.js';
|
|
13
|
+
export { P as PostPopover } from './post-popover-c0be9a01.js';
|
|
14
|
+
export { P as PostRating } from './post-rating-0a703f5f.js';
|
|
15
|
+
export { P as PostTabs } from './post-tabs-a79dd589.js';
|
|
16
|
+
export { P as PostTabHeader } from './post-tab-header-e84a8bbc.js';
|
|
17
|
+
export { P as PostTabPanel } from './post-tab-panel-8fcce852.js';
|
|
18
|
+
export { P as PostTag } from './post-tag-b36a49e8.js';
|
|
19
|
+
export { P as PostTooltip } from './post-tooltip-91b0d59c.js';
|
|
20
20
|
import './index-3419e46d.js';
|
|
21
|
-
import './package-
|
|
21
|
+
import './package-f5f8e879.js';
|
|
22
22
|
import './heading-levels-5b7b4349.js';
|
|
23
23
|
import './check-one-of-0bee20f5.js';
|
|
24
24
|
import './index-8f8fe5b0.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-3419e46d.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-f5f8e879.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
|
|
4
4
|
import { c as checkOneOf } from './check-one-of-0bee20f5.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-3419e46d.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-f5f8e879.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels-5b7b4349.js';
|
|
4
4
|
import { c as checkEmptyOrOneOf } from './index-8f8fe5b0.js';
|
|
5
5
|
import { n as nanoid } from './index.browser-51485f85.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_accordion_item } from './post-accordion-item-
|
|
1
|
+
export { P as post_accordion_item } from './post-accordion-item-5d1b4d58.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-f5f8e879.js';
|
|
4
4
|
import './heading-levels-5b7b4349.js';
|
|
5
5
|
import './index-8f8fe5b0.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { P as post_accordion } from './post-accordion-
|
|
1
|
+
export { P as post_accordion } from './post-accordion-317dbe7e.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-f5f8e879.js';
|
|
4
4
|
import './heading-levels-5b7b4349.js';
|
|
5
5
|
import './check-one-of-0bee20f5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-3419e46d.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-f5f8e879.js';
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty-258a56b3.js';
|
|
4
4
|
|
|
5
5
|
const postAvatarCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:\"\";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;z-index:2;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase}.initials span{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.initials span:not(caption){position:absolute !important}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { P as post_avatar } from './post-avatar-
|
|
1
|
+
export { P as post_avatar } from './post-avatar-db4e7dfe.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-f5f8e879.js';
|
|
4
4
|
import './check-non-empty-258a56b3.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-3419e46d.js';
|
|
2
2
|
import { s as slideDown, a as slideUp } from './slide-cd2850ee.js';
|
|
3
|
-
import { v as version } from './package-
|
|
3
|
+
import { v as version } from './package-f5f8e879.js';
|
|
4
4
|
import { c as checkType } from './check-type-37d5d307.js';
|
|
5
5
|
import { c as checkNonEmpty } from './check-non-empty-258a56b3.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { P as post_back_to_top } from './post-back-to-top-
|
|
1
|
+
export { P as post_back_to_top } from './post-back-to-top-56edc0cb.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
3
|
import './slide-cd2850ee.js';
|
|
4
|
-
import './package-
|
|
4
|
+
import './package-f5f8e879.js';
|
|
5
5
|
import './check-type-37d5d307.js';
|
|
6
6
|
import './check-non-empty-258a56b3.js';
|
|
7
7
|
import './constants-8d548297.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-3419e46d.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-f5f8e879.js';
|
|
3
3
|
import { f as fadeOut } from './fade-1f3cacf4.js';
|
|
4
4
|
import { a as checkEmptyOrPattern, c as checkEmptyOrOneOf } from './index-8f8fe5b0.js';
|
|
5
5
|
import { n as nanoid } from './index.browser-51485f85.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_banner } from './post-banner-
|
|
1
|
+
export { P as post_banner } from './post-banner-3363f6ca.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-f5f8e879.js';
|
|
4
4
|
import './fade-1f3cacf4.js';
|
|
5
5
|
import './index-8f8fe5b0.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-3419e46d.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-f5f8e879.js';
|
|
3
3
|
import { c as checkUrl } from './check-url-17962bc8.js';
|
|
4
4
|
import { d as debounce } from './debounce-e54c7131.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_breadcrumb_item, a as post_menu_item } from './post-menu-item-
|
|
1
|
+
export { P as post_breadcrumb_item, a as post_menu_item } from './post-menu-item-6b1c6d97.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-f5f8e879.js';
|
|
4
4
|
import './index-8f8fe5b0.js';
|
|
5
5
|
import './constants-8d548297.js';
|
|
6
6
|
import './check-one-of-0bee20f5.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { P as post_breadcrumb } from './post-breadcrumb-
|
|
1
|
+
export { P as post_breadcrumb } from './post-breadcrumb-d36a58fe.js';
|
|
2
2
|
import './index-3419e46d.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-f5f8e879.js';
|
|
4
4
|
import './check-url-17962bc8.js';
|
|
5
5
|
import './debounce-e54c7131.js';
|