@swisspost/design-system-components 10.0.0-next.48 → 10.0.0-next.49
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/loader.cjs.js +1 -1
- package/dist/cjs/{package-CZyXYkIN.js → package-CR0YynRY.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +3 -3
- package/dist/cjs/post-avatar.cjs.entry.js +26 -36
- package/dist/cjs/post-back-to-top.cjs.entry.js +2 -2
- package/dist/cjs/post-banner.cjs.entry.js +2 -2
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +4 -4
- package/dist/cjs/post-card-control.cjs.entry.js +4 -4
- package/dist/cjs/post-closebutton_15.cjs.entry.js +132 -72
- package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -3
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/post-footer.cjs.entry.js +3 -3
- package/dist/cjs/post-linkarea.cjs.entry.js +19 -8
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +2 -2
- package/dist/cjs/post-tooltip.cjs.entry.js +3 -3
- package/dist/collection/animations/pop-in.js +14 -0
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-avatar/post-avatar.css +1 -1
- package/dist/collection/components/post-avatar/post-avatar.js +38 -34
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +1 -1
- package/dist/collection/components/post-banner/post-banner.js +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +2 -2
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
- package/dist/collection/components/post-footer/post-footer.css +1 -1
- package/dist/collection/components/post-footer/post-footer.js +1 -1
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +11 -2
- package/dist/collection/components/post-icon/post-icon.js +39 -33
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +1 -2
- package/dist/collection/components/post-language-switch/post-language-switch.js +1 -2
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.js +24 -6
- package/dist/collection/components/post-list/post-list.css +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 +12 -2
- 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 +39 -6
- 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.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +18 -7
- package/dist/collection/components/post-rating/post-rating.css +1 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +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 +2 -2
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
- package/dist/component-names.json +39 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/post-avatar.js +28 -36
- package/dist/components/post-back-to-top.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumb-item2.js +1 -1
- package/dist/components/post-breadcrumbs.js +3 -3
- package/dist/components/post-card-control.js +3 -3
- package/dist/components/post-closebutton.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-footer.js +2 -2
- package/dist/components/post-header.js +12 -3
- package/dist/components/post-icon2.js +39 -33
- package/dist/components/post-language-option.js +2 -3
- package/dist/components/post-language-switch.js +1 -2
- package/dist/components/post-linkarea.js +21 -8
- package/dist/components/post-list-item.js +1 -1
- package/dist/components/post-list.js +2 -2
- 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 +13 -3
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +21 -6
- package/dist/components/post-popover.js +2 -2
- package/dist/components/post-popovercontainer2.js +30 -5
- package/dist/components/post-rating.js +2 -2
- package/dist/components/post-tab-header.js +2 -2
- 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 +2 -2
- package/dist/components/react/{p-Da5wbVP8.js → p-Amg0f2Yo.js} +40 -34
- package/dist/components/react/{p-Tg0GNTZM.js → p-B6vPT8S3.js} +2 -2
- package/dist/components/react/{p-CGsAj6ij.js → p-BDs0pvkX.js} +2 -2
- package/dist/components/react/{p-q8Fvf8A0.js → p-BMdFdJWl.js} +2 -2
- package/dist/components/react/{p-Ce7jgYmK.js → p-BS0ZqwA-.js} +31 -6
- package/dist/components/react/{p-Dq9F2i7n.js → p-D1oOccKr.js} +2 -2
- package/dist/components/react/{p-JHuJA2Lv.js → p-D50E7y6E.js} +23 -8
- package/dist/components/react/p-DO48NanC.js +3 -0
- package/dist/components/react/{p-38PqL5iD.js → p-DOo9tmN-.js} +2 -2
- package/dist/components/react/{p-DzYquz3e.js → p-Do9awHW7.js} +3 -3
- package/dist/components/react/{p-CiYSngKM.js → p-xelWyg_P.js} +5 -5
- 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 +29 -37
- package/dist/components/react/post-back-to-top.js +3 -3
- package/dist/components/react/post-banner.js +2 -2
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +10 -10
- package/dist/components/react/post-card-control.js +5 -5
- package/dist/components/react/post-closebutton.js +3 -3
- 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 +8 -8
- package/dist/components/react/post-header.js +13 -4
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-option.js +3 -4
- package/dist/components/react/post-language-switch.js +6 -7
- package/dist/components/react/post-linkarea.js +22 -9
- package/dist/components/react/post-list-item.js +2 -2
- package/dist/components/react/post-list.js +3 -3
- 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 +2 -2
- package/dist/components/react/post-megadropdown.js +14 -4
- 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 +4 -4
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-rating.js +4 -4
- package/dist/components/react/post-tab-header.js +3 -3
- 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 +4 -4
- package/dist/docs.json +52 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-DO48NanC.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +3 -3
- package/dist/esm/post-avatar.entry.js +26 -36
- package/dist/esm/post-back-to-top.entry.js +2 -2
- package/dist/esm/post-banner.entry.js +2 -2
- package/dist/esm/post-breadcrumb-item_2.entry.js +3 -3
- package/dist/esm/post-breadcrumbs.entry.js +4 -4
- package/dist/esm/post-card-control.entry.js +4 -4
- package/dist/esm/post-closebutton_15.entry.js +132 -72
- package/dist/esm/post-collapsible_2.entry.js +3 -3
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/post-footer.entry.js +3 -3
- package/dist/esm/post-linkarea.entry.js +19 -8
- package/dist/esm/post-popover.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/post-tooltip-trigger.entry.js +2 -2
- package/dist/esm/post-tooltip.entry.js +3 -3
- package/dist/post-components/p-01bc39c2.entry.js +1 -0
- package/dist/post-components/p-0dc1e940.entry.js +1 -0
- package/dist/post-components/p-16da91bc.entry.js +1 -0
- package/dist/post-components/p-26a04741.entry.js +1 -0
- package/dist/post-components/p-2f2f9b22.entry.js +1 -0
- package/dist/post-components/{p-38d3d441.entry.js → p-33008981.entry.js} +1 -1
- package/dist/post-components/p-36358cd4.entry.js +1 -0
- package/dist/post-components/p-71c48d48.entry.js +1 -0
- package/dist/post-components/{p-6777e505.entry.js → p-84395e1d.entry.js} +1 -1
- package/dist/post-components/p-848c10ac.entry.js +1 -0
- package/dist/post-components/{p-d61bb2ff.entry.js → p-8d2e5814.entry.js} +1 -1
- package/dist/post-components/{p-40f21542.entry.js → p-9dbe6595.entry.js} +1 -1
- package/dist/post-components/p-DO48NanC.js +1 -0
- package/dist/post-components/p-a982458f.entry.js +1 -0
- package/dist/post-components/{p-3c71f590.entry.js → p-b0aaa058.entry.js} +1 -1
- package/dist/post-components/{p-16772417.entry.js → p-bdeef760.entry.js} +1 -1
- package/dist/post-components/{p-6add880f.entry.js → p-d221395c.entry.js} +1 -1
- package/dist/post-components/{p-aad86320.entry.js → p-e49aa78e.entry.js} +1 -1
- package/dist/post-components/p-eb405167.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/pop-in.d.ts +1 -0
- package/dist/types/components/post-avatar/post-avatar.d.ts +5 -4
- package/dist/types/components/post-header/post-header.d.ts +2 -0
- package/dist/types/components/post-icon/post-icon.d.ts +11 -0
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +6 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +2 -1
- package/dist/types/components/post-menu/post-menu.d.ts +5 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +6 -2
- package/dist/types/components.d.ts +19 -3
- package/hydrate/index.js +214 -147
- package/hydrate/index.mjs +214 -147
- package/package.json +8 -6
- package/dist/components/react/p-0Ltezq5O.js +0 -3
- package/dist/esm/package-0Ltezq5O.js +0 -3
- package/dist/post-components/p-0Ltezq5O.js +0 -1
- package/dist/post-components/p-4243cdd1.entry.js +0 -1
- package/dist/post-components/p-4c18cb8c.entry.js +0 -1
- package/dist/post-components/p-51dc7647.entry.js +0 -1
- package/dist/post-components/p-8363fedb.entry.js +0 -1
- package/dist/post-components/p-83998038.entry.js +0 -1
- package/dist/post-components/p-85bb1b5e.entry.js +0 -1
- package/dist/post-components/p-8f4d8685.entry.js +0 -1
- package/dist/post-components/p-95ad536d.entry.js +0 -1
- package/dist/post-components/p-9d806e89.entry.js +0 -1
- package/dist/post-components/p-c3e38acf.entry.js +0 -1
- package/dist/prebuild.js +0 -26
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +0 -1
|
@@ -28,7 +28,7 @@ function getAttributeObserver(attribute, handler) {
|
|
|
28
28
|
return IS_BROWSER ? new MutationObserver(observerHandler) : null;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const postPopoverCss = "
|
|
31
|
+
const postPopoverCss = ".btn-close{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;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{background-color:ButtonFace !important}.btn-close:hover{background-color:Highlight !important}}.btn-close{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}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24)}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:#999}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}*{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}.btn-close{color:var(--post-current-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:hover{color:HighlightText !important}}";
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @slot default - Slot for placing content inside the popover.
|
|
@@ -144,7 +144,7 @@ const PostPopover$1 = /*@__PURE__*/ proxyCustomElement(class PostPopover extends
|
|
|
144
144
|
trigger.setAttribute('aria-expanded', force ? 'false' : null);
|
|
145
145
|
}
|
|
146
146
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
147
|
+
return (h(Host, { key: 'c0a36766203f4b2f6350c9c92b304eb9052d2ceb', "data-version": version }, h("post-popovercontainer", { key: 'ec9d9e8af53408fd3d2d5aaedab10ccee94322fd', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '4edb0a99f660f5b4c1b35a934cc2d21bb84b1c44', class: "popover-container" }, h("div", { key: '96d3fc664e0a8c5d0b877cf46df9e80433909f5e', class: "popover-content" }, h("slot", { key: '978e3335f1214bed829042cfdf6bd7a23ae9229a' })), h("button", { key: 'b42d5a48ba83d6e1b592b0607e837e8036e0cf54', class: "btn-close", onClick: () => this.hide() }, h("span", { key: '95a7cfd1c4b6c30e04a86e58d4cf9a70eec885c8', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
148
148
|
}
|
|
149
149
|
get host() { return this; }
|
|
150
150
|
static get watchers() { return {
|
|
@@ -2707,13 +2707,29 @@ function apply() {
|
|
|
2707
2707
|
injectStyles(document);
|
|
2708
2708
|
}
|
|
2709
2709
|
|
|
2710
|
-
const
|
|
2710
|
+
const duration = 250;
|
|
2711
|
+
const easing = 'ease-out';
|
|
2712
|
+
function popIn(el) {
|
|
2713
|
+
if (!el)
|
|
2714
|
+
return;
|
|
2715
|
+
return el.animate([
|
|
2716
|
+
{ transform: 'scale(0.9)', opacity: 0 },
|
|
2717
|
+
{ transform: 'scale(1)', opacity: 1 },
|
|
2718
|
+
], {
|
|
2719
|
+
duration,
|
|
2720
|
+
easing,
|
|
2721
|
+
fill: 'forwards',
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:where(post-popovercontainer)>div{border:2px solid rgba(0,0,0,0)}}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:where(post-popovercontainer):not(:has(.arrow))>div{box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow)>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top)>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left)>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right)>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0)}";
|
|
2711
2726
|
|
|
2712
2727
|
const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends HTMLElement$1 {
|
|
2713
2728
|
constructor() {
|
|
2714
2729
|
super();
|
|
2715
2730
|
this.__registerHost();
|
|
2716
2731
|
this.postToggle = createEvent(this, "postToggle", 7);
|
|
2732
|
+
this.firstOpen = true;
|
|
2717
2733
|
/**
|
|
2718
2734
|
* Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
2719
2735
|
* Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
@@ -2813,9 +2829,19 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2813
2829
|
this.toggleTimeoutId = window.setTimeout(() => (this.toggleTimeoutId = null), 10);
|
|
2814
2830
|
const isOpen = e.newState === 'open';
|
|
2815
2831
|
if (isOpen) {
|
|
2832
|
+
const content = this.host.querySelector('.popover-content');
|
|
2816
2833
|
this.startAutoupdates();
|
|
2834
|
+
if (content && this.animation === 'pop-in') {
|
|
2835
|
+
popIn(content);
|
|
2836
|
+
}
|
|
2817
2837
|
if (this.safeSpace)
|
|
2818
2838
|
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2839
|
+
// Emit event with `first` flag only true on the first open
|
|
2840
|
+
if (this.firstOpen) {
|
|
2841
|
+
this.postToggle.emit({ isOpen, first: this.firstOpen });
|
|
2842
|
+
this.firstOpen = false;
|
|
2843
|
+
return;
|
|
2844
|
+
}
|
|
2819
2845
|
}
|
|
2820
2846
|
else {
|
|
2821
2847
|
if (typeof this.clearAutoUpdate === 'function')
|
|
@@ -2823,7 +2849,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2823
2849
|
if (this.safeSpace)
|
|
2824
2850
|
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2825
2851
|
}
|
|
2826
|
-
this.postToggle.emit(isOpen);
|
|
2852
|
+
this.postToggle.emit({ isOpen: isOpen, first: false });
|
|
2827
2853
|
}
|
|
2828
2854
|
/**
|
|
2829
2855
|
* Start listening for DOM updates, scroll events etc. that have
|
|
@@ -2954,10 +2980,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2954
2980
|
}
|
|
2955
2981
|
}
|
|
2956
2982
|
render() {
|
|
2957
|
-
|
|
2958
|
-
return (h(Host, { key: '357f53696ca28ab2c137d47e2192038dc756c289', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '9c40bdc5034ccf14157ee1ae8ce33fe58a9049e4', class: animationClass }, this.arrow && (h("span", { key: '6133ab54aaea6f198560ca5cb30f5604318203f6', class: "arrow", ref: el => {
|
|
2983
|
+
return (h(Host, { key: '1594b782ac56ae23eba2df3f452ad40015ace67d', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '565cbf870aca9abbc665525a627922d1cfdb9195', class: "popover-content" }, this.arrow && (h("span", { key: 'add7d6f7b176e7365b5a0c25fa81dd2a9520e7f3', class: "arrow", ref: el => {
|
|
2959
2984
|
this.arrowRef = el;
|
|
2960
|
-
} })), h("slot", { key: '
|
|
2985
|
+
} })), h("slot", { key: '308138890a4148c5c94b675e2a6b911fef1c31b5' }))));
|
|
2961
2986
|
}
|
|
2962
2987
|
get host() { return this; }
|
|
2963
2988
|
static get watchers() { return {
|
|
@@ -4,7 +4,7 @@ import { c as checkRequiredAndType } from './index2.js';
|
|
|
4
4
|
import './breakpoints.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './post-icon2.js';
|
|
6
6
|
|
|
7
|
-
const postRatingCss = "
|
|
7
|
+
const postRatingCss = ":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%)}";
|
|
8
8
|
|
|
9
9
|
const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTMLElement {
|
|
10
10
|
validateLabel() {
|
|
@@ -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: 'b7dcf175b548433023ea3344be40b1b34f366f3c', "data-version": version }, h("div", { key: '1ec0c35a4ec969f489196116c4fdbaf89f203bed', 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),
|
|
@@ -4,7 +4,7 @@ import { c as checkRequiredAndType } from './index2.js';
|
|
|
4
4
|
import './breakpoints.js';
|
|
5
5
|
import { n as nanoid } from './index.browser.js';
|
|
6
6
|
|
|
7
|
-
const postTabHeaderCss = ".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}}
|
|
7
|
+
const postTabHeaderCss = ".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}}: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}}";
|
|
8
8
|
|
|
9
9
|
const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
|
|
10
10
|
constructor() {
|
|
@@ -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: '11b7499afb05a1d7e6f9af548667ec93f7c2af77', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '589c626bd31aed39c1f90b74ee81b2d9fdf3b7c0' })));
|
|
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: '3f4af71d9dcd4c8d3a25514c4decf322b0297e0f', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: 'fb2106769715676d200722103855cb3f82f30b83' })));
|
|
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: '8e205e26a016d6370919723522dc993befbc110a', "data-version": version }, h("div", { key: '1bd1b1064c87ab7dd04731a945a6169ace2ac203', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'e9d7989ae0488ed8c9d8d225c9b6f95e29de15aa', class: "tabs", role: "tablist" }, h("slot", { key: '381baa02f41fc07b6ae777fdcc47040ceaa553ea', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'aef6b1b4608e2b006ac808f7fc674dbc85011faa', class: "tab-content", part: "content" }, h("slot", { key: '4b98797972204262b1ebf29fe368ea90e2ccbce7', 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: 'f6b56dc64dbff8ef94e4104eebe845a04f113c75', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '2846bb617c7a68ba6390fe27b043265569a9fd55' })));
|
|
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: '4890519cbc8f200cd5f2d6ef79822ec17776c7f0', "data-version": version$1 }, h("slot", { key: '54e5d33bf2aae19f493aaff312f574b6e5fb55e6', onSlotchange: () => this.handleSlotChange() })));
|
|
5193
5193
|
}
|
|
5194
5194
|
get host() { return this; }
|
|
5195
5195
|
static get watchers() { return {
|
|
@@ -67,11 +67,11 @@ const PostTooltip$1 = /*@__PURE__*/ proxyCustomElement(class PostTooltip extends
|
|
|
67
67
|
* @param e Popovercontainer toggle event
|
|
68
68
|
*/
|
|
69
69
|
handleToggle(e) {
|
|
70
|
-
this.open = e.detail;
|
|
70
|
+
this.open = e.detail.isOpen;
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'b2e72e54ae7c21cc8d47749269dea98cd5cd4fdf', "data-version": version }, h("post-popovercontainer", { key: '4280b99b2b919d07b40f6112ee514907eeff7211', 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: 'da25daf633dc82191f0002c54f29b35731e35082' }))));
|
|
75
75
|
}
|
|
76
76
|
get host() { return this; }
|
|
77
77
|
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-DO48NanC.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
|
|
|
@@ -44,52 +44,58 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
|
44
44
|
validateScale() {
|
|
45
45
|
checkEmptyOrType(this, 'scale', 'number');
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Construct the icon URL according to the following rules:
|
|
49
|
+
* 1. `@base` (absolute URL) → use directly.
|
|
50
|
+
* 2. `@base` (relative URL) → resolve with `base href` and/or `origin`
|
|
51
|
+
* - If `base href` is absolute → use just that.
|
|
52
|
+
* - If `base href` is relative → prepend with `origin`.
|
|
53
|
+
* - If `base href` does not exist → use only `origin`.
|
|
54
|
+
* 3. `@meta` (absolute URL) → use directly.
|
|
55
|
+
* 4. `@meta` (relative URL) → resolve with `base href` and/or `origin`. (same as above)
|
|
56
|
+
* 5. `CDN_URL` fallback → `https://unpkg.com/...`.
|
|
57
|
+
**/
|
|
51
58
|
getUrl() {
|
|
52
59
|
const fileName = `${this.name}.svg`;
|
|
53
60
|
if (!IS_BROWSER && !this.base) {
|
|
54
61
|
return `${CDN_URL}${fileName}`;
|
|
55
62
|
}
|
|
63
|
+
const isAbsolute = (url) => /^https?:\/\//.test(url);
|
|
64
|
+
const normalizeUrl = (url) => (url && !url.endsWith('/') ? `${url}/` : url);
|
|
65
|
+
const cleanUrl = (url) => url.replace(/([^:])\/\//g, '$1/');
|
|
56
66
|
const currentDomain = IS_BROWSER ? window.location.origin : '';
|
|
57
67
|
const baseHref = IS_BROWSER
|
|
58
68
|
? document.querySelector('base[href]')?.getAttribute('href') || ''
|
|
59
69
|
: '';
|
|
60
|
-
const isBaseHrefAbsolute = /^https?:\/\//.test(baseHref);
|
|
61
70
|
const metaIconBase = IS_BROWSER
|
|
62
|
-
? document
|
|
63
|
-
.querySelector('meta[name="design-system-settings"]')
|
|
64
|
-
?.getAttribute('data-post-icon-base') || ''
|
|
71
|
+
? document.querySelector('meta[name="design-system-settings"]')?.getAttribute('data-post-icon-base') || ''
|
|
65
72
|
: '';
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return
|
|
74
|
-
}
|
|
73
|
+
// Function to build the first part of the URL when 'this.base' or 'metaIconBase' are relative
|
|
74
|
+
const buildUrlWithBase = (relativeUrl) => {
|
|
75
|
+
const normalizedHref = normalizeUrl(baseHref);
|
|
76
|
+
const normalizedRelative = normalizeUrl(relativeUrl);
|
|
77
|
+
if (isAbsolute(normalizedHref)) {
|
|
78
|
+
return `${normalizedHref}${normalizedRelative}`;
|
|
79
|
+
}
|
|
80
|
+
return `${currentDomain}${normalizedHref}${normalizedRelative}`;
|
|
81
|
+
};
|
|
75
82
|
let url;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
url =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
url = `${normalizedBaseHref}${normalizedIconBase}${fileName}`;
|
|
83
|
-
}
|
|
84
|
-
else if (iconBase || baseHref) {
|
|
85
|
-
// Standard case: domain + baseHref + iconBase
|
|
86
|
-
url = `${currentDomain}${normalizedBaseHref}${normalizedIconBase}${fileName}`;
|
|
83
|
+
// Highest Priority is this.base
|
|
84
|
+
if (this.base) {
|
|
85
|
+
url = isAbsolute(this.base)
|
|
86
|
+
? `${normalizeUrl(this.base)}${fileName}`
|
|
87
|
+
: `${buildUrlWithBase(this.base)}${fileName}`;
|
|
88
|
+
return cleanUrl(url);
|
|
87
89
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
url =
|
|
90
|
+
// Second Priority is metaIconBase
|
|
91
|
+
if (metaIconBase) {
|
|
92
|
+
url = isAbsolute(metaIconBase)
|
|
93
|
+
? `${normalizeUrl(metaIconBase)}${fileName}`
|
|
94
|
+
: `${buildUrlWithBase(metaIconBase)}${fileName}`;
|
|
95
|
+
return cleanUrl(url);
|
|
91
96
|
}
|
|
92
|
-
|
|
97
|
+
// Fallback to CDN
|
|
98
|
+
return cleanUrl(`${CDN_URL}${fileName}`);
|
|
93
99
|
}
|
|
94
100
|
getStyles() {
|
|
95
101
|
const url = this.getUrl();
|
|
@@ -110,7 +116,7 @@ const PostIcon = /*@__PURE__*/ proxyCustomElement(class PostIcon extends H {
|
|
|
110
116
|
this.validateAnimation();
|
|
111
117
|
}
|
|
112
118
|
render() {
|
|
113
|
-
return (h(Host, { key: '
|
|
119
|
+
return (h(Host, { key: '521fb549cef7d0838c999628cf69c5c23e87dfc6', "data-version": version }, h("span", { key: 'cc9ca579bd90fee8cec7868c697bfe59dd677246', style: this.getStyles() })));
|
|
114
120
|
}
|
|
115
121
|
get host() { return this; }
|
|
116
122
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
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-DO48NanC.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
@@ -103,7 +103,7 @@ const PostCollapsibleTrigger = /*@__PURE__*/ proxyCustomElement(class PostCollap
|
|
|
103
103
|
this.updateAriaAttributes();
|
|
104
104
|
}
|
|
105
105
|
render() {
|
|
106
|
-
return (h(Host, { key: '
|
|
106
|
+
return (h(Host, { key: 'd0851c032e622f4a182e1321331e84eaa0440245', "data-version": version }, h("slot", { key: 'd495c42f409de0f9230c01031ecddab69cead1b7' })));
|
|
107
107
|
}
|
|
108
108
|
get host() { return this; }
|
|
109
109
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
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-DO48NanC.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
@@ -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: '14592f9564fdb09b2e809374d5794bf71f576dbb', "data-version": version, "tab-index": "-1" }, h("slot", { key: 'a0f463000420df39035cc5a48369d230394b5e04' })));
|
|
84
84
|
}
|
|
85
85
|
get host() { return this; }
|
|
86
86
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { v as version } from './p-
|
|
2
|
+
import { v as version } from './p-DO48NanC.js';
|
|
3
3
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
4
4
|
import { e as checkEmptyOrType } from './p-CV7fm1rW.js';
|
|
5
5
|
|
|
@@ -80,7 +80,7 @@ const PostCollapsible = /*@__PURE__*/ proxyCustomElement(class PostCollapsible e
|
|
|
80
80
|
triggers.forEach(trigger => trigger.update());
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '3a11f1a60c536544881def998bcdf81f6d248837', "data-version": version, tabindex: this.collapsed ? -1 : undefined }, h("slot", { key: '6ea66375cdffefd02c8293aa1542c4cbfce905a4' })));
|
|
84
84
|
}
|
|
85
85
|
get host() { return this; }
|
|
86
86
|
static get watchers() { return {
|
|
@@ -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-DO48NanC.js';
|
|
5
5
|
|
|
6
6
|
const PLACEMENT_TYPES = [
|
|
7
7
|
'top',
|
|
@@ -2707,13 +2707,29 @@ function apply() {
|
|
|
2707
2707
|
injectStyles(document);
|
|
2708
2708
|
}
|
|
2709
2709
|
|
|
2710
|
-
const
|
|
2710
|
+
const duration = 250;
|
|
2711
|
+
const easing = 'ease-out';
|
|
2712
|
+
function popIn(el) {
|
|
2713
|
+
if (!el)
|
|
2714
|
+
return;
|
|
2715
|
+
return el.animate([
|
|
2716
|
+
{ transform: 'scale(0.9)', opacity: 0 },
|
|
2717
|
+
{ transform: 'scale(1)', opacity: 1 },
|
|
2718
|
+
], {
|
|
2719
|
+
duration,
|
|
2720
|
+
easing,
|
|
2721
|
+
fill: 'forwards',
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:where(post-popovercontainer)>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:where(post-popovercontainer)>div{border:2px solid rgba(0,0,0,0)}}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer)[safe-space]::after{content:\"\";position:fixed;inset:0;z-index:-1;pointer-events:auto}:where(post-popovercontainer)[safe-space=triangle]::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:where(post-popovercontainer)[safe-space=trapezoid]::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:where(post-popovercontainer):not(:has(.arrow))>div{box-shadow:var(--post-device-elevation-300)}:where(post-popovercontainer):has(.arrow)>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.top)>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.left)>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer):has(.arrow.right)>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0)}";
|
|
2711
2726
|
|
|
2712
2727
|
const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopovercontainer extends H {
|
|
2713
2728
|
constructor() {
|
|
2714
2729
|
super();
|
|
2715
2730
|
this.__registerHost();
|
|
2716
2731
|
this.postToggle = createEvent(this, "postToggle");
|
|
2732
|
+
this.firstOpen = true;
|
|
2717
2733
|
/**
|
|
2718
2734
|
* Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.
|
|
2719
2735
|
* Popovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted
|
|
@@ -2813,9 +2829,19 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2813
2829
|
this.toggleTimeoutId = window.setTimeout(() => (this.toggleTimeoutId = null), 10);
|
|
2814
2830
|
const isOpen = e.newState === 'open';
|
|
2815
2831
|
if (isOpen) {
|
|
2832
|
+
const content = this.host.querySelector('.popover-content');
|
|
2816
2833
|
this.startAutoupdates();
|
|
2834
|
+
if (content && this.animation === 'pop-in') {
|
|
2835
|
+
popIn(content);
|
|
2836
|
+
}
|
|
2817
2837
|
if (this.safeSpace)
|
|
2818
2838
|
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2839
|
+
// Emit event with `first` flag only true on the first open
|
|
2840
|
+
if (this.firstOpen) {
|
|
2841
|
+
this.postToggle.emit({ isOpen, first: this.firstOpen });
|
|
2842
|
+
this.firstOpen = false;
|
|
2843
|
+
return;
|
|
2844
|
+
}
|
|
2819
2845
|
}
|
|
2820
2846
|
else {
|
|
2821
2847
|
if (typeof this.clearAutoUpdate === 'function')
|
|
@@ -2823,7 +2849,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2823
2849
|
if (this.safeSpace)
|
|
2824
2850
|
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
2825
2851
|
}
|
|
2826
|
-
this.postToggle.emit(isOpen);
|
|
2852
|
+
this.postToggle.emit({ isOpen: isOpen, first: false });
|
|
2827
2853
|
}
|
|
2828
2854
|
/**
|
|
2829
2855
|
* Start listening for DOM updates, scroll events etc. that have
|
|
@@ -2954,10 +2980,9 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2954
2980
|
}
|
|
2955
2981
|
}
|
|
2956
2982
|
render() {
|
|
2957
|
-
|
|
2958
|
-
return (h(Host, { key: '357f53696ca28ab2c137d47e2192038dc756c289', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '9c40bdc5034ccf14157ee1ae8ce33fe58a9049e4', class: animationClass }, this.arrow && (h("span", { key: '6133ab54aaea6f198560ca5cb30f5604318203f6', class: "arrow", ref: el => {
|
|
2983
|
+
return (h(Host, { key: '1594b782ac56ae23eba2df3f452ad40015ace67d', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '565cbf870aca9abbc665525a627922d1cfdb9195', class: "popover-content" }, this.arrow && (h("span", { key: 'add7d6f7b176e7365b5a0c25fa81dd2a9520e7f3', class: "arrow", ref: el => {
|
|
2959
2984
|
this.arrowRef = el;
|
|
2960
|
-
} })), h("slot", { key: '
|
|
2985
|
+
} })), h("slot", { key: '308138890a4148c5c94b675e2a6b911fef1c31b5' }))));
|
|
2961
2986
|
}
|
|
2962
2987
|
get host() { return this; }
|
|
2963
2988
|
static get watchers() { return {
|
|
@@ -1,11 +1,11 @@
|
|
|
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-DO48NanC.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './p-r4txK0AC.js';
|
|
4
4
|
import { b as checkRequiredAndOneOf } from './p-CV7fm1rW.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
6
6
|
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
7
7
|
|
|
8
|
-
const postAccordionCss = ":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-block-start:calc(var(--post-device-border-width-default)*-1)}
|
|
8
|
+
const postAccordionCss = ":host{display:block}::slotted(post-accordion-item){display:block}::slotted(post-accordion-item:not(:only-of-type:first-of-type)){margin-block-start:calc(var(--post-device-border-width-default)*-1)}";
|
|
9
9
|
|
|
10
10
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
11
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -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-BS0ZqwA-.js';
|
|
3
|
+
import { v as version } from './p-DO48NanC.js';
|
|
4
4
|
import { g as getFocusableChildren } from './p-C35MCWIp.js';
|
|
5
5
|
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
6
6
|
import './p-CJ80BZ06.js';
|
|
7
7
|
import { E as EventFrom } from './p-kraHE1r3.js';
|
|
8
8
|
import { g as getRoot } from './p-CBFgkSgY.js';
|
|
9
9
|
|
|
10
|
-
const postMenuCss = "
|
|
10
|
+
const postMenuCss = ":host{display:block}:where([part=menu]){display:flex;flex-direction:column;padding-block:.5rem}";
|
|
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;
|
|
@@ -59,18 +59,32 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
this.handlePostToggle = (event) => {
|
|
62
|
-
this.isVisible = event.detail;
|
|
62
|
+
this.isVisible = event.detail.isOpen;
|
|
63
63
|
this.toggleMenu.emit(this.isVisible);
|
|
64
64
|
requestAnimationFrame(() => {
|
|
65
65
|
if (this.isVisible) {
|
|
66
66
|
this.lastFocusedElement = this.root?.activeElement;
|
|
67
67
|
const menuItems = this.getSlottedItems();
|
|
68
|
-
if (
|
|
69
|
-
menuItems
|
|
68
|
+
if (event.detail.first) {
|
|
69
|
+
if (menuItems.length > 0) {
|
|
70
|
+
// Add role="menu" to the popovercontainer
|
|
71
|
+
this.host.setAttribute('role', 'menu');
|
|
72
|
+
// Add role="menuitem" to the focusable elements
|
|
73
|
+
menuItems.forEach(item => {
|
|
74
|
+
item.setAttribute('role', 'menuitem');
|
|
75
|
+
});
|
|
76
|
+
// Add aria-label to the menu
|
|
77
|
+
if (this.label)
|
|
78
|
+
this.host.setAttribute('aria-label', this.label);
|
|
79
|
+
}
|
|
70
80
|
}
|
|
81
|
+
menuItems[0].focus();
|
|
71
82
|
}
|
|
72
83
|
else if (this.lastFocusedElement) {
|
|
73
|
-
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
// This timeout is added for NVDA to announce the menu as collapsed
|
|
86
|
+
this.lastFocusedElement.focus();
|
|
87
|
+
}, 0);
|
|
74
88
|
}
|
|
75
89
|
});
|
|
76
90
|
};
|
|
@@ -181,7 +195,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
181
195
|
.flatMap(el => Array.from(getFocusableChildren(el))));
|
|
182
196
|
}
|
|
183
197
|
render() {
|
|
184
|
-
return (h(Host, { key: '
|
|
198
|
+
return (h(Host, { key: '7b7fe6fccd27d3ff12eae3094b1a55b9b9778eb1', "data-version": version }, h("post-popovercontainer", { key: '6dae2883febd1e96ae1b34518dd2e9c634fafecb', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: 'e19c107831b020aa0039ea7a18465e4bb72380c4', part: "menu" }, h("slot", { key: '9d9862e73dd222435d196e67c540bf8266952d94' })))));
|
|
185
199
|
}
|
|
186
200
|
get host() { return this; }
|
|
187
201
|
static get watchers() { return {
|
|
@@ -190,6 +204,7 @@ const PostMenu = /*@__PURE__*/ proxyCustomElement(class PostMenu extends H {
|
|
|
190
204
|
static get style() { return postMenuCss; }
|
|
191
205
|
}, [1, "post-menu", {
|
|
192
206
|
"placement": [1],
|
|
207
|
+
"label": [1],
|
|
193
208
|
"isVisible": [32],
|
|
194
209
|
"toggle": [64],
|
|
195
210
|
"show": [64],
|