@swisspost/design-system-components 10.0.0-next.37 → 10.0.0-next.39
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/index-2b2b85e5.js +96 -0
- package/dist/cjs/index.cjs.js +23 -27
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{package-8121f093.js → package-29dc73af.js} +1 -1
- package/dist/cjs/placement-b2bb6ec4.js +18 -0
- package/dist/cjs/{post-accordion-beac7c9f.js → post-accordion-c433c493.js} +8 -8
- package/dist/cjs/{post-accordion-item-4846fbee.js → post-accordion-item-8d5a301d.js} +5 -5
- package/dist/cjs/post-accordion-item.cjs.entry.js +3 -7
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/{post-avatar-a36991fb.js → post-avatar-421043df.js} +21 -4
- package/dist/cjs/post-avatar.cjs.entry.js +3 -4
- package/dist/cjs/{post-back-to-top-32aa9017.js → post-back-to-top-3cca3803.js} +8 -11
- package/dist/cjs/post-back-to-top.cjs.entry.js +3 -5
- package/dist/cjs/{post-banner-be0e8909.js → post-banner-2e99c9d8.js} +12 -17
- package/dist/cjs/post-banner.cjs.entry.js +3 -8
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +3 -7
- package/dist/cjs/{post-breadcrumbs-6ef82a41.js → post-breadcrumbs-1be50860.js} +13 -7
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +3 -3
- package/dist/cjs/{post-card-control-fe919333.js → post-card-control-0bfdad92.js} +42 -21
- package/dist/cjs/post-card-control.cjs.entry.js +3 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +5 -9
- package/dist/cjs/{post-collapsible-trigger-f42be607.js → post-collapsible-trigger-4180b218.js} +5 -8
- package/dist/cjs/post-collapsible_2.cjs.entry.js +3 -8
- package/dist/cjs/post-components.cjs.js +1 -1
- package/dist/cjs/{post-footer-5179aa17.js → post-footer-92adffac.js} +12 -2
- package/dist/cjs/post-footer.cjs.entry.js +3 -2
- package/dist/cjs/{post-linkarea-27125078.js → post-linkarea-26c457b3.js} +1 -1
- package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
- package/dist/cjs/{post-menu-item-d78a9121.js → post-menu-item-d0a53c84.js} +3 -3
- package/dist/cjs/{post-popover-feb1e773.js → post-popover-36cead3d.js} +20 -5
- package/dist/cjs/post-popover.cjs.entry.js +4 -2
- package/dist/cjs/{post-rating-6d153a2c.js → post-rating-f50a9939.js} +29 -8
- package/dist/cjs/post-rating.cjs.entry.js +4 -2
- package/dist/cjs/{post-tab-header-e4532918.js → post-tab-header-f47508da.js} +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -4
- package/dist/cjs/{post-tab-panel-40df21ad.js → post-tab-panel-7c51798b.js} +11 -2
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -2
- package/dist/cjs/{post-tabs-45db2696.js → post-tabs-2debea01.js} +2 -2
- package/dist/cjs/post-tabs.cjs.entry.js +2 -2
- package/dist/cjs/{post-tag-0967bb1e.js → post-tag-ac62c57f.js} +18 -5
- package/dist/cjs/post-tag.cjs.entry.js +4 -2
- package/dist/cjs/{post-togglebutton-42b7d166.js → post-togglebutton-43c46511.js} +85 -88
- package/dist/cjs/{post-tooltip-f833d51d.js → post-tooltip-b7dcfb44.js} +11 -10
- package/dist/cjs/{post-tooltip-trigger-3ceac010.js → post-tooltip-trigger-904061b6.js} +6 -8
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +3 -3
- package/dist/cjs/post-tooltip.cjs.entry.js +4 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +7 -7
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +3 -3
- package/dist/collection/components/post-avatar/post-avatar.js +25 -2
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +8 -10
- package/dist/collection/components/post-banner/post-banner.js +13 -18
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +1 -1
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +15 -7
- package/dist/collection/components/post-card-control/post-card-control.js +58 -33
- 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 +4 -5
- package/dist/collection/components/post-footer/post-footer.js +14 -2
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +29 -54
- package/dist/collection/components/post-icon/post-icon.js +17 -37
- package/dist/collection/components/post-language-option/post-language-option.js +13 -13
- package/dist/collection/components/post-language-switch/post-language-switch.js +5 -5
- package/dist/collection/components/post-logo/post-logo.js +2 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +3 -3
- package/dist/collection/components/post-menu/post-menu.js +13 -2
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
- package/dist/collection/components/post-popover/post-popover.js +21 -2
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +26 -4
- package/dist/collection/components/post-rating/post-rating.js +29 -2
- package/dist/collection/components/post-tab-header/post-tab-header.js +5 -10
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +13 -2
- package/dist/collection/components/post-tabs/post-tabs.js +2 -2
- package/dist/collection/components/post-tag/post-tag.js +23 -11
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -12
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +12 -12
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +5 -7
- package/dist/collection/types/index.js +2 -0
- package/dist/collection/types/placement.js +14 -0
- package/dist/collection/types/property-types.js +1 -0
- package/dist/collection/utils/is-value-empty.js +4 -0
- package/dist/collection/utils/property-checkers/check-one-of.js +3 -4
- package/dist/collection/utils/property-checkers/check-pattern.js +3 -4
- package/dist/collection/utils/property-checkers/check-type.js +4 -6
- package/dist/collection/utils/property-checkers/check-url.js +5 -5
- package/dist/collection/utils/property-checkers/constants.js +1 -1
- package/dist/collection/utils/property-checkers/empty-or.js +4 -6
- package/dist/collection/utils/property-checkers/index.js +6 -6
- package/dist/collection/utils/property-checkers/required-and.js +14 -0
- package/dist/components/index2.js +60 -19
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +4 -4
- package/dist/components/post-accordion2.js +7 -7
- package/dist/components/post-avatar2.js +24 -4
- package/dist/components/post-back-to-top2.js +9 -12
- package/dist/components/post-banner2.js +12 -18
- package/dist/components/post-breadcrumb-item2.js +2 -2
- package/dist/components/post-breadcrumbs2.js +14 -7
- package/dist/components/post-card-control2.js +41 -16
- package/dist/components/post-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +3 -5
- package/dist/components/post-collapsible2.js +2 -2
- package/dist/components/post-footer2.js +13 -1
- package/dist/components/post-header2.js +31 -33
- package/dist/components/post-icon2.js +9 -25
- package/dist/components/post-language-option2.js +9 -10
- package/dist/components/post-language-switch2.js +4 -6
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-mainnavigation2.js +1 -1
- package/dist/components/post-megadropdown-trigger2.js +4 -4
- package/dist/components/post-megadropdown2.js +1 -1
- package/dist/components/post-menu-trigger2.js +3 -3
- package/dist/components/post-menu2.js +12 -2
- package/dist/components/post-popover2.js +20 -3
- package/dist/components/post-popovercontainer2.js +37 -3
- package/dist/components/post-rating2.js +26 -1
- package/dist/components/post-tab-header2.js +2 -2
- package/dist/components/post-tab-panel2.js +12 -1
- package/dist/components/post-tabs2.js +1 -1
- package/dist/components/post-tag2.js +19 -5
- package/dist/components/post-togglebutton2.js +1 -12
- package/dist/components/post-tooltip-trigger2.js +5 -7
- package/dist/components/post-tooltip2.js +11 -11
- package/dist/components/switch-variants.js +3 -0
- package/dist/docs.json +39 -87
- package/dist/esm/index-ffccd040.js +88 -0
- package/dist/esm/index.js +23 -27
- package/dist/esm/loader.js +1 -1
- package/dist/esm/package-8503eaa8.js +3 -0
- package/dist/esm/placement-8d56605d.js +16 -0
- package/dist/esm/{post-accordion-fdcf7205.js → post-accordion-9365faca.js} +8 -8
- package/dist/esm/{post-accordion-item-e11e3804.js → post-accordion-item-2dc8e3b7.js} +5 -5
- package/dist/esm/post-accordion-item.entry.js +3 -7
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/{post-avatar-d360c6d2.js → post-avatar-4f73dc4d.js} +21 -4
- package/dist/esm/post-avatar.entry.js +3 -4
- package/dist/esm/{post-back-to-top-85796c8b.js → post-back-to-top-8f759d32.js} +8 -11
- package/dist/esm/post-back-to-top.entry.js +3 -5
- package/dist/esm/{post-banner-a3090f67.js → post-banner-ad979275.js} +12 -17
- package/dist/esm/post-banner.entry.js +3 -8
- package/dist/esm/post-breadcrumb-item_2.entry.js +3 -7
- package/dist/esm/{post-breadcrumbs-15ec5a26.js → post-breadcrumbs-a20336c7.js} +13 -7
- package/dist/esm/post-breadcrumbs.entry.js +3 -3
- package/dist/esm/{post-card-control-6142534e.js → post-card-control-3c77e778.js} +37 -16
- package/dist/esm/post-card-control.entry.js +3 -5
- package/dist/esm/post-closebutton_15.entry.js +5 -9
- package/dist/esm/{post-collapsible-trigger-68306358.js → post-collapsible-trigger-5fd0e193.js} +5 -8
- package/dist/esm/post-collapsible_2.entry.js +3 -8
- package/dist/esm/post-components.js +1 -1
- package/dist/esm/{post-footer-d2a3270e.js → post-footer-3e117b5a.js} +12 -2
- package/dist/esm/post-footer.entry.js +3 -2
- package/dist/esm/{post-linkarea-64998c67.js → post-linkarea-16a14609.js} +1 -1
- package/dist/esm/post-linkarea.entry.js +2 -2
- package/dist/esm/{post-menu-item-95a0a647.js → post-menu-item-b1604fe4.js} +3 -3
- package/dist/esm/{post-popover-c5f81087.js → post-popover-49096648.js} +17 -2
- package/dist/esm/post-popover.entry.js +4 -2
- package/dist/esm/{post-rating-7bfedafb.js → post-rating-405bee8f.js} +23 -2
- package/dist/esm/post-rating.entry.js +4 -2
- package/dist/esm/{post-tab-header-08033da4.js → post-tab-header-b228c217.js} +3 -3
- package/dist/esm/post-tab-header.entry.js +3 -4
- package/dist/esm/{post-tab-panel-be701793.js → post-tab-panel-98110b64.js} +11 -2
- package/dist/esm/post-tab-panel.entry.js +4 -2
- package/dist/esm/{post-tabs-c69e2842.js → post-tabs-44d9313c.js} +2 -2
- package/dist/esm/post-tabs.entry.js +2 -2
- package/dist/esm/{post-tag-ebac7f3e.js → post-tag-99cc9616.js} +18 -5
- package/dist/esm/post-tag.entry.js +4 -2
- package/dist/esm/{post-togglebutton-706e3af0.js → post-togglebutton-ea73e63f.js} +85 -88
- package/dist/esm/{post-tooltip-9a195d47.js → post-tooltip-78cd2988.js} +11 -10
- package/dist/esm/{post-tooltip-trigger-7d6f234b.js → post-tooltip-trigger-bdb21c45.js} +6 -8
- package/dist/esm/post-tooltip-trigger.entry.js +3 -3
- package/dist/esm/post-tooltip.entry.js +4 -3
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-09dd5aa4.js +1 -0
- package/dist/post-components/{p-17dc4170.js → p-0f9322e5.js} +2 -2
- package/dist/post-components/{p-de4d4274.js → p-11572299.js} +1 -1
- package/dist/post-components/p-19a83519.entry.js +1 -0
- package/dist/post-components/p-1afb3c43.entry.js +1 -0
- package/dist/post-components/p-214cd032.js +1 -0
- package/dist/post-components/p-21e5b028.js +1 -0
- package/dist/post-components/p-2320305b.js +1 -0
- package/dist/post-components/p-2523f97b.entry.js +1 -0
- package/dist/post-components/p-2bd3a436.js +1 -0
- package/dist/post-components/p-2ce8fbf5.js +1 -0
- package/dist/post-components/p-2f879f4e.entry.js +1 -0
- package/dist/post-components/p-33e26845.entry.js +1 -0
- package/dist/post-components/p-38b1c71e.entry.js +1 -0
- package/dist/post-components/p-38d59732.js +1 -0
- package/dist/post-components/p-3a67f1ff.js +1 -0
- package/dist/post-components/p-41450b6c.entry.js +1 -0
- package/dist/post-components/p-4c23ed05.entry.js +1 -0
- package/dist/post-components/p-57746c40.js +1 -0
- package/dist/post-components/p-59a38c23.js +1 -0
- package/dist/post-components/p-6313d72e.entry.js +1 -0
- package/dist/post-components/p-64e0b0fc.js +1 -0
- package/dist/post-components/p-658a2e34.entry.js +1 -0
- package/dist/post-components/p-746d3cd3.entry.js +1 -0
- package/dist/post-components/p-79a2dad0.entry.js +1 -0
- package/dist/post-components/p-7dd1807c.js +1 -0
- package/dist/post-components/p-817fbeaf.js +1 -0
- package/dist/post-components/p-85950200.js +1 -0
- package/dist/post-components/p-8ebecf22.entry.js +1 -0
- package/dist/post-components/p-8ed1cb53.entry.js +1 -0
- package/dist/post-components/p-91244b25.js +1 -0
- package/dist/post-components/{p-ab566526.js → p-91675004.js} +1 -1
- package/dist/post-components/p-94ebc430.js +1 -0
- package/dist/post-components/p-95727a4f.entry.js +1 -0
- package/dist/post-components/p-a844da3a.entry.js +1 -0
- package/dist/post-components/{p-1a21fd8d.js → p-af900651.js} +1 -1
- package/dist/post-components/p-b176309b.js +1 -0
- package/dist/post-components/p-b373659e.entry.js +1 -0
- package/dist/post-components/p-b500b245.js +1 -0
- package/dist/post-components/p-bf182745.entry.js +1 -0
- package/dist/post-components/p-c9b6f9e7.entry.js +1 -0
- package/dist/post-components/p-cb7d8f67.entry.js +1 -0
- package/dist/post-components/p-e28eb73a.js +1 -0
- package/dist/post-components/post-components.css +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/prebuild.js +26 -0
- package/dist/types/components/post-accordion/post-accordion.d.ts +2 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +3 -0
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +1 -1
- package/dist/types/components/post-banner/post-banner.d.ts +3 -4
- package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +2 -1
- package/dist/types/components/post-card-control/post-card-control.d.ts +10 -6
- package/dist/types/components/post-footer/post-footer.d.ts +2 -0
- package/dist/types/components/post-header/post-header.d.ts +5 -9
- package/dist/types/components/post-icon/post-icon.d.ts +5 -7
- package/dist/types/components/post-language-option/post-language-option.d.ts +5 -5
- package/dist/types/components/post-logo/post-logo.d.ts +1 -1
- package/dist/types/components/post-menu/post-menu.d.ts +1 -0
- package/dist/types/components/post-popover/post-popover.d.ts +2 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +3 -0
- package/dist/types/components/post-rating/post-rating.d.ts +4 -0
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
- package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +1 -0
- package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
- package/dist/types/components/post-tag/post-tag.d.ts +5 -3
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +0 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +3 -3
- package/dist/types/components.d.ts +38 -59
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/placement.d.ts +1 -0
- package/dist/types/types/property-types.d.ts +1 -0
- package/dist/types/utils/is-value-empty.d.ts +1 -0
- package/dist/types/utils/property-checkers/check-one-of.d.ts +1 -1
- package/dist/types/utils/property-checkers/check-pattern.d.ts +1 -1
- package/dist/types/utils/property-checkers/check-type.d.ts +2 -2
- package/dist/types/utils/property-checkers/check-url.d.ts +1 -1
- package/dist/types/utils/property-checkers/constants.d.ts +1 -1
- package/dist/types/utils/property-checkers/empty-or.d.ts +3 -1
- package/dist/types/utils/property-checkers/index.d.ts +16 -9
- package/dist/types/utils/property-checkers/required-and.d.ts +3 -0
- package/loaders/index2.js +60 -19
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item2.js +4 -4
- package/loaders/post-accordion.js +7 -7
- package/loaders/post-avatar.js +24 -4
- package/loaders/post-back-to-top.js +9 -12
- package/loaders/post-banner.js +12 -18
- package/loaders/post-breadcrumb-item2.js +2 -2
- package/loaders/post-breadcrumbs.js +14 -7
- package/loaders/post-card-control.js +41 -16
- package/loaders/post-closebutton.js +1 -1
- package/loaders/post-collapsible-trigger2.js +3 -5
- package/loaders/post-collapsible2.js +2 -2
- package/loaders/post-footer.js +13 -1
- package/loaders/post-header.js +31 -33
- package/loaders/post-icon2.js +9 -25
- package/loaders/post-language-option.js +9 -10
- package/loaders/post-language-switch.js +4 -6
- package/loaders/post-logo.js +2 -2
- package/loaders/post-mainnavigation.js +1 -1
- package/loaders/post-megadropdown-trigger.js +4 -4
- package/loaders/post-megadropdown.js +1 -1
- package/loaders/post-menu-trigger2.js +3 -3
- package/loaders/post-menu2.js +12 -2
- package/loaders/post-popover.js +20 -3
- package/loaders/post-popovercontainer.js +1 -1
- package/loaders/post-popovercontainer2.js +37 -3
- package/loaders/post-rating.js +26 -1
- package/loaders/post-tab-header.js +2 -2
- package/loaders/post-tab-panel.js +12 -1
- package/loaders/post-tabs.js +1 -1
- package/loaders/post-tag.js +19 -5
- package/loaders/post-togglebutton.js +1 -12
- package/loaders/post-tooltip-trigger.js +5 -7
- package/loaders/post-tooltip.js +11 -11
- package/loaders/switch-variants.js +3 -0
- package/package.json +19 -9
- package/dist/cjs/check-non-empty-bd99d236.js +0 -15
- package/dist/cjs/check-one-of-75d270b5.js +0 -13
- package/dist/cjs/check-type-cdbf6d29.js +0 -21
- package/dist/cjs/check-url-220a286c.js +0 -19
- package/dist/cjs/constants-238701d3.js +0 -5
- package/dist/cjs/index-23e36ff7.js +0 -37
- package/dist/collection/utils/property-checkers/check-non-empty.js +0 -10
- package/dist/components/check-non-empty.js +0 -13
- package/dist/components/check-one-of.js +0 -11
- package/dist/components/check-type.js +0 -19
- package/dist/components/constants.js +0 -3
- package/dist/esm/check-non-empty-258a56b3.js +0 -13
- package/dist/esm/check-one-of-0bee20f5.js +0 -11
- package/dist/esm/check-type-37d5d307.js +0 -19
- package/dist/esm/check-url-17962bc8.js +0 -17
- package/dist/esm/constants-8d548297.js +0 -3
- package/dist/esm/index-8f8fe5b0.js +0 -32
- package/dist/esm/package-d9237b44.js +0 -3
- package/dist/post-components/p-034715ec.js +0 -1
- package/dist/post-components/p-0717fe4c.js +0 -1
- package/dist/post-components/p-0c03547b.js +0 -1
- package/dist/post-components/p-0de8d05f.js +0 -1
- package/dist/post-components/p-1373a79b.entry.js +0 -1
- package/dist/post-components/p-181c73d5.js +0 -1
- package/dist/post-components/p-1ab3eba4.entry.js +0 -1
- package/dist/post-components/p-2d6c0670.js +0 -1
- package/dist/post-components/p-2dc0a2d0.js +0 -1
- package/dist/post-components/p-35ad2e11.entry.js +0 -1
- package/dist/post-components/p-368c473a.js +0 -1
- package/dist/post-components/p-38f778a7.entry.js +0 -1
- package/dist/post-components/p-39a8df3c.entry.js +0 -1
- package/dist/post-components/p-3c7f6003.js +0 -1
- package/dist/post-components/p-440193f4.js +0 -1
- package/dist/post-components/p-474a41bc.entry.js +0 -1
- package/dist/post-components/p-69bc8eaf.entry.js +0 -1
- package/dist/post-components/p-72310bf0.entry.js +0 -1
- package/dist/post-components/p-7709c14a.js +0 -1
- package/dist/post-components/p-804b61b7.entry.js +0 -1
- package/dist/post-components/p-85fdc2d3.js +0 -1
- package/dist/post-components/p-89247caa.js +0 -1
- package/dist/post-components/p-89dc67c7.entry.js +0 -1
- package/dist/post-components/p-8f7f5200.entry.js +0 -1
- package/dist/post-components/p-964f9581.js +0 -1
- package/dist/post-components/p-a52b2d34.js +0 -1
- package/dist/post-components/p-b648e537.entry.js +0 -1
- package/dist/post-components/p-bc33a6d9.js +0 -1
- package/dist/post-components/p-bcfdbd0b.entry.js +0 -1
- package/dist/post-components/p-beb67979.js +0 -1
- package/dist/post-components/p-c41868b1.js +0 -1
- package/dist/post-components/p-c71700a7.js +0 -1
- package/dist/post-components/p-cb027003.js +0 -1
- package/dist/post-components/p-cc5b1437.js +0 -1
- package/dist/post-components/p-ceda889e.entry.js +0 -1
- package/dist/post-components/p-d45df336.js +0 -1
- package/dist/post-components/p-deb9efcf.entry.js +0 -1
- package/dist/post-components/p-e585c6fe.js +0 -1
- package/dist/post-components/p-e9f1cc46.entry.js +0 -1
- package/dist/post-components/p-ee4e776d.entry.js +0 -1
- package/dist/post-components/p-ee7c3bcc.entry.js +0 -1
- package/dist/post-components/p-f56482fa.entry.js +0 -1
- package/dist/post-components/p-f8c652ce.entry.js +0 -1
- package/dist/types/utils/property-checkers/check-non-empty.d.ts +0 -3
- package/loaders/check-non-empty.js +0 -13
- package/loaders/check-one-of.js +0 -11
- package/loaders/check-type.js +0 -19
- package/loaders/constants.js +0 -3
|
@@ -1,47 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
import { c as checkOneOf } from './check-one-of.js';
|
|
3
|
-
import { c as checkType } from './check-type.js';
|
|
1
|
+
const EMPTY_VALUES = [undefined, null, '', NaN];
|
|
4
2
|
|
|
5
|
-
function
|
|
6
|
-
return (
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
function isValueEmpty(value) {
|
|
4
|
+
return EMPTY_VALUES.some(v => v === value);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function requiredAnd(check) {
|
|
8
|
+
return (component, prop, ...extraArgs) => {
|
|
9
|
+
const componentName = component.host.localName;
|
|
9
10
|
const value = component[prop];
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is not defined.`;
|
|
12
|
+
if (isValueEmpty(value)) {
|
|
13
|
+
throw new Error(message);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
check(component, prop, ...extraArgs);
|
|
12
17
|
}
|
|
13
18
|
};
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
function
|
|
21
|
+
function checkOneOf(component, prop, possibleValues) {
|
|
17
22
|
const componentName = component.host.localName;
|
|
18
23
|
const value = component[prop];
|
|
19
|
-
const
|
|
20
|
-
|
|
24
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
|
|
25
|
+
if (!possibleValues.includes(value)) {
|
|
26
|
+
console.error(message);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function checkPattern(component, prop, pattern) {
|
|
31
|
+
const componentName = component.host.localName;
|
|
32
|
+
const value = component[prop];
|
|
33
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must follow the format \`${pattern}\`.`;
|
|
21
34
|
if (typeof value !== 'string' || !pattern.test(value)) {
|
|
22
|
-
|
|
35
|
+
console.error(message);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function checkType(component, prop, type) {
|
|
40
|
+
const componentName = component.host.localName;
|
|
41
|
+
const value = component[prop];
|
|
42
|
+
const typeIsArray = type === 'array';
|
|
43
|
+
const valueIsArray = Array.isArray(value);
|
|
44
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`${type}\`.`;
|
|
45
|
+
if (typeIsArray || valueIsArray) {
|
|
46
|
+
if (valueIsArray !== typeIsArray) {
|
|
47
|
+
console.error(message);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else if (typeof value !== type) {
|
|
51
|
+
console.error(message);
|
|
23
52
|
}
|
|
24
53
|
}
|
|
25
54
|
|
|
26
|
-
function checkUrl(component, prop
|
|
55
|
+
function checkUrl(component, prop) {
|
|
27
56
|
const componentName = component.host.localName;
|
|
28
57
|
const value = component[prop];
|
|
29
|
-
const
|
|
30
|
-
const message = customMessage || defaultMessage;
|
|
58
|
+
const message = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
|
|
31
59
|
if (typeof value !== 'string' && !(value instanceof URL)) {
|
|
32
|
-
|
|
60
|
+
console.error(message);
|
|
61
|
+
return;
|
|
33
62
|
}
|
|
34
63
|
try {
|
|
35
64
|
new URL(value, 'https://www.post.ch');
|
|
36
65
|
}
|
|
37
66
|
catch {
|
|
38
|
-
|
|
67
|
+
console.error(message);
|
|
39
68
|
}
|
|
40
69
|
}
|
|
41
70
|
|
|
71
|
+
function emptyOr(check) {
|
|
72
|
+
return (component, prop, ...extraArgs) => {
|
|
73
|
+
const value = component[prop];
|
|
74
|
+
if (!isValueEmpty(value)) {
|
|
75
|
+
check(component, prop, ...extraArgs);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
42
80
|
const checkEmptyOrOneOf = emptyOr(checkOneOf);
|
|
43
81
|
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
44
82
|
const checkEmptyOrType = emptyOr(checkType);
|
|
45
83
|
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
84
|
+
const checkRequiredAndOneOf = requiredAnd(checkOneOf);
|
|
85
|
+
const checkRequiredAndType = requiredAnd(checkType);
|
|
86
|
+
const checkRequiredAndUrl = requiredAnd(checkUrl);
|
|
46
87
|
|
|
47
|
-
export {
|
|
88
|
+
export { checkEmptyOrOneOf as a, checkRequiredAndType as b, checkRequiredAndOneOf as c, checkEmptyOrType as d, checkEmptyOrPattern as e, checkRequiredAndUrl as f, checkEmptyOrUrl as g };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels.js';
|
|
4
|
-
import {
|
|
4
|
+
import { a as checkEmptyOrOneOf } from './index2.js';
|
|
5
5
|
import './breakpoints.js';
|
|
6
6
|
import { e as eventGuard } from './event-guard.js';
|
|
7
7
|
import { n as nanoid } from './index.browser.js';
|
|
@@ -23,7 +23,7 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
23
23
|
this.headingLevel = undefined;
|
|
24
24
|
}
|
|
25
25
|
validateHeadingLevel() {
|
|
26
|
-
checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS
|
|
26
|
+
checkEmptyOrOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
27
27
|
}
|
|
28
28
|
componentWillLoad() {
|
|
29
29
|
this.id = this.host.id || `p${nanoid(6)}`;
|
|
@@ -52,10 +52,10 @@ const PostAccordionItem = /*@__PURE__*/ proxyCustomElement(class PostAccordionIt
|
|
|
52
52
|
render() {
|
|
53
53
|
const headingLevel = this.host.closest('post-accordion')?.getAttribute('heading-level');
|
|
54
54
|
const HeadingTag = `h${headingLevel ?? this.headingLevel ?? 2}`;
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '4de770633e0c9b9bb92b92a66be9a1481bf0fb3e', id: this.id, "data-version": version }, h("div", { key: '4c2b91b25637cbe284442626d02d0ce6496589a4', part: "accordion-item", class: "accordion-item" }, h("post-collapsible-trigger", { key: '777f8b222b017b765f265296ad2829a027a99c22', for: `${this.id}--collapse` }, h(HeadingTag, { key: 'a646d911ea83c004fbc5490cb1e9dafdf490d09f', class: "accordion-header", id: `${this.id}--header` }, h("button", { key: '0c30a665426b98fff997874c365ffc6b97ecc01c', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, h("span", { key: '64edd8541af949f87ad929173c4a5210f892b0b6', class: {
|
|
56
56
|
'logo-container': true,
|
|
57
57
|
'has-image': !!this.slottedLogo,
|
|
58
|
-
} }, h("slot", { key: '
|
|
58
|
+
} }, h("slot", { key: 'a3dfd1796d7c3b854980078673a017d58acb97ea', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), h("slot", { key: 'd008c9aebfd8431afa4eae1af8646dd7de97916b', name: "header" }), h("post-icon", { key: 'ee5150a9cd7693e57f639cf09d9c4f24aae57308', name: "2051" })))), h("post-collapsible", { key: '12d2ef55e0e7615619a0a246268e8af3d3d8e712', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, h("div", { key: 'd2cf362418c50ad56f8dee8e43baabbd976682f9', class: "accordion-body", part: "body" }, h("slot", { key: '6792db26a9eab60e113d62e23faf003a6b43685b' }))))));
|
|
59
59
|
}
|
|
60
60
|
get host() { return this; }
|
|
61
61
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { H as HEADING_LEVELS } from './heading-levels.js';
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as checkRequiredAndOneOf } from './index2.js';
|
|
5
5
|
import './breakpoints.js';
|
|
6
6
|
import { e as eventGuard } from './event-guard.js';
|
|
7
7
|
|
|
@@ -17,16 +17,16 @@ const PostAccordion = /*@__PURE__*/ proxyCustomElement(class PostAccordion exten
|
|
|
17
17
|
this.headingLevel = undefined;
|
|
18
18
|
this.multiple = false;
|
|
19
19
|
}
|
|
20
|
-
validateHeadingLevel(
|
|
21
|
-
|
|
22
|
-
return;
|
|
23
|
-
checkOneOf(this, 'headingLevel', HEADING_LEVELS, 'The `heading-level` property of the `post-accordion` must be a number between 1 and 6.');
|
|
20
|
+
validateHeadingLevel() {
|
|
21
|
+
checkRequiredAndOneOf(this, 'headingLevel', HEADING_LEVELS);
|
|
24
22
|
this.accordionItems.forEach(item => {
|
|
25
|
-
item.setAttribute('heading-level', String(
|
|
23
|
+
item.setAttribute('heading-level', String(this.headingLevel));
|
|
26
24
|
});
|
|
27
25
|
}
|
|
28
26
|
componentWillLoad() {
|
|
29
27
|
this.registerAccordionItems();
|
|
28
|
+
}
|
|
29
|
+
componentDidLoad() {
|
|
30
30
|
this.validateHeadingLevel();
|
|
31
31
|
}
|
|
32
32
|
collapseToggleHandler(event) {
|
|
@@ -93,7 +93,7 @@ const PostAccordion = /*@__PURE__*/ proxyCustomElement(class PostAccordion exten
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
render() {
|
|
96
|
-
return (h(Host, { key: '
|
|
96
|
+
return (h(Host, { key: '7057a6926f2279f7fc86d7f8539dd3ca884a3d70', "data-version": version }, h("div", { key: 'a6d337471d1d16c09d7e6af950d39c58fc6f2880', class: "accordion" }, h("slot", { key: '9687babb4b539f6e54468555b4057a2b378e1e10', onSlotchange: () => this.registerAccordionItems() }))));
|
|
97
97
|
}
|
|
98
98
|
get host() { return this; }
|
|
99
99
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
-
import {
|
|
3
|
+
import { b as checkRequiredAndType, d as checkEmptyOrType, e as checkEmptyOrPattern } from './index2.js';
|
|
4
4
|
import './breakpoints.js';
|
|
5
5
|
|
|
6
6
|
const postAvatarCss = "@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:\"\";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;z-index:2;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase}.initials span{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.initials span:not(caption){position:absolute !important}";
|
|
@@ -11,6 +11,7 @@ const GRAVATAR_DEFAULT = '404';
|
|
|
11
11
|
const GRAVATAR_RATING = 'g';
|
|
12
12
|
const GRAVATAR_SIZE = 80;
|
|
13
13
|
const GRAVATAR_BASE_URL = `https://www.gravatar.com/avatar/{email}?s=${GRAVATAR_SIZE}&d=${GRAVATAR_DEFAULT}&r=${GRAVATAR_RATING}`;
|
|
14
|
+
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
14
15
|
var AvatarType;
|
|
15
16
|
(function (AvatarType) {
|
|
16
17
|
AvatarType["Slotted"] = "slotted";
|
|
@@ -34,7 +35,17 @@ const PostAvatar = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends HTM
|
|
|
34
35
|
this.initials = '';
|
|
35
36
|
}
|
|
36
37
|
validateFirstname() {
|
|
37
|
-
|
|
38
|
+
checkRequiredAndType(this, 'firstname', 'string');
|
|
39
|
+
}
|
|
40
|
+
validateLastname() {
|
|
41
|
+
checkEmptyOrType(this, 'lastname', 'string');
|
|
42
|
+
}
|
|
43
|
+
validateUserid() {
|
|
44
|
+
checkEmptyOrType(this, 'userid', 'string');
|
|
45
|
+
}
|
|
46
|
+
validateEmail() {
|
|
47
|
+
if (this.email)
|
|
48
|
+
checkEmptyOrPattern(this, 'email', emailPattern);
|
|
38
49
|
}
|
|
39
50
|
async getAvatar() {
|
|
40
51
|
if (this.slottedImage !== null) {
|
|
@@ -122,6 +133,9 @@ const PostAvatar = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends HTM
|
|
|
122
133
|
}
|
|
123
134
|
componentDidLoad() {
|
|
124
135
|
this.validateFirstname();
|
|
136
|
+
this.validateLastname();
|
|
137
|
+
this.validateUserid();
|
|
138
|
+
this.validateEmail();
|
|
125
139
|
}
|
|
126
140
|
render() {
|
|
127
141
|
const initials = this.getNames().reduce((acc, n, i) => {
|
|
@@ -136,7 +150,10 @@ const PostAvatar = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends HTM
|
|
|
136
150
|
}
|
|
137
151
|
get host() { return this; }
|
|
138
152
|
static get watchers() { return {
|
|
139
|
-
"firstname": ["validateFirstname"]
|
|
153
|
+
"firstname": ["validateFirstname"],
|
|
154
|
+
"lastname": ["validateLastname"],
|
|
155
|
+
"userid": ["validateUserid"],
|
|
156
|
+
"email": ["validateEmail"]
|
|
140
157
|
}; }
|
|
141
158
|
static get style() { return PostAvatarStyle0; }
|
|
142
159
|
}, [1, "post-avatar", {
|
|
@@ -150,7 +167,10 @@ const PostAvatar = /*@__PURE__*/ proxyCustomElement(class PostAvatar extends HTM
|
|
|
150
167
|
"imageAlt": [32],
|
|
151
168
|
"initials": [32]
|
|
152
169
|
}, undefined, {
|
|
153
|
-
"firstname": ["validateFirstname"]
|
|
170
|
+
"firstname": ["validateFirstname"],
|
|
171
|
+
"lastname": ["validateLastname"],
|
|
172
|
+
"userid": ["validateUserid"],
|
|
173
|
+
"email": ["validateEmail"]
|
|
154
174
|
}]);
|
|
155
175
|
PostAvatar.INTERNAL_USERID_IMAGE_SRC = 'https://web.post.ch/UserProfileImage/{userid}.png';
|
|
156
176
|
function defineCustomElement() {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as slideDown, a as slideUp } from './slide.js';
|
|
3
3
|
import { v as version } from './package.js';
|
|
4
|
-
import {
|
|
5
|
-
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
4
|
+
import { b as checkRequiredAndType } from './index2.js';
|
|
6
5
|
import './breakpoints.js';
|
|
7
6
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
8
7
|
|
|
@@ -23,6 +22,9 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
|
|
|
23
22
|
isBelowFold() {
|
|
24
23
|
return window.scrollY > window.innerHeight;
|
|
25
24
|
}
|
|
25
|
+
validateLabel() {
|
|
26
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
27
|
+
}
|
|
26
28
|
/*Watch for changes in belowFold to show/hide the back to top button*/
|
|
27
29
|
watchBelowFold(newValue) {
|
|
28
30
|
if (newValue) {
|
|
@@ -66,11 +68,6 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
|
|
|
66
68
|
this.host.style.transform = `translateY(${this.translateY})`;
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
|
-
// Validate the label
|
|
70
|
-
validateLabel() {
|
|
71
|
-
checkNonEmpty(this, 'label');
|
|
72
|
-
checkType(this, 'label', 'string');
|
|
73
|
-
}
|
|
74
71
|
// Set the initial state
|
|
75
72
|
componentWillLoad() {
|
|
76
73
|
this.belowFold = this.isBelowFold();
|
|
@@ -84,20 +81,20 @@ const PostBackToTop = /*@__PURE__*/ proxyCustomElement(class PostBackToTop exten
|
|
|
84
81
|
window.removeEventListener('scroll', this.handleScroll);
|
|
85
82
|
}
|
|
86
83
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
84
|
+
return (h(Host, { key: '7edc6db9d849cf9ce0308a2ac5b2c2f9bc4e47a9', "data-version": version }, h("button", { key: '610e81756ce3dd927f55d48beb8cd829b66fc247', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, h("post-icon", { key: 'bb1f3cc462de7680361f4cfd04abb1816aebd488', "aria-hidden": "true", name: "3026" }), h("span", { key: '4fbd84d78c425140adea5833450cef60af967f5a', class: "visually-hidden" }, this.label))));
|
|
88
85
|
}
|
|
89
86
|
get host() { return this; }
|
|
90
87
|
static get watchers() { return {
|
|
91
|
-
"
|
|
92
|
-
"
|
|
88
|
+
"label": ["validateLabel"],
|
|
89
|
+
"belowFold": ["watchBelowFold"]
|
|
93
90
|
}; }
|
|
94
91
|
static get style() { return PostBackToTopStyle0; }
|
|
95
92
|
}, [1, "post-back-to-top", {
|
|
96
93
|
"label": [513],
|
|
97
94
|
"belowFold": [32]
|
|
98
95
|
}, undefined, {
|
|
99
|
-
"
|
|
100
|
-
"
|
|
96
|
+
"label": ["validateLabel"],
|
|
97
|
+
"belowFold": ["watchBelowFold"]
|
|
101
98
|
}]);
|
|
102
99
|
function defineCustomElement() {
|
|
103
100
|
if (typeof customElements === "undefined") {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { f as fadeOut } from './fade.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as checkRequiredAndType, d as checkEmptyOrType, a as checkEmptyOrOneOf } from './index2.js';
|
|
5
5
|
import './breakpoints.js';
|
|
6
6
|
import { n as nanoid } from './index.browser.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
8
|
-
import { c as checkType } from './check-type.js';
|
|
9
|
-
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
10
8
|
|
|
11
9
|
const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
|
|
12
10
|
|
|
@@ -29,23 +27,21 @@ const PostBanner = /*@__PURE__*/ proxyCustomElement(class PostBanner extends HTM
|
|
|
29
27
|
this.icon = undefined;
|
|
30
28
|
this.type = 'neutral';
|
|
31
29
|
}
|
|
32
|
-
|
|
33
|
-
checkType(this, 'dismissible', 'boolean');
|
|
34
|
-
setTimeout(() => this.validateDismissLabel());
|
|
35
|
-
}
|
|
36
|
-
validateDismissLabel() {
|
|
30
|
+
checkDismissible() {
|
|
37
31
|
if (this.dismissible) {
|
|
38
|
-
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
checkRequiredAndType(this, 'dismissLabel', 'string');
|
|
34
|
+
});
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
37
|
validateIcon() {
|
|
42
|
-
|
|
38
|
+
checkEmptyOrType(this, 'icon', 'string');
|
|
43
39
|
}
|
|
44
40
|
validateType() {
|
|
45
41
|
checkEmptyOrOneOf(this, 'type', BANNER_TYPES);
|
|
46
42
|
}
|
|
47
43
|
componentDidLoad() {
|
|
48
|
-
this.
|
|
44
|
+
this.checkDismissible();
|
|
49
45
|
this.validateIcon();
|
|
50
46
|
this.validateType();
|
|
51
47
|
}
|
|
@@ -71,19 +67,18 @@ const PostBanner = /*@__PURE__*/ proxyCustomElement(class PostBanner extends HTM
|
|
|
71
67
|
}
|
|
72
68
|
render() {
|
|
73
69
|
const defaultBannerContent = [
|
|
74
|
-
this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '
|
|
70
|
+
this.hasHeading && (h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, h("slot", { key: '6bf8a3c8152cda870f7d3036c837918f83dee8e1', name: "heading" }))),
|
|
75
71
|
h("slot", { key: `${this.bannerId}-message` }),
|
|
76
72
|
];
|
|
77
73
|
const actionBannerContent = [
|
|
78
74
|
h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
|
|
79
|
-
h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '
|
|
75
|
+
h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, h("slot", { key: '07a3ade9a798eeb292e28820483a4e5096fe3569', name: "actions" })),
|
|
80
76
|
];
|
|
81
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: '9b6c1935e20686e69005a0034ca711363b880647', "data-version": version }, h("div", { key: '9a4effd086d7279cbd91bea6b5510bc66349fdc5', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (h("button", { key: '7e822d65eaf6eb9aa356aed8cc95c0107ee1ae27', class: "btn-close", onClick: this.onDismissButtonClick }, h("span", { key: 'f1c7356412ddb9d046f985fde25703715a20755d', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
|
|
82
78
|
}
|
|
83
79
|
get host() { return this; }
|
|
84
80
|
static get watchers() { return {
|
|
85
|
-
"dismissible": ["
|
|
86
|
-
"dismissLabel": ["validateDismissLabel"],
|
|
81
|
+
"dismissible": ["checkDismissible"],
|
|
87
82
|
"icon": ["validateIcon"],
|
|
88
83
|
"type": ["validateType"]
|
|
89
84
|
}; }
|
|
@@ -100,8 +95,7 @@ const PostBanner = /*@__PURE__*/ proxyCustomElement(class PostBanner extends HTM
|
|
|
100
95
|
"onDismissButtonClick": [32],
|
|
101
96
|
"dismiss": [64]
|
|
102
97
|
}, undefined, {
|
|
103
|
-
"dismissible": ["
|
|
104
|
-
"dismissLabel": ["validateDismissLabel"],
|
|
98
|
+
"dismissible": ["checkDismissible"],
|
|
105
99
|
"icon": ["validateIcon"],
|
|
106
100
|
"type": ["validateType"]
|
|
107
101
|
}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
-
import {
|
|
3
|
+
import { g as checkEmptyOrUrl } from './index2.js';
|
|
4
4
|
import './breakpoints.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
6
6
|
|
|
@@ -47,7 +47,7 @@ const PostBreadcrumbItem = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumb
|
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
49
|
const BreadcrumbTag = this.validUrl ? 'a' : 'span';
|
|
50
|
-
return (h(Host, { key: '
|
|
50
|
+
return (h(Host, { key: '8db753265537822996e971b6910284246ed0c9b2', "data-version": version }, h("post-icon", { key: '5a40f01b5876337f6dff6117b61d0138b0c85d1e', name: "2111", class: "breadcrumb-item-icon" }), h(BreadcrumbTag, { key: '8a023863726927eca0f222a27f9b8946bc6c3b57', class: "breadcrumb-item", ...(this.validUrl ? { href: this.validUrl } : {}), onKeyDown: event => this.handleKeyDown(event) }, h("slot", { key: 'f98dd0552ff91b845bb838518cc619d613f57e5c' }))));
|
|
51
51
|
}
|
|
52
52
|
get host() { return this; }
|
|
53
53
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
-
import {
|
|
3
|
+
import { f as checkRequiredAndUrl, d as checkEmptyOrType } from './index2.js';
|
|
4
4
|
import './breakpoints.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './post-breadcrumb-item2.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './post-icon2.js';
|
|
@@ -49,13 +49,18 @@ const PostBreadcrumbs = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumbs e
|
|
|
49
49
|
this.isConcatenated = undefined;
|
|
50
50
|
this.lastWindowWidth = undefined;
|
|
51
51
|
}
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
validateHomeUrl() {
|
|
53
|
+
checkRequiredAndUrl(this, 'homeUrl');
|
|
54
|
+
}
|
|
55
|
+
validateHomeText() {
|
|
56
|
+
checkEmptyOrType(this, 'homeUrl', 'string');
|
|
54
57
|
}
|
|
55
58
|
componentWillLoad() {
|
|
56
59
|
this.updateBreadcrumbItems();
|
|
57
60
|
}
|
|
58
61
|
componentDidLoad() {
|
|
62
|
+
this.validateHomeUrl();
|
|
63
|
+
this.validateHomeText();
|
|
59
64
|
window.addEventListener('resize', this.handleResize);
|
|
60
65
|
this.waitForBreadcrumbsRef();
|
|
61
66
|
}
|
|
@@ -103,7 +108,7 @@ const PostBreadcrumbs = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumbs e
|
|
|
103
108
|
}
|
|
104
109
|
render() {
|
|
105
110
|
const visibleItems = this.breadcrumbItems.slice(0, -1);
|
|
106
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: '6498bbfb52739937fc8043a78fa66d922ce740ef', "data-version": version }, h("nav", { key: '421e51bdf79856ba2feb6c23f1b5bb4f5a87f975', "aria-label": "Breadcrumbs", class: "breadcrumbs-nav", ref: el => (this.breadcrumbsNavRef = el) }, h("ol", { key: '191140970a37312b486b594b065fcc6ef580f1ae', class: "no-list breadcrumbs-list" }, h("li", { key: '37e0da2803814556bac7102e4e27b13cfd268472' }, h("a", { key: 'b11a8dba7b19dac336dc5905dd74b84a9b83da58', href: this.homeUrl, class: "breadcrumb-link" }, h("span", { key: '147009734e9174d7b9541c3f5325d914ef5d35c0', class: "visually-hidden" }, this.homeText), h("post-icon", { key: '56dd5647116c03c11506fb1e2957edeb389c5718', name: "home", class: "home-icon" }))), this.isConcatenated ? (h("div", { class: "menu-trigger-wrapper", "aria-label": "More breadcrumbs", onKeyDown: e => {
|
|
107
112
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
108
113
|
e.preventDefault();
|
|
109
114
|
this.handleBreadcrumbItemClick();
|
|
@@ -114,11 +119,12 @@ const PostBreadcrumbs = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumbs e
|
|
|
114
119
|
linkElement?.click();
|
|
115
120
|
e.preventDefault();
|
|
116
121
|
}
|
|
117
|
-
} }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: '
|
|
122
|
+
} }, item.url ? h("a", { href: item.url }, item.text) : h("span", null, item.text)))))))) : (visibleItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: item.url || item.text }, item.text)))), this.lastItem && (h("post-breadcrumb-item", { key: 'ca1fe70041a11fa14e04e3e3d4fce699f23a127f', url: this.lastItem.url, "aria-current": "page", tabindex: -1 }, this.lastItem.text))), h("div", { key: '360825da69d23943a55ceb7095fabcccbf65795b', class: "hidden-items" }, h("a", { key: '9c5dedc65e639c853bc537a93971a45c6d801d00', href: this.homeUrl, class: "hidden-breadcrumb-item" }, h("span", { key: '2e6961ca93e24ba8042cf15f2f8cc14511c3d374', class: "visually-hidden" }, this.homeText), h("post-icon", { key: 'ea61643af1b2384e931ecbf5b9ff48950b69719e', name: "home", class: "home-icon" })), this.breadcrumbItems.map(item => (h("post-breadcrumb-item", { url: item.url, key: `hidden-${item.url || item.text}`, class: "hidden-breadcrumb-item" }, item.text)))))));
|
|
118
123
|
}
|
|
119
124
|
get host() { return this; }
|
|
120
125
|
static get watchers() { return {
|
|
121
|
-
"homeUrl": ["
|
|
126
|
+
"homeUrl": ["validateHomeUrl"],
|
|
127
|
+
"homeText": ["validateHomeText"]
|
|
122
128
|
}; }
|
|
123
129
|
static get style() { return PostBreadcrumbsStyle0; }
|
|
124
130
|
}, [1, "post-breadcrumbs", {
|
|
@@ -128,7 +134,8 @@ const PostBreadcrumbs = /*@__PURE__*/ proxyCustomElement(class PostBreadcrumbs e
|
|
|
128
134
|
"isConcatenated": [32],
|
|
129
135
|
"lastWindowWidth": [32]
|
|
130
136
|
}, undefined, {
|
|
131
|
-
"homeUrl": ["
|
|
137
|
+
"homeUrl": ["validateHomeUrl"],
|
|
138
|
+
"homeText": ["validateHomeText"]
|
|
132
139
|
}]);
|
|
133
140
|
function defineCustomElement() {
|
|
134
141
|
if (typeof customElements === "undefined") {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
2
|
+
import { b as checkRequiredAndType, d as checkEmptyOrType, c as checkRequiredAndOneOf } from './index2.js';
|
|
4
3
|
import './breakpoints.js';
|
|
5
4
|
import { v as version } from './package.js';
|
|
6
5
|
import { d as defineCustomElement$1 } from './post-icon2.js';
|
|
@@ -12,10 +11,10 @@ let cardControlIds = 0;
|
|
|
12
11
|
const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl extends HTMLElement {
|
|
13
12
|
/**
|
|
14
13
|
* A public method to reset the controls `checked` and `validity` state.
|
|
15
|
-
* The validity state is set to `
|
|
14
|
+
* The validity state is set to `undefined`, so it's neither valid nor invalid.
|
|
16
15
|
*/
|
|
17
16
|
async reset() {
|
|
18
|
-
this.validity =
|
|
17
|
+
this.validity = undefined;
|
|
19
18
|
this.controlSetChecked(this.initialChecked);
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
@@ -27,10 +26,24 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
27
26
|
this.controlSetChecked(false);
|
|
28
27
|
}
|
|
29
28
|
validateControlLabel() {
|
|
30
|
-
|
|
29
|
+
checkRequiredAndType(this, 'label', 'string');
|
|
30
|
+
}
|
|
31
|
+
validateControlDescription() {
|
|
32
|
+
checkEmptyOrType(this, 'description', 'string');
|
|
31
33
|
}
|
|
32
34
|
validateControlType() {
|
|
33
|
-
|
|
35
|
+
checkRequiredAndOneOf(this, 'type', ['checkbox', 'radio']);
|
|
36
|
+
}
|
|
37
|
+
validateControlName() {
|
|
38
|
+
checkEmptyOrType(this, 'name', 'string');
|
|
39
|
+
}
|
|
40
|
+
validateControlValue() {
|
|
41
|
+
if (this.type == 'radio') {
|
|
42
|
+
checkEmptyOrType(this, 'value', 'string');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
validateControlIcon() {
|
|
46
|
+
checkEmptyOrType(this, 'icon', 'string');
|
|
34
47
|
}
|
|
35
48
|
updateControlChecked(checked = this.checked) {
|
|
36
49
|
this.controlSetChecked(checked);
|
|
@@ -67,14 +80,14 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
67
80
|
this.controlId = `PostCardControl_${cardControlIds++}`;
|
|
68
81
|
this.focused = false;
|
|
69
82
|
this.label = undefined;
|
|
70
|
-
this.description =
|
|
83
|
+
this.description = undefined;
|
|
71
84
|
this.type = undefined;
|
|
72
|
-
this.name =
|
|
73
|
-
this.value =
|
|
85
|
+
this.name = undefined;
|
|
86
|
+
this.value = undefined;
|
|
74
87
|
this.checked = false;
|
|
75
88
|
this.disabled = false;
|
|
76
|
-
this.validity =
|
|
77
|
-
this.icon =
|
|
89
|
+
this.validity = undefined;
|
|
90
|
+
this.icon = undefined;
|
|
78
91
|
this.cardClickHandler = this.cardClickHandler.bind(this);
|
|
79
92
|
this.controlClickHandler = this.controlClickHandler.bind(this);
|
|
80
93
|
this.controlChangeHandler = this.controlChangeHandler.bind(this);
|
|
@@ -221,14 +234,14 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
221
234
|
this.hasIcon = Boolean(this.host.querySelector('[slot="icon"]') || this.icon);
|
|
222
235
|
}
|
|
223
236
|
render() {
|
|
224
|
-
return (h(Host, { key: '
|
|
237
|
+
return (h(Host, { key: 'ff23ac518f715fc7c2727dd7c2abccd0fdb486da', "data-version": version, onClick: this.cardClickHandler }, h("div", { key: '3519942dfeb694729e4b6c7c7df4b68854ccde81', class: {
|
|
225
238
|
'card-control': true,
|
|
226
239
|
'is-checked': this.checked,
|
|
227
240
|
'is-disabled': this.disabled,
|
|
228
241
|
'is-focused': this.focused,
|
|
229
|
-
'is-valid': this.validity !==
|
|
230
|
-
'is-invalid': this.validity ===
|
|
231
|
-
} }, h("input", { key: '
|
|
242
|
+
'is-valid': this.validity !== undefined && this.validity !== false,
|
|
243
|
+
'is-invalid': this.validity === false,
|
|
244
|
+
} }, h("input", { key: 'f47a58485c7d507565e29c832ca1c3d6b053bc17', ref: el => (this.control = el), id: this.controlId, class: "card-control--input", type: this.type, name: this.name, value: this.value, checked: this.checked, "aria-describedby": `${this.controlId}_content`, "aria-disabled": this.disabled, "aria-invalid": this.validity === false, onClick: this.controlClickHandler, onInput: this.controlChangeHandler, onChange: this.controlChangeHandler, onFocus: this.controlFocusHandler, onBlur: this.controlFocusHandler, onKeyDown: this.controlKeyDownHandler }), h("label", { key: '65e8247d88c2cc6bb2e0be17e7d6fab3502fb364', id: `${this.controlId}_label`, htmlFor: this.controlId, class: "card-control--label" }, this.label, this.description ? (h("div", { class: "card-control--description" }, this.description)) : null), this.hasIcon ? (h("div", { class: "card-control--icon" }, h("slot", { name: "icon" }, this.icon ? h("post-icon", { name: this.icon }) : null))) : null, h("div", { key: 'df538a1f14b49fa7bd6907ef57d045c7303b6d77', id: `${this.controlId}_content`, class: "card-control--content" }, h("slot", { key: '1a79c6a2da57a5b8aef911dc2acd09e553b79489' })))));
|
|
232
245
|
}
|
|
233
246
|
componentDidRender() {
|
|
234
247
|
this.setHostContext();
|
|
@@ -236,7 +249,11 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
236
249
|
}
|
|
237
250
|
componentDidLoad() {
|
|
238
251
|
this.validateControlLabel();
|
|
252
|
+
this.validateControlName();
|
|
253
|
+
this.validateControlValue();
|
|
254
|
+
this.validateControlDescription();
|
|
239
255
|
this.validateControlType();
|
|
256
|
+
this.validateControlIcon();
|
|
240
257
|
}
|
|
241
258
|
formAssociatedCallback() {
|
|
242
259
|
this.controlSetChecked(this.checked);
|
|
@@ -254,7 +271,11 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
254
271
|
get host() { return this; }
|
|
255
272
|
static get watchers() { return {
|
|
256
273
|
"label": ["validateControlLabel"],
|
|
274
|
+
"description": ["validateControlDescription"],
|
|
257
275
|
"type": ["validateControlType"],
|
|
276
|
+
"name": ["validateControlName"],
|
|
277
|
+
"value": ["validateControlValue"],
|
|
278
|
+
"icon": ["validateControlIcon"],
|
|
258
279
|
"checked": ["updateControlChecked"],
|
|
259
280
|
"disabled": ["updateControlDisabled"]
|
|
260
281
|
}; }
|
|
@@ -267,14 +288,18 @@ const PostCardControl = /*@__PURE__*/ proxyCustomElement(class PostCardControl e
|
|
|
267
288
|
"value": [1],
|
|
268
289
|
"checked": [1028],
|
|
269
290
|
"disabled": [1028],
|
|
270
|
-
"validity": [
|
|
291
|
+
"validity": [1028],
|
|
271
292
|
"icon": [1],
|
|
272
293
|
"focused": [32],
|
|
273
294
|
"reset": [64],
|
|
274
295
|
"groupReset": [64]
|
|
275
296
|
}, undefined, {
|
|
276
297
|
"label": ["validateControlLabel"],
|
|
298
|
+
"description": ["validateControlDescription"],
|
|
277
299
|
"type": ["validateControlType"],
|
|
300
|
+
"name": ["validateControlName"],
|
|
301
|
+
"value": ["validateControlValue"],
|
|
302
|
+
"icon": ["validateControlIcon"],
|
|
278
303
|
"checked": ["updateControlChecked"],
|
|
279
304
|
"disabled": ["updateControlDisabled"]
|
|
280
305
|
}]);
|
|
@@ -12,7 +12,7 @@ const PostClosebutton = /*@__PURE__*/ proxyCustomElement(class PostClosebutton e
|
|
|
12
12
|
this.__attachShadow();
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '7b5e179b42eefd1823b2b2ef7ee17c94bd9f0ddd', "data-version": version }, h("button", { key: '471e68d1ddcfe741f5450d002b2daa86cec0f986', class: "btn btn-icon-close", type: "button" }, h("post-icon", { key: '928fa7460988cffa269a29506e68e056f84bcef8', "aria-hidden": "true", name: "closex" }), h("span", { key: 'c1501f4a8b7d8d95be7d02576b10143b9e6b0654', class: "visually-hidden" }, h("slot", { key: 'a9f1ab8db57486d420db0981090ad2ba5183c289' })))));
|
|
16
16
|
}
|
|
17
17
|
get host() { return this; }
|
|
18
18
|
static get style() { return PostClosebuttonStyle0; }
|