@swisspost/design-system-components 10.0.0-next.70 → 10.0.0-next.71
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/{focusable-ZqET_zrB.js → focusable-COT2uiEV.js} +25 -4
- package/dist/cjs/{index-DPdHkdGf.js → index-CCteMCnR.js} +13 -13
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nanoid-CmjyF1Cm.js +20 -0
- package/dist/cjs/{package-Ds_LS1pB.js → package-CscM89A7.js} +1 -1
- package/dist/cjs/post-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/post-autocomplete.cjs.entry.js +3 -3
- package/dist/cjs/post-avatar.cjs.entry.js +6 -24
- package/dist/cjs/post-back-to-top.cjs.entry.js +3 -3
- package/dist/cjs/post-banner.cjs.entry.js +3 -3
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +30 -33
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +82 -80
- package/dist/cjs/post-closebutton_14.cjs.entry.js +36 -33
- package/dist/cjs/post-collapsible_2.cjs.entry.js +5 -5
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-date-picker.cjs.entry.js +31 -23
- package/dist/cjs/post-footer.cjs.entry.js +5 -5
- 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 -4
- package/dist/cjs/post-login-widget.cjs.entry.js +36 -3
- package/dist/cjs/post-number-input.cjs.entry.js +6 -6
- package/dist/cjs/post-pagination.cjs.entry.js +5 -5
- package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +4 -4
- package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
- package/dist/cjs/post-stepper.cjs.entry.js +4 -4
- package/dist/cjs/post-tab-item.cjs.entry.js +6 -6
- package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
- package/dist/cjs/post-tabs.cjs.entry.js +7 -27
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +16 -12
- package/dist/cjs/post-tooltip.cjs.entry.js +4 -4
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +3 -4
- package/dist/collection/components/post-avatar/avatar-utils.js +2 -2
- package/dist/collection/components/post-avatar/post-avatar.js +3 -40
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +79 -39
- 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 +84 -83
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
- package/dist/collection/components/post-date-picker/post-date-picker.js +2 -2
- package/dist/collection/components/post-footer/post-footer.js +1 -1
- package/dist/collection/components/post-header/post-header.js +4 -4
- package/dist/collection/components/post-icon/post-icon.js +3 -2
- package/dist/collection/components/post-language-menu/post-language-menu.js +2 -3
- package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
- package/dist/collection/components/post-listbox/post-listbox.js +1 -1
- package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
- package/dist/collection/components/post-login-widget/post-login-widget.css +1 -0
- package/dist/collection/components/post-login-widget/post-login-widget.js +106 -4
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
- package/dist/collection/components/post-menu/post-menu.js +5 -2
- package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
- package/dist/collection/components/post-number-input/post-number-input.js +2 -2
- package/dist/collection/components/post-pagination/post-pagination.js +1 -2
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +5 -6
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-stepper/post-stepper.js +1 -1
- package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
- package/dist/collection/components/post-tab-item/post-tab-item.js +2 -3
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +2 -3
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +15 -9
- package/dist/collection/hydrate-stub/index.stub.js +5 -0
- package/dist/collection/test-setup.js +7 -0
- package/dist/collection/utils/index.js +2 -0
- 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/create-validator-decorator.js +187 -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 +24 -0
- package/dist/collection/utils/property-decorators/type.js +25 -0
- package/dist/collection/utils/property-decorators/url.js +29 -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/index2.js +1 -1
- package/dist/components/nanoid.js +1 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +1 -1
- package/dist/components/post-accordion2.js +1 -1
- package/dist/components/post-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-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-8LXe8Zt_.js +1 -0
- package/dist/components/react/p-BC0-M_SK.js +1 -0
- package/dist/components/react/p-BQ3HlJPr.js +1 -0
- package/dist/components/react/p-BrY4VWTQ.js +1 -0
- package/dist/components/react/p-C7s9oglQ.js +1 -0
- package/dist/components/react/{p-D6uA8DbL.js → p-CTgZ8DGr.js} +1 -1
- package/dist/components/react/{p-B2iQay0-.js → p-CVtlwDsT.js} +1 -1
- package/dist/components/react/p-CaLwTf3T.js +1 -0
- package/dist/components/react/p-ClJyTIVM.js +1 -0
- package/dist/components/react/{p-B2BDAeHI.js → p-DGr-hfLq.js} +1 -1
- package/dist/components/react/{p-Cu9RsvYK.js → p-DJxdj9pa.js} +1 -1
- package/dist/components/react/p-DKDEtjQe.js +1 -0
- package/dist/components/react/p-DPKR_4uI.js +1 -0
- package/dist/components/react/p-DcEDGaFs.js +1 -0
- package/dist/components/react/{p-C8b6-YQl.js → p-DipfA69b.js} +1 -1
- package/dist/components/react/{p-Dmnnz3fB.js → p-DwZxAC2u.js} +1 -1
- package/dist/components/react/p-lpWRZjJp.js +1 -0
- package/dist/components/react/p-x3kxyWSZ.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-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/docs.json +202 -69
- package/dist/esm/breakpoints-BQ3HlJPr.js +202 -0
- package/dist/esm/component-on-ready-lpWRZjJp.js +22 -0
- package/dist/esm/{focusable-BD_WT2MO.js → focusable-C7afHKmo.js} +25 -5
- package/dist/esm/{index-DmAi35UF.js → index-DmBWUef5.js} +13 -13
- package/dist/esm/loader.js +3 -3
- package/dist/esm/nanoid-8LXe8Zt_.js +18 -0
- package/dist/esm/package-x3kxyWSZ.js +3 -0
- package/dist/esm/post-accordion_2.entry.js +6 -6
- package/dist/esm/post-autocomplete.entry.js +3 -3
- package/dist/esm/post-avatar.entry.js +6 -24
- package/dist/esm/post-back-to-top.entry.js +3 -3
- package/dist/esm/post-banner.entry.js +3 -3
- package/dist/esm/post-breadcrumb-item.entry.js +31 -34
- package/dist/esm/post-breadcrumbs.entry.js +82 -80
- package/dist/esm/post-closebutton_14.entry.js +31 -28
- package/dist/esm/post-collapsible_2.entry.js +5 -5
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-date-picker.entry.js +15 -7
- package/dist/esm/post-footer.entry.js +4 -4
- 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 -4
- package/dist/esm/post-login-widget.entry.js +36 -3
- package/dist/esm/post-number-input.entry.js +5 -5
- package/dist/esm/post-pagination.entry.js +4 -4
- package/dist/esm/post-popover-trigger.entry.js +5 -5
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/post-rating.entry.js +4 -4
- package/dist/esm/post-stepper-item.entry.js +3 -3
- package/dist/esm/post-stepper.entry.js +4 -4
- package/dist/esm/post-tab-item.entry.js +5 -5
- package/dist/esm/post-tab-panel.entry.js +5 -5
- package/dist/esm/post-tabs.entry.js +6 -26
- package/dist/esm/post-tooltip-trigger.entry.js +16 -12
- package/dist/esm/post-tooltip.entry.js +4 -4
- package/dist/post-components/{p-c2e05ba0.entry.js → p-08a0e8e9.entry.js} +1 -1
- package/dist/post-components/{p-f12e59a0.entry.js → p-1583817b.entry.js} +1 -1
- package/dist/post-components/{p-e6ba44b1.entry.js → p-203d9abd.entry.js} +1 -1
- package/dist/post-components/p-2c68af27.entry.js +1 -0
- package/dist/post-components/{p-092f8795.entry.js → p-39143e19.entry.js} +1 -1
- package/dist/post-components/p-46dd9e7e.entry.js +1 -0
- package/dist/post-components/{p-77d5e17b.entry.js → p-4b445a35.entry.js} +1 -1
- package/dist/post-components/p-53a8cce5.entry.js +1 -0
- package/dist/post-components/p-72bff1fc.entry.js +1 -0
- package/dist/post-components/{p-25c28493.entry.js → p-75045028.entry.js} +1 -1
- package/dist/post-components/{p-534fed55.entry.js → p-768b4516.entry.js} +1 -1
- package/dist/post-components/{p-2fcca5ec.entry.js → p-7e072450.entry.js} +1 -1
- package/dist/post-components/{p-3cefd49e.entry.js → p-83cb6424.entry.js} +1 -1
- package/dist/post-components/p-8LXe8Zt_.js +1 -0
- package/dist/post-components/{p-1d58bec1.entry.js → p-94f4da57.entry.js} +1 -1
- package/dist/post-components/{p-5068ae7e.entry.js → p-9dace750.entry.js} +1 -1
- package/dist/post-components/{p-3fea238c.entry.js → p-9ea7e46f.entry.js} +1 -1
- package/dist/post-components/p-BQ3HlJPr.js +1 -0
- package/dist/post-components/p-BrY4VWTQ.js +1 -0
- package/dist/post-components/p-DmBWUef5.js +2 -0
- package/dist/post-components/{p-86697a58.entry.js → p-a0ac814c.entry.js} +1 -1
- package/dist/post-components/p-a0d12ca8.entry.js +1 -0
- package/dist/post-components/{p-570d64dd.entry.js → p-bab0f27f.entry.js} +1 -1
- package/dist/post-components/p-cb039d66.entry.js +1 -0
- package/dist/post-components/p-e8cda4e1.entry.js +1 -0
- package/dist/post-components/{p-17ccebe6.entry.js → p-e8e50d5c.entry.js} +1 -1
- package/dist/post-components/p-eb64ec1d.entry.js +1 -0
- package/dist/post-components/p-f0746a9e.entry.js +1 -0
- package/dist/post-components/p-f5e33714.entry.js +1 -0
- package/dist/post-components/{p-521178f5.entry.js → p-f93ce33d.entry.js} +1 -1
- package/dist/post-components/{p-9ca5c297.entry.js → p-fd0446b2.entry.js} +1 -1
- package/dist/post-components/p-lpWRZjJp.js +1 -0
- package/dist/post-components/p-x3kxyWSZ.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-avatar/avatar-utils.d.ts +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +0 -8
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +14 -11
- package/dist/types/components/post-breadcrumb-item/variants.d.ts +2 -0
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +23 -25
- package/dist/types/components/post-login-widget/post-login-widget.d.ts +21 -2
- package/dist/types/components/post-menu/post-menu.d.ts +1 -1
- package/dist/types/components/post-popover/post-popover.d.ts +1 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -1
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +1 -0
- package/dist/types/components.d.ts +68 -24
- package/dist/types/modules.d.ts +2 -0
- package/dist/types/utils/index.d.ts +2 -0
- 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/create-validator-decorator.d.ts +43 -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 +8 -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 +417 -114734
- package/hydrate/index.mjs +417 -114734
- package/hydrate/index.stub.js +5 -0
- package/package.json +28 -18
- package/dist/cjs/index-YBj3gUJp.js +0 -114540
- package/dist/cjs/index.browser-BVb9l9T_.js +0 -16
- package/dist/components/index.browser.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-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-CJcRbvrI.js +0 -6
- 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-PuHMz_9_.js +0 -1
- package/dist/components/react/p-nA1BKco0.js +0 -1
- package/dist/components/react/p-tpgRP2Dr.js +0 -1
- package/dist/esm/index-CJcRbvrI.js +0 -114535
- package/dist/esm/index.browser-nA1BKco0.js +0 -14
- package/dist/esm/package-DW7sbg9f.js +0 -3
- package/dist/post-components/p-29ada3d7.entry.js +0 -1
- package/dist/post-components/p-5f52cba3.entry.js +0 -1
- package/dist/post-components/p-987bebe8.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-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-ead1094e.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/{language-tags.js → test-setup.d.ts} +0 -0
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
2
|
+
"timestamp": "2026-06-01T15:48:59",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.3",
|
|
@@ -675,29 +675,6 @@
|
|
|
675
675
|
"required": false,
|
|
676
676
|
"getter": false,
|
|
677
677
|
"setter": false
|
|
678
|
-
},
|
|
679
|
-
{
|
|
680
|
-
"name": "userid",
|
|
681
|
-
"type": "string",
|
|
682
|
-
"complexType": {
|
|
683
|
-
"original": "string",
|
|
684
|
-
"resolved": "string",
|
|
685
|
-
"references": {}
|
|
686
|
-
},
|
|
687
|
-
"mutable": false,
|
|
688
|
-
"attr": "userid",
|
|
689
|
-
"reflectToAttr": false,
|
|
690
|
-
"docs": "Defines the company internal userId.<post-banner type=\"warning\" data-size=\"sm\"><p>Can only be used on post.ch domains!</p></post-banner>",
|
|
691
|
-
"docsTags": [],
|
|
692
|
-
"values": [
|
|
693
|
-
{
|
|
694
|
-
"type": "string"
|
|
695
|
-
}
|
|
696
|
-
],
|
|
697
|
-
"optional": true,
|
|
698
|
-
"required": false,
|
|
699
|
-
"getter": false,
|
|
700
|
-
"setter": false
|
|
701
678
|
}
|
|
702
679
|
],
|
|
703
680
|
"methods": [],
|
|
@@ -712,9 +689,15 @@
|
|
|
712
689
|
],
|
|
713
690
|
"parts": [],
|
|
714
691
|
"states": [],
|
|
715
|
-
"dependents": [
|
|
692
|
+
"dependents": [
|
|
693
|
+
"post-login-widget"
|
|
694
|
+
],
|
|
716
695
|
"dependencies": [],
|
|
717
|
-
"dependencyGraph": {
|
|
696
|
+
"dependencyGraph": {
|
|
697
|
+
"post-login-widget": [
|
|
698
|
+
"post-avatar"
|
|
699
|
+
]
|
|
700
|
+
}
|
|
718
701
|
},
|
|
719
702
|
{
|
|
720
703
|
"filePath": "src/components/post-back-to-top/post-back-to-top.tsx",
|
|
@@ -923,7 +906,7 @@
|
|
|
923
906
|
"docsTags": [
|
|
924
907
|
{
|
|
925
908
|
"name": "slot",
|
|
926
|
-
"text": "default -
|
|
909
|
+
"text": "default - The content displayed inside the breadcrumb item."
|
|
927
910
|
}
|
|
928
911
|
],
|
|
929
912
|
"usage": {},
|
|
@@ -939,7 +922,7 @@
|
|
|
939
922
|
"mutable": false,
|
|
940
923
|
"attr": "description",
|
|
941
924
|
"reflectToAttr": true,
|
|
942
|
-
"docs": "
|
|
925
|
+
"docs": "An accessible description for additional context, read after the content or `label`.",
|
|
943
926
|
"docsTags": [],
|
|
944
927
|
"values": [
|
|
945
928
|
{
|
|
@@ -962,7 +945,7 @@
|
|
|
962
945
|
"mutable": false,
|
|
963
946
|
"attr": "label",
|
|
964
947
|
"reflectToAttr": true,
|
|
965
|
-
"docs": "
|
|
948
|
+
"docs": "An accessible label screen readers will use this instead of the breadcrumb item content.",
|
|
966
949
|
"docsTags": [],
|
|
967
950
|
"values": [
|
|
968
951
|
{
|
|
@@ -974,6 +957,35 @@
|
|
|
974
957
|
"getter": false,
|
|
975
958
|
"setter": false
|
|
976
959
|
},
|
|
960
|
+
{
|
|
961
|
+
"name": "selected",
|
|
962
|
+
"type": "boolean",
|
|
963
|
+
"complexType": {
|
|
964
|
+
"original": "boolean",
|
|
965
|
+
"resolved": "boolean",
|
|
966
|
+
"references": {}
|
|
967
|
+
},
|
|
968
|
+
"mutable": false,
|
|
969
|
+
"attr": "selected",
|
|
970
|
+
"reflectToAttr": true,
|
|
971
|
+
"docs": "Indicates that the item represents the current page, applying appropriate styling.",
|
|
972
|
+
"docsTags": [
|
|
973
|
+
{
|
|
974
|
+
"name": "default",
|
|
975
|
+
"text": "false"
|
|
976
|
+
}
|
|
977
|
+
],
|
|
978
|
+
"default": "false",
|
|
979
|
+
"values": [
|
|
980
|
+
{
|
|
981
|
+
"type": "boolean"
|
|
982
|
+
}
|
|
983
|
+
],
|
|
984
|
+
"optional": false,
|
|
985
|
+
"required": false,
|
|
986
|
+
"getter": false,
|
|
987
|
+
"setter": false
|
|
988
|
+
},
|
|
977
989
|
{
|
|
978
990
|
"name": "url",
|
|
979
991
|
"type": "URL | string",
|
|
@@ -990,7 +1002,7 @@
|
|
|
990
1002
|
"mutable": false,
|
|
991
1003
|
"attr": "url",
|
|
992
1004
|
"reflectToAttr": true,
|
|
993
|
-
"docs": "The
|
|
1005
|
+
"docs": "The destination URL for the breadcrumb item. If omitted, the item is rendered as non-interactive text.",
|
|
994
1006
|
"docsTags": [],
|
|
995
1007
|
"values": [
|
|
996
1008
|
{
|
|
@@ -1004,6 +1016,47 @@
|
|
|
1004
1016
|
"required": false,
|
|
1005
1017
|
"getter": false,
|
|
1006
1018
|
"setter": false
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "variant",
|
|
1022
|
+
"type": "\"listitem\" | \"menuitem\"",
|
|
1023
|
+
"complexType": {
|
|
1024
|
+
"original": "Variant",
|
|
1025
|
+
"resolved": "\"listitem\" | \"menuitem\"",
|
|
1026
|
+
"references": {
|
|
1027
|
+
"Variant": {
|
|
1028
|
+
"location": "import",
|
|
1029
|
+
"path": "./variants",
|
|
1030
|
+
"id": "src/components/post-breadcrumb-item/variants.ts::Variant",
|
|
1031
|
+
"referenceLocation": "Variant"
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
"mutable": false,
|
|
1036
|
+
"attr": "variant",
|
|
1037
|
+
"reflectToAttr": true,
|
|
1038
|
+
"docs": "Controls how the item is rendered, either as a standard list item or within an overflow menu.",
|
|
1039
|
+
"docsTags": [
|
|
1040
|
+
{
|
|
1041
|
+
"name": "default",
|
|
1042
|
+
"text": "'listitem'"
|
|
1043
|
+
}
|
|
1044
|
+
],
|
|
1045
|
+
"default": "'listitem'",
|
|
1046
|
+
"values": [
|
|
1047
|
+
{
|
|
1048
|
+
"value": "listitem",
|
|
1049
|
+
"type": "string"
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"value": "menuitem",
|
|
1053
|
+
"type": "string"
|
|
1054
|
+
}
|
|
1055
|
+
],
|
|
1056
|
+
"optional": false,
|
|
1057
|
+
"required": false,
|
|
1058
|
+
"getter": false,
|
|
1059
|
+
"setter": false
|
|
1007
1060
|
}
|
|
1008
1061
|
],
|
|
1009
1062
|
"methods": [],
|
|
@@ -1013,23 +1066,18 @@
|
|
|
1013
1066
|
"slots": [
|
|
1014
1067
|
{
|
|
1015
1068
|
"name": "default",
|
|
1016
|
-
"docs": "
|
|
1069
|
+
"docs": "The content displayed inside the breadcrumb item."
|
|
1017
1070
|
}
|
|
1018
1071
|
],
|
|
1019
1072
|
"parts": [],
|
|
1020
1073
|
"states": [],
|
|
1021
|
-
"dependents": [
|
|
1022
|
-
"post-breadcrumbs"
|
|
1023
|
-
],
|
|
1074
|
+
"dependents": [],
|
|
1024
1075
|
"dependencies": [
|
|
1025
|
-
"post-
|
|
1076
|
+
"post-menu-item"
|
|
1026
1077
|
],
|
|
1027
1078
|
"dependencyGraph": {
|
|
1028
1079
|
"post-breadcrumb-item": [
|
|
1029
|
-
"post-
|
|
1030
|
-
],
|
|
1031
|
-
"post-breadcrumbs": [
|
|
1032
|
-
"post-breadcrumb-item"
|
|
1080
|
+
"post-menu-item"
|
|
1033
1081
|
]
|
|
1034
1082
|
}
|
|
1035
1083
|
},
|
|
@@ -1053,7 +1101,7 @@
|
|
|
1053
1101
|
"mutable": false,
|
|
1054
1102
|
"attr": "home-url",
|
|
1055
1103
|
"reflectToAttr": true,
|
|
1056
|
-
"docs": "The URL for the home breadcrumb item.",
|
|
1104
|
+
"docs": "The URL for the root (home) breadcrumb item.",
|
|
1057
1105
|
"docsTags": [],
|
|
1058
1106
|
"values": [
|
|
1059
1107
|
{
|
|
@@ -1076,7 +1124,7 @@
|
|
|
1076
1124
|
"mutable": false,
|
|
1077
1125
|
"attr": "text-breadcrumbs",
|
|
1078
1126
|
"reflectToAttr": true,
|
|
1079
|
-
"docs": "
|
|
1127
|
+
"docs": "An accessible label for the breadcrumb navigation.",
|
|
1080
1128
|
"docsTags": [],
|
|
1081
1129
|
"values": [
|
|
1082
1130
|
{
|
|
@@ -1099,7 +1147,7 @@
|
|
|
1099
1147
|
"mutable": false,
|
|
1100
1148
|
"attr": "text-home",
|
|
1101
1149
|
"reflectToAttr": true,
|
|
1102
|
-
"docs": "
|
|
1150
|
+
"docs": "An accessible label for the root (home) breadcrumb item.",
|
|
1103
1151
|
"docsTags": [],
|
|
1104
1152
|
"values": [
|
|
1105
1153
|
{
|
|
@@ -1122,7 +1170,7 @@
|
|
|
1122
1170
|
"mutable": false,
|
|
1123
1171
|
"attr": "text-more-items",
|
|
1124
1172
|
"reflectToAttr": true,
|
|
1125
|
-
"docs": "
|
|
1173
|
+
"docs": "An accessible label for the overflow menu that contains collapsed breadcrumb items.",
|
|
1126
1174
|
"docsTags": [],
|
|
1127
1175
|
"values": [
|
|
1128
1176
|
{
|
|
@@ -1144,25 +1192,18 @@
|
|
|
1144
1192
|
"states": [],
|
|
1145
1193
|
"dependents": [],
|
|
1146
1194
|
"dependencies": [
|
|
1147
|
-
"post-icon",
|
|
1148
1195
|
"post-menu-trigger",
|
|
1149
1196
|
"post-menu",
|
|
1150
|
-
"post-
|
|
1151
|
-
"post-breadcrumb-item"
|
|
1197
|
+
"post-icon"
|
|
1152
1198
|
],
|
|
1153
1199
|
"dependencyGraph": {
|
|
1154
1200
|
"post-breadcrumbs": [
|
|
1155
|
-
"post-icon",
|
|
1156
1201
|
"post-menu-trigger",
|
|
1157
1202
|
"post-menu",
|
|
1158
|
-
"post-
|
|
1159
|
-
"post-breadcrumb-item"
|
|
1203
|
+
"post-icon"
|
|
1160
1204
|
],
|
|
1161
1205
|
"post-menu": [
|
|
1162
1206
|
"post-popovercontainer"
|
|
1163
|
-
],
|
|
1164
|
-
"post-breadcrumb-item": [
|
|
1165
|
-
"post-icon"
|
|
1166
1207
|
]
|
|
1167
1208
|
}
|
|
1168
1209
|
},
|
|
@@ -2561,7 +2602,6 @@
|
|
|
2561
2602
|
"post-accordion-item",
|
|
2562
2603
|
"post-autocomplete",
|
|
2563
2604
|
"post-back-to-top",
|
|
2564
|
-
"post-breadcrumb-item",
|
|
2565
2605
|
"post-breadcrumbs",
|
|
2566
2606
|
"post-closebutton",
|
|
2567
2607
|
"post-date-picker",
|
|
@@ -2586,9 +2626,6 @@
|
|
|
2586
2626
|
"post-back-to-top": [
|
|
2587
2627
|
"post-icon"
|
|
2588
2628
|
],
|
|
2589
|
-
"post-breadcrumb-item": [
|
|
2590
|
-
"post-icon"
|
|
2591
|
-
],
|
|
2592
2629
|
"post-breadcrumbs": [
|
|
2593
2630
|
"post-icon"
|
|
2594
2631
|
],
|
|
@@ -3360,15 +3397,85 @@
|
|
|
3360
3397
|
"docsTags": [
|
|
3361
3398
|
{
|
|
3362
3399
|
"name": "slot",
|
|
3363
|
-
"text": "
|
|
3400
|
+
"text": "user-links - Links to show in the user menu when the user is authenticated."
|
|
3364
3401
|
},
|
|
3365
3402
|
{
|
|
3366
3403
|
"name": "slot",
|
|
3367
|
-
"text": "
|
|
3404
|
+
"text": "login-link - Content rendered when the user is not authenticated."
|
|
3368
3405
|
}
|
|
3369
3406
|
],
|
|
3370
3407
|
"usage": {},
|
|
3371
|
-
"props": [
|
|
3408
|
+
"props": [
|
|
3409
|
+
{
|
|
3410
|
+
"name": "textCurrentUser",
|
|
3411
|
+
"type": "string",
|
|
3412
|
+
"complexType": {
|
|
3413
|
+
"original": "string",
|
|
3414
|
+
"resolved": "string",
|
|
3415
|
+
"references": {}
|
|
3416
|
+
},
|
|
3417
|
+
"mutable": false,
|
|
3418
|
+
"attr": "text-current-user",
|
|
3419
|
+
"reflectToAttr": true,
|
|
3420
|
+
"docs": "Label for the \"Current user is {user}\" accessibility description.\nUse `{user}` as a placeholder — it will be replaced with the current user's name at runtime.",
|
|
3421
|
+
"docsTags": [],
|
|
3422
|
+
"values": [
|
|
3423
|
+
{
|
|
3424
|
+
"type": "string"
|
|
3425
|
+
}
|
|
3426
|
+
],
|
|
3427
|
+
"optional": false,
|
|
3428
|
+
"required": true,
|
|
3429
|
+
"getter": false,
|
|
3430
|
+
"setter": false
|
|
3431
|
+
},
|
|
3432
|
+
{
|
|
3433
|
+
"name": "textUserMenu",
|
|
3434
|
+
"type": "string",
|
|
3435
|
+
"complexType": {
|
|
3436
|
+
"original": "string",
|
|
3437
|
+
"resolved": "string",
|
|
3438
|
+
"references": {}
|
|
3439
|
+
},
|
|
3440
|
+
"mutable": false,
|
|
3441
|
+
"attr": "text-user-menu",
|
|
3442
|
+
"reflectToAttr": true,
|
|
3443
|
+
"docs": "Accessible label for the dropdown menu",
|
|
3444
|
+
"docsTags": [],
|
|
3445
|
+
"values": [
|
|
3446
|
+
{
|
|
3447
|
+
"type": "string"
|
|
3448
|
+
}
|
|
3449
|
+
],
|
|
3450
|
+
"optional": false,
|
|
3451
|
+
"required": true,
|
|
3452
|
+
"getter": false,
|
|
3453
|
+
"setter": false
|
|
3454
|
+
},
|
|
3455
|
+
{
|
|
3456
|
+
"name": "textUserMenuTrigger",
|
|
3457
|
+
"type": "string",
|
|
3458
|
+
"complexType": {
|
|
3459
|
+
"original": "string",
|
|
3460
|
+
"resolved": "string",
|
|
3461
|
+
"references": {}
|
|
3462
|
+
},
|
|
3463
|
+
"mutable": false,
|
|
3464
|
+
"attr": "text-user-menu-trigger",
|
|
3465
|
+
"reflectToAttr": true,
|
|
3466
|
+
"docs": "Hidden label for the user menu trigger button, for accessibility purposes. It should describe the purpose of the button (e.g. \"Access user links\").",
|
|
3467
|
+
"docsTags": [],
|
|
3468
|
+
"values": [
|
|
3469
|
+
{
|
|
3470
|
+
"type": "string"
|
|
3471
|
+
}
|
|
3472
|
+
],
|
|
3473
|
+
"optional": false,
|
|
3474
|
+
"required": true,
|
|
3475
|
+
"getter": false,
|
|
3476
|
+
"setter": false
|
|
3477
|
+
}
|
|
3478
|
+
],
|
|
3372
3479
|
"methods": [
|
|
3373
3480
|
{
|
|
3374
3481
|
"name": "isAuthenticated",
|
|
@@ -3435,19 +3542,32 @@
|
|
|
3435
3542
|
"styles": [],
|
|
3436
3543
|
"slots": [
|
|
3437
3544
|
{
|
|
3438
|
-
"name": "
|
|
3439
|
-
"docs": "Content rendered when the user is authenticated
|
|
3545
|
+
"name": "login-link",
|
|
3546
|
+
"docs": "Content rendered when the user is not authenticated."
|
|
3440
3547
|
},
|
|
3441
3548
|
{
|
|
3442
|
-
"name": "
|
|
3443
|
-
"docs": "
|
|
3549
|
+
"name": "user-links",
|
|
3550
|
+
"docs": "Links to show in the user menu when the user is authenticated."
|
|
3444
3551
|
}
|
|
3445
3552
|
],
|
|
3446
3553
|
"parts": [],
|
|
3447
3554
|
"states": [],
|
|
3448
3555
|
"dependents": [],
|
|
3449
|
-
"dependencies": [
|
|
3450
|
-
|
|
3556
|
+
"dependencies": [
|
|
3557
|
+
"post-menu-trigger",
|
|
3558
|
+
"post-avatar",
|
|
3559
|
+
"post-menu"
|
|
3560
|
+
],
|
|
3561
|
+
"dependencyGraph": {
|
|
3562
|
+
"post-login-widget": [
|
|
3563
|
+
"post-menu-trigger",
|
|
3564
|
+
"post-avatar",
|
|
3565
|
+
"post-menu"
|
|
3566
|
+
],
|
|
3567
|
+
"post-menu": [
|
|
3568
|
+
"post-popovercontainer"
|
|
3569
|
+
]
|
|
3570
|
+
}
|
|
3451
3571
|
},
|
|
3452
3572
|
{
|
|
3453
3573
|
"filePath": "src/components/post-logo/post-logo.tsx",
|
|
@@ -4125,7 +4245,8 @@
|
|
|
4125
4245
|
"states": [],
|
|
4126
4246
|
"dependents": [
|
|
4127
4247
|
"post-breadcrumbs",
|
|
4128
|
-
"post-language-menu"
|
|
4248
|
+
"post-language-menu",
|
|
4249
|
+
"post-login-widget"
|
|
4129
4250
|
],
|
|
4130
4251
|
"dependencies": [
|
|
4131
4252
|
"post-popovercontainer"
|
|
@@ -4139,6 +4260,9 @@
|
|
|
4139
4260
|
],
|
|
4140
4261
|
"post-language-menu": [
|
|
4141
4262
|
"post-menu"
|
|
4263
|
+
],
|
|
4264
|
+
"post-login-widget": [
|
|
4265
|
+
"post-menu"
|
|
4142
4266
|
]
|
|
4143
4267
|
}
|
|
4144
4268
|
},
|
|
@@ -4159,12 +4283,12 @@
|
|
|
4159
4283
|
"parts": [],
|
|
4160
4284
|
"states": [],
|
|
4161
4285
|
"dependents": [
|
|
4162
|
-
"post-
|
|
4286
|
+
"post-breadcrumb-item",
|
|
4163
4287
|
"post-language-menu-item"
|
|
4164
4288
|
],
|
|
4165
4289
|
"dependencies": [],
|
|
4166
4290
|
"dependencyGraph": {
|
|
4167
|
-
"post-
|
|
4291
|
+
"post-breadcrumb-item": [
|
|
4168
4292
|
"post-menu-item"
|
|
4169
4293
|
],
|
|
4170
4294
|
"post-language-menu-item": [
|
|
@@ -4214,7 +4338,8 @@
|
|
|
4214
4338
|
"states": [],
|
|
4215
4339
|
"dependents": [
|
|
4216
4340
|
"post-breadcrumbs",
|
|
4217
|
-
"post-language-menu"
|
|
4341
|
+
"post-language-menu",
|
|
4342
|
+
"post-login-widget"
|
|
4218
4343
|
],
|
|
4219
4344
|
"dependencies": [],
|
|
4220
4345
|
"dependencyGraph": {
|
|
@@ -4223,6 +4348,9 @@
|
|
|
4223
4348
|
],
|
|
4224
4349
|
"post-language-menu": [
|
|
4225
4350
|
"post-menu-trigger"
|
|
4351
|
+
],
|
|
4352
|
+
"post-login-widget": [
|
|
4353
|
+
"post-menu-trigger"
|
|
4226
4354
|
]
|
|
4227
4355
|
}
|
|
4228
4356
|
},
|
|
@@ -6365,6 +6493,11 @@
|
|
|
6365
6493
|
"docstring": "",
|
|
6366
6494
|
"path": "src/components/post-banner/banner-types.ts"
|
|
6367
6495
|
},
|
|
6496
|
+
"src/components/post-breadcrumb-item/variants.ts::Variant": {
|
|
6497
|
+
"declaration": "\"listitem\" | \"menuitem\"",
|
|
6498
|
+
"docstring": "",
|
|
6499
|
+
"path": "src/components/post-breadcrumb-item/variants.ts"
|
|
6500
|
+
},
|
|
6368
6501
|
"src/components/post-closebutton/types.ts::ButtonType": {
|
|
6369
6502
|
"declaration": "\"button\" | \"submit\" | \"reset\"",
|
|
6370
6503
|
"docstring": "",
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* eslint-disable no-undefined,no-param-reassign,no-shadow */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Throttle execution of a function. Especially useful for rate limiting
|
|
5
|
+
* execution of handlers on events like resize and scroll.
|
|
6
|
+
*
|
|
7
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher)
|
|
8
|
+
* are most useful.
|
|
9
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through,
|
|
10
|
+
* as-is, to `callback` when the throttled-function is executed.
|
|
11
|
+
* @param {object} [options] - An object to configure options.
|
|
12
|
+
* @param {boolean} [options.noTrailing] - Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds
|
|
13
|
+
* while the throttled-function is being called. If noTrailing is false or unspecified, callback will be executed
|
|
14
|
+
* one final time after the last throttled-function call. (After the throttled-function has not been called for
|
|
15
|
+
* `delay` milliseconds, the internal counter is reset).
|
|
16
|
+
* @param {boolean} [options.noLeading] - Optional, defaults to false. If noLeading is false, the first throttled-function call will execute callback
|
|
17
|
+
* immediately. If noLeading is true, the first the callback execution will be skipped. It should be noted that
|
|
18
|
+
* callback will never executed if both noLeading = true and noTrailing = true.
|
|
19
|
+
* @param {boolean} [options.debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is
|
|
20
|
+
* false (at end), schedule `callback` to execute after `delay` ms.
|
|
21
|
+
*
|
|
22
|
+
* @returns {Function} A new, throttled, function.
|
|
23
|
+
*/
|
|
24
|
+
function throttle (delay, callback, options) {
|
|
25
|
+
var _ref = options || {},
|
|
26
|
+
_ref$noTrailing = _ref.noTrailing,
|
|
27
|
+
noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing,
|
|
28
|
+
_ref$noLeading = _ref.noLeading,
|
|
29
|
+
noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading,
|
|
30
|
+
_ref$debounceMode = _ref.debounceMode,
|
|
31
|
+
debounceMode = _ref$debounceMode === void 0 ? undefined : _ref$debounceMode;
|
|
32
|
+
/*
|
|
33
|
+
* After wrapper has stopped being called, this timeout ensures that
|
|
34
|
+
* `callback` is executed at the proper times in `throttle` and `end`
|
|
35
|
+
* debounce modes.
|
|
36
|
+
*/
|
|
37
|
+
var timeoutID;
|
|
38
|
+
var cancelled = false;
|
|
39
|
+
|
|
40
|
+
// Keep track of the last time `callback` was executed.
|
|
41
|
+
var lastExec = 0;
|
|
42
|
+
|
|
43
|
+
// Function to clear existing timeout
|
|
44
|
+
function clearExistingTimeout() {
|
|
45
|
+
if (timeoutID) {
|
|
46
|
+
clearTimeout(timeoutID);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Function to cancel next exec
|
|
51
|
+
function cancel(options) {
|
|
52
|
+
var _ref2 = options || {},
|
|
53
|
+
_ref2$upcomingOnly = _ref2.upcomingOnly,
|
|
54
|
+
upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly;
|
|
55
|
+
clearExistingTimeout();
|
|
56
|
+
cancelled = !upcomingOnly;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* The `wrapper` function encapsulates all of the throttling / debouncing
|
|
61
|
+
* functionality and when executed will limit the rate at which `callback`
|
|
62
|
+
* is executed.
|
|
63
|
+
*/
|
|
64
|
+
function wrapper() {
|
|
65
|
+
for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
66
|
+
arguments_[_key] = arguments[_key];
|
|
67
|
+
}
|
|
68
|
+
var self = this;
|
|
69
|
+
var elapsed = Date.now() - lastExec;
|
|
70
|
+
if (cancelled) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Execute `callback` and update the `lastExec` timestamp.
|
|
75
|
+
function exec() {
|
|
76
|
+
lastExec = Date.now();
|
|
77
|
+
callback.apply(self, arguments_);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* If `debounceMode` is true (at begin) this is used to clear the flag
|
|
82
|
+
* to allow future `callback` executions.
|
|
83
|
+
*/
|
|
84
|
+
function clear() {
|
|
85
|
+
timeoutID = undefined;
|
|
86
|
+
}
|
|
87
|
+
if (!noLeading && debounceMode && !timeoutID) {
|
|
88
|
+
/*
|
|
89
|
+
* Since `wrapper` is being called for the first time and
|
|
90
|
+
* `debounceMode` is true (at begin), execute `callback`
|
|
91
|
+
* and noLeading != true.
|
|
92
|
+
*/
|
|
93
|
+
exec();
|
|
94
|
+
}
|
|
95
|
+
clearExistingTimeout();
|
|
96
|
+
if (debounceMode === undefined && elapsed > delay) {
|
|
97
|
+
if (noLeading) {
|
|
98
|
+
/*
|
|
99
|
+
* In throttle mode with noLeading, if `delay` time has
|
|
100
|
+
* been exceeded, update `lastExec` and schedule `callback`
|
|
101
|
+
* to execute after `delay` ms.
|
|
102
|
+
*/
|
|
103
|
+
lastExec = Date.now();
|
|
104
|
+
if (!noTrailing) {
|
|
105
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, delay);
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
/*
|
|
109
|
+
* In throttle mode without noLeading, if `delay` time has been exceeded, execute
|
|
110
|
+
* `callback`.
|
|
111
|
+
*/
|
|
112
|
+
exec();
|
|
113
|
+
}
|
|
114
|
+
} else if (noTrailing !== true) {
|
|
115
|
+
/*
|
|
116
|
+
* In trailing throttle mode, since `delay` time has not been
|
|
117
|
+
* exceeded, schedule `callback` to execute `delay` ms after most
|
|
118
|
+
* recent execution.
|
|
119
|
+
*
|
|
120
|
+
* If `debounceMode` is true (at begin), schedule `clear` to execute
|
|
121
|
+
* after `delay` ms.
|
|
122
|
+
*
|
|
123
|
+
* If `debounceMode` is false (at end), schedule `callback` to
|
|
124
|
+
* execute after `delay` ms.
|
|
125
|
+
*/
|
|
126
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
wrapper.cancel = cancel;
|
|
130
|
+
|
|
131
|
+
// Return the wrapper function.
|
|
132
|
+
return wrapper;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* eslint-disable no-undefined */
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Debounce execution of a function. Debouncing, unlike throttling,
|
|
139
|
+
* guarantees that a function is only executed a single time, either at the
|
|
140
|
+
* very beginning of a series of calls, or at the very end.
|
|
141
|
+
*
|
|
142
|
+
* @param {number} delay - A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.
|
|
143
|
+
* @param {Function} callback - A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,
|
|
144
|
+
* to `callback` when the debounced-function is executed.
|
|
145
|
+
* @param {object} [options] - An object to configure options.
|
|
146
|
+
* @param {boolean} [options.atBegin] - Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds
|
|
147
|
+
* after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.
|
|
148
|
+
* (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).
|
|
149
|
+
*
|
|
150
|
+
* @returns {Function} A new, debounced function.
|
|
151
|
+
*/
|
|
152
|
+
function debounce (delay, callback, options) {
|
|
153
|
+
var _ref = {},
|
|
154
|
+
_ref$atBegin = _ref.atBegin,
|
|
155
|
+
atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
|
|
156
|
+
return throttle(delay, callback, {
|
|
157
|
+
debounceMode: atBegin !== false
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
class Breakpoint {
|
|
162
|
+
constructor() {
|
|
163
|
+
this.breakpoints = [
|
|
164
|
+
{ key: 'xl', device: 'desktop', minWidth: 1280 },
|
|
165
|
+
{ key: 'lg', device: 'desktop', minWidth: 1024 },
|
|
166
|
+
{ key: 'md', device: 'tablet', minWidth: 780 },
|
|
167
|
+
{ key: 'sm', device: 'tablet', minWidth: 600 },
|
|
168
|
+
{ key: 'xs', device: 'mobile', minWidth: 0 },
|
|
169
|
+
];
|
|
170
|
+
this.resizeObserver = globalThis.ResizeObserver
|
|
171
|
+
? new ResizeObserver(() => this.updateCurrentBreakpoint())
|
|
172
|
+
: null;
|
|
173
|
+
this.updateCurrentBreakpoint = throttle(50, (options = { emitEvents: true }) => {
|
|
174
|
+
const previousBreakpoint = this.currentBreakpoint;
|
|
175
|
+
const newBreakpoint = this.breakpoints.find(breakpoint => {
|
|
176
|
+
return breakpoint.minWidth <= innerWidth;
|
|
177
|
+
});
|
|
178
|
+
if (!newBreakpoint)
|
|
179
|
+
return;
|
|
180
|
+
this.currentBreakpoint = newBreakpoint;
|
|
181
|
+
if (!options.emitEvents)
|
|
182
|
+
return;
|
|
183
|
+
Object.keys(this.currentBreakpoint)
|
|
184
|
+
.filter(key => !previousBreakpoint || this.currentBreakpoint[key] !== previousBreakpoint[key])
|
|
185
|
+
.forEach((key) => this.dispatchEvent(key));
|
|
186
|
+
});
|
|
187
|
+
if (this.resizeObserver) {
|
|
188
|
+
this.updateCurrentBreakpoint({ emitEvents: false });
|
|
189
|
+
this.resizeObserver.observe(document.body);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
dispatchEvent(property) {
|
|
193
|
+
globalThis.dispatchEvent(new CustomEvent(`postBreakpoint:${property}`, { detail: this.currentBreakpoint[property] }));
|
|
194
|
+
}
|
|
195
|
+
get(property) {
|
|
196
|
+
this.updateCurrentBreakpoint({ emitEvents: false });
|
|
197
|
+
return this.currentBreakpoint[property];
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const breakpoint = new Breakpoint();
|
|
201
|
+
|
|
202
|
+
export { breakpoint as b, debounce as d, throttle as t };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
3
|
+
* @see https://stenciljs.com/docs/api#componentonready
|
|
4
|
+
*/
|
|
5
|
+
function componentOnReady(el) {
|
|
6
|
+
if (typeof el.componentOnReady === 'function') {
|
|
7
|
+
return el.componentOnReady();
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return new Promise(resolve => customOnReady(() => {
|
|
11
|
+
resolve(el);
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function customOnReady(callback) {
|
|
16
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
17
|
+
return requestAnimationFrame(callback);
|
|
18
|
+
}
|
|
19
|
+
return setTimeout(callback);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { componentOnReady as c };
|