@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/dist/types/index.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
export { Components, JSX } from './components';
|
|
1
|
+
export { Components, JSX, PostHeaderCustomEvent } from './components';
|
|
2
2
|
export { PostAccordion } from './components/post-accordion/post-accordion';
|
|
3
3
|
export { PostAccordionItem } from './components/post-accordion-item/post-accordion-item';
|
|
4
4
|
export { PostAvatar } from './components/post-avatar/post-avatar';
|
|
5
5
|
export { PostBackToTop } from './components/post-back-to-top/post-back-to-top';
|
|
6
6
|
export { PostBanner } from './components/post-banner/post-banner';
|
|
7
|
-
export {
|
|
7
|
+
export { PostBreadcrumbs } from './components/post-breadcrumbs/post-breadcrumbs';
|
|
8
8
|
export { PostBreadcrumbItem } from './components/post-breadcrumb-item/post-breadcrumb-item';
|
|
9
9
|
export { PostCardControl } from './components/post-card-control/post-card-control';
|
|
10
10
|
export { PostClosebutton } from './components/post-closebutton/post-closebutton';
|
|
11
11
|
export { PostCollapsible } from './components/post-collapsible/post-collapsible';
|
|
12
12
|
export { PostCollapsibleTrigger } from './components/post-collapsible-trigger/post-collapsible-trigger';
|
|
13
13
|
export { PostFooter } from './components/post-footer/post-footer';
|
|
14
|
-
export { PostHeader } from './components/post-header/post-header';
|
|
14
|
+
export { PostHeader, DEVICE_SIZE } from './components/post-header/post-header';
|
|
15
15
|
export { PostIcon } from './components/post-icon/post-icon';
|
|
16
16
|
export { PostLanguageOption } from './components/post-language-option/post-language-option';
|
|
17
17
|
export { PostLanguageSwitch } from './components/post-language-switch/post-language-switch';
|
|
18
|
+
export { PostLinkarea } from './components/post-linkarea/post-linkarea';
|
|
18
19
|
export { PostList } from './components/post-list/post-list';
|
|
19
20
|
export { PostListItem } from './components/post-list-item/post-list-item';
|
|
20
21
|
export { PostLogo } from './components/post-logo/post-logo';
|
|
@@ -33,3 +34,4 @@ export { PostTabPanel } from './components/post-tab-panel/post-tab-panel';
|
|
|
33
34
|
export { PostTag } from './components/post-tag/post-tag';
|
|
34
35
|
export { PostTogglebutton } from './components/post-togglebutton/post-togglebutton';
|
|
35
36
|
export { PostTooltip } from './components/post-tooltip/post-tooltip';
|
|
37
|
+
export { PostTooltipTrigger } from './components/post-tooltip-trigger/post-tooltip-trigger';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// It seems like the package '@oddbird/popover-polyfill does not properly declare it's types.
|
|
2
|
+
// This file fixes that issue so typescript does not complain about it on the import line
|
|
3
|
+
|
|
4
|
+
declare module '@oddbird/popover-polyfill/dist/popover-fn.js' {
|
|
5
|
+
export {
|
|
6
|
+
apply,
|
|
7
|
+
injectStyles,
|
|
8
|
+
isPolyfilled,
|
|
9
|
+
isSupported,
|
|
10
|
+
} from '../node_modules/@oddbird/popover-polyfill/dist/popover-fn.js';
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function getAttributeObserver(attribute: string, handler: (element: HTMLElement, mutation?: MutationRecord) => void): MutationObserver;
|
|
@@ -3,4 +3,4 @@ import { HostElement } from '../stencil-public-runtime';
|
|
|
3
3
|
* Invoke the `componentOnReady` method if it is available, simulate it otherwise
|
|
4
4
|
* @see https://stenciljs.com/docs/api#componentonready
|
|
5
5
|
*/
|
|
6
|
-
export declare
|
|
6
|
+
export declare function componentOnReady<T extends HostElement>(el: T): Promise<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFocusableChildren(element: Element): HTMLElement[];
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* getRootNode() can only be used after the element has been attached to the document!
|
|
3
|
+
* So use it for example in the componentDidLoad lifecycle hook.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getRoot(element: Element): Document | ShadowRoot;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
export * from './get-focusable-children';
|
|
2
|
+
export * from './attribute-observer';
|
|
1
3
|
export * from './component-on-ready';
|
|
2
4
|
export * from './property-checkers';
|
|
5
|
+
export * from './breakpoints';
|
|
3
6
|
export * from './debounce';
|
|
7
|
+
export * from './event-guard';
|
|
4
8
|
export * from './get-root';
|
|
5
9
|
export * from './is-motion-reduced';
|
|
6
10
|
export * from './sass-export';
|
|
7
11
|
export * from './timeout';
|
|
12
|
+
export * from './environment';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export type PropertyType = 'boolean' | 'number' | 'string' | 'array' | 'object' | 'function';
|
|
2
|
-
export declare function checkType
|
|
2
|
+
export declare function checkType<T extends {
|
|
3
|
+
host: HTMLElement;
|
|
4
|
+
}>(component: T, prop: keyof T, type: PropertyType, customMessage?: string): void;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
export declare const checkEmptyOrOneOf: <T
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
1
|
+
export declare const checkEmptyOrOneOf: <T extends {
|
|
2
|
+
host: HTMLElement;
|
|
3
|
+
}>(component: T, prop: keyof T, possibleValues: readonly unknown[], customMessage?: string) => void;
|
|
4
|
+
export declare const checkEmptyOrPattern: <T extends {
|
|
5
|
+
host: HTMLElement;
|
|
6
|
+
}>(component: T, prop: keyof T, pattern: RegExp, customMessage: string) => void;
|
|
7
|
+
export declare const checkEmptyOrType: <T extends {
|
|
8
|
+
host: HTMLElement;
|
|
9
|
+
}>(component: T, prop: keyof T, type: import("./check-type").PropertyType, customMessage?: string) => void;
|
|
10
|
+
export declare const checkEmptyOrUrl: <T extends {
|
|
11
|
+
host: HTMLElement;
|
|
12
|
+
}>(component: T, prop: keyof T, customMessage?: string) => void;
|
|
5
13
|
export * from './check-non-empty';
|
|
6
14
|
export * from './check-one-of';
|
|
7
15
|
export * from './check-pattern';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const IS_SERVER = typeof window === 'undefined';
|
|
2
|
+
const IS_BROWSER = !IS_SERVER;
|
|
3
|
+
|
|
4
|
+
class Breakpoint {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.current = {
|
|
7
|
+
key: '',
|
|
8
|
+
name: '',
|
|
9
|
+
};
|
|
10
|
+
if (IS_BROWSER && !this.breakpointMap) {
|
|
11
|
+
const keys = this.getStyles('--post-breakpoint-keys');
|
|
12
|
+
const names = this.getStyles('--post-breakpoint-names');
|
|
13
|
+
const widths = this.getStyles('--post-breakpoint-widths');
|
|
14
|
+
this.breakpointMap = widths
|
|
15
|
+
.map((width, i) => ({
|
|
16
|
+
minWidth: Number(width),
|
|
17
|
+
key: keys[i],
|
|
18
|
+
name: names[i],
|
|
19
|
+
}))
|
|
20
|
+
.reverse();
|
|
21
|
+
window.addEventListener('resize', () => this.updateHandler(), { passive: true });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
getStyles(propertyName) {
|
|
25
|
+
const styles = getComputedStyle(document.documentElement);
|
|
26
|
+
return (styles
|
|
27
|
+
.getPropertyValue(propertyName)
|
|
28
|
+
?.split(',')
|
|
29
|
+
.map(w => w.trim()) ?? []);
|
|
30
|
+
}
|
|
31
|
+
updateHandler(emitEvents = true) {
|
|
32
|
+
const calculated = this.breakpointMap.find(({ minWidth }) => innerWidth >= minWidth);
|
|
33
|
+
if (this.current.key !== calculated.key) {
|
|
34
|
+
this.current.key = calculated.key;
|
|
35
|
+
if (emitEvents)
|
|
36
|
+
this.dispatchEvent('key');
|
|
37
|
+
}
|
|
38
|
+
if (this.current.name !== calculated.name) {
|
|
39
|
+
this.current.name = calculated.name;
|
|
40
|
+
if (emitEvents)
|
|
41
|
+
this.dispatchEvent('name');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
dispatchEvent(type) {
|
|
45
|
+
if (IS_BROWSER) {
|
|
46
|
+
window.dispatchEvent(new CustomEvent(`postBreakpoint:${type}`, { detail: this.current[type] }));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
get(type) {
|
|
50
|
+
this.updateHandler(false);
|
|
51
|
+
return this.current[type];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const breakpoint = new Breakpoint();
|
|
55
|
+
|
|
56
|
+
export { IS_BROWSER as I, breakpoint as b };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { E as EMPTY_VALUES } from './constants.js';
|
|
2
2
|
|
|
3
|
-
function checkNonEmpty(
|
|
3
|
+
function checkNonEmpty(component, prop, customMessage) {
|
|
4
|
+
const componentName = component.host.localName;
|
|
5
|
+
const value = component[prop];
|
|
6
|
+
const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component is required.`;
|
|
7
|
+
const message = customMessage || defaultMessage;
|
|
4
8
|
if (EMPTY_VALUES.some(v => v === value)) {
|
|
5
|
-
throw new Error(
|
|
9
|
+
throw new Error(message);
|
|
6
10
|
}
|
|
7
11
|
}
|
|
8
12
|
|
package/loaders/check-one-of.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
function checkOneOf(
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
function checkOneOf(component, prop, possibleValues, customMessage) {
|
|
2
|
+
const componentName = component.host.localName;
|
|
3
|
+
const value = component[prop];
|
|
4
|
+
const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be one of the following values: ${possibleValues.join(', ')}.`;
|
|
5
|
+
const message = customMessage || defaultMessage;
|
|
6
|
+
if (!possibleValues.includes(value)) {
|
|
7
|
+
throw new Error(message);
|
|
8
|
+
}
|
|
4
9
|
}
|
|
5
10
|
|
|
6
11
|
export { checkOneOf as c };
|
package/loaders/check-type.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
function checkType(
|
|
1
|
+
function checkType(component, prop, type, customMessage) {
|
|
2
|
+
const componentName = component.host.localName;
|
|
3
|
+
const value = component[prop];
|
|
2
4
|
const typeIsArray = type === 'array';
|
|
3
5
|
const valueIsArray = Array.isArray(value);
|
|
6
|
+
const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be of type \`
|
|
7
|
+
${type}\`.`;
|
|
8
|
+
const message = customMessage || defaultMessage;
|
|
4
9
|
if (typeIsArray || valueIsArray) {
|
|
5
|
-
if (valueIsArray !== typeIsArray)
|
|
6
|
-
throw new Error(
|
|
10
|
+
if (valueIsArray !== typeIsArray) {
|
|
11
|
+
throw new Error(message);
|
|
12
|
+
}
|
|
7
13
|
}
|
|
8
|
-
else {
|
|
9
|
-
|
|
10
|
-
throw new Error(error);
|
|
14
|
+
else if (typeof value !== type) {
|
|
15
|
+
throw new Error(message);
|
|
11
16
|
}
|
|
12
17
|
}
|
|
13
18
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function eventGuard(host, event, options, callback) {
|
|
2
|
+
const target = event.target;
|
|
3
|
+
if (!target)
|
|
4
|
+
return;
|
|
5
|
+
if (target.localName === options.targetLocalName) {
|
|
6
|
+
if (!options.delegatorSelector || shadowClosest(target, options.delegatorSelector) === host) {
|
|
7
|
+
callback();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Traverses up the DOM (including crossing shadow DOM boundaries) starting from the given element
|
|
13
|
+
* to find and return the closest ancestor that matches the specified CSS selector.
|
|
14
|
+
* If no matching element is found, returns null.
|
|
15
|
+
*
|
|
16
|
+
* @param element - The starting element from which the search begins.
|
|
17
|
+
* @param selector - The CSS selector used to test each ancestor element.
|
|
18
|
+
* @returns The closest matching ancestor element or null if none is found.
|
|
19
|
+
*/
|
|
20
|
+
function shadowClosest(element, selector) {
|
|
21
|
+
let currentElement = element;
|
|
22
|
+
while (currentElement) {
|
|
23
|
+
if (currentElement.matches(selector)) {
|
|
24
|
+
return currentElement;
|
|
25
|
+
}
|
|
26
|
+
const parent = currentElement.parentElement;
|
|
27
|
+
if (parent) {
|
|
28
|
+
currentElement = parent;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const parentNode = currentElement.parentNode;
|
|
32
|
+
// When no parentElement exists, check if the current element is inside a shadow DOM.
|
|
33
|
+
// If so, move up to the shadow host to continue the search outside the shadow boundary.
|
|
34
|
+
if (parentNode instanceof ShadowRoot) {
|
|
35
|
+
currentElement = parentNode.host;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
currentElement = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { eventGuard as e };
|
package/loaders/fade.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
const fadeDuration = 200;
|
|
2
2
|
const fadedOutKeyframe = { opacity: '0' };
|
|
3
3
|
const fadedInKeyframe = { opacity: '1' };
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
function fadeIn(el) {
|
|
5
|
+
return el.animate([fadedOutKeyframe, fadedInKeyframe], { duration: fadeDuration });
|
|
6
|
+
}
|
|
7
|
+
function fadeOut(el) {
|
|
8
|
+
return el.animate([fadedInKeyframe, fadedOutKeyframe], { duration: fadeDuration });
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
export { fadeIn as a, fadeOut as f };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const focusableSelector = `:where(${[
|
|
2
|
+
'button',
|
|
3
|
+
'input:not([type="hidden"])',
|
|
4
|
+
'[tabindex]',
|
|
5
|
+
'select',
|
|
6
|
+
'textarea',
|
|
7
|
+
'[contenteditable]',
|
|
8
|
+
'a[href]',
|
|
9
|
+
'iframe',
|
|
10
|
+
'audio[controls]',
|
|
11
|
+
'video[controls]',
|
|
12
|
+
'area[href]',
|
|
13
|
+
'details > summary:first-of-type',
|
|
14
|
+
].join(',')})`;
|
|
15
|
+
const focusDisablingSelector = `:where(${[
|
|
16
|
+
'[inert]',
|
|
17
|
+
'[inert] *',
|
|
18
|
+
':disabled',
|
|
19
|
+
'dialog:not([open]) *',
|
|
20
|
+
'[popover]:not(:popover-open) *',
|
|
21
|
+
'details:not([open]) > *:not(details > summary:first-of-type)',
|
|
22
|
+
'details:not([open]) > *:not(details > summary:first-of-type) *',
|
|
23
|
+
'[tabindex^="-"]',
|
|
24
|
+
'[hidden]:not([hidden="false"])',
|
|
25
|
+
].join(',')})`;
|
|
26
|
+
function getFocusableChildren(element) {
|
|
27
|
+
const focusableChildren = element.querySelectorAll(`${focusableSelector}:not(${focusDisablingSelector})`);
|
|
28
|
+
const visibleFocusableChildren = Array.from(focusableChildren).filter(child => {
|
|
29
|
+
const style = window.getComputedStyle(child.parentElement);
|
|
30
|
+
return style.display !== 'none' && style.visibility !== 'hidden';
|
|
31
|
+
});
|
|
32
|
+
return visibleFocusableChildren;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { getFocusableChildren as g };
|
package/loaders/get-root.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import { I as IS_BROWSER } from './breakpoints.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* getRootNode() can only be used after the element has been attached to the document!
|
|
5
|
+
* So use it for example in the componentDidLoad lifecycle hook.
|
|
6
|
+
*/
|
|
1
7
|
function getRoot(element) {
|
|
2
|
-
const root = element.getRootNode();
|
|
8
|
+
const root = IS_BROWSER ? element.getRootNode() : element;
|
|
3
9
|
if (root instanceof Document || root instanceof ShadowRoot) {
|
|
4
10
|
return root;
|
|
5
11
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const urlAlphabet =
|
|
2
|
+
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
3
|
+
|
|
4
|
+
/* @ts-self-types="./index.d.ts" */
|
|
5
|
+
let nanoid = (size = 21) => {
|
|
6
|
+
let id = '';
|
|
7
|
+
let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)));
|
|
8
|
+
while (size--) {
|
|
9
|
+
id += urlAlphabet[bytes[size] & 63];
|
|
10
|
+
}
|
|
11
|
+
return id
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { nanoid as n };
|
package/loaders/index.d.ts
CHANGED
|
@@ -9,10 +9,10 @@ export { PostBackToTop as PostBackToTop } from '../dist/types/components/post-ba
|
|
|
9
9
|
export { defineCustomElement as defineCustomElementPostBackToTop } from './post-back-to-top';
|
|
10
10
|
export { PostBanner as PostBanner } from '../dist/types/components/post-banner/post-banner';
|
|
11
11
|
export { defineCustomElement as defineCustomElementPostBanner } from './post-banner';
|
|
12
|
-
export { PostBreadcrumb as PostBreadcrumb } from '../dist/types/components/post-breadcrumb/post-breadcrumb';
|
|
13
|
-
export { defineCustomElement as defineCustomElementPostBreadcrumb } from './post-breadcrumb';
|
|
14
12
|
export { PostBreadcrumbItem as PostBreadcrumbItem } from '../dist/types/components/post-breadcrumb-item/post-breadcrumb-item';
|
|
15
13
|
export { defineCustomElement as defineCustomElementPostBreadcrumbItem } from './post-breadcrumb-item';
|
|
14
|
+
export { PostBreadcrumbs as PostBreadcrumbs } from '../dist/types/components/post-breadcrumbs/post-breadcrumbs';
|
|
15
|
+
export { defineCustomElement as defineCustomElementPostBreadcrumbs } from './post-breadcrumbs';
|
|
16
16
|
export { PostCardControl as PostCardControl } from '../dist/types/components/post-card-control/post-card-control';
|
|
17
17
|
export { defineCustomElement as defineCustomElementPostCardControl } from './post-card-control';
|
|
18
18
|
export { PostClosebutton as PostClosebutton } from '../dist/types/components/post-closebutton/post-closebutton';
|
|
@@ -31,6 +31,8 @@ export { PostLanguageOption as PostLanguageOption } from '../dist/types/componen
|
|
|
31
31
|
export { defineCustomElement as defineCustomElementPostLanguageOption } from './post-language-option';
|
|
32
32
|
export { PostLanguageSwitch as PostLanguageSwitch } from '../dist/types/components/post-language-switch/post-language-switch';
|
|
33
33
|
export { defineCustomElement as defineCustomElementPostLanguageSwitch } from './post-language-switch';
|
|
34
|
+
export { PostLinkarea as PostLinkarea } from '../dist/types/components/post-linkarea/post-linkarea';
|
|
35
|
+
export { defineCustomElement as defineCustomElementPostLinkarea } from './post-linkarea';
|
|
34
36
|
export { PostList as PostList } from '../dist/types/components/post-list/post-list';
|
|
35
37
|
export { defineCustomElement as defineCustomElementPostList } from './post-list';
|
|
36
38
|
export { PostListItem as PostListItem } from '../dist/types/components/post-list-item/post-list-item';
|
|
@@ -67,6 +69,8 @@ export { PostTogglebutton as PostTogglebutton } from '../dist/types/components/p
|
|
|
67
69
|
export { defineCustomElement as defineCustomElementPostTogglebutton } from './post-togglebutton';
|
|
68
70
|
export { PostTooltip as PostTooltip } from '../dist/types/components/post-tooltip/post-tooltip';
|
|
69
71
|
export { defineCustomElement as defineCustomElementPostTooltip } from './post-tooltip';
|
|
72
|
+
export { PostTooltipTrigger as PostTooltipTrigger } from '../dist/types/components/post-tooltip-trigger/post-tooltip-trigger';
|
|
73
|
+
export { defineCustomElement as defineCustomElementPostTooltipTrigger } from './post-tooltip-trigger';
|
|
70
74
|
|
|
71
75
|
/**
|
|
72
76
|
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
package/loaders/index.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
+
import './breakpoints.js';
|
|
2
3
|
export { PostAvatar, defineCustomElement as defineCustomElementPostAvatar } from './post-avatar.js';
|
|
3
4
|
import './post-popovercontainer2.js';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export { PostTooltip, defineCustomElement as defineCustomElementPostTooltip } from './post-tooltip.js';
|
|
5
|
+
export { PostMegadropdown, defineCustomElement as defineCustomElementPostMegadropdown } from './post-megadropdown.js';
|
|
6
|
+
export { PostTooltipTrigger, defineCustomElement as defineCustomElementPostTooltipTrigger } from './post-tooltip-trigger.js';
|
|
7
7
|
export { PostAccordion, defineCustomElement as defineCustomElementPostAccordion } from './post-accordion.js';
|
|
8
8
|
export { PostAccordionItem, defineCustomElement as defineCustomElementPostAccordionItem } from './post-accordion-item.js';
|
|
9
9
|
export { PostBackToTop, defineCustomElement as defineCustomElementPostBackToTop } from './post-back-to-top.js';
|
|
10
10
|
export { PostBanner, defineCustomElement as defineCustomElementPostBanner } from './post-banner.js';
|
|
11
|
-
export { PostBreadcrumb, defineCustomElement as defineCustomElementPostBreadcrumb } from './post-breadcrumb.js';
|
|
12
11
|
export { PostBreadcrumbItem, defineCustomElement as defineCustomElementPostBreadcrumbItem } from './post-breadcrumb-item.js';
|
|
12
|
+
export { PostBreadcrumbs, defineCustomElement as defineCustomElementPostBreadcrumbs } from './post-breadcrumbs.js';
|
|
13
13
|
export { PostCardControl, defineCustomElement as defineCustomElementPostCardControl } from './post-card-control.js';
|
|
14
14
|
export { PostClosebutton, defineCustomElement as defineCustomElementPostClosebutton } from './post-closebutton.js';
|
|
15
15
|
export { PostCollapsible, defineCustomElement as defineCustomElementPostCollapsible } from './post-collapsible.js';
|
|
16
16
|
export { PostCollapsibleTrigger, defineCustomElement as defineCustomElementPostCollapsibleTrigger } from './post-collapsible-trigger.js';
|
|
17
|
+
export { PostFooter, defineCustomElement as defineCustomElementPostFooter } from './post-footer.js';
|
|
17
18
|
export { PostHeader, defineCustomElement as defineCustomElementPostHeader } from './post-header.js';
|
|
18
19
|
export { PostIcon, defineCustomElement as defineCustomElementPostIcon } from './post-icon.js';
|
|
19
20
|
export { PostLanguageOption, defineCustomElement as defineCustomElementPostLanguageOption } from './post-language-option.js';
|
|
20
21
|
export { PostLanguageSwitch, defineCustomElement as defineCustomElementPostLanguageSwitch } from './post-language-switch.js';
|
|
22
|
+
export { PostLinkarea, defineCustomElement as defineCustomElementPostLinkarea } from './post-linkarea.js';
|
|
21
23
|
export { PostList, defineCustomElement as defineCustomElementPostList } from './post-list.js';
|
|
22
24
|
export { PostListItem, defineCustomElement as defineCustomElementPostListItem } from './post-list-item.js';
|
|
23
25
|
export { PostLogo, defineCustomElement as defineCustomElementPostLogo } from './post-logo.js';
|
|
24
26
|
export { PostMainnavigation, defineCustomElement as defineCustomElementPostMainnavigation } from './post-mainnavigation.js';
|
|
25
|
-
export { PostMegadropdown, defineCustomElement as defineCustomElementPostMegadropdown } from './post-megadropdown.js';
|
|
26
27
|
export { PostMegadropdownTrigger, defineCustomElement as defineCustomElementPostMegadropdownTrigger } from './post-megadropdown-trigger.js';
|
|
27
28
|
export { PostMenu, defineCustomElement as defineCustomElementPostMenu } from './post-menu.js';
|
|
28
29
|
export { PostMenuItem, defineCustomElement as defineCustomElementPostMenuItem } from './post-menu-item.js';
|
|
29
30
|
export { PostMenuTrigger, defineCustomElement as defineCustomElementPostMenuTrigger } from './post-menu-trigger.js';
|
|
31
|
+
export { PostPopover, defineCustomElement as defineCustomElementPostPopover } from './post-popover.js';
|
|
30
32
|
export { PostPopovercontainer, defineCustomElement as defineCustomElementPostPopovercontainer } from './post-popovercontainer.js';
|
|
31
33
|
export { PostRating, defineCustomElement as defineCustomElementPostRating } from './post-rating.js';
|
|
32
34
|
export { PostTabHeader, defineCustomElement as defineCustomElementPostTabHeader } from './post-tab-header.js';
|
|
@@ -34,3 +36,4 @@ export { PostTabPanel, defineCustomElement as defineCustomElementPostTabPanel }
|
|
|
34
36
|
export { PostTabs, defineCustomElement as defineCustomElementPostTabs } from './post-tabs.js';
|
|
35
37
|
export { PostTag, defineCustomElement as defineCustomElementPostTag } from './post-tag.js';
|
|
36
38
|
export { PostTogglebutton, defineCustomElement as defineCustomElementPostTogglebutton } from './post-togglebutton.js';
|
|
39
|
+
export { PostTooltip, defineCustomElement as defineCustomElementPostTooltip } from './post-tooltip.js';
|
package/loaders/index2.js
CHANGED
|
@@ -4,25 +4,38 @@ import { c as checkType } from './check-type.js';
|
|
|
4
4
|
|
|
5
5
|
function emptyOr(check) {
|
|
6
6
|
return (...args) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const component = args[0];
|
|
8
|
+
const prop = args[1];
|
|
9
|
+
const value = component[prop];
|
|
10
|
+
if (!EMPTY_VALUES.some(v => v === value)) {
|
|
9
11
|
check(...args);
|
|
12
|
+
}
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
15
|
|
|
13
|
-
function checkPattern(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
function checkPattern(component, prop, pattern, customMessage) {
|
|
17
|
+
const componentName = component.host.localName;
|
|
18
|
+
const value = component[prop];
|
|
19
|
+
const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component must be follow the format \`${pattern}\`.`;
|
|
20
|
+
const message = customMessage || defaultMessage;
|
|
21
|
+
if (typeof value !== 'string' || !pattern.test(value)) {
|
|
22
|
+
throw new Error(message);
|
|
23
|
+
}
|
|
16
24
|
}
|
|
17
25
|
|
|
18
|
-
function checkUrl(
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
function checkUrl(component, prop, customMessage) {
|
|
27
|
+
const componentName = component.host.localName;
|
|
28
|
+
const value = component[prop];
|
|
29
|
+
const defaultMessage = `The prop \`${String(prop)}\` of the \`${componentName}\` component is invalid.`;
|
|
30
|
+
const message = customMessage || defaultMessage;
|
|
31
|
+
if (typeof value !== 'string' && !(value instanceof URL)) {
|
|
32
|
+
throw new Error(message);
|
|
33
|
+
}
|
|
21
34
|
try {
|
|
22
|
-
new URL(value);
|
|
35
|
+
new URL(value, 'https://www.post.ch');
|
|
23
36
|
}
|
|
24
|
-
catch
|
|
25
|
-
throw new Error(
|
|
37
|
+
catch {
|
|
38
|
+
throw new Error(message);
|
|
26
39
|
}
|
|
27
40
|
}
|
|
28
41
|
|
|
@@ -31,4 +44,4 @@ const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
|
31
44
|
const checkEmptyOrType = emptyOr(checkType);
|
|
32
45
|
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
33
46
|
|
|
34
|
-
export {
|
|
47
|
+
export { checkEmptyOrOneOf as a, checkUrl as b, checkEmptyOrPattern as c, checkEmptyOrType as d, checkEmptyOrUrl as e };
|