@swisspost/design-system-components 10.0.0-next.70 → 10.0.0-next.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/breakpoints-B0Olgvgc.js +206 -0
- package/dist/cjs/component-on-ready-CifOTqw1.js +24 -0
- package/dist/cjs/create-validator-decorator-Bnx17kwi.js +223 -0
- package/dist/cjs/{focusable-ZqET_zrB.js → focusable-COT2uiEV.js} +25 -4
- package/dist/cjs/{index-DPdHkdGf.js → index-ngUOBQot.js} +17 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nanoid-CmjyF1Cm.js +20 -0
- package/dist/cjs/one-of-BHyX4vYq.js +27 -0
- package/dist/cjs/{package-Ds_LS1pB.js → package-Bi-tiNRc.js} +1 -1
- package/dist/cjs/pattern-BgBx5zGQ.js +27 -0
- package/dist/cjs/post-accordion_2.cjs.entry.js +18 -24
- package/dist/cjs/post-autocomplete.cjs.entry.js +27 -14
- package/dist/cjs/post-avatar.cjs.entry.js +33 -54
- package/dist/cjs/post-back-to-top.cjs.entry.js +21 -12
- package/dist/cjs/post-banner.cjs.entry.js +9 -14
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +48 -41
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +106 -105
- package/dist/cjs/post-closebutton_14.cjs.entry.js +257 -288
- package/dist/cjs/post-collapsible_2.cjs.entry.js +57 -40
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +154 -144
- package/dist/cjs/post-footer.cjs.entry.js +26 -19
- package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
- package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
- package/dist/cjs/post-listbox.cjs.entry.js +4 -6
- package/dist/cjs/post-login-widget.cjs.entry.js +35 -3
- package/dist/cjs/post-number-input.cjs.entry.js +6 -6
- package/dist/cjs/post-pagination.cjs.entry.js +53 -83
- package/dist/cjs/post-popover-trigger.cjs.entry.js +22 -19
- package/dist/cjs/post-popover.cjs.entry.js +25 -23
- package/dist/cjs/post-progressbar.cjs.entry.js +147 -0
- package/dist/cjs/post-rating.cjs.entry.js +34 -35
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +49 -38
- package/dist/cjs/post-tab-item.cjs.entry.js +23 -15
- package/dist/cjs/post-tab-panel.cjs.entry.js +23 -16
- package/dist/cjs/post-tabs.cjs.entry.js +24 -30
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +34 -21
- package/dist/cjs/post-tooltip.cjs.entry.js +19 -16
- package/dist/cjs/required-lRDOdbd6.js +44 -0
- package/dist/cjs/type-shT641Eo.js +30 -0
- package/dist/cjs/url-DRUMqVBq.js +34 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/post-accordion/post-accordion.js +11 -8
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -18
- package/dist/collection/components/post-autocomplete/post-autocomplete.js +23 -13
- package/dist/collection/components/post-avatar/avatar-utils.js +2 -2
- package/dist/collection/components/post-avatar/post-avatar.js +29 -72
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +17 -10
- package/dist/collection/components/post-banner/post-banner.js +7 -14
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +92 -47
- package/dist/collection/components/post-breadcrumb-item/variants.js +1 -0
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +110 -114
- package/dist/collection/components/post-closebutton/post-closebutton.js +24 -27
- package/dist/collection/components/post-collapsible/post-collapsible.js +26 -16
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +34 -30
- package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +64 -96
- package/dist/collection/components/post-footer/post-footer.js +17 -13
- package/dist/collection/components/post-header/post-header.js +18 -24
- package/dist/collection/components/post-icon/post-icon.js +36 -48
- package/dist/collection/components/post-language-menu/post-language-menu.js +16 -22
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.js +28 -39
- package/dist/collection/components/post-linkarea/post-linkarea.js +2 -2
- package/dist/collection/components/post-listbox/post-listbox.js +3 -5
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +3 -3
- package/dist/collection/components/post-login-widget/post-login-widget.css +1 -0
- package/dist/collection/components/post-login-widget/post-login-widget.js +103 -5
- package/dist/collection/components/post-logo/post-logo.js +16 -13
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +17 -13
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +24 -23
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +7 -15
- package/dist/collection/components/post-menu/post-menu.js +14 -24
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +17 -13
- package/dist/collection/components/post-number-input/post-number-input.js +5 -5
- package/dist/collection/components/post-pagination/post-pagination.js +47 -83
- package/dist/collection/components/post-popover/post-popover.js +20 -22
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +16 -14
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +28 -34
- package/dist/collection/components/post-progressbar/post-progressbar.css +1 -0
- package/dist/collection/components/post-progressbar/post-progressbar.js +136 -0
- package/dist/collection/components/post-rating/post-rating.js +25 -29
- package/dist/collection/components/post-stepper/post-stepper.js +44 -36
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +2 -2
- package/dist/collection/components/post-tab-item/post-tab-item.js +17 -13
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +17 -14
- package/dist/collection/components/post-tabs/post-tabs.js +20 -7
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +5 -3
- package/dist/collection/components/post-tooltip/post-tooltip.js +17 -16
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +30 -19
- package/dist/collection/hydrate-stub/index.stub.js +5 -0
- package/dist/collection/test-setup.js +7 -0
- package/dist/collection/utils/index.js +4 -3
- package/dist/collection/utils/is-value-empty.js +1 -1
- package/dist/collection/utils/locales.js +9 -2
- package/dist/collection/utils/nanoid.js +16 -0
- package/dist/collection/utils/property-decorators/array-of.js +22 -0
- package/dist/collection/utils/property-decorators/bound.js +75 -0
- package/dist/collection/utils/property-decorators/create-validator-decorator.js +211 -0
- package/dist/collection/utils/property-decorators/date.js +21 -0
- package/dist/collection/utils/property-decorators/index.js +9 -0
- package/dist/collection/utils/property-decorators/iso-date.js +21 -0
- package/dist/collection/utils/property-decorators/one-of.js +22 -0
- package/dist/collection/utils/property-decorators/pattern.js +22 -0
- package/dist/collection/utils/property-decorators/required.js +40 -0
- package/dist/collection/utils/property-decorators/type.js +25 -0
- package/dist/collection/utils/property-decorators/url.js +29 -0
- package/dist/component-names.json +1 -0
- package/dist/components/breakpoints.js +1 -0
- package/dist/components/component-on-ready.js +1 -0
- package/dist/components/focusable.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/nanoid.js +1 -0
- package/dist/components/one-of.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/pattern.js +1 -0
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/post-autocomplete.js +1 -1
- package/dist/components/post-avatar.js +1 -1
- package/dist/components/post-avatar2.js +1 -0
- package/dist/components/post-back-to-top.js +1 -1
- package/dist/components/post-banner.js +1 -1
- package/dist/components/post-breadcrumb-item.js +1 -1
- package/dist/components/post-breadcrumbs.js +1 -1
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -1
- package/dist/components/post-collapsible2.js +1 -1
- package/dist/components/post-date-picker.js +1 -1
- package/dist/components/post-footer.js +1 -1
- package/dist/components/post-header.js +1 -1
- package/dist/components/post-icon2.js +1 -1
- package/dist/components/post-language-menu-item.js +1 -1
- package/dist/components/post-language-menu.js +1 -1
- package/dist/components/post-linkarea.js +1 -1
- package/dist/components/post-listbox-option.js +1 -1
- package/dist/components/post-listbox.js +1 -1
- package/dist/components/post-login-widget.js +1 -1
- package/dist/components/post-logo.js +1 -1
- package/dist/components/post-mainnavigation.js +1 -1
- package/dist/components/post-megadropdown-trigger.js +1 -1
- package/dist/components/post-megadropdown.js +1 -1
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +1 -1
- package/dist/components/post-menu2.js +1 -1
- package/dist/components/post-number-input.js +1 -1
- package/dist/components/post-pagination.js +1 -1
- package/dist/components/post-popover-trigger.js +1 -1
- package/dist/components/post-popover.js +1 -1
- package/dist/components/post-popovercontainer2.js +1 -1
- package/dist/components/post-progressbar.d.ts +11 -0
- package/dist/components/post-progressbar.js +1 -0
- package/dist/components/post-rating.js +1 -1
- package/dist/components/post-stepper-item.js +1 -1
- package/dist/components/post-stepper.js +1 -1
- package/dist/components/post-tab-item.js +1 -1
- package/dist/components/post-tab-panel.js +1 -1
- package/dist/components/post-tabs.js +1 -1
- package/dist/components/post-togglebutton2.js +1 -1
- package/dist/components/post-tooltip-trigger.js +1 -1
- package/dist/components/post-tooltip.js +1 -1
- package/dist/components/react/index.js +1 -1
- package/dist/components/react/p-4wtxqxXu.js +1 -0
- package/dist/components/react/p-85IGlhtB.js +1 -0
- package/dist/components/react/p-8LXe8Zt_.js +1 -0
- package/dist/components/react/p-B9ZFuYey.js +1 -0
- package/dist/components/react/p-BXqGI600.js +1 -0
- package/dist/components/react/p-BZSAV0-K.js +1 -0
- package/dist/components/react/p-B_WnO-QF.js +1 -0
- package/dist/components/react/p-BaB8wJvk.js +1 -0
- package/dist/components/react/p-Bg9dtyzK.js +1 -0
- package/dist/components/react/p-Bji_4dfL.js +1 -0
- package/dist/components/react/p-Bn66acGG.js +1 -0
- package/dist/components/react/p-BrY4VWTQ.js +1 -0
- package/dist/components/react/p-Bu2JeHDf.js +1 -0
- package/dist/components/react/p-BxoRVIIr.js +1 -0
- package/dist/components/react/p-CX2E_IXB.js +1 -0
- package/dist/components/react/p-Cd1TsNm7.js +1 -0
- package/dist/components/react/p-CkTAQJGd.js +1 -0
- package/dist/components/react/p-ClG-N42b.js +1 -0
- package/dist/components/react/p-D1zw8FxT.js +1 -0
- package/dist/components/react/p-DwuW52g5.js +1 -0
- package/dist/components/react/p-PM7l--ff.js +1 -0
- package/dist/components/react/p-lpWRZjJp.js +1 -0
- package/dist/components/react/post-accordion-item.js +1 -1
- package/dist/components/react/post-accordion.js +1 -1
- package/dist/components/react/post-autocomplete.js +1 -1
- package/dist/components/react/post-avatar.js +1 -1
- package/dist/components/react/post-back-to-top.js +1 -1
- package/dist/components/react/post-banner.js +1 -1
- package/dist/components/react/post-breadcrumb-item.js +1 -1
- package/dist/components/react/post-breadcrumbs.js +1 -1
- package/dist/components/react/post-closebutton.js +1 -1
- package/dist/components/react/post-collapsible-trigger.js +1 -1
- package/dist/components/react/post-collapsible.js +1 -1
- package/dist/components/react/post-date-picker.js +1 -1
- package/dist/components/react/post-footer.js +1 -1
- package/dist/components/react/post-header.js +1 -1
- package/dist/components/react/post-icon.js +1 -1
- package/dist/components/react/post-language-menu-item.js +1 -1
- package/dist/components/react/post-language-menu.js +1 -1
- package/dist/components/react/post-linkarea.js +1 -1
- package/dist/components/react/post-listbox-option.js +1 -1
- package/dist/components/react/post-listbox.js +1 -1
- package/dist/components/react/post-login-widget.js +1 -1
- package/dist/components/react/post-logo.js +1 -1
- package/dist/components/react/post-mainnavigation.js +1 -1
- package/dist/components/react/post-megadropdown-trigger.js +1 -1
- package/dist/components/react/post-megadropdown.js +1 -1
- 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-number-input.js +1 -1
- package/dist/components/react/post-pagination.js +1 -1
- package/dist/components/react/post-popover-trigger.js +1 -1
- package/dist/components/react/post-popover.js +1 -1
- package/dist/components/react/post-popovercontainer.js +1 -1
- package/dist/components/react/post-progressbar.d.ts +11 -0
- package/dist/components/react/post-progressbar.js +1 -0
- package/dist/components/react/post-rating.js +1 -1
- package/dist/components/react/post-stepper-item.js +1 -1
- package/dist/components/react/post-stepper.js +1 -1
- package/dist/components/react/post-tab-item.js +1 -1
- package/dist/components/react/post-tab-panel.js +1 -1
- package/dist/components/react/post-tabs.js +1 -1
- package/dist/components/react/post-togglebutton.js +1 -1
- package/dist/components/react/post-tooltip-trigger.js +1 -1
- package/dist/components/react/post-tooltip.js +1 -1
- package/dist/components/required.js +1 -0
- package/dist/components/type.js +1 -0
- package/dist/components/url.js +1 -0
- package/dist/docs.json +307 -72
- package/dist/esm/breakpoints-BQ3HlJPr.js +202 -0
- package/dist/esm/component-on-ready-lpWRZjJp.js +22 -0
- package/dist/esm/create-validator-decorator-D8qwF5Qe.js +218 -0
- package/dist/esm/{focusable-BD_WT2MO.js → focusable-C7afHKmo.js} +25 -5
- package/dist/esm/{index-DmAi35UF.js → index-BbDawWJ5.js} +17 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/nanoid-8LXe8Zt_.js +18 -0
- package/dist/esm/one-of-GPr3FflU.js +25 -0
- package/dist/esm/package-ClG-N42b.js +3 -0
- package/dist/esm/pattern-BWPRYpYv.js +25 -0
- package/dist/esm/post-accordion_2.entry.js +17 -23
- package/dist/esm/post-autocomplete.entry.js +27 -14
- package/dist/esm/post-avatar.entry.js +33 -54
- package/dist/esm/post-back-to-top.entry.js +21 -12
- package/dist/esm/post-banner.entry.js +9 -14
- package/dist/esm/post-breadcrumb-item.entry.js +48 -41
- package/dist/esm/post-breadcrumbs.entry.js +106 -105
- package/dist/esm/post-closebutton_14.entry.js +252 -283
- package/dist/esm/post-collapsible_2.entry.js +57 -40
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +151 -141
- package/dist/esm/post-footer.entry.js +21 -14
- package/dist/esm/post-linkarea.entry.js +3 -3
- package/dist/esm/post-listbox-option.entry.js +4 -4
- package/dist/esm/post-listbox.entry.js +4 -6
- package/dist/esm/post-login-widget.entry.js +35 -3
- package/dist/esm/post-number-input.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +52 -82
- package/dist/esm/post-popover-trigger.entry.js +20 -17
- package/dist/esm/post-popover.entry.js +25 -23
- package/dist/esm/post-progressbar.entry.js +145 -0
- package/dist/esm/post-rating.entry.js +29 -30
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +49 -38
- package/dist/esm/post-tab-item.entry.js +22 -14
- package/dist/esm/post-tab-panel.entry.js +22 -15
- package/dist/esm/post-tabs.entry.js +23 -29
- package/dist/esm/post-tooltip-trigger.entry.js +34 -21
- package/dist/esm/post-tooltip.entry.js +19 -16
- package/dist/esm/required-uK-rZZjy.js +42 -0
- package/dist/esm/type-obmwEgkM.js +28 -0
- package/dist/esm/url-B28ByZCe.js +32 -0
- package/dist/post-components/p-00f55af5.entry.js +1 -0
- package/dist/post-components/p-0288484f.entry.js +1 -0
- package/dist/post-components/p-07cdd022.entry.js +1 -0
- package/dist/post-components/{p-c2e05ba0.entry.js → p-12047216.entry.js} +1 -1
- package/dist/post-components/p-17df4e91.entry.js +1 -0
- package/dist/post-components/p-17e046fa.entry.js +1 -0
- package/dist/post-components/p-29bd31a0.entry.js +1 -0
- package/dist/post-components/p-2c6b4e6a.entry.js +1 -0
- package/dist/post-components/p-3b05e01d.entry.js +1 -0
- package/dist/post-components/p-53fd5230.entry.js +1 -0
- package/dist/post-components/p-5b7e6369.entry.js +1 -0
- package/dist/post-components/p-5f4ca179.entry.js +1 -0
- package/dist/post-components/p-62b6154a.entry.js +1 -0
- package/dist/post-components/{p-77d5e17b.entry.js → p-686a6e22.entry.js} +1 -1
- package/dist/post-components/p-758fc84f.entry.js +1 -0
- package/dist/post-components/{p-570d64dd.entry.js → p-7f929bb9.entry.js} +1 -1
- package/dist/post-components/p-8LXe8Zt_.js +1 -0
- package/dist/post-components/p-9865f72c.entry.js +1 -0
- package/dist/post-components/p-99803d57.entry.js +1 -0
- package/dist/post-components/p-BQ3HlJPr.js +1 -0
- package/dist/post-components/p-BRNqUiXj.js +1 -0
- package/dist/post-components/p-BbDawWJ5.js +2 -0
- package/dist/post-components/p-BrY4VWTQ.js +1 -0
- package/dist/post-components/p-CVsNfXZd.js +1 -0
- package/dist/post-components/p-Ck2qPht6.js +1 -0
- package/dist/post-components/p-ClG-N42b.js +1 -0
- package/dist/post-components/p-D4F0BqBW.js +1 -0
- package/dist/post-components/p-DSNGJB58.js +1 -0
- package/dist/post-components/p-IUnDBhPg.js +1 -0
- package/dist/post-components/p-a0e0a760.entry.js +1 -0
- package/dist/post-components/p-a850652d.entry.js +1 -0
- package/dist/post-components/p-aac1a8ea.entry.js +1 -0
- package/dist/post-components/{p-092f8795.entry.js → p-b3f0f9a2.entry.js} +1 -1
- package/dist/post-components/p-c37dba4b.entry.js +1 -0
- package/dist/post-components/p-d061773b.entry.js +1 -0
- package/dist/post-components/p-e2370e94.entry.js +1 -0
- package/dist/post-components/p-f1ca1d3f.entry.js +1 -0
- package/dist/post-components/p-f2e5f44e.entry.js +1 -0
- package/dist/post-components/p-ff98ada4.entry.js +1 -0
- package/dist/post-components/p-lpWRZjJp.js +1 -0
- package/dist/post-components/post-components.css +2 -2
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +0 -2
- package/dist/types/components/post-autocomplete/post-autocomplete.d.ts +0 -1
- package/dist/types/components/post-avatar/avatar-utils.d.ts +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +0 -13
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +0 -1
- package/dist/types/components/post-banner/post-banner.d.ts +0 -1
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +11 -11
- package/dist/types/components/post-breadcrumb-item/variants.d.ts +2 -0
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +20 -26
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +0 -3
- package/dist/types/components/post-collapsible/post-collapsible.d.ts +1 -2
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +3 -6
- package/dist/types/components/post-date-picker/post-date-picker.d.ts +0 -12
- package/dist/types/components/post-footer/post-footer.d.ts +0 -1
- package/dist/types/components/post-header/post-header.d.ts +0 -2
- package/dist/types/components/post-icon/post-icon.d.ts +0 -6
- package/dist/types/components/post-language-menu/post-language-menu.d.ts +1 -3
- package/dist/types/components/post-language-menu-item/post-language-menu-item.d.ts +0 -5
- package/dist/types/components/post-login-widget/post-login-widget.d.ts +17 -2
- package/dist/types/components/post-logo/post-logo.d.ts +0 -1
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +0 -1
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -3
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +0 -2
- package/dist/types/components/post-menu/post-menu.d.ts +1 -4
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +0 -1
- package/dist/types/components/post-pagination/post-pagination.d.ts +0 -17
- package/dist/types/components/post-popover/post-popover.d.ts +0 -3
- package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +0 -1
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +0 -3
- package/dist/types/components/post-progressbar/post-progressbar.d.ts +23 -0
- package/dist/types/components/post-rating/post-rating.d.ts +0 -4
- package/dist/types/components/post-stepper/post-stepper.d.ts +1 -4
- package/dist/types/components/post-tab-item/post-tab-item.d.ts +0 -1
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +0 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -3
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +1 -1
- package/dist/types/components.d.ts +119 -29
- package/dist/types/modules.d.ts +2 -0
- package/dist/types/utils/index.d.ts +4 -3
- package/dist/types/utils/nanoid.d.ts +8 -0
- package/dist/types/utils/property-decorators/array-of.d.ts +9 -0
- package/dist/types/utils/property-decorators/bound.d.ts +36 -0
- package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +48 -0
- package/dist/types/utils/property-decorators/date.d.ts +6 -0
- package/dist/types/utils/property-decorators/index.d.ts +9 -0
- package/dist/types/utils/property-decorators/iso-date.d.ts +6 -0
- package/dist/types/utils/property-decorators/one-of.d.ts +8 -0
- package/dist/types/utils/property-decorators/pattern.d.ts +8 -0
- package/dist/types/utils/property-decorators/required.d.ts +17 -0
- package/dist/types/utils/property-decorators/type.d.ts +9 -0
- package/dist/types/utils/property-decorators/url.d.ts +6 -0
- package/hydrate/index.js +1536 -115469
- package/hydrate/index.mjs +1536 -115469
- package/hydrate/index.stub.js +5 -0
- package/package.json +28 -18
- package/dist/cjs/index-YBj3gUJp.js +0 -114540
- package/dist/cjs/index-qCzRmwgB.js +0 -114
- package/dist/cjs/index.browser-BVb9l9T_.js +0 -16
- package/dist/collection/utils/property-checkers/check-array-of.js +0 -8
- package/dist/collection/utils/property-checkers/check-date.js +0 -13
- package/dist/collection/utils/property-checkers/check-iso-date.js +0 -9
- package/dist/collection/utils/property-checkers/check-one-of.js +0 -8
- package/dist/collection/utils/property-checkers/check-pattern.js +0 -8
- package/dist/collection/utils/property-checkers/check-type.js +0 -15
- package/dist/collection/utils/property-checkers/check-url.js +0 -15
- package/dist/collection/utils/property-checkers/constants.js +0 -1
- package/dist/collection/utils/property-checkers/empty-or.js +0 -9
- package/dist/collection/utils/property-checkers/index.js +0 -20
- package/dist/collection/utils/property-checkers/required-and.js +0 -14
- package/dist/components/heading-levels.js +0 -1
- package/dist/components/index.browser.js +0 -1
- package/dist/components/index2.js +0 -1
- package/dist/components/index3.js +0 -6
- package/dist/components/post-breadcrumb-item2.js +0 -1
- package/dist/components/react/p-B076QoO3.js +0 -1
- package/dist/components/react/p-B2BDAeHI.js +0 -1
- package/dist/components/react/p-B2iQay0-.js +0 -1
- package/dist/components/react/p-B_RL4AOE.js +0 -1
- package/dist/components/react/p-BoFDru4R.js +0 -1
- package/dist/components/react/p-BuL0WAoF.js +0 -1
- package/dist/components/react/p-C8b6-YQl.js +0 -1
- package/dist/components/react/p-CJcRbvrI.js +0 -6
- package/dist/components/react/p-Cu9RsvYK.js +0 -1
- package/dist/components/react/p-D6uA8DbL.js +0 -1
- package/dist/components/react/p-DSSN7xW4.js +0 -1
- package/dist/components/react/p-DW7sbg9f.js +0 -1
- package/dist/components/react/p-DgdnwpId.js +0 -1
- package/dist/components/react/p-Dmnnz3fB.js +0 -1
- package/dist/components/react/p-PuHMz_9_.js +0 -1
- package/dist/components/react/p-nA1BKco0.js +0 -1
- package/dist/components/react/p-r4txK0AC.js +0 -1
- package/dist/components/react/p-tpgRP2Dr.js +0 -1
- package/dist/esm/index-CJcRbvrI.js +0 -114535
- package/dist/esm/index-D9bU2pIE.js +0 -104
- package/dist/esm/index.browser-nA1BKco0.js +0 -14
- package/dist/esm/package-DW7sbg9f.js +0 -3
- package/dist/post-components/p-17ccebe6.entry.js +0 -1
- package/dist/post-components/p-1d58bec1.entry.js +0 -1
- package/dist/post-components/p-25c28493.entry.js +0 -1
- package/dist/post-components/p-29ada3d7.entry.js +0 -1
- package/dist/post-components/p-2fcca5ec.entry.js +0 -1
- package/dist/post-components/p-3cefd49e.entry.js +0 -1
- package/dist/post-components/p-3fea238c.entry.js +0 -1
- package/dist/post-components/p-5068ae7e.entry.js +0 -1
- package/dist/post-components/p-521178f5.entry.js +0 -1
- package/dist/post-components/p-534fed55.entry.js +0 -1
- package/dist/post-components/p-5f52cba3.entry.js +0 -1
- package/dist/post-components/p-86697a58.entry.js +0 -1
- package/dist/post-components/p-987bebe8.entry.js +0 -1
- package/dist/post-components/p-9ca5c297.entry.js +0 -1
- package/dist/post-components/p-9ea3066f.entry.js +0 -1
- package/dist/post-components/p-CJcRbvrI.js +0 -6
- package/dist/post-components/p-D9bU2pIE.js +0 -1
- package/dist/post-components/p-DW7sbg9f.js +0 -1
- package/dist/post-components/p-DmAi35UF.js +0 -2
- package/dist/post-components/p-PuHMz_9_.js +0 -1
- package/dist/post-components/p-a6fc33fa.entry.js +0 -1
- package/dist/post-components/p-ac853d6b.entry.js +0 -1
- package/dist/post-components/p-bd09bc20.entry.js +0 -1
- package/dist/post-components/p-c55b537b.entry.js +0 -1
- package/dist/post-components/p-dded4f13.entry.js +0 -1
- package/dist/post-components/p-e6ba44b1.entry.js +0 -1
- package/dist/post-components/p-ead1094e.entry.js +0 -1
- package/dist/post-components/p-f12e59a0.entry.js +0 -1
- package/dist/post-components/p-nA1BKco0.js +0 -1
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/types/language-tags.d.ts +0 -1
- package/dist/types/utils/property-checkers/check-array-of.d.ts +0 -4
- package/dist/types/utils/property-checkers/check-date.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-iso-date.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-one-of.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-pattern.d.ts +0 -3
- package/dist/types/utils/property-checkers/check-type.d.ts +0 -4
- package/dist/types/utils/property-checkers/check-url.d.ts +0 -3
- package/dist/types/utils/property-checkers/constants.d.ts +0 -1
- package/dist/types/utils/property-checkers/empty-or.d.ts +0 -3
- package/dist/types/utils/property-checkers/index.d.ts +0 -34
- package/dist/types/utils/property-checkers/required-and.d.ts +0 -3
- /package/dist/types/{language-tags.js → test-setup.d.ts} +0 -0
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
2
|
-
import
|
|
3
|
-
import './
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import './
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BbDawWJ5.js';
|
|
2
|
+
import './breakpoints-BQ3HlJPr.js';
|
|
3
|
+
import { v as version } from './package-ClG-N42b.js';
|
|
4
|
+
import { R as Required } from './required-uK-rZZjy.js';
|
|
5
|
+
import { T as Type } from './type-obmwEgkM.js';
|
|
6
|
+
import './create-validator-decorator-D8qwF5Qe.js';
|
|
7
7
|
|
|
8
8
|
const postTooltipTriggerCss = () => `post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}`;
|
|
9
9
|
|
|
10
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
13
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
14
|
+
else
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
16
|
+
if (d = decorators[i])
|
|
17
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
10
20
|
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout', 'long-press'];
|
|
11
|
-
|
|
12
|
-
(async () => {
|
|
13
|
-
await import('./long-press-event-BNgqqRsB.js');
|
|
14
|
-
})();
|
|
15
|
-
}
|
|
21
|
+
let isFocusable;
|
|
16
22
|
const PostTooltipTrigger = class {
|
|
17
23
|
constructor(hostRef) {
|
|
18
24
|
registerInstance(this, hostRef);
|
|
@@ -31,13 +37,21 @@ const PostTooltipTrigger = class {
|
|
|
31
37
|
this.boundTriggerHandler = this.handleTriggerEvent.bind(this);
|
|
32
38
|
this.boundTooltipHandler = this.handleTooltipEvent.bind(this);
|
|
33
39
|
}
|
|
34
|
-
validateControlFor() {
|
|
35
|
-
checkEmptyOrType(this, 'for', 'string');
|
|
36
|
-
}
|
|
37
40
|
get tooltip() {
|
|
38
41
|
const ref = document.getElementById(this.for);
|
|
39
42
|
return ref?.localName === 'post-tooltip' ? ref : null;
|
|
40
43
|
}
|
|
44
|
+
componentWillLoad() {
|
|
45
|
+
{
|
|
46
|
+
// Fire-and-forget: long-press-event registers a global event listener on import.
|
|
47
|
+
import('./long-press-event-BNgqqRsB.js');
|
|
48
|
+
// Load ally.js lazily; setupTrigger uses optional chaining to handle the
|
|
49
|
+
// case where it hasn't loaded yet (falls back to adding tabindex="0").
|
|
50
|
+
import('./focusable-C7afHKmo.js').then(function (n) { return n.f; }).then(m => {
|
|
51
|
+
isFocusable ?? (isFocusable = m.default);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
41
55
|
componentDidLoad() {
|
|
42
56
|
this.setupTrigger();
|
|
43
57
|
this.attachListeners();
|
|
@@ -77,7 +91,7 @@ const PostTooltipTrigger = class {
|
|
|
77
91
|
setupTrigger() {
|
|
78
92
|
this.trigger = this.host.querySelector('*');
|
|
79
93
|
if (this.trigger) {
|
|
80
|
-
if (!isFocusable(this.trigger)) {
|
|
94
|
+
if (!isFocusable?.(this.trigger)) {
|
|
81
95
|
this.trigger.setAttribute('tabindex', '0');
|
|
82
96
|
}
|
|
83
97
|
const describedBy = this.trigger.getAttribute('aria-describedby') || '';
|
|
@@ -170,15 +184,14 @@ const PostTooltipTrigger = class {
|
|
|
170
184
|
this.tooltip?.hide();
|
|
171
185
|
}
|
|
172
186
|
render() {
|
|
173
|
-
return (h(Host, { key: '
|
|
187
|
+
return (h(Host, { key: 'a1f51fabc4417e30a2b3454f9faf239a3a1f8071', "data-version": version }, h("slot", { key: '0ee1caede699ad7bc0c529f6fd1dd85c63107136', onSlotchange: () => this.handleSlotChange() })));
|
|
174
188
|
}
|
|
175
189
|
get host() { return getElement(this); }
|
|
176
|
-
static get watchers() { return {
|
|
177
|
-
"for": [{
|
|
178
|
-
"validateControlFor": 0
|
|
179
|
-
}]
|
|
180
|
-
}; }
|
|
181
190
|
};
|
|
191
|
+
__decorate([
|
|
192
|
+
Required(),
|
|
193
|
+
Type('string')
|
|
194
|
+
], PostTooltipTrigger.prototype, "for", void 0);
|
|
182
195
|
PostTooltipTrigger.style = postTooltipTriggerCss();
|
|
183
196
|
|
|
184
197
|
export { PostTooltipTrigger as post_tooltip_trigger };
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
2
|
-
import { v as version } from './package-DW7sbg9f.js';
|
|
3
|
-
import { d as checkEmptyOrOneOf } from './index-D9bU2pIE.js';
|
|
4
|
-
import './index-CJcRbvrI.js';
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BbDawWJ5.js';
|
|
5
2
|
import { P as PLACEMENT_TYPES } from './placement-DRiVosES.js';
|
|
3
|
+
import './breakpoints-BQ3HlJPr.js';
|
|
4
|
+
import { v as version } from './package-ClG-N42b.js';
|
|
5
|
+
import { O as OneOf } from './one-of-GPr3FflU.js';
|
|
6
|
+
import './create-validator-decorator-D8qwF5Qe.js';
|
|
6
7
|
|
|
7
8
|
const postTooltipCss = () => `:host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer{--post-current-bg:var(--post-scheme-color-surface-accent-bg);--post-current-fg:var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width:var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color:var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1);padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);width:inherit;word-wrap:break-word;white-space:normal}`;
|
|
8
9
|
|
|
10
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
11
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
12
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
13
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
14
|
+
else
|
|
15
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
16
|
+
if (d = decorators[i])
|
|
17
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
9
20
|
const PostTooltip = class {
|
|
10
21
|
constructor(hostRef) {
|
|
11
22
|
registerInstance(this, hostRef);
|
|
@@ -24,12 +35,6 @@ const PostTooltip = class {
|
|
|
24
35
|
*/
|
|
25
36
|
this.open = false;
|
|
26
37
|
}
|
|
27
|
-
validatePlacement() {
|
|
28
|
-
checkEmptyOrOneOf(this, 'placement', PLACEMENT_TYPES);
|
|
29
|
-
}
|
|
30
|
-
componentWillLoad() {
|
|
31
|
-
this.validatePlacement();
|
|
32
|
-
}
|
|
33
38
|
componentDidLoad() {
|
|
34
39
|
if (!this.host.id) {
|
|
35
40
|
console.error(
|
|
@@ -69,15 +74,13 @@ const PostTooltip = class {
|
|
|
69
74
|
}
|
|
70
75
|
render() {
|
|
71
76
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
72
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: '8186d5446993e1c21c107a496239e56af2493e87', "data-version": version }, h("post-popovercontainer", { key: '6f916cddf8f3b577b7920b02c001905b782b6ff7', safeSpace: "trapezoid", class: popoverClass, role: "tooltip", arrow: this.arrow, placement: this.placement, onPostBeforeToggle: e => this.handleBeforeToggle(e), ref: (el) => (this.popoverRef = el) }, h("slot", { key: '0443322d0ef00792b14e69fd55abaf42f64c0838' }))));
|
|
73
78
|
}
|
|
74
79
|
get host() { return getElement(this); }
|
|
75
|
-
static get watchers() { return {
|
|
76
|
-
"placement": [{
|
|
77
|
-
"validatePlacement": 0
|
|
78
|
-
}]
|
|
79
|
-
}; }
|
|
80
80
|
};
|
|
81
|
+
__decorate([
|
|
82
|
+
OneOf(PLACEMENT_TYPES)
|
|
83
|
+
], PostTooltip.prototype, "placement", void 0);
|
|
81
84
|
PostTooltip.style = postTooltipCss();
|
|
82
85
|
|
|
83
86
|
export { PostTooltip as post_tooltip };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { c as createValidatorDecorator, g as getValidationContext, i as isValueEmpty, r as registerDependency } from './create-validator-decorator-D8qwF5Qe.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Property decorator that validates the property is not empty.
|
|
5
|
+
* If the property is empty (undefined, null, '', NaN), an error is logged.
|
|
6
|
+
* This validator is blocking: if it fails, subsequent validators will not run.
|
|
7
|
+
*
|
|
8
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Optional configuration.
|
|
11
|
+
* @param options.when - The property name to watch. Validation only runs when this property's value matches the `truthy` option.
|
|
12
|
+
* @param options.truthy - The value that the `when` property must match for validation to run. Defaults to `true`.
|
|
13
|
+
*/
|
|
14
|
+
function Required(options) {
|
|
15
|
+
const validator = createValidatorDecorator({
|
|
16
|
+
priority: 0,
|
|
17
|
+
blocking: true,
|
|
18
|
+
validateEmptyValues: true,
|
|
19
|
+
run(component, property) {
|
|
20
|
+
if (options && typeof options.when === 'string') {
|
|
21
|
+
const truthy = options.truthy ?? true;
|
|
22
|
+
if (component[options.when] !== truthy) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const { value, showError } = getValidationContext(component, property);
|
|
27
|
+
if (isValueEmpty(value)) {
|
|
28
|
+
showError('is required');
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
return function (target, property) {
|
|
35
|
+
validator(target, property);
|
|
36
|
+
if (options?.when) {
|
|
37
|
+
registerDependency(target, options.when, property);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { Required as R };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { c as createValidatorDecorator, g as getValidationContext } from './create-validator-decorator-D8qwF5Qe.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Property decorator that validates the property value is of the specified type.
|
|
5
|
+
*
|
|
6
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
7
|
+
*
|
|
8
|
+
* @param type - The expected type ('boolean', 'number', 'string', 'array', 'object', 'function').
|
|
9
|
+
*/
|
|
10
|
+
function Type(type) {
|
|
11
|
+
return createValidatorDecorator({
|
|
12
|
+
priority: 1,
|
|
13
|
+
blocking: false,
|
|
14
|
+
run(component, property) {
|
|
15
|
+
const { value, showError } = getValidationContext(component, property);
|
|
16
|
+
const typeIsArray = type === 'array';
|
|
17
|
+
const valueIsArray = Array.isArray(value);
|
|
18
|
+
const isValid = typeIsArray || valueIsArray ? valueIsArray === typeIsArray : typeof value === type;
|
|
19
|
+
if (!isValid) {
|
|
20
|
+
showError(`must be of type "${type}"`);
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
return true;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { Type as T };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { c as createValidatorDecorator, g as getValidationContext } from './create-validator-decorator-D8qwF5Qe.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Property decorator that validates the property value is a valid URL.
|
|
5
|
+
*
|
|
6
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
7
|
+
*/
|
|
8
|
+
function Url() {
|
|
9
|
+
return createValidatorDecorator({
|
|
10
|
+
priority: 1,
|
|
11
|
+
blocking: false,
|
|
12
|
+
run(component, property) {
|
|
13
|
+
const { value, showError } = getValidationContext(component, property);
|
|
14
|
+
let isValid = typeof value === 'string' || value instanceof URL;
|
|
15
|
+
if (isValid) {
|
|
16
|
+
try {
|
|
17
|
+
new URL(value, 'https://www.post.ch');
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
isValid = false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (!isValid) {
|
|
24
|
+
showError('must be a valid URL');
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { Url as U };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,a as o}from"./p-BbDawWJ5.js";import"./p-BQ3HlJPr.js";import{d as h}from"./p-C9hMpmsD.js";import{v as a}from"./p-ClG-N42b.js";import{R as n}from"./p-D4F0BqBW.js";import{T as c}from"./p-Ck2qPht6.js";import"./p-BRNqUiXj.js";const r=class{constructor(s){t(this,s),this.postFilteringEvent=i(this,"postFilteringEvent"),this.debouncedHandleInput=h((t=>{this.handleInput(t)}),250),this.filterThreshold=0,this.clearable=!1,this.inputValue="",this.handleOnBlur=()=>{this.inputElement.value=this.inputValue,this.listBoxElement.filter(""),this.hideListBox()},this.handleInput=async t=>{if(!this.listBoxElement)return;const i=t.target.value.trim(),s=i.length>=this.filterThreshold?i:"",{defaultPrevented:e}=this.postFilteringEvent.emit(s&&s.length>=this.filterThreshold?s:"");e||(await this.listBoxElement.filter(s),s?(this.showListBox(),this.announceCount()):(this.inputValue="",this.clearAnnouncement()))},this.handleKeyDown=t=>{const{key:i,altKey:s}=t;switch(i){case"ArrowDown":t.preventDefault(),this.showListBox(),s||this.listBoxElement.navigate("down");break;case"ArrowUp":t.preventDefault(),this.listBoxElement.navigate("up");break;case"Enter":if(this.listBoxElement.hidden)return;t.preventDefault(),this.listBoxElement.selectActive(),this.hideListBox();break;case"Escape":this.hideListBox();break;case"Tab":this.listBoxElement.selectActive(),this.hideListBox();break;case"Home":t.preventDefault(),this.listBoxElement.navigate("first");break;case"End":t.preventDefault(),this.listBoxElement.navigate("last")}},this.handleOptionSelected=t=>{const i=t.detail;this.inputElement.value=i,this.inputValue=i,this.hideListBox()},this.handleOptionActive=t=>{const i=t.detail;i?this.inputElement.setAttribute("aria-activedescendant",i):this.inputElement.removeAttribute("aria-activedescendant")},this.hideListBox=()=>{this.clearAnnouncement(),this.listBoxElement.hide(),this.inputElement.ariaExpanded="false",this.host.removeAttribute("open"),this.inputElement.removeAttribute("aria-activedescendant")},this.showListBox=async()=>{await this.listBoxElement.show(),this.inputElement.ariaExpanded="true",this.host.setAttribute("open",""),this.announceCount()},this.clearInput=()=>{this.inputElement&&(this.inputElement.value="",this.inputValue="",this.listBoxElement.clearSelection(),this.hideListBox())}}get inputElement(){return this.host.querySelector("input")}get listBoxElement(){return this.listbox?document.getElementById(this.listbox):this.host.querySelector("post-listbox")}componentWillLoad(){if(!this.inputElement)return;if(this.inputElement.role="combobox",this.inputElement.ariaAutoComplete="list",!this.listBoxElement)return;this.listBoxElement.id||(this.listBoxElement.id=crypto.randomUUID()),this.inputElement.setAttribute("aria-controls",this.listBoxElement.id),this.inputElement.setAttribute("aria-expanded","false");const t=this.inputElement.labels?.[0];t&&(t.id||(t.id=crypto.randomUUID()),this.listBoxElement.setAttribute("aria-labelledby",t.id)),this.inputElement.autocomplete="off",this.attachInputListeners(),this.attachListboxListeners()}disconnectedCallback(){this.detachInputListeners(),this.detachListboxListeners()}attachInputListeners(){this.inputElement&&(this.inputElement.addEventListener("input",this.debouncedHandleInput),this.inputElement.addEventListener("keydown",this.handleKeyDown),this.inputElement.addEventListener("blur",this.handleOnBlur),this.inputElement.addEventListener("click",this.showListBox))}detachInputListeners(){this.inputElement&&(this.inputElement.removeEventListener("input",this.debouncedHandleInput),this.inputElement.removeEventListener("keydown",this.handleKeyDown),this.inputElement.removeEventListener("blur",this.handleOnBlur),this.inputElement.removeEventListener("click",this.showListBox))}attachListboxListeners(){this.listBoxElement&&(this.listBoxElement.addEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.addEventListener("postOptionActive",this.handleOptionActive))}detachListboxListeners(){this.listBoxElement&&(this.listBoxElement.removeEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.removeEventListener("postOptionActive",this.handleOptionActive))}clearAnnouncement(){this.outputElement&&(this.outputElement.textContent="")}announceCount(){if(!this.outputElement||!this.listBoxElement)return;const t=this.listBoxElement.querySelectorAll("post-listbox-option:not([hidden])").length;this.outputElement.textContent=this.textAvailableSuggestions.replace("{count}",String(t))}render(){return s(e,{key:"d8f594b17240359b03d1e443d0f8ea28a1a5f687","data-version":a},s("slot",{key:"b76771582cdfb4f84e6018551508daaa5e5c91c5"}),this.clearable&&this.inputValue&&s("button",{key:"ff6255a9b10df6609703bfa302d519b52931786e",type:"button",class:"autocomplete-clear",onClick:this.clearInput},s("post-icon",{key:"3c7da3532ae720ab6f392a8de8b2ca21e4b092aa","aria-hidden":"true",name:"closex"})),s("post-icon",{key:"d2a3c04b68a3b9b3303b80f37292578c5182157e","aria-hidden":"true",class:"autocomplete-icon",name:"chevronDown"}),s("output",{key:"187a75fa1e1935a372521c57f75c6740f330f891",class:"visually-hidden",ref:t=>this.outputElement=t}))}get host(){return o(this)}};(function(t,i,s,e){var o,h=arguments.length,a=h<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,s,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(h<3?o(a):h>3?o(i,s,a):o(i,s))||a);h>3&&a&&Object.defineProperty(i,s,a)})([n(),c("string")],r.prototype,"textAvailableSuggestions",void 0),r.style=":host{position:relative;display:block}.autocomplete-icon,.autocomplete-clear{position:absolute;inset-block-start:16px}@media screen and (min-width: 780px){.autocomplete-icon,.autocomplete-clear{inset-block-start:20px}}.autocomplete-icon{inset-inline-end:16px;width:24px;height:24px;pointer-events:none;transition:transform .2s ease-in-out}:host([open]) .autocomplete-icon{transform:rotate(180deg)}.autocomplete-clear{display:flex;align-items:center;justify-content:center;inset-inline-end:42px;background:none;border:none;cursor:pointer}.autocomplete-clear>post-icon{width:20px;height:20px}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";export{r as post_autocomplete}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as e,H as i,a as s}from"./p-BbDawWJ5.js";import"./p-BQ3HlJPr.js";import{v as r}from"./p-ClG-N42b.js";import{R as n}from"./p-D4F0BqBW.js";import{T as a}from"./p-Ck2qPht6.js";import"./p-BRNqUiXj.js";var c=function(t,o,e,i){var s,r=arguments.length,n=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,o,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(n=(r<3?s(n):r>3?s(o,e,n):s(o,e))||n);return r>3&&n&&Object.defineProperty(o,e,n),n};const d=class{constructor(e){t(this,e),this.postChange=o(this,"postChange"),this.authenticated=null,this.user=null}async componentWillLoad(){await this.fetchAuthState()}async isAuthenticated(){return this.authenticated}async refresh(){await this.fetchAuthState()}async fetchAuthState(){try{const t=await fetch("https://n.account.post.ch/v1/session/subscribe",{credentials:"include"});if(!t.ok)return void this.setAuthState(!1);const o=await t.json(),e=void 0!==o?.data?.email;this.user=o?.data,this.setAuthState(e)}catch{this.setAuthState(!1)}}setAuthState(t){this.authenticated!==t&&(this.authenticated=t,this.postChange.emit({authenticated:t}))}render(){return e(i,{key:"4aeda818bbda67c88aa188ac3bbb8f0377a5050e","data-version":r},!0===this.authenticated?e("div",null,e("post-menu-trigger",{for:"user-menu-default"},e("button",{class:"btn btn-link",type:"button"},e("post-avatar",{firstname:this.user.name,lastname:this.user.surname,description:this.textCurrentUser.replace("{user}",`${this.user.name} ${this.user.surname}`)}),e("span",{class:"visually-hidden"},this.textUserMenuTrigger))),e("post-menu",{label:this.textUserMenu,id:"user-menu-default"},e("div",{slot:"header"},e("post-avatar",{firstname:this.user.name,lastname:this.user.surname,email:this.user.email,"aria-hidden":"true"}),this.user.name," ",this.user.surname),e("slot",{name:"user-links"}))):e("div",null,e("slot",{name:"login-link"})))}get host(){return s(this)}};c([n(),a("string")],d.prototype,"textCurrentUser",void 0),c([n(),a("string")],d.prototype,"textUserMenu",void 0),c([n(),a("string")],d.prototype,"textUserMenuTrigger",void 0),d.style=":host post-menu-trigger button{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;min-height:var(--post-device-sizing-interactive-button-height-1);gap:var(--post-device-spacing-gap-inline-10);padding:0 var(--post-device-spacing-padding-inline-6)}:host post-menu-trigger button:hover{text-decoration:none}:host post-menu-trigger button:disabled{border-style:var(--post-core-border-style-dash)}:host post-menu-trigger button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host post-menu-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host post-menu-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host post-menu-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host post-menu-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host post-menu-trigger button:is(a){color:LinkText;border:unset}:host post-menu-trigger button:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}:host post-menu-trigger button:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}:host post-menu-trigger button:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}:host post-menu-trigger button>post-icon{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}:host post-menu-trigger button{border-radius:var(--post-device-border-radius-round) !important;border:0 none;min-height:0;padding:0}:host post-menu-trigger .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";export{d as post_login_widget}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as t,H as e,a as i}from"./p-BbDawWJ5.js";import"./p-BQ3HlJPr.js";import{n as a}from"./p-8LXe8Zt_.js";import{v as r}from"./p-ClG-N42b.js";import{R as c}from"./p-D4F0BqBW.js";import{T as s}from"./p-Ck2qPht6.js";import"./p-BRNqUiXj.js";const n=class{constructor(t){o(this,t),this.mutationObserver=new MutationObserver(this.checkNavigationMode.bind(this)),this.isNavigationMode=!1}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})}componentWillLoad(){this.tabId=`tab-${this.host.id||a(6)}`,this.checkNavigationMode()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkNavigationMode(){const o=null!==this.host.querySelector("a");this.isNavigationMode=o}render(){return t(e,{key:"bd2713959afafd5dafa80c5f59e8249ffbb78b09",id:this.tabId,role:this.isNavigationMode?void 0:"tab","data-version":r,"data-navigation-mode":this.isNavigationMode.toString(),"aria-selected":this.isNavigationMode?void 0:"false",tabindex:this.isNavigationMode?void 0:"-1",class:this.isNavigationMode?"nav-item":"tab-title"},t("slot",{key:"87e22df81eae1ecef48a6ad443b959562d8a816b"}))}get host(){return i(this)}};(function(o,t,e,i){var a,r=arguments.length,c=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(o,t,e,i);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(c=(r<3?a(c):r>3?a(t,e,c):a(t,e))||c);r>3&&c&&Object.defineProperty(t,e,c)})([c(),s("string")],n.prototype,"name",void 0),n.style='.tab-title,.nav-item a{display:inline-block;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);opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0);cursor:pointer}.tab-title:hover,.nav-item a:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title:focus-visible,.nav-item a:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title:focus-visible::after,.nav-item a: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}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:focus-visible,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a: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,.nav-item a{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title:hover,.tab-title:focus,.tab-title:focus-within,.tab-title:focus-visible,.nav-item a:hover,.nav-item a:focus,.nav-item a:focus-within,.nav-item a:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}}.nav-item{display:inline-block;position:relative;box-sizing:border-box;cursor:default}.nav-item:focus,.nav-item:focus-visible{outline:none;box-shadow:none}.nav-item:focus::after,.nav-item:focus-visible::after{display:none}.nav-item a{color:inherit;text-decoration:none;display:block;width:100%;height:100%;box-sizing:border-box;position:relative;outline:none;cursor:pointer;border-radius:0}.nav-item a:focus{outline:none}.nav-item a:active{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.nav-item a:focus-visible{outline:none !important}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}.tab-title.active,.nav-item.active a{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title.active::before,.nav-item.active a::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title.active,.nav-item.active a{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title.active::before,.nav-item.active a::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}}';export{n as post_tab_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,H as i}from"./p-
|
|
1
|
+
import{r as t,c as o,h as e,H as i}from"./p-BbDawWJ5.js";import{v as s}from"./p-ClG-N42b.js";const n=class{constructor(e){t(this,e),this.postOptionSelected=o(this,"postOptionSelected"),this.optionId=crypto.randomUUID(),this.selected=!1,this.highlighted=!1}render(){return e(i,{key:"f88a84b9004a29fb7c39ea4cbc509d940d70a52d","data-version":s,role:"option","aria-selected":`${this.selected}`,"data-active":this.highlighted?"true":null,onPointerDown:t=>t.preventDefault(),onClick:()=>this.postOptionSelected.emit(this.value),id:`post-listbox-option-${this.optionId}`},e("span",{key:"99d154078490d171ab0e4e43b765cbffb44e721e",class:"option-content"},this.value,e("span",{key:"609a205bb61b84d1e56e6e64282cb210f650faca",class:"option-description"},e("slot",{key:"d08d9dddbea69b693002a20f4127788a6a21acc1"}))),this.selected&&e("post-icon",{key:"04e999451c694a0cb54e1e3ab5cd3eca29640aaf","aria-hidden":"true",name:"checkmark"}))}};n.style=":host{padding:12px 12px 9px 16px;background-color:#fff;cursor:pointer;user-select:none;display:flex;align-items:center;gap:8px;justify-content:space-between}:host(:hover){background-color:#f0efed}:host([data-active=true]){outline:2px solid #000;outline-offset:-4px}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid #050400;outline-offset:2px}.option-content{display:flex;flex-direction:column;min-width:0}.option-description{display:none;font-size:.85em;color:#666}:host(:not(:empty)) .option-description{display:block}post-icon{width:24px;height:24px}";export{n as post_listbox_option}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as i,a as e}from"./p-BbDawWJ5.js";import"./p-BQ3HlJPr.js";import{v as o}from"./p-ClG-N42b.js";import{R as h}from"./p-D4F0BqBW.js";import{T as r}from"./p-Ck2qPht6.js";import"./p-BRNqUiXj.js";const n=["pointerenter","pointerleave","focusin","focusout","long-press"];let a;const l=class{constructor(s){t(this,s),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}get tooltip(){const t=document.getElementById(this.for);return"post-tooltip"===t?.localName?t:null}componentWillLoad(){import("./p-BNgqqRsB.js"),import("./p-BrY4VWTQ.js").then((function(t){return t.f})).then((t=>{a??(a=t.default)}))}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const s=t.split(" ").filter((t=>t!==this.for)).join(" ");s?this.trigger.setAttribute("aria-describedby",s):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){a?.(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){n.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){n.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const s=t.relatedTarget;this.tooltip&&s&&this.tooltip.contains(s)||s===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return s(i,{key:"a1f51fabc4417e30a2b3454f9faf239a3a1f8071","data-version":o},s("slot",{key:"0ee1caede699ad7bc0c529f6fd1dd85c63107136",onSlotchange:()=>this.handleSlotChange()}))}get host(){return e(this)}};(function(t,s,i,e){var o,h=arguments.length,r=h<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,i,e);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(h<3?o(r):h>3?o(s,i,r):o(s,i))||r);h>3&&r&&Object.defineProperty(s,i,r)})([h(),r("string")],l.prototype,"for",void 0),l.style="post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}";export{l as post_tooltip_trigger}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as e,a}from"./p-BbDawWJ5.js";import{f as o}from"./p-D5knoiyy.js";import"./p-BQ3HlJPr.js";import{c as h}from"./p-lpWRZjJp.js";import{v as r}from"./p-ClG-N42b.js";import{T as n}from"./p-Ck2qPht6.js";import"./p-CoDiS_Ik.js";import"./p-BRNqUiXj.js";const l=class{constructor(i){t(this,i),this.postChange=s(this,"postChange"),this.isLoaded=!1,this.isNavigationMode=!1,this.fullWidth=!1}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isNavigationMode&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in navigation mode. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectMode()}componentDidLoad(){if(this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.setupContentObserver(),this.validateLabel(),this.isNavigationMode){const t=this.findActiveNavigationTab();t&&this.activateTab(t)}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver.disconnect()}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-navigation-mode","aria-current"]})}handleContentChange(t){const s=this.shouldRedetectMode(t);this.hasAriaCurrentChanged(t)&&this.isNavigationMode&&this.updateActiveNavigationTab(),s&&this.handleModeChange()}shouldRedetectMode(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-navigation-mode"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActiveNavigationTab(){const t=this.findActiveNavigationTab();t&&t!==this.currentActiveTab&&this.activateTab(t)}handleModeChange(){const t=this.isNavigationMode;this.detectMode(),t!==this.isNavigationMode&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isNavigationMode){const t=this.findActiveNavigationTab();t&&this.activateTab(t)}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectMode(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.navigationMode));if(t&&this.panels.length>0)throw new Error("PostTabs: Mixed mode detected. Cannot use both navigation mode (anchor elements) and panel mode (post-tab-panel elements) at the same time.");this.isNavigationMode=t}findActiveNavigationTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,i=this.host.querySelector(`post-tab-item[name=${t}]`);this.activateTab(i),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),this.hiding&&await this.hiding.finished,this.showSelectedPanel(),this.showing&&await this.showing.finished,this.isLoaded&&this.postChange.emit(this.currentActiveTab.name)}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await h(t),this.isNavigationMode)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.currentActiveTab.classList.remove("active"),this.isNavigationMode||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),t.classList.add("active"),this.isNavigationMode||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=o(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=o(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const i=Array.from(this.tabs).indexOf(t);let e;e="ArrowRight"===s?this.tabs[i+1]||this.tabs[0]:this.tabs[i-1]||this.tabs.at(-1),e&&(e.focus(),this.show(e.name))}render(){return i(e,{key:"3b674ed455e34a7efc1c1ffed14ac719a7ecb061","data-version":r},i("div",{key:"749f4695adc7c3125bfb678606249c48a4d7ea31",class:"tabs-wrapper",part:"post-tabs"},i(this.isNavigationMode?"nav":"div",{key:"c06c83dbcbdf9f3fd38f01db7beae181748b369d",class:"tabs",role:this.isNavigationMode?void 0:"tablist","aria-label":this.isNavigationMode?this.label:void 0},i("slot",{key:"b065d0200fb2d4b6a63e23141d3e625a4147a93d",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}}))),!this.isNavigationMode&&i("div",{key:"8dc41274f8c9da24b2d65eebf213ea35c41368d0",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"e859256ebcb60fc0457349ca991508406b3bc309",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return a(this)}static get watchers(){return{label:[{validateLabel:0}]}}};(function(t,s,i,e){var a,o=arguments.length,h=o<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,e);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(h=(o<3?a(h):o>3?a(s,i,h):a(s,i))||h);o>3&&h&&Object.defineProperty(s,i,h)})([n("string")],l.prototype,"label",void 0),l.style='.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(0,0,0,.02)}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}:host{display:block}:host([full-width=true]) .tabs-wrapper{margin-inline:calc(-1*var(--post-container-offset))}:host([full-width=true]) .tabs-wrapper .tabs{padding-inline:var(--post-container-offset)}';export{l as post_tabs}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,h as e,H as t,a as r}from"./p-BbDawWJ5.js";import{b as a}from"./p-BQ3HlJPr.js";import{v as i}from"./p-ClG-N42b.js";import{R as n}from"./p-D4F0BqBW.js";import{T as s}from"./p-Ck2qPht6.js";import"./p-BRNqUiXj.js";const d=["grid-1","grid-2","grid-3","grid-4"],p=class{constructor(e){o(this,e),this.device=a.get("device"),this.gridSlotDisplayed={},this.breakpointChange=o=>{this.device=o.detail},this.handleGridSlotChange=this.handleGridSlotChange.bind(this)}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange)}componentWillLoad(){d.forEach((o=>{const e=this.host.querySelectorAll(`[slot="${o}"]`);this.updateGridSlotDisplay(o,e.length>0)}))}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange)}handleGridSlotChange(...o){return e=>{o.includes(this.device)&&e.target instanceof HTMLSlotElement&&this.updateGridSlotDisplay(e.target.name,e.target.assignedElements().length>0)}}updateGridSlotDisplay(o,e){this.gridSlotDisplayed[o]!==e&&(this.gridSlotDisplayed={...this.gridSlotDisplayed,[o]:e})}renderAccordion(){return e("post-accordion",{headingLevel:3,multiple:!0},d.map((o=>e("post-accordion-item",{class:{"d-none":!this.gridSlotDisplayed[o]},collapsed:!0},e("span",{slot:"header"},e("slot",{name:o+"-title"})),e("slot",{onSlotchange:this.handleGridSlotChange("mobile"),name:o})))))}renderColumns(){return d.map((o=>e("div",{class:{"d-none":!this.gridSlotDisplayed[o]}},e("h3",null,e("slot",{name:o+"-title"})),e("slot",{onSlotchange:this.handleGridSlotChange("tablet","desktop"),name:o}))))}render(){return e(t,{key:"374c30bdf52f1c826e4016fb60ebe46b212321f3","data-version":i,"data-color-scheme":"light"},e("footer",{key:"ad4b7ef1d1c8455fba5377c51b82aa98fabe567c"},e("h2",{key:"2a55bd8dd9764b19ce565e0e718e8caa648dd4e8",class:"visually-hidden"},this.textFooter),e("div",{key:"bd3fad280de6e35a43dccf5afb90d079b5697039",class:"prefooter"},e("div",{key:"8ae04af140bdef46f1989dbd4e18047b20eb8607",class:"footer-container"},e("slot",{key:"b2e5e4e3bcfbe4d9eb6323a62fd7d8db312ff49e",name:"prefooter"}))),e("div",{key:"a73f4cbadf30e9e8bd88a657b88e9aeeecd8ac1c",class:"footer-main"},e("div",{key:"b4fa33216ea90b1c7ce8ad4426ffc04a5b142260",class:"footer-container"},e("div",{key:"68978cc363340f86973f53df82e4adf70e1d18fb",class:"footer-grid"},"mobile"===this.device?this.renderAccordion():this.renderColumns()),e("div",{key:"d867ecbc7431b9f6e76022693bfd77be6f2015cc",class:"footer-column"},e("div",{key:"e5a345d9cb0d85d8a4f4ce46bde363177f26be5f",class:"footer-socialmedia"},e("slot",{key:"df306b3404d7cf25a4e93f24a787796c9b6582d0",name:"socialmedia"})),e("div",{key:"b62be898061d5880b0329251af9001d32a1565d0",class:"footer-app"},e("slot",{key:"71d2ac3bcb5fa4056e00bb3ec949c163016d116c",name:"app"}))),e("div",{key:"d1237aa43568afe2d66de7e2871557c8bef692ab",class:"footer-businesssectors"},e("slot",{key:"3470e3f8d1eaadf7eb230e7c788b5524672937b2",name:"businesssectors"})),e("div",{key:"0fc6b0bd67ac6982ed98f800d37590fe38725ff5",class:"footer-meta"},e("slot",{key:"d4ec82246b09ec299836ec13137448e0399dc8cd",name:"meta"})),e("div",{key:"ffe9ad1ea0ff761513a721c1915bc6bdb602832c",class:"footer-copyright"},e("slot",{key:"bc43ce34d09a3a257ca614fe2b1383ee732d3f68",name:"copyright"}))))))}get host(){return r(this)}};(function(o,e,t,r){var a,i=arguments.length,n=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(o,e,t,r);else for(var s=o.length-1;s>=0;s--)(a=o[s])&&(n=(i<3?a(n):i>3?a(e,t,n):a(e,t))||n);i>3&&n&&Object.defineProperty(e,t,n)})([n(),s("string")],p.prototype,"textFooter",void 0),p.style=":host{display:block}footer{border-block-start:1px solid #373632;--post-footer-container-padding-block:32px;--post-footer-container-padding-inline:16px;--post-footer-container-max-width:1200px;--post-footer-prefooter-padding-block:16px;--post-footer-grid-template:auto / auto;--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:0;--post-footer-grid-margin-block-end:24px;--post-footer-grid-padding-block-end:0;--post-footer-column-flex-direction:column;--post-footer-column-align-items:start;--post-footer-column-gap:0;--post-footer-list-flex-direction:column;--post-footer-list-gap:8px;--post-footer-list-align-items:start;--post-footer-socialmedia-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-app-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-businesssectors-margin-block-end:var(--post-footer-grid-margin-block-end);--post-footer-meta-margin-block-end:16px;--post-footer-meta-font-size:inherit;--post-footer-copyright-font-size:var(--post-footer-meta-font-size)}@media screen and (min-width: 600px){footer{--post-footer-container-padding-block:40px;--post-footer-prefooter-padding-block:32px;--post-footer-grid-template:repeat(2, auto) / repeat(2, auto);--post-footer-grid-row-gap:32px;--post-footer-grid-column-gap:16px;--post-footer-grid-margin-block-end:32px;--post-footer-grid-padding-block-end:32px;--post-footer-list-flex-direction:row;--post-footer-list-gap:16px;--post-footer-list-align-items:center;--post-footer-meta-margin-block-end:8px}}@media screen and (min-width: 780px){footer{--post-footer-container-padding-inline:40px}}@media screen and (min-width: 1024px){footer{--post-footer-container-padding-block:56px;--post-footer-grid-template:auto / repeat(4, auto);--post-footer-grid-row-gap:0;--post-footer-grid-column-gap:24px;--post-footer-grid-margin-block-end:40px;--post-footer-column-flex-direction:row;--post-footer-column-align-items:center;--post-footer-column-gap:32px;--post-footer-list-gap:24px;--post-footer-businesssectors-margin-block-end:24px;--post-footer-meta-font-size:16px}}:is(h3,.h3){margin:0;font-size:var(--post-device-font-size-6);line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black);text-wrap:balance}::slotted(ul){list-style:none;padding:0;margin:0}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.footer-container{box-sizing:content-box;margin:0 auto;padding:var(--post-footer-container-padding-block) var(--post-footer-container-padding-inline);max-width:var(--post-footer-container-max-width)}.prefooter{background-color:#fafafa}.prefooter .footer-container{padding-block:0}.prefooter ::slotted([slot=prefooter]){padding-block:var(--post-footer-prefooter-padding-block)}.footer-main{background-color:#fc0}.footer-grid{display:grid;grid-template:var(--post-footer-grid-template);row-gap:var(--post-footer-grid-row-gap);column-gap:var(--post-footer-grid-column-gap);margin-block-end:var(--post-footer-grid-margin-block-end);padding-block-end:var(--post-footer-grid-padding-block-end)}.footer-grid:has(>.d-none+.d-none+.d-none+.d-none){margin-block-end:0;padding-block-end:0;row-gap:0;column-gap:0}.footer-grid post-accordion:has(>.d-none+.d-none+.d-none+.d-none){display:none}.footer-grid ::part(button),.footer-grid ::part(body){padding-inline:0}.footer-column{display:flex;flex-direction:var(--post-footer-column-flex-direction);flex-wrap:wrap;justify-content:space-between;align-items:var(--post-footer-column-align-items);column-gap:var(--post-footer-column-gap)}.footer-socialmedia ::slotted(div),.footer-app ::slotted(div),.footer-meta ::slotted(div){display:flex !important;flex-direction:var(--post-footer-list-flex-direction) !important;gap:var(--post-footer-list-gap) !important;align-items:var(--post-footer-list-align-items) !important}.footer-socialmedia{margin-block-end:var(--post-footer-socialmedia-margin-block-end)}.footer-app{margin-block-end:var(--post-footer-app-margin-block-end)}.prefooter ::slotted(div),.footer-businesssectors ::slotted(div){display:flex;flex-wrap:wrap;align-items:center;gap:var(--post-footer-list-gap) !important}.footer-businesssectors{margin-block-end:var(--post-footer-businesssectors-margin-block-end)}.footer-meta{margin-block-end:var(--post-footer-meta-margin-block-end);font-size:var(--post-footer-meta-font-size)}.footer-copyright{display:flex;flex-wrap:wrap;column-gap:.5rem;font-size:var(--post-footer-copyright-font-size)}.d-none{display:none}";export{p as post_footer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s,H as i,a as o}from"./p-BbDawWJ5.js";import"./p-BQ3HlJPr.js";import{v as e}from"./p-ClG-N42b.js";import{i as r}from"./p-BrY4VWTQ.js";import{T as h}from"./p-Ck2qPht6.js";import"./p-BFTU3MAI.js";import"./p-BRNqUiXj.js";const n=class{syncAriaExpanded(t){this.ariaExpanded=t,this.trigger&&this.trigger.setAttribute("aria-expanded",String(t))}hasAriaControlsElements(t){return"ariaControlsElements"in t}get popover(){const t=this.host.querySelector("post-popover")??document.getElementById(this.for);return t?"post-popover"===t?.localName?t:null:(console.error(`No post-popover found ${this.for?`with ID: ${this.for}`:"inside the <post-popover-trigger>"}.`),null)}setupTrigger(){const t=this.popover;this.trigger=this.host.querySelector("*"),this.trigger?(r(this.trigger)||(this.trigger.setAttribute("tabindex","0"),this.trigger.setAttribute("role","button")),t&&(this.trigger.setAttribute("aria-expanded",this.ariaExpanded.toString()),this.trigger.setAttribute("aria-haspopup","true"),this.for?this.trigger.setAttribute("aria-controls",this.for):this.hasAriaControlsElements(this.trigger)?this.trigger.ariaControlsElements=[t]:(t.id||(t.id=`popover-${crypto.randomUUID()}`),this.trigger.setAttribute("aria-controls",t.id)),this.trigger?.addEventListener("click",this.boundHandleToggle),this.trigger?.addEventListener("keydown",this.boundHandleKeyDown))):console.error("No content found in the post-popover-trigger slot. Please insert a focusable element or content that can receive focus.")}handleToggle(){this.popover?.toggle(this.trigger),this.focusTrigger()}focusTrigger(){!this.popoverOpen&&this.trigger&&this.trigger.focus()}constructor(s){t(this,s),this.ariaExpanded=!1,this.popoverOpen=!1,this.handleKeyDown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleToggle())},this.boundHandleToggle=this.handleToggle.bind(this),this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandlePostToggle=t=>{this.popoverOpen=t.detail.isOpen,this.focusTrigger()}}componentDidLoad(){this.setupTrigger(),this.popover?.addEventListener("postToggle",this.boundHandlePostToggle)}disconnectedCallback(){this.trigger?.removeEventListener("click",this.boundHandleToggle),this.trigger?.removeEventListener("keydown",this.boundHandleKeyDown),this.popover?.removeEventListener("postToggle",this.boundHandlePostToggle)}render(){return s(i,{key:"15106566f7f823c789987c59ef7b655622c95f23","data-version":e},s("slot",{key:"e8d4e3f87795b2f323210a2fedee79e462f715bd",onSlotchange:()=>this.setupTrigger()}))}get host(){return o(this)}static get watchers(){return{popoverOpen:[{syncAriaExpanded:0}]}}};(function(t,s,i,o){var e,r=arguments.length,h=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,o);else for(var n=t.length-1;n>=0;n--)(e=t[n])&&(h=(r<3?e(h):r>3?e(s,i,h):e(s,i))||h);r>3&&h&&Object.defineProperty(s,i,h)})([h("string")],n.prototype,"for",void 0),n.style=":host{cursor:pointer}";export{n as post_popover_trigger}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as o,H as e,a as i}from"./p-BbDawWJ5.js";import{f as s}from"./p-BVCjnh6Q.js";import"./p-BQ3HlJPr.js";import{v as r}from"./p-ClG-N42b.js";import{R as a}from"./p-D4F0BqBW.js";import{T as c}from"./p-Ck2qPht6.js";import"./p-CoDiS_Ik.js";import"./p-BRNqUiXj.js";const n=class{constructor(o){t(this,o),this.belowFold=!1,this.handleScroll=()=>{this.belowFold=this.isBelowFold()}}isBelowFold(){return window.scrollY>window.innerHeight}watchBelowFold(t){s(this.host,t?"in":"out",{translate:this.translateY,fill:"forwards"})}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}getSecondPixelValue(t){for(const o of t){const t=o.match(/\b\d+px\b/g);if(t&&t.length>1)return t[1]}}animateButton(){const t=globalThis.getComputedStyle(this.host).getPropertyValue("top"),o=this.host.shadowRoot.querySelector("button"),e=getComputedStyle(o).getPropertyValue("--post-back-to-top-elevation").split(","),i=this.getSecondPixelValue(e);t&&"auto"!==t&&i&&(this.translateY=-1-Number.parseFloat(t.replace("px",""))-Number.parseFloat(i.replace("px","")),this.belowFold&&s(this.host,"in",{translate:this.translateY,fill:"forwards"}),this.belowFold||(this.host.style.transform=`translateY(${this.translateY})`))}componentWillLoad(){this.belowFold=this.isBelowFold()}componentDidLoad(){window.addEventListener("scroll",this.handleScroll,!1),this.animateButton()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}render(){return o(e,{key:"b4fb2fd83336752a5c67ab9ded8a20b871b8f967","data-version":r},o("button",{key:"cdee4a23f45f9293ac0da814f97df8bda73028ef",class:"back-to-top","aria-hidden":this.belowFold?"false":"true",tabindex:this.belowFold?"0":"-1",onClick:this.scrollToTop},o("post-icon",{key:"91e2be9b6c5dcd2b8e11aec4ff839de259d47a13","aria-hidden":"true",name:"arrowup"}),o("span",{key:"0bee6a5151a4919ddffc436924a8a494650b069a",class:"visually-hidden"},this.textBackToTop)))}get host(){return i(this)}static get watchers(){return{belowFold:[{watchBelowFold:0}]}}};(function(t,o,e,i){var s,r=arguments.length,a=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,o,e,i);else for(var c=t.length-1;c>=0;c--)(s=t[c])&&(a=(r<3?s(a):r>3?s(o,e,a):s(o,e))||a);r>3&&a&&Object.defineProperty(o,e,a)})([a(),c("string")],n.prototype,"textBackToTop",void 0),n.style=":host{opacity:0;--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;z-index:1019;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{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 .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";export{n as post_back_to_top}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as i,a}from"./p-BbDawWJ5.js";import"./p-BQ3HlJPr.js";import{v as s}from"./p-ClG-N42b.js";import{R as r}from"./p-D4F0BqBW.js";import{T as o}from"./p-Ck2qPht6.js";import{P as n}from"./p-DSNGJB58.js";import"./p-BRNqUiXj.js";var c=function(t,e,i,a){var s,r=arguments.length,o=r<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const d=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;var l;!function(t){t.Slotted="slotted",t.Image="image",t.Initials="initials",t[t.Null=null]="Null"}(l||(l={}));const h=class{constructor(e){t(this,e),this.avatarType=null,this.imageUrl="",this.imageAlt="",this.initials="",this.storageKey=""}updateEmail(){this.getAvatarImage()}async getAvatarImage(){let t=!1;this.slottedImage=this.host.querySelector("img");const e=this.slottedImage?.getAttribute("src");e?await this.getImageByProp(e,this.fetchSlottedImage.bind(this))?this.slottedImage.style.display="block":(this.slottedImage.style.display="none",this.avatarType=l.Initials):(this.email?.match(d)&&(t=await this.getImageByProp(this.email,this.fetchImageByEmail.bind(this))),t||(this.avatarType=l.Initials))}async getImageByProp(t,e){if(!t)return!1;let i;try{i=await e(t)}catch(t){return console.info("Loading avatar image failed.",t),!1}return!!i?.ok&&(this.imageUrl=i.url,this.imageAlt=`${this.firstname} ${this.lastname} avatar`,this.avatarType=l.Image,!0)}async fetchImageByEmail(){const t=await async function(t){return await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then((t=>Array.from(new Uint8Array(t)).map((t=>t.toString(16).padStart(2,"0"))).join("")))}(this.email),e="https://www.gravatar.com/avatar/{email}?s=80&d=404&r=g".replace("{email}",t);return await fetch(e)}async fetchSlottedImage(t){return await fetch(t,{method:"HEAD"})}slotChanged(){const t=this.host.shadowRoot.querySelector("slot");(t?.assignedNodes({flatten:!0})||[]).forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&"IMG"===t.tagName&&this.observeImageSrcChanges(t)})),this.getAvatarImage()}observeImageSrcChanges(t){this.slottedImageObserver&&this.slottedImageObserver.disconnect(),this.slottedImageObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&this.getAvatarImage()}))})),this.slottedImageObserver.observe(t,{attributes:!0,attributeFilter:["src"]})}connectedCallback(){this.avatarType=l.Initials,this.getAvatarImage()}render(){const t=[this.firstname,this.lastname].filter(Boolean).map((t=>t.trim())),a=t.map((t=>t.charAt(0))).join("").trim(),r=t.join(" ");return e(i,{key:"85af49f5beca48bec805f9c126e635b8b1042de3","data-version":s},e("span",{key:"950d20eeb38eae131bd2e459741ab03f7208ec37",class:"slotted"===this.avatarType?"":"d-none"},e("slot",{key:"5404e8d04de78e9c95d7b7e0b1dbb42fb6afc3e6",onSlotchange:this.slotChanged.bind(this)})),"image"===this.avatarType&&e("img",{key:"0d9c7b0f74e99072544eaa94b408d8e70f5cef57",src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&e("span",{key:"e7260e54f5510707b19016badad66920df6b38f0",class:"initials"},a,e("span",{key:"647fe23a98a1338936ce701024bae944d6cce7ae"},this.description??r)))}get host(){return a(this)}static get watchers(){return{email:[{updateEmail:0}]}}};c([r(),o("string")],h.prototype,"firstname",void 0),c([o("string")],h.prototype,"lastname",void 0),c([n(d)],h.prototype,"email",void 0),c([o("string")],h.prototype,"description",void 0),h.style=':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;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;font-weight:400;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.initials span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}';export{h as post_avatar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as t,h as i,H as e,a as s}from"./p-BbDawWJ5.js";import{f as r}from"./p-D5knoiyy.js";import"./p-BQ3HlJPr.js";import{E as a}from"./p-rEfV4v4a.js";import{v as c}from"./p-ClG-N42b.js";import{O as n}from"./p-IUnDBhPg.js";import"./p-CoDiS_Ik.js";import"./p-BRNqUiXj.js";var d=function(o,t,i,e){var s,r=arguments.length,a=r<3?t:null===e?e=Object.getOwnPropertyDescriptor(t,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(o,t,i,e);else for(var c=o.length-1;c>=0;c--)(s=o[c])&&(a=(r<3?s(a):r>3?s(t,i,a):s(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const l=class{constructor(i){o(this,i),this.postDismissed=t(this,"postDismissed"),this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.hasActions=!1,this.type="info"}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0})}componentDidLoad(){this.checkContent()}disconnectedCallback(){this.mutationObserver.disconnect()}async dismiss(){const o=r(this.host,"out");await o.finished,this.postDismissed.emit(),this.host.remove()}onCloseButtonClick(){this.dismiss()}checkContent(){this.hasActions=this.host.querySelectorAll('[slot="actions"]').length>0}render(){return i(e,{key:"97695d768495db6f56d797d58d94db4b935c5436","data-version":c,role:"alert","data-color-scheme":"light"},i("slot",{key:"d60d826952da373557af9b2362cd26f2e246796e",name:"close-button"}),i("slot",{key:"2f731ec8f29f6a8dc281fab5884a3dc2e4c4e5ae",name:"heading"}),i("slot",{key:"e4db84d239998661a3a3d68e7f1df0a076115b29"}),this.hasActions&&i("div",{key:"1b88d16970a728c3064d325296a529bc93cde41a",class:"actions"},i("slot",{key:"ea5570b8b8c23cb9a7c2b086ddd1a09a517e0f6a",name:"actions"})))}get host(){return s(this)}};d([n(["success","warning","error","info"])],l.prototype,"type",void 0),d([a("post-closebutton",{allowDescendants:!0})],l.prototype,"onCloseButtonClick",null),l.style=':host{position:relative;display:grid;grid-template-columns:1fr;grid-auto-rows:auto;grid-auto-flow:row;row-gap:var(--post-device-spacing-gap-block-1);min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));padding:var(--post-device-spacing-padding-10);padding-inline-start:calc( var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6) );color:var(--post-current-fg);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);border-radius:var(--post-device-border-radius-2);box-shadow:var(--post-device-elevation-100);background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host::before{content:"";display:block;position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);inset-block-start:var(--post-device-spacing-padding-10);inset-inline-start:var(--post-device-spacing-padding-10);background-image:var(--post-signal-icon-info)}:host([type=info]){background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host([type=info])::before{background-image:var(--post-signal-icon-info)}:host([type=success]){background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke)}:host([type=success])::before{background-image:var(--post-signal-icon-success)}:host([type=warning]){background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke)}:host([type=warning])::before{background-image:var(--post-signal-icon-warning)}:host([type=error]){background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke)}:host([type=error])::before{background-image:var(--post-signal-icon-error)}.actions{display:flex;flex-direction:row-reverse;justify-content:flex-start;align-items:center;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media screen and (min-width: 0)and (max-width: 599.98px){.actions{flex-direction:column;align-items:stretch}}::slotted(*){margin-block:0 !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border-color:CanvasText}:host::before{color:CanvasText}}';export{l as post_banner}
|