@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
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { IS_BROWSER } from "../../utils/index";
|
|
3
|
+
import { version } from "../../../../package";
|
|
2
4
|
import { arrow, autoUpdate, computePosition, flip, inline, limitShift, offset, shift, size, } from "@floating-ui/dom";
|
|
3
5
|
// Polyfill for popovers, can be removed when https://caniuse.com/?search=popover is green
|
|
4
|
-
import "@oddbird/popover-polyfill";
|
|
5
|
-
import { version } from "../../../../package";
|
|
6
|
-
const SIDE_MAP = {
|
|
7
|
-
top: 'bottom',
|
|
8
|
-
right: 'left',
|
|
9
|
-
bottom: 'top',
|
|
10
|
-
left: 'right',
|
|
11
|
-
};
|
|
6
|
+
import { apply, isSupported } from "@oddbird/popover-polyfill/dist/popover-fn.js";
|
|
12
7
|
/**
|
|
13
8
|
* @slot - Default slot for placing content inside the popovercontainer.
|
|
14
9
|
*/
|
|
@@ -16,19 +11,36 @@ export class PostPopovercontainer {
|
|
|
16
11
|
constructor() {
|
|
17
12
|
this.placement = 'top';
|
|
18
13
|
this.edgeGap = 8;
|
|
14
|
+
this.animation = null;
|
|
19
15
|
this.arrow = false;
|
|
16
|
+
this.manualClose = false;
|
|
17
|
+
this.safeSpace = undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Updates cursor position for safe space feature when popover is open.
|
|
21
|
+
* Sets CSS custom properties for dynamic styling of safe area.
|
|
22
|
+
* @param event MouseEvent with cursor position
|
|
23
|
+
*/
|
|
24
|
+
mouseTrackingHandler(event) {
|
|
25
|
+
this.host.style.setProperty('--post-safe-space-cursor-x', `${event.clientX}px`);
|
|
26
|
+
this.host.style.setProperty('--post-safe-space-cursor-y', `${event.clientY}px`);
|
|
27
|
+
}
|
|
28
|
+
connectedCallback() {
|
|
29
|
+
if (IS_BROWSER && !isSupported()) {
|
|
30
|
+
apply();
|
|
31
|
+
}
|
|
20
32
|
}
|
|
21
33
|
componentDidLoad() {
|
|
22
|
-
this.host.setAttribute('popover', '');
|
|
23
34
|
this.host.addEventListener('beforetoggle', this.handleToggle.bind(this));
|
|
24
35
|
}
|
|
25
36
|
disconnectedCallback() {
|
|
26
|
-
if (typeof this.clearAutoUpdate === 'function')
|
|
37
|
+
if (typeof this.clearAutoUpdate === 'function') {
|
|
27
38
|
this.clearAutoUpdate();
|
|
39
|
+
}
|
|
28
40
|
}
|
|
29
41
|
/**
|
|
30
|
-
* Programmatically display the
|
|
31
|
-
* @param target An element with [data-
|
|
42
|
+
* Programmatically display the popovercontainer
|
|
43
|
+
* @param target An element with [data-popover-target="id"] where the popovercontainer should be shown
|
|
32
44
|
*/
|
|
33
45
|
async show(target) {
|
|
34
46
|
if (!this.toggleTimeoutId) {
|
|
@@ -38,7 +50,7 @@ export class PostPopovercontainer {
|
|
|
38
50
|
}
|
|
39
51
|
}
|
|
40
52
|
/**
|
|
41
|
-
* Programmatically hide
|
|
53
|
+
* Programmatically hide the popovercontainer
|
|
42
54
|
*/
|
|
43
55
|
async hide() {
|
|
44
56
|
if (!this.toggleTimeoutId) {
|
|
@@ -47,8 +59,8 @@ export class PostPopovercontainer {
|
|
|
47
59
|
}
|
|
48
60
|
}
|
|
49
61
|
/**
|
|
50
|
-
* Toggle
|
|
51
|
-
* @param target An element with [data-
|
|
62
|
+
* Toggle popovercontainer display
|
|
63
|
+
* @param target An element with [data-popover-target="id"] where the popovercontainer should be shown
|
|
52
64
|
* @param force Pass true to always show or false to always hide
|
|
53
65
|
*/
|
|
54
66
|
async toggle(target, force) {
|
|
@@ -59,11 +71,11 @@ export class PostPopovercontainer {
|
|
|
59
71
|
this.host.togglePopover(force);
|
|
60
72
|
this.toggleTimeoutId = null;
|
|
61
73
|
}
|
|
62
|
-
return this.host.matches(':where(:popover-open, .popover-open');
|
|
74
|
+
return this.host.matches(':where(:popover-open, .popover-open)');
|
|
63
75
|
}
|
|
64
76
|
/**
|
|
65
|
-
* Start or stop auto updates based on
|
|
66
|
-
*
|
|
77
|
+
* Start or stop auto updates based on popovercontainer events.
|
|
78
|
+
* Popovercontainers can be closed or opened with other methods than class members,
|
|
67
79
|
* therefore listening to the toggle event is safer for cleaning up.
|
|
68
80
|
* @param e ToggleEvent
|
|
69
81
|
*/
|
|
@@ -72,29 +84,63 @@ export class PostPopovercontainer {
|
|
|
72
84
|
const isOpen = e.newState === 'open';
|
|
73
85
|
if (isOpen) {
|
|
74
86
|
this.startAutoupdates();
|
|
87
|
+
if (this.safeSpace)
|
|
88
|
+
window.addEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
75
89
|
}
|
|
76
90
|
else {
|
|
77
91
|
if (typeof this.clearAutoUpdate === 'function')
|
|
78
92
|
this.clearAutoUpdate();
|
|
93
|
+
if (this.safeSpace)
|
|
94
|
+
window.removeEventListener('mousemove', this.mouseTrackingHandler.bind(this));
|
|
79
95
|
}
|
|
80
96
|
this.postToggle.emit(isOpen);
|
|
81
97
|
}
|
|
82
98
|
/**
|
|
83
99
|
* Start listening for DOM updates, scroll events etc. that have
|
|
84
|
-
* an influence on
|
|
100
|
+
* an influence on popovercontainer positioning
|
|
85
101
|
*/
|
|
86
102
|
startAutoupdates() {
|
|
87
103
|
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
|
|
88
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves the dynamic height of the header
|
|
107
|
+
*/
|
|
108
|
+
getHeaderHeight() {
|
|
109
|
+
const header = document.querySelector('post-header');
|
|
110
|
+
return header ? parseFloat(getComputedStyle(header).height) : 0;
|
|
111
|
+
}
|
|
89
112
|
async calculatePosition() {
|
|
113
|
+
const { x, y, middlewareData, placement } = await this.computeMainPosition();
|
|
114
|
+
const currentPlacement = placement.split('-')[0];
|
|
115
|
+
// Position popover
|
|
116
|
+
this.host.style.left = `${x}px`;
|
|
117
|
+
this.host.style.top = `${y}px`;
|
|
118
|
+
// Position arrow if enabled
|
|
119
|
+
if (this.arrow && middlewareData.arrow) {
|
|
120
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
121
|
+
const staticSide = PostPopovercontainer.STATIC_SIDES[currentPlacement];
|
|
122
|
+
if (staticSide) {
|
|
123
|
+
Object.assign(this.arrowRef.style, {
|
|
124
|
+
left: arrowX ? `${arrowX}px` : '',
|
|
125
|
+
top: arrowY ? `${arrowY}px` : '',
|
|
126
|
+
[staticSide]: '-7px',
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Handle safe space if enabled
|
|
131
|
+
if (this.safeSpace && this.eventTarget) {
|
|
132
|
+
await this.updateSafeSpaceBoundaries(currentPlacement);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
async computeMainPosition() {
|
|
90
136
|
const gap = this.edgeGap;
|
|
91
137
|
const middleware = [
|
|
92
|
-
flip(
|
|
138
|
+
flip({
|
|
139
|
+
padding: this.getHeaderHeight(),
|
|
140
|
+
}),
|
|
93
141
|
inline(),
|
|
94
142
|
shift({
|
|
95
143
|
padding: gap,
|
|
96
|
-
// Prevents shifting away from the anchor too far, while shifting as far as possible
|
|
97
|
-
// https://floating-ui.com/docs/shift#limiter
|
|
98
144
|
limiter: limitShift({
|
|
99
145
|
offset: 32,
|
|
100
146
|
}),
|
|
@@ -106,40 +152,82 @@ export class PostPopovercontainer {
|
|
|
106
152
|
});
|
|
107
153
|
},
|
|
108
154
|
}),
|
|
109
|
-
offset(this.arrow ? gap + 4 : gap),
|
|
155
|
+
offset(this.arrow ? gap + 4 : gap),
|
|
110
156
|
];
|
|
111
157
|
if (this.arrow) {
|
|
112
158
|
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
113
159
|
}
|
|
114
|
-
|
|
160
|
+
return computePosition(this.eventTarget, this.host, {
|
|
115
161
|
placement: this.placement || 'top',
|
|
116
162
|
strategy: 'fixed',
|
|
117
163
|
middleware,
|
|
118
164
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
this.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
165
|
+
}
|
|
166
|
+
async updateSafeSpaceBoundaries(currentPlacement) {
|
|
167
|
+
const targetRect = this.eventTarget.getBoundingClientRect();
|
|
168
|
+
const popoverRect = this.host.getBoundingClientRect();
|
|
169
|
+
const isVertical = currentPlacement === 'top' || currentPlacement === 'bottom';
|
|
170
|
+
// Helper function to get positioning data based on placement
|
|
171
|
+
const getPositioningData = (placement, popoverRect, targetRect) => {
|
|
172
|
+
if (placement === 'top' || placement === 'bottom') {
|
|
173
|
+
return {
|
|
174
|
+
popover: {
|
|
175
|
+
y: placement === 'top' ? popoverRect.bottom : popoverRect.top,
|
|
176
|
+
xStart: popoverRect.left,
|
|
177
|
+
xEnd: popoverRect.right,
|
|
178
|
+
},
|
|
179
|
+
trigger: {
|
|
180
|
+
y: placement === 'top' ? targetRect.top : targetRect.bottom,
|
|
181
|
+
xStart: targetRect.left,
|
|
182
|
+
xEnd: targetRect.right,
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
// left or right
|
|
188
|
+
return {
|
|
189
|
+
popover: {
|
|
190
|
+
x: placement === 'left' ? popoverRect.right : popoverRect.left,
|
|
191
|
+
yStart: popoverRect.top,
|
|
192
|
+
yEnd: popoverRect.bottom,
|
|
193
|
+
},
|
|
194
|
+
trigger: {
|
|
195
|
+
x: placement === 'left' ? targetRect.left : targetRect.right,
|
|
196
|
+
yStart: targetRect.top,
|
|
197
|
+
yEnd: targetRect.bottom,
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
const posData = getPositioningData(currentPlacement, popoverRect, targetRect);
|
|
203
|
+
// Clear previous values
|
|
204
|
+
PostPopovercontainer.PROPERTIES_TO_CLEAR.forEach(prop => {
|
|
205
|
+
this.host.style.removeProperty(prop);
|
|
206
|
+
});
|
|
207
|
+
if (isVertical) {
|
|
208
|
+
// For top/bottom placement
|
|
209
|
+
this.host.style.setProperty('--post-safe-space-popover-y', `${posData.popover.y}px`);
|
|
210
|
+
this.host.style.setProperty('--post-safe-space-popover-x-start', `${posData.popover.xStart}px`);
|
|
211
|
+
this.host.style.setProperty('--post-safe-space-popover-x-end', `${posData.popover.xEnd}px`);
|
|
212
|
+
this.host.style.setProperty('--post-safe-space-trigger-y', `${posData.trigger.y}px`);
|
|
213
|
+
this.host.style.setProperty('--post-safe-space-trigger-x-start', `${posData.trigger.xStart}px`);
|
|
214
|
+
this.host.style.setProperty('--post-safe-space-trigger-x-end', `${posData.trigger.xEnd}px`);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
// For left/right placement
|
|
218
|
+
this.host.style.setProperty('--post-safe-space-popover-x', `${posData.popover.x}px`);
|
|
219
|
+
this.host.style.setProperty('--post-safe-space-popover-y-start', `${posData.popover.yStart}px`);
|
|
220
|
+
this.host.style.setProperty('--post-safe-space-popover-y-end', `${posData.popover.yEnd}px`);
|
|
221
|
+
this.host.style.setProperty('--post-safe-space-trigger-x', `${posData.trigger.x}px`);
|
|
222
|
+
this.host.style.setProperty('--post-safe-space-trigger-y-start', `${posData.trigger.yStart}px`);
|
|
223
|
+
this.host.style.setProperty('--post-safe-space-trigger-y-end', `${posData.trigger.yEnd}px`);
|
|
137
224
|
}
|
|
138
225
|
}
|
|
139
226
|
render() {
|
|
140
|
-
|
|
227
|
+
const animationClass = this.animation ? `animate-${this.animation}` : '';
|
|
228
|
+
return (h(Host, { key: '980c2d7531ef77f71ea51b069dc20bbf40cd0ac4', "data-version": version, popover: this.manualClose ? 'manual' : 'auto' }, h("div", { key: '9fa08070a5e7f864aade0dc1afc2917e54693109', class: animationClass }, this.arrow && (h("span", { key: '4700f55c721387f2d918214309e87c9057e4831f', class: "arrow", ref: el => {
|
|
141
229
|
this.arrowRef = el;
|
|
142
|
-
} })), h("slot", { key: '
|
|
230
|
+
} })), h("slot", { key: 'ec5304bc77d4f3eb91c79fb2a37d096b4d43b888' }))));
|
|
143
231
|
}
|
|
144
232
|
static get is() { return "post-popovercontainer"; }
|
|
145
233
|
static get originalStyleUrls() {
|
|
@@ -164,7 +252,7 @@ export class PostPopovercontainer {
|
|
|
164
252
|
"Placement": {
|
|
165
253
|
"location": "import",
|
|
166
254
|
"path": "@floating-ui/dom",
|
|
167
|
-
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.
|
|
255
|
+
"id": "../../node_modules/.pnpm/@floating-ui+dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts::Placement"
|
|
168
256
|
}
|
|
169
257
|
}
|
|
170
258
|
},
|
|
@@ -172,7 +260,7 @@ export class PostPopovercontainer {
|
|
|
172
260
|
"optional": true,
|
|
173
261
|
"docs": {
|
|
174
262
|
"tags": [],
|
|
175
|
-
"text": "Defines the placement of the
|
|
263
|
+
"text": "Defines the placement of the popovercontainer according to the floating-ui options available at https://floating-ui.com/docs/computePosition#placement.\nPopovercontainers are automatically flipped to the opposite side if there is not enough available space and are shifted\ntowards the viewport if they would overlap edge boundaries."
|
|
176
264
|
},
|
|
177
265
|
"attribute": "placement",
|
|
178
266
|
"reflect": false,
|
|
@@ -190,12 +278,30 @@ export class PostPopovercontainer {
|
|
|
190
278
|
"optional": true,
|
|
191
279
|
"docs": {
|
|
192
280
|
"tags": [],
|
|
193
|
-
"text": "Gap between the edge of the page and the
|
|
281
|
+
"text": "Gap between the edge of the page and the popovercontainer"
|
|
194
282
|
},
|
|
195
283
|
"attribute": "edge-gap",
|
|
196
284
|
"reflect": false,
|
|
197
285
|
"defaultValue": "8"
|
|
198
286
|
},
|
|
287
|
+
"animation": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "'pop-in' | null",
|
|
292
|
+
"resolved": "\"pop-in\"",
|
|
293
|
+
"references": {}
|
|
294
|
+
},
|
|
295
|
+
"required": false,
|
|
296
|
+
"optional": true,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Animation style"
|
|
300
|
+
},
|
|
301
|
+
"attribute": "animation",
|
|
302
|
+
"reflect": false,
|
|
303
|
+
"defaultValue": "null"
|
|
304
|
+
},
|
|
199
305
|
"arrow": {
|
|
200
306
|
"type": "boolean",
|
|
201
307
|
"mutable": false,
|
|
@@ -208,11 +314,46 @@ export class PostPopovercontainer {
|
|
|
208
314
|
"optional": true,
|
|
209
315
|
"docs": {
|
|
210
316
|
"tags": [],
|
|
211
|
-
"text": "
|
|
317
|
+
"text": "Whether or not to display a little pointer arrow"
|
|
212
318
|
},
|
|
213
319
|
"attribute": "arrow",
|
|
214
320
|
"reflect": false,
|
|
215
321
|
"defaultValue": "false"
|
|
322
|
+
},
|
|
323
|
+
"manualClose": {
|
|
324
|
+
"type": "boolean",
|
|
325
|
+
"mutable": false,
|
|
326
|
+
"complexType": {
|
|
327
|
+
"original": "boolean",
|
|
328
|
+
"resolved": "boolean",
|
|
329
|
+
"references": {}
|
|
330
|
+
},
|
|
331
|
+
"required": false,
|
|
332
|
+
"optional": false,
|
|
333
|
+
"docs": {
|
|
334
|
+
"tags": [],
|
|
335
|
+
"text": "Whether or not the popovercontainer should close when user clicks outside of it"
|
|
336
|
+
},
|
|
337
|
+
"attribute": "manual-close",
|
|
338
|
+
"reflect": false,
|
|
339
|
+
"defaultValue": "false"
|
|
340
|
+
},
|
|
341
|
+
"safeSpace": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"mutable": false,
|
|
344
|
+
"complexType": {
|
|
345
|
+
"original": "'triangle' | 'trapezoid'",
|
|
346
|
+
"resolved": "\"trapezoid\" | \"triangle\"",
|
|
347
|
+
"references": {}
|
|
348
|
+
},
|
|
349
|
+
"required": false,
|
|
350
|
+
"optional": true,
|
|
351
|
+
"docs": {
|
|
352
|
+
"tags": [],
|
|
353
|
+
"text": "Enables a safespace through which the cursor can be moved without the popover being disabled"
|
|
354
|
+
},
|
|
355
|
+
"attribute": "safe-space",
|
|
356
|
+
"reflect": true
|
|
216
357
|
}
|
|
217
358
|
};
|
|
218
359
|
}
|
|
@@ -225,7 +366,7 @@ export class PostPopovercontainer {
|
|
|
225
366
|
"composed": true,
|
|
226
367
|
"docs": {
|
|
227
368
|
"tags": [],
|
|
228
|
-
"text": "Fires whenever the
|
|
369
|
+
"text": "Fires whenever the popovercontainer gets shown or hidden, passing the new state in event.details as a boolean"
|
|
229
370
|
},
|
|
230
371
|
"complexType": {
|
|
231
372
|
"original": "boolean",
|
|
@@ -242,7 +383,7 @@ export class PostPopovercontainer {
|
|
|
242
383
|
"parameters": [{
|
|
243
384
|
"name": "target",
|
|
244
385
|
"type": "HTMLElement",
|
|
245
|
-
"docs": "An element with [data-
|
|
386
|
+
"docs": "An element with [data-popover-target=\"id\"] where the popovercontainer should be shown"
|
|
246
387
|
}],
|
|
247
388
|
"references": {
|
|
248
389
|
"Promise": {
|
|
@@ -257,10 +398,10 @@ export class PostPopovercontainer {
|
|
|
257
398
|
"return": "Promise<void>"
|
|
258
399
|
},
|
|
259
400
|
"docs": {
|
|
260
|
-
"text": "Programmatically display the
|
|
401
|
+
"text": "Programmatically display the popovercontainer",
|
|
261
402
|
"tags": [{
|
|
262
403
|
"name": "param",
|
|
263
|
-
"text": "target An element with [data-
|
|
404
|
+
"text": "target An element with [data-popover-target=\"id\"] where the popovercontainer should be shown"
|
|
264
405
|
}]
|
|
265
406
|
}
|
|
266
407
|
},
|
|
@@ -277,7 +418,7 @@ export class PostPopovercontainer {
|
|
|
277
418
|
"return": "Promise<void>"
|
|
278
419
|
},
|
|
279
420
|
"docs": {
|
|
280
|
-
"text": "Programmatically hide
|
|
421
|
+
"text": "Programmatically hide the popovercontainer",
|
|
281
422
|
"tags": []
|
|
282
423
|
}
|
|
283
424
|
},
|
|
@@ -287,7 +428,7 @@ export class PostPopovercontainer {
|
|
|
287
428
|
"parameters": [{
|
|
288
429
|
"name": "target",
|
|
289
430
|
"type": "HTMLElement",
|
|
290
|
-
"docs": "An element with [data-
|
|
431
|
+
"docs": "An element with [data-popover-target=\"id\"] where the popovercontainer should be shown"
|
|
291
432
|
}, {
|
|
292
433
|
"name": "force",
|
|
293
434
|
"type": "boolean",
|
|
@@ -306,10 +447,10 @@ export class PostPopovercontainer {
|
|
|
306
447
|
"return": "Promise<boolean>"
|
|
307
448
|
},
|
|
308
449
|
"docs": {
|
|
309
|
-
"text": "Toggle
|
|
450
|
+
"text": "Toggle popovercontainer display",
|
|
310
451
|
"tags": [{
|
|
311
452
|
"name": "param",
|
|
312
|
-
"text": "target An element with [data-
|
|
453
|
+
"text": "target An element with [data-popover-target=\"id\"] where the popovercontainer should be shown"
|
|
313
454
|
}, {
|
|
314
455
|
"name": "param",
|
|
315
456
|
"text": "force Pass true to always show or false to always hide"
|
|
@@ -320,3 +461,23 @@ export class PostPopovercontainer {
|
|
|
320
461
|
}
|
|
321
462
|
static get elementRef() { return "host"; }
|
|
322
463
|
}
|
|
464
|
+
PostPopovercontainer.STATIC_SIDES = {
|
|
465
|
+
top: 'bottom',
|
|
466
|
+
right: 'left',
|
|
467
|
+
bottom: 'top',
|
|
468
|
+
left: 'right',
|
|
469
|
+
};
|
|
470
|
+
PostPopovercontainer.PROPERTIES_TO_CLEAR = [
|
|
471
|
+
'--post-safe-space-popover-x',
|
|
472
|
+
'--post-safe-space-popover-y',
|
|
473
|
+
'--post-safe-space-popover-x-start',
|
|
474
|
+
'--post-safe-space-popover-x-end',
|
|
475
|
+
'--post-safe-space-popover-y-start',
|
|
476
|
+
'--post-safe-space-popover-y-end',
|
|
477
|
+
'--post-safe-space-trigger-x',
|
|
478
|
+
'--post-safe-space-trigger-y',
|
|
479
|
+
'--post-safe-space-trigger-x-start',
|
|
480
|
+
'--post-safe-space-trigger-x-end',
|
|
481
|
+
'--post-safe-space-trigger-y-start',
|
|
482
|
+
'--post-safe-space-trigger-y-end',
|
|
483
|
+
];
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
-
*/:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -0.25rem;border-radius:4px}.rating .star{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.active{--post-rating-star-stroke: hsl(0, 0%, 20%);--post-rating-star-fill: #fc0}.rating .star.hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.after-active{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:2px;outline:2px solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: #fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: hsl(0, 0%, 90%)}
|
|
1
|
+
@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 calc(var(--post-core-dimension-4)*-1);border-radius:4px}.rating .star{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fff;position:relative;width:2rem;height:2rem;cursor:pointer}.rating .star .stroke,.rating .star .fill{display:block;width:100%;height:100%;transition:all ease 100ms}.rating .star .stroke{position:absolute;inset:auto;z-index:1;color:var(--post-rating-star-stroke)}.rating .star .fill{margin:1px;width:calc(100% - 2px);height:calc(100% - 2px);color:var(--post-rating-star-fill)}.rating .star.before-hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.active{--post-rating-star-stroke: hsl(0, 0%, 20%);--post-rating-star-fill: #fc0}.rating .star.hover{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: #fc0}.rating .star.after-active{--post-rating-star-stroke: hsl(0, 0%, 40%);--post-rating-star-fill: hsl(0, 0%, 80%)}.rating :focus{outline:none}.rating:focus-visible{outline-offset:var(--post-core-dimension-2);outline:var(--post-core-dimension-2) solid #1976c8}.rating[aria-readonly=true] .star,.rating[aria-disabled=true] .star{cursor:default}.rating[aria-disabled=true] .star{--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: #fff}.rating[aria-disabled=true] .star.active{cursor:default;--post-rating-star-stroke: hsl(0, 0%, 60%);--post-rating-star-fill: hsl(0, 0%, 90%)}
|
|
@@ -64,7 +64,7 @@ export class PostRating {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: '4ccdf384b9a4cfc462d5d3f4a7caab659b6ba2b0', "data-version": version }, h("div", { key: '7ab53083bcdff6586b1de7f1c9e5fa546728fc6f', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
68
68
|
'star': true,
|
|
69
69
|
'before-hover': i < this.hoveredIndex,
|
|
70
70
|
'active': i < Math.round(this.currentRating),
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
.tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color
|
|
2
|
-
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
-
*/:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button}
|
|
1
|
+
.tab-title[role=tab]{display:inline-block;cursor:pointer;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);outline-color:currentColor;opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:#000}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title[role=tab]:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}.tab-title[role=tab].active{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title[role=tab].active::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title[role=tab]:focus-visible{background-color:rgba(255,255,255,.2)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title[role=tab]{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title[role=tab]:hover,.tab-title[role=tab]:focus,.tab-title[role=tab]:focus-within,.tab-title[role=tab]:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}.tab-title[role=tab].active{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title[role=tab].active::before{background-color:Highlight}}@keyframes popIn{from{transform:scale(0.9);opacity:0;transition-property:transform,opacity,overlay,display;transition-behavior:allow-discrete;transition-duration:var(--post-transition-duration, 0.35s);transition-timing-function:linear(0, 0.007, 0.029 2.2%, 0.118 4.7%, 0.625 14.4%, 0.826 19%, 0.902, 0.962, 1.008 26.1%, 1.041 28.7%, 1.064 32.1%, 1.07 36%, 1.061 40.5%, 1.015 53.4%, 0.999 61.6%, 0.995 71.2%, 1)}to{opacity:1;transform:scale(1)}}:host{display:block}.tab-title{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
import { checkNonEmpty } from "../../utils/index";
|
|
4
|
+
import { nanoid } from "nanoid";
|
|
4
5
|
/**
|
|
5
6
|
* @slot default - Slot for the content of the tab header.
|
|
6
7
|
*/
|
|
@@ -9,14 +10,14 @@ export class PostTabHeader {
|
|
|
9
10
|
this.tabId = undefined;
|
|
10
11
|
this.panel = undefined;
|
|
11
12
|
}
|
|
12
|
-
validateFor(
|
|
13
|
-
checkNonEmpty(
|
|
13
|
+
validateFor() {
|
|
14
|
+
checkNonEmpty(this, 'panel');
|
|
14
15
|
}
|
|
15
16
|
componentWillLoad() {
|
|
16
|
-
this.tabId = `tab-${this.host.id ||
|
|
17
|
+
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
17
18
|
}
|
|
18
19
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '5046c46fa27fd6586c694420abf197b227b56520', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '78c2f660e4f2307ca95a63f4cfd90d08cc6942df' })));
|
|
20
21
|
}
|
|
21
22
|
static get is() { return "post-tab-header"; }
|
|
22
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -52,7 +53,7 @@ export class PostTabHeader {
|
|
|
52
53
|
"text": "The name of the panel controlled by the tab header."
|
|
53
54
|
},
|
|
54
55
|
"attribute": "panel",
|
|
55
|
-
"reflect":
|
|
56
|
+
"reflect": true
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
3
4
|
/**
|
|
4
5
|
* @slot default - Slot for placing the content of the tab panel.
|
|
5
6
|
*/
|
|
@@ -10,10 +11,10 @@ export class PostTabPanel {
|
|
|
10
11
|
}
|
|
11
12
|
componentWillLoad() {
|
|
12
13
|
// get the id set on the host element or use a random id by default
|
|
13
|
-
this.panelId = `panel-${this.host.id ||
|
|
14
|
+
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
14
15
|
}
|
|
15
16
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '98427b35c6637af65930b69b75ea56facf044000', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '4fa02667e8ff088c10122e010cfd7efe8ff3af57' })));
|
|
17
18
|
}
|
|
18
19
|
static get is() { return "post-tab-panel"; }
|
|
19
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,7 +45,7 @@ export class PostTabPanel {
|
|
|
44
45
|
"text": "The name of the panel, used to associate it with a tab header."
|
|
45
46
|
},
|
|
46
47
|
"attribute": "name",
|
|
47
|
-
"reflect":
|
|
48
|
+
"reflect": true
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(
|
|
1
|
+
.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(0,0,0,.02)}.tabs-wrapper::after{content:"";position:absolute;bottom:0;width:100%;height:1px;background-color:#ccc}.tabs-wrapper .tabs{background-color:rgba(0,0,0,0) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tabs-wrapper::after{background-color:ButtonBorder}}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}.tabs::after{content:"";display:block;flex:1 0 auto;width:1rem}.tab-content{padding-top:1rem}:host{display:block}
|
|
@@ -17,10 +17,9 @@ export class PostTabs {
|
|
|
17
17
|
return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
18
18
|
}
|
|
19
19
|
componentDidLoad() {
|
|
20
|
-
var _a;
|
|
21
20
|
this.moveMisplacedTabs();
|
|
22
21
|
this.enableTabs();
|
|
23
|
-
const initiallyActivePanel = this.activePanel ||
|
|
22
|
+
const initiallyActivePanel = this.activePanel || this.tabs[0]?.panel;
|
|
24
23
|
void this.show(initiallyActivePanel);
|
|
25
24
|
this.isLoaded = true;
|
|
26
25
|
}
|
|
@@ -29,9 +28,8 @@ export class PostTabs {
|
|
|
29
28
|
* Any other panel that was previously shown becomes hidden and its associated tab is unselected.
|
|
30
29
|
*/
|
|
31
30
|
async show(panelName) {
|
|
32
|
-
var _a;
|
|
33
31
|
// do nothing if the tab is already active
|
|
34
|
-
if (panelName ===
|
|
32
|
+
if (panelName === this.activeTab?.panel) {
|
|
35
33
|
return;
|
|
36
34
|
}
|
|
37
35
|
const previousTab = this.activeTab;
|
|
@@ -65,7 +63,6 @@ export class PostTabs {
|
|
|
65
63
|
});
|
|
66
64
|
}
|
|
67
65
|
enableTabs() {
|
|
68
|
-
var _a;
|
|
69
66
|
if (!this.tabs)
|
|
70
67
|
return;
|
|
71
68
|
this.tabs.forEach(async (tab) => {
|
|
@@ -92,7 +89,7 @@ export class PostTabs {
|
|
|
92
89
|
});
|
|
93
90
|
// if the currently active tab was removed from the DOM then select the first one
|
|
94
91
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
95
|
-
void this.show(
|
|
92
|
+
void this.show(this.tabs[0]?.panel);
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
activateTab(tab) {
|
|
@@ -144,7 +141,7 @@ export class PostTabs {
|
|
|
144
141
|
nextTab.focus();
|
|
145
142
|
}
|
|
146
143
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
144
|
+
return (h(Host, { key: 'dae24eee55a75f9b825f590883a9c1e896c1e9fc', "data-version": version }, h("div", { key: '0a26de80b8267ddc30455b0b5afbf10ae521232b', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '826cb0a4355eeb5ddc07288e1e68fc72785c095f', class: "tabs", role: "tablist" }, h("slot", { key: '94ce90bc3dc8ff4b5012fcfa3c0039b188c14002', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: '462f80f3368431344910cc317f1c0f42112dc99a', class: "tab-content", part: "content" }, h("slot", { key: '57a80ac790ca75f3b62382994c21a3a3c78004cc', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
148
145
|
}
|
|
149
146
|
static get is() { return "post-tabs"; }
|
|
150
147
|
static get encapsulation() { return "shadow"; }
|
|
@@ -196,14 +193,9 @@ export class PostTabs {
|
|
|
196
193
|
"text": "An event emitted after the active tab changes, when the fade in transition of its associated panel is finished.\nThe payload is the name of the newly shown panel."
|
|
197
194
|
},
|
|
198
195
|
"complexType": {
|
|
199
|
-
"original": "
|
|
196
|
+
"original": "string",
|
|
200
197
|
"resolved": "string",
|
|
201
|
-
"references": {
|
|
202
|
-
"HTMLPostTabPanelElement": {
|
|
203
|
-
"location": "global",
|
|
204
|
-
"id": "global::HTMLPostTabPanelElement"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
198
|
+
"references": {}
|
|
207
199
|
}
|
|
208
200
|
}];
|
|
209
201
|
}
|