@swisspost/design-system-components 10.0.0-next.49 → 10.0.0-next.51
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/{event-from-C6kpQwhw.js → event-from-CLvtSUKf.js} +20 -6
- package/dist/cjs/{get-root-CfQ2PogP.js → get-root-CyMf3Vsd.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-CR0YynRY.js → package-D1eOXW8H.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/post-avatar.cjs.entry.js +3 -3
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/post-banner.cjs.entry.js +5 -5
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +4 -4
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +11 -6
- package/dist/cjs/post-card-control.cjs.entry.js +2 -2
- package/dist/cjs/post-closebutton_15.cjs.entry.js +173 -93
- package/dist/cjs/post-collapsible_2.cjs.entry.js +4 -4
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +2 -2
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/collection/components/post-avatar/post-avatar.css +1 -1
- package/dist/collection/components/post-banner/post-banner.js +2 -2
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +30 -4
- package/dist/collection/components/post-closebutton/button-types.js +1 -0
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
- package/dist/collection/components/post-closebutton/post-closebutton.js +65 -5
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +10 -11
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-list/post-list.js +1 -1
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +71 -19
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.css +1 -1
- package/dist/collection/components/post-menu/post-menu.js +15 -6
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-popover/post-popover.css +1 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/collection/utils/event-from.js +20 -6
- package/dist/components/event-from.js +20 -6
- package/dist/components/package.js +1 -1
- package/dist/components/post-avatar.js +1 -1
- package/dist/components/post-banner.js +2 -2
- package/dist/components/post-breadcrumbs.js +13 -6
- package/dist/components/post-closebutton.js +1 -44
- package/dist/components/post-closebutton2.js +77 -0
- package/dist/components/post-header.js +8 -12
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-language-option.js +1 -1
- package/dist/components/post-language-switch.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-list-item.js +1 -1
- package/dist/components/post-list.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +2 -2
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +72 -20
- package/dist/components/post-menu-item2.js +2 -2
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +14 -7
- package/dist/components/post-popover.js +15 -3
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-tab-header.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/{p-B6vPT8S3.js → p-2qJcvMt7.js} +2 -2
- package/dist/components/react/{p-DOo9tmN-.js → p-BIslNfKd.js} +3 -3
- package/dist/components/react/{p-D50E7y6E.js → p-BRBszIzq.js} +17 -10
- package/dist/components/react/{p-BS0ZqwA-.js → p-BVVgwjV0.js} +3 -3
- package/dist/components/react/{p-Amg0f2Yo.js → p-BcpJoB81.js} +2 -2
- package/dist/components/react/p-BnCGzVcR.js +78 -0
- package/dist/components/react/{p-BMdFdJWl.js → p-BsuTiCyd.js} +1 -1
- package/dist/components/react/{p-xelWyg_P.js → p-Cpz7bn7D.js} +5 -5
- package/dist/{esm/event-from-kraHE1r3.js → components/react/p-CzIKqBrS.js} +20 -6
- package/dist/components/react/{p-BDs0pvkX.js → p-D7N0KPNm.js} +2 -2
- package/dist/components/react/{p-Do9awHW7.js → p-DC3aZ-Qt.js} +2 -2
- package/dist/components/react/p-DgSkXfqW.js +3 -0
- package/dist/components/react/{p-D1oOccKr.js → p-WA0BpGMu.js} +2 -2
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-avatar.js +2 -2
- package/dist/components/react/post-back-to-top.js +2 -2
- package/dist/components/react/post-banner.js +4 -4
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +20 -13
- package/dist/components/react/post-card-control.js +2 -2
- package/dist/components/react/post-closebutton.js +1 -45
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-footer.js +6 -6
- package/dist/components/react/post-header.js +10 -14
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-option.js +2 -2
- package/dist/components/react/post-language-switch.js +7 -7
- package/dist/components/react/post-linkarea.js +2 -2
- package/dist/components/react/post-list-item.js +2 -2
- package/dist/components/react/post-list.js +2 -2
- package/dist/components/react/post-logo.js +2 -2
- package/dist/components/react/post-mainnavigation.js +4 -4
- package/dist/components/react/post-megadropdown-trigger.js +3 -3
- package/dist/components/react/post-megadropdown.js +73 -21
- package/dist/components/react/post-menu-item.js +1 -1
- package/dist/components/react/post-menu-trigger.js +1 -1
- package/dist/components/react/post-menu.js +1 -1
- package/dist/components/react/post-popover.js +17 -5
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +3 -3
- package/dist/components/react/post-tab-header.js +2 -2
- package/dist/components/react/post-tab-panel.js +2 -2
- package/dist/components/react/post-tabs.js +2 -2
- package/dist/components/react/post-togglebutton.js +2 -2
- package/dist/components/react/post-tooltip-trigger.js +2 -2
- package/dist/components/react/post-tooltip.js +3 -3
- package/dist/docs.json +125 -9
- package/dist/{components/react/p-kraHE1r3.js → esm/event-from-CzIKqBrS.js} +20 -6
- package/dist/esm/{get-root-hlzxoycr.js → get-root-BkQ3CrLq.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-DgSkXfqW.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +3 -3
- package/dist/esm/post-avatar.entry.js +3 -3
- package/dist/esm/post-back-to-top.entry.js +2 -2
- package/dist/esm/post-banner.entry.js +5 -5
- package/dist/esm/post-breadcrumb-item_2.entry.js +4 -4
- package/dist/esm/post-breadcrumbs.entry.js +12 -7
- package/dist/esm/post-card-control.entry.js +2 -2
- package/dist/esm/post-closebutton_15.entry.js +173 -93
- package/dist/esm/post-collapsible_2.entry.js +4 -4
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-footer.entry.js +2 -2
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tooltip-trigger.entry.js +3 -3
- package/dist/esm/post-tooltip.entry.js +3 -3
- package/dist/post-components/{p-8d2e5814.entry.js → p-017fbd63.entry.js} +1 -1
- package/dist/post-components/{p-b0aaa058.entry.js → p-0b1143d4.entry.js} +1 -1
- package/dist/post-components/{p-36358cd4.entry.js → p-2440cba5.entry.js} +1 -1
- package/dist/post-components/{p-d221395c.entry.js → p-2b003617.entry.js} +1 -1
- package/dist/post-components/p-2c1e0e21.entry.js +1 -0
- package/dist/post-components/p-509ae720.entry.js +1 -0
- package/dist/post-components/{p-a982458f.entry.js → p-759510e5.entry.js} +1 -1
- package/dist/post-components/{p-BkvZk-PA.js → p-CBFgkSgY.js} +1 -1
- package/dist/post-components/p-CJ80BZ06.js +1 -0
- package/dist/post-components/p-CzIKqBrS.js +1 -0
- package/dist/post-components/p-DgSkXfqW.js +1 -0
- package/dist/post-components/{p-33008981.entry.js → p-a9d4dc7f.entry.js} +1 -1
- package/dist/post-components/p-b871aa1b.entry.js +1 -0
- package/dist/post-components/{p-26a04741.entry.js → p-d0fea1d7.entry.js} +1 -1
- package/dist/post-components/p-d25fc2d8.entry.js +1 -0
- package/dist/post-components/{p-16da91bc.entry.js → p-d377069a.entry.js} +1 -1
- package/dist/post-components/{p-bdeef760.entry.js → p-e764835b.entry.js} +1 -1
- package/dist/post-components/{p-84395e1d.entry.js → p-ea71d9fd.entry.js} +1 -1
- package/dist/post-components/{p-2f2f9b22.entry.js → p-ef38c78d.entry.js} +1 -1
- package/dist/post-components/{p-01bc39c2.entry.js → p-efa44b64.entry.js} +1 -1
- package/dist/post-components/p-f86fb192.entry.js +1 -0
- package/dist/post-components/{p-e49aa78e.entry.js → p-feed36d6.entry.js} +1 -1
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +5 -0
- package/dist/types/components/post-closebutton/button-types.d.ts +2 -0
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +10 -1
- package/dist/types/components/post-header/post-header.d.ts +3 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +32 -6
- package/dist/types/components/post-menu/post-menu.d.ts +3 -1
- package/dist/types/components.d.ts +22 -2
- package/dist/types/utils/event-from.d.ts +2 -1
- package/hydrate/index.js +188 -82
- package/hydrate/index.mjs +188 -82
- package/package.json +3 -3
- package/dist/components/react/p-DO48NanC.js +0 -3
- package/dist/esm/package-DO48NanC.js +0 -3
- package/dist/post-components/p-0dc1e940.entry.js +0 -1
- package/dist/post-components/p-71c48d48.entry.js +0 -1
- package/dist/post-components/p-848c10ac.entry.js +0 -1
- package/dist/post-components/p-9dbe6595.entry.js +0 -1
- package/dist/post-components/p-DO48NanC.js +0 -1
- package/dist/post-components/p-_0G7tavk.js +0 -1
- package/dist/post-components/p-eb405167.entry.js +0 -1
- package/dist/post-components/p-kraHE1r3.js +0 -1
- package/dist/cjs/{breakpoints-DmZ_BQGo.js → breakpoints-CEkeixld.js} +3 -3
- package/dist/esm/{breakpoints-_0G7tavk.js → breakpoints-CJ80BZ06.js} +3 -3
|
@@ -3,7 +3,7 @@ import { g as getFocusableChildren } from './get-focusable-children.js';
|
|
|
3
3
|
import { v as version } from './package.js';
|
|
4
4
|
import { b as breakpoint } from './breakpoints.js';
|
|
5
5
|
|
|
6
|
-
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%;inset-block-start:100%;inset-inline-start: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:5;position:fixed;inset-block-start:var(--post-header-navigation-current-inset);inset-inline:0;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height));border-block-start:unset;overflow-y:auto;overscroll-behavior:contain}.megadropdown-container.slide-in{animation:slide-in 350ms forwards}.megadropdown-container.slide-out{animation:slide-out 350ms forwards}}@media screen and (min-width: 1024px){.megadropdown-container{max-height:calc(100vh - var(--post-header-height) - 48px);overflow-y:auto}}.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-block:0 8px;font-weight:900}.megadropdown h2 a{text-decoration:none;display:none;font-weight:inherit;border-block: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;inset-block-end:0;inset-inline-start:0;width:100%;height:2px;position:absolute}.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.
|
|
6
|
+
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%;inset-block-start:100%;inset-inline-start: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:5;position:fixed;inset-block-start:var(--post-header-navigation-current-inset);inset-inline:0;height:calc(min(var(--post-header-scroll-parent-height, 100dvh),100dvh) - var(--post-header-height));border-block-start:unset;overflow-y:auto;overscroll-behavior:contain}.megadropdown-container.slide-in{animation:slide-in 350ms forwards}.megadropdown-container.slide-out{animation:slide-out 350ms forwards}}@media screen and (min-width: 1024px){.megadropdown-container{max-height:calc(100vh - var(--post-header-height) - 48px);overflow-y:auto}}.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-block:0 8px;font-weight:900}.megadropdown h2 a{text-decoration:none;display:none;font-weight:inherit;border-block: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;inset-block-end:0;inset-inline-start:0;width:100%;height:2px;position:absolute}.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.active,.megadropdown post-list .list-title h3 a[aria-current=page],.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-block-end: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;inset-block-start:1rem;inset-inline-end:1rem}@media screen and (max-width: 1023.98px){.megadropdown .close-button{display:none}}";
|
|
7
7
|
|
|
8
8
|
const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdown extends HTMLElement {
|
|
9
9
|
constructor() {
|
|
@@ -39,11 +39,20 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
39
39
|
this.hide(false);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
get megadropdownTrigger() {
|
|
43
|
+
const hostId = this.host.getAttribute('id');
|
|
44
|
+
return hostId ? document.querySelector(`post-megadropdown-trigger[for="${hostId}"] > button`) : null;
|
|
45
|
+
}
|
|
46
|
+
connectedCallback() {
|
|
47
|
+
window.addEventListener('postBreakpoint:device', this.breakpointChange.bind(this));
|
|
48
|
+
}
|
|
49
|
+
componentDidRender() {
|
|
50
|
+
this.getFocusableElements();
|
|
51
|
+
}
|
|
52
|
+
componentDidLoad() {
|
|
53
|
+
this.checkInitialAriaCurrent();
|
|
54
|
+
this.setupObserver();
|
|
55
|
+
this.handleAriaCurrentChange([]);
|
|
47
56
|
}
|
|
48
57
|
disconnectedCallback() {
|
|
49
58
|
this.removeListeners();
|
|
@@ -51,9 +60,7 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
51
60
|
if (PostMegadropdown.activeDropdown === this) {
|
|
52
61
|
PostMegadropdown.activeDropdown = null;
|
|
53
62
|
}
|
|
54
|
-
|
|
55
|
-
componentDidRender() {
|
|
56
|
-
this.getFocusableElements();
|
|
63
|
+
this.defaultSlotObserver.disconnect();
|
|
57
64
|
}
|
|
58
65
|
/**
|
|
59
66
|
* Toggles the dropdown visibility based on its current state.
|
|
@@ -102,8 +109,11 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
102
109
|
async focusFirst() {
|
|
103
110
|
this.firstFocusableEl?.focus();
|
|
104
111
|
}
|
|
105
|
-
|
|
106
|
-
|
|
112
|
+
breakpointChange(e) {
|
|
113
|
+
this.device = e.detail;
|
|
114
|
+
if (this.device === 'desktop' && this.isVisible) {
|
|
115
|
+
this.animationClass = null;
|
|
116
|
+
}
|
|
107
117
|
}
|
|
108
118
|
/**
|
|
109
119
|
* Forces the dropdown to close without animation.
|
|
@@ -135,14 +145,6 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
135
145
|
getFocusableElements() {
|
|
136
146
|
const focusableEls = Array.from(this.host.querySelectorAll('post-list-item, h3, .back-button'));
|
|
137
147
|
const focusableChildren = focusableEls.flatMap(el => Array.from(getFocusableChildren(el)));
|
|
138
|
-
const hostId = this.host.getAttribute('id');
|
|
139
|
-
// Proceed if the host has an ID and one of its focusable children is marked as the current page (`aria-current="page"`)
|
|
140
|
-
if (hostId && focusableChildren.some(el => el.getAttribute('aria-current') === 'page')) {
|
|
141
|
-
// Find the trigger element via its "for" attribute, then locate its button and set `aria-current="page"`
|
|
142
|
-
document
|
|
143
|
-
.querySelector(`post-megadropdown-trigger[for="${hostId}"] > button`)
|
|
144
|
-
.classList.add('selected');
|
|
145
|
-
}
|
|
146
148
|
this.firstFocusableEl = focusableChildren[0];
|
|
147
149
|
this.lastFocusableEl = focusableChildren[focusableChildren.length - 1];
|
|
148
150
|
}
|
|
@@ -168,9 +170,59 @@ const PostMegadropdown$1 = /*@__PURE__*/ proxyCustomElement(class PostMegadropdo
|
|
|
168
170
|
}
|
|
169
171
|
}
|
|
170
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Sets up a MutationObserver on the host to watch for changes
|
|
175
|
+
* in `aria-current` attributes.
|
|
176
|
+
*/
|
|
177
|
+
setupObserver() {
|
|
178
|
+
const config = {
|
|
179
|
+
subtree: true,
|
|
180
|
+
attributes: true,
|
|
181
|
+
attributeFilter: ['aria-current'],
|
|
182
|
+
};
|
|
183
|
+
this.defaultSlotObserver = new MutationObserver(this.handleAriaCurrentChange.bind(this));
|
|
184
|
+
this.defaultSlotObserver.observe(this.host, config);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Adds or removes the 'active' class on the megadropdown trigger button
|
|
188
|
+
* based on the active state.
|
|
189
|
+
*
|
|
190
|
+
* @param isActive - Whether the trigger should appear active
|
|
191
|
+
*/
|
|
192
|
+
setTriggerActive(isActive) {
|
|
193
|
+
const trigger = this.megadropdownTrigger;
|
|
194
|
+
if (!trigger)
|
|
195
|
+
return;
|
|
196
|
+
if (isActive) {
|
|
197
|
+
trigger.classList.add('active');
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
trigger.classList.remove('active');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Updates the megadropdown trigger state when the megadropdown content changes.
|
|
205
|
+
* Checks if any element inside the megadropdown has `aria-current="page"`
|
|
206
|
+
* and sets the trigger as active accordingly.
|
|
207
|
+
*/
|
|
208
|
+
handleAriaCurrentChange(mutations) {
|
|
209
|
+
if (!mutations.length)
|
|
210
|
+
return;
|
|
211
|
+
const hasCurrentPage = mutations.some(m => m.target instanceof HTMLElement && m.target.getAttribute('aria-current') === 'page');
|
|
212
|
+
this.setTriggerActive(hasCurrentPage);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Checks on initialization if any element inside the megadropdown
|
|
216
|
+
* has `aria-current="page"` and sets the trigger as active if so.
|
|
217
|
+
*/
|
|
218
|
+
checkInitialAriaCurrent() {
|
|
219
|
+
const hasCurrentPage = this.host.querySelector('[aria-current="page"]');
|
|
220
|
+
if (hasCurrentPage)
|
|
221
|
+
this.setTriggerActive(true);
|
|
222
|
+
}
|
|
171
223
|
render() {
|
|
172
224
|
const containerStyle = this.isVisible ? {} : { display: 'none' };
|
|
173
|
-
return (h(Host, { key: '
|
|
225
|
+
return (h(Host, { key: '40023f8684db4cfff78f69d2d5786e4c3a0332b4', version: version }, h("div", { key: '986f114148d355b7a6e92c19d1c02c925eb27fce', class: `megadropdown-container ${this.animationClass || ''}`, style: containerStyle, onAnimationEnd: () => this.handleAnimationEnd() }, h("div", { key: 'c14d01be681f596148d39f272375615eafdf25c0', class: "megadropdown" }, h("slot", { key: '5f60ff26e694c107c569e06d30e18a5940d3e7b1', name: "megadropdown-title" }), h("div", { key: '49202a8a0dcebc086220db637cf25d96510b6eac', class: "megadropdown-content" }, h("slot", { key: '98593b2824d21f065b4c183c8980d94136b175bf' })), h("div", { key: 'ed1dfbbebd101a98153657007f8037c0282b47ef', onClick: () => this.hide(true), class: "back-button" }, h("slot", { key: '4e737d72e77271cb025976ae5e5fe4d5f653480a', name: "back-button" })), h("div", { key: '0bf1316c091efbf294be89efeebae7937c013b29', onClick: () => this.hide(true), class: "close-button" }, h("slot", { key: '594a412944fff3fee09639b85cc13a9291b96a10', name: "close-button" }))))));
|
|
174
226
|
}
|
|
175
227
|
get host() { return this; }
|
|
176
228
|
static get style() { return postMegadropdownCss; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
|
|
4
|
-
const postMenuItemCss = "post-menu-item 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-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem 1rem;gap:.
|
|
4
|
+
const postMenuItemCss = "post-menu-item 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-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}";
|
|
5
5
|
|
|
6
6
|
const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -9,7 +9,7 @@ const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '6b2c8542aed22132c627fadb6be036124e37853e', "data-version": version }, h("slot", { key: '8059cb5112270641ef7ba860cdacb2cdaa75fd59' })));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return postMenuItemCss; }
|
|
15
15
|
}, [4, "post-menu-item"]);
|
|
@@ -80,7 +80,7 @@ const PostMenuTrigger = /*@__PURE__*/ proxyCustomElement(class PostMenuTrigger e
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: 'e4ab1c0cd7227b83994cbd74f2bb3fe88c48126e', "data-version": version, "tab-index": "-1" }, h("slot", { key: '9c5aa5d42457f6716c7607b50b5453cdce8d50d0' })));
|
|
84
84
|
}
|
|
85
85
|
get host() { return this; }
|
|
86
86
|
static get watchers() { return {
|
|
@@ -2,12 +2,12 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './post-popovercontainer2.js';
|
|
3
3
|
import { v as version } from './package.js';
|
|
4
4
|
import { g as getFocusableChildren } from './get-focusable-children.js';
|
|
5
|
-
import { d as checkEmptyOrOneOf } from './index2.js';
|
|
5
|
+
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './index2.js';
|
|
6
6
|
import './breakpoints.js';
|
|
7
7
|
import { E as EventFrom } from './event-from.js';
|
|
8
8
|
import { g as getRoot } from './get-root.js';
|
|
9
9
|
|
|
10
|
-
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}";
|
|
10
|
+
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}";
|
|
11
11
|
|
|
12
12
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
13
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -98,6 +98,9 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
98
98
|
validatePlacement() {
|
|
99
99
|
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
100
100
|
}
|
|
101
|
+
validateLabel() {
|
|
102
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
103
|
+
}
|
|
101
104
|
connectedCallback() {
|
|
102
105
|
this.root = getRoot(this.host);
|
|
103
106
|
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
@@ -110,6 +113,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
110
113
|
}
|
|
111
114
|
componentDidLoad() {
|
|
112
115
|
this.validatePlacement();
|
|
116
|
+
this.validateLabel();
|
|
113
117
|
if (this.popoverRef) {
|
|
114
118
|
this.popoverRef.addEventListener('postToggle', this.handlePostToggle);
|
|
115
119
|
}
|
|
@@ -186,8 +190,9 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
186
190
|
}
|
|
187
191
|
}
|
|
188
192
|
getSlottedItems() {
|
|
189
|
-
const slot = this.host.shadowRoot.
|
|
190
|
-
const slottedElements =
|
|
193
|
+
const slot = this.host.shadowRoot.querySelectorAll('slot');
|
|
194
|
+
const slottedElements = [];
|
|
195
|
+
slot.forEach(slotItem => slottedElements.push(...slotItem.assignedElements()));
|
|
191
196
|
return (slottedElements
|
|
192
197
|
// If the element is a slot, get the assigned elements
|
|
193
198
|
.flatMap(el => (el instanceof HTMLSlotElement ? el.assignedElements() : el))
|
|
@@ -195,11 +200,12 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
195
200
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
196
201
|
}
|
|
197
202
|
render() {
|
|
198
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(Host, { key: 'd98d7b0a1c607732ab12c94f8d872408a053c19b', "data-version": version }, h("post-popovercontainer", { key: '669e6062e5ff0dfac0d311cc8fdd0bb51735aac1', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '6bc1abb7b764e9e6985a839904ed5575ea20a519', part: "menu" }, h("slot", { key: '6b8670f2e80ed93761797b9161ddf54bb88f73ec', name: "header" }), h("slot", { key: '971f39ae63f22a503e36aeecb67575304ce14248' })))));
|
|
199
204
|
}
|
|
200
205
|
get host() { return this; }
|
|
201
206
|
static get watchers() { return {
|
|
202
|
-
"placement": ["validatePlacement"]
|
|
207
|
+
"placement": ["validatePlacement"],
|
|
208
|
+
"label": ["validateLabel"]
|
|
203
209
|
}; }
|
|
204
210
|
static get style() { return postMenuCss; }
|
|
205
211
|
}, [1, "post-menu", {
|
|
@@ -210,7 +216,8 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends HTMLEle
|
|
|
210
216
|
"show": [64],
|
|
211
217
|
"hide": [64]
|
|
212
218
|
}, undefined, {
|
|
213
|
-
"placement": ["validatePlacement"]
|
|
219
|
+
"placement": ["validatePlacement"],
|
|
220
|
+
"label": ["validateLabel"]
|
|
214
221
|
}]);
|
|
215
222
|
__decorate([
|
|
216
223
|
EventFrom('post-popovercontainer')
|
|
@@ -3,6 +3,8 @@ import { a as PLACEMENT_TYPES, d as defineCustomElement$2 } from './post-popover
|
|
|
3
3
|
import { v as version } from './package.js';
|
|
4
4
|
import { I as IS_BROWSER } from './breakpoints.js';
|
|
5
5
|
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './index2.js';
|
|
6
|
+
import { d as defineCustomElement$4 } from './post-closebutton2.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './post-icon2.js';
|
|
6
8
|
|
|
7
9
|
function getAttributeObserver(attribute, handler) {
|
|
8
10
|
/**
|
|
@@ -28,7 +30,7 @@ function getAttributeObserver(attribute, handler) {
|
|
|
28
30
|
return IS_BROWSER ? new MutationObserver(observerHandler) : null;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
const postPopoverCss = "
|
|
33
|
+
const postPopoverCss = "*{box-sizing:border-box}:host{display:block}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:.5em;min-width:160px;max-width:min(var(--post-popover-max-width, 280px),100vw)}.popover-content{padding:.5em;flex-grow:1}";
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* @slot default - Slot for placing content inside the popover.
|
|
@@ -144,7 +146,7 @@ const PostPopover$1 = /*@__PURE__*/ proxyCustomElement(class PostPopover extends
|
|
|
144
146
|
trigger.setAttribute('aria-expanded', force ? 'false' : null);
|
|
145
147
|
}
|
|
146
148
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: '4224bfe1dc1bdb7fdfb86da67b54816e8cc6fce4', "data-version": version }, h("post-popovercontainer", { key: '3d7e370a89214878d33598cafd3d118c74d16312', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'ed806f93ddec2656a15a1b242246c9c09b34f58a', class: "popover-container" }, h("div", { key: 'd60dd75153f88fc65d56dc9ec7387363e78cb835', class: "popover-content" }, h("slot", { key: 'f37005a225ecde32a80dd5efc3e61ccea7ab6dc5' })), h("post-closebutton", { key: 'c440bc94fb2832a8b8fcc0dd545b5f9d65cf834a', onClick: () => this.hide() }, this.closeButtonCaption)))));
|
|
148
150
|
}
|
|
149
151
|
get host() { return this; }
|
|
150
152
|
static get watchers() { return {
|
|
@@ -167,13 +169,23 @@ function defineCustomElement$1() {
|
|
|
167
169
|
if (typeof customElements === "undefined") {
|
|
168
170
|
return;
|
|
169
171
|
}
|
|
170
|
-
const components = ["post-popover", "post-popovercontainer"];
|
|
172
|
+
const components = ["post-popover", "post-closebutton", "post-icon", "post-popovercontainer"];
|
|
171
173
|
components.forEach(tagName => { switch (tagName) {
|
|
172
174
|
case "post-popover":
|
|
173
175
|
if (!customElements.get(tagName)) {
|
|
174
176
|
customElements.define(tagName, PostPopover$1);
|
|
175
177
|
}
|
|
176
178
|
break;
|
|
179
|
+
case "post-closebutton":
|
|
180
|
+
if (!customElements.get(tagName)) {
|
|
181
|
+
defineCustomElement$4();
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
case "post-icon":
|
|
185
|
+
if (!customElements.get(tagName)) {
|
|
186
|
+
defineCustomElement$3();
|
|
187
|
+
}
|
|
188
|
+
break;
|
|
177
189
|
case "post-popovercontainer":
|
|
178
190
|
if (!customElements.get(tagName)) {
|
|
179
191
|
defineCustomElement$2();
|
|
@@ -2980,9 +2980,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2980
2980
|
}
|
|
2981
2981
|
}
|
|
2982
2982
|
render() {
|
|
2983
|
-
return (h(Host, { key: '
|
|
2983
|
+
return (h(Host, { key: '493d032d16ace815b6c031e77dbcc673f26d149b', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '97bb357cada0456b3aa458e12768d9ad5458ef24', class: "popover-content" }, this.arrow && (h("span", { key: 'f5f2256470edad5a8ca89c32b3a44ef0fe388eea', class: "arrow", ref: el => {
|
|
2984
2984
|
this.arrowRef = el;
|
|
2985
|
-
} })), h("slot", { key: '
|
|
2985
|
+
} })), h("slot", { key: 'f259b6ad624cf392e0d41026b4eab586009cb3c7' }))));
|
|
2986
2986
|
}
|
|
2987
2987
|
get host() { return this; }
|
|
2988
2988
|
static get watchers() { return {
|
|
@@ -101,7 +101,7 @@ const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends H
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
render() {
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: 'befb055aff44467d2da231043db28797f843c239', "data-version": version }, h("div", { key: 'c231944ad2638c2b69b6ae9e8ad92a962aa50139', 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((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
105
105
|
'star': true,
|
|
106
106
|
'before-hover': i < this.hoveredIndex,
|
|
107
107
|
'active': i < Math.round(this.currentRating),
|
|
@@ -19,7 +19,7 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
|
|
|
19
19
|
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '387d9db0111153ca4a7da1a9ad600daeafa3b7a1', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '62126f05530776ca45b151b00834fa0c68c5b26e' })));
|
|
23
23
|
}
|
|
24
24
|
get host() { return this; }
|
|
25
25
|
static get watchers() { return {
|
|
@@ -21,7 +21,7 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
21
21
|
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: '97ae92b05f495a63bd5ec5f57eb196fdf6772ca8', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '8b36e0849fcd65662a27bc62ac29cec0d8db4f41' })));
|
|
25
25
|
}
|
|
26
26
|
get host() { return this; }
|
|
27
27
|
static get watchers() { return {
|
|
@@ -167,7 +167,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
167
167
|
nextTab.focus();
|
|
168
168
|
}
|
|
169
169
|
render() {
|
|
170
|
-
return (h(Host, { key: '
|
|
170
|
+
return (h(Host, { key: 'eb30ee19d073caf4f32e255045eff58c0cb511f5', "data-version": version }, h("div", { key: '0920e0cbb6565ff8a9ff663e938291c050d6c93c', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'df3a5a698a77719b371879effba16e11709b2c22', class: "tabs", role: "tablist" }, h("slot", { key: 'e6c9592b39e999369eb1b6f43b08e7130872add9', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '14cdae926ce10f854577de34b713c8e269568dbb', class: "tab-content", part: "content" }, h("slot", { key: 'f2aaff6a23f8dd2683963cb25c95d41953e708f5', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
171
171
|
}
|
|
172
172
|
get host() { return this; }
|
|
173
173
|
static get style() { return postTabsCss; }
|
|
@@ -29,7 +29,7 @@ const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutt
|
|
|
29
29
|
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: '190c53c4bbada662698addcb288bcb50a8d179b3', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '544bf7d937386a6e65be75e249f3dcc080054d74' })));
|
|
33
33
|
}
|
|
34
34
|
get host() { return this; }
|
|
35
35
|
static get style() { return postTogglebuttonCss; }
|
|
@@ -5189,7 +5189,7 @@ const PostTooltipTrigger$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltipT
|
|
|
5189
5189
|
this.tooltip?.hide();
|
|
5190
5190
|
}
|
|
5191
5191
|
render() {
|
|
5192
|
-
return (h(Host, { key: '
|
|
5192
|
+
return (h(Host, { key: '49529a68fdcc56e8967cdd147ac4c5c35177e70f', "data-version": version$1 }, h("slot", { key: '2b38e3412393f39dd6b2da480f591e4bec38ba34', onSlotchange: () => this.handleSlotChange() })));
|
|
5193
5193
|
}
|
|
5194
5194
|
get host() { return this; }
|
|
5195
5195
|
static get watchers() { return {
|
|
@@ -71,7 +71,7 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'cdde276f07efb0916bb3b0cd7cf761788421e251', "data-version": version }, h("post-popovercontainer", { key: '06b4d472448d4083f717ce13e73ff9426f422ec4', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, animation: this.animation, placement: this.placement, onPostToggle: e => this.handleToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: 'c5efcac53b6c0fa207ceee34ee86580c7566f8a8' }))));
|
|
75
75
|
}
|
|
76
76
|
get host() { return this; }
|
|
77
77
|
static get watchers() { return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DgSkXfqW.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { E as EventFrom } from './p-
|
|
5
|
+
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
6
6
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
7
7
|
|
|
8
8
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DgSkXfqW.js';
|
|
3
3
|
|
|
4
|
-
const postMenuItemCss = "post-menu-item 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-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem 1rem;gap:.
|
|
4
|
+
const postMenuItemCss = "post-menu-item 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-menu-item button{background-color:ButtonFace !important}post-menu-item button:hover{background-color:Highlight !important}}post-menu-item a{text-decoration:none}post-menu-item button,post-menu-item a{position:relative;display:flex;width:100%;align-items:center;padding:.5rem .75rem .5rem 1rem;gap:.75rem;font-size:.875rem;color:#050400;border-radius:0}post-menu-item button post-icon,post-menu-item a post-icon{width:1rem;height:1rem;margin-block:.25rem}@media screen and (min-width: 780px){post-menu-item button,post-menu-item a{font-size:1rem;padding-block:.75rem;gap:1rem}post-menu-item button post-icon,post-menu-item a post-icon{width:1.5rem;height:1.5rem;margin:0}}@media screen and (min-width: 1024px){post-menu-item button,post-menu-item a{font-size:1.25rem;padding-block:.8125rem}}post-menu-item button:focus-visible,post-menu-item a:focus-visible{outline-offset:2px !important;border-radius:4px}post-menu-item button:hover,post-menu-item a:hover{background-color:#504f4b;color:#fff}";
|
|
5
5
|
|
|
6
6
|
const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends H {
|
|
7
7
|
constructor() {
|
|
@@ -9,7 +9,7 @@ const PostMenuItem = /*@__PURE__*/ proxyCustomElement(class PostMenuItem extends
|
|
|
9
9
|
this.__registerHost();
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '6b2c8542aed22132c627fadb6be036124e37853e', "data-version": version }, h("slot", { key: '8059cb5112270641ef7ba860cdacb2cdaa75fd59' })));
|
|
13
13
|
}
|
|
14
14
|
static get style() { return postMenuItemCss; }
|
|
15
15
|
}, [4, "post-menu-item"]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-
|
|
3
|
-
import { v as version } from './p-
|
|
2
|
+
import { a as PLACEMENT_TYPES, d as defineCustomElement$1 } from './p-BVVgwjV0.js';
|
|
3
|
+
import { v as version } from './p-DgSkXfqW.js';
|
|
4
4
|
import { g as getFocusableChildren } from './p-C35MCWIp.js';
|
|
5
|
-
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
5
|
+
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
6
6
|
import './p-CJ80BZ06.js';
|
|
7
|
-
import { E as EventFrom } from './p-
|
|
7
|
+
import { E as EventFrom } from './p-CzIKqBrS.js';
|
|
8
8
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
9
9
|
|
|
10
|
-
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}";
|
|
10
|
+
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}";
|
|
11
11
|
|
|
12
12
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
13
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -98,6 +98,9 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
98
98
|
validatePlacement() {
|
|
99
99
|
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
100
100
|
}
|
|
101
|
+
validateLabel() {
|
|
102
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
103
|
+
}
|
|
101
104
|
connectedCallback() {
|
|
102
105
|
this.root = getRoot(this.host);
|
|
103
106
|
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
@@ -110,6 +113,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
110
113
|
}
|
|
111
114
|
componentDidLoad() {
|
|
112
115
|
this.validatePlacement();
|
|
116
|
+
this.validateLabel();
|
|
113
117
|
if (this.popoverRef) {
|
|
114
118
|
this.popoverRef.addEventListener('postToggle', this.handlePostToggle);
|
|
115
119
|
}
|
|
@@ -186,8 +190,9 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
186
190
|
}
|
|
187
191
|
}
|
|
188
192
|
getSlottedItems() {
|
|
189
|
-
const slot = this.host.shadowRoot.
|
|
190
|
-
const slottedElements =
|
|
193
|
+
const slot = this.host.shadowRoot.querySelectorAll('slot');
|
|
194
|
+
const slottedElements = [];
|
|
195
|
+
slot.forEach(slotItem => slottedElements.push(...slotItem.assignedElements()));
|
|
191
196
|
return (slottedElements
|
|
192
197
|
// If the element is a slot, get the assigned elements
|
|
193
198
|
.flatMap(el => (el instanceof HTMLSlotElement ? el.assignedElements() : el))
|
|
@@ -195,11 +200,12 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
195
200
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
196
201
|
}
|
|
197
202
|
render() {
|
|
198
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(Host, { key: 'd98d7b0a1c607732ab12c94f8d872408a053c19b', "data-version": version }, h("post-popovercontainer", { key: '669e6062e5ff0dfac0d311cc8fdd0bb51735aac1', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '6bc1abb7b764e9e6985a839904ed5575ea20a519', part: "menu" }, h("slot", { key: '6b8670f2e80ed93761797b9161ddf54bb88f73ec', name: "header" }), h("slot", { key: '971f39ae63f22a503e36aeecb67575304ce14248' })))));
|
|
199
204
|
}
|
|
200
205
|
get host() { return this; }
|
|
201
206
|
static get watchers() { return {
|
|
202
|
-
"placement": ["validatePlacement"]
|
|
207
|
+
"placement": ["validatePlacement"],
|
|
208
|
+
"label": ["validateLabel"]
|
|
203
209
|
}; }
|
|
204
210
|
static get style() { return postMenuCss; }
|
|
205
211
|
}, [1, "post-menu", {
|
|
@@ -210,7 +216,8 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
210
216
|
"show": [64],
|
|
211
217
|
"hide": [64]
|
|
212
218
|
}, undefined, {
|
|
213
|
-
"placement": ["validatePlacement"]
|
|
219
|
+
"placement": ["validatePlacement"],
|
|
220
|
+
"label": ["validateLabel"]
|
|
214
221
|
}]);
|
|
215
222
|
__decorate([
|
|
216
223
|
EventFrom('post-popovercontainer')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
2
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
3
3
|
import { d as checkEmptyOrOneOf, e as checkEmptyOrType } from './p-CV7fm1rW.js';
|
|
4
|
-
import { v as version } from './p-
|
|
4
|
+
import { v as version } from './p-DgSkXfqW.js';
|
|
5
5
|
|
|
6
6
|
const PLACEMENT_TYPES = [
|
|
7
7
|
'top',
|
|
@@ -2980,9 +2980,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2980
2980
|
}
|
|
2981
2981
|
}
|
|
2982
2982
|
render() {
|
|
2983
|
-
return (h(Host, { key: '
|
|
2983
|
+
return (h(Host, { key: '493d032d16ace815b6c031e77dbcc673f26d149b', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '97bb357cada0456b3aa458e12768d9ad5458ef24', class: "popover-content" }, this.arrow && (h("span", { key: 'f5f2256470edad5a8ca89c32b3a44ef0fe388eea', class: "arrow", ref: el => {
|
|
2984
2984
|
this.arrowRef = el;
|
|
2985
|
-
} })), h("slot", { key: '
|
|
2985
|
+
} })), h("slot", { key: 'f259b6ad624cf392e0d41026b4eab586009cb3c7' }))));
|
|
2986
2986
|
}
|
|
2987
2987
|
get host() { return this; }
|
|
2988
2988
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
2
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
3
3
|
import { d as checkEmptyOrOneOf, e as checkEmptyOrType, c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
|
-
import { v as version } from './p-
|
|
4
|
+
import { v as version } from './p-DgSkXfqW.js';
|
|
5
5
|
|
|
6
6
|
const postIconCss = ":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}";
|
|
7
7
|
|
|
@@ -116,7 +116,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
|
116
116
|
this.validateAnimation();
|
|
117
117
|
}
|
|
118
118
|
render() {
|
|
119
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: '0031b3e2e4016f9b28cade66fa435741940946a7', "data-version": version }, h("span", { key: '0efbcdd5f1dd737640238a0ab81b67ca8218adec', style: this.getStyles() })));
|
|
120
120
|
}
|
|
121
121
|
get host() { return this; }
|
|
122
122
|
static get watchers() { return {
|