@swisspost/design-system-components 9.0.0-next.0 → 9.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/check-type-64af82a9.js +16 -0
- package/dist/cjs/check-url-3ffdd2fb.js +14 -0
- package/dist/cjs/debounce-1151afe3.js +12 -0
- package/dist/cjs/get-root-7a3498ef.js +11 -0
- package/dist/cjs/{index-01f30442.js → index-5d4e0aed.js} +4 -27
- package/dist/cjs/{index-c15bd800.js → index-f1b08cdb.js} +45 -16
- package/dist/cjs/index.browser-2f65f583.js +15 -0
- package/dist/cjs/index.cjs.js +51 -24
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-ebef502e.js → package-aaec3cba.js} +1 -1
- package/dist/cjs/{post-accordion-677c6891.js → post-accordion-85bf5e0a.js} +13 -11
- package/dist/cjs/post-accordion-item-957b3464.js +64 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +7 -4
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/post-avatar-58540591.js +148 -0
- package/dist/cjs/post-avatar.cjs.entry.js +13 -0
- package/dist/cjs/post-back-to-top-db5c7d01.js +75 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
- package/dist/cjs/post-banner-727866d5.js +91 -0
- package/dist/cjs/post-banner.cjs.entry.js +19 -0
- package/dist/cjs/post-breadcrumb-cacca682.js +111 -0
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
- package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-f5d72ddc.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +34 -0
- package/dist/cjs/{post-collapsible-trigger-4f44ca4a.js → post-collapsible-trigger-067d1f4c.js} +14 -26
- package/dist/cjs/post-collapsible_2.cjs.entry.js +8 -4
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-beeb36c8.js +84 -0
- package/dist/cjs/post-footer.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-e0e214b9.js +69 -0
- package/dist/cjs/post-popover-7acbdf17.js +104 -0
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-ac9e71aa.js → post-rating-ac1b9b3c.js} +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-a3d28719.js +33 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
- package/dist/cjs/{post-tab-panel-787bcd5d.js → post-tab-panel-4562e265.js} +5 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-1b7aad55.js → post-tabs-80f65e1d.js} +9 -7
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tag-5741a78d.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-popovercontainer-322d3160.js → post-togglebutton-245e33f1.js} +1082 -21
- package/dist/cjs/{post-tooltip-d1d2cd3a.js → post-tooltip-cefce5e1.js} +46 -15
- package/dist/cjs/post-tooltip.cjs.entry.js +6 -4
- package/dist/cjs/slide-5d51abe8.js +28 -0
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +21 -3
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +12 -10
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +28 -12
- package/dist/collection/components/post-avatar/post-avatar.css +3 -0
- package/dist/collection/components/post-avatar/post-avatar.js +237 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +107 -0
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +3 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +41 -69
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +161 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +93 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -29
- package/dist/collection/components/post-card-control/post-card-control.js +8 -8
- package/dist/collection/components/post-closebutton/post-closebutton.js +12 -0
- package/dist/collection/components/post-collapsible/post-collapsible.js +5 -3
- package/dist/collection/components/post-footer/post-footer.css +1 -0
- package/dist/collection/components/post-footer/post-footer.js +75 -0
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +172 -0
- package/dist/collection/components/post-icon/post-icon.js +22 -30
- package/dist/collection/components/post-language-option/post-language-option.css +3 -0
- package/dist/collection/components/post-language-option/post-language-option.js +219 -0
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
- package/dist/collection/components/post-language-switch/post-language-switch.js +163 -0
- package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
- package/dist/collection/components/post-list/post-list.css +3 -0
- package/dist/collection/components/post-list/post-list.js +88 -0
- package/dist/collection/components/post-list-item/post-list-item.css +1 -0
- package/dist/collection/components/post-list-item/post-list-item.js +25 -0
- package/dist/collection/components/post-logo/post-logo.js +2 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +52 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +158 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +104 -0
- package/dist/collection/components/post-menu/post-menu.css +3 -0
- package/dist/collection/components/post-menu/post-menu.js +280 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +114 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -29
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +26 -6
- package/dist/collection/components/post-rating/post-rating.css +1 -29
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -29
- package/dist/collection/components/post-tab-header/post-tab-header.js +3 -2
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +3 -2
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -4
- package/dist/collection/components/post-tag/post-tag.css +1 -29
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +74 -0
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +51 -9
- package/dist/collection/index.js +20 -2
- package/dist/collection/utils/breakpoints.js +46 -0
- package/dist/collection/utils/get-focusable-children.js +27 -0
- package/dist/components/debounce.js +10 -0
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.browser.js +13 -0
- package/dist/components/index.js +20 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +34 -14
- package/dist/components/post-accordion2.js +11 -9
- package/dist/components/post-avatar.d.ts +11 -0
- package/dist/components/post-avatar.js +6 -0
- package/dist/components/post-avatar2.js +173 -0
- package/dist/components/post-back-to-top.d.ts +11 -0
- package/dist/components/post-back-to-top.js +6 -0
- package/dist/components/post-back-to-top2.js +100 -0
- package/dist/components/post-banner.d.ts +11 -0
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +126 -0
- package/dist/components/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/post-breadcrumb-item.js +6 -0
- package/dist/components/post-breadcrumb-item2.js +82 -0
- package/dist/components/post-breadcrumb.d.ts +11 -0
- package/dist/components/post-breadcrumb.js +6 -0
- package/dist/components/post-breadcrumb2.js +168 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-closebutton.d.ts +11 -0
- package/dist/components/post-closebutton.js +6 -0
- package/dist/components/post-closebutton2.js +34 -0
- package/dist/components/post-collapsible-trigger2.js +2 -17
- package/dist/components/post-collapsible2.js +6 -4
- package/dist/components/post-footer.d.ts +11 -0
- package/dist/components/post-footer.js +6 -0
- package/dist/components/post-footer2.js +124 -0
- package/dist/components/post-header.d.ts +11 -0
- package/dist/components/post-header.js +6 -0
- package/dist/components/post-header2.js +279 -0
- package/dist/components/post-icon2.js +24 -28
- package/dist/components/post-language-option.d.ts +11 -0
- package/dist/components/post-language-option.js +6 -0
- package/dist/components/post-language-option2.js +98 -0
- package/dist/components/post-language-switch.d.ts +11 -0
- package/dist/components/post-language-switch.js +6 -0
- package/dist/components/post-language-switch2.js +135 -0
- package/dist/components/post-list-item.d.ts +11 -0
- package/dist/components/post-list-item.js +6 -0
- package/dist/components/post-list-item2.js +35 -0
- package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/dist/components/post-list.js +6 -0
- package/dist/components/post-list2.js +54 -0
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +48 -0
- package/dist/components/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/post-megadropdown-trigger.js +6 -0
- package/dist/components/post-megadropdown-trigger2.js +91 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +100 -0
- package/dist/components/post-menu-item.d.ts +11 -0
- package/dist/components/post-menu-item.js +6 -0
- package/dist/components/post-menu-item2.js +27 -0
- package/dist/components/post-menu-trigger.d.ts +11 -0
- package/dist/components/post-menu-trigger.js +6 -0
- package/dist/components/post-menu-trigger2.js +102 -0
- package/dist/components/post-menu.d.ts +11 -0
- package/dist/components/post-menu.js +6 -0
- package/dist/components/post-menu2.js +204 -0
- package/dist/components/post-popover2.js +2 -2
- package/dist/components/post-popovercontainer2.js +10 -7
- package/dist/components/post-rating2.js +2 -2
- package/dist/components/post-tab-header2.js +4 -3
- package/dist/components/post-tab-panel2.js +3 -2
- package/dist/components/post-tabs2.js +7 -5
- package/dist/components/post-tag2.js +2 -2
- package/dist/components/post-togglebutton.d.ts +11 -0
- package/dist/components/post-togglebutton.js +6 -0
- package/dist/components/post-togglebutton2.js +61 -0
- package/dist/components/post-tooltip2.js +44 -13
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +1836 -236
- package/dist/esm/check-type-8828dbe4.js +14 -0
- package/dist/esm/check-url-a974431e.js +12 -0
- package/dist/esm/debounce-abe98cc2.js +10 -0
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/{index-0b56fc28.js → index-6bfe6554.js} +45 -16
- package/dist/esm/index-b49c9904.js +24 -0
- package/dist/esm/index.browser-51485f85.js +13 -0
- package/dist/esm/index.js +28 -19
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-2ee42825.js +3 -0
- package/dist/esm/{post-accordion-19ca8bf9.js → post-accordion-3bf30525.js} +13 -11
- package/dist/esm/post-accordion-item-6683fbed.js +62 -0
- package/dist/esm/post-accordion-item.entry.js +7 -4
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/post-avatar-3ddb4c79.js +146 -0
- package/dist/esm/post-avatar.entry.js +5 -0
- package/dist/esm/post-back-to-top-15ee2771.js +73 -0
- package/dist/esm/post-back-to-top.entry.js +7 -0
- package/dist/esm/post-banner-fc407f6e.js +89 -0
- package/dist/esm/post-banner.entry.js +11 -0
- package/dist/esm/post-breadcrumb-6252b112.js +109 -0
- package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
- package/dist/esm/post-breadcrumb.entry.js +5 -0
- package/dist/esm/post-card-control-cb3dfc60.js +270 -0
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-closebutton_15.entry.js +12 -0
- package/dist/esm/{post-collapsible-trigger-8f54e5b6.js → post-collapsible-trigger-b727bf7e.js} +11 -23
- package/dist/esm/post-collapsible_2.entry.js +8 -4
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-7a03a9bb.js +82 -0
- package/dist/esm/post-footer.entry.js +3 -0
- package/dist/esm/post-menu-item-3e168ecd.js +66 -0
- package/dist/esm/post-popover-bff5cffd.js +102 -0
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-8e22d522.js → post-rating-ce595a65.js} +4 -4
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-c864586f.js +31 -0
- package/dist/esm/post-tab-header.entry.js +4 -3
- package/dist/esm/{post-tab-panel-b9605846.js → post-tab-panel-800425b8.js} +5 -4
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-fb024b14.js → post-tabs-e5aa8b08.js} +9 -7
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tag-fc3df50a.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-popovercontainer-17d2b256.js → post-togglebutton-101dd3bd.js} +1069 -22
- package/dist/esm/{post-tooltip-02e413ba.js → post-tooltip-e8484aea.js} +46 -15
- package/dist/esm/post-tooltip.entry.js +6 -4
- package/dist/esm/slide-3422b8a3.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-02bb5231.js +1 -0
- package/dist/post-components/p-0e216cc4.js +2 -0
- package/dist/post-components/p-11880d55.js +1 -0
- package/dist/post-components/p-1489d777.entry.js +1 -0
- package/dist/post-components/p-19707347.entry.js +1 -0
- package/dist/post-components/{p-ec1f1966.js → p-1d3acbfd.js} +1 -1
- package/dist/post-components/p-24476696.js +1 -0
- package/dist/post-components/p-25f6efab.entry.js +1 -0
- package/dist/post-components/p-27ad2d1f.js +1 -0
- package/dist/post-components/p-29626238.entry.js +1 -0
- package/dist/post-components/p-339488ba.entry.js +1 -0
- package/dist/post-components/p-3de1151e.js +1 -0
- package/dist/post-components/p-413d1fff.js +1 -0
- package/dist/post-components/p-47095b84.entry.js +1 -0
- package/dist/post-components/p-4a3f67ab.js +1 -0
- package/dist/post-components/p-515e0f96.js +1 -0
- package/dist/post-components/p-5467b223.js +1 -0
- package/dist/post-components/p-5959f2bd.js +1 -0
- package/dist/post-components/p-5b0703a4.entry.js +1 -0
- package/dist/post-components/p-618b8929.js +1 -0
- package/dist/post-components/p-66c8d0a2.entry.js +1 -0
- package/dist/post-components/p-6e6e5447.entry.js +1 -0
- package/dist/post-components/p-80b282a2.js +1 -0
- package/dist/post-components/p-86a1ad40.js +1 -0
- package/dist/post-components/p-97647d03.entry.js +1 -0
- package/dist/post-components/p-98f1d284.js +1 -0
- package/dist/post-components/p-9e287cb5.js +1 -0
- package/dist/post-components/p-a3694196.js +1 -0
- package/dist/post-components/p-adc79d26.entry.js +1 -0
- package/dist/post-components/p-b22656b1.js +1 -0
- package/dist/post-components/p-bcf94111.entry.js +1 -0
- package/dist/post-components/p-bd87a2b5.entry.js +1 -0
- package/dist/post-components/p-bec07e51.js +1 -0
- package/dist/post-components/p-bec09df9.entry.js +1 -0
- package/dist/post-components/p-d1d9c9a5.js +1 -0
- package/dist/post-components/p-d4f93f2b.js +1 -0
- package/dist/post-components/p-db2ac0a2.entry.js +1 -0
- package/dist/post-components/p-e93a4bd0.entry.js +1 -0
- package/dist/post-components/p-eed26f43.js +1 -0
- package/dist/post-components/p-f35d5d4a.entry.js +1 -0
- package/dist/post-components/p-fa6c79b8.entry.js +1 -0
- package/dist/post-components/{p-e387c0c9.js → p-faf15ec1.js} +3 -3
- package/dist/post-components/p-fc09ac69.js +1 -0
- package/dist/post-components/p-fc91cbc2.js +1 -0
- package/dist/post-components/p-ffcd735f.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/slide.d.ts +2 -0
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +7 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
- package/dist/types/components/post-banner/banner-types.d.ts +2 -0
- package/dist/types/components/post-banner/post-banner.d.ts +49 -0
- package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +16 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
- package/dist/types/components/post-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +33 -0
- package/dist/types/components/post-icon/post-icon.d.ts +3 -6
- package/dist/types/components/post-language-option/post-language-option.d.ts +45 -0
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +31 -0
- package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
- package/dist/types/components/post-list/post-list.d.ts +24 -0
- package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
- package/dist/types/components/post-logo/post-logo.d.ts +1 -1
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +19 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +36 -0
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +25 -0
- package/dist/types/components/post-menu/post-menu.d.ts +48 -0
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +27 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +4 -0
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -1
- package/dist/types/components.d.ts +574 -47
- package/dist/types/index.d.ts +20 -2
- package/dist/types/utils/breakpoints.d.ts +11 -0
- package/dist/types/utils/get-focusable-children.d.ts +1 -0
- package/dist/types/utils/get-root.d.ts +1 -1
- package/loaders/debounce.js +10 -0
- package/loaders/get-root.js +9 -0
- package/loaders/index.browser.js +13 -0
- package/loaders/index.d.ts +38 -2
- package/loaders/index.js +20 -2
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -81
- package/loaders/post-accordion-item2.js +103 -0
- package/loaders/post-accordion.js +11 -9
- package/loaders/post-avatar.d.ts +11 -0
- package/loaders/post-avatar.js +176 -0
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +103 -0
- package/loaders/post-banner.d.ts +11 -0
- package/loaders/post-banner.js +129 -0
- package/loaders/post-breadcrumb-item.d.ts +11 -0
- package/loaders/post-breadcrumb-item.js +6 -0
- package/loaders/post-breadcrumb-item2.js +82 -0
- package/loaders/post-breadcrumb.d.ts +11 -0
- package/loaders/post-breadcrumb.js +171 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-closebutton.d.ts +11 -0
- package/loaders/post-closebutton.js +37 -0
- package/loaders/post-collapsible-trigger2.js +2 -17
- package/loaders/post-collapsible2.js +5 -3
- package/loaders/post-footer.d.ts +11 -0
- package/loaders/post-footer.js +127 -0
- package/loaders/post-header.d.ts +11 -0
- package/loaders/post-header.js +282 -0
- package/loaders/post-icon2.js +24 -28
- package/loaders/post-language-option.d.ts +11 -0
- package/loaders/post-language-option.js +101 -0
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +138 -0
- package/loaders/post-list-item.d.ts +11 -0
- package/loaders/post-list-item.js +38 -0
- package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/loaders/post-list.js +57 -0
- package/loaders/post-logo.js +3 -3
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +51 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +94 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +103 -0
- package/loaders/post-menu-item.d.ts +11 -0
- package/loaders/post-menu-item.js +6 -0
- package/loaders/post-menu-item2.js +27 -0
- package/loaders/post-menu-trigger.d.ts +11 -0
- package/loaders/post-menu-trigger.js +6 -0
- package/loaders/post-menu-trigger2.js +102 -0
- package/loaders/post-menu.d.ts +11 -0
- package/loaders/post-menu.js +6 -0
- package/loaders/post-menu2.js +204 -0
- package/loaders/post-popover.js +2 -2
- package/loaders/post-popovercontainer2.js +10 -7
- package/loaders/post-rating.js +2 -2
- package/loaders/post-tab-header.js +4 -3
- package/loaders/post-tab-panel.js +3 -2
- package/loaders/post-tabs.js +7 -5
- package/loaders/post-tag.js +2 -2
- package/loaders/post-togglebutton.d.ts +11 -0
- package/loaders/post-togglebutton.js +64 -0
- package/loaders/post-tooltip.js +43 -12
- package/loaders/slide.js +25 -0
- package/package.json +9 -6
- package/dist/cjs/post-accordion-item-8d1d6c81.js +0 -51
- package/dist/cjs/post-alert-ea75de0d.js +0 -98
- package/dist/cjs/post-alert.cjs.entry.js +0 -16
- package/dist/cjs/post-card-control-51ee3823.js +0 -272
- package/dist/cjs/post-icon-dc878de4.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-logo-da45aef5.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popover-aac764c7.js +0 -104
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-3baf22e0.js +0 -32
- package/dist/cjs/post-tag-e4bcdb75.js +0 -47
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -35
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/index-f41b763f.js +0 -46
- package/dist/esm/package-a8cae03d.js +0 -3
- package/dist/esm/post-accordion-item-3232ff67.js +0 -49
- package/dist/esm/post-alert-2636c0e2.js +0 -96
- package/dist/esm/post-alert.entry.js +0 -8
- package/dist/esm/post-card-control-0844cad9.js +0 -270
- package/dist/esm/post-icon-1a682b9e.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-logo-904c4701.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popover-14d083d4.js +0 -102
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-96287c94.js +0 -30
- package/dist/esm/post-tag-58311692.js +0 -45
- package/dist/post-components/p-04e79a2c.entry.js +0 -1
- package/dist/post-components/p-05794f1f.entry.js +0 -1
- package/dist/post-components/p-079c7726.js +0 -1
- package/dist/post-components/p-10b043fc.js +0 -1
- package/dist/post-components/p-1c63cb03.js +0 -1
- package/dist/post-components/p-2e7cc4c6.entry.js +0 -1
- package/dist/post-components/p-370edca6.js +0 -1
- package/dist/post-components/p-3c3e8b19.js +0 -1
- package/dist/post-components/p-429b886d.js +0 -1
- package/dist/post-components/p-44564a68.js +0 -1
- package/dist/post-components/p-47420c6f.entry.js +0 -1
- package/dist/post-components/p-4973d1c7.entry.js +0 -1
- package/dist/post-components/p-6007889b.entry.js +0 -1
- package/dist/post-components/p-69bcb15f.entry.js +0 -1
- package/dist/post-components/p-771bd293.js +0 -1
- package/dist/post-components/p-8c0372c2.entry.js +0 -1
- package/dist/post-components/p-92ce53bc.entry.js +0 -1
- package/dist/post-components/p-991dff03.entry.js +0 -1
- package/dist/post-components/p-a0b62b51.js +0 -1
- package/dist/post-components/p-a2fa8c1d.entry.js +0 -1
- package/dist/post-components/p-ab6ce1d7.js +0 -1
- package/dist/post-components/p-b96307d5.entry.js +0 -1
- package/dist/post-components/p-d2f9de94.js +0 -2
- package/dist/post-components/p-de2ce222.js +0 -1
- package/dist/post-components/p-deb4131c.js +0 -1
- package/dist/post-components/p-e37ff727.entry.js +0 -1
- package/dist/post-components/p-eb3f324e.entry.js +0 -1
- package/dist/post-components/p-ee8845de.js +0 -1
- package/dist/post-components/p-fb1fb618.entry.js +0 -1
- package/dist/post-components/p-fbc24b84.js +0 -1
- package/dist/post-components/p-ff12fd7a.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
|
@@ -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
|
*/
|
|
@@ -13,10 +14,10 @@ export class PostTabHeader {
|
|
|
13
14
|
checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
|
|
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: '9b12878498f63da83113c081f81a749b4ee47ef4', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '3a2e7f3657110d707b49af911e9dd3a4ef323e36' })));
|
|
20
21
|
}
|
|
21
22
|
static get is() { return "post-tab-header"; }
|
|
22
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '9e8f9c5dc0c1c3d1b7e63cbb9e9cbb0cf116da9b', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '3ece42346845324cfa0fb9af5721efab2b71e2f1' })));
|
|
17
18
|
}
|
|
18
19
|
static get is() { return "post-tab-panel"; }
|
|
19
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 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{
|
|
1
|
+
.tabs-wrapper{position:relative;padding-top:1rem;border:0;background-color:rgba(var(--post-contrast-color-rgb), 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}
|
|
@@ -14,12 +14,13 @@ export class PostTabs {
|
|
|
14
14
|
this.activePanel = undefined;
|
|
15
15
|
}
|
|
16
16
|
get tabs() {
|
|
17
|
-
return this.host.querySelectorAll('post-tab-header');
|
|
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;
|
|
20
21
|
this.moveMisplacedTabs();
|
|
21
22
|
this.enableTabs();
|
|
22
|
-
const initiallyActivePanel = this.activePanel || this.tabs
|
|
23
|
+
const initiallyActivePanel = this.activePanel || ((_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.panel);
|
|
23
24
|
void this.show(initiallyActivePanel);
|
|
24
25
|
this.isLoaded = true;
|
|
25
26
|
}
|
|
@@ -64,6 +65,7 @@ export class PostTabs {
|
|
|
64
65
|
});
|
|
65
66
|
}
|
|
66
67
|
enableTabs() {
|
|
68
|
+
var _a;
|
|
67
69
|
if (!this.tabs)
|
|
68
70
|
return;
|
|
69
71
|
this.tabs.forEach(async (tab) => {
|
|
@@ -90,7 +92,7 @@ export class PostTabs {
|
|
|
90
92
|
});
|
|
91
93
|
// if the currently active tab was removed from the DOM then select the first one
|
|
92
94
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
93
|
-
void this.show(this.tabs
|
|
95
|
+
void this.show((_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.panel);
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
activateTab(tab) {
|
|
@@ -142,7 +144,7 @@ export class PostTabs {
|
|
|
142
144
|
nextTab.focus();
|
|
143
145
|
}
|
|
144
146
|
render() {
|
|
145
|
-
return (h(Host, { key: '
|
|
147
|
+
return (h(Host, { key: '27b5f90f8b6d8f0d3688b3c965fa666df5f8edab', "data-version": version }, h("div", { key: '4d811e26c2bed4abc63e89517dca0f6fd9f701c3', class: "tabs-wrapper", part: "tabs" }, h("div", { key: 'd740301189c1335c3d76520d6a5bfe3e75789d4a', class: "tabs", role: "tablist" }, h("slot", { key: '9b3dc7e7d05b8577dfb480d684cf423a8adc2a23', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'fe219c0eaad3c67bea5a47f0690a8bdda0c739aa', class: "tab-content", part: "content" }, h("slot", { key: '80d8eb9fe9292e4c2486fded48928ffc9c5219bf', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
146
148
|
}
|
|
147
149
|
static get is() { return "post-tabs"; }
|
|
148
150
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,31 +1,3 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Bootstrap Utilities v5.1.3 (https://getbootstrap.com/)
|
|
3
|
-
* Copyright 2011-2021 The Bootstrap Authors
|
|
4
|
-
* Copyright 2011-2021 Twitter, Inc.
|
|
5
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6
|
-
|
|
7
|
-
* The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
* Copyright (c) 2011-2020 Twitter, Inc.
|
|
10
|
-
* Copyright (c) 2011-2020 The Bootstrap Authors
|
|
11
|
-
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in
|
|
20
|
-
* all copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28
|
-
* THE SOFTWARE.
|
|
29
|
-
*//*!
|
|
30
2
|
* Copyright 2021 by Swiss Post, Information Technology
|
|
31
|
-
*/.tag,.tag:where(:has(:not(pre))){--post-tag-bg: hsl(0, 0%, 90%);--post-tag-fg: #000;display:inline-flex;align-items:center;gap
|
|
3
|
+
*/.tag,.tag:where(:has(:not(pre))){--post-tag-bg: hsl(0, 0%, 90%);--post-tag-fg: #000;display:inline-flex;align-items:center;gap:var(--post-core-dimension-4);padding:0 var(--post-core-dimension-8);max-width:100%;background-color:var(--post-tag-bg);border:var(--post-core-dimension-1) solid rgba(0,0,0,0);border-radius:var(--post-core-dimension-4);font-size:1rem;line-height:calc(var(--post-core-dimension-32) - var(--post-core-dimension-1)*2);white-space:nowrap;color:var(--post-tag-fg)}.tag post-icon,.tag:where(:has(:not(pre))) post-icon{flex:0 0 auto;width:1.25rem;height:1.25rem}.tag .tag-text,.tag:where(:has(:not(pre))) .tag-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tag .tag-text svg,.tag .tag-text img,.tag:where(:has(:not(pre))) .tag-text svg,.tag:where(:has(:not(pre))) .tag-text img{display:inline-block;height:1.25rem !important;vertical-align:text-top}.tag.tag-sm,.tag:where(:has(:not(pre))).tag-sm{line-height:var(--post-core-dimension-24)}.tag.tag-sm .tag-icon,.tag:where(:has(:not(pre))).tag-sm .tag-icon{width:1rem;height:1rem}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{--post-tag-bg: #fff;--post-tag-fg: #000}.tag.tag-yellow,.tag:where(:has(:not(pre))).tag-yellow{--post-tag-bg: #fc0;--post-tag-fg: #000}.tag.tag-success,.tag:where(:has(:not(pre))).tag-success{--post-tag-bg: #2c871d;--post-tag-fg: #fff}.tag.tag-warning,.tag:where(:has(:not(pre))).tag-warning{--post-tag-bg: #f49e00;--post-tag-fg: #000}.tag.tag-danger,.tag:where(:has(:not(pre))).tag-danger{--post-tag-bg: #a51728;--post-tag-fg: #fff}.tag.tag-info,.tag:where(:has(:not(pre))).tag-info{--post-tag-bg: #cce4ee;--post-tag-fg: #000}.tag.tag-white,.tag:where(:has(:not(pre))).tag-white{border-color:var(--post-contrast-color)}pre .tag,pre .tag:where(:has(:not(pre))){display:inline;padding:initial;max-width:initial;background:initial;border:initial;border-radius:initial;font-size:inherit;line-height:inherit;white-space:unset}*,*:before,*:after{box-sizing:border-box}.tag-text ::slotted(svg),.tag-text ::slotted(img){display:inline-block !important;height:1.25rem !important;vertical-align:text-top !important}
|
|
@@ -30,7 +30,7 @@ export class PostTag {
|
|
|
30
30
|
this.setClasses();
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: 'cda93c397ec81e289c843eaae7694bbba6f3c297', "data-version": version }, h("div", { key: '7fa71d9c0ca5393bc188e5e09107ec931943ed66', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '8d36933c00910e9f36759d101f43b628c0fbf185', class: "tag-text" }, h("slot", { key: '49e2e9dd66cb85df4615c512d8dc0d7cad6606b8' })))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "post-tag"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -93,7 +93,7 @@ export class PostTag {
|
|
|
93
93
|
"optional": false,
|
|
94
94
|
"docs": {
|
|
95
95
|
"tags": [],
|
|
96
|
-
"text": "Defines the icon `name` inside of the component.\n<span className=\"
|
|
96
|
+
"text": "Defines the icon `name` inside of the component.\n<span className=\"banner banner-sm banner-info\">If not set the icon will not show up.</span>\nTo learn which icons are available, please visit our <a href=\"/?path=/docs/5704bdc4-c5b5-45e6-b123-c54d01fce2f1--docs\">icon library</a>."
|
|
97
97
|
},
|
|
98
98
|
"attribute": "icon",
|
|
99
99
|
"reflect": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{cursor:pointer;outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { checkType } from "../../utils/index";
|
|
4
|
+
/**
|
|
5
|
+
* @slot default - Slot for the content of the button.
|
|
6
|
+
*/
|
|
7
|
+
export class PostTogglebutton {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.handleClick = () => {
|
|
10
|
+
this.toggled = !this.toggled;
|
|
11
|
+
};
|
|
12
|
+
this.handleKeydown = (event) => {
|
|
13
|
+
// perform a click when enter or spaced are pressed to mimic the button behavior
|
|
14
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
15
|
+
event.preventDefault(); // prevents the page from scrolling when space is pressed
|
|
16
|
+
this.host.click();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
this.toggled = false;
|
|
20
|
+
}
|
|
21
|
+
validateToggled(value = this.toggled) {
|
|
22
|
+
checkType(value, 'boolean', 'The "toggled" property of the post-togglebutton must be a boolean.');
|
|
23
|
+
}
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.validateToggled();
|
|
26
|
+
// add event listener to not override listener that might be set on the host
|
|
27
|
+
this.host.addEventListener('click', () => this.handleClick());
|
|
28
|
+
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (h(Host, { key: '461f72ebada75a99921b7a166f67f2547aa6465e', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: 'cd5f4cc4df687cceacb3ea6c125b7b62f01b2712' })));
|
|
32
|
+
}
|
|
33
|
+
static get is() { return "post-togglebutton"; }
|
|
34
|
+
static get encapsulation() { return "shadow"; }
|
|
35
|
+
static get originalStyleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["post-togglebutton.scss"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get styleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["post-togglebutton.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get properties() {
|
|
46
|
+
return {
|
|
47
|
+
"toggled": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"mutable": true,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "boolean",
|
|
52
|
+
"resolved": "boolean",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": "If `true`, the button is in the \"on\" state, otherwise it is in the \"off\" state."
|
|
60
|
+
},
|
|
61
|
+
"attribute": "toggled",
|
|
62
|
+
"reflect": false,
|
|
63
|
+
"defaultValue": "false"
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
static get elementRef() { return "host"; }
|
|
68
|
+
static get watchers() {
|
|
69
|
+
return [{
|
|
70
|
+
"propName": "toggled",
|
|
71
|
+
"methodName": "validateToggled"
|
|
72
|
+
}];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:
|
|
1
|
+
post-popovercontainer{padding:var(--post-core-dimension-4) var(--post-core-dimension-8);max-width:calc(2*var(--post-core-dimension-112) - var(--post-core-dimension-8));min-height:var(--post-core-dimension-16)}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}
|
|
@@ -3,7 +3,7 @@ import { version } from "../../../../package";
|
|
|
3
3
|
import isFocusable from "ally.js/is/focusable";
|
|
4
4
|
import "long-press-event";
|
|
5
5
|
import { getAttributeObserver } from "../../utils/attribute-observer";
|
|
6
|
-
import { checkEmptyOrType
|
|
6
|
+
import { checkEmptyOrType } from "../../utils/index";
|
|
7
7
|
const OPEN_DELAY = 650; // matches HTML title delay
|
|
8
8
|
/**
|
|
9
9
|
* @slot default - Slot for the content of the tooltip.
|
|
@@ -15,21 +15,32 @@ let tooltipInstances = 0;
|
|
|
15
15
|
let hideTooltipTimeout = null;
|
|
16
16
|
const tooltipTargetAttribute = 'data-tooltip-target';
|
|
17
17
|
const tooltipTargetAttributeSelector = `[${tooltipTargetAttribute}]`;
|
|
18
|
+
let globalCurrentTarget;
|
|
19
|
+
let tooltipTimeout = null;
|
|
18
20
|
/**
|
|
19
21
|
* Global event listener to show tooltips. This is globalized so that triggers that are rendered
|
|
20
22
|
* async will still work without the need to set listeners on the element itself
|
|
23
|
+
*
|
|
24
|
+
* This handler manages both pointer and focus events to properly trigger tooltips.
|
|
25
|
+
* If the event is a focus event (e.g., keyboard navigation), pointer events are ignored to avoid
|
|
26
|
+
* interference with tooltip behavior.
|
|
21
27
|
* @param e Event
|
|
22
28
|
* @returns
|
|
23
29
|
*/
|
|
24
30
|
const globalInterestHandler = (e) => {
|
|
25
31
|
const targetElement = e.target.closest(tooltipTargetAttributeSelector);
|
|
26
|
-
|
|
32
|
+
globalCurrentTarget = targetElement;
|
|
33
|
+
if (!targetElement || !('getAttribute' in targetElement)) {
|
|
34
|
+
clearTimeout(tooltipTimeout);
|
|
27
35
|
return;
|
|
36
|
+
}
|
|
28
37
|
const tooltipTarget = targetElement.getAttribute(tooltipTargetAttribute);
|
|
29
38
|
if (!tooltipTarget || tooltipTarget === '')
|
|
30
39
|
return;
|
|
31
40
|
const tooltip = document.getElementById(tooltipTarget);
|
|
32
|
-
|
|
41
|
+
// Determine if the tooltip was triggered by a focus event
|
|
42
|
+
const triggeredByFocus = e.type === 'focusin';
|
|
43
|
+
void (tooltip === null || tooltip === void 0 ? void 0 : tooltip.show(targetElement, triggeredByFocus));
|
|
33
44
|
if (hideTooltipTimeout) {
|
|
34
45
|
window.clearTimeout(hideTooltipTimeout);
|
|
35
46
|
hideTooltipTimeout = null;
|
|
@@ -83,6 +94,7 @@ const patchAccessibilityFeatures = (trigger) => {
|
|
|
83
94
|
const triggerObserver = getAttributeObserver(tooltipTargetAttribute, patchAccessibilityFeatures);
|
|
84
95
|
export class PostTooltip {
|
|
85
96
|
constructor() {
|
|
97
|
+
this.wasOpenedByFocus = false;
|
|
86
98
|
this.placement = 'top';
|
|
87
99
|
this.arrow = true;
|
|
88
100
|
this.delayed = false;
|
|
@@ -142,11 +154,32 @@ export class PostTooltip {
|
|
|
142
154
|
/**
|
|
143
155
|
* Programmatically display the tooltip
|
|
144
156
|
* @param target An element with [data-tooltip-target="id"] where the tooltip should be shown
|
|
157
|
+
* @param triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event.
|
|
145
158
|
*/
|
|
146
|
-
async show(target) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
159
|
+
async show(target, triggeredByFocus = false) {
|
|
160
|
+
const showTooltip = () => {
|
|
161
|
+
// If focus or pointer event is not on the button anymore, don't show the tooltip
|
|
162
|
+
if (globalCurrentTarget !== target)
|
|
163
|
+
return;
|
|
164
|
+
// Determine if the tooltip was opened by a focus event
|
|
165
|
+
this.wasOpenedByFocus = triggeredByFocus;
|
|
166
|
+
// Disable pointer events if triggered by focus, otherwise enable them
|
|
167
|
+
if (this.wasOpenedByFocus) {
|
|
168
|
+
this.host.style.pointerEvents = 'none';
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
this.host.style.pointerEvents = 'auto';
|
|
172
|
+
}
|
|
173
|
+
this.popoverRef.show(target);
|
|
174
|
+
};
|
|
175
|
+
if (this.delayed) {
|
|
176
|
+
tooltipTimeout = setTimeout(() => {
|
|
177
|
+
showTooltip();
|
|
178
|
+
}, OPEN_DELAY);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
showTooltip();
|
|
182
|
+
}
|
|
150
183
|
}
|
|
151
184
|
/**
|
|
152
185
|
* Programmatically hide this tooltip
|
|
@@ -173,13 +206,15 @@ export class PostTooltip {
|
|
|
173
206
|
}
|
|
174
207
|
/**
|
|
175
208
|
* Pointer or focus left the tooltip, initiate the hiding process
|
|
209
|
+
* Re-enable pointer events when the tooltip is no longer in focus or hovered
|
|
176
210
|
*/
|
|
177
211
|
handleInterestLost() {
|
|
178
212
|
globalHideTooltip(this);
|
|
213
|
+
this.host.style.pointerEvents = 'auto';
|
|
179
214
|
}
|
|
180
215
|
render() {
|
|
181
216
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
182
|
-
return (h(Host, { key: '
|
|
217
|
+
return (h(Host, { key: '492f3f8b1b323417304ffba6c93f277c18f5b3d8', "data-version": version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: '1b25c36c8351f0471e9acdf1fdf3073fa59683da', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '0c1f7d6c81e214155976d1fb6151ec0f97724724' }))));
|
|
183
218
|
}
|
|
184
219
|
static get is() { return "post-tooltip"; }
|
|
185
220
|
static get encapsulation() { return "shadow"; }
|
|
@@ -261,11 +296,15 @@ export class PostTooltip {
|
|
|
261
296
|
return {
|
|
262
297
|
"show": {
|
|
263
298
|
"complexType": {
|
|
264
|
-
"signature": "(target: HTMLElement) => Promise<void>",
|
|
299
|
+
"signature": "(target: HTMLElement, triggeredByFocus?: boolean) => Promise<void>",
|
|
265
300
|
"parameters": [{
|
|
266
301
|
"name": "target",
|
|
267
302
|
"type": "HTMLElement",
|
|
268
303
|
"docs": "An element with [data-tooltip-target=\"id\"] where the tooltip should be shown"
|
|
304
|
+
}, {
|
|
305
|
+
"name": "triggeredByFocus",
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"docs": "A boolean indicating if the tooltip was triggered by a focus event."
|
|
269
308
|
}],
|
|
270
309
|
"references": {
|
|
271
310
|
"Promise": {
|
|
@@ -284,6 +323,9 @@ export class PostTooltip {
|
|
|
284
323
|
"tags": [{
|
|
285
324
|
"name": "param",
|
|
286
325
|
"text": "target An element with [data-tooltip-target=\"id\"] where the tooltip should be shown"
|
|
326
|
+
}, {
|
|
327
|
+
"name": "param",
|
|
328
|
+
"text": "triggeredByFocus A boolean indicating if the tooltip was triggered by a focus event."
|
|
287
329
|
}]
|
|
288
330
|
}
|
|
289
331
|
},
|
package/dist/collection/index.js
CHANGED
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
// Export every single component so it gets included in the dist output
|
|
2
2
|
export { PostAccordion } from './components/post-accordion/post-accordion';
|
|
3
3
|
export { PostAccordionItem } from './components/post-accordion-item/post-accordion-item';
|
|
4
|
-
export {
|
|
4
|
+
export { PostAvatar } from './components/post-avatar/post-avatar';
|
|
5
|
+
export { PostBackToTop } from './components/post-back-to-top/post-back-to-top';
|
|
6
|
+
export { PostBanner } from './components/post-banner/post-banner';
|
|
7
|
+
export { PostBreadcrumb } from './components/post-breadcrumb/post-breadcrumb';
|
|
8
|
+
export { PostBreadcrumbItem } from './components/post-breadcrumb-item/post-breadcrumb-item';
|
|
5
9
|
export { PostCardControl } from './components/post-card-control/post-card-control';
|
|
10
|
+
export { PostClosebutton } from './components/post-closebutton/post-closebutton';
|
|
6
11
|
export { PostCollapsible } from './components/post-collapsible/post-collapsible';
|
|
7
12
|
export { PostCollapsibleTrigger } from './components/post-collapsible-trigger/post-collapsible-trigger';
|
|
13
|
+
export { PostFooter } from './components/post-footer/post-footer';
|
|
14
|
+
export { PostHeader } from './components/post-header/post-header';
|
|
8
15
|
export { PostIcon } from './components/post-icon/post-icon';
|
|
16
|
+
export { PostLanguageOption } from './components/post-language-option/post-language-option';
|
|
17
|
+
export { PostLanguageSwitch } from './components/post-language-switch/post-language-switch';
|
|
18
|
+
export { PostList } from './components/post-list/post-list';
|
|
19
|
+
export { PostListItem } from './components/post-list-item/post-list-item';
|
|
9
20
|
export { PostLogo } from './components/post-logo/post-logo';
|
|
21
|
+
export { PostMainnavigation } from './components/post-mainnavigation/post-mainnavigation';
|
|
22
|
+
export { PostMegadropdown } from './components/post-megadropdown/post-megadropdown';
|
|
23
|
+
export { PostMegadropdownTrigger } from './components/post-megadropdown-trigger/post-megadropdown-trigger';
|
|
24
|
+
export { PostMenu } from './components/post-menu/post-menu';
|
|
25
|
+
export { PostMenuItem } from './components/post-menu-item/post-menu-item';
|
|
26
|
+
export { PostMenuTrigger } from './components/post-menu-trigger/post-menu-trigger';
|
|
10
27
|
export { PostPopover } from './components/post-popover/post-popover';
|
|
11
28
|
export { PostPopovercontainer } from './components/post-popovercontainer/post-popovercontainer';
|
|
12
29
|
export { PostRating } from './components/post-rating/post-rating';
|
|
13
30
|
export { PostTabs } from './components/post-tabs/post-tabs';
|
|
14
31
|
export { PostTabHeader } from './components/post-tab-header/post-tab-header';
|
|
15
32
|
export { PostTabPanel } from './components/post-tab-panel/post-tab-panel';
|
|
16
|
-
export { PostTooltip } from './components/post-tooltip/post-tooltip';
|
|
17
33
|
export { PostTag } from './components/post-tag/post-tag';
|
|
34
|
+
export { PostTogglebutton } from './components/post-togglebutton/post-togglebutton';
|
|
35
|
+
export { PostTooltip } from './components/post-tooltip/post-tooltip';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export class Breakpoint {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.current = {
|
|
4
|
+
key: '',
|
|
5
|
+
name: '',
|
|
6
|
+
};
|
|
7
|
+
if (!this.breakpointMap) {
|
|
8
|
+
const styles = getComputedStyle(document.documentElement);
|
|
9
|
+
const keys = styles.getPropertyValue('--post-breakpoint-keys').split(', ');
|
|
10
|
+
const names = styles.getPropertyValue('--post-breakpoint-names').split(', ');
|
|
11
|
+
this.breakpointMap = styles
|
|
12
|
+
.getPropertyValue('--post-breakpoint-widths')
|
|
13
|
+
.split(', ')
|
|
14
|
+
.map((width, i) => {
|
|
15
|
+
return {
|
|
16
|
+
minWidth: Number(width),
|
|
17
|
+
key: keys[i],
|
|
18
|
+
name: names[i],
|
|
19
|
+
};
|
|
20
|
+
})
|
|
21
|
+
.reverse();
|
|
22
|
+
window.addEventListener('resize', () => this.updateHandler(), { passive: true });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
updateHandler(emitEvents = true) {
|
|
26
|
+
const calculated = this.breakpointMap.find(({ minWidth }) => innerWidth >= minWidth);
|
|
27
|
+
if (this.current.key !== calculated.key) {
|
|
28
|
+
this.current.key = calculated.key;
|
|
29
|
+
if (emitEvents)
|
|
30
|
+
this.dispatchEvent('key');
|
|
31
|
+
}
|
|
32
|
+
if (this.current.name !== calculated.name) {
|
|
33
|
+
this.current.name = calculated.name;
|
|
34
|
+
if (emitEvents)
|
|
35
|
+
this.dispatchEvent('name');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
dispatchEvent(type) {
|
|
39
|
+
window.dispatchEvent(new CustomEvent(`postBreakpoint:${type}`, { detail: this.current[type] }));
|
|
40
|
+
}
|
|
41
|
+
get(type) {
|
|
42
|
+
this.updateHandler(false);
|
|
43
|
+
return this.current[type];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export const breakpoint = new Breakpoint();
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
].join(',')})`;
|
|
25
|
+
export const getFocusableChildren = (element) => {
|
|
26
|
+
return element.querySelectorAll(`& > ${focusableSelector}:not(${focusDisablingSelector})`);
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
function getRoot(element) {
|
|
2
|
+
const root = element.getRootNode();
|
|
3
|
+
if (root instanceof Document || root instanceof ShadowRoot) {
|
|
4
|
+
return root;
|
|
5
|
+
}
|
|
6
|
+
throw new Error('Attempting to access root node before the element is attached to the document or shadow tree.');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { getRoot as g };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const urlAlphabet =
|
|
2
|
+
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
3
|
+
|
|
4
|
+
let nanoid = (size = 21) => {
|
|
5
|
+
let id = '';
|
|
6
|
+
let bytes = crypto.getRandomValues(new Uint8Array((size |= 0)));
|
|
7
|
+
while (size--) {
|
|
8
|
+
id += urlAlphabet[bytes[size] & 63];
|
|
9
|
+
}
|
|
10
|
+
return id
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { nanoid as n };
|
package/dist/components/index.js
CHANGED
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { P as PostAccordion } from './post-accordion2.js';
|
|
3
3
|
export { P as PostAccordionItem } from './post-accordion-item2.js';
|
|
4
|
-
export { P as
|
|
4
|
+
export { P as PostAvatar } from './post-avatar2.js';
|
|
5
|
+
export { P as PostBackToTop } from './post-back-to-top2.js';
|
|
6
|
+
export { P as PostBanner } from './post-banner2.js';
|
|
7
|
+
export { P as PostBreadcrumb } from './post-breadcrumb2.js';
|
|
8
|
+
export { P as PostBreadcrumbItem } from './post-breadcrumb-item2.js';
|
|
5
9
|
export { P as PostCardControl } from './post-card-control2.js';
|
|
10
|
+
export { P as PostClosebutton } from './post-closebutton2.js';
|
|
6
11
|
export { P as PostCollapsible } from './post-collapsible2.js';
|
|
7
12
|
export { P as PostCollapsibleTrigger } from './post-collapsible-trigger2.js';
|
|
13
|
+
export { P as PostFooter } from './post-footer2.js';
|
|
14
|
+
export { P as PostHeader } from './post-header2.js';
|
|
8
15
|
export { P as PostIcon } from './post-icon2.js';
|
|
16
|
+
export { P as PostLanguageOption } from './post-language-option2.js';
|
|
17
|
+
export { P as PostLanguageSwitch } from './post-language-switch2.js';
|
|
18
|
+
export { P as PostList } from './post-list2.js';
|
|
19
|
+
export { P as PostListItem } from './post-list-item2.js';
|
|
9
20
|
export { P as PostLogo } from './post-logo2.js';
|
|
21
|
+
export { P as PostMainnavigation } from './post-mainnavigation2.js';
|
|
22
|
+
export { P as PostMegadropdown } from './post-megadropdown2.js';
|
|
23
|
+
export { P as PostMegadropdownTrigger } from './post-megadropdown-trigger2.js';
|
|
24
|
+
export { P as PostMenu } from './post-menu2.js';
|
|
25
|
+
export { P as PostMenuItem } from './post-menu-item2.js';
|
|
26
|
+
export { P as PostMenuTrigger } from './post-menu-trigger2.js';
|
|
10
27
|
export { P as PostPopover } from './post-popover2.js';
|
|
11
28
|
export { P as PostPopovercontainer } from './post-popovercontainer2.js';
|
|
12
29
|
export { P as PostRating } from './post-rating2.js';
|
|
13
30
|
export { P as PostTabs } from './post-tabs2.js';
|
|
14
31
|
export { P as PostTabHeader } from './post-tab-header2.js';
|
|
15
32
|
export { P as PostTabPanel } from './post-tab-panel2.js';
|
|
16
|
-
export { P as PostTooltip } from './post-tooltip2.js';
|
|
17
33
|
export { P as PostTag } from './post-tag2.js';
|
|
34
|
+
export { P as PostTogglebutton } from './post-togglebutton2.js';
|
|
35
|
+
export { P as PostTooltip } from './post-tooltip2.js';
|
|
@@ -31,4 +31,4 @@ const checkEmptyOrPattern = emptyOr(checkPattern);
|
|
|
31
31
|
const checkEmptyOrType = emptyOr(checkType);
|
|
32
32
|
const checkEmptyOrUrl = emptyOr(checkUrl);
|
|
33
33
|
|
|
34
|
-
export { checkEmptyOrPattern as a,
|
|
34
|
+
export { checkEmptyOrPattern as a, checkUrl as b, checkEmptyOrOneOf as c, checkEmptyOrUrl as d, checkEmptyOrType as e };
|