@swisspost/design-system-components 10.0.0-next.71 → 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/create-validator-decorator-Bnx17kwi.js +223 -0
- package/dist/cjs/{index-CCteMCnR.js → index-ngUOBQot.js} +5 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/one-of-BHyX4vYq.js +27 -0
- package/dist/cjs/{package-CscM89A7.js → package-Bi-tiNRc.js} +1 -1
- package/dist/cjs/pattern-BgBx5zGQ.js +27 -0
- package/dist/cjs/post-accordion_2.cjs.entry.js +15 -21
- package/dist/cjs/post-autocomplete.cjs.entry.js +26 -13
- package/dist/cjs/post-avatar.cjs.entry.js +30 -33
- package/dist/cjs/post-back-to-top.cjs.entry.js +20 -11
- package/dist/cjs/post-banner.cjs.entry.js +8 -13
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +33 -23
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
- package/dist/cjs/post-closebutton_14.cjs.entry.js +238 -272
- package/dist/cjs/post-collapsible_2.cjs.entry.js +56 -39
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +140 -138
- package/dist/cjs/post-footer.cjs.entry.js +24 -17
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox-option.cjs.entry.js +2 -2
- package/dist/cjs/post-listbox.cjs.entry.js +3 -5
- package/dist/cjs/post-login-widget.cjs.entry.js +28 -29
- package/dist/cjs/post-number-input.cjs.entry.js +2 -2
- package/dist/cjs/post-pagination.cjs.entry.js +50 -80
- package/dist/cjs/post-popover-trigger.cjs.entry.js +21 -18
- package/dist/cjs/post-popover.cjs.entry.js +24 -22
- package/dist/cjs/post-progressbar.cjs.entry.js +147 -0
- package/dist/cjs/post-rating.cjs.entry.js +33 -34
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +48 -37
- package/dist/cjs/post-tab-item.cjs.entry.js +20 -12
- package/dist/cjs/post-tab-panel.cjs.entry.js +20 -13
- package/dist/cjs/post-tabs.cjs.entry.js +21 -7
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +21 -12
- 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 -17
- package/dist/collection/components/post-autocomplete/post-autocomplete.js +23 -13
- package/dist/collection/components/post-avatar/post-avatar.js +27 -33
- 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.js +27 -22
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -34
- 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.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 +34 -47
- package/dist/collection/components/post-language-menu/post-language-menu.js +15 -20
- package/dist/collection/components/post-language-menu-item/post-language-menu-item.js +28 -39
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +3 -5
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +1 -1
- package/dist/collection/components/post-login-widget/post-login-widget.js +25 -29
- 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 +10 -23
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +17 -13
- package/dist/collection/components/post-number-input/post-number-input.js +3 -3
- package/dist/collection/components/post-pagination/post-pagination.js +47 -82
- 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.js +25 -30
- 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 -12
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +17 -13
- 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 +17 -12
- package/dist/collection/utils/index.js +3 -4
- package/dist/collection/utils/is-value-empty.js +1 -1
- package/dist/collection/utils/property-decorators/bound.js +75 -0
- package/dist/collection/utils/property-decorators/create-validator-decorator.js +24 -0
- package/dist/collection/utils/property-decorators/index.js +1 -1
- package/dist/collection/utils/property-decorators/required.js +19 -3
- package/dist/component-names.json +1 -0
- package/dist/components/breakpoints.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- 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-avatar2.js +1 -1
- 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-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-trigger2.js +1 -1
- package/dist/components/post-menu2.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-DPKR_4uI.js → p-85IGlhtB.js} +1 -1
- 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-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-BC0-M_SK.js → p-PM7l--ff.js} +1 -1
- 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 +106 -4
- package/dist/esm/create-validator-decorator-D8qwF5Qe.js +218 -0
- package/dist/esm/{index-DmBWUef5.js → index-BbDawWJ5.js} +5 -1
- package/dist/esm/loader.js +3 -3
- 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 +15 -21
- package/dist/esm/post-autocomplete.entry.js +26 -13
- package/dist/esm/post-avatar.entry.js +30 -33
- package/dist/esm/post-back-to-top.entry.js +20 -11
- package/dist/esm/post-banner.entry.js +8 -13
- package/dist/esm/post-breadcrumb-item.entry.js +33 -23
- package/dist/esm/post-breadcrumbs.entry.js +33 -34
- package/dist/esm/post-closebutton_14.entry.js +238 -272
- package/dist/esm/post-collapsible_2.entry.js +56 -39
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +140 -138
- package/dist/esm/post-footer.entry.js +20 -13
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/post-listbox-option.entry.js +2 -2
- package/dist/esm/post-listbox.entry.js +3 -5
- package/dist/esm/post-login-widget.entry.js +28 -29
- package/dist/esm/post-number-input.entry.js +2 -2
- package/dist/esm/post-pagination.entry.js +50 -80
- package/dist/esm/post-popover-trigger.entry.js +19 -16
- package/dist/esm/post-popover.entry.js +24 -22
- package/dist/esm/post-progressbar.entry.js +145 -0
- package/dist/esm/post-rating.entry.js +28 -29
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +48 -37
- package/dist/esm/post-tab-item.entry.js +20 -12
- package/dist/esm/post-tab-panel.entry.js +20 -13
- package/dist/esm/post-tabs.entry.js +21 -7
- package/dist/esm/post-tooltip-trigger.entry.js +21 -12
- 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-08a0e8e9.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-4b445a35.entry.js → p-686a6e22.entry.js} +1 -1
- package/dist/post-components/p-758fc84f.entry.js +1 -0
- package/dist/post-components/{p-bab0f27f.entry.js → p-7f929bb9.entry.js} +1 -1
- 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-BRNqUiXj.js +1 -0
- package/dist/post-components/p-BbDawWJ5.js +2 -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-39143e19.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/post-components.css +1 -1
- 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/post-avatar.d.ts +0 -5
- 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 +0 -3
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +0 -4
- 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 +0 -4
- 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 +1 -4
- 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 +0 -2
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +0 -1
- package/dist/types/components.d.ts +51 -5
- package/dist/types/utils/index.d.ts +3 -4
- package/dist/types/utils/property-decorators/bound.d.ts +36 -0
- package/dist/types/utils/property-decorators/create-validator-decorator.d.ts +5 -0
- package/dist/types/utils/property-decorators/index.d.ts +1 -1
- package/dist/types/utils/property-decorators/required.d.ts +10 -1
- package/hydrate/index.js +1310 -926
- package/hydrate/index.mjs +1310 -926
- package/package.json +4 -4
- package/dist/cjs/index-qCzRmwgB.js +0 -114
- 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/index2.js +0 -1
- package/dist/components/react/p-BQ3HlJPr.js +0 -1
- package/dist/components/react/p-C7s9oglQ.js +0 -1
- package/dist/components/react/p-CTgZ8DGr.js +0 -1
- package/dist/components/react/p-CVtlwDsT.js +0 -1
- package/dist/components/react/p-CaLwTf3T.js +0 -1
- package/dist/components/react/p-ClJyTIVM.js +0 -1
- package/dist/components/react/p-DGr-hfLq.js +0 -1
- package/dist/components/react/p-DJxdj9pa.js +0 -1
- package/dist/components/react/p-DKDEtjQe.js +0 -1
- package/dist/components/react/p-DcEDGaFs.js +0 -1
- package/dist/components/react/p-DipfA69b.js +0 -1
- package/dist/components/react/p-DwZxAC2u.js +0 -1
- package/dist/components/react/p-r4txK0AC.js +0 -1
- package/dist/components/react/p-x3kxyWSZ.js +0 -1
- package/dist/esm/index-D9bU2pIE.js +0 -104
- package/dist/esm/package-x3kxyWSZ.js +0 -3
- package/dist/post-components/p-1583817b.entry.js +0 -1
- package/dist/post-components/p-203d9abd.entry.js +0 -1
- package/dist/post-components/p-2c68af27.entry.js +0 -1
- package/dist/post-components/p-46dd9e7e.entry.js +0 -1
- package/dist/post-components/p-53a8cce5.entry.js +0 -1
- package/dist/post-components/p-72bff1fc.entry.js +0 -1
- package/dist/post-components/p-75045028.entry.js +0 -1
- package/dist/post-components/p-768b4516.entry.js +0 -1
- package/dist/post-components/p-7e072450.entry.js +0 -1
- package/dist/post-components/p-83cb6424.entry.js +0 -1
- package/dist/post-components/p-94f4da57.entry.js +0 -1
- package/dist/post-components/p-9dace750.entry.js +0 -1
- package/dist/post-components/p-9ea7e46f.entry.js +0 -1
- package/dist/post-components/p-D9bU2pIE.js +0 -1
- package/dist/post-components/p-DmBWUef5.js +0 -2
- package/dist/post-components/p-a0ac814c.entry.js +0 -1
- package/dist/post-components/p-a0d12ca8.entry.js +0 -1
- package/dist/post-components/p-cb039d66.entry.js +0 -1
- package/dist/post-components/p-e8cda4e1.entry.js +0 -1
- package/dist/post-components/p-e8e50d5c.entry.js +0 -1
- package/dist/post-components/p-eb64ec1d.entry.js +0 -1
- package/dist/post-components/p-f0746a9e.entry.js +0 -1
- package/dist/post-components/p-f5e33714.entry.js +0 -1
- package/dist/post-components/p-f93ce33d.entry.js +0 -1
- package/dist/post-components/p-fd0446b2.entry.js +0 -1
- package/dist/post-components/p-x3kxyWSZ.js +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
|
@@ -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,10 +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, nanoid } from "../../utils/index";
|
|
13
|
+
import { h, Host } from "@stencil/core";
|
|
15
14
|
/**
|
|
16
15
|
* @part post-accordion-button - The element that toggles the accordion item (header button).
|
|
17
16
|
* @part post-accordion-body - The element that holds the accordion item's content.
|
|
@@ -26,15 +25,9 @@ export class PostAccordionItem {
|
|
|
26
25
|
*/
|
|
27
26
|
this.collapsed = false;
|
|
28
27
|
}
|
|
29
|
-
validateHeadingLevel() {
|
|
30
|
-
checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
31
|
-
}
|
|
32
28
|
componentWillLoad() {
|
|
33
29
|
this.id = this.host.id || `p${nanoid(6)}`;
|
|
34
30
|
}
|
|
35
|
-
componentDidLoad() {
|
|
36
|
-
this.validateHeadingLevel();
|
|
37
|
-
}
|
|
38
31
|
// Capture to make sure the "collapsed" property is updated before the event is consumed
|
|
39
32
|
onCollapseToggle(event) {
|
|
40
33
|
this.collapsed = !event.detail;
|
|
@@ -54,10 +47,10 @@ export class PostAccordionItem {
|
|
|
54
47
|
render() {
|
|
55
48
|
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
56
49
|
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
57
|
-
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: {
|
|
58
51
|
'logo-container': true,
|
|
59
52
|
'has-image': !!this.slottedLogo,
|
|
60
|
-
} }, 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' })))));
|
|
61
54
|
}
|
|
62
55
|
static get is() { return "post-accordion-item"; }
|
|
63
56
|
static get encapsulation() { return "shadow"; }
|
|
@@ -156,12 +149,6 @@ export class PostAccordionItem {
|
|
|
156
149
|
};
|
|
157
150
|
}
|
|
158
151
|
static get elementRef() { return "host"; }
|
|
159
|
-
static get watchers() {
|
|
160
|
-
return [{
|
|
161
|
-
"propName": "headingLevel",
|
|
162
|
-
"methodName": "validateHeadingLevel"
|
|
163
|
-
}];
|
|
164
|
-
}
|
|
165
152
|
static get listeners() {
|
|
166
153
|
return [{
|
|
167
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);
|
|
@@ -1,7 +1,17 @@
|
|
|
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 { Pattern, Required, Type } from "../../utils/index";
|
|
2
12
|
import { version } from "../../../../package";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
13
|
+
import { h, Host } from "@stencil/core";
|
|
14
|
+
import { cryptify, GRAVATAR_BASE_URL } from "./avatar-utils";
|
|
5
15
|
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
6
16
|
var AvatarType;
|
|
7
17
|
(function (AvatarType) {
|
|
@@ -22,23 +32,9 @@ export class PostAvatar {
|
|
|
22
32
|
// To handle email updates and reset the storage item
|
|
23
33
|
this.storageKey = '';
|
|
24
34
|
}
|
|
25
|
-
validateFirstname() {
|
|
26
|
-
checkRequiredAndType(this, 'firstname', 'string');
|
|
27
|
-
}
|
|
28
|
-
validateLastname() {
|
|
29
|
-
checkEmptyOrType(this, 'lastname', 'string');
|
|
30
|
-
}
|
|
31
35
|
updateEmail() {
|
|
32
|
-
this.validateEmail();
|
|
33
36
|
this.getAvatarImage();
|
|
34
37
|
}
|
|
35
|
-
validateDescription() {
|
|
36
|
-
checkEmptyOrType(this, 'description', 'string');
|
|
37
|
-
}
|
|
38
|
-
validateEmail() {
|
|
39
|
-
if (this.email)
|
|
40
|
-
checkEmptyOrPattern(this, 'email', emailPattern);
|
|
41
|
-
}
|
|
42
38
|
async getAvatarImage() {
|
|
43
39
|
let imageLoaded = false;
|
|
44
40
|
this.slottedImage = this.host.querySelector('img');
|
|
@@ -123,12 +119,6 @@ export class PostAvatar {
|
|
|
123
119
|
this.avatarType = AvatarType.Initials;
|
|
124
120
|
this.getAvatarImage();
|
|
125
121
|
}
|
|
126
|
-
componentDidLoad() {
|
|
127
|
-
this.validateFirstname();
|
|
128
|
-
this.validateLastname();
|
|
129
|
-
this.validateDescription();
|
|
130
|
-
this.validateEmail();
|
|
131
|
-
}
|
|
132
122
|
render() {
|
|
133
123
|
const names = [this.firstname, this.lastname].filter(Boolean).map(n => n.trim());
|
|
134
124
|
const initials = names
|
|
@@ -136,7 +126,7 @@ export class PostAvatar {
|
|
|
136
126
|
.join('')
|
|
137
127
|
.trim();
|
|
138
128
|
const fullname = names.join(' ');
|
|
139
|
-
return (h(Host, { key: '
|
|
129
|
+
return (h(Host, { key: '85af49f5beca48bec805f9c126e635b8b1042de3', "data-version": version }, h("span", { key: '950d20eeb38eae131bd2e459741ab03f7208ec37', class: this.avatarType === 'slotted' ? '' : 'd-none' }, h("slot", { key: '5404e8d04de78e9c95d7b7e0b1dbb42fb6afc3e6', onSlotchange: this.slotChanged.bind(this) })), this.avatarType === 'image' && h("img", { key: '0d9c7b0f74e99072544eaa94b408d8e70f5cef57', src: this.imageUrl, alt: this.imageAlt }), this.avatarType === 'initials' && (h("span", { key: 'e7260e54f5510707b19016badad66920df6b38f0', class: "initials" }, initials, h("span", { key: '647fe23a98a1338936ce701024bae944d6cce7ae' }, this.description ?? fullname)))));
|
|
140
130
|
}
|
|
141
131
|
static get is() { return "post-avatar"; }
|
|
142
132
|
static get encapsulation() { return "shadow"; }
|
|
@@ -243,17 +233,21 @@ export class PostAvatar {
|
|
|
243
233
|
static get elementRef() { return "host"; }
|
|
244
234
|
static get watchers() {
|
|
245
235
|
return [{
|
|
246
|
-
"propName": "firstname",
|
|
247
|
-
"methodName": "validateFirstname"
|
|
248
|
-
}, {
|
|
249
|
-
"propName": "lastname",
|
|
250
|
-
"methodName": "validateLastname"
|
|
251
|
-
}, {
|
|
252
236
|
"propName": "email",
|
|
253
237
|
"methodName": "updateEmail"
|
|
254
|
-
}, {
|
|
255
|
-
"propName": "description",
|
|
256
|
-
"methodName": "validateDescription"
|
|
257
238
|
}];
|
|
258
239
|
}
|
|
259
240
|
}
|
|
241
|
+
__decorate([
|
|
242
|
+
Required(),
|
|
243
|
+
Type('string')
|
|
244
|
+
], PostAvatar.prototype, "firstname", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
Type('string')
|
|
247
|
+
], PostAvatar.prototype, "lastname", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
Pattern(emailPattern)
|
|
250
|
+
], PostAvatar.prototype, "email", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
Type('string')
|
|
253
|
+
], PostAvatar.prototype, "description", void 0);
|
|
@@ -1,7 +1,17 @@
|
|
|
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
|
+
};
|
|
2
11
|
import { fadeSlide } from "../../animations/fade-slide";
|
|
12
|
+
import { Required, Type } from "../../utils/index";
|
|
3
13
|
import { version } from "../../../../package";
|
|
4
|
-
import {
|
|
14
|
+
import { h, Host } from "@stencil/core";
|
|
5
15
|
export class PostBackToTop {
|
|
6
16
|
constructor() {
|
|
7
17
|
this.belowFold = false;
|
|
@@ -12,9 +22,6 @@ export class PostBackToTop {
|
|
|
12
22
|
isBelowFold() {
|
|
13
23
|
return window.scrollY > window.innerHeight;
|
|
14
24
|
}
|
|
15
|
-
validateTextBackToTop() {
|
|
16
|
-
checkRequiredAndType(this, 'textBackToTop', 'string');
|
|
17
|
-
}
|
|
18
25
|
/*Watch for changes in belowFold to show/hide the back to top button*/
|
|
19
26
|
watchBelowFold(newValue) {
|
|
20
27
|
if (newValue) {
|
|
@@ -67,13 +74,12 @@ export class PostBackToTop {
|
|
|
67
74
|
componentDidLoad() {
|
|
68
75
|
window.addEventListener('scroll', this.handleScroll, false);
|
|
69
76
|
this.animateButton();
|
|
70
|
-
this.validateTextBackToTop();
|
|
71
77
|
}
|
|
72
78
|
disconnectedCallback() {
|
|
73
79
|
window.removeEventListener('scroll', this.handleScroll);
|
|
74
80
|
}
|
|
75
81
|
render() {
|
|
76
|
-
return (h(Host, { key: '
|
|
82
|
+
return (h(Host, { key: 'b4fb2fd83336752a5c67ab9ded8a20b871b8f967', "data-version": version }, h("button", { key: 'cdee4a23f45f9293ac0da814f97df8bda73028ef', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: '91e2be9b6c5dcd2b8e11aec4ff839de259d47a13', "aria-hidden": "true", name: "arrowup" }), h("span", { key: '0bee6a5151a4919ddffc436924a8a494650b069a', class: "visually-hidden" }, this.textBackToTop))));
|
|
77
83
|
}
|
|
78
84
|
static get is() { return "post-back-to-top"; }
|
|
79
85
|
static get encapsulation() { return "shadow"; }
|
|
@@ -118,11 +124,12 @@ export class PostBackToTop {
|
|
|
118
124
|
static get elementRef() { return "host"; }
|
|
119
125
|
static get watchers() {
|
|
120
126
|
return [{
|
|
121
|
-
"propName": "textBackToTop",
|
|
122
|
-
"methodName": "validateTextBackToTop"
|
|
123
|
-
}, {
|
|
124
127
|
"propName": "belowFold",
|
|
125
128
|
"methodName": "watchBelowFold"
|
|
126
129
|
}];
|
|
127
130
|
}
|
|
128
131
|
}
|
|
132
|
+
__decorate([
|
|
133
|
+
Required(),
|
|
134
|
+
Type('string')
|
|
135
|
+
], PostBackToTop.prototype, "textBackToTop", void 0);
|
|
@@ -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 { Host, h, } from "@stencil/core";
|
|
12
|
-
import { version } from "../../../../package";
|
|
13
11
|
import { fade } from "../../animations/index";
|
|
14
|
-
import {
|
|
12
|
+
import { EventFrom, OneOf } from "../../utils/index";
|
|
13
|
+
import { version } from "../../../../package";
|
|
14
|
+
import { h, Host, } from "@stencil/core";
|
|
15
15
|
import { BANNER_TYPES } from "./banner-types";
|
|
16
16
|
/**
|
|
17
17
|
* @slot heading - Slot for placing custom content within the banner's heading.
|
|
@@ -28,15 +28,11 @@ export class PostBanner {
|
|
|
28
28
|
*/
|
|
29
29
|
this.type = 'info';
|
|
30
30
|
}
|
|
31
|
-
validateType() {
|
|
32
|
-
checkEmptyOrOneOf(this, 'type', BANNER_TYPES);
|
|
33
|
-
}
|
|
34
31
|
connectedCallback() {
|
|
35
32
|
this.mutationObserver.observe(this.host, { childList: true });
|
|
36
33
|
}
|
|
37
34
|
componentDidLoad() {
|
|
38
35
|
this.checkContent();
|
|
39
|
-
this.validateType();
|
|
40
36
|
}
|
|
41
37
|
disconnectedCallback() {
|
|
42
38
|
this.mutationObserver.disconnect();
|
|
@@ -57,7 +53,7 @@ export class PostBanner {
|
|
|
57
53
|
this.hasActions = this.host.querySelectorAll('[slot="actions"]').length > 0;
|
|
58
54
|
}
|
|
59
55
|
render() {
|
|
60
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: '97695d768495db6f56d797d58d94db4b935c5436', "data-version": version, role: "alert", "data-color-scheme": "light" }, h("slot", { key: 'd60d826952da373557af9b2362cd26f2e246796e', name: "close-button" }), h("slot", { key: '2f731ec8f29f6a8dc281fab5884a3dc2e4c4e5ae', name: "heading" }), h("slot", { key: 'e4db84d239998661a3a3d68e7f1df0a076115b29' }), this.hasActions && (h("div", { key: '1b88d16970a728c3064d325296a529bc93cde41a', class: "actions" }, h("slot", { key: 'ea5570b8b8c23cb9a7c2b086ddd1a09a517e0f6a', name: "actions" })))));
|
|
61
57
|
}
|
|
62
58
|
static get is() { return "post-banner"; }
|
|
63
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -147,12 +143,6 @@ export class PostBanner {
|
|
|
147
143
|
};
|
|
148
144
|
}
|
|
149
145
|
static get elementRef() { return "host"; }
|
|
150
|
-
static get watchers() {
|
|
151
|
-
return [{
|
|
152
|
-
"propName": "type",
|
|
153
|
-
"methodName": "validateType"
|
|
154
|
-
}];
|
|
155
|
-
}
|
|
156
146
|
static get listeners() {
|
|
157
147
|
return [{
|
|
158
148
|
"name": "click",
|
|
@@ -163,6 +153,9 @@ export class PostBanner {
|
|
|
163
153
|
}];
|
|
164
154
|
}
|
|
165
155
|
}
|
|
156
|
+
__decorate([
|
|
157
|
+
OneOf(BANNER_TYPES)
|
|
158
|
+
], PostBanner.prototype, "type", void 0);
|
|
166
159
|
__decorate([
|
|
167
160
|
EventFrom('post-closebutton', { allowDescendants: true })
|
|
168
161
|
], PostBanner.prototype, "onCloseButtonClick", null);
|
|
@@ -1,4 +1,14 @@
|
|
|
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 { OneOf, Required, Type, Url } from "../../utils/index";
|
|
2
12
|
import { version } from "../../../../package";
|
|
3
13
|
import { h, Host } from "@stencil/core";
|
|
4
14
|
import { VARIANTS } from "./variants";
|
|
@@ -16,15 +26,6 @@ export class PostBreadcrumbItem {
|
|
|
16
26
|
*/
|
|
17
27
|
this.selected = false;
|
|
18
28
|
}
|
|
19
|
-
validateURL() {
|
|
20
|
-
checkEmptyOrUrl(this, 'url');
|
|
21
|
-
}
|
|
22
|
-
validateVariant() {
|
|
23
|
-
checkEmptyOrOneOf(this, 'variant', VARIANTS);
|
|
24
|
-
}
|
|
25
|
-
validateSelected() {
|
|
26
|
-
checkRequiredAndType(this, 'selected', 'boolean');
|
|
27
|
-
}
|
|
28
29
|
render() {
|
|
29
30
|
const href = this.url instanceof URL ? this.url.href : this.url;
|
|
30
31
|
const content = href ? (h("a", { href: href, "aria-current": this.selected ? 'page' : undefined, "aria-label": this.label, "aria-description": this.description }, h("slot", null))) : (h("span", null, h("slot", null)));
|
|
@@ -156,16 +157,20 @@ export class PostBreadcrumbItem {
|
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
159
|
static get elementRef() { return "host"; }
|
|
159
|
-
static get watchers() {
|
|
160
|
-
return [{
|
|
161
|
-
"propName": "url",
|
|
162
|
-
"methodName": "validateURL"
|
|
163
|
-
}, {
|
|
164
|
-
"propName": "variant",
|
|
165
|
-
"methodName": "validateVariant"
|
|
166
|
-
}, {
|
|
167
|
-
"propName": "selected",
|
|
168
|
-
"methodName": "validateSelected"
|
|
169
|
-
}];
|
|
170
|
-
}
|
|
171
160
|
}
|
|
161
|
+
__decorate([
|
|
162
|
+
Url()
|
|
163
|
+
], PostBreadcrumbItem.prototype, "url", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
Type('string')
|
|
166
|
+
], PostBreadcrumbItem.prototype, "label", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
Type('string')
|
|
169
|
+
], PostBreadcrumbItem.prototype, "description", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
OneOf(VARIANTS)
|
|
172
|
+
], PostBreadcrumbItem.prototype, "variant", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
Required(),
|
|
175
|
+
Type('boolean')
|
|
176
|
+
], PostBreadcrumbItem.prototype, "selected", void 0);
|
|
@@ -1,31 +1,25 @@
|
|
|
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 { componentOnReady, nanoid, Required, Type, Url } from "../../utils/index";
|
|
12
|
+
import { version } from "../../../../package";
|
|
1
13
|
import { h, Host } from "@stencil/core";
|
|
2
14
|
import { throttle } from "throttle-debounce";
|
|
3
|
-
import { version } from "../../../../package";
|
|
4
|
-
import { checkRequiredAndUrl, checkRequiredAndType, componentOnReady, nanoid } from "../../utils/index";
|
|
5
15
|
export class PostBreadcrumbs {
|
|
6
16
|
constructor() {
|
|
7
17
|
this.shouldRenderMenu = false;
|
|
8
18
|
}
|
|
9
|
-
validateHomeUrl() {
|
|
10
|
-
checkRequiredAndUrl(this, 'homeUrl');
|
|
11
|
-
}
|
|
12
|
-
validateTextHome() {
|
|
13
|
-
checkRequiredAndType(this, 'textHome', 'string');
|
|
14
|
-
}
|
|
15
|
-
validateTextBreadcrumbs() {
|
|
16
|
-
checkRequiredAndType(this, 'textBreadcrumbs', 'string');
|
|
17
|
-
}
|
|
18
|
-
validateTextMoreItems() {
|
|
19
|
-
checkRequiredAndType(this, 'textMoreItems', 'string');
|
|
20
|
-
}
|
|
21
19
|
componentWillLoad() {
|
|
22
20
|
this.id = this.host.id || `b${nanoid(6)}`;
|
|
23
21
|
}
|
|
24
22
|
componentDidLoad() {
|
|
25
|
-
this.validateHomeUrl();
|
|
26
|
-
this.validateTextHome();
|
|
27
|
-
this.validateTextBreadcrumbs();
|
|
28
|
-
this.validateTextMoreItems();
|
|
29
23
|
this.createMutationObserver();
|
|
30
24
|
this.createResizeObserver();
|
|
31
25
|
}
|
|
@@ -103,7 +97,7 @@ export class PostBreadcrumbs {
|
|
|
103
97
|
return (h("div", { role: "listitem" }, h("div", { class: "breadcrumb-item" }, h("post-menu-trigger", { for: menuId }, h("button", null, h("span", { class: "visually-hidden" }, this.textMoreItems), h("span", { "aria-hidden": "true" }, "...")))), h("post-menu", { id: menuId, label: this.textMoreItems, placement: "bottom-start" }, h("slot", null))));
|
|
104
98
|
}
|
|
105
99
|
render() {
|
|
106
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: '7ad91a47dac5999eba506744321eb59a27970687', "data-version": version }, h("nav", { key: '3d84a12495ccd27df028cae550b319a2191f8721', "aria-label": this.textBreadcrumbs }, h("div", { key: '291436db8b8f171ca070f0b4fb6e24a6fd831e8d', role: "list" }, h("div", { key: 'cd5aeeee11626fde17bf384ebe7f1f1f701f2a86', class: "breadcrumb-item home", role: "listitem" }, h("a", { key: '9583685d73837b3971a575307621cb364c934d4e', href: this.homeUrl }, h("span", { key: '4896caee6c56016ee7e0ded0363bd5ead8f672bc', class: "visually-hidden" }, this.textHome), h("post-icon", { key: '8390117bb7e8527a813e3d306e16312fa1912ce6', "aria-hidden": "true", name: "home" }))), this.shouldRenderMenu ? this.renderMenu() : h("slot", null), h("slot", { key: '314d304f3f1d1cc09af197eea221d26a9bf1c0fe', name: "selected" })))));
|
|
107
101
|
}
|
|
108
102
|
static get is() { return "post-breadcrumbs"; }
|
|
109
103
|
static get encapsulation() { return "shadow"; }
|
|
@@ -204,19 +198,20 @@ export class PostBreadcrumbs {
|
|
|
204
198
|
};
|
|
205
199
|
}
|
|
206
200
|
static get elementRef() { return "host"; }
|
|
207
|
-
static get watchers() {
|
|
208
|
-
return [{
|
|
209
|
-
"propName": "homeUrl",
|
|
210
|
-
"methodName": "validateHomeUrl"
|
|
211
|
-
}, {
|
|
212
|
-
"propName": "textHome",
|
|
213
|
-
"methodName": "validateTextHome"
|
|
214
|
-
}, {
|
|
215
|
-
"propName": "textBreadcrumbs",
|
|
216
|
-
"methodName": "validateTextBreadcrumbs"
|
|
217
|
-
}, {
|
|
218
|
-
"propName": "textMoreItems",
|
|
219
|
-
"methodName": "validateTextMoreItems"
|
|
220
|
-
}];
|
|
221
|
-
}
|
|
222
201
|
}
|
|
202
|
+
__decorate([
|
|
203
|
+
Required(),
|
|
204
|
+
Url()
|
|
205
|
+
], PostBreadcrumbs.prototype, "homeUrl", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
Required(),
|
|
208
|
+
Type('string')
|
|
209
|
+
], PostBreadcrumbs.prototype, "textHome", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
Required(),
|
|
212
|
+
Type('string')
|
|
213
|
+
], PostBreadcrumbs.prototype, "textBreadcrumbs", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
Required(),
|
|
216
|
+
Type('string')
|
|
217
|
+
], PostBreadcrumbs.prototype, "textMoreItems", void 0);
|