@swisspost/design-system-components 9.0.0-next.1 → 9.0.0-next.11
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-c7d01968.js → package-5fdfea90.js} +1 -1
- package/dist/cjs/{post-accordion-e29956c4.js → post-accordion-dabc9271.js} +3 -3
- package/dist/cjs/post-accordion-item-9dadc543.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-fddda407.js +148 -0
- package/dist/cjs/post-avatar.cjs.entry.js +13 -0
- package/dist/cjs/post-back-to-top-6dfbcd1b.js +75 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
- package/dist/cjs/post-banner-6df79142.js +91 -0
- package/dist/cjs/post-banner.cjs.entry.js +19 -0
- package/dist/cjs/post-breadcrumb-b05fb572.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-97ed732c.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-32549d33.js → post-collapsible-trigger-94f1bbd9.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-f95510e4.js +84 -0
- package/dist/cjs/post-footer.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-106036fa.js +69 -0
- package/dist/cjs/{post-popover-cfc1b31b.js → post-popover-cc55d371.js} +4 -4
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-b9b8b6f3.js → post-rating-4aa3fabb.js} +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-1eee4cbf.js +33 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
- package/dist/cjs/{post-tab-panel-300a0618.js → post-tab-panel-77162d5b.js} +5 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-b06f799b.js → post-tabs-ee832221.js} +9 -7
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tag-8778a125.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-popovercontainer-c0b86b11.js → post-togglebutton-00632399.js} +1167 -42
- package/dist/cjs/{post-tooltip-8d7e64f6.js → post-tooltip-d3dd17b2.js} +31 -19
- 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-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +26 -9
- 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 -1
- 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.css +1 -1
- 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 -1
- package/dist/collection/components/post-popover/post-popover.js +2 -2
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +27 -7
- package/dist/collection/components/post-rating/post-rating.css +1 -1
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -1
- 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 -1
- 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 +29 -13
- 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 +33 -13
- package/dist/components/post-accordion2.js +1 -1
- 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 +3 -3
- 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 +95 -28
- 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 +29 -17
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +1875 -288
- 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-cf78d928.js +3 -0
- package/dist/esm/{post-accordion-3a7b3f3c.js → post-accordion-25df8744.js} +3 -3
- package/dist/esm/post-accordion-item-33fb36df.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-731aafd6.js +146 -0
- package/dist/esm/post-avatar.entry.js +5 -0
- package/dist/esm/post-back-to-top-3a6b6203.js +73 -0
- package/dist/esm/post-back-to-top.entry.js +7 -0
- package/dist/esm/post-banner-b2eb796c.js +89 -0
- package/dist/esm/post-banner.entry.js +11 -0
- package/dist/esm/post-breadcrumb-0a99384c.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-ff272e38.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-8d7e027b.js → post-collapsible-trigger-7fc4d61c.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-97bbd770.js +82 -0
- package/dist/esm/post-footer.entry.js +3 -0
- package/dist/esm/post-menu-item-ae066299.js +66 -0
- package/dist/esm/{post-popover-972c5ea7.js → post-popover-62e33068.js} +4 -4
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-cca784ae.js → post-rating-ee73a51b.js} +4 -4
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-dac84177.js +31 -0
- package/dist/esm/post-tab-header.entry.js +4 -3
- package/dist/esm/{post-tab-panel-633a5e6b.js → post-tab-panel-5e35e7df.js} +5 -4
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-74ded897.js → post-tabs-b614a577.js} +9 -7
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tag-413626e4.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-popovercontainer-2485b7d9.js → post-togglebutton-caf0000b.js} +1154 -43
- package/dist/esm/{post-tooltip-0457467f.js → post-tooltip-b0f1b147.js} +31 -19
- 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-012a39b8.js +1 -0
- package/dist/post-components/p-0a74bc53.js +1 -0
- package/dist/post-components/p-0addae0c.entry.js +1 -0
- package/dist/post-components/p-0e216cc4.js +2 -0
- package/dist/post-components/p-128b11b3.js +1 -0
- package/dist/post-components/p-13ae0f4d.entry.js +1 -0
- package/dist/post-components/p-15173f46.js +1 -0
- package/dist/post-components/p-189a07cf.entry.js +1 -0
- package/dist/post-components/p-18b84db7.entry.js +1 -0
- package/dist/post-components/p-2571a1be.entry.js +1 -0
- package/dist/post-components/p-2747a945.js +1 -0
- package/dist/post-components/p-32165625.js +1 -0
- package/dist/post-components/p-42ef1d9f.entry.js +1 -0
- package/dist/post-components/p-465e9eee.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-60ea48ce.js +1 -0
- package/dist/post-components/p-61cff5d9.entry.js +1 -0
- package/dist/post-components/p-723ad003.entry.js +1 -0
- package/dist/post-components/p-73863597.js +1 -0
- package/dist/post-components/p-761723b6.js +1 -0
- package/dist/post-components/p-7c966321.js +1 -0
- package/dist/post-components/p-8e808ae6.js +1 -0
- package/dist/post-components/p-92611da2.entry.js +1 -0
- package/dist/post-components/p-990db73a.js +1 -0
- package/dist/post-components/p-99b12d43.entry.js +1 -0
- package/dist/post-components/p-9fbb33c2.entry.js +1 -0
- package/dist/post-components/p-a43a3cdb.js +1 -0
- package/dist/post-components/p-ad770600.entry.js +1 -0
- package/dist/post-components/p-af48ed67.entry.js +1 -0
- package/dist/post-components/p-b22656b1.js +1 -0
- package/dist/post-components/p-c4139fb9.js +1 -0
- package/dist/post-components/p-cc55b611.js +1 -0
- package/dist/post-components/{p-01a8fe6a.js → p-d45f8861.js} +3 -3
- package/dist/post-components/p-d4f93f2b.js +1 -0
- package/dist/post-components/p-dc11a5d5.entry.js +1 -0
- package/dist/post-components/{p-41094063.js → p-df9ea014.js} +1 -1
- package/dist/post-components/p-e1dc7f01.entry.js +1 -0
- package/dist/post-components/p-e533625e.js +1 -0
- package/dist/post-components/p-f0da081f.entry.js +1 -0
- package/dist/post-components/p-f380a026.entry.js +1 -0
- package/dist/post-components/p-fbcc89be.js +1 -0
- package/dist/post-components/p-fc91cbc2.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-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.d.ts +570 -44
- 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 +1 -1
- 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 +4 -4
- 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 +95 -28
- 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 +28 -16
- package/loaders/slide.js +25 -0
- package/package.json +16 -13
- package/dist/cjs/post-accordion-item-dc4d1801.js +0 -51
- package/dist/cjs/post-alert-106c34ac.js +0 -98
- package/dist/cjs/post-alert.cjs.entry.js +0 -16
- package/dist/cjs/post-card-control-69769d1a.js +0 -272
- package/dist/cjs/post-icon-221d976f.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-logo-e6cb079f.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-43310d08.js +0 -32
- package/dist/cjs/post-tag-d7ac3cbb.js +0 -47
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -7
- 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-bc6404e2.js +0 -3
- package/dist/esm/post-accordion-item-55d1e771.js +0 -49
- package/dist/esm/post-alert-6c908130.js +0 -96
- package/dist/esm/post-alert.entry.js +0 -8
- package/dist/esm/post-card-control-9fff6efc.js +0 -270
- package/dist/esm/post-icon-d59ad345.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-logo-a1487634.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-dd2cb68e.js +0 -30
- package/dist/esm/post-tag-f60a71fd.js +0 -45
- package/dist/post-components/p-0e0c11f9.entry.js +0 -1
- package/dist/post-components/p-124fe6c8.js +0 -1
- package/dist/post-components/p-15c6739e.entry.js +0 -1
- package/dist/post-components/p-2180e02d.entry.js +0 -1
- package/dist/post-components/p-22ec06ae.entry.js +0 -1
- package/dist/post-components/p-26bbd8e5.entry.js +0 -1
- package/dist/post-components/p-2b43665d.js +0 -1
- package/dist/post-components/p-2d1f85f4.js +0 -1
- package/dist/post-components/p-464ce10a.entry.js +0 -1
- package/dist/post-components/p-51eff367.js +0 -1
- package/dist/post-components/p-586f7f53.entry.js +0 -1
- package/dist/post-components/p-65031b20.entry.js +0 -1
- package/dist/post-components/p-6d9c46f4.js +0 -1
- package/dist/post-components/p-6f12f3e5.js +0 -1
- package/dist/post-components/p-718eb560.js +0 -1
- package/dist/post-components/p-78407640.entry.js +0 -1
- package/dist/post-components/p-79a40235.entry.js +0 -1
- package/dist/post-components/p-7ab513fc.js +0 -1
- package/dist/post-components/p-9cba7d2f.js +0 -1
- package/dist/post-components/p-9eb27378.entry.js +0 -1
- package/dist/post-components/p-a528acc4.js +0 -1
- package/dist/post-components/p-aa8e43c3.js +0 -1
- package/dist/post-components/p-b68c86a7.js +0 -1
- package/dist/post-components/p-b8db0e0a.entry.js +0 -1
- package/dist/post-components/p-bcd5843c.entry.js +0 -1
- package/dist/post-components/p-c21b810d.js +0 -1
- package/dist/post-components/p-c386219b.js +0 -1
- package/dist/post-components/p-d2f9de94.js +0 -2
- package/dist/post-components/p-deb4131c.js +0 -1
- package/dist/post-components/p-e7c67ff0.entry.js +0 -1
- package/dist/post-components/p-f10e2bb1.entry.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
|
@@ -1156,6 +1156,9 @@ const size$1 = function (options) {
|
|
|
1156
1156
|
};
|
|
1157
1157
|
};
|
|
1158
1158
|
|
|
1159
|
+
function hasWindow() {
|
|
1160
|
+
return typeof window !== 'undefined';
|
|
1161
|
+
}
|
|
1159
1162
|
function getNodeName(node) {
|
|
1160
1163
|
if (isNode(node)) {
|
|
1161
1164
|
return (node.nodeName || '').toLowerCase();
|
|
@@ -1174,17 +1177,25 @@ function getDocumentElement(node) {
|
|
|
1174
1177
|
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1175
1178
|
}
|
|
1176
1179
|
function isNode(value) {
|
|
1180
|
+
if (!hasWindow()) {
|
|
1181
|
+
return false;
|
|
1182
|
+
}
|
|
1177
1183
|
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1178
1184
|
}
|
|
1179
1185
|
function isElement(value) {
|
|
1186
|
+
if (!hasWindow()) {
|
|
1187
|
+
return false;
|
|
1188
|
+
}
|
|
1180
1189
|
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1181
1190
|
}
|
|
1182
1191
|
function isHTMLElement(value) {
|
|
1192
|
+
if (!hasWindow()) {
|
|
1193
|
+
return false;
|
|
1194
|
+
}
|
|
1183
1195
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1184
1196
|
}
|
|
1185
1197
|
function isShadowRoot(value) {
|
|
1186
|
-
|
|
1187
|
-
if (typeof ShadowRoot === 'undefined') {
|
|
1198
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
1188
1199
|
return false;
|
|
1189
1200
|
}
|
|
1190
1201
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
@@ -1215,7 +1226,8 @@ function isContainingBlock(elementOrCss) {
|
|
|
1215
1226
|
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
1216
1227
|
|
|
1217
1228
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1218
|
-
|
|
1229
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
1230
|
+
return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
|
|
1219
1231
|
}
|
|
1220
1232
|
function getContainingBlock(element) {
|
|
1221
1233
|
let currentNode = getParentNode(element);
|
|
@@ -1288,10 +1300,14 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
1288
1300
|
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1289
1301
|
const win = getWindow(scrollableAncestor);
|
|
1290
1302
|
if (isBody) {
|
|
1291
|
-
|
|
1303
|
+
const frameElement = getFrameElement(win);
|
|
1304
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1292
1305
|
}
|
|
1293
1306
|
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1294
1307
|
}
|
|
1308
|
+
function getFrameElement(win) {
|
|
1309
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1310
|
+
}
|
|
1295
1311
|
|
|
1296
1312
|
function getCssDimensions(element) {
|
|
1297
1313
|
const css = getComputedStyle(element);
|
|
@@ -1395,7 +1411,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1395
1411
|
const win = getWindow(domElement);
|
|
1396
1412
|
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
1397
1413
|
let currentWin = win;
|
|
1398
|
-
let currentIFrame = currentWin
|
|
1414
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
1399
1415
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
1400
1416
|
const iframeScale = getScale(currentIFrame);
|
|
1401
1417
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
@@ -1409,7 +1425,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1409
1425
|
x += left;
|
|
1410
1426
|
y += top;
|
|
1411
1427
|
currentWin = getWindow(currentIFrame);
|
|
1412
|
-
currentIFrame = currentWin
|
|
1428
|
+
currentIFrame = getFrameElement(currentWin);
|
|
1413
1429
|
}
|
|
1414
1430
|
}
|
|
1415
1431
|
return rectToClientRect({
|
|
@@ -1420,6 +1436,31 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1420
1436
|
});
|
|
1421
1437
|
}
|
|
1422
1438
|
|
|
1439
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1440
|
+
// incorrect for RTL.
|
|
1441
|
+
function getWindowScrollBarX(element, rect) {
|
|
1442
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
1443
|
+
if (!rect) {
|
|
1444
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
1445
|
+
}
|
|
1446
|
+
return rect.left + leftScroll;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
1450
|
+
if (ignoreScrollbarX === void 0) {
|
|
1451
|
+
ignoreScrollbarX = false;
|
|
1452
|
+
}
|
|
1453
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
1454
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
|
|
1455
|
+
// RTL <body> scrollbar.
|
|
1456
|
+
getWindowScrollBarX(documentElement, htmlRect));
|
|
1457
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
1458
|
+
return {
|
|
1459
|
+
x,
|
|
1460
|
+
y
|
|
1461
|
+
};
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1423
1464
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
1424
1465
|
let {
|
|
1425
1466
|
elements,
|
|
@@ -1451,11 +1492,12 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
1451
1492
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1452
1493
|
}
|
|
1453
1494
|
}
|
|
1495
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
1454
1496
|
return {
|
|
1455
1497
|
width: rect.width * scale.x,
|
|
1456
1498
|
height: rect.height * scale.y,
|
|
1457
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
1458
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
1499
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
1500
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
1459
1501
|
};
|
|
1460
1502
|
}
|
|
1461
1503
|
|
|
@@ -1463,12 +1505,6 @@ function getClientRects(element) {
|
|
|
1463
1505
|
return Array.from(element.getClientRects());
|
|
1464
1506
|
}
|
|
1465
1507
|
|
|
1466
|
-
function getWindowScrollBarX(element) {
|
|
1467
|
-
// If <html> has a CSS width greater than the viewport, then this will be
|
|
1468
|
-
// incorrect for RTL.
|
|
1469
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
1508
|
// Gets the entire size of the scrollable document area, even extending outside
|
|
1473
1509
|
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
1474
1510
|
function getDocumentRect(element) {
|
|
@@ -1543,9 +1579,10 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
1543
1579
|
} else {
|
|
1544
1580
|
const visualOffsets = getVisualOffsets(element);
|
|
1545
1581
|
rect = {
|
|
1546
|
-
...clippingAncestor,
|
|
1547
1582
|
x: clippingAncestor.x - visualOffsets.x,
|
|
1548
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
1583
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
1584
|
+
width: clippingAncestor.width,
|
|
1585
|
+
height: clippingAncestor.height
|
|
1549
1586
|
};
|
|
1550
1587
|
}
|
|
1551
1588
|
return rectToClientRect(rect);
|
|
@@ -1650,11 +1687,14 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
1650
1687
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
1651
1688
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
1652
1689
|
} else if (documentElement) {
|
|
1690
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
1691
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
1653
1692
|
offsets.x = getWindowScrollBarX(documentElement);
|
|
1654
1693
|
}
|
|
1655
1694
|
}
|
|
1656
|
-
const
|
|
1657
|
-
const
|
|
1695
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
1696
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
1697
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
1658
1698
|
return {
|
|
1659
1699
|
x,
|
|
1660
1700
|
y,
|
|
@@ -1674,7 +1714,16 @@ function getTrueOffsetParent(element, polyfill) {
|
|
|
1674
1714
|
if (polyfill) {
|
|
1675
1715
|
return polyfill(element);
|
|
1676
1716
|
}
|
|
1677
|
-
|
|
1717
|
+
let rawOffsetParent = element.offsetParent;
|
|
1718
|
+
|
|
1719
|
+
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
1720
|
+
// while Chrome and Safari return the <body> element. The <body> element must
|
|
1721
|
+
// be used to perform the correct calculations even if the <html> element is
|
|
1722
|
+
// non-static.
|
|
1723
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
1724
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
1725
|
+
}
|
|
1726
|
+
return rawOffsetParent;
|
|
1678
1727
|
}
|
|
1679
1728
|
|
|
1680
1729
|
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
@@ -1736,6 +1785,10 @@ const platform = {
|
|
|
1736
1785
|
isRTL
|
|
1737
1786
|
};
|
|
1738
1787
|
|
|
1788
|
+
function rectsAreEqual(a, b) {
|
|
1789
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1739
1792
|
// https://samthor.au/2021/observing-dom/
|
|
1740
1793
|
function observeMove(element, onMove) {
|
|
1741
1794
|
let io = null;
|
|
@@ -1755,12 +1808,13 @@ function observeMove(element, onMove) {
|
|
|
1755
1808
|
threshold = 1;
|
|
1756
1809
|
}
|
|
1757
1810
|
cleanup();
|
|
1811
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
1758
1812
|
const {
|
|
1759
1813
|
left,
|
|
1760
1814
|
top,
|
|
1761
1815
|
width,
|
|
1762
1816
|
height
|
|
1763
|
-
} =
|
|
1817
|
+
} = elementRectForRootMargin;
|
|
1764
1818
|
if (!skip) {
|
|
1765
1819
|
onMove();
|
|
1766
1820
|
}
|
|
@@ -1793,6 +1847,16 @@ function observeMove(element, onMove) {
|
|
|
1793
1847
|
refresh(false, ratio);
|
|
1794
1848
|
}
|
|
1795
1849
|
}
|
|
1850
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
1851
|
+
// It's possible that even though the ratio is reported as 1, the
|
|
1852
|
+
// element is not actually fully within the IntersectionObserver's root
|
|
1853
|
+
// area anymore. This can happen under performance constraints. This may
|
|
1854
|
+
// be a bug in the browser's IntersectionObserver implementation. To
|
|
1855
|
+
// work around this, we compare the element's bounding rect now with
|
|
1856
|
+
// what it was at the time we created the IntersectionObserver. If they
|
|
1857
|
+
// are not equal then the element moved, so we refresh.
|
|
1858
|
+
refresh();
|
|
1859
|
+
}
|
|
1796
1860
|
isFirstUpdate = false;
|
|
1797
1861
|
}
|
|
1798
1862
|
|
|
@@ -1870,7 +1934,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
1870
1934
|
}
|
|
1871
1935
|
function frameLoop() {
|
|
1872
1936
|
const nextRefRect = getBoundingClientRect(reference);
|
|
1873
|
-
if (prevRefRect && (
|
|
1937
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
1874
1938
|
update();
|
|
1875
1939
|
}
|
|
1876
1940
|
prevRefRect = nextRefRect;
|
|
@@ -2039,7 +2103,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
2039
2103
|
}
|
|
2040
2104
|
`,E=null;function I(e){if(E===null)try{E=new CSSStyleSheet,E.replaceSync(C);}catch{E=!1;}if(E===!1){let t=document.createElement("style");t.textContent=C,e instanceof Document?e.head.prepend(t):e.prepend(t);}else e.adoptedStyleSheets=[E,...e.adoptedStyleSheets];}function K(){window.ToggleEvent=window.ToggleEvent||c;function e(n){return n?.includes(":popover-open")&&(n=n.replace(J,"$1.\\:popover-open")),n}f(Document.prototype,"querySelector",e),f(Document.prototype,"querySelectorAll",e),f(Element.prototype,"querySelector",e),f(Element.prototype,"querySelectorAll",e),f(Element.prototype,"matches",e),f(Element.prototype,"closest",e),f(DocumentFragment.prototype,"querySelectorAll",e),f(DocumentFragment.prototype,"querySelectorAll",e),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let n=(this.getAttribute("popover")||"").toLowerCase();return n===""||n=="auto"?"auto":"manual"},set(n){this.setAttribute("popover",n);}},showPopover:{enumerable:!0,configurable:!0,value(){S(this);}},hidePopover:{enumerable:!0,configurable:!0,value(){m(this,!0,!0);}},togglePopover:{enumerable:!0,configurable:!0,value(n){h.get(this)==="showing"&&n===void 0||n===!1?m(this,!0,!0):(n===void 0||n===!0)&&S(this);}}});let t=Element.prototype.attachShadow;t&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(n){let s=t.call(this,n);return I(s),s}}});let o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let n=o.call(this);return n.shadowRoot&&I(n.shadowRoot),n}}});let r=new WeakMap;function i(n){Object.defineProperties(n.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(s){if(s===null)this.removeAttribute("popovertarget"),r.delete(this);else if(s instanceof Element)this.setAttribute("popovertarget",""),r.set(this,s);else throw new TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let s=r.get(this);if(s&&s.isConnected)return s;if(s&&!s.isConnected)return r.delete(this),null;let u=v(this),w=this.getAttribute("popovertarget");return (u instanceof Document||u instanceof B)&&w&&u.getElementById(w)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let s=(this.getAttribute("popovertargetaction")||"").toLowerCase();return s==="show"||s==="hide"?s:"toggle"},set(s){this.setAttribute("popovertargetaction",s);}}});}i(HTMLButtonElement),i(HTMLInputElement);let l=n=>{if(!n.isTrusted)return;let s=n.composedPath()[0];if(!(s instanceof Element)||s?.shadowRoot)return;let u=v(s);if(!(u instanceof B||u instanceof Document))return;let w=s.closest("[popovertargetaction],[popovertarget]");if(w){O(w),n.preventDefault();return}},a=n=>{let s=n.key,u=n.target;!n.defaultPrevented&&u&&(s==="Escape"||s==="Esc")&&T(u.ownerDocument,!0,!0);};(n=>{n.addEventListener("click",l),n.addEventListener("keydown",a),n.addEventListener("pointerdown",x),n.addEventListener("pointerup",x);})(document),I(document);}j()||K();})();
|
|
2041
2105
|
|
|
2042
|
-
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;
|
|
2106
|
+
const postPopovercontainerCss = "@layer polyfill{@supports not selector(:popover-open){[popover]:not(.\\:popover-open){display:none}}}:where(post-popovercontainer){box-shadow:.5px 3px 4px rgba(0,0,0,.1),2px 4px 10px 4px rgba(0,0,0,.12);background:var(--post-current-palette-bg);color:var(--post-current-palette-fg);position:fixed;z-index:1060;width:max-content;margin:0;padding:0;box-sizing:border-box;border:2px solid rgba(0,0,0,0);border-radius:4px;overflow:visible}:where(post-popovercontainer)[tooltip]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:where(post-popovercontainer) .arrow{position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:where(post-popovercontainer) .arrow.top{border-left:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.right{border-right:2px solid rgba(0,0,0,0);border-top:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.left{border-left:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}:where(post-popovercontainer) .arrow.bottom{border-right:2px solid rgba(0,0,0,0);border-bottom:2px solid rgba(0,0,0,0)}";
|
|
2043
2107
|
const PostPopovercontainerStyle0 = postPopovercontainerCss;
|
|
2044
2108
|
|
|
2045
2109
|
const SIDE_MAP = {
|
|
@@ -2054,6 +2118,7 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2054
2118
|
this.__registerHost();
|
|
2055
2119
|
this.postToggle = createEvent(this, "postToggle", 7);
|
|
2056
2120
|
this.placement = 'top';
|
|
2121
|
+
this.edgeGap = 8;
|
|
2057
2122
|
this.arrow = false;
|
|
2058
2123
|
}
|
|
2059
2124
|
componentDidLoad() {
|
|
@@ -2125,11 +2190,12 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2125
2190
|
this.clearAutoUpdate = autoUpdate(this.eventTarget, this.host, this.calculatePosition.bind(this));
|
|
2126
2191
|
}
|
|
2127
2192
|
async calculatePosition() {
|
|
2193
|
+
const gap = this.edgeGap;
|
|
2128
2194
|
const middleware = [
|
|
2129
2195
|
flip(),
|
|
2130
2196
|
inline(),
|
|
2131
2197
|
shift({
|
|
2132
|
-
padding:
|
|
2198
|
+
padding: gap,
|
|
2133
2199
|
// Prevents shifting away from the anchor too far, while shifting as far as possible
|
|
2134
2200
|
// https://floating-ui.com/docs/shift#limiter
|
|
2135
2201
|
limiter: limitShift({
|
|
@@ -2139,14 +2205,14 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2139
2205
|
size({
|
|
2140
2206
|
apply({ availableWidth, elements }) {
|
|
2141
2207
|
Object.assign(elements.floating.style, {
|
|
2142
|
-
maxWidth: `${availableWidth -
|
|
2208
|
+
maxWidth: `${availableWidth - gap * 2}px`,
|
|
2143
2209
|
});
|
|
2144
2210
|
},
|
|
2145
2211
|
}),
|
|
2146
|
-
offset(this.arrow ?
|
|
2212
|
+
offset(this.arrow ? gap + 4 : gap), // 4px outside of element to account for focus outline + ~arrow size
|
|
2147
2213
|
];
|
|
2148
2214
|
if (this.arrow) {
|
|
2149
|
-
middleware.push(arrow({ element: this.arrowRef, padding:
|
|
2215
|
+
middleware.push(arrow({ element: this.arrowRef, padding: gap }));
|
|
2150
2216
|
}
|
|
2151
2217
|
const { x, y, middlewareData, placement: currentPlacement, } = await computePosition(this.eventTarget, this.host, {
|
|
2152
2218
|
placement: this.placement || 'top',
|
|
@@ -2174,14 +2240,15 @@ const PostPopovercontainer = /*@__PURE__*/ proxyCustomElement(class PostPopoverc
|
|
|
2174
2240
|
}
|
|
2175
2241
|
}
|
|
2176
2242
|
render() {
|
|
2177
|
-
return (h(Host, { key: '
|
|
2243
|
+
return (h(Host, { key: '844302edb3852f99229d4f4ccacf82cd78588435', "data-version": version }, this.arrow && (h("span", { key: 'ae293d24ef24282bfcaeb7f545653a563e5246d5', class: "arrow", ref: el => {
|
|
2178
2244
|
this.arrowRef = el;
|
|
2179
|
-
} })), h("slot", { key: '
|
|
2245
|
+
} })), h("slot", { key: '61dd3072a5217099028e3dd4b22fa845ea2f5970' })));
|
|
2180
2246
|
}
|
|
2181
2247
|
get host() { return this; }
|
|
2182
2248
|
static get style() { return PostPopovercontainerStyle0; }
|
|
2183
2249
|
}, [4, "post-popovercontainer", {
|
|
2184
2250
|
"placement": [1],
|
|
2251
|
+
"edgeGap": [2, "edge-gap"],
|
|
2185
2252
|
"arrow": [4],
|
|
2186
2253
|
"show": [64],
|
|
2187
2254
|
"hide": [64],
|
package/loaders/post-rating.js
CHANGED
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './post-icon2.js';
|
|
4
4
|
|
|
5
|
-
const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */:host{display:inline-block}.rating{display:flex;flex-wrap:wrap;overflow:hidden;margin:0 -
|
|
5
|
+
const postRatingCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */: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%)}";
|
|
6
6
|
const PostRatingStyle0 = postRatingCss;
|
|
7
7
|
|
|
8
8
|
const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends HTMLElement {
|
|
@@ -74,7 +74,7 @@ const PostRating$1 = /*@__PURE__*/ proxyCustomElement(class PostRating extends H
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h(Host, { key: '
|
|
77
|
+
return (h(Host, { key: 'bb4ab7c2ae609e8e288c62516be93f0b96926eff', "data-version": version }, h("div", { key: '0176474611f998938aef0b267c118478d6623fbc', 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: {
|
|
78
78
|
'star': true,
|
|
79
79
|
'before-hover': i < this.hoveredIndex,
|
|
80
80
|
'active': i < Math.round(this.currentRating),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { c as checkNonEmpty } from './check-non-empty.js';
|
|
4
|
+
import { n as nanoid } from './index.browser.js';
|
|
4
5
|
|
|
5
|
-
const postTabHeaderCss = ".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:var(--post-contrast-color);text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);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:var(--post-contrast-color-inverted);color:var(--post-contrast-color);font-weight:700}.tab-title[role=tab].active::before{content:\"\";display:block;position:absolute;top:0;right:-1px;left:-1px;height
|
|
6
|
+
const postTabHeaderCss = ".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:var(--post-contrast-color);text-decoration:none;background-color:rgba(0,0,0,0)}.tab-title[role=tab]:focus{background-color:unset;color:var(--post-contrast-color)}.tab-title[role=tab]:hover{opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted)}.tab-title[role=tab]:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(var(--post-contrast-color-rgb), 0.6);color:var(--post-contrast-color-inverted);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:var(--post-contrast-color-inverted);color:var(--post-contrast-color);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}}/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */: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}";
|
|
6
7
|
const PostTabHeaderStyle0 = postTabHeaderCss;
|
|
7
8
|
|
|
8
9
|
const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader extends HTMLElement {
|
|
@@ -17,10 +18,10 @@ const PostTabHeader$1 = /*@__PURE__*/ proxyCustomElement(class PostTabHeader ext
|
|
|
17
18
|
checkNonEmpty(newValue, 'The "panel" prop is required for the post-tab-header.');
|
|
18
19
|
}
|
|
19
20
|
componentWillLoad() {
|
|
20
|
-
this.tabId = `tab-${this.host.id ||
|
|
21
|
+
this.tabId = `tab-${this.host.id || nanoid(6)}`;
|
|
21
22
|
}
|
|
22
23
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
24
|
+
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' })));
|
|
24
25
|
}
|
|
25
26
|
get host() { return this; }
|
|
26
27
|
static get watchers() { return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
|
+
import { n as nanoid } from './index.browser.js';
|
|
3
4
|
|
|
4
5
|
const postTabPanelCss = ":host{display:none}";
|
|
5
6
|
const PostTabPanelStyle0 = postTabPanelCss;
|
|
@@ -14,10 +15,10 @@ const PostTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class PostTabPanel exten
|
|
|
14
15
|
}
|
|
15
16
|
componentWillLoad() {
|
|
16
17
|
// get the id set on the host element or use a random id by default
|
|
17
|
-
this.panelId = `panel-${this.host.id ||
|
|
18
|
+
this.panelId = `panel-${this.host.id || nanoid(6)}`;
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '9e8f9c5dc0c1c3d1b7e63cbb9e9cbb0cf116da9b', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '3ece42346845324cfa0fb9af5721efab2b71e2f1' })));
|
|
21
22
|
}
|
|
22
23
|
get host() { return this; }
|
|
23
24
|
static get style() { return PostTabPanelStyle0; }
|
package/loaders/post-tabs.js
CHANGED
|
@@ -23,7 +23,7 @@ const customOnReady = (callback) => {
|
|
|
23
23
|
return setTimeout(callback);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const postTabsCss = ".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{
|
|
26
|
+
const postTabsCss = ".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}";
|
|
27
27
|
const PostTabsStyle0 = postTabsCss;
|
|
28
28
|
|
|
29
29
|
const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLElement {
|
|
@@ -36,12 +36,13 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
36
36
|
this.activePanel = undefined;
|
|
37
37
|
}
|
|
38
38
|
get tabs() {
|
|
39
|
-
return this.host.querySelectorAll('post-tab-header');
|
|
39
|
+
return Array.from(this.host.querySelectorAll('post-tab-header')).filter(tab => tab.closest('post-tabs') === this.host);
|
|
40
40
|
}
|
|
41
41
|
componentDidLoad() {
|
|
42
|
+
var _a;
|
|
42
43
|
this.moveMisplacedTabs();
|
|
43
44
|
this.enableTabs();
|
|
44
|
-
const initiallyActivePanel = this.activePanel || this.tabs
|
|
45
|
+
const initiallyActivePanel = this.activePanel || ((_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.panel);
|
|
45
46
|
void this.show(initiallyActivePanel);
|
|
46
47
|
this.isLoaded = true;
|
|
47
48
|
}
|
|
@@ -86,6 +87,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
enableTabs() {
|
|
90
|
+
var _a;
|
|
89
91
|
if (!this.tabs)
|
|
90
92
|
return;
|
|
91
93
|
this.tabs.forEach(async (tab) => {
|
|
@@ -112,7 +114,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
112
114
|
});
|
|
113
115
|
// if the currently active tab was removed from the DOM then select the first one
|
|
114
116
|
if (this.activeTab && !this.activeTab.isConnected) {
|
|
115
|
-
void this.show(this.tabs
|
|
117
|
+
void this.show((_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.panel);
|
|
116
118
|
}
|
|
117
119
|
}
|
|
118
120
|
activateTab(tab) {
|
|
@@ -164,7 +166,7 @@ const PostTabs$1 = /*@__PURE__*/ proxyCustomElement(class PostTabs extends HTMLE
|
|
|
164
166
|
nextTab.focus();
|
|
165
167
|
}
|
|
166
168
|
render() {
|
|
167
|
-
return (h(Host, { key: '
|
|
169
|
+
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() }))));
|
|
168
170
|
}
|
|
169
171
|
get host() { return this; }
|
|
170
172
|
static get style() { return PostTabsStyle0; }
|
package/loaders/post-tag.js
CHANGED
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
2
2
|
import { v as version } from './package.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './post-icon2.js';
|
|
4
4
|
|
|
5
|
-
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.tag,.tag:where(:has(:not(pre))){--post-tag-bg:hsl(0, 0%, 90%);--post-tag-fg:#000;display:inline-flex;align-items:center;gap
|
|
5
|
+
const postTagCss = "/*!\n * Copyright 2021 by Swiss Post, Information Technology\n */.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}";
|
|
6
6
|
const PostTagStyle0 = postTagCss;
|
|
7
7
|
|
|
8
8
|
const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLElement {
|
|
@@ -35,7 +35,7 @@ const PostTag$1 = /*@__PURE__*/ proxyCustomElement(class PostTag extends HTMLEle
|
|
|
35
35
|
this.setClasses();
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
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' })))));
|
|
39
39
|
}
|
|
40
40
|
get host() { return this; }
|
|
41
41
|
static get watchers() { return {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface PostTogglebutton extends Components.PostTogglebutton, HTMLElement {}
|
|
4
|
+
export const PostTogglebutton: {
|
|
5
|
+
prototype: PostTogglebutton;
|
|
6
|
+
new (): PostTogglebutton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { v as version } from './package.js';
|
|
3
|
+
import { c as checkType } from './check-type.js';
|
|
4
|
+
|
|
5
|
+
const postTogglebuttonCss = ":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}";
|
|
6
|
+
const PostTogglebuttonStyle0 = postTogglebuttonCss;
|
|
7
|
+
|
|
8
|
+
const PostTogglebutton$1 = /*@__PURE__*/ proxyCustomElement(class PostTogglebutton extends HTMLElement {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
this.__registerHost();
|
|
12
|
+
this.__attachShadow();
|
|
13
|
+
this.handleClick = () => {
|
|
14
|
+
this.toggled = !this.toggled;
|
|
15
|
+
};
|
|
16
|
+
this.handleKeydown = (event) => {
|
|
17
|
+
// perform a click when enter or spaced are pressed to mimic the button behavior
|
|
18
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
19
|
+
event.preventDefault(); // prevents the page from scrolling when space is pressed
|
|
20
|
+
this.host.click();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.toggled = false;
|
|
24
|
+
}
|
|
25
|
+
validateToggled(value = this.toggled) {
|
|
26
|
+
checkType(value, 'boolean', 'The "toggled" property of the post-togglebutton must be a boolean.');
|
|
27
|
+
}
|
|
28
|
+
componentWillLoad() {
|
|
29
|
+
this.validateToggled();
|
|
30
|
+
// add event listener to not override listener that might be set on the host
|
|
31
|
+
this.host.addEventListener('click', () => this.handleClick());
|
|
32
|
+
this.host.addEventListener('keydown', (e) => this.handleKeydown(e));
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
35
|
+
return (h(Host, { key: '461f72ebada75a99921b7a166f67f2547aa6465e', "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: 'cd5f4cc4df687cceacb3ea6c125b7b62f01b2712' })));
|
|
36
|
+
}
|
|
37
|
+
get host() { return this; }
|
|
38
|
+
static get watchers() { return {
|
|
39
|
+
"toggled": ["validateToggled"]
|
|
40
|
+
}; }
|
|
41
|
+
static get style() { return PostTogglebuttonStyle0; }
|
|
42
|
+
}, [1, "post-togglebutton", {
|
|
43
|
+
"toggled": [1028]
|
|
44
|
+
}, undefined, {
|
|
45
|
+
"toggled": ["validateToggled"]
|
|
46
|
+
}]);
|
|
47
|
+
function defineCustomElement$1() {
|
|
48
|
+
if (typeof customElements === "undefined") {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const components = ["post-togglebutton"];
|
|
52
|
+
components.forEach(tagName => { switch (tagName) {
|
|
53
|
+
case "post-togglebutton":
|
|
54
|
+
if (!customElements.get(tagName)) {
|
|
55
|
+
customElements.define(tagName, PostTogglebutton$1);
|
|
56
|
+
}
|
|
57
|
+
break;
|
|
58
|
+
} });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const PostTogglebutton = PostTogglebutton$1;
|
|
62
|
+
const defineCustomElement = defineCustomElement$1;
|
|
63
|
+
|
|
64
|
+
export { PostTogglebutton, defineCustomElement };
|