@swisspost/design-system-components 9.0.0-next.7 → 9.0.0-next.9
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-url-3ffdd2fb.js +14 -0
- package/dist/cjs/debounce-1151afe3.js +12 -0
- package/dist/cjs/{index-e1f32cce.js → index-010dc207.js} +24 -27
- package/dist/cjs/{index-824d2b71.js → index-5d4e0aed.js} +2 -12
- package/dist/cjs/index.cjs.js +47 -42
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-bc44930e.js → package-8e810a59.js} +1 -1
- package/dist/cjs/{post-accordion-c55fef06.js → post-accordion-b9df8522.js} +3 -3
- package/dist/cjs/post-accordion-item-ecc6749f.js +63 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +5 -4
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/{post-avatar-10d7b5c0.js → post-avatar-f7236084.js} +2 -2
- package/dist/cjs/post-avatar.cjs.entry.js +3 -3
- package/dist/cjs/post-back-to-top-60762f8e.js +75 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
- package/dist/cjs/{post-banner-b286d37f.js → post-banner-9662f22c.js} +6 -6
- package/dist/cjs/post-banner.cjs.entry.js +5 -4
- package/dist/cjs/post-breadcrumb-b40732fc.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-039c9a4b.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +33 -0
- package/dist/cjs/{post-collapsible-trigger-c8b3e767.js → post-collapsible-trigger-143cf84a.js} +6 -14
- package/dist/cjs/post-collapsible_2.cjs.entry.js +6 -4
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-5f7fdf96.js +84 -0
- package/dist/cjs/post-footer.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-bb0b0b9e.js +74 -0
- package/dist/cjs/{post-popover-91a83e9d.js → post-popover-d0ce9dc6.js} +3 -3
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-57fcf949.js → post-rating-1082197c.js} +3 -3
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-header-ce56b760.js → post-tab-header-4b6d8d54.js} +3 -3
- package/dist/cjs/post-tab-header.cjs.entry.js +3 -3
- package/dist/cjs/{post-tab-panel-70e49260.js → post-tab-panel-60f211a5.js} +3 -3
- package/dist/cjs/post-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/{post-tabs-39262e55.js → post-tabs-1f797ce4.js} +8 -6
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{post-tag-b6bc5785.js → post-tag-ddaaaedc.js} +3 -3
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-megadropdown-trigger-9b9f1036.js → post-togglebutton-0984a694.js} +1789 -1234
- package/dist/cjs/{post-tooltip-8be3b2aa.js → post-tooltip-38c839a4.js} +4 -4
- package/dist/cjs/post-tooltip.cjs.entry.js +5 -4
- package/dist/cjs/slide-5d51abe8.js +28 -0
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +13 -9
- 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 +22 -7
- 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/post-banner.js +3 -3
- 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 -1
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +11 -1
- package/dist/collection/components/post-card-control/post-card-control.css +1 -1
- package/dist/collection/components/post-card-control/post-card-control.js +2 -2
- package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
- package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
- 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 -1
- package/dist/collection/components/post-header/post-header.js +74 -17
- package/dist/collection/components/post-icon/post-icon.js +1 -1
- package/dist/collection/components/post-language-option/post-language-option.css +1 -1
- package/dist/collection/components/post-language-option/post-language-option.js +25 -1
- 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 +1 -1
- package/dist/collection/components/post-list/post-list.js +3 -3
- package/dist/collection/components/post-list-item/post-list-item.js +1 -1
- package/dist/collection/components/post-logo/post-logo.js +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +15 -24
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +82 -68
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +80 -24
- package/dist/collection/components/post-menu/post-menu.js +6 -4
- package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +11 -1
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +2 -2
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.js +1 -1
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -4
- package/dist/collection/components/post-tag/post-tag.js +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -1
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +24 -6
- package/dist/collection/components/post-tooltip/post-tooltip.js +1 -1
- package/dist/collection/index.js +13 -9
- package/dist/collection/utils/breakpoints.js +46 -0
- package/dist/components/debounce.js +10 -0
- package/dist/components/index.js +13 -9
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +29 -11
- package/dist/components/post-accordion2.js +1 -1
- 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-banner2.js +3 -3
- package/dist/components/post-breadcrumb-item2.js +13 -3
- 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-closebutton2.js +1 -1
- package/dist/components/post-collapsible-trigger2.js +1 -9
- package/dist/components/post-collapsible2.js +2 -2
- 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-header2.js +55 -14
- package/dist/components/post-icon2.js +2 -2
- package/dist/components/post-language-option2.js +5 -3
- 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 +146 -0
- package/dist/components/post-list-item2.js +1 -1
- package/dist/components/post-list2.js +4 -4
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-mainnavigation2.js +17 -17
- package/dist/components/post-megadropdown-trigger2.js +63 -11
- package/dist/components/post-megadropdown2.js +48 -22
- package/dist/components/post-menu-item2.js +1 -1
- package/dist/components/post-menu-trigger2.js +11 -1
- package/dist/components/post-menu2.js +6 -4
- package/dist/components/post-popover2.js +1 -1
- package/dist/components/post-popovercontainer2.js +2 -2
- package/dist/components/post-rating2.js +1 -1
- package/dist/components/post-tab-header2.js +1 -1
- package/dist/components/post-tab-panel2.js +1 -1
- package/dist/components/post-tabs2.js +6 -4
- package/dist/components/post-tag2.js +1 -1
- package/dist/components/post-togglebutton2.js +23 -5
- package/dist/components/post-tooltip2.js +2 -2
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +565 -123
- package/dist/esm/check-url-a974431e.js +12 -0
- package/dist/esm/debounce-abe98cc2.js +10 -0
- package/dist/esm/{index-f8a00dc0.js → index-b49c9904.js} +1 -11
- package/dist/esm/{index-e1b64755.js → index-fb8d6be7.js} +24 -27
- package/dist/esm/index.js +25 -24
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-4d81f3c2.js +3 -0
- package/dist/esm/{post-accordion-7268e29b.js → post-accordion-ee54a3ef.js} +3 -3
- package/dist/esm/post-accordion-item-e10452dc.js +61 -0
- package/dist/esm/post-accordion-item.entry.js +5 -4
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/{post-avatar-19162f90.js → post-avatar-5572fa73.js} +2 -2
- package/dist/esm/post-avatar.entry.js +3 -3
- package/dist/esm/post-back-to-top-1d823c43.js +73 -0
- package/dist/esm/post-back-to-top.entry.js +7 -0
- package/dist/esm/{post-banner-132709ad.js → post-banner-78480475.js} +6 -6
- package/dist/esm/post-banner.entry.js +5 -4
- package/dist/esm/post-breadcrumb-aaa77f74.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-862aa961.js +270 -0
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-closebutton_15.entry.js +11 -0
- package/dist/esm/{post-collapsible-trigger-43fbbf03.js → post-collapsible-trigger-1c7833f8.js} +5 -13
- package/dist/esm/post-collapsible_2.entry.js +6 -4
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-b18875e7.js +82 -0
- package/dist/esm/post-footer.entry.js +3 -0
- package/dist/esm/post-menu-item-2906384b.js +71 -0
- package/dist/esm/{post-popover-abae1f3a.js → post-popover-2432bb3f.js} +3 -3
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-b963d4f2.js → post-rating-95cbdbb8.js} +3 -3
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/{post-tab-header-c16feb72.js → post-tab-header-dfea00ea.js} +3 -3
- package/dist/esm/post-tab-header.entry.js +3 -3
- package/dist/esm/{post-tab-panel-cb02df49.js → post-tab-panel-cafd9e04.js} +3 -3
- package/dist/esm/post-tab-panel.entry.js +3 -3
- package/dist/esm/{post-tabs-81085d7b.js → post-tabs-beef8eae.js} +8 -6
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/{post-tag-103bfff5.js → post-tag-a77e7af6.js} +3 -3
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-megadropdown-trigger-813b5140.js → post-togglebutton-395bf3f0.js} +1785 -1235
- package/dist/esm/{post-tooltip-2c5ff736.js → post-tooltip-b298039a.js} +4 -4
- package/dist/esm/post-tooltip.entry.js +5 -4
- package/dist/esm/slide-3422b8a3.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-0711f76d.entry.js +1 -0
- package/dist/post-components/p-095a06f6.entry.js +1 -0
- package/dist/post-components/p-0b5a5f32.js +1 -0
- package/dist/post-components/p-135fa60f.js +1 -0
- package/dist/post-components/p-18e38d8a.js +1 -0
- package/dist/post-components/p-2e1ec074.entry.js +1 -0
- package/dist/post-components/p-4202b433.entry.js +1 -0
- package/dist/post-components/p-45773f59.js +1 -0
- package/dist/post-components/{p-bb103905.js → p-4953de7e.js} +1 -1
- package/dist/post-components/p-4f67c5f5.entry.js +1 -0
- package/dist/post-components/{p-6f56a13d.js → p-4f9746f6.js} +2 -2
- package/dist/post-components/p-5075c672.entry.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-67036798.entry.js +1 -0
- package/dist/post-components/{p-c819933c.js → p-6d953fb2.js} +1 -1
- package/dist/post-components/p-6edb0ac5.js +1 -0
- package/dist/post-components/{p-fa7af203.js → p-6f8f39ca.js} +1 -1
- package/dist/post-components/p-7503a623.js +1 -0
- package/dist/post-components/p-761b24c7.entry.js +1 -0
- package/dist/post-components/{p-0f699dbc.js → p-77c4c1d2.js} +1 -1
- package/dist/post-components/p-7cf0c2ad.js +1 -0
- package/dist/post-components/p-856c14d6.entry.js +1 -0
- package/dist/post-components/p-866bf50a.entry.js +1 -0
- package/dist/post-components/p-8d621781.js +1 -0
- package/dist/post-components/p-8fe2d72c.entry.js +1 -0
- package/dist/post-components/p-9ad5088f.entry.js +1 -0
- package/dist/post-components/{p-8b6f7f04.js → p-a1d2b90e.js} +1 -1
- package/dist/post-components/p-a521419d.entry.js +1 -0
- package/dist/post-components/p-aa538648.js +1 -0
- package/dist/post-components/p-afdbee2f.js +1 -0
- package/dist/post-components/p-b02817f2.entry.js +1 -0
- package/dist/post-components/p-b157dcba.entry.js +1 -0
- package/dist/post-components/p-b22656b1.js +1 -0
- package/dist/post-components/{p-ed834dde.js → p-bdbd11cb.js} +1 -1
- package/dist/post-components/{p-3eab790d.js → p-c0ae9886.js} +1 -1
- package/dist/post-components/p-c537e196.entry.js +1 -0
- package/dist/post-components/p-d4f93f2b.js +1 -0
- package/dist/post-components/p-dca4246a.entry.js +1 -0
- package/dist/post-components/p-f319b026.js +1 -0
- package/dist/post-components/p-f4b7b379.js +1 -0
- package/dist/post-components/p-fac66087.entry.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-back-to-top/post-back-to-top.d.ts +19 -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 +1 -0
- package/dist/types/components/post-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +13 -5
- package/dist/types/components/post-language-option/post-language-option.d.ts +5 -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-mainnavigation/post-mainnavigation.d.ts +10 -1
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +24 -12
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +20 -5
- package/dist/types/components/post-menu/post-menu.d.ts +1 -0
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +4 -2
- package/dist/types/components.d.ts +150 -29
- package/dist/types/index.d.ts +13 -9
- package/dist/types/utils/breakpoints.d.ts +11 -0
- package/loaders/debounce.js +10 -0
- package/loaders/index.d.ts +8 -0
- package/loaders/index.js +4 -0
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -82
- package/loaders/post-accordion-item2.js +102 -0
- package/loaders/post-accordion.js +1 -1
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +103 -0
- package/loaders/post-banner.js +4 -4
- package/loaders/post-breadcrumb-item.js +1 -70
- 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.js +1 -1
- package/loaders/post-collapsible-trigger2.js +1 -9
- package/loaders/post-collapsible2.js +1 -1
- package/loaders/post-footer.d.ts +11 -0
- package/loaders/post-footer.js +127 -0
- package/loaders/post-header.js +55 -14
- package/loaders/post-icon2.js +2 -2
- package/loaders/post-language-option.js +4 -2
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +149 -0
- package/loaders/post-list-item.js +1 -1
- package/loaders/post-list.js +4 -4
- package/loaders/post-logo.js +2 -2
- package/loaders/post-mainnavigation.js +17 -17
- package/loaders/post-megadropdown-trigger.js +63 -11
- package/loaders/post-megadropdown.js +48 -22
- package/loaders/post-menu-item.js +1 -31
- package/loaders/post-menu-item2.js +33 -0
- package/loaders/post-menu-trigger.js +1 -90
- package/{dist/esm/post-menu-trigger-b84f728d.js → loaders/post-menu-trigger2.js} +41 -12
- package/loaders/post-menu.js +1 -199
- package/{dist/esm/post-menu-62c3e49a.js → loaders/post-menu2.js} +42 -13
- package/loaders/post-popover.js +1 -1
- package/loaders/post-popovercontainer2.js +2 -2
- package/loaders/post-rating.js +1 -1
- package/loaders/post-tab-header.js +1 -1
- package/loaders/post-tab-panel.js +1 -1
- package/loaders/post-tabs.js +6 -4
- package/loaders/post-tag.js +1 -1
- package/loaders/post-togglebutton.js +23 -5
- package/loaders/post-tooltip.js +1 -1
- package/loaders/slide.js +25 -0
- package/package.json +6 -4
- package/dist/cjs/post-accordion-item-641f0b42.js +0 -52
- package/dist/cjs/post-breadcrumb-item-8cdc59a8.js +0 -49
- package/dist/cjs/post-breadcrumb-item.cjs.entry.js +0 -15
- package/dist/cjs/post-card-control-fc4aca2a.js +0 -272
- package/dist/cjs/post-closebutton_10.cjs.entry.js +0 -25
- package/dist/cjs/post-language-option-8c1ec4fd.js +0 -68
- package/dist/cjs/post-language-option.cjs.entry.js +0 -15
- package/dist/cjs/post-menu-5a71a6fe.js +0 -176
- package/dist/cjs/post-menu-item-5c5c1aaf.js +0 -20
- package/dist/cjs/post-menu-item.cjs.entry.js +0 -11
- package/dist/cjs/post-menu-trigger-02d128c4.js +0 -75
- package/dist/cjs/post-menu-trigger.cjs.entry.js +0 -13
- package/dist/cjs/post-menu.cjs.entry.js +0 -11
- package/dist/cjs/post-togglebutton-2f39442e.js +0 -28
- package/dist/cjs/post-togglebutton.cjs.entry.js +0 -11
- package/dist/esm/package-180da9f3.js +0 -3
- package/dist/esm/post-accordion-item-a5a76abb.js +0 -50
- package/dist/esm/post-breadcrumb-item-5a77f988.js +0 -47
- package/dist/esm/post-breadcrumb-item.entry.js +0 -7
- package/dist/esm/post-card-control-5be9c80a.js +0 -270
- package/dist/esm/post-closebutton_10.entry.js +0 -8
- package/dist/esm/post-language-option-f41240c3.js +0 -66
- package/dist/esm/post-language-option.entry.js +0 -7
- package/dist/esm/post-menu-item-f63a1521.js +0 -18
- package/dist/esm/post-menu-item.entry.js +0 -3
- package/dist/esm/post-menu-trigger.entry.js +0 -5
- package/dist/esm/post-menu.entry.js +0 -3
- package/dist/esm/post-togglebutton-0e714838.js +0 -26
- package/dist/esm/post-togglebutton.entry.js +0 -3
- package/dist/post-components/p-0338f9da.js +0 -1
- package/dist/post-components/p-06980a04.js +0 -1
- package/dist/post-components/p-0af7dfbb.js +0 -1
- package/dist/post-components/p-12262945.entry.js +0 -1
- package/dist/post-components/p-2504dace.entry.js +0 -1
- package/dist/post-components/p-27343d32.entry.js +0 -1
- package/dist/post-components/p-2a456317.js +0 -1
- package/dist/post-components/p-2c3980d2.js +0 -1
- package/dist/post-components/p-31d38040.js +0 -1
- package/dist/post-components/p-339e000e.entry.js +0 -1
- package/dist/post-components/p-3b325360.entry.js +0 -1
- package/dist/post-components/p-3e65ba47.js +0 -1
- package/dist/post-components/p-3f417208.entry.js +0 -1
- package/dist/post-components/p-4922deaf.entry.js +0 -1
- package/dist/post-components/p-6c7546b8.entry.js +0 -1
- package/dist/post-components/p-7eee2b6a.js +0 -1
- package/dist/post-components/p-816623f0.entry.js +0 -1
- package/dist/post-components/p-83cd3885.entry.js +0 -1
- package/dist/post-components/p-9abe554b.js +0 -1
- package/dist/post-components/p-9ea6103e.entry.js +0 -1
- package/dist/post-components/p-a0a7c2c1.entry.js +0 -1
- package/dist/post-components/p-abf9ffdc.entry.js +0 -1
- package/dist/post-components/p-b4a2c7b7.entry.js +0 -1
- package/dist/post-components/p-b7ef401f.js +0 -1
- package/dist/post-components/p-b8a9cf2d.js +0 -1
- package/dist/post-components/p-ccd8a221.entry.js +0 -1
- package/dist/post-components/p-cfc1727f.entry.js +0 -1
- package/dist/post-components/p-d4465c2b.js +0 -1
- package/dist/post-components/p-d4cef624.js +0 -1
- package/dist/post-components/p-da449573.js +0 -1
- package/dist/post-components/p-df5bdda5.entry.js +0 -1
- package/dist/post-components/p-f1416918.entry.js +0 -1
- package/dist/post-components/p-f171b18b.entry.js +0 -1
- package/dist/post-components/p-f4dbd35f.entry.js +0 -1
- package/dist/post-components/p-f6b44820.js +0 -1
|
@@ -1,20 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { checkType } from "../../utils/index";
|
|
2
4
|
export class PostMegadropdownTrigger {
|
|
3
5
|
constructor() {
|
|
4
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Reference to the slotted button within the trigger, if present.
|
|
8
|
+
* Used to manage click and key events for mega dropdown control.
|
|
9
|
+
*/
|
|
10
|
+
this.slottedButton = null;
|
|
11
|
+
this.for = undefined;
|
|
12
|
+
this.ariaExpanded = false;
|
|
5
13
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Watch for changes to the `for` property to validate its type and ensure it is a string.
|
|
16
|
+
* @param forValue - The new value of the `for` property.
|
|
17
|
+
*/
|
|
18
|
+
validateControlFor(forValue = this.for) {
|
|
19
|
+
checkType(forValue, 'string', 'The "for" property is required and should be a string.');
|
|
20
|
+
}
|
|
21
|
+
get megadropdown() {
|
|
22
|
+
const ref = document.getElementById(this.for);
|
|
23
|
+
return ref && ref.localName === 'post-megadropdown'
|
|
24
|
+
? ref
|
|
25
|
+
: null;
|
|
26
|
+
}
|
|
27
|
+
handleToggle() {
|
|
28
|
+
if (this.megadropdown) {
|
|
29
|
+
this.megadropdown.toggle(this.host);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
console.warn(`No post-megadropdown found with ID: ${this.for}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
this.validateControlFor();
|
|
37
|
+
// Check if the mega dropdown attached to the trigger is expanded or not
|
|
38
|
+
document.addEventListener('postToggleMegadropdown', (event) => {
|
|
39
|
+
if (event.target.id === this.for) {
|
|
40
|
+
this.ariaExpanded = event.detail;
|
|
41
|
+
if (this.slottedButton) {
|
|
42
|
+
this.slottedButton.setAttribute('aria-expanded', this.ariaExpanded.toString());
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
this.slottedButton = this.host.querySelector('button');
|
|
47
|
+
if (this.slottedButton) {
|
|
48
|
+
this.slottedButton.setAttribute('aria-haspopup', 'menu');
|
|
49
|
+
this.slottedButton.addEventListener('click', () => {
|
|
50
|
+
this.handleToggle();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
console.warn('No button found within post-megadropdown-trigger');
|
|
55
|
+
}
|
|
9
56
|
}
|
|
10
57
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '4ab919adeaa51fc12d45131fa540c76fb3ba73d9', "data-version": version, "tab-index": "-1" }, h("button", { key: 'e7dac321691cdb19a4874fd0b2097227d077af35' }, h("slot", { key: 'beffc38d2d35a67e74364c3b40b6d39896aa4de3' }))));
|
|
12
59
|
}
|
|
13
60
|
static get is() { return "post-megadropdown-trigger"; }
|
|
14
|
-
static get encapsulation() { return "shadow"; }
|
|
15
61
|
static get originalStyleUrls() {
|
|
16
62
|
return {
|
|
17
|
-
"$": ["
|
|
63
|
+
"$": ["post-megadropdown-trigger.scss"]
|
|
18
64
|
};
|
|
19
65
|
}
|
|
20
66
|
static get styleUrls() {
|
|
@@ -22,27 +68,37 @@ export class PostMegadropdownTrigger {
|
|
|
22
68
|
"$": ["post-megadropdown-trigger.css"]
|
|
23
69
|
};
|
|
24
70
|
}
|
|
71
|
+
static get properties() {
|
|
72
|
+
return {
|
|
73
|
+
"for": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "string",
|
|
78
|
+
"resolved": "string",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": true,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "ID of the mega dropdown element that this trigger is linked to. Used to open and close the specified mega dropdown."
|
|
86
|
+
},
|
|
87
|
+
"attribute": "for",
|
|
88
|
+
"reflect": false
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
25
92
|
static get states() {
|
|
26
93
|
return {
|
|
27
|
-
"
|
|
94
|
+
"ariaExpanded": {}
|
|
28
95
|
};
|
|
29
96
|
}
|
|
30
|
-
static get
|
|
97
|
+
static get elementRef() { return "host"; }
|
|
98
|
+
static get watchers() {
|
|
31
99
|
return [{
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"bubbles": true,
|
|
35
|
-
"cancelable": true,
|
|
36
|
-
"composed": true,
|
|
37
|
-
"docs": {
|
|
38
|
-
"tags": [],
|
|
39
|
-
"text": "Emits after each toggle"
|
|
40
|
-
},
|
|
41
|
-
"complexType": {
|
|
42
|
-
"original": "any",
|
|
43
|
-
"resolved": "any",
|
|
44
|
-
"references": {}
|
|
45
|
-
}
|
|
100
|
+
"propName": "for",
|
|
101
|
+
"methodName": "validateControlFor"
|
|
46
102
|
}];
|
|
47
103
|
}
|
|
48
104
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
import { isFocusable } from "../../utils/is-focusable";
|
|
4
|
+
import { getRoot } from "../../utils/index";
|
|
4
5
|
export class PostMenu {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.lastFocusedElement = null;
|
|
@@ -12,7 +13,7 @@ export class PostMenu {
|
|
|
12
13
|
TAB: 'Tab',
|
|
13
14
|
HOME: 'Home',
|
|
14
15
|
END: 'End',
|
|
15
|
-
ESCAPE: 'Escape'
|
|
16
|
+
ESCAPE: 'Escape',
|
|
16
17
|
};
|
|
17
18
|
this.handleKeyDown = (e) => {
|
|
18
19
|
e.stopPropagation();
|
|
@@ -34,6 +35,7 @@ export class PostMenu {
|
|
|
34
35
|
this.isVisible = false;
|
|
35
36
|
}
|
|
36
37
|
connectedCallback() {
|
|
38
|
+
this.root = getRoot(this.host);
|
|
37
39
|
this.host.addEventListener('keydown', this.handleKeyDown);
|
|
38
40
|
this.host.addEventListener('click', this.handleClick);
|
|
39
41
|
}
|
|
@@ -61,7 +63,7 @@ export class PostMenu {
|
|
|
61
63
|
async show(target) {
|
|
62
64
|
if (this.popoverRef) {
|
|
63
65
|
await this.popoverRef.show(target);
|
|
64
|
-
this.lastFocusedElement =
|
|
66
|
+
this.lastFocusedElement = this.root.activeElement; // Use root's activeElement
|
|
65
67
|
const menuItems = this.getSlottedItems();
|
|
66
68
|
if (menuItems.length > 0) {
|
|
67
69
|
menuItems[0].focus();
|
|
@@ -90,7 +92,7 @@ export class PostMenu {
|
|
|
90
92
|
if (!menuItems.length) {
|
|
91
93
|
return;
|
|
92
94
|
}
|
|
93
|
-
const currentFocusedElement =
|
|
95
|
+
const currentFocusedElement = this.root.activeElement; // Use root's activeElement
|
|
94
96
|
let currentIndex = menuItems.findIndex(el => el === currentFocusedElement);
|
|
95
97
|
switch (e.key) {
|
|
96
98
|
case this.KEYCODES.UP:
|
|
@@ -135,7 +137,7 @@ export class PostMenu {
|
|
|
135
137
|
return menuItems;
|
|
136
138
|
}
|
|
137
139
|
render() {
|
|
138
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '48e04f36dc7a3d8ed81b9570d1a4c931ace3cadd', "data-version": version }, h("post-popovercontainer", { key: '58532143bd7a8be7ea77cbd0a929fa74ee0ee890', placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '967bf8aa936611ac6d533d9a8a1e176ee84b2a73', class: "popover-container", part: "popover-container" }, h("slot", { key: '4eb6b7fe34e8ea1df0d7cd8de31b57452442c3bb' })))));
|
|
139
141
|
}
|
|
140
142
|
static get is() { return "post-menu"; }
|
|
141
143
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,7 +2,7 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
3
|
export class PostMenuItem {
|
|
4
4
|
render() {
|
|
5
|
-
return (h(Host, { key: '
|
|
5
|
+
return (h(Host, { key: '0f53b8f818c87c59b0ec56e522852af0966e37ad', role: "menuitem", "data-version": version }, h("slot", { key: '4b821e1282df9bcfd297d74af56dfd5605baa0ee' })));
|
|
6
6
|
}
|
|
7
7
|
static get is() { return "post-menu-item"; }
|
|
8
8
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,6 +43,16 @@ export class PostMenuTrigger {
|
|
|
43
43
|
this.root = getRoot(this.host);
|
|
44
44
|
this.validateControlFor();
|
|
45
45
|
this.slottedButton = this.host.querySelector('button');
|
|
46
|
+
// Check if the slottedButton is within a web component
|
|
47
|
+
if (!this.slottedButton) {
|
|
48
|
+
const webComponent = this.host.querySelector('.menu-trigger-webc');
|
|
49
|
+
if (webComponent.shadowRoot) {
|
|
50
|
+
const slottedButton = webComponent.shadowRoot.querySelector('button');
|
|
51
|
+
if (slottedButton) {
|
|
52
|
+
this.slottedButton = slottedButton;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
46
56
|
if (this.slottedButton) {
|
|
47
57
|
this.slottedButton.setAttribute('aria-haspopup', 'menu');
|
|
48
58
|
this.slottedButton.addEventListener('click', () => {
|
|
@@ -55,7 +65,7 @@ export class PostMenuTrigger {
|
|
|
55
65
|
}
|
|
56
66
|
}
|
|
57
67
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
68
|
+
return (h(Host, { key: '64e9e7e6448160c7b52fc732b5107e94e9776678', "data-version": version, "tab-index": "-1" }, h("slot", { key: '711d641147cec0c26c7a3917f9302f1bbbee0d73' })));
|
|
59
69
|
}
|
|
60
70
|
static get is() { return "post-menu-trigger"; }
|
|
61
71
|
static get originalStyleUrls() {
|
|
@@ -88,7 +88,7 @@ export class PostPopover {
|
|
|
88
88
|
this.triggers.forEach(trigger => trigger.setAttribute('aria-expanded', 'false'));
|
|
89
89
|
}
|
|
90
90
|
render() {
|
|
91
|
-
return (h(Host, { key: '
|
|
91
|
+
return (h(Host, { key: 'fefbc18d8ca6246199a7843edb3e05b2bc134b52', "data-version": version }, h("post-popovercontainer", { key: 'bf0d5fad73c87674c0f7d5b0a3a84836e8f5126c', arrow: this.arrow, placement: this.placement, ref: e => (this.popoverRef = e) }, h("div", { key: '08aa8cd87c49f87ee72bf98dd6d07dea52bb49c8', class: "popover-container" }, h("div", { key: '7fae463b6633d105ab8e112c3b564256ea574721', class: "popover-content" }, h("slot", { key: '47a529a55502ccf290c1bf7fcebc68502fbac569' })), h("button", { key: 'ede2f23b3435fec596b0e73c285eda6c1a4fa449', class: "btn-close", onClick: () => this.hide() }, h("span", { key: '4df83539eb8f5cd80f0f7548db217e17a8474d8d', class: "visually-hidden" }, this.closeButtonCaption))))));
|
|
92
92
|
}
|
|
93
93
|
static get is() { return "post-popover"; }
|
|
94
94
|
static get encapsulation() { return "shadow"; }
|
|
@@ -137,9 +137,9 @@ export class PostPopovercontainer {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
140
|
+
return (h(Host, { key: '23e391236e263f7ae7c66c994b2847bcba269b37', "data-version": version }, this.arrow && (h("span", { key: '6c6053b2fd315a5940a2c3493182249782b2492c', class: "arrow", ref: el => {
|
|
141
141
|
this.arrowRef = el;
|
|
142
|
-
} })), h("slot", { key: '
|
|
142
|
+
} })), h("slot", { key: 'ff998f110f42a22e886eba398285c41d94718bab' })));
|
|
143
143
|
}
|
|
144
144
|
static get is() { return "post-popovercontainer"; }
|
|
145
145
|
static get originalStyleUrls() {
|
|
@@ -64,7 +64,7 @@ export class PostRating {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
render() {
|
|
67
|
-
return (h(Host, { key: '
|
|
67
|
+
return (h(Host, { key: '4d1fbd0cc858dea3d8eb576e2968198e4569db26', "data-version": version }, h("div", { key: '7a64af9155486be01e2ccbabcb2bc34f4531a323', role: "slider", class: "rating", tabindex: "0", "aria-label": this.label, "aria-valuemin": "0", "aria-valuemax": this.stars, "aria-valuenow": this.currentRating, "aria-valuetext": `${this.currentRating} out of ${this.stars}`, "aria-readonly": this.readonly ? 'true' : 'false', onKeyDown: this.keydownHandler, onBlur: this.blurHandler }, Array.from({ length: this.stars }).map((v, i) => (h("div", { key: `star-${v}`, "aria-hidden": "true", class: {
|
|
68
68
|
'star': true,
|
|
69
69
|
'before-hover': i < this.hoveredIndex,
|
|
70
70
|
'active': i < Math.round(this.currentRating),
|
|
@@ -16,7 +16,7 @@ export class PostTabHeader {
|
|
|
16
16
|
this.tabId = `tab-${this.host.id || crypto.randomUUID()}`;
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '97ce31f2069ea710e4d1f15879f323a0966a072d', id: this.tabId, role: "tab", "data-version": version, "aria-selected": "false", tabindex: "-1", class: "tab-title", slot: "tabs" }, h("slot", { key: '78a7154fdbf6cb51069c84dc545ae6bb81f66671' })));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "post-tab-header"; }
|
|
22
22
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,7 +13,7 @@ export class PostTabPanel {
|
|
|
13
13
|
this.panelId = `panel-${this.host.id || crypto.randomUUID()}`;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '99270e53616a4dce990388b8cd825295fcdcb7d2', "data-version": version, id: this.panelId, role: "tabpanel" }, h("slot", { key: '049a0e04937e286786a54eb6f6fd5fe909d85cea' })));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "post-tab-panel"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: 'ee9628ed2eb47e6e41001f22c7a455da4b0c30bc', "data-version": version }, h("div", { key: 'd4387bfa9efb56d02403ee51aa3a3bce53c044bd', class: "tabs-wrapper", part: "tabs" }, h("div", { key: '020526d64754fb7c61b397894291d19d22a754ed', class: "tabs", role: "tablist" }, h("slot", { key: '875f7ccaf2f980087fbc461c22ed223f00bcb4ba', name: "tabs", onSlotchange: () => this.enableTabs() }))), h("div", { key: 'c4ecb26258e2cf20394b89c9ae20fd575f13bae6', class: "tab-content", part: "content" }, h("slot", { key: 'd1e60679e580df4a903d021a2985c4299a356d28', onSlotchange: () => this.moveMisplacedTabs() }))));
|
|
146
148
|
}
|
|
147
149
|
static get is() { return "post-tabs"; }
|
|
148
150
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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: '32c08ea43811e47b2560e335b59486c356fa5a9b', "data-version": version }, h("div", { key: 'f04dc3e4c5b14edea0e1fd1cab581c286f3d74ff', class: this.classes }, this.icon ? h("post-icon", { name: this.icon }) : null, h("div", { key: '701e75bb1c31392d8f378339c5a31920cb5d8a7e', class: "tag-text" }, h("slot", { key: '6470a3ba2586bdc9ded20ff686f2c6ca58c47c69' })))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "post-tag"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{cursor:pointer}
|
|
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}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { version } from "../../../../package";
|
|
3
|
+
import { checkType } from "../../utils/index";
|
|
3
4
|
/**
|
|
4
|
-
* @slot
|
|
5
|
-
* @slot untoggled - Slot for content displayed when the button is in the "off" state.
|
|
5
|
+
* @slot default - Slot for the content of the button.
|
|
6
6
|
*/
|
|
7
7
|
export class PostTogglebutton {
|
|
8
8
|
constructor() {
|
|
@@ -10,14 +10,25 @@ export class PostTogglebutton {
|
|
|
10
10
|
this.toggled = !this.toggled;
|
|
11
11
|
};
|
|
12
12
|
this.handleKeydown = (event) => {
|
|
13
|
-
|
|
14
|
-
|
|
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();
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
this.toggled = false;
|
|
18
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
|
+
}
|
|
19
30
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: 'f20b7e5f7cd14c1b0addf12600df27e7e5dab841', slot: "post-togglebutton", "data-version": version, role: "button", tabindex: "0", "aria-pressed": this.toggled.toString() }, h("slot", { key: '526540ce9a66fa08f0142e674811fe88e3abcfa6' })));
|
|
21
32
|
}
|
|
22
33
|
static get is() { return "post-togglebutton"; }
|
|
23
34
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,9 +59,16 @@ export class PostTogglebutton {
|
|
|
48
59
|
"text": "If `true`, the button is in the \"on\" state, otherwise it is in the \"off\" state."
|
|
49
60
|
},
|
|
50
61
|
"attribute": "toggled",
|
|
51
|
-
"reflect":
|
|
62
|
+
"reflect": false,
|
|
52
63
|
"defaultValue": "false"
|
|
53
64
|
}
|
|
54
65
|
};
|
|
55
66
|
}
|
|
67
|
+
static get elementRef() { return "host"; }
|
|
68
|
+
static get watchers() {
|
|
69
|
+
return [{
|
|
70
|
+
"propName": "toggled",
|
|
71
|
+
"methodName": "validateToggled"
|
|
72
|
+
}];
|
|
73
|
+
}
|
|
56
74
|
}
|
|
@@ -214,7 +214,7 @@ export class PostTooltip {
|
|
|
214
214
|
}
|
|
215
215
|
render() {
|
|
216
216
|
const popoverClass = `${this.arrow ? ' has-arrow' : ''}`;
|
|
217
|
-
return (h(Host, { key: '
|
|
217
|
+
return (h(Host, { key: '71db1ccf3cf929d76550b08e69c8594479eaa84f', "data-version": version, role: "tooltip", onPointerOver: this.handleInterest, onPointerOut: this.handleInterestLost, onFocusIn: this.handleInterest, onFocusOut: this.handleInterestLost }, h("post-popovercontainer", { key: 'b9a38cabbfc2cf2eb9b257bca32022b5d97aac7c', class: popoverClass, arrow: this.arrow, placement: this.placement, ref: (el) => (this.popoverRef = el) }, h("slot", { key: '316b55f5fc55d9607205496a87f02a0a5fa197cf' }))));
|
|
218
218
|
}
|
|
219
219
|
static get is() { return "post-tooltip"; }
|
|
220
220
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/index.js
CHANGED
|
@@ -1,31 +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 { PostAvatar } from './components/post-avatar/post-avatar';
|
|
5
|
+
export { PostBackToTop } from './components/post-back-to-top/post-back-to-top';
|
|
4
6
|
export { PostBanner } from './components/post-banner/post-banner';
|
|
7
|
+
export { PostBreadcrumb } from './components/post-breadcrumb/post-breadcrumb';
|
|
5
8
|
export { PostBreadcrumbItem } from './components/post-breadcrumb-item/post-breadcrumb-item';
|
|
6
|
-
export { PostAvatar } from './components/post-avatar/post-avatar';
|
|
7
9
|
export { PostCardControl } from './components/post-card-control/post-card-control';
|
|
8
10
|
export { PostClosebutton } from './components/post-closebutton/post-closebutton';
|
|
9
11
|
export { PostCollapsible } from './components/post-collapsible/post-collapsible';
|
|
10
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';
|
|
11
15
|
export { PostIcon } from './components/post-icon/post-icon';
|
|
12
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';
|
|
13
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';
|
|
14
24
|
export { PostMenu } from './components/post-menu/post-menu';
|
|
15
|
-
export { PostMenuTrigger } from './components/post-menu-trigger/post-menu-trigger';
|
|
16
25
|
export { PostMenuItem } from './components/post-menu-item/post-menu-item';
|
|
26
|
+
export { PostMenuTrigger } from './components/post-menu-trigger/post-menu-trigger';
|
|
17
27
|
export { PostPopover } from './components/post-popover/post-popover';
|
|
18
28
|
export { PostPopovercontainer } from './components/post-popovercontainer/post-popovercontainer';
|
|
19
29
|
export { PostRating } from './components/post-rating/post-rating';
|
|
20
30
|
export { PostTabs } from './components/post-tabs/post-tabs';
|
|
21
31
|
export { PostTabHeader } from './components/post-tab-header/post-tab-header';
|
|
22
32
|
export { PostTabPanel } from './components/post-tab-panel/post-tab-panel';
|
|
23
|
-
export { PostTooltip } from './components/post-tooltip/post-tooltip';
|
|
24
33
|
export { PostTag } from './components/post-tag/post-tag';
|
|
25
34
|
export { PostTogglebutton } from './components/post-togglebutton/post-togglebutton';
|
|
26
|
-
export {
|
|
27
|
-
export { PostListItem } from './components/post-list-item/post-list-item';
|
|
28
|
-
export { PostHeader } from './components/post-header/post-header';
|
|
29
|
-
export { PostMainnavigation } from './components/post-mainnavigation/post-mainnavigation';
|
|
30
|
-
export { PostMegadropdown } from './components/post-megadropdown/post-megadropdown';
|
|
31
|
-
export { PostMegadropdownTrigger } from './components/post-megadropdown-trigger/post-megadropdown-trigger';
|
|
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();
|
package/dist/components/index.js
CHANGED
|
@@ -1,31 +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 PostAvatar } from './post-avatar2.js';
|
|
5
|
+
export { P as PostBackToTop } from './post-back-to-top2.js';
|
|
4
6
|
export { P as PostBanner } from './post-banner2.js';
|
|
7
|
+
export { P as PostBreadcrumb } from './post-breadcrumb2.js';
|
|
5
8
|
export { P as PostBreadcrumbItem } from './post-breadcrumb-item2.js';
|
|
6
|
-
export { P as PostAvatar } from './post-avatar2.js';
|
|
7
9
|
export { P as PostCardControl } from './post-card-control2.js';
|
|
8
10
|
export { P as PostClosebutton } from './post-closebutton2.js';
|
|
9
11
|
export { P as PostCollapsible } from './post-collapsible2.js';
|
|
10
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';
|
|
11
15
|
export { P as PostIcon } from './post-icon2.js';
|
|
12
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';
|
|
13
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';
|
|
14
24
|
export { P as PostMenu } from './post-menu2.js';
|
|
15
|
-
export { P as PostMenuTrigger } from './post-menu-trigger2.js';
|
|
16
25
|
export { P as PostMenuItem } from './post-menu-item2.js';
|
|
26
|
+
export { P as PostMenuTrigger } from './post-menu-trigger2.js';
|
|
17
27
|
export { P as PostPopover } from './post-popover2.js';
|
|
18
28
|
export { P as PostPopovercontainer } from './post-popovercontainer2.js';
|
|
19
29
|
export { P as PostRating } from './post-rating2.js';
|
|
20
30
|
export { P as PostTabs } from './post-tabs2.js';
|
|
21
31
|
export { P as PostTabHeader } from './post-tab-header2.js';
|
|
22
32
|
export { P as PostTabPanel } from './post-tab-panel2.js';
|
|
23
|
-
export { P as PostTooltip } from './post-tooltip2.js';
|
|
24
33
|
export { P as PostTag } from './post-tag2.js';
|
|
25
34
|
export { P as PostTogglebutton } from './post-togglebutton2.js';
|
|
26
|
-
export { P as
|
|
27
|
-
export { P as PostListItem } from './post-list-item2.js';
|
|
28
|
-
export { P as PostHeader } from './post-header2.js';
|
|
29
|
-
export { P as PostMainnavigation } from './post-mainnavigation2.js';
|
|
30
|
-
export { P as PostMegadropdown } from './post-megadropdown2.js';
|
|
31
|
-
export { P as PostMegadropdownTrigger } from './post-megadropdown-trigger2.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 };
|