@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, a as Host } from './index.js';
|
|
2
|
-
import { d as defineCustomElement$2, a as PLACEMENT_TYPES } from './p-
|
|
3
|
-
import { v as version } from './p-
|
|
2
|
+
import { d as defineCustomElement$2, a as PLACEMENT_TYPES } from './p-BS0ZqwA-.js';
|
|
3
|
+
import { v as version } from './p-DO48NanC.js';
|
|
4
4
|
import { I as IS_BROWSER } from './p-CJ80BZ06.js';
|
|
5
5
|
import { d as checkEmptyOrOneOf, c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
6
6
|
|
|
@@ -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 {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PostPopovercontainer$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { P as PostPopovercontainer$1, d as defineCustomElement$1 } from './p-BS0ZqwA-.js';
|
|
2
2
|
|
|
3
3
|
const PostPopovercontainer = PostPopovercontainer$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-
|
|
5
|
+
import { d as defineCustomElement$2 } from './p-Amg0f2Yo.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 H {
|
|
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),
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { n as nanoid } from './p-BLchVpF6.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 H {
|
|
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 {
|
|
@@ -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 { n as nanoid } from './p-BLchVpF6.js';
|
|
4
4
|
import { c as checkRequiredAndType } from './p-CV7fm1rW.js';
|
|
5
5
|
import './p-CJ80BZ06.js';
|
|
@@ -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 {
|
|
@@ -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 { f as fadeOut, a as fadeIn } from './p-SbIC4aZX.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
5
|
|
|
@@ -167,7 +167,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends H {
|
|
|
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; }
|
|
@@ -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
|
|
|
4
4
|
const postTogglebuttonCss = ":host{cursor:pointer;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}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}";
|
|
5
5
|
|
|
@@ -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; }
|
|
@@ -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 { e as checkEmptyOrType } from './p-CV7fm1rW.js';
|
|
4
|
-
import { v as version$1 } from './p-
|
|
4
|
+
import { v as version$1 } from './p-DO48NanC.js';
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
@@ -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 {
|
|
@@ -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-DO48NanC.js';
|
|
3
3
|
import { d as checkEmptyOrOneOf } from './p-CV7fm1rW.js';
|
|
4
4
|
import './p-CJ80BZ06.js';
|
|
5
|
-
import { d as defineCustomElement$2, a as PLACEMENT_TYPES } from './p-
|
|
5
|
+
import { d as defineCustomElement$2, a as PLACEMENT_TYPES } from './p-BS0ZqwA-.js';
|
|
6
6
|
|
|
7
7
|
const postTooltipCss = ":host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:\"\";inset:-13px;z-index:-1}post-popovercontainer>div{color:var(--post-current-fg);background-color:var(--post-current-bg);padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:280px;min-height:32px;word-wrap:break-word;white-space:normal}";
|
|
8
8
|
|
|
@@ -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 {
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-
|
|
2
|
+
"timestamp": "2025-10-09T11:17:04",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.35.0",
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
"filePath": "src/components/post-avatar/post-avatar.tsx",
|
|
419
419
|
"encapsulation": "shadow",
|
|
420
420
|
"tag": "post-avatar",
|
|
421
|
-
"readme": "# post-avatar\n
|
|
421
|
+
"readme": "# post-avatar\n",
|
|
422
422
|
"docs": "",
|
|
423
423
|
"docsTags": [
|
|
424
424
|
{
|
|
@@ -428,6 +428,29 @@
|
|
|
428
428
|
],
|
|
429
429
|
"usage": {},
|
|
430
430
|
"props": [
|
|
431
|
+
{
|
|
432
|
+
"name": "description",
|
|
433
|
+
"type": "string",
|
|
434
|
+
"complexType": {
|
|
435
|
+
"original": "string",
|
|
436
|
+
"resolved": "string",
|
|
437
|
+
"references": {}
|
|
438
|
+
},
|
|
439
|
+
"mutable": false,
|
|
440
|
+
"attr": "description",
|
|
441
|
+
"reflectToAttr": false,
|
|
442
|
+
"docs": "Provides a custom description for the avatar, used for accessibility purposes.",
|
|
443
|
+
"docsTags": [],
|
|
444
|
+
"values": [
|
|
445
|
+
{
|
|
446
|
+
"type": "string"
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
"optional": true,
|
|
450
|
+
"required": false,
|
|
451
|
+
"getter": false,
|
|
452
|
+
"setter": false
|
|
453
|
+
},
|
|
431
454
|
{
|
|
432
455
|
"name": "email",
|
|
433
456
|
"type": "string",
|
|
@@ -2746,6 +2769,29 @@
|
|
|
2746
2769
|
],
|
|
2747
2770
|
"usage": {},
|
|
2748
2771
|
"props": [
|
|
2772
|
+
{
|
|
2773
|
+
"name": "label",
|
|
2774
|
+
"type": "string",
|
|
2775
|
+
"complexType": {
|
|
2776
|
+
"original": "string",
|
|
2777
|
+
"resolved": "string",
|
|
2778
|
+
"references": {}
|
|
2779
|
+
},
|
|
2780
|
+
"mutable": false,
|
|
2781
|
+
"attr": "label",
|
|
2782
|
+
"reflectToAttr": false,
|
|
2783
|
+
"docs": "An accessible name for the menu.",
|
|
2784
|
+
"docsTags": [],
|
|
2785
|
+
"values": [
|
|
2786
|
+
{
|
|
2787
|
+
"type": "string"
|
|
2788
|
+
}
|
|
2789
|
+
],
|
|
2790
|
+
"optional": true,
|
|
2791
|
+
"required": false,
|
|
2792
|
+
"getter": false,
|
|
2793
|
+
"setter": false
|
|
2794
|
+
},
|
|
2749
2795
|
{
|
|
2750
2796
|
"name": "placement",
|
|
2751
2797
|
"type": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
|
|
@@ -3702,16 +3748,16 @@
|
|
|
3702
3748
|
"events": [
|
|
3703
3749
|
{
|
|
3704
3750
|
"event": "postToggle",
|
|
3705
|
-
"detail": "boolean",
|
|
3751
|
+
"detail": "{ isOpen: boolean; first?: boolean; }",
|
|
3706
3752
|
"bubbles": true,
|
|
3707
3753
|
"complexType": {
|
|
3708
|
-
"original": "boolean",
|
|
3709
|
-
"resolved": "boolean",
|
|
3754
|
+
"original": "{ isOpen: boolean; first?: boolean }",
|
|
3755
|
+
"resolved": "{ isOpen: boolean; first?: boolean; }",
|
|
3710
3756
|
"references": {}
|
|
3711
3757
|
},
|
|
3712
3758
|
"cancelable": true,
|
|
3713
3759
|
"composed": true,
|
|
3714
|
-
"docs": "Fires whenever the popovercontainer gets shown or hidden, passing the
|
|
3760
|
+
"docs": "Fires whenever the popovercontainer gets shown or hidden, passing in event.detail an object containing two booleans: `isOpen`, which is true if the popovercontainer was opened and false if it was closed, and `first`, which is true if it was opened for the first time.",
|
|
3715
3761
|
"docsTags": []
|
|
3716
3762
|
}
|
|
3717
3763
|
],
|
package/dist/esm/loader.js
CHANGED
|
@@ -4,7 +4,7 @@ export { s as setNonce } from './index-C8a0ddDa.js';
|
|
|
4
4
|
const defineCustomElements = async (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
6
|
await globalScripts();
|
|
7
|
-
return bootstrapLazy([["post-breadcrumbs",[[1,"post-breadcrumbs",{"homeUrl":[1,"home-url"],"homeText":[1,"home-text"],"breadcrumbItems":[32],"isConcatenated":[32],"lastWindowWidth":[32]},null,{"homeUrl":["validateHomeUrl"],"homeText":["validateHomeText"]}]]],["post-footer",[[1,"post-footer",{"label":[1],"device":[32],"gridSlotDisplayed":[32]},null,{"label":["validateLabel"]}]]],["post-back-to-top",[[1,"post-back-to-top",{"label":[513],"belowFold":[32]},null,{"label":["validateLabel"],"belowFold":["watchBelowFold"]}]]],["post-card-control",[[65,"post-card-control",{"label":[513],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1028],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"description":["validateControlDescription"],"type":["validateControlType"],"name":["validateControlName"],"value":["validateControlValue"],"icon":["validateControlIcon"],"checked":["updateControlChecked"],"disabled":["updateControlDisabled"]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"closeButtonCaption":["validateCloseButtonCaption"]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]},null,{"label":["validateLabel"],"stars":["validateStars"],"currentRating":["validateCurrentRating"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"animation":[1],"open":[1540],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"]}]]],["post-avatar",[[1,"post-avatar",{"firstname":[513],"lastname":[1],"userid":[1],"email":[1],"slottedImage":[32],"avatarType":[32],"imageUrl":[32],"imageAlt":[32],"initials":[32],"storageKey":[32]},null,{"firstname":["validateFirstname"],"lastname":["validateLastname"],"userid":["updateUserid"],"email":["updateEmail"]}]]],["post-banner",[[1,"post-banner",{"type":[513],"hasActions":[32],"dismiss":[64]},[[0,"click","onCloseButtonClick"]],{"type":["validateType"]}]]],["post-linkarea",[[1,"post-linkarea"]]],["post-tab-header",[[1,"post-tab-header",{"panel":[513],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[513],"panelId":[32]},null,{"name":["validateName"]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"fullWidth":[516,"full-width"],"show":[64]}]]],["post-tooltip-trigger",[[1,"post-tooltip-trigger",{"for":[513],"delay":[2]},null,{"for":["validateControlFor"]}]]],["post-collapsible_2",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}],[1,"post-collapsible-trigger",{"for":[513],"update":[64]},null,{"for":["validateAriaAttributes"]}]]],["post-closebutton_15",[[1,"post-language-switch",{"caption":[1],"description":[1],"variant":[1],"activeLang":[32]},[[0,"postChange","handlePostChange"],[0,"postLanguageOptionInitiallyActive","handleInitiallyActive"]],{"caption":["validateCaption"],"description":["validateDescription"],"variant":["validateVariant"]}],[1,"post-closebutton"],[4,"post-mainnavigation",{"canScrollLeft":[32],"canScrollRight":[32]},[[9,"mouseup","stopScrolling"],[9,"mouseleave","stopScrolling"]]],[1,"post-header",{"device":[32],"hasNavigation":[32],"mobileMenuExtended":[32],"megadropdownOpen":[32],"toggleMobileMenu":[64]},null,{"device":["lockBody"],"mobileMenuExtended":["lockBody"]}],[4,"post-language-option",{"code":[1],"active":[1540],"variant":[1],"name":[1],"url":[1],"select":[64]},null,{"code":["validateCode"],"variant":["validateVariant"],"name":["validateName"],"url":["validateUrl"]}],[4,"post-list",{"titleHidden":[4,"title-hidden"],"horizontal":[516],"titleId":[32]}],[1,"post-list-item"],[1,"post-logo",{"url":[1]},null,{"url":["validateUrl"]}],[4,"post-megadropdown",{"device":[32],"isVisible":[32],"animationClass":[32],"toggle":[64],"show":[64],"hide":[64],"focusFirst":[64]}],[4,"post-megadropdown-trigger",{"for":[1],"ariaExpanded":[32]},null,{"for":["validateControlFor"]}],[1,"post-togglebutton",{"toggled":[1028]}],[1,"post-menu",{"placement":[1],"isVisible":[32],"toggle":[64],"show":[64],"hide":[64]},null,{"placement":["validatePlacement"]}],[4,"post-menu-trigger",{"for":[513],"ariaExpanded":[32]},null,{"for":["validateControlFor"]}],[4,"post-popovercontainer",{"placement":[1],"edgeGap":[2,"edge-gap"],"animation":[1],"arrow":[4],"manualClose":[4,"manual-close"],"safeSpace":[513,"safe-space"],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"edgeGap":["validateEdgeGap"],"safeSpace":["validateSafeSpace"]}],[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[513],"rotate":[2],"scale":[2]},null,{"animation":["validateAnimation"],"base":["validateBase"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]],["post-accordion_2",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"slottedLogo":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}],[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-breadcrumb-item_2",[[1,"post-breadcrumb-item",{"url":[1],"fullUrl":[32]},null,{"url":["validateUrl"]}],[4,"post-menu-item"]]]], options);
|
|
7
|
+
return bootstrapLazy([["post-breadcrumbs",[[1,"post-breadcrumbs",{"homeUrl":[1,"home-url"],"homeText":[1,"home-text"],"breadcrumbItems":[32],"isConcatenated":[32],"lastWindowWidth":[32]},null,{"homeUrl":["validateHomeUrl"],"homeText":["validateHomeText"]}]]],["post-footer",[[1,"post-footer",{"label":[1],"device":[32],"gridSlotDisplayed":[32]},null,{"label":["validateLabel"]}]]],["post-back-to-top",[[1,"post-back-to-top",{"label":[513],"belowFold":[32]},null,{"label":["validateLabel"],"belowFold":["watchBelowFold"]}]]],["post-card-control",[[65,"post-card-control",{"label":[513],"description":[1],"type":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[1028],"validity":[1028],"icon":[1],"focused":[32],"reset":[64],"groupReset":[64]},null,{"label":["validateControlLabel"],"description":["validateControlDescription"],"type":["validateControlType"],"name":["validateControlName"],"value":["validateControlValue"],"icon":["validateControlIcon"],"checked":["updateControlChecked"],"disabled":["updateControlDisabled"]}]]],["post-popover",[[1,"post-popover",{"placement":[1],"closeButtonCaption":[1,"close-button-caption"],"arrow":[4],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"closeButtonCaption":["validateCloseButtonCaption"]}]]],["post-rating",[[1,"post-rating",{"label":[1],"stars":[2],"currentRating":[1026,"current-rating"],"readonly":[4],"hoveredIndex":[32]},null,{"label":["validateLabel"],"stars":["validateStars"],"currentRating":["validateCurrentRating"]}]]],["post-tooltip",[[1,"post-tooltip",{"placement":[1],"arrow":[4],"animation":[1],"open":[1540],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"]}]]],["post-avatar",[[1,"post-avatar",{"firstname":[513],"lastname":[1],"userid":[1],"email":[1],"description":[1],"slottedImage":[32],"avatarType":[32],"imageUrl":[32],"imageAlt":[32],"initials":[32],"storageKey":[32]},null,{"firstname":["validateFirstname"],"lastname":["validateLastname"],"userid":["updateUserid"],"email":["updateEmail"],"description":["validateDescription"]}]]],["post-banner",[[1,"post-banner",{"type":[513],"hasActions":[32],"dismiss":[64]},[[0,"click","onCloseButtonClick"]],{"type":["validateType"]}]]],["post-linkarea",[[1,"post-linkarea",{"interactiveElements":[32]}]]],["post-tab-header",[[1,"post-tab-header",{"panel":[513],"tabId":[32]},null,{"panel":["validateFor"]}]]],["post-tab-panel",[[1,"post-tab-panel",{"name":[513],"panelId":[32]},null,{"name":["validateName"]}]]],["post-tabs",[[1,"post-tabs",{"activePanel":[1,"active-panel"],"fullWidth":[516,"full-width"],"show":[64]}]]],["post-tooltip-trigger",[[1,"post-tooltip-trigger",{"for":[513],"delay":[2]},null,{"for":["validateControlFor"]}]]],["post-collapsible_2",[[1,"post-collapsible",{"collapsed":[1028],"toggle":[64]},null,{"collapsed":["collapsedChange"]}],[1,"post-collapsible-trigger",{"for":[513],"update":[64]},null,{"for":["validateAriaAttributes"]}]]],["post-closebutton_15",[[1,"post-language-switch",{"caption":[1],"description":[1],"variant":[1],"activeLang":[32]},[[0,"postChange","handlePostChange"],[0,"postLanguageOptionInitiallyActive","handleInitiallyActive"]],{"caption":["validateCaption"],"description":["validateDescription"],"variant":["validateVariant"]}],[1,"post-closebutton"],[4,"post-mainnavigation",{"canScrollLeft":[32],"canScrollRight":[32]},[[9,"mouseup","stopScrolling"],[9,"mouseleave","stopScrolling"]]],[1,"post-header",{"device":[32],"hasNavigation":[32],"hasTitle":[32],"mobileMenuExtended":[32],"megadropdownOpen":[32],"toggleMobileMenu":[64]},null,{"device":["lockBody"],"mobileMenuExtended":["lockBody"]}],[4,"post-language-option",{"code":[1],"active":[1540],"variant":[1],"name":[1],"url":[1],"select":[64]},null,{"code":["validateCode"],"variant":["validateVariant"],"name":["validateName"],"url":["validateUrl"]}],[4,"post-list",{"titleHidden":[4,"title-hidden"],"horizontal":[516],"titleId":[32]}],[1,"post-list-item"],[1,"post-logo",{"url":[1]},null,{"url":["validateUrl"]}],[4,"post-megadropdown",{"device":[32],"isVisible":[32],"trigger":[32],"animationClass":[32],"toggle":[64],"show":[64],"hide":[64],"focusFirst":[64]}],[4,"post-megadropdown-trigger",{"for":[1],"ariaExpanded":[32]},null,{"for":["validateControlFor"]}],[1,"post-togglebutton",{"toggled":[1028]}],[1,"post-menu",{"placement":[1],"label":[1],"isVisible":[32],"toggle":[64],"show":[64],"hide":[64]},null,{"placement":["validatePlacement"]}],[4,"post-menu-trigger",{"for":[513],"ariaExpanded":[32]},null,{"for":["validateControlFor"]}],[4,"post-popovercontainer",{"placement":[1],"edgeGap":[2,"edge-gap"],"animation":[1],"arrow":[4],"manualClose":[4,"manual-close"],"safeSpace":[513,"safe-space"],"show":[64],"hide":[64],"toggle":[64]},null,{"placement":["validatePlacement"],"edgeGap":["validateEdgeGap"],"safeSpace":["validateSafeSpace"]}],[1,"post-icon",{"animation":[1],"base":[1],"flipH":[4,"flip-h"],"flipV":[4,"flip-v"],"name":[513],"rotate":[2],"scale":[2]},null,{"animation":["validateAnimation"],"base":["validateBase"],"name":["validateName"],"rotate":["validateRotate"],"scale":["validateScale"]}]]],["post-accordion_2",[[1,"post-accordion-item",{"collapsed":[1028],"headingLevel":[2,"heading-level"],"id":[32],"slottedLogo":[32],"toggle":[64]},[[2,"postToggle","onCollapseToggle"]],{"headingLevel":["validateHeadingLevel"]}],[1,"post-accordion",{"headingLevel":[2,"heading-level"],"multiple":[4],"toggle":[64],"expandAll":[64],"collapseAll":[64]},[[0,"postToggle","collapseToggleHandler"]],{"headingLevel":["validateHeadingLevel"]}]]],["post-breadcrumb-item_2",[[1,"post-breadcrumb-item",{"url":[1],"fullUrl":[32]},null,{"url":["validateUrl"]}],[4,"post-menu-item"]]]], options);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-C8a0ddDa.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-DO48NanC.js';
|
|
3
3
|
import { b as checkRequiredAndOneOf, d as checkEmptyOrOneOf } from './index-VmK3ABCB.js';
|
|
4
4
|
import './breakpoints-_0G7tavk.js';
|
|
5
5
|
import { E as EventFrom } from './event-from-kraHE1r3.js';
|
|
@@ -7,7 +7,7 @@ import { n as nanoid } from './index.browser-BLchVpF6.js';
|
|
|
7
7
|
|
|
8
8
|
const HEADING_LEVELS = [1, 2, 3, 4, 5, 6];
|
|
9
9
|
|
|
10
|
-
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)}
|
|
10
|
+
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)}";
|
|
11
11
|
|
|
12
12
|
var __decorate$1 = (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;
|
|
@@ -114,7 +114,7 @@ __decorate$1([
|
|
|
114
114
|
], PostAccordion.prototype, "collapseToggleHandler", null);
|
|
115
115
|
PostAccordion.style = postAccordionCss;
|
|
116
116
|
|
|
117
|
-
const postAccordionItemCss = ".accordion-item::after{display:block;content:\"\";margin-block-start:calc(var(--post-device-border-width-default)*-1);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-item:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-item:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black)}.accordion-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;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;inset-block-end:auto;border-block-start-width:var(--post-
|
|
117
|
+
const postAccordionItemCss = ".accordion-item::after{display:block;content:\"\";margin-block-start:calc(var(--post-device-border-width-default)*-1);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-item:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-item:has(.accordion-button:hover)::after{border-color:Highlight}}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black)}.accordion-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;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;inset-block-end:auto;border-block-start-width:var(--post-device-border-width-default);border-block-start-style:var(--post-core-border-style-solid);border-block-start-color:var(--post-scheme-color-interactive-primary-enabled-stroke)}.accordion-button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}";
|
|
118
118
|
|
|
119
119
|
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
120
120
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-C8a0ddDa.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-DO48NanC.js';
|
|
3
3
|
import { c as checkRequiredAndType, a as checkEmptyOrType, e as checkEmptyOrPattern } from './index-VmK3ABCB.js';
|
|
4
4
|
import './breakpoints-_0G7tavk.js';
|
|
5
5
|
|
|
@@ -7,9 +7,16 @@ import './breakpoints-_0G7tavk.js';
|
|
|
7
7
|
const GRAVATAR_DEFAULT = '404';
|
|
8
8
|
const GRAVATAR_RATING = 'g';
|
|
9
9
|
const GRAVATAR_SIZE = 80;
|
|
10
|
+
async function cryptify(key) {
|
|
11
|
+
return await crypto.subtle.digest('SHA-256', new TextEncoder().encode(key)).then(buffer => {
|
|
12
|
+
return Array.from(new Uint8Array(buffer))
|
|
13
|
+
.map(bytes => bytes.toString(16).padStart(2, '0'))
|
|
14
|
+
.join('');
|
|
15
|
+
});
|
|
16
|
+
}
|
|
10
17
|
const GRAVATAR_BASE_URL = `https://www.gravatar.com/avatar/{email}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
|
|
11
18
|
|
|
12
|
-
const postAvatarCss = "
|
|
19
|
+
const postAvatarCss = ":host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:\"\";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;z-index:2;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase}.initials span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
13
20
|
|
|
14
21
|
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
15
22
|
var AvatarType;
|
|
@@ -43,6 +50,9 @@ const PostAvatar = class {
|
|
|
43
50
|
this.validateEmail();
|
|
44
51
|
this.getAvatarImage();
|
|
45
52
|
}
|
|
53
|
+
validateDescription() {
|
|
54
|
+
checkEmptyOrType(this, 'description', 'string');
|
|
55
|
+
}
|
|
46
56
|
validateUserId() {
|
|
47
57
|
checkEmptyOrType(this, 'userid', 'string');
|
|
48
58
|
}
|
|
@@ -62,14 +72,14 @@ const PostAvatar = class {
|
|
|
62
72
|
imageLoaded = await this.getImageByProp(this.email, this.fetchImageByEmail.bind(this));
|
|
63
73
|
}
|
|
64
74
|
if (!imageLoaded) {
|
|
65
|
-
this.
|
|
75
|
+
this.avatarType = AvatarType.Initials;
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
else {
|
|
69
79
|
const slottedImageLoaded = await this.getImageByProp(imageUrl, this.fetchSlottedImage.bind(this));
|
|
70
80
|
if (!slottedImageLoaded) {
|
|
71
81
|
this.slottedImage.style.display = 'none';
|
|
72
|
-
this.
|
|
82
|
+
this.avatarType = AvatarType.Initials;
|
|
73
83
|
}
|
|
74
84
|
else {
|
|
75
85
|
this.slottedImage.style.display = 'block';
|
|
@@ -101,33 +111,13 @@ const PostAvatar = class {
|
|
|
101
111
|
return await fetch(PostAvatar.INTERNAL_USERID_IMAGE_SRC.replace('{userid}', encodeURIComponent(this.userid)));
|
|
102
112
|
}
|
|
103
113
|
async fetchImageByEmail() {
|
|
104
|
-
const email = await
|
|
114
|
+
const email = await cryptify(this.email);
|
|
105
115
|
const imageUrl = GRAVATAR_BASE_URL.replace('{email}', email);
|
|
106
116
|
return await fetch(imageUrl);
|
|
107
117
|
}
|
|
108
118
|
async fetchSlottedImage(imageUrl) {
|
|
109
119
|
return await fetch(imageUrl, { method: 'HEAD' });
|
|
110
120
|
}
|
|
111
|
-
getAvatarInitials() {
|
|
112
|
-
this.initials = this.getInitials();
|
|
113
|
-
this.avatarType = AvatarType.Initials;
|
|
114
|
-
}
|
|
115
|
-
getNames() {
|
|
116
|
-
return [this.firstname, this.lastname].filter(n => n);
|
|
117
|
-
}
|
|
118
|
-
getInitials() {
|
|
119
|
-
return this.getNames()
|
|
120
|
-
.map(n => n.charAt(0))
|
|
121
|
-
.join('')
|
|
122
|
-
.trim();
|
|
123
|
-
}
|
|
124
|
-
async cryptify(key) {
|
|
125
|
-
return await crypto.subtle.digest('SHA-256', new TextEncoder().encode(key)).then(buffer => {
|
|
126
|
-
return Array.from(new Uint8Array(buffer))
|
|
127
|
-
.map(bytes => bytes.toString(16).padStart(2, '0'))
|
|
128
|
-
.join('');
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
121
|
slotChanged() {
|
|
132
122
|
const slot = this.host.shadowRoot.querySelector('slot');
|
|
133
123
|
const assignedNodes = slot?.assignedNodes({ flatten: true }) || [];
|
|
@@ -157,32 +147,32 @@ const PostAvatar = class {
|
|
|
157
147
|
}
|
|
158
148
|
connectedCallback() {
|
|
159
149
|
//This provides a fallback by showing the initials while the image is still loading or delayed.
|
|
160
|
-
this.
|
|
150
|
+
this.avatarType = AvatarType.Initials;
|
|
161
151
|
this.getAvatarImage();
|
|
162
152
|
}
|
|
163
153
|
componentDidLoad() {
|
|
164
154
|
this.validateFirstname();
|
|
165
155
|
this.validateLastname();
|
|
156
|
+
this.validateDescription();
|
|
166
157
|
this.validateUserId();
|
|
167
158
|
this.validateEmail();
|
|
168
159
|
}
|
|
169
160
|
render() {
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}, []);
|
|
178
|
-
return (h(Host, { "data-version": version }, h("span", { class: this.avatarType === 'slotted' ? '' : 'd-none' }, h("slot", { onSlotchange: this.slotChanged.bind(this) })), this.avatarType === 'image' && h("img", { src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && h("div", { class: "initials" }, initials)));
|
|
161
|
+
const names = [this.firstname, this.lastname].filter(n => n).map(n => n.trim());
|
|
162
|
+
const initials = names
|
|
163
|
+
.map(n => n.charAt(0))
|
|
164
|
+
.join('')
|
|
165
|
+
.trim();
|
|
166
|
+
const fullname = names.join(' ');
|
|
167
|
+
return (h(Host, { key: '9e596623d1949c62b1f110e311b839d244b249ef', "data-version": version }, h("span", { key: '6722e4096cb0d2f8b5d171f0d84fef98f74e1cd7', class: this.avatarType === 'slotted' ? '' : 'd-none' }, h("slot", { key: '95e8809133eb0de4382e9dc521eda877a6be5a8b', onSlotchange: this.slotChanged.bind(this) })), this.avatarType === 'image' && h("img", { key: 'cb2ed3eab02f28369911997a94617efaeaa5c00a', src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && (h("span", { key: '5565b06795c4651537b20e9abd33492d7cb8a9d1', class: "initials" }, initials, h("span", { key: '58ac3ee3a664a13ff82fc201e04e1896e409fbf1' }, this.description ?? fullname)))));
|
|
179
168
|
}
|
|
180
169
|
get host() { return getElement(this); }
|
|
181
170
|
static get watchers() { return {
|
|
182
171
|
"firstname": ["validateFirstname"],
|
|
183
172
|
"lastname": ["validateLastname"],
|
|
184
173
|
"userid": ["updateUserid"],
|
|
185
|
-
"email": ["updateEmail"]
|
|
174
|
+
"email": ["updateEmail"],
|
|
175
|
+
"description": ["validateDescription"]
|
|
186
176
|
}; }
|
|
187
177
|
};
|
|
188
178
|
PostAvatar.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-C8a0ddDa.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-DO48NanC.js';
|
|
3
3
|
import { c as checkRequiredAndType } from './index-VmK3ABCB.js';
|
|
4
4
|
import './breakpoints-_0G7tavk.js';
|
|
5
5
|
|
|
@@ -101,7 +101,7 @@ const PostBackToTop = class {
|
|
|
101
101
|
window.removeEventListener('scroll', this.handleScroll);
|
|
102
102
|
}
|
|
103
103
|
render() {
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: '51abef7d1f650da1476689c46d853f49669da856', "data-version": version }, h("button", { key: '9de175f7962448fa3d658e4a24b01a857925a5b7', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: '281a177c37cbf98d72a0d6359483750762026b23', "aria-hidden": "true", name: "3026" }), h("span", { key: '9c019806112c905bb6ba2e8ac4da85bcbd334566', class: "visually-hidden" }, this.label))));
|
|
105
105
|
}
|
|
106
106
|
get host() { return getElement(this); }
|
|
107
107
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-C8a0ddDa.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-DO48NanC.js';
|
|
3
3
|
import { f as fadeOut } from './fade-SbIC4aZX.js';
|
|
4
4
|
import { d as checkEmptyOrOneOf } from './index-VmK3ABCB.js';
|
|
5
5
|
import './breakpoints-_0G7tavk.js';
|
|
@@ -59,7 +59,7 @@ const PostBanner = class {
|
|
|
59
59
|
this.hasActions = this.host.querySelectorAll('[slot="actions"]').length > 0;
|
|
60
60
|
}
|
|
61
61
|
render() {
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '19641b12825c94a231efe578e88311b472f0eb42', "data-version": version, role: "alert" }, h("slot", { key: '04b74f66a745c6129bcb10d09f04a62c91a70152', name: "close-button" }), h("slot", { key: '88bb29ea3a03832a5bea94a8debe70a403301cd2', name: "heading" }), h("slot", { key: 'd55f25fb5b80c39cbf0b30cd1ede9dc9468976ae' }), this.hasActions && (h("div", { key: '01b5f090073200b760de83345190606a4ef10bc3', class: "actions" }, h("slot", { key: '3fe63a04145402158c3c3e5028ec6d1c0d85f161', name: "actions" })))));
|
|
63
63
|
}
|
|
64
64
|
get host() { return getElement(this); }
|
|
65
65
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-C8a0ddDa.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-DO48NanC.js';
|
|
3
3
|
import { g as checkEmptyOrUrl } from './index-VmK3ABCB.js';
|
|
4
4
|
import './breakpoints-_0G7tavk.js';
|
|
5
5
|
|
|
@@ -41,7 +41,7 @@ const PostBreadcrumbItem = class {
|
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
43
|
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: '9ccdcf67335a106fd70e1d756a941736827454c0', "data-version": version }, h("post-icon", { key: 'e0c9479626737582764a4ecd55612d3d9ee4ae21', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '75f7b88edee2dda2907429c3c1ab55efe9e5137b', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: '1e59f84b6a9fd8b73372371e79fff43e44bd88c6' }))));
|
|
45
45
|
}
|
|
46
46
|
get host() { return getElement(this); }
|
|
47
47
|
static get watchers() { return {
|
|
@@ -57,7 +57,7 @@ const PostMenuItem = class {
|
|
|
57
57
|
registerInstance(this, hostRef);
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '9d6015291b82728739de4263a62a59ad4a99c94d', "data-version": version }, h("slot", { key: '51f5ff356cddffc806639cc343437500f898065e' })));
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
PostMenuItem.style = postMenuItemCss;
|