@swisspost/design-system-components 9.0.0-next.21 → 9.0.0-next.23
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/breakpoints-c6247c71.js +54 -0
- package/dist/cjs/index.cjs.js +21 -20
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-c6bc9e82.js → package-fdebc7ce.js} +1 -1
- package/dist/cjs/{post-accordion-d1345784.js → post-accordion-d6ddb379.js} +1 -1
- package/dist/cjs/{post-accordion-item-a796d803.js → post-accordion-item-61aed72f.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-b4e96354.js → post-avatar-b5d6aaa9.js} +1 -1
- package/dist/cjs/post-avatar.cjs.entry.js +2 -2
- package/dist/cjs/{post-back-to-top-fc541c6b.js → post-back-to-top-80cbf486.js} +1 -1
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/{post-banner-46522b4f.js → post-banner-72f433b1.js} +1 -1
- package/dist/cjs/post-banner.cjs.entry.js +2 -2
- package/dist/cjs/{post-breadcrumb-799d34da.js → post-breadcrumb-63107527.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-7bf7d3f2.js → post-card-control-dfb221d5.js} +1 -1
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_15.cjs.entry.js +3 -2
- package/dist/cjs/{post-collapsible-trigger-0568e3ec.js → post-collapsible-trigger-e24eae7e.js} +1 -1
- package/dist/cjs/post-collapsible_2.cjs.entry.js +2 -2
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-footer-f87a556b.js → post-footer-cfa3cc4c.js} +3 -53
- package/dist/cjs/post-footer.cjs.entry.js +3 -2
- package/dist/cjs/{post-linkarea-0ccf93fc.js → post-linkarea-9e808259.js} +1 -1
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-item-eba24c40.js → post-menu-item-0e147e2c.js} +1 -1
- package/dist/cjs/{post-popover-35f679f6.js → post-popover-bddabf57.js} +1 -1
- package/dist/cjs/post-popover.cjs.entry.js +2 -2
- package/dist/cjs/{post-rating-d12fa214.js → post-rating-f4c48349.js} +1 -1
- package/dist/cjs/post-rating.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-header-89dca04b.js → post-tab-header-246cd064.js} +1 -1
- package/dist/cjs/post-tab-header.cjs.entry.js +2 -2
- package/dist/cjs/{post-tab-panel-ad1ab180.js → post-tab-panel-0e494e5c.js} +1 -1
- package/dist/cjs/post-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/{post-tabs-0db75745.js → post-tabs-3ead6ac7.js} +1 -1
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-396a46c9.js → post-tag-f62abd13.js} +1 -1
- package/dist/cjs/post-tag.cjs.entry.js +2 -2
- package/dist/cjs/{post-togglebutton-69983699.js → post-togglebutton-63708f9f.js} +84 -50
- package/dist/cjs/{post-tooltip-7174ea97.js → post-tooltip-2f80afc8.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 +50 -33
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +16 -4
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +15 -10
- package/dist/components/breakpoints.js +52 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-footer2.js +1 -51
- package/dist/components/post-header2.js +184 -34
- package/dist/components/post-language-option2.js +1 -1
- package/dist/components/post-language-switch2.js +1 -1
- package/dist/components/post-mainnavigation2.js +17 -5
- package/dist/components/post-megadropdown2.js +15 -10
- package/dist/docs.json +2 -2
- package/dist/esm/breakpoints-bbe0c54e.js +52 -0
- package/dist/esm/index.js +21 -20
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-30b5445a.js +3 -0
- package/dist/esm/{post-accordion-f6d1834d.js → post-accordion-72896a6b.js} +1 -1
- package/dist/esm/{post-accordion-item-7cb93300.js → post-accordion-item-42446f00.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-96108967.js → post-avatar-3d552832.js} +1 -1
- package/dist/esm/post-avatar.entry.js +2 -2
- package/dist/esm/{post-back-to-top-7f8a61c8.js → post-back-to-top-dbfe00b0.js} +1 -1
- package/dist/esm/post-back-to-top.entry.js +2 -2
- package/dist/esm/{post-banner-bb69bce8.js → post-banner-3ec35c25.js} +1 -1
- package/dist/esm/post-banner.entry.js +2 -2
- package/dist/esm/{post-breadcrumb-9d9efa4e.js → post-breadcrumb-640a1b7a.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-fdced7d5.js → post-card-control-549f9ac0.js} +1 -1
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_15.entry.js +3 -2
- package/dist/esm/{post-collapsible-trigger-17b2f067.js → post-collapsible-trigger-76749a79.js} +1 -1
- package/dist/esm/post-collapsible_2.entry.js +2 -2
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-footer-2dcd8159.js → post-footer-2fb4d20e.js} +2 -52
- package/dist/esm/post-footer.entry.js +3 -2
- package/dist/esm/{post-linkarea-06c5144d.js → post-linkarea-d7dbf30c.js} +1 -1
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/{post-menu-item-e917bf99.js → post-menu-item-80d44823.js} +1 -1
- package/dist/esm/{post-popover-67a3cbf2.js → post-popover-1fb2446b.js} +1 -1
- package/dist/esm/post-popover.entry.js +2 -2
- package/dist/esm/{post-rating-9613bee8.js → post-rating-e9a95e85.js} +1 -1
- package/dist/esm/post-rating.entry.js +2 -2
- package/dist/esm/{post-tab-header-dff3a025.js → post-tab-header-aa2be14d.js} +1 -1
- package/dist/esm/post-tab-header.entry.js +2 -2
- package/dist/esm/{post-tab-panel-2b3f82a8.js → post-tab-panel-15f4254a.js} +1 -1
- package/dist/esm/post-tab-panel.entry.js +2 -2
- package/dist/esm/{post-tabs-46d1165f.js → post-tabs-07612298.js} +1 -1
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-4176268e.js → post-tag-b9d3bb0f.js} +1 -1
- package/dist/esm/post-tag.entry.js +2 -2
- package/dist/esm/{post-togglebutton-5892c5bd.js → post-togglebutton-5f0e2508.js} +84 -50
- package/dist/esm/{post-tooltip-5a45a569.js → post-tooltip-b1309328.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-32caa5d5.entry.js +1 -0
- package/dist/post-components/{p-fe8c300c.js → p-33963539.js} +1 -1
- package/dist/post-components/p-3994c72c.entry.js +1 -0
- package/dist/post-components/p-442957b7.entry.js +1 -0
- package/dist/post-components/p-449caeba.entry.js +1 -0
- package/dist/post-components/{p-04895a54.js → p-4f6694d4.js} +1 -1
- package/dist/post-components/p-513e4b41.entry.js +1 -0
- package/dist/post-components/{p-b9bf5a5f.js → p-530bedb1.js} +1 -1
- package/dist/post-components/{p-52790b8b.js → p-534ca692.js} +1 -1
- package/dist/post-components/p-5556960c.entry.js +1 -0
- package/dist/post-components/p-590c8681.entry.js +1 -0
- package/dist/post-components/p-5aeb3656.js +1 -0
- package/dist/post-components/p-68e0803e.entry.js +1 -0
- package/dist/post-components/p-6be78a63.entry.js +1 -0
- package/dist/post-components/{p-67a45f16.js → p-745ce238.js} +1 -1
- package/dist/post-components/{p-4f41f63e.js → p-75627a39.js} +1 -1
- package/dist/post-components/{p-59ca0a13.js → p-7b526da4.js} +1 -1
- package/dist/post-components/{p-2b1281af.js → p-7c08cad2.js} +1 -1
- package/dist/post-components/{p-12a11565.js → p-819f6f7e.js} +1 -1
- package/dist/post-components/p-8891c692.entry.js +1 -0
- package/dist/post-components/p-88b5add2.js +1 -0
- package/dist/post-components/{p-12573893.js → p-9f986e3d.js} +1 -1
- package/dist/post-components/p-a1cbef0b.entry.js +1 -0
- package/dist/post-components/{p-79c552fb.js → p-b1b5248c.js} +1 -1
- package/dist/post-components/p-b54c207a.js +1 -0
- package/dist/post-components/{p-803b7598.js → p-b559d89c.js} +1 -1
- package/dist/post-components/{p-98fcf90b.entry.js → p-b5f43c76.entry.js} +1 -1
- package/dist/post-components/{p-47cb31dd.js → p-b6e041ee.js} +1 -1
- package/dist/post-components/{p-30af1d48.js → p-bbf9ba02.js} +1 -1
- package/dist/post-components/p-ca01c184.js +1 -0
- package/dist/post-components/{p-07a0a626.js → p-d993dd37.js} +1 -1
- package/dist/post-components/p-d9e7aec4.entry.js +1 -0
- package/dist/post-components/p-da18066a.entry.js +1 -0
- package/dist/post-components/{p-dd4a5c0a.entry.js → p-e2da4e76.entry.js} +1 -1
- package/dist/post-components/p-e3d794b1.entry.js +1 -0
- package/dist/post-components/{p-c6b3a926.js → p-eba6a679.js} +1 -1
- package/dist/post-components/p-f175148d.entry.js +1 -0
- package/dist/post-components/{p-017dc6c7.js → p-f1995b47.js} +1 -1
- package/dist/post-components/p-f5a940f4.entry.js +1 -0
- package/dist/post-components/p-fcb60a95.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-header/post-header.d.ts +7 -5
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +1 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +5 -3
- package/dist/types/components.d.ts +3 -0
- package/loaders/breakpoints.js +52 -0
- package/loaders/index.js +2 -1
- package/loaders/package.js +1 -1
- package/loaders/post-footer.js +1 -51
- package/loaders/post-header.js +184 -34
- package/loaders/post-language-option.js +1 -1
- package/loaders/post-language-switch.js +1 -1
- package/loaders/post-mainnavigation.js +17 -5
- package/loaders/post-megadropdown.js +15 -10
- package/package.json +3 -3
- package/dist/components/index3.js +0 -135
- package/dist/esm/package-5614c98b.js +0 -3
- package/dist/post-components/p-0227b899.js +0 -1
- package/dist/post-components/p-04c38bfe.entry.js +0 -1
- package/dist/post-components/p-1289b0a7.entry.js +0 -1
- package/dist/post-components/p-1542a80e.entry.js +0 -1
- package/dist/post-components/p-254a9bd2.entry.js +0 -1
- package/dist/post-components/p-28500934.entry.js +0 -1
- package/dist/post-components/p-2c69e7f2.entry.js +0 -1
- package/dist/post-components/p-30132b19.entry.js +0 -1
- package/dist/post-components/p-3bdeb686.entry.js +0 -1
- package/dist/post-components/p-5aaa5703.entry.js +0 -1
- package/dist/post-components/p-6d8ac9bd.entry.js +0 -1
- package/dist/post-components/p-77cc2a5e.entry.js +0 -1
- package/dist/post-components/p-7dd05e6d.entry.js +0 -1
- package/dist/post-components/p-994fae4c.entry.js +0 -1
- package/dist/post-components/p-a805515a.entry.js +0 -1
- package/dist/post-components/p-b5b48f66.entry.js +0 -1
- package/dist/post-components/p-c9dd3cdb.entry.js +0 -1
- package/dist/post-components/p-cb5e4a06.js +0 -1
- package/dist/post-components/p-e6d54838.entry.js +0 -1
- package/dist/post-components/p-f4b0cc7d.js +0 -1
- package/loaders/index3.js +0 -135
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getElement, r as registerInstance, h, H as Host } from './index-40846676.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-30b5445a.js';
|
|
3
3
|
|
|
4
4
|
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap:var(--post-core-dimension-4);padding:0 var(--post-core-dimension-8);max-width:100%;background-color:var(--post-tag-bg);border:var(--post-core-dimension-1) solid rgba(0,0,0,0);border-radius:var(--post-core-dimension-4);font-size:1rem;line-height:calc(var(--post-core-dimension-32) - var(--post-core-dimension-1)*2);white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:var(--post-core-dimension-24)}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg:#fff;--post-tag-fg:#000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg:#fc0;--post-tag-fg:#000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg:#2c871d;--post-tag-fg:#fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg:#f49e00;--post-tag-fg:#000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg:#a51728;--post-tag-fg:#fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg:#cce4ee;--post-tag-fg:#000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:#000}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}";
|
|
5
5
|
const PostTagStyle0 = postTagCss;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { P as post_tag } from './post-tag-
|
|
1
|
+
export { P as post_tag } from './post-tag-b9d3bb0f.js';
|
|
2
2
|
import './index-40846676.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-30b5445a.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host, c as createEvent } from './index-40846676.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-30b5445a.js';
|
|
3
3
|
import { s as slideUp, a as slideDown } from './slide-62768431.js';
|
|
4
4
|
import { c as checkEmptyOrOneOf, d as checkEmptyOrType, b as checkEmptyOrUrl } from './index-8f8fe5b0.js';
|
|
5
5
|
import { c as checkNonEmpty } from './check-non-empty-258a56b3.js';
|
|
6
6
|
import { c as checkType } from './check-type-37d5d307.js';
|
|
7
7
|
import { n as nanoid } from './index.browser-51485f85.js';
|
|
8
|
+
import { b as breakpoint } from './breakpoints-bbe0c54e.js';
|
|
8
9
|
import { g as getRoot } from './get-root-7af2e0d1.js';
|
|
9
10
|
|
|
10
11
|
const PostClosebutton = class {
|
|
@@ -185,7 +186,7 @@ function getFocusableChildren(element) {
|
|
|
185
186
|
return visibleFocusableChildren;
|
|
186
187
|
}
|
|
187
188
|
|
|
188
|
-
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;
|
|
189
|
+
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;background:#fff;inset-block-end:calc(100dvh - var(--header-height))}::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{height:calc(100dvh - var(--header-height));display:flex;flex-direction:column}.navigation.extended.scroll-y{overflow-y:auto}.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}}";
|
|
189
190
|
const PostHeaderStyle0 = postHeaderCss;
|
|
190
191
|
|
|
191
192
|
const PostHeader = class {
|
|
@@ -194,17 +195,23 @@ const PostHeader = class {
|
|
|
194
195
|
this.postUpdateDevice = createEvent(this, "postUpdateDevice", 7);
|
|
195
196
|
this.device = null;
|
|
196
197
|
this.mobileMenuExtended = false;
|
|
198
|
+
this.megadropdownOpen = false;
|
|
197
199
|
}
|
|
198
200
|
firstFocusableEl;
|
|
199
201
|
lastFocusableEl;
|
|
200
|
-
|
|
202
|
+
scrollListenerElement = null;
|
|
203
|
+
overflowElement = null;
|
|
201
204
|
mobileMenu;
|
|
202
205
|
mobileMenuAnimation;
|
|
203
206
|
throttledScroll = () => this.handleScrollEvent();
|
|
204
207
|
throttledResize = throttle(50, () => this.handleResize());
|
|
205
208
|
componentWillRender() {
|
|
206
|
-
this.
|
|
207
|
-
this.
|
|
209
|
+
this.scrollListenerElement = this.getScrollParent();
|
|
210
|
+
this.overflowElement =
|
|
211
|
+
this.scrollListenerElement === document
|
|
212
|
+
? document.documentElement
|
|
213
|
+
: this.scrollListenerElement;
|
|
214
|
+
this.scrollListenerElement.addEventListener('scroll', this.throttledScroll, { passive: true });
|
|
208
215
|
window.addEventListener('resize', this.throttledResize, { passive: true });
|
|
209
216
|
this.handleResize();
|
|
210
217
|
this.handleScrollEvent();
|
|
@@ -212,18 +219,24 @@ const PostHeader = class {
|
|
|
212
219
|
}
|
|
213
220
|
componentDidLoad() {
|
|
214
221
|
this.updateLocalHeaderHeight();
|
|
222
|
+
// Check if the mega dropdown is expanded
|
|
223
|
+
document.addEventListener('postToggleMegadropdown', (event) => {
|
|
224
|
+
this.megadropdownOpen = event.detail.isVisible;
|
|
225
|
+
});
|
|
226
|
+
this.host.addEventListener('click', this.handleLinkClick.bind(this));
|
|
215
227
|
}
|
|
216
228
|
// Clean up possible side effects when post-header is disconnected
|
|
217
229
|
disconnectedCallback() {
|
|
218
230
|
this.mobileMenuExtended = false;
|
|
219
|
-
|
|
231
|
+
this.overflowElement.style.overflow = '';
|
|
220
232
|
this.host.removeEventListener('keydown', e => {
|
|
221
233
|
this.keyboardHandler(e);
|
|
222
234
|
});
|
|
235
|
+
this.host.removeEventListener('click', this.handleLinkClick.bind(this));
|
|
223
236
|
}
|
|
224
237
|
get host() { return getElement(this); }
|
|
225
238
|
frozeBody(isMobileMenuExtended) {
|
|
226
|
-
|
|
239
|
+
this.overflowElement.style.overflow = isMobileMenuExtended ? 'hidden' : '';
|
|
227
240
|
if (isMobileMenuExtended) {
|
|
228
241
|
this.host.addEventListener('keydown', e => {
|
|
229
242
|
this.keyboardHandler(e);
|
|
@@ -288,42 +301,43 @@ const PostHeader = class {
|
|
|
288
301
|
}
|
|
289
302
|
}
|
|
290
303
|
}
|
|
304
|
+
getScrollParent() {
|
|
305
|
+
let parent = this.host.parentElement;
|
|
306
|
+
if (parent.tagName === 'BODY') {
|
|
307
|
+
parent = document;
|
|
308
|
+
}
|
|
309
|
+
return parent;
|
|
310
|
+
}
|
|
291
311
|
handleScrollEvent() {
|
|
292
312
|
// Credits: "https://github.com/qeremy/so/blob/master/so.dom.js#L426"
|
|
293
|
-
const st = Math.max(0, this.
|
|
294
|
-
? this.
|
|
295
|
-
: this.
|
|
313
|
+
const st = Math.max(0, this.scrollListenerElement instanceof Document
|
|
314
|
+
? this.scrollListenerElement.documentElement.scrollTop
|
|
315
|
+
: this.scrollListenerElement.scrollTop);
|
|
296
316
|
this.host.style.setProperty('--header-scroll-top', `${st}px`);
|
|
297
317
|
}
|
|
298
|
-
getScrollParent(node) {
|
|
299
|
-
let currentParent = node.parentElement;
|
|
300
|
-
while (currentParent) {
|
|
301
|
-
if (currentParent.nodeName === 'BODY') {
|
|
302
|
-
return document;
|
|
303
|
-
}
|
|
304
|
-
if (this.isScrollable(currentParent)) {
|
|
305
|
-
return currentParent;
|
|
306
|
-
}
|
|
307
|
-
currentParent = currentParent.parentElement;
|
|
308
|
-
}
|
|
309
|
-
return document;
|
|
310
|
-
}
|
|
311
|
-
isScrollable(node) {
|
|
312
|
-
if (!(node instanceof HTMLElement || node instanceof SVGElement)) {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
const style = getComputedStyle(node);
|
|
316
|
-
return ['overflow', 'overflow-x', 'overflow-y'].some(propertyName => {
|
|
317
|
-
const value = style.getPropertyValue(propertyName);
|
|
318
|
-
return value === 'auto' || value === 'scroll';
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
318
|
updateLocalHeaderHeight() {
|
|
322
319
|
requestAnimationFrame(() => {
|
|
323
320
|
const mhh = this.host.shadowRoot.querySelector('.local-header')?.clientHeight || 0;
|
|
324
321
|
this.host.style.setProperty('--local-header-height', `${mhh}px`);
|
|
325
322
|
});
|
|
326
323
|
}
|
|
324
|
+
handleLinkClick(event) {
|
|
325
|
+
const target = event.target;
|
|
326
|
+
const isLinkInMainNav = target.closest('post-mainnavigation a');
|
|
327
|
+
const isLinkInMegadropdown = target.closest('post-megadropdown a');
|
|
328
|
+
if (!isLinkInMainNav && !isLinkInMegadropdown) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
if (this.mobileMenuExtended && (isLinkInMainNav || isLinkInMegadropdown)) {
|
|
332
|
+
this.toggleMobileMenu();
|
|
333
|
+
}
|
|
334
|
+
if (this.device === 'desktop' && isLinkInMegadropdown) {
|
|
335
|
+
const megadropdownLink = target.closest('post-megadropdown a');
|
|
336
|
+
if (megadropdownLink) {
|
|
337
|
+
target.closest('post-megadropdown').hide(true);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
327
341
|
handleResize() {
|
|
328
342
|
const previousDevice = this.device;
|
|
329
343
|
let newDevice;
|
|
@@ -363,10 +377,13 @@ const PostHeader = class {
|
|
|
363
377
|
if (this.mobileMenuExtended) {
|
|
364
378
|
navigationClasses.push('extended');
|
|
365
379
|
}
|
|
380
|
+
if (!this.megadropdownOpen) {
|
|
381
|
+
navigationClasses.push('scroll-y');
|
|
382
|
+
}
|
|
366
383
|
return (h("div", { ref: el => (this.mobileMenu = el), class: navigationClasses.join(' ') }, 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" })))));
|
|
367
384
|
}
|
|
368
385
|
render() {
|
|
369
|
-
return (h(Host, { key: '
|
|
386
|
+
return (h(Host, { key: 'd92b8f3fbf93f1defc6eff9d7283c7452962f1d9', version: version }, h("div", { key: '2d4d19e4aab0bb294c95b4ed672aaac0d0ad23e9', class: "global-header" }, h("div", { key: '069ae5f4ad46baa0245dd97966738a1d4be8d954', class: "global-sub" }, h("div", { key: 'f48c56b8dab12bc8e9a19628d4bc9f7a99ebfd8a', class: "logo" }, h("slot", { key: '663d5f7aa39ec7ff68dd90f24472740ab49d6838', name: "post-logo" }))), h("div", { key: '6a0c11629c5d58d63b49cf99f87fa5858d05c5b0', class: "global-sub" }, this.device === 'desktop' && h("slot", { key: 'ecc46275f314af761ab96fc209133e5f011d25e1', name: "meta-navigation" }), h("slot", { key: '92d41365424c09e07750be9f561d08d062d25c37', name: "global-controls" }), this.device === 'desktop' && h("slot", { key: '6c4d7640261933e939a0cde1cf73d26024e4fcfc', name: "post-language-switch" }), h("div", { key: '39e2ee687469c80f36559d3e50210203e20e2854', onClick: () => this.toggleMobileMenu(), class: "mobile-toggle" }, h("slot", { key: 'f8e746e4dfef7f2427a78ac40b81f4cfd9422d95', name: "post-togglebutton" })))), h("div", { key: '90ca0666714d3e87600bd0ba160dcec289d9ed98', class: 'local-header ' + (this.mobileMenuExtended ? 'local-header-mobile-extended' : '') }, h("slot", { key: '08eb843b431faceac96aaada6714bd86c26f41f5', name: "title" }), h("div", { key: '04542458a9e4aa804daf74d17471a3849e62071e', class: "local-sub" }, h("slot", { key: 'c8c2bc0a9d8433776241c1121a04feb13c34b30c', name: "local-controls" }), h("slot", { key: 'c0b60ab9499dbb9bf08a7e104bac218accd16861' })), this.device === 'desktop' && this.renderNavigation()), this.device !== 'desktop' && this.renderNavigation()));
|
|
370
387
|
}
|
|
371
388
|
static get watchers() { return {
|
|
372
389
|
"mobileMenuExtended": ["frozeBody"]
|
|
@@ -508,7 +525,7 @@ const PostIcon = class {
|
|
|
508
525
|
};
|
|
509
526
|
PostIcon.style = PostIconStyle0;
|
|
510
527
|
|
|
511
|
-
const postLanguageOptionCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */post-language-option{display:inline-block}post-language-option 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}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option a{color:inherit;text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:2px;text-transform:uppercase}post-language-option :is(a,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-language-option :is(a,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-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-option :is(a,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-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-option:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-option:where([variant=list]) :is(a,button):hover{color:#504f4b}post-language-option:where([variant=list]):not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}post-language-option:where([variant=
|
|
528
|
+
const postLanguageOptionCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */post-language-option{display:inline-block}post-language-option 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}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-language-option button{background-color:ButtonFace !important}post-language-option button:hover{background-color:Highlight !important}}post-language-option a{color:inherit;text-decoration:none}post-language-option :is(a,button){cursor:pointer;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:2px;text-transform:uppercase}post-language-option :is(a,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-language-option :is(a,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-language-option :is(a,button):is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-language-option :is(a,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-language-option :is(a,button):is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-language-option:where([variant=list]) :is(a,button){padding-inline:0;width:40px;height:40px;border-radius:2px}post-language-option:where([variant=list]) :is(a,button):hover{color:#504f4b}post-language-option:where([variant=list])[active]:not([active=false]) :is(a,button){background-color:#050400 !important;color:#fff;pointer-events:none}post-language-option:where([variant=menu]){width:100%}post-language-option:where([variant=menu])[active]:not([active=false]){display:none}post-language-option:where([variant=menu]) :is(a,button){padding-block:13px;padding-inline:24px;box-sizing:border-box;position:relative;width:100%}post-language-option:where([variant=menu]) :is(a,button):hover{color:#fff;background-color:#504f4b}";
|
|
512
529
|
const PostLanguageOptionStyle0 = postLanguageOptionCss;
|
|
513
530
|
|
|
514
531
|
const PostLanguageOption = class {
|
|
@@ -636,7 +653,7 @@ const PostLanguageSwitch = class {
|
|
|
636
653
|
// Hides the dropdown when an option has been clicked
|
|
637
654
|
if (this.variant === 'menu') {
|
|
638
655
|
const menu = this.host.shadowRoot.querySelector('post-menu');
|
|
639
|
-
menu.
|
|
656
|
+
menu.hide();
|
|
640
657
|
}
|
|
641
658
|
});
|
|
642
659
|
}
|
|
@@ -739,7 +756,7 @@ const PostLogo = class {
|
|
|
739
756
|
};
|
|
740
757
|
PostLogo.style = PostLogoStyle0;
|
|
741
758
|
|
|
742
|
-
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:100vw;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{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}";
|
|
759
|
+
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}";
|
|
743
760
|
const PostMainnavigationStyle0 = postMainnavigationCss;
|
|
744
761
|
|
|
745
762
|
const SCROLL_REPEAT_INTERVAL = 100; // Interval for repeated scrolling when holding down scroll button
|
|
@@ -759,6 +776,7 @@ const PostMainnavigation = class {
|
|
|
759
776
|
leftScrollButton;
|
|
760
777
|
scrollRepeatInterval;
|
|
761
778
|
navbarDisableTimer;
|
|
779
|
+
resizeObserver;
|
|
762
780
|
mutationObserver = new MutationObserver(async (mutations) => {
|
|
763
781
|
// Wait for all elements to be hydrated
|
|
764
782
|
await Promise.all(mutations
|
|
@@ -788,13 +806,25 @@ const PostMainnavigation = class {
|
|
|
788
806
|
disconnectedCallback() {
|
|
789
807
|
this.header = null;
|
|
790
808
|
this.mutationObserver.disconnect();
|
|
809
|
+
if (this.resizeObserver) {
|
|
810
|
+
this.resizeObserver.disconnect();
|
|
811
|
+
}
|
|
791
812
|
}
|
|
792
813
|
componentDidLoad() {
|
|
793
814
|
setTimeout(() => this.checkScrollability()); // Initial check to determine if scrolling is needed
|
|
815
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
816
|
+
this.checkScrollability();
|
|
817
|
+
});
|
|
818
|
+
// Observe the navbar and the navigation list for size changes
|
|
819
|
+
if (this.navbar) {
|
|
820
|
+
this.resizeObserver.observe(this.navbar);
|
|
821
|
+
const navList = this.navigationList;
|
|
822
|
+
if (navList) {
|
|
823
|
+
this.resizeObserver.observe(navList);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
794
826
|
this.mutationObserver.observe(this.navigationList, { subtree: true, childList: true }); // Recheck scrollability when navigation list changes
|
|
795
827
|
this.fixLayoutShift();
|
|
796
|
-
window.addEventListener('resize', // Recheck scrollability on window resize
|
|
797
|
-
throttle(100, () => this.checkScrollability()));
|
|
798
828
|
// Handle focus changes and adjust scroll as needed
|
|
799
829
|
this.navbar.addEventListener('focusin', e => this.adjustTranslation(e));
|
|
800
830
|
}
|
|
@@ -959,7 +989,7 @@ const PostMainnavigation = class {
|
|
|
959
989
|
});
|
|
960
990
|
}
|
|
961
991
|
render() {
|
|
962
|
-
return (h(Host, { key: '
|
|
992
|
+
return (h(Host, { key: '3c740536fd968e22d22a8117766df12800e6eb6e', slot: "post-mainnavigation" }, h("div", { key: '113602ca8b5ee48c290b31b77329b34d85df40bd', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '6cd5e18449f1a9340a6c35c0b97385f0a4bf6ede', name: "back-button" })), h("nav", { key: '6fb39c4a929f973468407928b43f877233fa9326', ref: el => (this.navbar = el) }, h("slot", { key: 'dd9957b2dea293bc7153239f817ac76f37db3728' })), h("div", { key: '3942637952cec7095dbbcfa16aea1a3768a52fdb', class: `left-scroll-button${this.canScrollLeft ? '' : ' d-none'}`, "aria-hidden": "true" }, h("button", { key: '381b0aef119a161e6e3ac8f396ef8a214df0c439', type: "button", tabindex: "-1", ref: el => (this.leftScrollButton = el), onMouseDown: () => this.handleScrollButtonClick('left') }, h("post-icon", { key: '632835cf735a1d5487d1e18861622318041b9fb3', "aria-hidden": "true", name: "chevronleft" }))), h("div", { key: '2cb6c7222c5e755ba1fdfc8c9e68d73299efe0de', class: `right-scroll-button${this.canScrollRight ? '' : ' d-none'}`, "aria-hidden": "true" }, h("button", { key: 'd665cde32ea285134522a00689accf3cc40c927c', type: "button", tabindex: "-1", ref: el => (this.rightScrollButton = el), onMouseDown: () => this.handleScrollButtonClick('right') }, h("post-icon", { key: '13530078ad9aa9b48bdfd5bd78c8aa8d6ea910d0', "aria-hidden": "true", name: "chevronright" })))));
|
|
963
993
|
}
|
|
964
994
|
static get watchers() { return {
|
|
965
995
|
"translationAmount": ["onTranslateAmountChanges"]
|
|
@@ -967,23 +997,28 @@ const PostMainnavigation = class {
|
|
|
967
997
|
};
|
|
968
998
|
PostMainnavigation.style = PostMainnavigationStyle0;
|
|
969
999
|
|
|
970
|
-
const postMegadropdownCss = "@keyframes slide-in{0%{transform:translateX(100%)}100%{transform:translateX(0%)}}@keyframes slide-out{from{transform:translateX(0%)}to{transform:translateX(100%)}}@keyframes slide-down{from{transform:translateY(-100%)}to{transform:translateY(0%)}}@keyframes slide-up{0%{transform:translateY(0%)}100%{transform:translateY(-100%)}}*,::before,::after{box-sizing:border-box}.megadropdown-container{box-shadow:0 8px 6px rgba(0,0,0,.16);position:absolute;background-color:#fafafa;border:none;z-index:1;
|
|
1000
|
+
const postMegadropdownCss = "@keyframes slide-in{0%{transform:translateX(100%)}100%{transform:translateX(0%)}}@keyframes slide-out{from{transform:translateX(0%)}to{transform:translateX(100%)}}@keyframes slide-down{from{transform:translateY(-100%)}to{transform:translateY(0%)}}@keyframes slide-up{0%{transform:translateY(0%)}100%{transform:translateY(-100%)}}*,::before,::after{box-sizing:border-box}.megadropdown-container{box-shadow:0 8px 6px rgba(0,0,0,.16);position:absolute;background-color:#fafafa;border:none;z-index:1;width:100%;top:100%;left:0;border-radius:0}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.megadropdown-container{border-block-end:1px solid CanvasText}}.megadropdown-container.slide-in{animation:slide-down 350ms forwards}.megadropdown-container.slide-out{animation:slide-up 350ms forwards}@media screen and (max-width: 1023.98px){.megadropdown-container{z-index:4;top:0 !important;left:0;width:100%;position:fixed;height:calc(100dvh - var(--header-height));max-height:calc(100dvh - var(--header-height));border-top:unset;overflow:auto}.megadropdown-container.slide-in{animation:slide-in 350ms forwards}.megadropdown-container.slide-out{animation:slide-out 350ms forwards}}.megadropdown{padding:31px 40px 40px;background-color:#fafafa}@media screen and (max-width: 1023.98px){.megadropdown{display:flex;flex-direction:column;width:inherit;padding:16px 32px 24px}}@media screen and (max-width: 599.98px){.megadropdown{padding-inline:16px}}.megadropdown .megadropdown-content{gap:1.5rem;display:grid;grid-template-columns:repeat(auto-fit, minmax(min(15vw, 100%), 1fr));grid-auto-rows:1fr auto;grid-auto-flow:dense}@media screen and (max-width: 1023.98px){.megadropdown .megadropdown-content{grid-template-columns:repeat(auto-fit, minmax(min(35vw, 100%), 1fr))}}@media screen and (max-width: 599.98px){.megadropdown .megadropdown-content{grid-template-columns:1fr}}.megadropdown h2{display:none;margin-top:0;margin-bottom:8px;font-weight:900}.megadropdown h2 a{text-decoration:none;display:none;font-weight:inherit;border-bottom:0;border-top:0}@media screen and (max-width: 1023.98px){.megadropdown h2{display:block;font-size:1.25rem}}@media screen and (max-width: 599.98px){.megadropdown h2{font-size:1.125rem}}.megadropdown post-list{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:0px}.megadropdown post-list>[role=list]{flex-direction:unset;display:unset}.megadropdown post-list>*{width:100%}.megadropdown post-list .list-title{display:flex;flex-direction:column-reverse;height:100%}.megadropdown post-list .list-title h3{font-size:20px;display:block;font-weight:900}.megadropdown post-list .list-title h3:not(:has(a)),.megadropdown post-list .list-title h3 a{padding:16px 12px 14px 8px}.megadropdown post-list .list-title h3:not(:has(a)){position:relative}.megadropdown post-list .list-title h3:not(:has(a))::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:2px;position:absolute;left:0}.megadropdown post-list .list-title h3 a{border-radius:0;text-decoration:none;font-size:inherit;display:flex;align-items:center;justify-content:space-between;min-height:53px;width:100%;min-width:100%;height:48px;padding-inline:8px 12px;gap:16px;font-weight:400;position:relative;height:unset;font-weight:900}.megadropdown post-list .list-title h3 a::before{content:\"\";background-color:#050400;bottom:0;width:100%;height:1px;position:absolute;left:0}.megadropdown post-list .list-title h3 a.selected,.megadropdown post-list .list-title h3 a[aria-expanded=true]{background-color:#050400;color:#fff}.megadropdown post-list .list-title h3 a:hover{background-color:#504f4b;color:#fff}.megadropdown post-list .list-title h3 a:hover::before{background-color:#504f4b}.megadropdown post-list .list-title h3 a::before{height:2px}@media screen and (max-width: 1023.98px){.megadropdown post-list .list-title h3{font-size:1rem}.megadropdown post-list .list-title h3:not(:has(a)),.megadropdown post-list .list-title h3 a{padding:14px 12px 12px 8px}}@media screen and (max-width: 599.98px){.megadropdown post-list .list-title h3{font-size:.875rem}}.megadropdown post-list-item>a{padding-block:13px 12px;padding-inline-start:8px;display:flex;text-decoration:none;width:100%;min-width:100%;height:auto;min-height:48px;white-space:normal;word-break:break-word}.megadropdown post-list-item>a:hover{border-block-width:0}@media screen and (min-width: 1024px){.megadropdown post-list-item>a{font-size:1.25rem}}@media screen and (max-width: 1023.98px){.megadropdown post-list-item>a{padding-block:12px 11px}}@media screen and (max-width: 599.98px){.megadropdown post-list-item>a{font-size:.875rem}}.megadropdown .back-button{display:none;margin-bottom:2rem}.megadropdown .back-button .btn{width:auto}@media screen and (max-width: 1023.98px){.megadropdown .back-button{order:-1;display:block}}.megadropdown .close-button{position:absolute;top:1rem;right:1rem}@media screen and (max-width: 1023.98px){.megadropdown .close-button{display:none}}";
|
|
971
1001
|
const PostMegadropdownStyle0 = postMegadropdownCss;
|
|
972
1002
|
|
|
973
1003
|
const PostMegadropdown = class {
|
|
974
1004
|
constructor(hostRef) {
|
|
975
1005
|
registerInstance(this, hostRef);
|
|
976
1006
|
this.postToggleMegadropdown = createEvent(this, "postToggleMegadropdown", 7);
|
|
977
|
-
this.device =
|
|
1007
|
+
this.device = breakpoint.get('name');
|
|
978
1008
|
this.isVisible = false;
|
|
979
1009
|
this.animationClass = null;
|
|
980
1010
|
}
|
|
981
|
-
header;
|
|
982
1011
|
firstFocusableEl;
|
|
983
1012
|
lastFocusableEl;
|
|
984
1013
|
get host() { return getElement(this); }
|
|
985
1014
|
/** Tracks the currently active dropdown instance. */
|
|
986
1015
|
static activeDropdown = null;
|
|
1016
|
+
breakpointChange(e) {
|
|
1017
|
+
this.device = e.detail;
|
|
1018
|
+
if (this.device === 'desktop' && this.isVisible) {
|
|
1019
|
+
this.animationClass = null;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
987
1022
|
/**
|
|
988
1023
|
* Emits when the dropdown is shown or hidden.
|
|
989
1024
|
* The event payload is an object.
|
|
@@ -993,6 +1028,7 @@ const PostMegadropdown = class {
|
|
|
993
1028
|
postToggleMegadropdown;
|
|
994
1029
|
disconnectedCallback() {
|
|
995
1030
|
this.removeListeners();
|
|
1031
|
+
window.removeEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
|
|
996
1032
|
if (PostMegadropdown.activeDropdown === this) {
|
|
997
1033
|
PostMegadropdown.activeDropdown = null;
|
|
998
1034
|
}
|
|
@@ -1038,16 +1074,14 @@ const PostMegadropdown = class {
|
|
|
1038
1074
|
this.postToggleMegadropdown.emit({ isVisible: false, focusParent: focusParent });
|
|
1039
1075
|
this.animationClass = 'slide-out';
|
|
1040
1076
|
}
|
|
1077
|
+
/**
|
|
1078
|
+
* Sets focus to the first focusable element within the component.
|
|
1079
|
+
*/
|
|
1041
1080
|
async focusFirst() {
|
|
1042
1081
|
this.firstFocusableEl?.focus();
|
|
1043
1082
|
}
|
|
1044
1083
|
connectedCallback() {
|
|
1045
|
-
|
|
1046
|
-
if (this.header) {
|
|
1047
|
-
this.header.addEventListener('postUpdateDevice', (event) => {
|
|
1048
|
-
this.device = event.detail;
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1084
|
+
window.addEventListener('postBreakpoint:name', this.breakpointChange.bind(this));
|
|
1051
1085
|
}
|
|
1052
1086
|
/**
|
|
1053
1087
|
* Forces the dropdown to close without animation.
|
|
@@ -1122,7 +1156,7 @@ const PostMegadropdown = class {
|
|
|
1122
1156
|
}
|
|
1123
1157
|
render() {
|
|
1124
1158
|
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
1125
|
-
return (h(Host, { key: '
|
|
1159
|
+
return (h(Host, { key: '56fa590bb7f9f96a235ac867e5fa813d3af85e0e' }, h("div", { key: 'b2c7b68296103caa71a2a50f5637b7ffb6c07439', class: `megadropdown-container ${this.animationClass || ''}`, style: containerStyle, onAnimationEnd: () => this.handleAnimationEnd() }, h("div", { key: 'adb9e8e0017c030c7b2d296c50ac6f7a0807c0cd', class: "megadropdown" }, h("slot", { key: '081e04f3a23c1f1578d1a57e3c4485627b3370bf', name: "megadropdown-title" }), h("div", { key: 'ce46885e7c2992cbee84ed4712cac476c37d764a', class: "megadropdown-content" }, h("slot", { key: '57aa14b27969ab85d078ea42b440fc689d602ffa' })), h("div", { key: 'bfbd760c4f8ef244adf9f51517df22065e0b6cf7', onClick: () => this.hide(true), class: "back-button" }, h("slot", { key: '5cab958bc29dca98b1eeac97b844d26324f045bf', name: "back-button" })), h("div", { key: '8a959443f689a9bb318bedd2089493d291529250', onClick: () => this.hide(true), class: "close-button" }, h("slot", { key: '212685a6a63c5af4eccec78a80d6a8c3d7a2bbe9', name: "close-button" }))))));
|
|
1126
1160
|
}
|
|
1127
1161
|
};
|
|
1128
1162
|
PostMegadropdown.style = PostMegadropdownStyle0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-40846676.js';
|
|
2
|
-
import { v as version$1 } from './package-
|
|
2
|
+
import { v as version$1 } from './package-30b5445a.js';
|
|
3
3
|
import { g as getAttributeObserver } from './attribute-observer-2f203993.js';
|
|
4
4
|
import { d as checkEmptyOrType } from './index-8f8fe5b0.js';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { P as post_tooltip } from './post-tooltip-
|
|
1
|
+
export { P as post_tooltip } from './post-tooltip-b1309328.js';
|
|
2
2
|
import './index-40846676.js';
|
|
3
|
-
import './package-
|
|
3
|
+
import './package-30b5445a.js';
|
|
4
4
|
import './attribute-observer-2f203993.js';
|
|
5
5
|
import './index-8f8fe5b0.js';
|
|
6
6
|
import './constants-8d548297.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{P as PostAccordion}from"./p-
|
|
1
|
+
export{P as PostAccordion}from"./p-4f6694d4.js";export{P as PostAccordionItem}from"./p-f1995b47.js";export{P as PostAvatar}from"./p-75627a39.js";export{P as PostBackToTop}from"./p-745ce238.js";export{P as PostBanner}from"./p-9f986e3d.js";export{P as PostBreadcrumb}from"./p-534ca692.js";export{P as PostBreadcrumbItem,a as PostMenuItem}from"./p-b1b5248c.js";export{P as PostCardControl}from"./p-819f6f7e.js";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"./p-ca01c184.js";export{P as PostCollapsible,a as PostCollapsibleTrigger}from"./p-b559d89c.js";export{P as PostFooter}from"./p-88b5add2.js";export{P as PostLinkarea}from"./p-d993dd37.js";export{P as PostPopover}from"./p-bbf9ba02.js";export{P as PostRating}from"./p-530bedb1.js";export{P as PostTabs}from"./p-b6e041ee.js";export{P as PostTabHeader}from"./p-33963539.js";export{P as PostTabPanel}from"./p-7c08cad2.js";export{P as PostTag}from"./p-eba6a679.js";export{P as PostTooltip}from"./p-7b526da4.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";import"./p-247a1668.js";import"./p-d45df336.js";import"./p-e585c6fe.js";import"./p-440193f4.js";import"./p-7709c14a.js";import"./p-85fdc2d3.js";import"./p-5959f2bd.js";import"./p-181c73d5.js";import"./p-4af6dbed.js";import"./p-64e3de38.js";import"./p-e1baac59.js";import"./p-5aeb3656.js";import"./p-fc91cbc2.js";import"./p-9748a355.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_card_control}from"./p-819f6f7e.js";import"./p-ff95dcd3.js";import"./p-d45df336.js";import"./p-181c73d5.js";import"./p-440193f4.js";import"./p-b54c207a.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,g as t,h as r,H as e}from"./p-ff95dcd3.js";import{v as a}from"./p-
|
|
1
|
+
import{r as o,g as t,h as r,H as e}from"./p-ff95dcd3.js";import{v as a}from"./p-b54c207a.js";import{c as i}from"./p-181c73d5.js";import{n as c}from"./p-5959f2bd.js";const l=class{constructor(t){o(this,t),this.tabId=void 0,this.panel=void 0}get host(){return t(this)}validateFor(){i(this,"panel")}componentWillLoad(){this.tabId=`tab-${this.host.id||c(6)}`}render(){return r(e,{key:"336824660de90bf5c570e9739947927a32612fbd",id:this.tabId,role:"tab","data-version":a,"aria-selected":"false",tabindex:"-1",class:"tab-title",slot:"tabs"},r("slot",{key:"8bfe0b57fa96044692e2db3fd983ccde427558e7"}))}static get watchers(){return{panel:["validateFor"]}}};l.style='.tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}.tab-title{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}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}';export{l as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_linkarea}from"./p-d993dd37.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_accordion}from"./p-4f6694d4.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";import"./p-247a1668.js";import"./p-d45df336.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_footer}from"./p-88b5add2.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";import"./p-5aeb3656.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,g as e,h as o,H as s}from"./p-ff95dcd3.js";import{v as i}from"./p-
|
|
1
|
+
import{r as t,g as e,h as o,H as s}from"./p-ff95dcd3.js";import{v as i}from"./p-b54c207a.js";import{H as a}from"./p-247a1668.js";import{c as r}from"./p-d45df336.js";const c=class{constructor(e){t(this,e),this.headingLevel=void 0,this.multiple=!1}accordionItems;expandedItems=new Set;get host(){return e(this)}validateHeadingLevel(t=this.headingLevel){t&&(r(this,"headingLevel",a,"The `heading-level` property of the `post-accordion` must be a number between 1 and 6."),this.accordionItems.forEach((e=>{e.setAttribute("heading-level",String(t))})))}componentWillLoad(){this.registerAccordionItems(),this.validateHeadingLevel()}collapseToggleHandler(t){t.stopPropagation();const e=t.target;if(e.closest("post-accordion")===this.host&&"post-accordion-item"===e.localName){const e=t.target,o=this.expandedItems.has(e);if(o?this.expandedItems.delete(e):this.expandedItems.add(e),this.multiple||o)return;Array.from(this.expandedItems.values()).filter((t=>t!==e)).forEach((t=>{t.toggle(!1)}))}}async toggle(t){const e=this.accordionItems.find((e=>e.id===t));if(!e)throw new Error(`No post-accordion-item found with id #${t}.`);await e.toggle()}async expandAll(){this.multiple?await Promise.all(this.accordionItems.map((t=>t.toggle(!0)))):this.expandedItems.size||await this.accordionItems[0].toggle(!0)}async collapseAll(){await Promise.all(this.accordionItems.map((t=>t.toggle(!1))))}registerAccordionItems(){this.accordionItems=Array.from(this.host.querySelectorAll("post-accordion-item")),this.accordionItems.filter((t=>!t.collapsed||this.expandedItems.has(t))).forEach(((t,e)=>{this.multiple||0===e?this.expandedItems.add(t):t.setAttribute("collapsed","")}))}render(){return o(s,{key:"9ec8ca1ceac6587be68272568f216c958460ac0a","data-version":i},o("div",{key:"99887626d105f0e8f86b24e211591e7be820738d",class:"accordion"},o("slot",{key:"4d8a003377c3a90648818a00144fd5f3a65be084",onSlotchange:()=>this.registerAccordionItems()})))}static get watchers(){return{headingLevel:["validateHeadingLevel"]}}};c.style=":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-top:calc(var(--post-device-border-width-default)*-1)}::slotted(post-accordion-item:not(:only-of-type):first-of-type){--post-accordion-button-border-top:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}";export{c as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_popover}from"./p-bbf9ba02.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";import"./p-9748a355.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t,r as s,c as a,h as i,H as r}from"./p-ff95dcd3.js";import{v as e}from"./p-
|
|
1
|
+
import{g as t,r as s,c as a,h as i,H as r}from"./p-ff95dcd3.js";import{v as e}from"./p-b54c207a.js";const o=class{hasChanged=!1;get host(){return t(this)}postInput;postChange;constructor(t){s(this,t),this.postInput=a(this,"postInput",7),this.postChange=a(this,"postChange",7),this.hoveredIndex=void 0,this.label="Rating",this.stars=5,this.currentRating=0,this.readonly=!1,this.keydownHandler=this.keydownHandler.bind(this),this.blurHandler=this.blurHandler.bind(this),this.hoverHandler=this.hoverHandler.bind(this)}update(t){this.readonly||t<0||t>this.stars||(this.currentRating=this.currentRating!==t?t:0,this.postInput.emit({value:this.currentRating}),this.hasChanged=!0)}keydownHandler(t){switch(t.key){case"ArrowDown":case"ArrowLeft":t.preventDefault(),this.update(this.currentRating-1);break;case"ArrowUp":case"ArrowRight":t.preventDefault(),this.update(this.currentRating+1);break;case"Home":t.preventDefault(),this.update(0);break;case"End":t.preventDefault(),this.update(this.stars);break;case"Enter":case" ":this.blurHandler();break;default:return}}blurHandler(){this.hasChanged&&(this.postChange.emit({value:this.currentRating}),this.hasChanged=!1)}hoverHandler(t,s){this.readonly||("mouseenter"===s.type?this.hoveredIndex=t:"mouseleave"===s.type&&(this.hoveredIndex=void 0))}render(){return i(r,{key:"4ccdf384b9a4cfc462d5d3f4a7caab659b6ba2b0","data-version":e},i("div",{key:"7ab53083bcdff6586b1de7f1c9e5fa546728fc6f",role:"slider",class:"rating",tabindex:"0","aria-label":this.label,"aria-valuemin":"0","aria-valuemax":this.stars,"aria-valuenow":this.currentRating,"aria-valuetext":`${this.currentRating} out of ${this.stars}`,"aria-readonly":this.readonly?"true":"false",onKeyDown:this.keydownHandler,onBlur:this.blurHandler},Array.from({length:this.stars}).map(((t,s)=>i("div",{key:`star-${t}`,"aria-hidden":"true",class:{star:!0,"before-hover":s<this.hoveredIndex,active:s<Math.round(this.currentRating),hover:s===this.hoveredIndex,"after-active":s>this.hoveredIndex&&s<this.currentRating},onClick:()=>this.update(s+1),onMouseEnter:t=>this.hoverHandler(s,t),onMouseLeave:t=>this.hoverHandler(s,t)},i("post-icon",{name:"2062",class:"stroke"}),i("post-icon",{name:"2574",class:"fill"}))))))}};o.style="/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.active{--post-rating-star-stroke:hsl(0, 0%, 20%);--post-rating-star-fill:#fc0}.rating .star.hover{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:#fc0}.rating .star.after-active{--post-rating-star-stroke:hsl(0, 0%, 40%);--post-rating-star-fill:hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:#fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke:hsl(0, 0%, 60%);--post-rating-star-fill:hsl(0, 0%, 90%)}";export{o as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,g as i,h as t,H as o}from"./p-ff95dcd3.js";import{v as r}from"./p-cb5e4a06.js";import{c as s}from"./p-85fdc2d3.js";import{d as a}from"./p-e1baac59.js";const c=class{constructor(i){e(this,i),this.homeUrl=void 0,this.homeText="Home",this.breadcrumbItems=[],this.isConcatenated=void 0,this.lastWindowWidth=void 0}get host(){return i(this)}breadcrumbNavRef;lastItem;validateUrl(){s(this,"homeUrl")}componentWillLoad(){this.updateBreadcrumbItems()}componentDidLoad(){window.addEventListener("resize",this.handleResize),this.waitForBreadcrumbRef()}disconnectedCallback(){window.removeEventListener("resize",this.handleResize)}waitForBreadcrumbRef=a((()=>{this.breadcrumbNavRef?.clientWidth>0?this.checkConcatenation():this.waitForBreadcrumbRef()}),50);updateBreadcrumbItems(){this.breadcrumbItems=Array.from(this.host.querySelectorAll("post-breadcrumb-item")).map((e=>({text:e.textContent||"",url:e.getAttribute("url")||""}))),this.lastItem=this.breadcrumbItems[this.breadcrumbItems.length-1]}handleResize=()=>{window.innerWidth!==this.lastWindowWidth&&(this.lastWindowWidth=window.innerWidth,this.checkConcatenation())};getParentWidth(){let e=this.host.parentNode;for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e instanceof HTMLElement?e.clientWidth:window.innerWidth}checkConcatenation(){if(!this.breadcrumbNavRef)return;const e=this.getParentWidth(),i=Array.from(this.host.shadowRoot?.querySelectorAll(".hidden-breadcrumb-item")||[]).reduce(((e,i)=>e+i.getBoundingClientRect().width),0);this.isConcatenated=i>e}handleBreadcrumbItemClick(){if(this.host.shadowRoot){const e=this.host.shadowRoot?.querySelector(".menu-trigger-wrapper")?.querySelector("button");e&&e.click()}}render(){const e=this.breadcrumbItems.slice(0,-1);return t(o,{key:"d2fd5b6f8319124fa17649c8c5e479e727fc069a","data-version":r},t("nav",{key:"a5f9b38fa054ad46d8972c28d175f864bed3c365","aria-label":"Breadcrumb",class:"breadcrumbs-nav",ref:e=>this.breadcrumbNavRef=e},t("ol",{key:"ac7ca9a80315ce6ba70e1aaaae6202fbb1a6933e",class:"no-list breadcrumbs-list"},t("li",{key:"9927b293673f16bbe837419baf7d4a8f97885bc0"},t("a",{key:"2b2de9924472a3da00f843c7b569358b60d43539",href:this.homeUrl,class:"breadcrumb-link"},t("span",{key:"540a16d9673e9c423493597468a3db00b7d75cef",class:"visually-hidden"},this.homeText),t("post-icon",{key:"73fad27cd72f18bb5ea281c88ff2c184d7d8187d",name:"home",class:"home-icon"}))),this.isConcatenated?t("div",{class:"menu-trigger-wrapper","aria-label":"More breadcrumbs",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleBreadcrumbItemClick())}},t("post-icon",{name:"2111",class:"breadcrumb-item-icon"}),t("div",{class:"actual-menu"},t("post-menu-trigger",{for:"breadcrumb-menu",tabIndex:0},t("button",{class:"btn test",tabIndex:-1},"...")),t("post-menu",{id:"breadcrumb-menu"},e.map((e=>t("post-menu-item",{key:e.url||e.text,class:"breadcrumb-item",onKeyDown:e=>{if("Enter"===e.key||" "===e.key){const i=e.currentTarget.querySelector("a");i?.click(),e.preventDefault()}}},e.url?t("a",{href:e.url},e.text):t("span",null,e.text))))))):e.map((e=>t("post-breadcrumb-item",{url:e.url,key:e.url||e.text},e.text))),this.lastItem&&t("post-breadcrumb-item",{key:"31d86d933720b5f6f6928ccfd251443261e9479e",url:this.lastItem.url,"aria-current":"page",tabindex:-1},this.lastItem.text)),t("div",{key:"3248d32aa6a73c97c3071be85174fb8634d4e722",class:"hidden-items"},t("a",{key:"05b0231d3a5793588aa9ede628a7b1e6d2e2faf0",href:this.homeUrl,class:"hidden-breadcrumb-item"},t("span",{key:"15a63a894124717cfb2be61779c3971772c38397",class:"visually-hidden"},this.homeText),t("post-icon",{key:"6c893c56b6a34f311fa66d71c4cb523b00535458",name:"home",class:"home-icon"})),this.breadcrumbItems.map((e=>t("post-breadcrumb-item",{url:e.url,key:`hidden-${e.url||e.text}`,class:"hidden-breadcrumb-item"},e.text))))))}static get watchers(){return{homeUrl:["validateUrl"]}}};c.style="/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:flex;align-items:center}.breadcrumbs-nav{display:flex;align-items:center}.hidden-items{gap:var(--post-device-spacing-gap-inline-4);position:absolute;height:0;overflow:hidden;white-space:nowrap}.breadcrumbs-list{display:flex;flex-wrap:nowrap;position:relative;margin:0;padding:0;list-style:none;align-items:center;height:100%;gap:var(--post-device-spacing-gap-inline-4)}post-icon{display:inline-block;box-sizing:border-box;color:var(--post-scheme-color-interactive-primary-enabled-fg1);height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.breadcrumb-item-icon{padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}li a{display:flex;align-items:center}li a{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}li a: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){li a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){li a: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){li a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}li a:focus{border-radius:var(--post-device-border-radius-focus)}li a .home-icon{padding-block:var(--post-device-spacing-padding-4);padding-inline:var(--post-device-spacing-padding-4)}li a .home-icon:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a .home-icon a,li a .home-icon:focus,li a .home-icon:hover{color:CanvasText !important}}.menu-trigger-wrapper{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-5)}.actual-menu{display:flex;align-items:center}post-menu-trigger{display:flex;align-items:center;padding-block:var(--post-device-spacing-padding-block-7)}post-menu-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-menu-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-menu-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-menu-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-menu-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-menu-trigger:focus{border-radius:var(--post-device-border-radius-focus)}post-menu-trigger button{background:none;border:none;line-height:150%;font-size:var(--post-device-font-size-6);cursor:pointer;padding:0;color:var(--post-scheme-color-interactive-primary-enabled-fg1)}post-menu-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger button a,post-menu-trigger button:focus,post-menu-trigger button:hover{color:LinkText !important}}post-menu::part(popover-container){display:flex;flex-direction:column;align-items:start;padding:.6rem;gap:var(--post-device-spacing-gap-inline-4)}post-menu::part(popover-container) ::slotted(post-menu-item:not(:last-child)){margin-bottom:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:center;justify-content:center;gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item a{text-decoration:none;color:inherit;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);font-size:var(--post-device-font-size-6)}.breadcrumb-item a{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}.breadcrumb-item a: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){.breadcrumb-item a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item a: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){.breadcrumb-item a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item a:focus-visible{border-radius:var(--post-device-border-radius-focus)}.breadcrumb-item span:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item span:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item a,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}post-breadcrumb-item:last-of-type{pointer-events:none;color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}post-breadcrumb-item:last-of-type:hover{color:var(--post-scheme-color-interactive-primary-selected-fg1);text-decoration:none}.visually-hidden{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}.visually-hidden:not(caption){position:absolute !important}";export{c as P}
|
|
1
|
+
import{r as e,g as i,h as t,H as o}from"./p-ff95dcd3.js";import{v as r}from"./p-b54c207a.js";import{c as s}from"./p-85fdc2d3.js";import{d as a}from"./p-e1baac59.js";const c=class{constructor(i){e(this,i),this.homeUrl=void 0,this.homeText="Home",this.breadcrumbItems=[],this.isConcatenated=void 0,this.lastWindowWidth=void 0}get host(){return i(this)}breadcrumbNavRef;lastItem;validateUrl(){s(this,"homeUrl")}componentWillLoad(){this.updateBreadcrumbItems()}componentDidLoad(){window.addEventListener("resize",this.handleResize),this.waitForBreadcrumbRef()}disconnectedCallback(){window.removeEventListener("resize",this.handleResize)}waitForBreadcrumbRef=a((()=>{this.breadcrumbNavRef?.clientWidth>0?this.checkConcatenation():this.waitForBreadcrumbRef()}),50);updateBreadcrumbItems(){this.breadcrumbItems=Array.from(this.host.querySelectorAll("post-breadcrumb-item")).map((e=>({text:e.textContent||"",url:e.getAttribute("url")||""}))),this.lastItem=this.breadcrumbItems[this.breadcrumbItems.length-1]}handleResize=()=>{window.innerWidth!==this.lastWindowWidth&&(this.lastWindowWidth=window.innerWidth,this.checkConcatenation())};getParentWidth(){let e=this.host.parentNode;for(;e&&!(e instanceof HTMLElement);)e=e.parentNode;return e instanceof HTMLElement?e.clientWidth:window.innerWidth}checkConcatenation(){if(!this.breadcrumbNavRef)return;const e=this.getParentWidth(),i=Array.from(this.host.shadowRoot?.querySelectorAll(".hidden-breadcrumb-item")||[]).reduce(((e,i)=>e+i.getBoundingClientRect().width),0);this.isConcatenated=i>e}handleBreadcrumbItemClick(){if(this.host.shadowRoot){const e=this.host.shadowRoot?.querySelector(".menu-trigger-wrapper")?.querySelector("button");e&&e.click()}}render(){const e=this.breadcrumbItems.slice(0,-1);return t(o,{key:"d2fd5b6f8319124fa17649c8c5e479e727fc069a","data-version":r},t("nav",{key:"a5f9b38fa054ad46d8972c28d175f864bed3c365","aria-label":"Breadcrumb",class:"breadcrumbs-nav",ref:e=>this.breadcrumbNavRef=e},t("ol",{key:"ac7ca9a80315ce6ba70e1aaaae6202fbb1a6933e",class:"no-list breadcrumbs-list"},t("li",{key:"9927b293673f16bbe837419baf7d4a8f97885bc0"},t("a",{key:"2b2de9924472a3da00f843c7b569358b60d43539",href:this.homeUrl,class:"breadcrumb-link"},t("span",{key:"540a16d9673e9c423493597468a3db00b7d75cef",class:"visually-hidden"},this.homeText),t("post-icon",{key:"73fad27cd72f18bb5ea281c88ff2c184d7d8187d",name:"home",class:"home-icon"}))),this.isConcatenated?t("div",{class:"menu-trigger-wrapper","aria-label":"More breadcrumbs",onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleBreadcrumbItemClick())}},t("post-icon",{name:"2111",class:"breadcrumb-item-icon"}),t("div",{class:"actual-menu"},t("post-menu-trigger",{for:"breadcrumb-menu",tabIndex:0},t("button",{class:"btn test",tabIndex:-1},"...")),t("post-menu",{id:"breadcrumb-menu"},e.map((e=>t("post-menu-item",{key:e.url||e.text,class:"breadcrumb-item",onKeyDown:e=>{if("Enter"===e.key||" "===e.key){const i=e.currentTarget.querySelector("a");i?.click(),e.preventDefault()}}},e.url?t("a",{href:e.url},e.text):t("span",null,e.text))))))):e.map((e=>t("post-breadcrumb-item",{url:e.url,key:e.url||e.text},e.text))),this.lastItem&&t("post-breadcrumb-item",{key:"31d86d933720b5f6f6928ccfd251443261e9479e",url:this.lastItem.url,"aria-current":"page",tabindex:-1},this.lastItem.text)),t("div",{key:"3248d32aa6a73c97c3071be85174fb8634d4e722",class:"hidden-items"},t("a",{key:"05b0231d3a5793588aa9ede628a7b1e6d2e2faf0",href:this.homeUrl,class:"hidden-breadcrumb-item"},t("span",{key:"15a63a894124717cfb2be61779c3971772c38397",class:"visually-hidden"},this.homeText),t("post-icon",{key:"6c893c56b6a34f311fa66d71c4cb523b00535458",name:"home",class:"home-icon"})),this.breadcrumbItems.map((e=>t("post-breadcrumb-item",{url:e.url,key:`hidden-${e.url||e.text}`,class:"hidden-breadcrumb-item"},e.text))))))}static get watchers(){return{homeUrl:["validateUrl"]}}};c.style="/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:flex;align-items:center}.breadcrumbs-nav{display:flex;align-items:center}.hidden-items{gap:var(--post-device-spacing-gap-inline-4);position:absolute;height:0;overflow:hidden;white-space:nowrap}.breadcrumbs-list{display:flex;flex-wrap:nowrap;position:relative;margin:0;padding:0;list-style:none;align-items:center;height:100%;gap:var(--post-device-spacing-gap-inline-4)}post-icon{display:inline-block;box-sizing:border-box;color:var(--post-scheme-color-interactive-primary-enabled-fg1);height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.breadcrumb-item-icon{padding-block:var(--post-core-dimension-4);padding-inline:var(--post-core-dimension-4)}li a{display:flex;align-items:center}li a{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}li a: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){li a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){li a: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){li a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}li a:focus{border-radius:var(--post-device-border-radius-focus)}li a .home-icon{padding-block:var(--post-device-spacing-padding-4);padding-inline:var(--post-device-spacing-padding-4)}li a .home-icon:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){li a .home-icon a,li a .home-icon:focus,li a .home-icon:hover{color:CanvasText !important}}.menu-trigger-wrapper{display:flex;align-items:center;gap:var(--post-device-spacing-gap-inline-5)}.actual-menu{display:flex;align-items:center}post-menu-trigger{display:flex;align-items:center;padding-block:var(--post-device-spacing-padding-block-7)}post-menu-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-menu-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-menu-trigger:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-menu-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-menu-trigger:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-menu-trigger:focus{border-radius:var(--post-device-border-radius-focus)}post-menu-trigger button{background:none;border:none;line-height:150%;font-size:var(--post-device-font-size-6);cursor:pointer;padding:0;color:var(--post-scheme-color-interactive-primary-enabled-fg1)}post-menu-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-menu-trigger button a,post-menu-trigger button:focus,post-menu-trigger button:hover{color:LinkText !important}}post-menu::part(popover-container){display:flex;flex-direction:column;align-items:start;padding:.6rem;gap:var(--post-device-spacing-gap-inline-4)}post-menu::part(popover-container) ::slotted(post-menu-item:not(:last-child)){margin-bottom:var(--post-device-spacing-gap-inline-4)}.breadcrumb-item{display:flex;align-items:center;justify-content:center;gap:var(--post-device-spacing-gap-inline-5)}.breadcrumb-item a{text-decoration:none;color:inherit;line-height:150%;padding-block:var(--post-device-spacing-padding-block-7);font-size:var(--post-device-font-size-6)}.breadcrumb-item a{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}.breadcrumb-item a: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){.breadcrumb-item a:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.breadcrumb-item a: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){.breadcrumb-item a:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.breadcrumb-item a:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item a:focus-visible{border-radius:var(--post-device-border-radius-focus)}.breadcrumb-item span:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1);text-decoration:var(--post-core-text-decoration-underline)}.breadcrumb-item span:focus-visible{border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.breadcrumb-item a,.breadcrumb-item:focus,.breadcrumb-item:hover{color:LinkText !important}.breadcrumb-item:visited{color:VisitedText !important}}post-breadcrumb-item:last-of-type{pointer-events:none;color:var(--post-scheme-color-interactive-primary-selected-fg1);font-weight:var(--post-device-font-weight-bold);text-decoration:var(--post-core-text-decoration-none)}post-breadcrumb-item:last-of-type:hover{color:var(--post-scheme-color-interactive-primary-selected-fg1);text-decoration:none}.visually-hidden{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}.visually-hidden:not(caption){position:absolute !important}";export{c as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_rating}from"./p-530bedb1.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_tag}from"./p-eba6a679.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=new class{breakpointMap;current={key:"",name:""};constructor(){if(!this.breakpointMap){const t=this.getStyles("--post-breakpoint-keys"),s=this.getStyles("--post-breakpoint-names"),e=this.getStyles("--post-breakpoint-widths");this.breakpointMap=e.map(((e,i)=>({minWidth:Number(e),key:t[i],name:s[i]}))).reverse(),window.addEventListener("resize",(()=>this.updateHandler()),{passive:!0})}}getStyles(t){const s=getComputedStyle(document.documentElement);return s.getPropertyValue(t)?.split(",").map((t=>t.trim()))??[]}updateHandler(t=!0){const s=this.breakpointMap.find((({minWidth:t})=>innerWidth>=t));this.current.key!==s.key&&(this.current.key=s.key,t&&this.dispatchEvent("key")),this.current.name!==s.name&&(this.current.name=s.name,t&&this.dispatchEvent("name"))}dispatchEvent(t){window.dispatchEvent(new CustomEvent(`postBreakpoint:${t}`,{detail:this.current[t]}))}get(t){return this.updateHandler(!1),this.current[t]}};export{t as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as post_tooltip}from"./p-7b526da4.js";import"./p-ff95dcd3.js";import"./p-b54c207a.js";import"./p-9748a355.js";import"./p-e585c6fe.js";import"./p-440193f4.js";import"./p-d45df336.js";import"./p-7709c14a.js";import"./p-85fdc2d3.js";
|