@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,35 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var _package = require('./package-Ds_LS1pB.js');
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
5
4
|
var fade = require('./fade-CPQhl1fP.js');
|
|
6
|
-
|
|
7
|
-
require('./
|
|
5
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
6
|
+
var componentOnReady = require('./component-on-ready-CifOTqw1.js');
|
|
7
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
8
|
+
var type = require('./type-shT641Eo.js');
|
|
8
9
|
require('./utils-s05L2ulk.js');
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
12
|
-
* @see https://stenciljs.com/docs/api#componentonready
|
|
13
|
-
*/
|
|
14
|
-
function componentOnReady(el) {
|
|
15
|
-
if (typeof el.componentOnReady === 'function') {
|
|
16
|
-
return el.componentOnReady();
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return new Promise(resolve => customOnReady(() => {
|
|
20
|
-
resolve(el);
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function customOnReady(callback) {
|
|
25
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
26
|
-
return requestAnimationFrame(callback);
|
|
27
|
-
}
|
|
28
|
-
return setTimeout(callback);
|
|
29
|
-
}
|
|
10
|
+
require('./create-validator-decorator-Bnx17kwi.js');
|
|
30
11
|
|
|
31
12
|
const postTabsCss = () => `.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)}`;
|
|
32
13
|
|
|
14
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
17
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
18
|
+
else
|
|
19
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
20
|
+
if (d = decorators[i])
|
|
21
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
33
24
|
const PostTabs = class {
|
|
34
25
|
constructor(hostRef) {
|
|
35
26
|
index.registerInstance(this, hostRef);
|
|
@@ -50,8 +41,8 @@ const PostTabs = class {
|
|
|
50
41
|
return Array.from(this.host.querySelectorAll('post-tab-panel')).filter(panel => panel.closest('post-tabs') === this.host);
|
|
51
42
|
}
|
|
52
43
|
validateLabel() {
|
|
53
|
-
if (this.isNavigationMode) {
|
|
54
|
-
|
|
44
|
+
if (this.isNavigationMode && !this.label) {
|
|
45
|
+
console.error(`[${this.host.localName}] Property "label" is required in navigation mode. Received: ${JSON.stringify(this.label)}.`, this.host);
|
|
55
46
|
}
|
|
56
47
|
}
|
|
57
48
|
componentWillRender() {
|
|
@@ -225,7 +216,7 @@ const PostTabs = class {
|
|
|
225
216
|
if (!this.tabs)
|
|
226
217
|
return;
|
|
227
218
|
this.tabs.forEach(async (tab) => {
|
|
228
|
-
await componentOnReady(tab);
|
|
219
|
+
await componentOnReady.componentOnReady(tab);
|
|
229
220
|
// In navigation mode, navigation is handled by the consumer's routing
|
|
230
221
|
if (this.isNavigationMode) {
|
|
231
222
|
return;
|
|
@@ -315,10 +306,10 @@ const PostTabs = class {
|
|
|
315
306
|
}
|
|
316
307
|
render() {
|
|
317
308
|
const TabsContainer = this.isNavigationMode ? 'nav' : 'div';
|
|
318
|
-
return (index.h(index.Host, { key: '
|
|
309
|
+
return (index.h(index.Host, { key: '3b674ed455e34a7efc1c1ffed14ac719a7ecb061', "data-version": _package.version }, index.h("div", { key: '749f4695adc7c3125bfb678606249c48a4d7ea31', class: "tabs-wrapper", part: "post-tabs" }, index.h(TabsContainer, { key: 'c06c83dbcbdf9f3fd38f01db7beae181748b369d', class: "tabs", role: this.isNavigationMode ? undefined : 'tablist', "aria-label": this.isNavigationMode ? this.label : undefined }, index.h("slot", { key: 'b065d0200fb2d4b6a63e23141d3e625a4147a93d', onSlotchange: () => {
|
|
319
310
|
this.moveMisplacedTabs();
|
|
320
311
|
this.enableTabs();
|
|
321
|
-
} }))), !this.isNavigationMode && (index.h("div", { key: '
|
|
312
|
+
} }))), !this.isNavigationMode && (index.h("div", { key: '8dc41274f8c9da24b2d65eebf213ea35c41368d0', class: "tab-content", part: "post-tabs-content" }, index.h("slot", { key: 'e859256ebcb60fc0457349ca991508406b3bc309', name: "panels", onSlotchange: () => this.moveMisplacedPanels() })))));
|
|
322
313
|
}
|
|
323
314
|
get host() { return index.getElement(this); }
|
|
324
315
|
static get watchers() { return {
|
|
@@ -327,6 +318,9 @@ const PostTabs = class {
|
|
|
327
318
|
}]
|
|
328
319
|
}; }
|
|
329
320
|
};
|
|
321
|
+
__decorate([
|
|
322
|
+
type.Type('string')
|
|
323
|
+
], PostTabs.prototype, "label", void 0);
|
|
330
324
|
PostTabs.style = postTabsCss();
|
|
331
325
|
|
|
332
326
|
exports.post_tabs = PostTabs;
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
|
|
5
|
-
require('./
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
require('./
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
4
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
5
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
6
|
+
var required = require('./required-lRDOdbd6.js');
|
|
7
|
+
var type = require('./type-shT641Eo.js');
|
|
8
|
+
require('./create-validator-decorator-Bnx17kwi.js');
|
|
9
9
|
|
|
10
10
|
const postTooltipTriggerCss = () => `post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}`;
|
|
11
11
|
|
|
12
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else
|
|
17
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
18
|
+
if (d = decorators[i])
|
|
19
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
12
22
|
const TRIGGER_EVENTS = ['pointerenter', 'pointerleave', 'focusin', 'focusout', 'long-press'];
|
|
13
|
-
|
|
14
|
-
(async () => {
|
|
15
|
-
await Promise.resolve().then(function () { return require('./long-press-event-Dx21Ojod.js'); });
|
|
16
|
-
})();
|
|
17
|
-
}
|
|
23
|
+
let isFocusable;
|
|
18
24
|
const PostTooltipTrigger = class {
|
|
19
25
|
constructor(hostRef) {
|
|
20
26
|
index.registerInstance(this, hostRef);
|
|
@@ -33,13 +39,21 @@ const PostTooltipTrigger = class {
|
|
|
33
39
|
this.boundTriggerHandler = this.handleTriggerEvent.bind(this);
|
|
34
40
|
this.boundTooltipHandler = this.handleTooltipEvent.bind(this);
|
|
35
41
|
}
|
|
36
|
-
validateControlFor() {
|
|
37
|
-
index$1.checkEmptyOrType(this, 'for', 'string');
|
|
38
|
-
}
|
|
39
42
|
get tooltip() {
|
|
40
43
|
const ref = document.getElementById(this.for);
|
|
41
44
|
return ref?.localName === 'post-tooltip' ? ref : null;
|
|
42
45
|
}
|
|
46
|
+
componentWillLoad() {
|
|
47
|
+
{
|
|
48
|
+
// Fire-and-forget: long-press-event registers a global event listener on import.
|
|
49
|
+
Promise.resolve().then(function () { return require('./long-press-event-Dx21Ojod.js'); });
|
|
50
|
+
// Load ally.js lazily; setupTrigger uses optional chaining to handle the
|
|
51
|
+
// case where it hasn't loaded yet (falls back to adding tabindex="0").
|
|
52
|
+
Promise.resolve().then(function () { return require('./focusable-COT2uiEV.js'); }).then(function (n) { return n.focusable; }).then(m => {
|
|
53
|
+
isFocusable ?? (isFocusable = m.default);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
43
57
|
componentDidLoad() {
|
|
44
58
|
this.setupTrigger();
|
|
45
59
|
this.attachListeners();
|
|
@@ -79,7 +93,7 @@ const PostTooltipTrigger = class {
|
|
|
79
93
|
setupTrigger() {
|
|
80
94
|
this.trigger = this.host.querySelector('*');
|
|
81
95
|
if (this.trigger) {
|
|
82
|
-
if (!
|
|
96
|
+
if (!isFocusable?.(this.trigger)) {
|
|
83
97
|
this.trigger.setAttribute('tabindex', '0');
|
|
84
98
|
}
|
|
85
99
|
const describedBy = this.trigger.getAttribute('aria-describedby') || '';
|
|
@@ -172,15 +186,14 @@ const PostTooltipTrigger = class {
|
|
|
172
186
|
this.tooltip?.hide();
|
|
173
187
|
}
|
|
174
188
|
render() {
|
|
175
|
-
return (index.h(index.Host, { key: '
|
|
189
|
+
return (index.h(index.Host, { key: 'a1f51fabc4417e30a2b3454f9faf239a3a1f8071', "data-version": _package.version }, index.h("slot", { key: '0ee1caede699ad7bc0c529f6fd1dd85c63107136', onSlotchange: () => this.handleSlotChange() })));
|
|
176
190
|
}
|
|
177
191
|
get host() { return index.getElement(this); }
|
|
178
|
-
static get watchers() { return {
|
|
179
|
-
"for": [{
|
|
180
|
-
"validateControlFor": 0
|
|
181
|
-
}]
|
|
182
|
-
}; }
|
|
183
192
|
};
|
|
193
|
+
__decorate([
|
|
194
|
+
required.Required(),
|
|
195
|
+
type.Type('string')
|
|
196
|
+
], PostTooltipTrigger.prototype, "for", void 0);
|
|
184
197
|
PostTooltipTrigger.style = postTooltipTriggerCss();
|
|
185
198
|
|
|
186
199
|
exports.post_tooltip_trigger = PostTooltipTrigger;
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var _package = require('./package-Ds_LS1pB.js');
|
|
5
|
-
var index$1 = require('./index-qCzRmwgB.js');
|
|
6
|
-
require('./index-YBj3gUJp.js');
|
|
3
|
+
var index = require('./index-ngUOBQot.js');
|
|
7
4
|
var placement = require('./placement-qEFR9hmI.js');
|
|
5
|
+
require('./breakpoints-B0Olgvgc.js');
|
|
6
|
+
var _package = require('./package-Bi-tiNRc.js');
|
|
7
|
+
var oneOf = require('./one-of-BHyX4vYq.js');
|
|
8
|
+
require('./create-validator-decorator-Bnx17kwi.js');
|
|
8
9
|
|
|
9
10
|
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}`;
|
|
10
11
|
|
|
12
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
13
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
15
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
16
|
+
else
|
|
17
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
18
|
+
if (d = decorators[i])
|
|
19
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
20
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21
|
+
};
|
|
11
22
|
const PostTooltip = class {
|
|
12
23
|
constructor(hostRef) {
|
|
13
24
|
index.registerInstance(this, hostRef);
|
|
@@ -26,12 +37,6 @@ const PostTooltip = class {
|
|
|
26
37
|
*/
|
|
27
38
|
this.open = false;
|
|
28
39
|
}
|
|
29
|
-
validatePlacement() {
|
|
30
|
-
index$1.checkEmptyOrOneOf(this, 'placement', placement.PLACEMENT_TYPES);
|
|
31
|
-
}
|
|
32
|
-
componentWillLoad() {
|
|
33
|
-
this.validatePlacement();
|
|
34
|
-
}
|
|
35
40
|
componentDidLoad() {
|
|
36
41
|
if (!this.host.id) {
|
|
37
42
|
console.error(
|
|
@@ -71,15 +76,13 @@ const PostTooltip = class {
|
|
|
71
76
|
}
|
|
72
77
|
render() {
|
|
73
78
|
const popoverClass = `${this.arrow ? 'has-arrow' : ''}`;
|
|
74
|
-
return (index.h(index.Host, { key: '
|
|
79
|
+
return (index.h(index.Host, { key: '8186d5446993e1c21c107a496239e56af2493e87', "data-version": _package.version }, index.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) }, index.h("slot", { key: '0443322d0ef00792b14e69fd55abaf42f64c0838' }))));
|
|
75
80
|
}
|
|
76
81
|
get host() { return index.getElement(this); }
|
|
77
|
-
static get watchers() { return {
|
|
78
|
-
"placement": [{
|
|
79
|
-
"validatePlacement": 0
|
|
80
|
-
}]
|
|
81
|
-
}; }
|
|
82
82
|
};
|
|
83
|
+
__decorate([
|
|
84
|
+
oneOf.OneOf(placement.PLACEMENT_TYPES)
|
|
85
|
+
], PostTooltip.prototype, "placement", void 0);
|
|
83
86
|
PostTooltip.style = postTooltipCss();
|
|
84
87
|
|
|
85
88
|
exports.post_tooltip = PostTooltip;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var createValidatorDecorator = require('./create-validator-decorator-Bnx17kwi.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Property decorator that validates the property is not empty.
|
|
7
|
+
* If the property is empty (undefined, null, '', NaN), an error is logged.
|
|
8
|
+
* This validator is blocking: if it fails, subsequent validators will not run.
|
|
9
|
+
*
|
|
10
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
11
|
+
*
|
|
12
|
+
* @param options - Optional configuration.
|
|
13
|
+
* @param options.when - The property name to watch. Validation only runs when this property's value matches the `truthy` option.
|
|
14
|
+
* @param options.truthy - The value that the `when` property must match for validation to run. Defaults to `true`.
|
|
15
|
+
*/
|
|
16
|
+
function Required(options) {
|
|
17
|
+
const validator = createValidatorDecorator.createValidatorDecorator({
|
|
18
|
+
priority: 0,
|
|
19
|
+
blocking: true,
|
|
20
|
+
validateEmptyValues: true,
|
|
21
|
+
run(component, property) {
|
|
22
|
+
if (options && typeof options.when === 'string') {
|
|
23
|
+
const truthy = options.truthy ?? true;
|
|
24
|
+
if (component[options.when] !== truthy) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const { value, showError } = createValidatorDecorator.getValidationContext(component, property);
|
|
29
|
+
if (createValidatorDecorator.isValueEmpty(value)) {
|
|
30
|
+
showError('is required');
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
return function (target, property) {
|
|
37
|
+
validator(target, property);
|
|
38
|
+
if (options?.when) {
|
|
39
|
+
createValidatorDecorator.registerDependency(target, options.when, property);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
exports.Required = Required;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var createValidatorDecorator = require('./create-validator-decorator-Bnx17kwi.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Property decorator that validates the property value is of the specified type.
|
|
7
|
+
*
|
|
8
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
9
|
+
*
|
|
10
|
+
* @param type - The expected type ('boolean', 'number', 'string', 'array', 'object', 'function').
|
|
11
|
+
*/
|
|
12
|
+
function Type(type) {
|
|
13
|
+
return createValidatorDecorator.createValidatorDecorator({
|
|
14
|
+
priority: 1,
|
|
15
|
+
blocking: false,
|
|
16
|
+
run(component, property) {
|
|
17
|
+
const { value, showError } = createValidatorDecorator.getValidationContext(component, property);
|
|
18
|
+
const typeIsArray = type === 'array';
|
|
19
|
+
const valueIsArray = Array.isArray(value);
|
|
20
|
+
const isValid = typeIsArray || valueIsArray ? valueIsArray === typeIsArray : typeof value === type;
|
|
21
|
+
if (!isValid) {
|
|
22
|
+
showError(`must be of type "${type}"`);
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.Type = Type;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var createValidatorDecorator = require('./create-validator-decorator-Bnx17kwi.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Property decorator that validates the property value is a valid URL.
|
|
7
|
+
*
|
|
8
|
+
* Validation runs on `componentDidLoad` and whenever the property value changes.
|
|
9
|
+
*/
|
|
10
|
+
function Url() {
|
|
11
|
+
return createValidatorDecorator.createValidatorDecorator({
|
|
12
|
+
priority: 1,
|
|
13
|
+
blocking: false,
|
|
14
|
+
run(component, property) {
|
|
15
|
+
const { value, showError } = createValidatorDecorator.getValidationContext(component, property);
|
|
16
|
+
let isValid = typeof value === 'string' || value instanceof URL;
|
|
17
|
+
if (isValid) {
|
|
18
|
+
try {
|
|
19
|
+
new URL(value, 'https://www.post.ch');
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
isValid = false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (!isValid) {
|
|
26
|
+
showError('must be a valid URL');
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.Url = Url;
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"components/post-popover/post-popover.js",
|
|
34
34
|
"components/post-popover-trigger/post-popover-trigger.js",
|
|
35
35
|
"components/post-popovercontainer/post-popovercontainer.js",
|
|
36
|
+
"components/post-progressbar/post-progressbar.js",
|
|
36
37
|
"components/post-rating/post-rating.js",
|
|
37
38
|
"components/post-stepper/post-stepper.js",
|
|
38
39
|
"components/post-stepper-item/post-stepper-item.js",
|
|
@@ -8,10 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
9
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
10
|
};
|
|
11
|
-
import { h, Host } from "@stencil/core";
|
|
12
|
-
import { version } from "../../../../package";
|
|
13
11
|
import { HEADING_LEVELS } from "../../types/index";
|
|
14
|
-
import {
|
|
12
|
+
import { EventFrom, OneOf, Required } from "../../utils/index";
|
|
13
|
+
import { version } from "../../../../package";
|
|
14
|
+
import { h, Host } from "@stencil/core";
|
|
15
15
|
/**
|
|
16
16
|
* @slot default - Slot for placing post-accordion-item components.
|
|
17
17
|
*/
|
|
@@ -23,8 +23,7 @@ export class PostAccordion {
|
|
|
23
23
|
*/
|
|
24
24
|
this.multiple = false;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
checkRequiredAndOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
26
|
+
syncHeadingLevel() {
|
|
28
27
|
this.accordionItems.forEach(item => {
|
|
29
28
|
item.setAttribute('heading-level', String(this.headingLevel));
|
|
30
29
|
});
|
|
@@ -33,7 +32,7 @@ export class PostAccordion {
|
|
|
33
32
|
this.registerAccordionItems();
|
|
34
33
|
}
|
|
35
34
|
componentDidLoad() {
|
|
36
|
-
this.
|
|
35
|
+
this.syncHeadingLevel();
|
|
37
36
|
}
|
|
38
37
|
collapseToggleHandler(event) {
|
|
39
38
|
const toggledAccordionItem = event.target;
|
|
@@ -97,7 +96,7 @@ export class PostAccordion {
|
|
|
97
96
|
});
|
|
98
97
|
}
|
|
99
98
|
render() {
|
|
100
|
-
return (h(Host, { key: '
|
|
99
|
+
return (h(Host, { key: '27862337a90223900241d38a1b1d27cb5923acba', "data-version": version }, h("div", { key: 'e858da8742240aa57f72ac04a4253d5e88910295', class: "accordion" }, h("slot", { key: '004ab6089b44a2528ea56cffed3bef0791dae068', onSlotchange: () => this.registerAccordionItems() }))));
|
|
101
100
|
}
|
|
102
101
|
static get is() { return "post-accordion"; }
|
|
103
102
|
static get encapsulation() { return "shadow"; }
|
|
@@ -224,7 +223,7 @@ export class PostAccordion {
|
|
|
224
223
|
static get watchers() {
|
|
225
224
|
return [{
|
|
226
225
|
"propName": "headingLevel",
|
|
227
|
-
"methodName": "
|
|
226
|
+
"methodName": "syncHeadingLevel"
|
|
228
227
|
}];
|
|
229
228
|
}
|
|
230
229
|
static get listeners() {
|
|
@@ -237,6 +236,10 @@ export class PostAccordion {
|
|
|
237
236
|
}];
|
|
238
237
|
}
|
|
239
238
|
}
|
|
239
|
+
__decorate([
|
|
240
|
+
Required(),
|
|
241
|
+
OneOf(HEADING_LEVELS)
|
|
242
|
+
], PostAccordion.prototype, "headingLevel", void 0);
|
|
240
243
|
__decorate([
|
|
241
244
|
EventFrom('post-accordion-item')
|
|
242
245
|
], PostAccordion.prototype, "collapseToggleHandler", null);
|
|
@@ -8,11 +8,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
9
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { EventFrom, nanoid } from "../../utils/index";
|
|
12
12
|
import { version } from "../../../../package";
|
|
13
|
-
import {
|
|
14
|
-
import { checkEmptyOrOneOf, EventFrom } from "../../utils/index";
|
|
15
|
-
import { nanoid } from "nanoid";
|
|
13
|
+
import { h, Host } from "@stencil/core";
|
|
16
14
|
/**
|
|
17
15
|
* @part post-accordion-button - The element that toggles the accordion item (header button).
|
|
18
16
|
* @part post-accordion-body - The element that holds the accordion item's content.
|
|
@@ -27,15 +25,9 @@ export class PostAccordionItem {
|
|
|
27
25
|
*/
|
|
28
26
|
this.collapsed = false;
|
|
29
27
|
}
|
|
30
|
-
validateHeadingLevel() {
|
|
31
|
-
checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
32
|
-
}
|
|
33
28
|
componentWillLoad() {
|
|
34
29
|
this.id = this.host.id || `p${nanoid(6)}`;
|
|
35
30
|
}
|
|
36
|
-
componentDidLoad() {
|
|
37
|
-
this.validateHeadingLevel();
|
|
38
|
-
}
|
|
39
31
|
// Capture to make sure the "collapsed" property is updated before the event is consumed
|
|
40
32
|
onCollapseToggle(event) {
|
|
41
33
|
this.collapsed = !event.detail;
|
|
@@ -55,10 +47,10 @@ export class PostAccordionItem {
|
|
|
55
47
|
render() {
|
|
56
48
|
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
57
49
|
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
58
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: '67b3be2ea798d007c3c05fafaa95d447bd3245b4', id: this.id, "data-version": version }, h("post-collapsible-trigger", { key: '2c545ead0717cefef325576125b548db4c7d6e11', for: `${this.id}--collapse` }, h(HeadingTag, { key: '82840144efc0588a73f5aaa734e1492acccd498e', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: 'bfd05c00e2df07800a20a9e0b69e6b918d80085d', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "post-accordion-button" }, h("span", { key: 'af2e574d4e521316f9d5e4da040d777e0384c783', class: {
|
|
59
51
|
'logo-container': true,
|
|
60
52
|
'has-image': !!this.slottedLogo,
|
|
61
|
-
} }, h("slot", { key: '
|
|
53
|
+
} }, h("slot", { key: '178cf7d6e26f52d8fe2fc15ef026db4bd51ff70c', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: 'c160f107a8bc7be52a538f6f19ffaa25fa4a729d', name: "header" }), h("post-icon", { key: '19d621e055e1973d1a0e3e7cb750a88101f962d3', name: "chevronup" })))), h("post-collapsible", { key: 'f0ff63e67476cc05467db907e010cd1c026aa044', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: '73418485496fa27ecc98e068317e39cea6dd8f2b', class: "accordion-body", part: "post-accordion-body" }, h("slot", { key: '7a0e5d6c3b8da2e3170b5e47104d3ff4509b2040' })))));
|
|
62
54
|
}
|
|
63
55
|
static get is() { return "post-accordion-item"; }
|
|
64
56
|
static get encapsulation() { return "shadow"; }
|
|
@@ -157,12 +149,6 @@ export class PostAccordionItem {
|
|
|
157
149
|
};
|
|
158
150
|
}
|
|
159
151
|
static get elementRef() { return "host"; }
|
|
160
|
-
static get watchers() {
|
|
161
|
-
return [{
|
|
162
|
-
"propName": "headingLevel",
|
|
163
|
-
"methodName": "validateHeadingLevel"
|
|
164
|
-
}];
|
|
165
|
-
}
|
|
166
152
|
static get listeners() {
|
|
167
153
|
return [{
|
|
168
154
|
"name": "postToggle",
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else
|
|
6
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
7
|
+
if (d = decorators[i])
|
|
8
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
+
};
|
|
11
|
+
import { debounce, Required, Type } from "../../utils/index";
|
|
2
12
|
import { version } from "../../../../package";
|
|
3
|
-
import {
|
|
13
|
+
import { h, Host } from "@stencil/core";
|
|
4
14
|
/**
|
|
5
15
|
* @slot default - Slot for placing post-autocomplete-item components.
|
|
6
16
|
*/
|
|
@@ -113,9 +123,6 @@ export class PostAutocomplete {
|
|
|
113
123
|
}
|
|
114
124
|
};
|
|
115
125
|
}
|
|
116
|
-
validateTextAvailableSuggestions() {
|
|
117
|
-
checkRequiredAndType(this, 'textAvailableSuggestions', 'string');
|
|
118
|
-
}
|
|
119
126
|
get inputElement() {
|
|
120
127
|
return this.host.querySelector('input');
|
|
121
128
|
}
|
|
@@ -128,7 +135,6 @@ export class PostAutocomplete {
|
|
|
128
135
|
}
|
|
129
136
|
}
|
|
130
137
|
componentWillLoad() {
|
|
131
|
-
this.validateTextAvailableSuggestions();
|
|
132
138
|
if (!this.inputElement)
|
|
133
139
|
return;
|
|
134
140
|
this.inputElement.role = 'combobox';
|
|
@@ -139,6 +145,12 @@ export class PostAutocomplete {
|
|
|
139
145
|
this.listBoxElement.id = crypto.randomUUID();
|
|
140
146
|
this.inputElement.setAttribute('aria-controls', this.listBoxElement.id);
|
|
141
147
|
this.inputElement.setAttribute('aria-expanded', 'false');
|
|
148
|
+
const inputLabel = this.inputElement.labels?.[0];
|
|
149
|
+
if (inputLabel) {
|
|
150
|
+
if (!inputLabel.id)
|
|
151
|
+
inputLabel.id = crypto.randomUUID();
|
|
152
|
+
this.listBoxElement.setAttribute('aria-labelledby', inputLabel.id);
|
|
153
|
+
}
|
|
142
154
|
// Because we're handling that and the browser would show a duplicate native autocomplete dropdown
|
|
143
155
|
this.inputElement.autocomplete = 'off';
|
|
144
156
|
this.attachInputListeners();
|
|
@@ -187,7 +199,7 @@ export class PostAutocomplete {
|
|
|
187
199
|
this.outputElement.textContent = this.textAvailableSuggestions.replace('{count}', String(count));
|
|
188
200
|
}
|
|
189
201
|
render() {
|
|
190
|
-
return (h(Host, { key: '
|
|
202
|
+
return (h(Host, { key: 'd8f594b17240359b03d1e443d0f8ea28a1a5f687', "data-version": version }, h("slot", { key: 'b76771582cdfb4f84e6018551508daaa5e5c91c5' }), this.clearable && this.inputValue && (h("button", { key: 'ff6255a9b10df6609703bfa302d519b52931786e', type: "button", class: "autocomplete-clear", onClick: this.clearInput }, h("post-icon", { key: '3c7da3532ae720ab6f392a8de8b2ca21e4b092aa', "aria-hidden": "true", name: "closex" }))), h("post-icon", { key: 'd2a3c04b68a3b9b3303b80f37292578c5182157e', "aria-hidden": "true", class: "autocomplete-icon", name: "chevronDown" }), h("output", { key: '187a75fa1e1935a372521c57f75c6740f330f891', class: "visually-hidden", ref: el => (this.outputElement = el) })));
|
|
191
203
|
}
|
|
192
204
|
static get is() { return "post-autocomplete"; }
|
|
193
205
|
static get encapsulation() { return "shadow"; }
|
|
@@ -307,10 +319,8 @@ export class PostAutocomplete {
|
|
|
307
319
|
}];
|
|
308
320
|
}
|
|
309
321
|
static get elementRef() { return "host"; }
|
|
310
|
-
static get watchers() {
|
|
311
|
-
return [{
|
|
312
|
-
"propName": "textAvailableSuggestions",
|
|
313
|
-
"methodName": "validateTextAvailableSuggestions"
|
|
314
|
-
}];
|
|
315
|
-
}
|
|
316
322
|
}
|
|
323
|
+
__decorate([
|
|
324
|
+
Required(),
|
|
325
|
+
Type('string')
|
|
326
|
+
], PostAutocomplete.prototype, "textAvailableSuggestions", void 0);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
const GRAVATAR_DEFAULT = '404';
|
|
3
3
|
const GRAVATAR_RATING = 'g';
|
|
4
4
|
const GRAVATAR_SIZE = 80;
|
|
5
|
-
export function getGravatarUrl(email) {
|
|
6
|
-
const hash = cryptify(email.trim().toLowerCase());
|
|
5
|
+
export async function getGravatarUrl(email) {
|
|
6
|
+
const hash = await cryptify(email.trim().toLowerCase());
|
|
7
7
|
return `https://www.gravatar.com/avatar/${hash}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
|
|
8
8
|
}
|
|
9
9
|
export async function cryptify(key) {
|