@swisspost/design-system-components 9.0.0-next.9 → 10.0.0-next.37
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/.config/bindings.angular.js +4 -0
- package/dist/cjs/breakpoints-cdf1b747.js +59 -0
- package/dist/cjs/check-non-empty-bd99d236.js +15 -0
- package/dist/cjs/check-one-of-75d270b5.js +13 -0
- package/dist/cjs/check-type-cdbf6d29.js +21 -0
- package/dist/cjs/check-url-220a286c.js +19 -0
- package/dist/cjs/event-guard-efabc84f.js +47 -0
- package/dist/cjs/fade-72d5ef55.js +14 -0
- package/dist/cjs/get-root-8102fecd.js +17 -0
- package/dist/cjs/index-23e36ff7.js +37 -0
- package/dist/cjs/{index-010dc207.js → index-b60129c4.js} +17 -10
- package/dist/cjs/index.browser-4af21c17.js +16 -0
- package/dist/cjs/index.cjs.js +36 -31
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/long-press-event-6e62d113.js +266 -0
- package/dist/cjs/{package-8e810a59.js → package-8121f093.js} +1 -1
- package/dist/cjs/{post-accordion-b9df8522.js → post-accordion-beac7c9f.js} +11 -12
- package/dist/cjs/post-accordion-item-4846fbee.js +64 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +10 -7
- package/dist/cjs/post-accordion.cjs.entry.js +6 -4
- package/dist/cjs/{post-avatar-f7236084.js → post-avatar-a36991fb.js} +10 -13
- package/dist/cjs/post-avatar.cjs.entry.js +5 -4
- package/dist/cjs/post-back-to-top-32aa9017.js +96 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +7 -6
- package/dist/cjs/post-banner-be0e8909.js +92 -0
- package/dist/cjs/post-banner.cjs.entry.js +11 -9
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +8 -7
- package/dist/cjs/post-breadcrumbs-6ef82a41.js +120 -0
- package/dist/cjs/post-breadcrumbs.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-fe919333.js +269 -0
- package/dist/cjs/post-card-control.cjs.entry.js +6 -5
- package/dist/cjs/post-closebutton_15.cjs.entry.js +13 -10
- package/dist/cjs/{post-collapsible-trigger-143cf84a.js → post-collapsible-trigger-f42be607.js} +59 -60
- package/dist/cjs/post-collapsible_2.cjs.entry.js +11 -10
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/{post-footer-5f7fdf96.js → post-footer-5179aa17.js} +11 -57
- package/dist/cjs/post-footer.cjs.entry.js +4 -3
- package/dist/cjs/post-linkarea-27125078.js +30 -0
- package/dist/cjs/post-linkarea.cjs.entry.js +11 -0
- package/dist/cjs/{post-menu-item-bb0b0b9e.js → post-menu-item-d78a9121.js} +11 -17
- package/dist/cjs/post-popover-feb1e773.js +135 -0
- package/dist/cjs/post-popover.cjs.entry.js +4 -4
- package/dist/cjs/{post-rating-1082197c.js → post-rating-6d153a2c.js} +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-e4532918.js +34 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +6 -4
- package/dist/cjs/{post-tab-panel-60f211a5.js → post-tab-panel-40df21ad.js} +5 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-1f797ce4.js → post-tabs-45db2696.js} +13 -15
- package/dist/cjs/post-tabs.cjs.entry.js +5 -4
- package/dist/cjs/post-tag-0967bb1e.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/post-togglebutton-42b7d166.js +4494 -0
- package/dist/cjs/post-tooltip-f833d51d.js +73 -0
- package/dist/cjs/{post-tooltip-38c839a4.js → post-tooltip-trigger-3ceac010.js} +143 -456
- package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -0
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -9
- package/dist/cjs/{slide-5d51abe8.js → slide-cd1f09b3.js} +8 -8
- package/dist/collection/animations/collapse.js +8 -6
- package/dist/collection/animations/fade.js +6 -2
- package/dist/collection/animations/slide.js +8 -8
- package/dist/collection/collection-manifest.json +5 -3
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +6 -8
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +12 -12
- package/dist/collection/components/post-avatar/post-avatar.css +1 -3
- package/dist/collection/components/post-avatar/post-avatar.js +7 -11
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +38 -18
- package/dist/collection/components/post-banner/post-banner.css +1 -3
- package/dist/collection/components/post-banner/post-banner.js +13 -12
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +11 -8
- package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -0
- package/dist/collection/components/{post-breadcrumb/post-breadcrumb.js → post-breadcrumbs/post-breadcrumbs.js} +20 -21
- package/dist/collection/components/post-card-control/post-card-control.css +1 -3
- package/dist/collection/components/post-card-control/post-card-control.js +15 -19
- package/dist/collection/components/post-closebutton/post-closebutton.css +1 -0
- package/dist/collection/components/post-closebutton/post-closebutton.js +12 -1
- package/dist/collection/components/post-collapsible/post-collapsible.css +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +3 -2
- package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +43 -45
- package/dist/collection/components/post-footer/post-footer.js +8 -8
- package/dist/collection/components/post-header/post-header.css +1 -1
- package/dist/collection/components/post-header/post-header.js +212 -52
- package/dist/collection/components/post-icon/post-icon.css +1 -1
- package/dist/collection/components/post-icon/post-icon.js +71 -29
- package/dist/collection/components/post-language-option/post-language-option.css +1 -3
- package/dist/collection/components/post-language-option/post-language-option.js +34 -12
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -1
- package/dist/collection/components/post-language-switch/post-language-switch.js +56 -33
- package/dist/collection/components/post-language-switch/switch-variants.js +1 -1
- package/dist/collection/components/post-linkarea/post-linkarea.css +1 -0
- package/dist/collection/components/post-linkarea/post-linkarea.js +30 -0
- package/dist/collection/components/post-list/post-list.css +1 -3
- package/dist/collection/components/post-list/post-list.js +4 -3
- package/dist/collection/components/post-list-item/post-list-item.js +2 -1
- package/dist/collection/components/post-logo/post-logo.css +1 -1
- 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-mainnavigation/post-mainnavigation.js +157 -25
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +179 -55
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +41 -12
- package/dist/collection/components/post-menu/post-menu.css +1 -3
- package/dist/collection/components/post-menu/post-menu.js +44 -30
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -13
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +16 -10
- package/dist/collection/components/post-popover/post-popover.css +1 -3
- package/dist/collection/components/post-popover/post-popover.js +23 -16
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +217 -56
- package/dist/collection/components/post-rating/post-rating.css +1 -3
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -3
- package/dist/collection/components/post-tab-header/post-tab-header.js +6 -5
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +4 -3
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -14
- package/dist/collection/components/post-tag/post-tag.css +1 -3
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +3 -3
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +62 -212
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.css +1 -0
- package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +230 -0
- package/dist/collection/index.js +3 -1
- package/dist/collection/utils/attribute-observer.js +6 -5
- package/dist/collection/utils/breakpoints.js +21 -15
- package/dist/collection/utils/component-on-ready.js +4 -4
- package/dist/collection/utils/debounce.js +2 -1
- package/dist/collection/utils/environment.js +2 -0
- package/dist/collection/utils/event-guard.js +43 -0
- package/dist/collection/utils/{is-focusable.js → get-focusable-children.js} +10 -3
- package/dist/collection/utils/get-root.js +6 -1
- package/dist/collection/utils/index.js +5 -0
- package/dist/collection/utils/is-motion-reduced.js +2 -1
- package/dist/collection/utils/property-checkers/check-non-empty.js +6 -2
- package/dist/collection/utils/property-checkers/check-one-of.js +8 -3
- package/dist/collection/utils/property-checkers/check-pattern.js +8 -3
- package/dist/collection/utils/property-checkers/check-type.js +11 -6
- package/dist/collection/utils/property-checkers/check-url.js +11 -6
- package/dist/collection/utils/property-checkers/empty-or.js +5 -2
- package/dist/collection/utils/sass-export.js +8 -5
- package/dist/components/breakpoints.js +56 -0
- package/dist/components/check-non-empty.js +6 -2
- package/dist/components/check-one-of.js +8 -3
- package/dist/components/check-type.js +11 -6
- package/dist/components/event-guard.js +45 -0
- package/dist/components/fade.js +6 -2
- package/dist/components/get-focusable-children.js +35 -0
- package/dist/components/get-root.js +7 -1
- package/dist/components/index.browser.js +14 -0
- package/dist/components/index.js +3 -1
- package/dist/components/index2.js +24 -11
- package/dist/components/long-press-event.js +264 -0
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +14 -13
- package/dist/components/post-accordion2.js +8 -9
- package/dist/components/post-avatar2.js +8 -11
- package/dist/components/post-back-to-top2.js +41 -20
- package/dist/components/post-banner2.js +15 -13
- package/dist/components/post-breadcrumb-item2.js +9 -9
- package/dist/components/post-breadcrumbs.d.ts +11 -0
- package/dist/components/post-breadcrumbs.js +6 -0
- package/dist/components/post-breadcrumbs2.js +177 -0
- package/dist/components/post-card-control2.js +16 -19
- package/dist/components/post-closebutton2.js +7 -2
- package/dist/components/post-collapsible-trigger2.js +46 -48
- package/dist/components/post-collapsible2.js +13 -10
- package/dist/components/post-footer2.js +8 -54
- package/dist/components/post-header2.js +174 -51
- package/dist/components/post-icon2.js +72 -29
- package/dist/components/post-language-option2.js +21 -12
- package/dist/components/post-language-switch2.js +44 -45
- package/dist/components/{post-breadcrumb.d.ts → post-linkarea.d.ts} +4 -4
- package/dist/components/post-linkarea.js +6 -0
- package/dist/components/post-linkarea2.js +43 -0
- package/dist/components/post-list-item2.js +2 -1
- package/dist/components/post-list2.js +5 -4
- package/dist/components/post-logo2.js +4 -3
- package/dist/components/post-mainnavigation2.js +150 -15
- package/dist/components/post-megadropdown-trigger2.js +43 -13
- package/dist/components/post-megadropdown2.js +136 -39
- package/dist/components/post-menu-item2.js +2 -8
- package/dist/components/post-menu-trigger2.js +17 -10
- package/dist/components/post-menu2.js +43 -54
- package/dist/components/post-popover2.js +46 -15
- package/dist/components/post-popovercontainer2.js +921 -111
- package/dist/components/post-rating2.js +2 -2
- package/dist/components/post-tab-header2.js +8 -6
- package/dist/components/post-tab-panel2.js +4 -3
- package/dist/components/post-tabs2.js +10 -12
- package/dist/components/post-tag2.js +2 -2
- package/dist/components/post-togglebutton2.js +4 -3
- package/dist/components/post-tooltip-trigger.d.ts +11 -0
- package/dist/components/post-tooltip-trigger.js +6 -0
- package/dist/components/post-tooltip-trigger2.js +4705 -0
- package/dist/components/post-tooltip2.js +34 -4960
- package/dist/components/slide.js +9 -9
- package/dist/docs.json +567 -252
- package/dist/esm/breakpoints-7812702e.js +56 -0
- package/dist/esm/check-non-empty-258a56b3.js +13 -0
- package/dist/esm/check-one-of-0bee20f5.js +11 -0
- package/dist/esm/check-type-37d5d307.js +19 -0
- package/dist/esm/check-url-17962bc8.js +17 -0
- package/dist/esm/event-guard-538ee077.js +45 -0
- package/dist/esm/fade-1f3cacf4.js +11 -0
- package/dist/esm/get-root-1b1af46f.js +15 -0
- package/dist/esm/index-8f8fe5b0.js +32 -0
- package/dist/esm/{index-fb8d6be7.js → index-f4d19816.js} +17 -10
- package/dist/esm/index.browser-ff103197.js +14 -0
- package/dist/esm/index.js +33 -30
- package/dist/esm/loader.js +3 -3
- package/dist/esm/long-press-event-04d24397.js +264 -0
- package/dist/esm/package-d9237b44.js +3 -0
- package/dist/esm/{post-accordion-ee54a3ef.js → post-accordion-fdcf7205.js} +11 -12
- package/dist/esm/post-accordion-item-e11e3804.js +62 -0
- package/dist/esm/post-accordion-item.entry.js +10 -7
- package/dist/esm/post-accordion.entry.js +6 -4
- package/dist/esm/{post-avatar-5572fa73.js → post-avatar-d360c6d2.js} +10 -13
- package/dist/esm/post-avatar.entry.js +5 -4
- package/dist/esm/post-back-to-top-85796c8b.js +94 -0
- package/dist/esm/post-back-to-top.entry.js +7 -6
- package/dist/esm/post-banner-a3090f67.js +90 -0
- package/dist/esm/post-banner.entry.js +11 -9
- package/dist/esm/post-breadcrumb-item_2.entry.js +8 -7
- package/dist/esm/post-breadcrumbs-15ec5a26.js +118 -0
- package/dist/esm/post-breadcrumbs.entry.js +5 -0
- package/dist/esm/post-card-control-6142534e.js +267 -0
- package/dist/esm/post-card-control.entry.js +6 -5
- package/dist/esm/post-closebutton_15.entry.js +13 -10
- package/dist/esm/{post-collapsible-trigger-1c7833f8.js → post-collapsible-trigger-68306358.js} +59 -60
- package/dist/esm/post-collapsible_2.entry.js +11 -10
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/{post-footer-b18875e7.js → post-footer-d2a3270e.js} +10 -56
- package/dist/esm/post-footer.entry.js +4 -3
- package/dist/esm/post-linkarea-64998c67.js +28 -0
- package/dist/esm/post-linkarea.entry.js +3 -0
- package/dist/esm/{post-menu-item-2906384b.js → post-menu-item-95a0a647.js} +11 -17
- package/dist/esm/post-popover-c5f81087.js +133 -0
- package/dist/esm/post-popover.entry.js +4 -4
- package/dist/esm/{post-rating-95cbdbb8.js → post-rating-7bfedafb.js} +4 -4
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-08033da4.js +32 -0
- package/dist/esm/post-tab-header.entry.js +6 -4
- package/dist/esm/{post-tab-panel-cafd9e04.js → post-tab-panel-be701793.js} +5 -4
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-beef8eae.js → post-tabs-c69e2842.js} +13 -15
- package/dist/esm/post-tabs.entry.js +5 -4
- package/dist/esm/post-tag-ebac7f3e.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/post-togglebutton-706e3af0.js +4478 -0
- package/dist/esm/post-tooltip-9a195d47.js +71 -0
- package/dist/esm/{post-tooltip-b298039a.js → post-tooltip-trigger-7d6f234b.js} +143 -456
- package/dist/esm/post-tooltip-trigger.entry.js +5 -0
- package/dist/esm/post-tooltip.entry.js +5 -9
- package/dist/esm/{slide-3422b8a3.js → slide-cd2850ee.js} +9 -9
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-034715ec.js +1 -0
- package/dist/post-components/p-0717fe4c.js +1 -0
- package/dist/post-components/p-0889c759.js +1 -0
- package/dist/post-components/p-0c03547b.js +1 -0
- package/dist/post-components/p-0de8d05f.js +1 -0
- package/dist/post-components/p-1373a79b.entry.js +1 -0
- package/dist/post-components/{p-4f9746f6.js → p-17dc4170.js} +2 -9
- package/dist/post-components/p-181c73d5.js +1 -0
- package/dist/post-components/p-1a21fd8d.js +1 -0
- package/dist/post-components/p-1ab3eba4.entry.js +1 -0
- package/dist/post-components/p-2d6c0670.js +1 -0
- package/dist/post-components/p-2dc0a2d0.js +1 -0
- package/dist/post-components/p-35ad2e11.entry.js +1 -0
- package/dist/post-components/p-368c473a.js +1 -0
- package/dist/post-components/p-38f778a7.entry.js +1 -0
- package/dist/post-components/p-39a8df3c.entry.js +1 -0
- package/dist/post-components/p-3c7f6003.js +1 -0
- package/dist/post-components/p-474a41bc.entry.js +1 -0
- package/dist/post-components/p-64e3de38.js +1 -0
- package/dist/post-components/p-69bc8eaf.entry.js +1 -0
- package/dist/post-components/p-6b31a76a.js +1 -0
- package/dist/post-components/p-722ffaae.js +1 -0
- package/dist/post-components/p-72310bf0.entry.js +1 -0
- package/dist/post-components/p-7709c14a.js +1 -0
- package/dist/post-components/p-804b61b7.entry.js +1 -0
- package/dist/post-components/p-85fdc2d3.js +1 -0
- package/dist/post-components/p-89247caa.js +1 -0
- package/dist/post-components/p-89dc67c7.entry.js +1 -0
- package/dist/post-components/p-8db32dab.js +8 -0
- package/dist/post-components/p-8f7f5200.entry.js +1 -0
- package/dist/post-components/p-964f9581.js +1 -0
- package/dist/post-components/p-9b052461.js +1 -0
- package/dist/post-components/{p-c0ae9886.js → p-9e461613.js} +2 -2
- package/dist/post-components/p-a52b2d34.js +1 -0
- package/dist/post-components/p-ab566526.js +1 -0
- package/dist/post-components/p-b648e537.entry.js +1 -0
- package/dist/post-components/p-bc33a6d9.js +1 -0
- package/dist/post-components/p-bcfdbd0b.entry.js +1 -0
- package/dist/post-components/p-beb67979.js +1 -0
- package/dist/post-components/p-c41868b1.js +1 -0
- package/dist/post-components/p-c65f32b0.js +1 -0
- package/dist/post-components/p-c71700a7.js +1 -0
- package/dist/post-components/p-cb027003.js +1 -0
- package/dist/post-components/p-cc5b1437.js +1 -0
- package/dist/post-components/p-ceda889e.entry.js +1 -0
- package/dist/post-components/p-d45df336.js +1 -0
- package/dist/post-components/p-de4d4274.js +1 -0
- package/dist/post-components/p-deb9efcf.entry.js +1 -0
- package/dist/post-components/p-e585c6fe.js +1 -0
- package/dist/post-components/p-e9f1cc46.entry.js +1 -0
- package/dist/post-components/p-ee4e776d.entry.js +1 -0
- package/dist/post-components/p-ee7c3bcc.entry.js +1 -0
- package/dist/post-components/p-f56482fa.entry.js +1 -0
- package/dist/post-components/p-f8c652ce.entry.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/collapse.d.ts +2 -2
- package/dist/types/animations/fade.d.ts +2 -2
- package/dist/types/animations/slide.d.ts +2 -2
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +1 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +1 -1
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +4 -2
- package/dist/types/components/post-banner/post-banner.d.ts +5 -5
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +4 -0
- package/dist/types/components/{post-breadcrumb/post-breadcrumb.d.ts → post-breadcrumbs/post-breadcrumbs.d.ts} +4 -4
- package/dist/types/components/post-card-control/post-card-control.d.ts +3 -3
- package/dist/types/components/post-collapsible-trigger/post-collapsible-trigger.d.ts +9 -14
- package/dist/types/components/post-footer/post-footer.d.ts +2 -2
- package/dist/types/components/post-header/post-header.d.ts +38 -10
- package/dist/types/components/post-icon/post-icon.d.ts +11 -7
- package/dist/types/components/post-language-option/post-language-option.d.ts +9 -5
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +16 -8
- package/dist/types/components/post-language-switch/switch-variants.d.ts +1 -1
- package/dist/types/components/post-linkarea/post-linkarea.d.ts +5 -0
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +36 -9
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +37 -13
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +9 -1
- package/dist/types/components/post-menu/post-menu.d.ts +4 -3
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +0 -1
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +4 -3
- package/dist/types/components/post-popover/post-popover.d.ts +6 -4
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +40 -14
- package/dist/types/components/post-tab-header/post-tab-header.d.ts +1 -1
- package/dist/types/components/post-tabs/post-tabs.d.ts +1 -1
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +1 -1
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +21 -34
- package/dist/types/components/post-tooltip-trigger/post-tooltip-trigger.d.ts +46 -0
- package/dist/types/components.d.ts +181 -94
- package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/.config/bindings.angular.d.ts +2 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/popover-fn.d.ts +11 -0
- package/dist/types/utils/attribute-observer.d.ts +1 -1
- package/dist/types/utils/breakpoints.d.ts +1 -0
- package/dist/types/utils/component-on-ready.d.ts +1 -1
- package/dist/types/utils/environment.d.ts +2 -0
- package/dist/types/utils/event-guard.d.ts +4 -0
- package/dist/types/utils/get-focusable-children.d.ts +1 -0
- package/dist/types/utils/get-root.d.ts +5 -1
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/property-checkers/check-non-empty.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-one-of.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-pattern.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-type.d.ts +3 -1
- package/dist/types/utils/property-checkers/check-url.d.ts +3 -1
- package/dist/types/utils/property-checkers/index.d.ts +12 -4
- package/dist/types/utils/sass-export.d.ts +5 -1
- package/loaders/breakpoints.js +56 -0
- package/loaders/check-non-empty.js +6 -2
- package/loaders/check-one-of.js +8 -3
- package/loaders/check-type.js +11 -6
- package/loaders/event-guard.js +45 -0
- package/loaders/fade.js +6 -2
- package/loaders/get-focusable-children.js +35 -0
- package/loaders/get-root.js +7 -1
- package/loaders/index.browser.js +14 -0
- package/loaders/index.d.ts +6 -2
- package/loaders/index.js +8 -5
- package/loaders/index2.js +25 -12
- package/loaders/long-press-event.js +264 -0
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item2.js +15 -14
- package/loaders/post-accordion.js +8 -9
- package/loaders/post-avatar.js +8 -11
- package/loaders/post-back-to-top.js +41 -20
- package/loaders/post-banner.js +16 -14
- package/loaders/post-breadcrumb-item2.js +9 -9
- package/loaders/post-breadcrumbs.d.ts +11 -0
- package/loaders/post-breadcrumbs.js +180 -0
- package/loaders/post-card-control.js +16 -19
- package/loaders/post-closebutton.js +7 -2
- package/loaders/post-collapsible-trigger2.js +46 -48
- package/loaders/post-collapsible2.js +14 -11
- package/loaders/post-footer.js +8 -54
- package/loaders/post-header.js +174 -51
- package/loaders/post-icon2.js +73 -30
- package/loaders/post-language-option.js +22 -13
- package/loaders/post-language-switch.js +45 -46
- package/loaders/{post-breadcrumb.d.ts → post-linkarea.d.ts} +4 -4
- package/loaders/post-linkarea.js +46 -0
- package/loaders/post-list-item.js +2 -1
- package/loaders/post-list.js +5 -4
- package/loaders/post-logo.js +4 -3
- package/loaders/post-mainnavigation.js +150 -15
- package/loaders/post-megadropdown-trigger.js +43 -13
- package/loaders/post-megadropdown.js +136 -39
- package/loaders/post-menu-item2.js +2 -8
- package/loaders/post-menu-trigger2.js +17 -10
- package/loaders/post-menu2.js +43 -54
- package/loaders/post-popover.js +46 -15
- package/loaders/post-popovercontainer2.js +921 -111
- package/loaders/post-rating.js +2 -2
- package/loaders/post-tab-header.js +8 -6
- package/loaders/post-tab-panel.js +4 -3
- package/loaders/post-tabs.js +10 -12
- package/loaders/post-tag.js +2 -2
- package/loaders/post-togglebutton.js +4 -3
- package/loaders/post-tooltip-trigger.d.ts +11 -0
- package/loaders/post-tooltip-trigger.js +4708 -0
- package/loaders/post-tooltip.js +34 -4960
- package/loaders/slide.js +9 -9
- package/package.json +41 -32
- package/dist/cjs/attribute-observer-10f08c04.js +0 -27
- package/dist/cjs/check-non-empty-eeaa8f77.js +0 -11
- package/dist/cjs/check-one-of-f4f5d0c0.js +0 -8
- package/dist/cjs/check-type-64af82a9.js +0 -16
- package/dist/cjs/check-url-3ffdd2fb.js +0 -14
- package/dist/cjs/debounce-1151afe3.js +0 -12
- package/dist/cjs/fade-35a3633a.js +0 -10
- package/dist/cjs/get-root-7a3498ef.js +0 -11
- package/dist/cjs/index-5d4e0aed.js +0 -29
- package/dist/cjs/post-accordion-item-ecc6749f.js +0 -63
- package/dist/cjs/post-back-to-top-60762f8e.js +0 -75
- package/dist/cjs/post-banner-9662f22c.js +0 -90
- package/dist/cjs/post-breadcrumb-b40732fc.js +0 -111
- package/dist/cjs/post-breadcrumb.cjs.entry.js +0 -13
- package/dist/cjs/post-card-control-039c9a4b.js +0 -272
- package/dist/cjs/post-popover-d0ce9dc6.js +0 -104
- package/dist/cjs/post-tab-header-4b6d8d54.js +0 -32
- package/dist/cjs/post-tag-ddaaaedc.js +0 -47
- package/dist/cjs/post-togglebutton-0984a694.js +0 -3239
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +0 -3
- package/dist/collection/components/post-menu-item/post-menu-item.css +0 -1
- package/dist/components/attribute-observer.js +0 -25
- package/dist/components/debounce.js +0 -10
- package/dist/components/post-breadcrumb.js +0 -6
- package/dist/components/post-breadcrumb2.js +0 -168
- package/dist/esm/attribute-observer-37fa950a.js +0 -25
- package/dist/esm/check-non-empty-58bd6b17.js +0 -9
- package/dist/esm/check-one-of-6b3ef8eb.js +0 -6
- package/dist/esm/check-type-8828dbe4.js +0 -14
- package/dist/esm/check-url-a974431e.js +0 -12
- package/dist/esm/debounce-abe98cc2.js +0 -10
- package/dist/esm/fade-7fd71785.js +0 -7
- package/dist/esm/get-root-7af2e0d1.js +0 -9
- package/dist/esm/index-b49c9904.js +0 -24
- package/dist/esm/package-4d81f3c2.js +0 -3
- package/dist/esm/post-accordion-item-e10452dc.js +0 -61
- package/dist/esm/post-back-to-top-1d823c43.js +0 -73
- package/dist/esm/post-banner-78480475.js +0 -88
- package/dist/esm/post-breadcrumb-aaa77f74.js +0 -109
- package/dist/esm/post-breadcrumb.entry.js +0 -5
- package/dist/esm/post-card-control-862aa961.js +0 -270
- package/dist/esm/post-popover-2432bb3f.js +0 -102
- package/dist/esm/post-tab-header-dfea00ea.js +0 -30
- package/dist/esm/post-tag-a77e7af6.js +0 -45
- package/dist/esm/post-togglebutton-395bf3f0.js +0 -3223
- package/dist/post-components/p-0711f76d.entry.js +0 -1
- package/dist/post-components/p-095a06f6.entry.js +0 -1
- package/dist/post-components/p-0b5a5f32.js +0 -1
- package/dist/post-components/p-135fa60f.js +0 -1
- package/dist/post-components/p-18e38d8a.js +0 -1
- package/dist/post-components/p-2737eaf5.js +0 -1
- package/dist/post-components/p-2e1ec074.entry.js +0 -1
- package/dist/post-components/p-4202b433.entry.js +0 -1
- package/dist/post-components/p-45773f59.js +0 -1
- package/dist/post-components/p-4953de7e.js +0 -1
- package/dist/post-components/p-4a3f67ab.js +0 -1
- package/dist/post-components/p-4f67c5f5.entry.js +0 -1
- package/dist/post-components/p-5075c672.entry.js +0 -1
- package/dist/post-components/p-515e0f96.js +0 -1
- package/dist/post-components/p-5467b223.js +0 -1
- package/dist/post-components/p-611b3c41.js +0 -1
- package/dist/post-components/p-67036798.entry.js +0 -1
- package/dist/post-components/p-6adeaa6c.js +0 -1
- package/dist/post-components/p-6d953fb2.js +0 -1
- package/dist/post-components/p-6edb0ac5.js +0 -1
- package/dist/post-components/p-6f8f39ca.js +0 -1
- package/dist/post-components/p-7503a623.js +0 -1
- package/dist/post-components/p-761b24c7.entry.js +0 -1
- package/dist/post-components/p-77c4c1d2.js +0 -1
- package/dist/post-components/p-7cf0c2ad.js +0 -1
- package/dist/post-components/p-856c14d6.entry.js +0 -1
- package/dist/post-components/p-866bf50a.entry.js +0 -1
- package/dist/post-components/p-8d621781.js +0 -1
- package/dist/post-components/p-8fe2d72c.entry.js +0 -1
- package/dist/post-components/p-9ad5088f.entry.js +0 -1
- package/dist/post-components/p-a1d2b90e.js +0 -1
- package/dist/post-components/p-a521419d.entry.js +0 -1
- package/dist/post-components/p-aa538648.js +0 -1
- package/dist/post-components/p-afdbee2f.js +0 -1
- package/dist/post-components/p-b02817f2.entry.js +0 -1
- package/dist/post-components/p-b095519d.js +0 -1
- package/dist/post-components/p-b157dcba.entry.js +0 -1
- package/dist/post-components/p-b22656b1.js +0 -1
- package/dist/post-components/p-bdbd11cb.js +0 -1
- package/dist/post-components/p-c537e196.entry.js +0 -1
- package/dist/post-components/p-d4f93f2b.js +0 -1
- package/dist/post-components/p-dca4246a.entry.js +0 -1
- package/dist/post-components/p-f319b026.js +0 -1
- package/dist/post-components/p-f4b7b379.js +0 -1
- package/dist/post-components/p-fac66087.entry.js +0 -1
- package/dist/post-components/p-fc91cbc2.js +0 -1
- package/dist/types/utils/is-focusable.d.ts +0 -1
- package/loaders/attribute-observer.js +0 -25
- package/loaders/debounce.js +0 -10
- package/loaders/post-breadcrumb.js +0 -171
package/loaders/slide.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
const easing = 'ease';
|
|
2
2
|
const duration = 500;
|
|
3
3
|
const fill = 'forwards';
|
|
4
|
-
|
|
4
|
+
function slideUp(el, translateSize = '-100%') {
|
|
5
5
|
return el.animate([
|
|
6
|
-
{ transform:
|
|
7
|
-
{ transform:
|
|
6
|
+
{ transform: 'translateY(0)' }, // Starting position (no translation)
|
|
7
|
+
{ transform: `translateY(${translateSize})` }, // End position
|
|
8
8
|
], {
|
|
9
9
|
duration: duration,
|
|
10
10
|
easing,
|
|
11
11
|
fill,
|
|
12
12
|
});
|
|
13
|
-
}
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
function slideDown(el, translateSize = '-100%') {
|
|
15
15
|
return el.animate([
|
|
16
|
-
{ transform:
|
|
17
|
-
{ transform:
|
|
16
|
+
{ transform: `translateY(${translateSize})` }, // Starting position (no translation)
|
|
17
|
+
{ transform: 'translateY(0)' }, // End position
|
|
18
18
|
], {
|
|
19
19
|
duration: duration,
|
|
20
20
|
easing,
|
|
21
21
|
fill,
|
|
22
22
|
});
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { slideUp as a, slideDown as s };
|
package/package.json
CHANGED
|
@@ -1,61 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisspost/design-system-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-next.37",
|
|
4
4
|
"description": "A collection of web components built with Stencil JS for the Swiss Post Design System.",
|
|
5
|
+
"author": "Swiss Post <design-system@post.ch>",
|
|
5
6
|
"license": "Apache-2.0",
|
|
6
|
-
"main": "dist/index.cjs.js",
|
|
7
|
-
"module": "dist/index.js",
|
|
8
|
-
"types": "dist/types/index.d.ts",
|
|
9
|
-
"collection": "dist/collection/collection-manifest.json",
|
|
10
|
-
"collection:main": "dist/collection/index.js",
|
|
11
|
-
"unpkg": "dist/post-components/post-components.esm.js",
|
|
12
7
|
"private": false,
|
|
13
8
|
"repository": {
|
|
14
9
|
"type": "git",
|
|
15
10
|
"url": "https://github.com/swisspost/design-system"
|
|
16
11
|
},
|
|
12
|
+
"homepage": "https://design-system.post.ch",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/swisspost/design-system/issues"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"linkDirectory": true
|
|
19
|
+
},
|
|
17
20
|
"files": [
|
|
18
21
|
"dist/",
|
|
19
22
|
"loader/",
|
|
20
23
|
"loaders/"
|
|
21
24
|
],
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
"main": "dist/index.cjs.js",
|
|
26
|
+
"module": "dist/index.js",
|
|
27
|
+
"types": "dist/types/index.d.ts",
|
|
28
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
29
|
+
"collection:main": "dist/collection/index.js",
|
|
30
|
+
"unpkg": "dist/post-components/post-components.esm.js",
|
|
26
31
|
"dependencies": {
|
|
27
|
-
"@floating-ui/dom": "1.
|
|
28
|
-
"@oddbird/popover-polyfill": "0.
|
|
29
|
-
"@swisspost/design-system-icons": "
|
|
30
|
-
"@swisspost/design-system-styles": "
|
|
32
|
+
"@floating-ui/dom": "1.7.0",
|
|
33
|
+
"@oddbird/popover-polyfill": "0.5.2",
|
|
34
|
+
"@swisspost/design-system-icons": "10.0.0-next.37",
|
|
35
|
+
"@swisspost/design-system-styles": "10.0.0-next.37",
|
|
31
36
|
"ally.js": "1.4.1",
|
|
32
37
|
"long-press-event": "2.5.0",
|
|
33
|
-
"nanoid": "5.
|
|
38
|
+
"nanoid": "5.1.5"
|
|
34
39
|
},
|
|
35
40
|
"devDependencies": {
|
|
36
|
-
"@
|
|
41
|
+
"@eslint/compat": "1.2.5",
|
|
42
|
+
"@eslint/js": "9.18.0",
|
|
43
|
+
"@percy/cli": "1.30.6",
|
|
37
44
|
"@percy/cypress": "3.1.2",
|
|
38
|
-
"@stencil-community/eslint-plugin": "0.
|
|
45
|
+
"@stencil-community/eslint-plugin": "0.9.0",
|
|
39
46
|
"@stencil/angular-output-target": "0.8.4",
|
|
40
47
|
"@stencil/core": "4.19.2",
|
|
41
48
|
"@stencil/react-output-target": "0.5.3",
|
|
42
49
|
"@stencil/sass": "3.0.12",
|
|
43
|
-
"@types/jest": "29.5.
|
|
44
|
-
"@types/node": "
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
50
|
+
"@types/jest": "29.5.14",
|
|
51
|
+
"@types/node": "22.10.5",
|
|
46
52
|
"@typescript-eslint/parser": "7.18.0",
|
|
47
53
|
"bootstrap": "5.3.3",
|
|
48
|
-
"cypress": "
|
|
54
|
+
"cypress": "14.3.2",
|
|
49
55
|
"cypress-axe": "1.5.0",
|
|
50
56
|
"cypress-storybook": "1.0.0",
|
|
51
|
-
"eslint": "
|
|
52
|
-
"eslint-plugin-react": "7.
|
|
57
|
+
"eslint": "9.18.0",
|
|
58
|
+
"eslint-plugin-react": "7.37.4",
|
|
59
|
+
"globals": "16.0.0",
|
|
53
60
|
"rimraf": "6.0.1",
|
|
54
61
|
"rollup-plugin-postcss": "4.0.2",
|
|
55
62
|
"sass": "1.78.0",
|
|
56
63
|
"throttle-debounce": "5.0.2",
|
|
57
|
-
"ts-jest": "29.2.
|
|
58
|
-
"typescript": "5.
|
|
64
|
+
"ts-jest": "29.2.5",
|
|
65
|
+
"typescript": "5.8.3",
|
|
66
|
+
"typescript-eslint": "8.20.0",
|
|
67
|
+
"eslint-plugin-cypress": "4.2.0"
|
|
59
68
|
},
|
|
60
69
|
"keywords": [
|
|
61
70
|
"components",
|
|
@@ -66,17 +75,17 @@
|
|
|
66
75
|
"frontend"
|
|
67
76
|
],
|
|
68
77
|
"scripts": {
|
|
69
|
-
"
|
|
78
|
+
"play": "stencil build --dev --port 9200 --serve --watch --docs --docs-readme",
|
|
70
79
|
"start": "stencil build --dev --watch --docs --docs-readme",
|
|
71
80
|
"build": "pnpm clean && stencil build --docs-readme",
|
|
72
|
-
"clean": "rimraf
|
|
73
|
-
"test": "pnpm run unit",
|
|
81
|
+
"clean": "rimraf dist hydrate loader loaders www ../components-react/src/components/stencil-generated/ ../components-angular/projects/components/src/lib/stencil-generated/",
|
|
74
82
|
"unit": "stencil test --spec",
|
|
75
83
|
"unit:watch": "stencil test --spec --watchAll --silent",
|
|
76
84
|
"e2e": "cypress run --browser chrome",
|
|
77
|
-
"e2e:ci": "xvfb-run -a cypress run --browser chrome",
|
|
78
85
|
"e2e:watch": "cypress open",
|
|
79
|
-
"
|
|
80
|
-
"lint": "eslint
|
|
86
|
+
"e2e:ci": "xvfb-run -a cypress run --browser chrome",
|
|
87
|
+
"lint": "eslint",
|
|
88
|
+
"lint:fix": "eslint --fix",
|
|
89
|
+
"generate": "stencil generate"
|
|
81
90
|
}
|
|
82
91
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const getAttributeObserver = (attribute, handler) => {
|
|
4
|
-
/**
|
|
5
|
-
* Handle attribute changes and childList changes from the observer
|
|
6
|
-
* @param {MutationRecord[]} mutationList
|
|
7
|
-
*/
|
|
8
|
-
const observerHandler = (mutationList) => {
|
|
9
|
-
mutationList.forEach(mutation => {
|
|
10
|
-
if (mutation.type === 'attributes' && mutation.attributeName === attribute) {
|
|
11
|
-
handler(mutation.target);
|
|
12
|
-
}
|
|
13
|
-
if (mutation.type === 'childList') {
|
|
14
|
-
mutation.addedNodes.forEach(node => {
|
|
15
|
-
if (node.nodeType === Node.ELEMENT_NODE &&
|
|
16
|
-
node.hasAttribute(attribute)) {
|
|
17
|
-
handler(node);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
// Initialize a mutation observer for patching accessibility features
|
|
24
|
-
return new MutationObserver(observerHandler);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.getAttributeObserver = getAttributeObserver;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function checkType(value, type, error) {
|
|
4
|
-
const typeIsArray = type === 'array';
|
|
5
|
-
const valueIsArray = Array.isArray(value);
|
|
6
|
-
if (typeIsArray || valueIsArray) {
|
|
7
|
-
if (valueIsArray !== typeIsArray)
|
|
8
|
-
throw new Error(error);
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
if (typeof value !== type)
|
|
12
|
-
throw new Error(error);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
exports.checkType = checkType;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function checkUrl(value, error) {
|
|
4
|
-
if (typeof value !== 'string' && !(value instanceof URL))
|
|
5
|
-
throw new Error(error);
|
|
6
|
-
try {
|
|
7
|
-
new URL(value);
|
|
8
|
-
}
|
|
9
|
-
catch (e) {
|
|
10
|
-
throw new Error(error);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.checkUrl = checkUrl;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fadeDuration = 200;
|
|
4
|
-
const fadedOutKeyframe = { opacity: '0' };
|
|
5
|
-
const fadedInKeyframe = { opacity: '1' };
|
|
6
|
-
const fadeIn = (el) => el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
|
|
7
|
-
const fadeOut = (el) => el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
|
|
8
|
-
|
|
9
|
-
exports.fadeIn = fadeIn;
|
|
10
|
-
exports.fadeOut = fadeOut;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function getRoot(element) {
|
|
4
|
-
const root = element.getRootNode();
|
|
5
|
-
if (root instanceof Document || root instanceof ShadowRoot) {
|
|
6
|
-
return root;
|
|
7
|
-
}
|
|
8
|
-
throw new Error('Attempting to access root node before the element is attached to the document or shadow tree.');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
exports.getRoot = getRoot;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const constants = require('./constants-238701d3.js');
|
|
4
|
-
const checkOneOf = require('./check-one-of-f4f5d0c0.js');
|
|
5
|
-
const checkType = require('./check-type-64af82a9.js');
|
|
6
|
-
const checkUrl = require('./check-url-3ffdd2fb.js');
|
|
7
|
-
|
|
8
|
-
function emptyOr(check) {
|
|
9
|
-
return (...args) => {
|
|
10
|
-
const value = args[0];
|
|
11
|
-
if (!constants.EMPTY_VALUES.some(v => v === value))
|
|
12
|
-
check(...args);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function checkPattern(value, pattern, errorMessage) {
|
|
17
|
-
if (typeof value !== 'string' || !pattern.test(value))
|
|
18
|
-
throw new Error(errorMessage);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const checkEmptyOrOneOf = emptyOr(checkOneOf.checkOneOf);
|
|
22
|
-
const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
23
|
-
const checkEmptyOrType = emptyOr(checkType.checkType);
|
|
24
|
-
const checkEmptyOrUrl = emptyOr(checkUrl.checkUrl);
|
|
25
|
-
|
|
26
|
-
exports.checkEmptyOrOneOf = checkEmptyOrOneOf;
|
|
27
|
-
exports.checkEmptyOrPattern = checkEmptyOrPattern;
|
|
28
|
-
exports.checkEmptyOrType = checkEmptyOrType;
|
|
29
|
-
exports.checkEmptyOrUrl = checkEmptyOrUrl;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-010dc207.js');
|
|
4
|
-
const _package = require('./package-8e810a59.js');
|
|
5
|
-
const headingLevels = require('./heading-levels-608d432e.js');
|
|
6
|
-
const index$1 = require('./index-5d4e0aed.js');
|
|
7
|
-
|
|
8
|
-
const postAccordionItemCss = ":host::after{display:block;content:\"\";margin-top:calc(var(--post-device-border-width-default)*-1);border-bottom:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover)::after{border-color:var(--post-scheme-color-interactive-primary-hover-stroke)}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-black)}.accordion-button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default)) calc(var(--post-device-spacing-padding-5) + var(--post-device-border-width-default));transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.accordion-button::before{display:block;position:absolute;content:\"\";inset:0;bottom:auto;border-top:var(--post-accordion-button-border-top)}.accordion-button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}.accordion-button.collapsed{padding-block-start:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default));padding-block-end:calc(var(--post-device-spacing-padding-19) + var(--post-device-border-width-default))}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover:not(:disabled),.accordion-button:focus-visible:not(:disabled){outline:var(--post-device-border-width-default) solid Highlight}.accordion-button:disabled{opacity:1 !important}}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:calc(var(--post-device-spacing-padding-block-25) + var(--post-device-border-width-default));padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}";
|
|
9
|
-
const PostAccordionItemStyle0 = postAccordionItemCss;
|
|
10
|
-
|
|
11
|
-
const PostAccordionItem = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
index.registerInstance(this, hostRef);
|
|
14
|
-
this.id = undefined;
|
|
15
|
-
this.slottedLogo = undefined;
|
|
16
|
-
this.collapsed = false;
|
|
17
|
-
this.headingLevel = undefined;
|
|
18
|
-
}
|
|
19
|
-
validateHeadingLevel(newValue = this.headingLevel) {
|
|
20
|
-
index$1.checkEmptyOrOneOf(newValue, headingLevels.HEADING_LEVELS, 'The `heading-level` property of the `post-accordion-item` must be a number between 1 and 6.');
|
|
21
|
-
}
|
|
22
|
-
componentWillLoad() {
|
|
23
|
-
this.id = this.host.id || `a${crypto.randomUUID()}`;
|
|
24
|
-
}
|
|
25
|
-
componentDidLoad() {
|
|
26
|
-
this.validateHeadingLevel();
|
|
27
|
-
}
|
|
28
|
-
// capture to make sure the "collapsed" property is updated before the event is consumed
|
|
29
|
-
onCollapseToggle(event) {
|
|
30
|
-
if (event.target === this.host &&
|
|
31
|
-
event.target.localName === 'post-accordion-item') {
|
|
32
|
-
this.collapsed = !event.detail;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Triggers the collapse programmatically.
|
|
37
|
-
*/
|
|
38
|
-
async toggle(force) {
|
|
39
|
-
return this.collapsible.toggle(force);
|
|
40
|
-
}
|
|
41
|
-
onSlotLogoChange() {
|
|
42
|
-
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
43
|
-
}
|
|
44
|
-
componentWillRender() {
|
|
45
|
-
this.slottedLogo = this.host.querySelector('img[slot="logo"]');
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
var _a, _b;
|
|
49
|
-
const headingLevel = (_a = this.host.closest('post-accorddion')) === null || _a === void 0 ? void 0 : _a.getAttribute('heading-level');
|
|
50
|
-
const HeadingTag = `h${(_b = headingLevel !== null && headingLevel !== void 0 ? headingLevel : this.headingLevel) !== null && _b !== void 0 ? _b : 2}`;
|
|
51
|
-
return (index.h(index.Host, { key: 'e11a8ce9df85f6813f152433d0b5526668415953', id: this.id, "data-version": _package.version }, index.h("div", { key: 'd62b7f758fca1ffbcef7c6f29b3a0ce48ded9749', part: "accordion-item", class: "accordion-item" }, index.h("post-collapsible-trigger", { key: '492458d3cda61325d931a83be1f1be1f98f63301', for: `${this.id}--collapse` }, index.h(HeadingTag, { key: '1a4bc90415504cd00a65922ff5e61221c8368eea', class: "accordion-header", id: `${this.id}--header` }, index.h("button", { key: 'c14154955c74a4482cc197aca95297ae29ef066f', type: "button", class: `accordion-button${this.collapsed ? ' collapsed' : ''}`, part: "button" }, index.h("span", { key: '112810b9df4a73bc02a46a98ba2d0ce069168c7c', class: {
|
|
52
|
-
'logo-container': true,
|
|
53
|
-
'has-image': !!this.slottedLogo,
|
|
54
|
-
} }, index.h("slot", { key: '67e72b84363597fc0e239baccb533b9083251a6b', name: "logo", onSlotchange: this.onSlotLogoChange.bind(this) })), index.h("slot", { key: '3e9a2b38f621990cabfa84431ca8a7fd39087c88', name: "header" }), index.h("post-icon", { key: 'e8337b48394b9357b62e517c3b066dfa1bb5f5d7', name: "2051" })))), index.h("post-collapsible", { key: 'ca23a5a9a8b1615dc4352223a3135514ea5f279a', id: `${this.id}--collapse`, collapsed: this.collapsed, ref: el => (this.collapsible = el) }, index.h("div", { key: '668805a03a3ee2facee60ecba0fa549edf0cecba', class: "accordion-body", part: "body" }, index.h("slot", { key: '3ddf282a59dad61dcd093c11a23f33635c9162d1' }))))));
|
|
55
|
-
}
|
|
56
|
-
get host() { return index.getElement(this); }
|
|
57
|
-
static get watchers() { return {
|
|
58
|
-
"headingLevel": ["validateHeadingLevel"]
|
|
59
|
-
}; }
|
|
60
|
-
};
|
|
61
|
-
PostAccordionItem.style = PostAccordionItemStyle0;
|
|
62
|
-
|
|
63
|
-
exports.PostAccordionItem = PostAccordionItem;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-010dc207.js');
|
|
4
|
-
const slide = require('./slide-5d51abe8.js');
|
|
5
|
-
const _package = require('./package-8e810a59.js');
|
|
6
|
-
const checkType = require('./check-type-64af82a9.js');
|
|
7
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
8
|
-
|
|
9
|
-
const postBackToTopCss = ":host{--post-floating-button-translate-y:calc(-1 * var(--post-core-dimension-112));position:fixed;top:var(--post-device-position-1);right:var(--post-device-position-1)}:host .back-to-top{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}:host .back-to-top{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}";
|
|
10
|
-
const PostBackToTopStyle0 = postBackToTopCss;
|
|
11
|
-
|
|
12
|
-
const PostBackToTop = class {
|
|
13
|
-
constructor(hostRef) {
|
|
14
|
-
index.registerInstance(this, hostRef);
|
|
15
|
-
this.handleScroll = () => {
|
|
16
|
-
this.belowFold = this.isBelowFold();
|
|
17
|
-
};
|
|
18
|
-
this.label = undefined;
|
|
19
|
-
this.belowFold = false;
|
|
20
|
-
}
|
|
21
|
-
isBelowFold() {
|
|
22
|
-
return window.scrollY > window.innerHeight;
|
|
23
|
-
}
|
|
24
|
-
// Watch for changes in belowFold
|
|
25
|
-
watchBelowFold(newValue) {
|
|
26
|
-
if (newValue) {
|
|
27
|
-
slide.slideUp(this.el, this.translateY);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
slide.slideDown(this.el, this.translateY);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
scrollToTop() {
|
|
34
|
-
window.scrollTo({
|
|
35
|
-
top: 0,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
// Validate the label
|
|
39
|
-
validateLabel() {
|
|
40
|
-
checkType.checkType(this.label, 'string', 'The label property of the Back to Top component is required for accessibility purposes. Please ensure it is set.');
|
|
41
|
-
checkNonEmpty.checkNonEmpty(this.label, 'The label property of the Back to Top component must not be empty. Please provide a proper text for the label');
|
|
42
|
-
}
|
|
43
|
-
// Set the initial state
|
|
44
|
-
componentWillLoad() {
|
|
45
|
-
this.belowFold = this.isBelowFold();
|
|
46
|
-
}
|
|
47
|
-
componentDidLoad() {
|
|
48
|
-
window.addEventListener('scroll', this.handleScroll, false);
|
|
49
|
-
this.translateY = window
|
|
50
|
-
.getComputedStyle(this.el)
|
|
51
|
-
.getPropertyValue('--post-floating-button-translate-y');
|
|
52
|
-
if (!this.belowFold) {
|
|
53
|
-
this.el.style.transform = `translateY(${this.translateY})`;
|
|
54
|
-
}
|
|
55
|
-
// Initial load
|
|
56
|
-
if (this.belowFold) {
|
|
57
|
-
slide.slideUp(this.el, this.translateY);
|
|
58
|
-
}
|
|
59
|
-
this.validateLabel();
|
|
60
|
-
}
|
|
61
|
-
disconnectedCallback() {
|
|
62
|
-
window.removeEventListener('scroll', this.handleScroll);
|
|
63
|
-
}
|
|
64
|
-
render() {
|
|
65
|
-
return (index.h(index.Host, { key: '92d56ff9055c2af38ae47b28c3af20771eed9a39', "data-version": _package.version }, index.h("button", { key: 'ae305dd5b5a3f8d97553945e547ad45e824e6b7d', class: "back-to-top", "aria-hidden": this.belowFold ? 'false' : 'true', tabindex: this.belowFold ? '0' : '-1', onClick: this.scrollToTop }, index.h("post-icon", { key: '37792f99d6ef79df4260f6ad1c5780e545f7870a', "aria-hidden": "true", name: "3026" }), index.h("span", { key: '8768101a26e259c2bd0695a97e6bb4077ad31ae6', class: "visually-hidden" }, this.label))));
|
|
66
|
-
}
|
|
67
|
-
get el() { return index.getElement(this); }
|
|
68
|
-
static get watchers() { return {
|
|
69
|
-
"belowFold": ["watchBelowFold"],
|
|
70
|
-
"label": ["validateLabel"]
|
|
71
|
-
}; }
|
|
72
|
-
};
|
|
73
|
-
PostBackToTop.style = PostBackToTopStyle0;
|
|
74
|
-
|
|
75
|
-
exports.PostBackToTop = PostBackToTop;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index-010dc207.js');
|
|
4
|
-
const _package = require('./package-8e810a59.js');
|
|
5
|
-
const fade = require('./fade-35a3633a.js');
|
|
6
|
-
const index$1 = require('./index-5d4e0aed.js');
|
|
7
|
-
const checkType = require('./check-type-64af82a9.js');
|
|
8
|
-
const checkNonEmpty = require('./check-non-empty-eeaa8f77.js');
|
|
9
|
-
|
|
10
|
-
const BANNER_TYPES = ['neutral', 'success', 'warning', 'danger', 'info'];
|
|
11
|
-
|
|
12
|
-
const postBannerCss = ".banner,.alert{min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));box-sizing:border-box;box-shadow:var(--post-device-elevation-100);border-radius:var(--post-device-border-radius-2);padding:var(--post-device-spacing-padding-10) var(--post-device-spacing-padding-10);padding-inline-start:calc(var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6));font-weight:400;border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);position:relative;color:var(--post-scheme-color-surface-default-fg);background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner:not(.no-icon)::before,.alert:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}.banner:has(>post-icon)::before,.alert:has(>post-icon)::before{content:none}.banner>post-icon,.alert>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner::before,.alert::before{content:\"\";display:block}.banner::before,.banner>post-icon,.alert::before,.alert>post-icon{position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);left:var(--post-device-spacing-padding-10);top:var(--post-device-spacing-padding-10)}.banner.no-icon,.alert.no-icon{min-height:calc(2 * var(--post-device-spacing-padding-10) + close.$close-size);padding-inline-start:var(--post-device-spacing-padding-10)}.banner.no-icon::before,.alert.no-icon::before{content:unset}.banner.no-icon>post-icon,.alert.no-icon>post-icon{display:none}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.banner,.alert{filter:none !important;border:2px solid CanvasText}}.banner:not(.banner-action):not(.alert-action),.alert:not(.banner-action):not(.alert-action){display:flex;flex-direction:column;justify-content:center;gap:.25rem}.banner:not(.banner-action):not(.alert-action) a,.alert:not(.banner-action):not(.alert-action) a{font-weight:400}.banner:not(.banner-action):not(.alert-action) hr,.alert:not(.banner-action):not(.alert-action) hr{margin-block:.5rem .75rem !important}.banner:not(.banner-action):not(.alert-action)>*,.alert:not(.banner-action):not(.alert-action)>*{margin:0}.banner-container{border:unset;background-color:rgba(0,0,0,0)}.banner-dismissible,.alert-dismissible{pointer-events:auto;position:relative}.banner-dismissible:not(.banner-action):not(.alert-action),.alert-dismissible:not(.banner-action):not(.alert-action){padding-inline-end:calc(var(--post-device-spacing-padding-10) + var(--post-device-spacing-gap-inline-6) + 1.5rem)}.banner-dismissible>.btn-close,.alert-dismissible>.btn-close{position:absolute;inset-block-start:1rem;inset-inline-end:var(--post-device-spacing-padding-10)}.banner-buttons,.alert-buttons{display:flex;align-items:center;justify-content:flex-start;flex-direction:row-reverse;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media (max-width: 779.98px){.banner-buttons,.alert-buttons{flex-direction:column}}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{display:flex;flex-direction:column;justify-content:center;gap:.25rem}.banner-action>.banner-content a,.banner-action>.alert-content a,.alert-action>.banner-content a,.alert-action>.alert-content a{font-weight:400}.banner-action>.banner-content hr,.banner-action>.alert-content hr,.alert-action>.banner-content hr,.alert-action>.alert-content hr{margin-block:.5rem .75rem !important}.banner-action>.banner-content>*,.banner-action>.alert-content>*,.alert-action>.banner-content>*,.alert-action>.alert-content>*{margin:0}@media (max-width: 779.98px){.banner-action,.alert-action{flex-direction:column;align-items:stretch}.banner-action>.banner-content,.banner-action>.alert-content,.alert-action>.banner-content,.alert-action>.alert-content{padding-inline-start:var(--post-device-spacing-gap-inline-6)var(--post-device-sizing-notification-icon-2);padding-inline-end:var(--post-device-spacing-gap-inline-6)1.5rem}.banner-action.no-icon>.banner-content,.banner-action.no-icon>.alert-content,.alert-action.no-icon>.banner-content,.alert-action.no-icon>.alert-content{padding-inline-start:0}.banner-action>.banner-buttons,.banner-action>.alert-buttons,.alert-action>.banner-buttons,.alert-action>.alert-buttons{display:flex}.banner-action>.banner-buttons>.btn,.banner-action>.banner-buttons>::slotted(.btn),.banner-action>.alert-buttons>.btn,.banner-action>.alert-buttons>::slotted(.btn),.alert-action>.banner-buttons>.btn,.alert-action>.banner-buttons>::slotted(.btn),.alert-action>.alert-buttons>.btn,.alert-action>.alert-buttons>::slotted(.btn){flex:1 0 0;width:100%}.banner-action>.banner-buttons>.btn:first-child,.banner-action>.banner-buttons>::slotted(.btn:first-child),.banner-action>.alert-buttons>.btn:first-child,.banner-action>.alert-buttons>::slotted(.btn:first-child),.alert-action>.banner-buttons>.btn:first-child,.alert-action>.banner-buttons>::slotted(.btn:first-child),.alert-action>.alert-buttons>.btn:first-child,.alert-action>.alert-buttons>::slotted(.btn:first-child){margin-inline-start:0}}.banner-neutral,.alert-neutral{background-color:var(--post-scheme-color-signal-neutral);border-color:var(--post-scheme-color-signal-neutral-dark);color-scheme:var(--post-core-bg-scheme-light)}.banner-neutral:not(.no-icon)::before,.alert-neutral:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M31.986 15.73c-.503.16-1.03.27-1.586.27a5.24 5.24 0 0 1-4.43-2.448c-.73.382-1.547.62-2.427.62a5.257 5.257 0 0 1-5.257-5.258c0-.88.237-1.698.62-2.427a5.24 5.24 0 0 1-2.449-4.43c0-.714.145-1.393.403-2.014C16.574.028 16.29 0 16 0 7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16c0-.091-.012-.18-.014-.27M16 30.667c-8.087 0-14.667-6.58-14.667-14.667 0-7.806 6.13-14.207 13.828-14.643a6.54 6.54 0 0 0 2.116 5.56 6.3 6.3 0 0 0-.325 1.997 6.6 6.6 0 0 0 6.59 6.59c.677 0 1.346-.108 1.998-.324a6.54 6.54 0 0 0 5.067 2.15C29.933 24.796 23.639 30.667 16 30.667M11.352 14.17a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 1 1 1.334 1.334 1.336 1.336 0 0 1-1.334-1.334m13.981 8.496a2.667 2.667 0 1 0-5.333 0 2.667 2.667 0 0 0 5.333 0m-4 0a1.335 1.335 0 0 1 2.667 0c0 .735-.598 1.333-1.333 1.333a1.335 1.335 0 0 1-1.334-1.333m-7.276-1.829a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.667a.667.667 0 1 1 .002-1.335.667.667 0 0 1-.002 1.335m7.772-6a2 2 0 1 0-4 0 2 2 0 0 0 4 0m-2 .666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M11.505 5.505a2 2 0 1 0 0 4 2 2 0 0 0 0-4m0 2.666a.667.667 0 1 1 .001-1.334.667.667 0 0 1-.001 1.334M28.93 18.548a13.2 13.2 0 0 1-4.335 7.357.663.663 0 0 1-.94-.073.666.666 0 0 1 .073-.94 11.84 11.84 0 0 0 3.894-6.61.668.668 0 0 1 1.307.266m-6.668 8.212a.667.667 0 0 1-.295.896c-.837.423-1.722.757-2.63.99a.665.665 0 1 1-.33-1.292 11.7 11.7 0 0 0 2.359-.888.67.67 0 0 1 .896.294M4 15.921a.666.666 0 1 1-1.333 0 13.13 13.13 0 0 1 4.597-9.984.666.666 0 1 1 .867 1.013A11.8 11.8 0 0 0 4 15.92'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-signal-neutral-dark)}.banner-neutral:has(>post-icon)::before,.alert-neutral:has(>post-icon)::before{content:none}.banner-neutral>post-icon,.alert-neutral>post-icon{background-color:var(--post-scheme-color-signal-neutral);color:var(--post-scheme-color-signal-neutral-dark)}.banner-success,.alert-success{background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-success:not(.no-icon)::before,.alert-success:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12.667 24.533-7.6-7.6 1.867-1.867 5.733 5.733 12.4-12.4 1.867 1.867z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-success:has(>post-icon)::before,.alert-success:has(>post-icon)::before{content:none}.banner-success>post-icon,.alert-success>post-icon{background-color:var(--post-scheme-color-interactive-notification-success-bg);color:var(--post-scheme-color-interactive-notification-success-icon)}.banner-warning,.alert-warning{background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-warning:not(.no-icon)::before,.alert-warning:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-warning:has(>post-icon)::before,.alert-warning:has(>post-icon)::before{content:none}.banner-warning>post-icon,.alert-warning>post-icon{background-color:var(--post-scheme-color-interactive-notification-warning-bg);color:var(--post-scheme-color-interactive-notification-warning-icon)}.banner-error,.alert-error{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-error:not(.no-icon)::before,.alert-error:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-error:has(>post-icon)::before,.alert-error:has(>post-icon)::before{content:none}.banner-error>post-icon,.alert-error>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-info,.alert-info{background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-info:not(.no-icon)::before,.alert-info:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.33 25.33v-16h-4.67V12h2v13.33h-2V28h6.67v-2.67zM14.67 4h2.67v2.67h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-info:has(>post-icon)::before,.alert-info:has(>post-icon)::before{content:none}.banner-info>post-icon,.alert-info>post-icon{background-color:var(--post-scheme-color-interactive-notification-info-bg);color:var(--post-scheme-color-interactive-notification-info-icon)}.banner-danger,.alert-danger{background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke);color-scheme:var(--post-core-bg-scheme-light)}.banner-danger:not(.no-icon)::before,.alert-danger:not(.no-icon)::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.67 4h2.67v18.67h-2.67zm0 21.33h2.67V28h-2.67z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;color:var(--post-scheme-color-interactive-notification-error-icon)}.banner-danger:has(>post-icon)::before,.alert-danger:has(>post-icon)::before{content:none}.banner-danger>post-icon,.alert-danger>post-icon{background-color:var(--post-scheme-color-interactive-notification-error-bg);color:var(--post-scheme-color-interactive-notification-error-icon)}.btn-close{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;border-radius:var(--post-device-border-radius-round);color:#000;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;cursor:pointer}.btn-close{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important;border-radius:4px}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}.btn-close::before{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m16.267 16.667 6.667-6.533-.933-1.067-6.667 6.667-6.667-6.667-.933 1.067 6.667 6.533-6.667 6.667 1.067.933 6.533-6.667 6.667 6.667.933-1.067z'/%3E%3C/svg%3E\");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;content:\"\";display:block;height:1.5rem;width:1.5rem}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:#000}.btn-close:disabled{color:var(--post-gray-40)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn-close{color:CanvasText;forced-color-adjust:none}.btn-close:focus,.btn-close:not(:disabled):hover,.pretend-hover.btn-close{color:Highlight}}.btn-close-white{color:#e6e6e6}.btn-close-white:focus,.btn-close-white:not(:disabled):hover,.btn-close-white.pretend-hover{color:#fff}.btn-close-white:disabled{color:#999}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:block}:host ::slotted(*){margin:0 !important}.visually-hidden{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}.visually-hidden:not(caption){position:absolute !important}";
|
|
13
|
-
const PostBannerStyle0 = postBannerCss;
|
|
14
|
-
|
|
15
|
-
const PostBanner = class {
|
|
16
|
-
constructor(hostRef) {
|
|
17
|
-
index.registerInstance(this, hostRef);
|
|
18
|
-
this.postDismissed = index.createEvent(this, "postDismissed", 7);
|
|
19
|
-
this.bannerId = crypto.randomUUID();
|
|
20
|
-
this.classes = undefined;
|
|
21
|
-
this.hasActions = undefined;
|
|
22
|
-
this.hasHeading = undefined;
|
|
23
|
-
this.onDismissButtonClick = () => this.dismiss();
|
|
24
|
-
this.dismissible = false;
|
|
25
|
-
this.dismissLabel = undefined;
|
|
26
|
-
this.icon = undefined;
|
|
27
|
-
this.type = 'neutral';
|
|
28
|
-
}
|
|
29
|
-
validateDismissible(isDismissible = this.dismissible) {
|
|
30
|
-
checkType.checkType(isDismissible, 'boolean', 'The post-banner "dismissible" prop should be a boolean.');
|
|
31
|
-
setTimeout(() => this.validateDismissLabel());
|
|
32
|
-
}
|
|
33
|
-
validateDismissLabel(dismissLabel = this.dismissLabel) {
|
|
34
|
-
if (this.dismissible) {
|
|
35
|
-
checkNonEmpty.checkNonEmpty(dismissLabel, 'Dismissible post-banner\'s require a "dismiss-label" prop.');
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
validateIcon(icon = this.icon) {
|
|
39
|
-
index$1.checkEmptyOrPattern(icon, /\d{4}|none/, 'The post-banner "icon" prop should be a 4-digits string.');
|
|
40
|
-
}
|
|
41
|
-
validateType(type = this.type) {
|
|
42
|
-
index$1.checkEmptyOrOneOf(type, BANNER_TYPES, `The post-banner requires a type form: ${BANNER_TYPES.join(', ')}`);
|
|
43
|
-
}
|
|
44
|
-
componentDidLoad() {
|
|
45
|
-
this.validateDismissible();
|
|
46
|
-
this.validateIcon();
|
|
47
|
-
this.validateType();
|
|
48
|
-
}
|
|
49
|
-
componentWillRender() {
|
|
50
|
-
this.hasHeading = this.host.querySelectorAll('[slot=heading]').length > 0;
|
|
51
|
-
this.hasActions = this.host.querySelectorAll('[slot=actions]').length > 0;
|
|
52
|
-
this.classes = `banner ${this.type ? 'banner-' + this.type : ''}`;
|
|
53
|
-
if (this.dismissible)
|
|
54
|
-
this.classes += ' banner-dismissible';
|
|
55
|
-
if (this.hasActions)
|
|
56
|
-
this.classes += ' banner-action';
|
|
57
|
-
if (this.icon === 'none')
|
|
58
|
-
this.classes += ' no-icon';
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Triggers banner dismissal programmatically (same as clicking on the close button (×)).
|
|
62
|
-
*/
|
|
63
|
-
async dismiss() {
|
|
64
|
-
const dismissal = fade.fadeOut(this.host);
|
|
65
|
-
await dismissal.finished;
|
|
66
|
-
this.host.remove();
|
|
67
|
-
this.postDismissed.emit();
|
|
68
|
-
}
|
|
69
|
-
render() {
|
|
70
|
-
const defaultBannerContent = [
|
|
71
|
-
this.hasHeading && (index.h("div", { key: `${this.bannerId}-heading`, class: "banner-heading" }, index.h("slot", { key: '7c03020bf287d48d71b31a7ae1d973ec0094d0f8', name: "heading" }))),
|
|
72
|
-
index.h("slot", { key: `${this.bannerId}-message` }),
|
|
73
|
-
];
|
|
74
|
-
const actionBannerContent = [
|
|
75
|
-
index.h("div", { key: `${this.bannerId}-content`, class: "banner-content" }, defaultBannerContent),
|
|
76
|
-
index.h("div", { key: `${this.bannerId}-buttons`, class: "banner-buttons" }, index.h("slot", { key: 'e7a4fca1de6d984560ab46c87c9406e567b482f9', name: "actions" })),
|
|
77
|
-
];
|
|
78
|
-
return (index.h(index.Host, { key: '58fcfe2258e5d5426c713864af729b046c9ed678', "data-version": _package.version }, index.h("div", { key: '0c54f8b1ece142fd9cd3d071cf36fde2dc5e1d08', role: "alert", class: this.classes, part: this.classes }, this.dismissible && (index.h("button", { key: '8e1c32b63a39605ad15c550f4cd55ebb5630e4fe', class: "btn-close", onClick: this.onDismissButtonClick }, index.h("span", { key: 'cea941fe2637f3cabb5889875ca12d6f9818e636', class: "visually-hidden" }, this.dismissLabel))), this.icon && this.icon !== 'none' && (index.h("post-icon", { key: `${this.bannerId}-icon`, name: this.icon })), this.hasActions ? actionBannerContent : defaultBannerContent)));
|
|
79
|
-
}
|
|
80
|
-
get host() { return index.getElement(this); }
|
|
81
|
-
static get watchers() { return {
|
|
82
|
-
"dismissible": ["validateDismissible"],
|
|
83
|
-
"dismissLabel": ["validateDismissLabel"],
|
|
84
|
-
"icon": ["validateIcon"],
|
|
85
|
-
"type": ["validateType"]
|
|
86
|
-
}; }
|
|
87
|
-
};
|
|
88
|
-
PostBanner.style = PostBannerStyle0;
|
|
89
|
-
|
|
90
|
-
exports.PostBanner = PostBanner;
|