@swisspost/design-system-components 9.0.0-next.0 → 9.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/check-type-64af82a9.js +16 -0
- package/dist/cjs/check-url-3ffdd2fb.js +14 -0
- package/dist/cjs/debounce-1151afe3.js +12 -0
- package/dist/cjs/get-root-7a3498ef.js +11 -0
- package/dist/cjs/{index-01f30442.js → index-5d4e0aed.js} +4 -27
- package/dist/cjs/{index-c15bd800.js → index-f1b08cdb.js} +45 -16
- package/dist/cjs/index.browser-2f65f583.js +15 -0
- package/dist/cjs/index.cjs.js +51 -24
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{package-ebef502e.js → package-aaec3cba.js} +1 -1
- package/dist/cjs/{post-accordion-677c6891.js → post-accordion-85bf5e0a.js} +13 -11
- package/dist/cjs/post-accordion-item-957b3464.js +64 -0
- package/dist/cjs/post-accordion-item.cjs.entry.js +7 -4
- package/dist/cjs/post-accordion.cjs.entry.js +3 -3
- package/dist/cjs/post-avatar-58540591.js +148 -0
- package/dist/cjs/post-avatar.cjs.entry.js +13 -0
- package/dist/cjs/post-back-to-top-db5c7d01.js +75 -0
- package/dist/cjs/post-back-to-top.cjs.entry.js +15 -0
- package/dist/cjs/post-banner-727866d5.js +91 -0
- package/dist/cjs/post-banner.cjs.entry.js +19 -0
- package/dist/cjs/post-breadcrumb-cacca682.js +111 -0
- package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +17 -0
- package/dist/cjs/post-breadcrumb.cjs.entry.js +13 -0
- package/dist/cjs/post-card-control-f5d72ddc.js +272 -0
- package/dist/cjs/post-card-control.cjs.entry.js +3 -3
- package/dist/cjs/post-closebutton_15.cjs.entry.js +34 -0
- package/dist/cjs/{post-collapsible-trigger-4f44ca4a.js → post-collapsible-trigger-067d1f4c.js} +14 -26
- package/dist/cjs/post-collapsible_2.cjs.entry.js +8 -4
- package/dist/cjs/post-components.cjs.js +2 -2
- package/dist/cjs/post-footer-beeb36c8.js +84 -0
- package/dist/cjs/post-footer.cjs.entry.js +11 -0
- package/dist/cjs/post-menu-item-e0e214b9.js +69 -0
- package/dist/cjs/post-popover-7acbdf17.js +104 -0
- package/dist/cjs/post-popover.cjs.entry.js +3 -3
- package/dist/cjs/{post-rating-ac9e71aa.js → post-rating-ac1b9b3c.js} +4 -4
- package/dist/cjs/post-rating.cjs.entry.js +3 -3
- package/dist/cjs/post-tab-header-a3d28719.js +33 -0
- package/dist/cjs/post-tab-header.cjs.entry.js +4 -3
- package/dist/cjs/{post-tab-panel-787bcd5d.js → post-tab-panel-4562e265.js} +5 -4
- package/dist/cjs/post-tab-panel.cjs.entry.js +4 -3
- package/dist/cjs/{post-tabs-1b7aad55.js → post-tabs-80f65e1d.js} +9 -7
- package/dist/cjs/post-tabs.cjs.entry.js +3 -3
- package/dist/cjs/post-tag-5741a78d.js +47 -0
- package/dist/cjs/post-tag.cjs.entry.js +3 -3
- package/dist/cjs/{post-popovercontainer-322d3160.js → post-togglebutton-245e33f1.js} +1082 -21
- package/dist/cjs/{post-tooltip-d1d2cd3a.js → post-tooltip-cefce5e1.js} +46 -15
- package/dist/cjs/post-tooltip.cjs.entry.js +6 -4
- package/dist/cjs/slide-5d51abe8.js +28 -0
- package/dist/collection/animations/slide.js +23 -0
- package/dist/collection/collection-manifest.json +21 -3
- package/dist/collection/components/post-accordion/post-accordion.css +1 -1
- package/dist/collection/components/post-accordion/post-accordion.js +12 -10
- package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
- package/dist/collection/components/post-accordion-item/post-accordion-item.js +28 -12
- package/dist/collection/components/post-avatar/post-avatar.css +3 -0
- package/dist/collection/components/post-avatar/post-avatar.js +237 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -0
- package/dist/collection/components/post-back-to-top/post-back-to-top.js +107 -0
- package/dist/collection/components/post-banner/banner-types.js +1 -0
- package/dist/collection/components/post-banner/post-banner.css +3 -0
- package/dist/collection/components/{post-alert/post-alert.js → post-banner/post-banner.js} +41 -69
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.css +3 -0
- package/dist/collection/components/post-breadcrumb/post-breadcrumb.js +161 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -0
- package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +93 -0
- package/dist/collection/components/post-card-control/post-card-control.css +1 -29
- package/dist/collection/components/post-card-control/post-card-control.js +8 -8
- package/dist/collection/components/post-closebutton/post-closebutton.js +12 -0
- package/dist/collection/components/post-collapsible/post-collapsible.js +5 -3
- package/dist/collection/components/post-footer/post-footer.css +1 -0
- package/dist/collection/components/post-footer/post-footer.js +75 -0
- package/dist/collection/components/post-header/post-header.css +1 -0
- package/dist/collection/components/post-header/post-header.js +172 -0
- package/dist/collection/components/post-icon/post-icon.js +22 -30
- package/dist/collection/components/post-language-option/post-language-option.css +3 -0
- package/dist/collection/components/post-language-option/post-language-option.js +219 -0
- package/dist/collection/components/post-language-switch/post-language-switch.css +1 -0
- package/dist/collection/components/post-language-switch/post-language-switch.js +163 -0
- package/dist/collection/components/post-language-switch/switch-variants.js +1 -0
- package/dist/collection/components/post-list/post-list.css +3 -0
- package/dist/collection/components/post-list/post-list.js +88 -0
- package/dist/collection/components/post-list-item/post-list-item.css +1 -0
- package/dist/collection/components/post-list-item/post-list-item.js +25 -0
- package/dist/collection/components/post-logo/post-logo.js +2 -2
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -0
- package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +52 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -0
- package/dist/collection/components/post-megadropdown/post-megadropdown.js +158 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -0
- package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +104 -0
- package/dist/collection/components/post-menu/post-menu.css +3 -0
- package/dist/collection/components/post-menu/post-menu.js +280 -0
- package/dist/collection/components/post-menu-item/post-menu-item.js +8 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.css +1 -0
- package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +114 -0
- package/dist/collection/components/post-popover/post-popover.css +1 -29
- package/dist/collection/components/post-popover/post-popover.js +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
- package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +26 -6
- package/dist/collection/components/post-rating/post-rating.css +1 -29
- package/dist/collection/components/post-rating/post-rating.js +1 -1
- package/dist/collection/components/post-tab-header/post-tab-header.css +1 -29
- package/dist/collection/components/post-tab-header/post-tab-header.js +3 -2
- package/dist/collection/components/post-tab-panel/post-tab-panel.js +3 -2
- package/dist/collection/components/post-tabs/post-tabs.css +1 -1
- package/dist/collection/components/post-tabs/post-tabs.js +6 -4
- package/dist/collection/components/post-tag/post-tag.css +1 -29
- package/dist/collection/components/post-tag/post-tag.js +2 -2
- package/dist/collection/components/post-togglebutton/post-togglebutton.css +1 -0
- package/dist/collection/components/post-togglebutton/post-togglebutton.js +74 -0
- package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
- package/dist/collection/components/post-tooltip/post-tooltip.js +51 -9
- package/dist/collection/index.js +20 -2
- package/dist/collection/utils/breakpoints.js +46 -0
- package/dist/collection/utils/get-focusable-children.js +27 -0
- package/dist/components/debounce.js +10 -0
- package/dist/components/get-root.js +9 -0
- package/dist/components/index.browser.js +13 -0
- package/dist/components/index.js +20 -2
- package/dist/components/index2.js +1 -1
- package/dist/components/package.js +1 -1
- package/dist/components/post-accordion-item2.js +34 -14
- package/dist/components/post-accordion2.js +11 -9
- package/dist/components/post-avatar.d.ts +11 -0
- package/dist/components/post-avatar.js +6 -0
- package/dist/components/post-avatar2.js +173 -0
- package/dist/components/post-back-to-top.d.ts +11 -0
- package/dist/components/post-back-to-top.js +6 -0
- package/dist/components/post-back-to-top2.js +100 -0
- package/dist/components/post-banner.d.ts +11 -0
- package/dist/components/post-banner.js +6 -0
- package/dist/components/post-banner2.js +126 -0
- package/dist/components/post-breadcrumb-item.d.ts +11 -0
- package/dist/components/post-breadcrumb-item.js +6 -0
- package/dist/components/post-breadcrumb-item2.js +82 -0
- package/dist/components/post-breadcrumb.d.ts +11 -0
- package/dist/components/post-breadcrumb.js +6 -0
- package/dist/components/post-breadcrumb2.js +168 -0
- package/dist/components/post-card-control2.js +3 -3
- package/dist/components/post-closebutton.d.ts +11 -0
- package/dist/components/post-closebutton.js +6 -0
- package/dist/components/post-closebutton2.js +34 -0
- package/dist/components/post-collapsible-trigger2.js +2 -17
- package/dist/components/post-collapsible2.js +6 -4
- package/dist/components/post-footer.d.ts +11 -0
- package/dist/components/post-footer.js +6 -0
- package/dist/components/post-footer2.js +124 -0
- package/dist/components/post-header.d.ts +11 -0
- package/dist/components/post-header.js +6 -0
- package/dist/components/post-header2.js +279 -0
- package/dist/components/post-icon2.js +24 -28
- package/dist/components/post-language-option.d.ts +11 -0
- package/dist/components/post-language-option.js +6 -0
- package/dist/components/post-language-option2.js +98 -0
- package/dist/components/post-language-switch.d.ts +11 -0
- package/dist/components/post-language-switch.js +6 -0
- package/dist/components/post-language-switch2.js +135 -0
- package/dist/components/post-list-item.d.ts +11 -0
- package/dist/components/post-list-item.js +6 -0
- package/dist/components/post-list-item2.js +35 -0
- package/dist/components/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/dist/components/post-list.js +6 -0
- package/dist/components/post-list2.js +54 -0
- package/dist/components/post-logo2.js +2 -2
- package/dist/components/post-mainnavigation.d.ts +11 -0
- package/dist/components/post-mainnavigation.js +6 -0
- package/dist/components/post-mainnavigation2.js +48 -0
- package/dist/components/post-megadropdown-trigger.d.ts +11 -0
- package/dist/components/post-megadropdown-trigger.js +6 -0
- package/dist/components/post-megadropdown-trigger2.js +91 -0
- package/dist/components/post-megadropdown.d.ts +11 -0
- package/dist/components/post-megadropdown.js +6 -0
- package/dist/components/post-megadropdown2.js +100 -0
- package/dist/components/post-menu-item.d.ts +11 -0
- package/dist/components/post-menu-item.js +6 -0
- package/dist/components/post-menu-item2.js +27 -0
- package/dist/components/post-menu-trigger.d.ts +11 -0
- package/dist/components/post-menu-trigger.js +6 -0
- package/dist/components/post-menu-trigger2.js +102 -0
- package/dist/components/post-menu.d.ts +11 -0
- package/dist/components/post-menu.js +6 -0
- package/dist/components/post-menu2.js +204 -0
- package/dist/components/post-popover2.js +2 -2
- package/dist/components/post-popovercontainer2.js +10 -7
- package/dist/components/post-rating2.js +2 -2
- package/dist/components/post-tab-header2.js +4 -3
- package/dist/components/post-tab-panel2.js +3 -2
- package/dist/components/post-tabs2.js +7 -5
- package/dist/components/post-tag2.js +2 -2
- package/dist/components/post-togglebutton.d.ts +11 -0
- package/dist/components/post-togglebutton.js +6 -0
- package/dist/components/post-togglebutton2.js +61 -0
- package/dist/components/post-tooltip2.js +44 -13
- package/dist/components/slide.js +25 -0
- package/dist/docs.json +1836 -236
- package/dist/esm/check-type-8828dbe4.js +14 -0
- package/dist/esm/check-url-a974431e.js +12 -0
- package/dist/esm/debounce-abe98cc2.js +10 -0
- package/dist/esm/get-root-7af2e0d1.js +9 -0
- package/dist/esm/{index-0b56fc28.js → index-6bfe6554.js} +45 -16
- package/dist/esm/index-b49c9904.js +24 -0
- package/dist/esm/index.browser-51485f85.js +13 -0
- package/dist/esm/index.js +28 -19
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-2ee42825.js +3 -0
- package/dist/esm/{post-accordion-19ca8bf9.js → post-accordion-3bf30525.js} +13 -11
- package/dist/esm/post-accordion-item-6683fbed.js +62 -0
- package/dist/esm/post-accordion-item.entry.js +7 -4
- package/dist/esm/post-accordion.entry.js +3 -3
- package/dist/esm/post-avatar-3ddb4c79.js +146 -0
- package/dist/esm/post-avatar.entry.js +5 -0
- package/dist/esm/post-back-to-top-15ee2771.js +73 -0
- package/dist/esm/post-back-to-top.entry.js +7 -0
- package/dist/esm/post-banner-fc407f6e.js +89 -0
- package/dist/esm/post-banner.entry.js +11 -0
- package/dist/esm/post-breadcrumb-6252b112.js +109 -0
- package/dist/esm/post-breadcrumb-item_2.entry.js +8 -0
- package/dist/esm/post-breadcrumb.entry.js +5 -0
- package/dist/esm/post-card-control-cb3dfc60.js +270 -0
- package/dist/esm/post-card-control.entry.js +3 -3
- package/dist/esm/post-closebutton_15.entry.js +12 -0
- package/dist/esm/{post-collapsible-trigger-8f54e5b6.js → post-collapsible-trigger-b727bf7e.js} +11 -23
- package/dist/esm/post-collapsible_2.entry.js +8 -4
- package/dist/esm/post-components.js +3 -3
- package/dist/esm/post-footer-7a03a9bb.js +82 -0
- package/dist/esm/post-footer.entry.js +3 -0
- package/dist/esm/post-menu-item-3e168ecd.js +66 -0
- package/dist/esm/post-popover-bff5cffd.js +102 -0
- package/dist/esm/post-popover.entry.js +3 -3
- package/dist/esm/{post-rating-8e22d522.js → post-rating-ce595a65.js} +4 -4
- package/dist/esm/post-rating.entry.js +3 -3
- package/dist/esm/post-tab-header-c864586f.js +31 -0
- package/dist/esm/post-tab-header.entry.js +4 -3
- package/dist/esm/{post-tab-panel-b9605846.js → post-tab-panel-800425b8.js} +5 -4
- package/dist/esm/post-tab-panel.entry.js +4 -3
- package/dist/esm/{post-tabs-fb024b14.js → post-tabs-e5aa8b08.js} +9 -7
- package/dist/esm/post-tabs.entry.js +3 -3
- package/dist/esm/post-tag-fc3df50a.js +45 -0
- package/dist/esm/post-tag.entry.js +3 -3
- package/dist/esm/{post-popovercontainer-17d2b256.js → post-togglebutton-101dd3bd.js} +1069 -22
- package/dist/esm/{post-tooltip-02e413ba.js → post-tooltip-e8484aea.js} +46 -15
- package/dist/esm/post-tooltip.entry.js +6 -4
- package/dist/esm/slide-3422b8a3.js +25 -0
- package/dist/post-components/index.esm.js +1 -1
- package/dist/post-components/p-02bb5231.js +1 -0
- package/dist/post-components/p-0e216cc4.js +2 -0
- package/dist/post-components/p-11880d55.js +1 -0
- package/dist/post-components/p-1489d777.entry.js +1 -0
- package/dist/post-components/p-19707347.entry.js +1 -0
- package/dist/post-components/{p-ec1f1966.js → p-1d3acbfd.js} +1 -1
- package/dist/post-components/p-24476696.js +1 -0
- package/dist/post-components/p-25f6efab.entry.js +1 -0
- package/dist/post-components/p-27ad2d1f.js +1 -0
- package/dist/post-components/p-29626238.entry.js +1 -0
- package/dist/post-components/p-339488ba.entry.js +1 -0
- package/dist/post-components/p-3de1151e.js +1 -0
- package/dist/post-components/p-413d1fff.js +1 -0
- package/dist/post-components/p-47095b84.entry.js +1 -0
- package/dist/post-components/p-4a3f67ab.js +1 -0
- package/dist/post-components/p-515e0f96.js +1 -0
- package/dist/post-components/p-5467b223.js +1 -0
- package/dist/post-components/p-5959f2bd.js +1 -0
- package/dist/post-components/p-5b0703a4.entry.js +1 -0
- package/dist/post-components/p-618b8929.js +1 -0
- package/dist/post-components/p-66c8d0a2.entry.js +1 -0
- package/dist/post-components/p-6e6e5447.entry.js +1 -0
- package/dist/post-components/p-80b282a2.js +1 -0
- package/dist/post-components/p-86a1ad40.js +1 -0
- package/dist/post-components/p-97647d03.entry.js +1 -0
- package/dist/post-components/p-98f1d284.js +1 -0
- package/dist/post-components/p-9e287cb5.js +1 -0
- package/dist/post-components/p-a3694196.js +1 -0
- package/dist/post-components/p-adc79d26.entry.js +1 -0
- package/dist/post-components/p-b22656b1.js +1 -0
- package/dist/post-components/p-bcf94111.entry.js +1 -0
- package/dist/post-components/p-bd87a2b5.entry.js +1 -0
- package/dist/post-components/p-bec07e51.js +1 -0
- package/dist/post-components/p-bec09df9.entry.js +1 -0
- package/dist/post-components/p-d1d9c9a5.js +1 -0
- package/dist/post-components/p-d4f93f2b.js +1 -0
- package/dist/post-components/p-db2ac0a2.entry.js +1 -0
- package/dist/post-components/p-e93a4bd0.entry.js +1 -0
- package/dist/post-components/p-eed26f43.js +1 -0
- package/dist/post-components/p-f35d5d4a.entry.js +1 -0
- package/dist/post-components/p-fa6c79b8.entry.js +1 -0
- package/dist/post-components/{p-e387c0c9.js → p-faf15ec1.js} +3 -3
- package/dist/post-components/p-fc09ac69.js +1 -0
- package/dist/post-components/p-fc91cbc2.js +1 -0
- package/dist/post-components/p-ffcd735f.js +1 -0
- package/dist/post-components/post-components.esm.js +1 -1
- package/dist/types/animations/slide.d.ts +2 -0
- package/dist/types/components/post-accordion/post-accordion.d.ts +1 -1
- package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +7 -1
- package/dist/types/components/post-avatar/post-avatar.d.ts +51 -0
- package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +19 -0
- package/dist/types/components/post-banner/banner-types.d.ts +2 -0
- package/dist/types/components/post-banner/post-banner.d.ts +49 -0
- package/dist/types/components/post-breadcrumb/post-breadcrumb.d.ts +30 -0
- package/dist/types/components/post-breadcrumb-item/post-breadcrumb-item.d.ts +16 -0
- package/dist/types/components/post-card-control/post-card-control.d.ts +7 -7
- package/dist/types/components/post-closebutton/post-closebutton.d.ts +7 -0
- package/dist/types/components/post-footer/post-footer.d.ts +23 -0
- package/dist/types/components/post-header/post-header.d.ts +33 -0
- package/dist/types/components/post-icon/post-icon.d.ts +3 -6
- package/dist/types/components/post-language-option/post-language-option.d.ts +45 -0
- package/dist/types/components/post-language-switch/post-language-switch.d.ts +31 -0
- package/dist/types/components/post-language-switch/switch-variants.d.ts +2 -0
- package/dist/types/components/post-list/post-list.d.ts +24 -0
- package/dist/types/components/post-list-item/post-list-item.d.ts +8 -0
- package/dist/types/components/post-logo/post-logo.d.ts +1 -1
- package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +19 -0
- package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +36 -0
- package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +25 -0
- package/dist/types/components/post-menu/post-menu.d.ts +48 -0
- package/dist/types/components/post-menu-item/post-menu-item.d.ts +3 -0
- package/dist/types/components/post-menu-trigger/post-menu-trigger.d.ts +27 -0
- package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +4 -0
- package/dist/types/components/post-tag/post-tag.d.ts +1 -1
- package/dist/types/components/post-togglebutton/post-togglebutton.d.ts +15 -0
- package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -1
- package/dist/types/components.d.ts +574 -47
- package/dist/types/index.d.ts +20 -2
- package/dist/types/utils/breakpoints.d.ts +11 -0
- package/dist/types/utils/get-focusable-children.d.ts +1 -0
- package/dist/types/utils/get-root.d.ts +1 -1
- package/loaders/debounce.js +10 -0
- package/loaders/get-root.js +9 -0
- package/loaders/index.browser.js +13 -0
- package/loaders/index.d.ts +38 -2
- package/loaders/index.js +20 -2
- package/loaders/index2.js +1 -1
- package/loaders/package.js +1 -1
- package/loaders/post-accordion-item.js +1 -81
- package/loaders/post-accordion-item2.js +103 -0
- package/loaders/post-accordion.js +11 -9
- package/loaders/post-avatar.d.ts +11 -0
- package/loaders/post-avatar.js +176 -0
- package/loaders/post-back-to-top.d.ts +11 -0
- package/loaders/post-back-to-top.js +103 -0
- package/loaders/post-banner.d.ts +11 -0
- package/loaders/post-banner.js +129 -0
- package/loaders/post-breadcrumb-item.d.ts +11 -0
- package/loaders/post-breadcrumb-item.js +6 -0
- package/loaders/post-breadcrumb-item2.js +82 -0
- package/loaders/post-breadcrumb.d.ts +11 -0
- package/loaders/post-breadcrumb.js +171 -0
- package/loaders/post-card-control.js +3 -3
- package/loaders/post-closebutton.d.ts +11 -0
- package/loaders/post-closebutton.js +37 -0
- package/loaders/post-collapsible-trigger2.js +2 -17
- package/loaders/post-collapsible2.js +5 -3
- package/loaders/post-footer.d.ts +11 -0
- package/loaders/post-footer.js +127 -0
- package/loaders/post-header.d.ts +11 -0
- package/loaders/post-header.js +282 -0
- package/loaders/post-icon2.js +24 -28
- package/loaders/post-language-option.d.ts +11 -0
- package/loaders/post-language-option.js +101 -0
- package/loaders/post-language-switch.d.ts +11 -0
- package/loaders/post-language-switch.js +138 -0
- package/loaders/post-list-item.d.ts +11 -0
- package/loaders/post-list-item.js +38 -0
- package/loaders/{post-alert.d.ts → post-list.d.ts} +4 -4
- package/loaders/post-list.js +57 -0
- package/loaders/post-logo.js +3 -3
- package/loaders/post-mainnavigation.d.ts +11 -0
- package/loaders/post-mainnavigation.js +51 -0
- package/loaders/post-megadropdown-trigger.d.ts +11 -0
- package/loaders/post-megadropdown-trigger.js +94 -0
- package/loaders/post-megadropdown.d.ts +11 -0
- package/loaders/post-megadropdown.js +103 -0
- package/loaders/post-menu-item.d.ts +11 -0
- package/loaders/post-menu-item.js +6 -0
- package/loaders/post-menu-item2.js +27 -0
- package/loaders/post-menu-trigger.d.ts +11 -0
- package/loaders/post-menu-trigger.js +6 -0
- package/loaders/post-menu-trigger2.js +102 -0
- package/loaders/post-menu.d.ts +11 -0
- package/loaders/post-menu.js +6 -0
- package/loaders/post-menu2.js +204 -0
- package/loaders/post-popover.js +2 -2
- package/loaders/post-popovercontainer2.js +10 -7
- package/loaders/post-rating.js +2 -2
- package/loaders/post-tab-header.js +4 -3
- package/loaders/post-tab-panel.js +3 -2
- package/loaders/post-tabs.js +7 -5
- package/loaders/post-tag.js +2 -2
- package/loaders/post-togglebutton.d.ts +11 -0
- package/loaders/post-togglebutton.js +64 -0
- package/loaders/post-tooltip.js +43 -12
- package/loaders/slide.js +25 -0
- package/package.json +9 -6
- package/dist/cjs/post-accordion-item-8d1d6c81.js +0 -51
- package/dist/cjs/post-alert-ea75de0d.js +0 -98
- package/dist/cjs/post-alert.cjs.entry.js +0 -16
- package/dist/cjs/post-card-control-51ee3823.js +0 -272
- package/dist/cjs/post-icon-dc878de4.js +0 -104
- package/dist/cjs/post-icon.cjs.entry.js +0 -15
- package/dist/cjs/post-logo-da45aef5.js +0 -39
- package/dist/cjs/post-logo.cjs.entry.js +0 -14
- package/dist/cjs/post-popover-aac764c7.js +0 -104
- package/dist/cjs/post-popovercontainer.cjs.entry.js +0 -11
- package/dist/cjs/post-tab-header-3baf22e0.js +0 -32
- package/dist/cjs/post-tag-e4bcdb75.js +0 -47
- package/dist/collection/components/post-alert/alert-types.js +0 -1
- package/dist/collection/components/post-alert/post-alert.css +0 -35
- package/dist/components/post-alert.js +0 -6
- package/dist/components/post-alert2.js +0 -136
- package/dist/esm/index-f41b763f.js +0 -46
- package/dist/esm/package-a8cae03d.js +0 -3
- package/dist/esm/post-accordion-item-3232ff67.js +0 -49
- package/dist/esm/post-alert-2636c0e2.js +0 -96
- package/dist/esm/post-alert.entry.js +0 -8
- package/dist/esm/post-card-control-0844cad9.js +0 -270
- package/dist/esm/post-icon-1a682b9e.js +0 -102
- package/dist/esm/post-icon.entry.js +0 -7
- package/dist/esm/post-logo-904c4701.js +0 -37
- package/dist/esm/post-logo.entry.js +0 -6
- package/dist/esm/post-popover-14d083d4.js +0 -102
- package/dist/esm/post-popovercontainer.entry.js +0 -3
- package/dist/esm/post-tab-header-96287c94.js +0 -30
- package/dist/esm/post-tag-58311692.js +0 -45
- package/dist/post-components/p-04e79a2c.entry.js +0 -1
- package/dist/post-components/p-05794f1f.entry.js +0 -1
- package/dist/post-components/p-079c7726.js +0 -1
- package/dist/post-components/p-10b043fc.js +0 -1
- package/dist/post-components/p-1c63cb03.js +0 -1
- package/dist/post-components/p-2e7cc4c6.entry.js +0 -1
- package/dist/post-components/p-370edca6.js +0 -1
- package/dist/post-components/p-3c3e8b19.js +0 -1
- package/dist/post-components/p-429b886d.js +0 -1
- package/dist/post-components/p-44564a68.js +0 -1
- package/dist/post-components/p-47420c6f.entry.js +0 -1
- package/dist/post-components/p-4973d1c7.entry.js +0 -1
- package/dist/post-components/p-6007889b.entry.js +0 -1
- package/dist/post-components/p-69bcb15f.entry.js +0 -1
- package/dist/post-components/p-771bd293.js +0 -1
- package/dist/post-components/p-8c0372c2.entry.js +0 -1
- package/dist/post-components/p-92ce53bc.entry.js +0 -1
- package/dist/post-components/p-991dff03.entry.js +0 -1
- package/dist/post-components/p-a0b62b51.js +0 -1
- package/dist/post-components/p-a2fa8c1d.entry.js +0 -1
- package/dist/post-components/p-ab6ce1d7.js +0 -1
- package/dist/post-components/p-b96307d5.entry.js +0 -1
- package/dist/post-components/p-d2f9de94.js +0 -2
- package/dist/post-components/p-de2ce222.js +0 -1
- package/dist/post-components/p-deb4131c.js +0 -1
- package/dist/post-components/p-e37ff727.entry.js +0 -1
- package/dist/post-components/p-eb3f324e.entry.js +0 -1
- package/dist/post-components/p-ee8845de.js +0 -1
- package/dist/post-components/p-fb1fb618.entry.js +0 -1
- package/dist/post-components/p-fbc24b84.js +0 -1
- package/dist/post-components/p-ff12fd7a.js +0 -1
- package/dist/types/components/post-alert/alert-types.d.ts +0 -2
- package/dist/types/components/post-alert/post-alert.d.ts +0 -54
- package/loaders/post-alert.js +0 -139
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { checkEmptyOrOneOf, checkType } from "../../utils/index";
|
|
3
|
+
import { version } from "../../../../package";
|
|
4
|
+
import { SWITCH_VARIANTS } from "./switch-variants";
|
|
5
|
+
import { nanoid } from "nanoid";
|
|
6
|
+
export class PostLanguageSwitch {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.menuId = `p${nanoid(11)}`;
|
|
9
|
+
this.caption = undefined;
|
|
10
|
+
this.description = undefined;
|
|
11
|
+
this.variant = 'list';
|
|
12
|
+
this.activeLang = undefined;
|
|
13
|
+
}
|
|
14
|
+
validateCaption(value = this.caption) {
|
|
15
|
+
checkType(value, 'string', 'The "caption" property of the post-language-switch component must be a string.');
|
|
16
|
+
}
|
|
17
|
+
validateDescription(value = this.description) {
|
|
18
|
+
checkType(value, 'string', 'The "description" property of the post-language-switch component must be a string.');
|
|
19
|
+
}
|
|
20
|
+
validateVariant(value = this.variant) {
|
|
21
|
+
checkEmptyOrOneOf(value, SWITCH_VARIANTS, `The "variant" property of the post-language-switch component must be: ${SWITCH_VARIANTS.join(', ')}`);
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
this.updateChildrenVariant();
|
|
25
|
+
// Get the active language based on children's active state
|
|
26
|
+
this.activeLang = Array.from(this.host.querySelectorAll('post-language-option'))
|
|
27
|
+
.find(el => el.getAttribute('active') == 'true')
|
|
28
|
+
.getAttribute('code');
|
|
29
|
+
}
|
|
30
|
+
// Update post-language-option variant to have the correct style
|
|
31
|
+
updateChildrenVariant() {
|
|
32
|
+
this.host.querySelectorAll('post-language-option').forEach(el => {
|
|
33
|
+
el.setAttribute('variant', this.variant);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
componentWillUpdate() {
|
|
37
|
+
this.updateChildrenVariant();
|
|
38
|
+
}
|
|
39
|
+
componentDidLoad() {
|
|
40
|
+
this.validateCaption();
|
|
41
|
+
this.validateDescription();
|
|
42
|
+
this.validateVariant();
|
|
43
|
+
// Detects a change in the active language
|
|
44
|
+
this.host.addEventListener('postChange', (el) => {
|
|
45
|
+
this.activeLang = el.detail;
|
|
46
|
+
// Update the active state in the children post-language-option components
|
|
47
|
+
this.host.querySelectorAll('post-language-option').forEach(lang => {
|
|
48
|
+
if (lang.code && lang.code === this.activeLang) {
|
|
49
|
+
lang.setAttribute('active', 'true');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
lang.setAttribute('active', 'false');
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
// Hides the dropdown when an option has been clicked
|
|
56
|
+
if (this.variant === 'menu') {
|
|
57
|
+
const menu = this.host.shadowRoot.querySelector('post-menu');
|
|
58
|
+
menu.toggle(menu);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
renderList() {
|
|
63
|
+
return (h(Host, { "data-version": version, "aria-label": `${this.caption}, ${this.description}`, "aria-role": "list" }, h("slot", null)));
|
|
64
|
+
}
|
|
65
|
+
renderDropdown() {
|
|
66
|
+
return (h(Host, { "data-version": version }, h("post-menu-trigger", { for: this.menuId }, h("button", { class: "post-language-switch-trigger", "aria-label": `${this.caption}, ${this.description}` }, this.activeLang.toUpperCase(), h("post-icon", { "aria-hidden": "true", name: "chevrondown" }))), h("post-menu", { id: this.menuId, class: "post-language-switch-dropdown-container" }, h("slot", null))));
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
return this.variant === 'list' ? this.renderList() : this.renderDropdown();
|
|
70
|
+
}
|
|
71
|
+
static get is() { return "post-language-switch"; }
|
|
72
|
+
static get encapsulation() { return "shadow"; }
|
|
73
|
+
static get originalStyleUrls() {
|
|
74
|
+
return {
|
|
75
|
+
"$": ["post-language-switch.scss"]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
static get styleUrls() {
|
|
79
|
+
return {
|
|
80
|
+
"$": ["post-language-switch.css"]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
static get properties() {
|
|
84
|
+
return {
|
|
85
|
+
"caption": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"mutable": false,
|
|
88
|
+
"complexType": {
|
|
89
|
+
"original": "string",
|
|
90
|
+
"resolved": "string",
|
|
91
|
+
"references": {}
|
|
92
|
+
},
|
|
93
|
+
"required": false,
|
|
94
|
+
"optional": false,
|
|
95
|
+
"docs": {
|
|
96
|
+
"tags": [],
|
|
97
|
+
"text": "A title for the list of language options"
|
|
98
|
+
},
|
|
99
|
+
"attribute": "caption",
|
|
100
|
+
"reflect": false
|
|
101
|
+
},
|
|
102
|
+
"description": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "string",
|
|
107
|
+
"resolved": "string",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": "A descriptive text for the list of language options"
|
|
115
|
+
},
|
|
116
|
+
"attribute": "description",
|
|
117
|
+
"reflect": false
|
|
118
|
+
},
|
|
119
|
+
"variant": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "SwitchVariant",
|
|
124
|
+
"resolved": "\"list\" | \"menu\"",
|
|
125
|
+
"references": {
|
|
126
|
+
"SwitchVariant": {
|
|
127
|
+
"location": "import",
|
|
128
|
+
"path": "./switch-variants",
|
|
129
|
+
"id": "src/components/post-language-switch/switch-variants.ts::SwitchVariant"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": "Variant that determines the rendering of the language switch either as a list (used on mobile in the header) or a dropdown (used on desktop in the header)"
|
|
138
|
+
},
|
|
139
|
+
"attribute": "variant",
|
|
140
|
+
"reflect": false,
|
|
141
|
+
"defaultValue": "'list'"
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
static get states() {
|
|
146
|
+
return {
|
|
147
|
+
"activeLang": {}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
static get elementRef() { return "host"; }
|
|
151
|
+
static get watchers() {
|
|
152
|
+
return [{
|
|
153
|
+
"propName": "caption",
|
|
154
|
+
"methodName": "validateCaption"
|
|
155
|
+
}, {
|
|
156
|
+
"propName": "description",
|
|
157
|
+
"methodName": "validateDescription"
|
|
158
|
+
}, {
|
|
159
|
+
"propName": "variant",
|
|
160
|
+
"methodName": "validateVariant"
|
|
161
|
+
}];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SWITCH_VARIANTS = ['list', 'menu'];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
+
*/post-list{display:flex;flex-direction:column;gap:var(--post-list-title-gap, 0)}post-list>[role=list]{display:flex;flex-direction:column;gap:var(--post-list-item-gap, 0)}post-list:where([horizontal]:not([horizontal=false])){flex-direction:row;align-items:center}post-list:where([horizontal]:not([horizontal=false]))>[role=list]{flex-direction:row;align-items:center}post-list>.list-title.visually-hidden{width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}post-list>.list-title.visually-hidden:not(caption){position:absolute !important}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
4
|
+
/**
|
|
5
|
+
* @slot default - Slot for placing the list title.
|
|
6
|
+
* @slot post-list-item - Slot for placing post-list-item components.
|
|
7
|
+
*/
|
|
8
|
+
export class PostList {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.titleId = undefined;
|
|
11
|
+
this.titleHidden = false;
|
|
12
|
+
this.horizontal = false;
|
|
13
|
+
}
|
|
14
|
+
componentWillLoad() {
|
|
15
|
+
/**
|
|
16
|
+
* Get the id set on the host element or use a random id by default
|
|
17
|
+
*/
|
|
18
|
+
this.titleId = `title-${this.host.id || nanoid(6)}`;
|
|
19
|
+
}
|
|
20
|
+
componentDidLoad() {
|
|
21
|
+
this.checkTitle();
|
|
22
|
+
}
|
|
23
|
+
checkTitle() {
|
|
24
|
+
if (!this.titleEl.textContent.trim()) {
|
|
25
|
+
throw new Error('Please provide a title to the list component. Title is mandatory for accessibility purposes.');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
|
+
return (h(Host, { key: '70594af566e1fe34ce0b9ebe1a8cbbc868dab973', "data-version": version }, h("div", { key: '27b6c4af3d51a0d83f968ec751b6bcf46feb7d05', ref: el => (this.titleEl = el), id: this.titleId, class: `list-title${this.titleHidden ? ' visually-hidden' : ''}` }, h("slot", { key: 'a913bd018199bb031e3d96d487bd528831453387' })), h("div", { key: 'e1a3ddecc643a78f57b91cc9ccb0de6b02302a47', role: "list", "aria-labelledby": this.titleId }, h("slot", { key: 'bd7c6df300d28fe0b9f1dd3135eb42da00e731b9', name: "post-list-item" }))));
|
|
30
|
+
}
|
|
31
|
+
static get is() { return "post-list"; }
|
|
32
|
+
static get originalStyleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["post-list.scss"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get styleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["post-list.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get properties() {
|
|
43
|
+
return {
|
|
44
|
+
"titleHidden": {
|
|
45
|
+
"type": "boolean",
|
|
46
|
+
"mutable": false,
|
|
47
|
+
"complexType": {
|
|
48
|
+
"original": "boolean",
|
|
49
|
+
"resolved": "boolean",
|
|
50
|
+
"references": {}
|
|
51
|
+
},
|
|
52
|
+
"required": false,
|
|
53
|
+
"optional": false,
|
|
54
|
+
"docs": {
|
|
55
|
+
"tags": [],
|
|
56
|
+
"text": "If `true`, the list title will be hidden. Otherwise, it will be displayed.`"
|
|
57
|
+
},
|
|
58
|
+
"attribute": "title-hidden",
|
|
59
|
+
"reflect": false,
|
|
60
|
+
"defaultValue": "false"
|
|
61
|
+
},
|
|
62
|
+
"horizontal": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "boolean",
|
|
67
|
+
"resolved": "boolean",
|
|
68
|
+
"references": {}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": "The list can become horizontal by setting `horizontal=\"true\"` or just `horizontal`"
|
|
75
|
+
},
|
|
76
|
+
"attribute": "horizontal",
|
|
77
|
+
"reflect": true,
|
|
78
|
+
"defaultValue": "false"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get states() {
|
|
83
|
+
return {
|
|
84
|
+
"titleId": {}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
static get elementRef() { return "host"; }
|
|
88
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:host{display:flex}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* @slot default- Slot for placing the content of the list item.
|
|
4
|
+
*/
|
|
5
|
+
export class PostListItem {
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
this.host.setAttribute('slot', 'post-list-item');
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { key: 'f7b26e05f1fa8bab9909dcee305dbf74960671eb', role: "listitem", slot: "post-list-item" }, h("slot", { key: '3d75b0acf3f4a89c64c447e8d182bbc9a4f930a0' })));
|
|
11
|
+
}
|
|
12
|
+
static get is() { return "post-list-item"; }
|
|
13
|
+
static get encapsulation() { return "shadow"; }
|
|
14
|
+
static get originalStyleUrls() {
|
|
15
|
+
return {
|
|
16
|
+
"$": ["post-list-item.scss"]
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static get styleUrls() {
|
|
20
|
+
return {
|
|
21
|
+
"$": ["post-list-item.css"]
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static get elementRef() { return "host"; }
|
|
25
|
+
}
|
|
@@ -11,7 +11,7 @@ export class PostLogo {
|
|
|
11
11
|
validateUrl() {
|
|
12
12
|
checkEmptyOrUrl(this.url, 'The "url" property of the post-logo is invalid');
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
componentDidLoad() {
|
|
15
15
|
this.validateUrl();
|
|
16
16
|
this.checkDescription();
|
|
17
17
|
}
|
|
@@ -23,7 +23,7 @@ export class PostLogo {
|
|
|
23
23
|
render() {
|
|
24
24
|
const logoLink = this.url && (typeof this.url === 'string' ? this.url : this.url.href);
|
|
25
25
|
const LogoTag = logoLink ? 'a' : 'span';
|
|
26
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: 'c20cf7b8d3684d33cf9b85448a560a93cd4df118', "data-version": version }, h(LogoTag, Object.assign({ key: 'f2dc1deb73accc57667421b81aa7e20e4d984175', class: "logo" }, (logoLink ? { href: logoLink } : {})), h("span", { key: '52beb8265a7e31abcac2604bfcfabd0e39694161', class: "description" }, h("slot", { key: '8dfe1dc86d569f2ff9701491b5e9770521794822', onSlotchange: () => this.checkDescription() })), h("svg", { key: 'ecb4df5672c3d910980fc651c9e3afc716ebc607', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 72 72", "aria-hidden": "true" }, h("g", { key: 'eeba0f4822f0b06f7fc0fdde430c05690eb98f95', id: "Logo" }, h("rect", { key: 'b301434ef5c4a2c36ea51b3ffbefe7933f4ed111', fill: "#ffcc00", x: "0", y: "0", width: "72", height: "72" }), h("polygon", { key: 'a7f79c6d19e7abe674adc479ac2399c99f60d04f', fill: "#ff0000", points: "34,32.3 34,19 19.7,19 19.7,29.1 10,29.1 10,42.9 19.7,42.9 19.7,53 34,53 34,39.7 30.6,39.7 30.6,49.8 23.1,49.8 23.1,39.7 13.4,39.7 13.4,32.3 23.1,32.3 23.1,22.2 30.6,22.2 30.6,32.3" }), h("path", { key: '8e8b6b8aa7e359c20058a7844a86e732f78365e2', d: "M53.56234,31.10526c0,2.41272-1.99154,4.29475-4.51723,4.29475H45.2v-8.3h3.84511C51.66802,27.1,53.56234,28.78889,53.56234,31.10526z M50.69666,19H36v34h9.2V42.9h5.49666c6.75131,0,11.9971-5.15137,11.9971-11.8057C62.69376,24.39136,57.35099,19,50.69666,19z" }))))));
|
|
27
27
|
}
|
|
28
28
|
static get is() { return "post-logo"; }
|
|
29
29
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
post-mainnavigation post-list-item>a{text-decoration:none;border-radius:0}post-mainnavigation post-list-item post-megadropdown-trigger button{padding:0;overflow:visible;border:0;background:none;color:inherit;font:inherit;-webkit-user-select:none;user-select:none;appearance:button;text-align:start}post-mainnavigation post-list-item post-megadropdown-trigger button{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}post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){post-mainnavigation post-list-item post-megadropdown-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{display:flex;align-items:center;justify-content:space-between}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}post-mainnavigation post-list-item>a:focus-visible,post-mainnavigation post-list-item>button:focus-visible,post-mainnavigation post-list-item post-megadropdown-trigger button:focus-visible{border-radius:var(--post-core-dimension-4);z-index:1}@media screen and (min-width: 1024px){post-mainnavigation nav{position:relative;max-width:100vw;max-height:var(--post-core-dimension-56);user-select:none}post-mainnavigation post-list{margin-inline:var(--post-core-dimension-4)}post-mainnavigation post-list>[role=list]{flex-direction:row;max-width:100vw;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline:var(--post-core-dimension-12);height:var(--post-core-dimension-56);gap:var(--post-core-dimension-4);font-size:var(--post-core-font-size-16);border-block:0 solid rgba(0,0,0,0);border-block-end-color:currentColor}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button:hover{border-block-width:var(--post-core-dimension-2)}post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>a[aria-expanded=true],post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item>button[aria-expanded=true],post-mainnavigation post-list-item post-megadropdown-trigger button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]{border-block-width:var(--post-core-dimension-4);font-weight:var(--post-core-font-weight-700)}post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{padding-inline-end:var(--post-core-dimension-12);transition:border-block-end-color 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button::after,post-mainnavigation post-list-item post-megadropdown-trigger button::after{content:"";-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 13.2-7.5 7.6-7.6-7.6.9-.9 6.6 6.6 6.6-6.6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m23.6 13.2-7.5 7.6-7.6-7.6.9-.9 6.6 6.6 6.6-6.6z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;height:var(--post-core-dimension-24);width:var(--post-core-dimension-24);transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1)}post-mainnavigation post-list-item>button.selected::after,post-mainnavigation post-list-item>button[aria-expanded=true]::after,post-mainnavigation post-list-item post-megadropdown-trigger button.selected::after,post-mainnavigation post-list-item post-megadropdown-trigger button[aria-expanded=true]::after{transform:rotate(180deg)}post-mainnavigation [slot=back-button]{display:none}}@media screen and (max-width: 1023.99px){post-mainnavigation post-list>[role=list]{transform:none !important}post-mainnavigation post-list-item>a,post-mainnavigation post-list-item>button,post-mainnavigation post-list-item post-megadropdown-trigger button{width:100%;height:var(--post-core-dimension-48);padding-inline-end:var(--post-core-dimension-6);gap:var(--post-core-dimension-16);border-block:var(--post-core-dimension-1) solid rgba(0,0,0,0);border-block-end-color:currentColor;font-weight:var(--post-core-font-weight-700)}post-mainnavigation post-list-item>a:hover,post-mainnavigation post-list-item>a.selected,post-mainnavigation post-list-item>button:hover,post-mainnavigation post-list-item>button.selected,post-mainnavigation post-list-item post-megadropdown-trigger button:hover,post-mainnavigation post-list-item post-megadropdown-trigger button.selected{border-block-width:var(--post-core-dimension-3)}post-mainnavigation post-list-item>a:hover::after,post-mainnavigation post-list-item>button:hover::after,post-mainnavigation post-list-item post-megadropdown-trigger button:hover::after{content:"";display:block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.667 5.333H18.8L29.467 16H0v1.333h29.467L18.8 28h1.867L32 16.667z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.667 5.333H18.8L29.467 16H0v1.333h29.467L18.8 28h1.867L32 16.667z'/%3E%3C/svg%3E");background-color:currentColor;color:currentColor;forced-color-adjust:preserve-parent-color;width:var(--post-core-dimension-24);height:var(--post-core-dimension-24)}}post-mainnavigation .back-button .btn{padding-inline:0}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class PostMainnavigation {
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves a reference to the closest 'post-header' element when the main navigation is added to the DOM.
|
|
5
|
+
*/
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
this.header = this.host.closest('post-header');
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Cleans up references and disconnects the MutationObserver when the main navigation is removed from the DOM.
|
|
11
|
+
*/
|
|
12
|
+
disconnectedCallback() {
|
|
13
|
+
this.header = null;
|
|
14
|
+
}
|
|
15
|
+
handleBackButtonClick() {
|
|
16
|
+
if (this.header)
|
|
17
|
+
this.header.toggleMobileMenu();
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
return (h(Host, { key: '23d1cc3919d15543bf409e8fa25be02973532a12', slot: "post-mainnavigation" }, h("div", { key: '8d35b8b7715fbac387361706a03a10e4af481301', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '01899ddef2cdc321ff7383eec310877335e951a7', name: "back-button" })), h("nav", { key: '3237225f2608b28355e669e11189ba1ccc9c593a' }, h("slot", { key: '32105f3acf726a590631896c707a2149706a90d5' }))));
|
|
21
|
+
}
|
|
22
|
+
static get is() { return "post-mainnavigation"; }
|
|
23
|
+
static get originalStyleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["./post-mainnavigation.scss"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get styleUrls() {
|
|
29
|
+
return {
|
|
30
|
+
"$": ["post-mainnavigation.css"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static get events() {
|
|
34
|
+
return [{
|
|
35
|
+
"method": "postToggle",
|
|
36
|
+
"name": "postToggle",
|
|
37
|
+
"bubbles": true,
|
|
38
|
+
"cancelable": true,
|
|
39
|
+
"composed": true,
|
|
40
|
+
"docs": {
|
|
41
|
+
"tags": [],
|
|
42
|
+
"text": "Gets emitted when a user closes the main navigation on mobile"
|
|
43
|
+
},
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "any",
|
|
46
|
+
"resolved": "any",
|
|
47
|
+
"references": {}
|
|
48
|
+
}
|
|
49
|
+
}];
|
|
50
|
+
}
|
|
51
|
+
static get elementRef() { return "host"; }
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes slide-in{0%{transform:translateX(100%)}100%{transform:translateX(0%)}}@keyframes slide-out{from{transform:translateX(0%)}to{transform:translateX(100%)}}*,::before,::after{box-sizing:border-box}post-popovercontainer{background-color:#fafafa;border:none;border-top:1px solid #e1e0dc;width:100%;border-radius:0;box-shadow:0 8px 6px rgba(0,0,0,.16)}@media screen and (max-width: 1023.99px){post-popovercontainer{position:absolute;top:var(--header-height) !important;bottom:0;left:0;width:100%;height:auto;border-top:unset}post-popovercontainer.slide-in{animation:slide-in;animation-duration:350ms;animation-fill-mode:forwards}post-popovercontainer.slide-out{animation:slide-out;animation-duration:350ms;animation-fill-mode:forwards}}.megadropdown{padding:31px 40px 40px}@media screen and (max-width: 1023.99px){.megadropdown{padding:16px 32px 24px}}.megadropdown .megadropdown-content{gap:1.5rem;display:grid;grid-template-columns:repeat(auto-fit, minmax(min(15vw, 100%), 1fr));grid-auto-rows:1fr auto;grid-auto-flow:dense}@media screen and (max-width: 1023.99px){.megadropdown .megadropdown-content{grid-template-columns:repeat(auto-fit, minmax(min(35vw, 100%), 1fr))}}@media screen and (max-width: 599.99px){.megadropdown .megadropdown-content{grid-template-columns:1fr}}.megadropdown h2{display:none;margin-top:0;margin-bottom:8px;font-weight:900}.megadropdown h2 a{text-decoration:none;font-weight:inherit;border-bottom:0;border-top:0}@media screen and (max-width: 1023.99px){.megadropdown h2{display:block;font-size:20px}}.megadropdown a:hover{border-block-width:0}.megadropdown a:hover::after{content:unset}.megadropdown post-list{display:grid;grid-row:span 2;grid-template-rows:subgrid;row-gap:0px}.megadropdown post-list>[role=list]{flex-direction:unset;display:unset}.megadropdown post-list>*{width:100%}.megadropdown post-list .list-title{display:flex;flex-direction:column-reverse;height:100%}.megadropdown post-list .list-title h3{font-size:20px;border-bottom:1px solid #050400;padding:15px 12px 14px 0;display:block;font-weight:900}.megadropdown post-list .list-title h3 a{text-decoration:none;width:100%;font-size:inherit;display:inline-block;font-weight:inherit;height:unset;padding:0;border:0}@media screen and (max-width: 1023.99px){.megadropdown post-list .list-title h3{font-size:16px;padding:12px 12px 11px 0}}.megadropdown post-list-item{border-bottom:1px solid #050400}.megadropdown post-list-item>a{padding:13px 12px 12px 0;display:block;text-decoration:none;width:100%;border-bottom:0;height:auto;border-top:0}@media screen and (max-width: 1023.99px){.megadropdown post-list-item>a{padding:12px 12px 11px 0}}.megadropdown .back-button{display:none;margin-bottom:2rem}.megadropdown .back-button .btn{width:auto}.megadropdown .back-button post-icon{transform:rotate(180deg)}@media screen and (max-width: 1023.99px){.megadropdown .back-button{display:block}}.megadropdown .close-button{position:absolute;top:1rem;right:1rem}@media screen and (max-width: 1023.99px){.megadropdown .close-button{display:none}}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
export class PostMegadropdown {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.isVisible = false;
|
|
5
|
+
this.animationClass = null;
|
|
6
|
+
}
|
|
7
|
+
componentDidLoad() {
|
|
8
|
+
this.popoverRef.addEventListener('postToggle', (event) => {
|
|
9
|
+
this.isVisible = event.detail;
|
|
10
|
+
this.postToggleMegadropdown.emit(this.isVisible);
|
|
11
|
+
});
|
|
12
|
+
this.popoverRef.addEventListener('animationend', () => {
|
|
13
|
+
if (this.animationClass === 'slide-out') {
|
|
14
|
+
this.hide();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Toggles the dropdown visibility based on its current state.
|
|
20
|
+
*/
|
|
21
|
+
async toggle(target) {
|
|
22
|
+
this.isVisible ? this.hide() : await this.show(target);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Displays the popover dropdown
|
|
26
|
+
*
|
|
27
|
+
* @param target - The HTML element relative to which the popover dropdown should be displayed.
|
|
28
|
+
*/
|
|
29
|
+
async show(target) {
|
|
30
|
+
if (this.popoverRef) {
|
|
31
|
+
await this.popoverRef.show(target);
|
|
32
|
+
this.animationClass = 'slide-in';
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
console.error('show: popoverRef is null or undefined');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Hides the popover dropdown
|
|
40
|
+
*/
|
|
41
|
+
hide() {
|
|
42
|
+
if (this.popoverRef) {
|
|
43
|
+
this.popoverRef.hide();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
console.error('hide: popoverRef is null or undefined');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
handleBackButtonClick() {
|
|
50
|
+
this.animationClass = 'slide-out';
|
|
51
|
+
}
|
|
52
|
+
handleCloseButtonClick() {
|
|
53
|
+
this.popoverRef.hide();
|
|
54
|
+
}
|
|
55
|
+
handleFocusout(event) {
|
|
56
|
+
const relatedTarget = event.relatedTarget;
|
|
57
|
+
const megadropdown = this.popoverRef.querySelector('.megadropdown');
|
|
58
|
+
if (!megadropdown.contains(relatedTarget)) {
|
|
59
|
+
this.hide();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return (h(Host, { key: 'cb7df3441b1c064045c6d27cd7e20376a62de57c' }, h("post-popovercontainer", { key: '8c2de3df3d1dd59187f463d751654958326dde02', class: this.animationClass, placement: "bottom", "edge-gap": "0", ref: el => (this.popoverRef = el) }, h("div", { key: '392182e1d6206c969fc64b1758d121e1ab6361f3', class: "megadropdown", onFocusout: e => this.handleFocusout(e) }, h("div", { key: '45742e41d227d0481436bd49de065044a2ce5e35', onClick: () => this.handleBackButtonClick(), class: "back-button" }, h("slot", { key: '5607a569924faba3be599b6e1f53f4a8704b2f05', name: "back-button" })), h("div", { key: 'c1a99e2d25af71fc3122e1173549ad7fe1d920b7', onClick: () => this.handleCloseButtonClick(), class: "close-button" }, h("slot", { key: '82059d749600e18e63c836d5ab6697eb50ec91cf', name: "close-button" })), h("slot", { key: 'eea5e876c1ae5558a3c5c6301b298e564d8b75b0', name: "megadropdown-title" }), h("div", { key: '16b0f351786aef2827ce08163a554e49c40f224b', class: "megadropdown-content" }, h("slot", { key: '97e5230769b01070e488f71704740ec27de9f2d4' }))))));
|
|
64
|
+
}
|
|
65
|
+
static get is() { return "post-megadropdown"; }
|
|
66
|
+
static get originalStyleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["post-megadropdown.scss"]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get styleUrls() {
|
|
72
|
+
return {
|
|
73
|
+
"$": ["post-megadropdown.css"]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static get states() {
|
|
77
|
+
return {
|
|
78
|
+
"isVisible": {},
|
|
79
|
+
"animationClass": {}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get events() {
|
|
83
|
+
return [{
|
|
84
|
+
"method": "postToggleMegadropdown",
|
|
85
|
+
"name": "postToggleMegadropdown",
|
|
86
|
+
"bubbles": true,
|
|
87
|
+
"cancelable": true,
|
|
88
|
+
"composed": true,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": "Emits when the dropdown is shown or hidden.\nThe event payload is a boolean: `true` when the dropdown was opened, `false` when it was closed."
|
|
92
|
+
},
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "boolean",
|
|
95
|
+
"resolved": "boolean",
|
|
96
|
+
"references": {}
|
|
97
|
+
}
|
|
98
|
+
}];
|
|
99
|
+
}
|
|
100
|
+
static get methods() {
|
|
101
|
+
return {
|
|
102
|
+
"toggle": {
|
|
103
|
+
"complexType": {
|
|
104
|
+
"signature": "(target: HTMLElement) => Promise<void>",
|
|
105
|
+
"parameters": [{
|
|
106
|
+
"name": "target",
|
|
107
|
+
"type": "HTMLElement",
|
|
108
|
+
"docs": ""
|
|
109
|
+
}],
|
|
110
|
+
"references": {
|
|
111
|
+
"Promise": {
|
|
112
|
+
"location": "global",
|
|
113
|
+
"id": "global::Promise"
|
|
114
|
+
},
|
|
115
|
+
"HTMLElement": {
|
|
116
|
+
"location": "global",
|
|
117
|
+
"id": "global::HTMLElement"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"return": "Promise<void>"
|
|
121
|
+
},
|
|
122
|
+
"docs": {
|
|
123
|
+
"text": "Toggles the dropdown visibility based on its current state.",
|
|
124
|
+
"tags": []
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"show": {
|
|
128
|
+
"complexType": {
|
|
129
|
+
"signature": "(target: HTMLElement) => Promise<void>",
|
|
130
|
+
"parameters": [{
|
|
131
|
+
"name": "target",
|
|
132
|
+
"type": "HTMLElement",
|
|
133
|
+
"docs": "- The HTML element relative to which the popover dropdown should be displayed."
|
|
134
|
+
}],
|
|
135
|
+
"references": {
|
|
136
|
+
"Promise": {
|
|
137
|
+
"location": "global",
|
|
138
|
+
"id": "global::Promise"
|
|
139
|
+
},
|
|
140
|
+
"HTMLElement": {
|
|
141
|
+
"location": "global",
|
|
142
|
+
"id": "global::HTMLElement"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"return": "Promise<void>"
|
|
146
|
+
},
|
|
147
|
+
"docs": {
|
|
148
|
+
"text": "Displays the popover dropdown",
|
|
149
|
+
"tags": [{
|
|
150
|
+
"name": "param",
|
|
151
|
+
"text": "target - The HTML element relative to which the popover dropdown should be displayed."
|
|
152
|
+
}]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
static get elementRef() { return "host"; }
|
|
158
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
post-megadropdown-trigger{width:100%}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { version } from "../../../../package";
|
|
3
|
+
import { checkType } from "../../utils/index";
|
|
4
|
+
export class PostMegadropdownTrigger {
|
|
5
|
+
constructor() {
|
|
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;
|
|
13
|
+
}
|
|
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
|
+
}
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
return (h(Host, { key: 'ba9b6922d4f4eac596f7d1310a5a1bf534b156d8', "data-version": version, "tab-index": "-1" }, h("button", { key: '5fe4ea7f385897606f472ea72be84399e76550e2' }, h("slot", { key: '333f583f0db191599c4be9be9647789b2ea1ecaf' }))));
|
|
59
|
+
}
|
|
60
|
+
static get is() { return "post-megadropdown-trigger"; }
|
|
61
|
+
static get originalStyleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["post-megadropdown-trigger.scss"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get styleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["post-megadropdown-trigger.css"]
|
|
69
|
+
};
|
|
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
|
+
}
|
|
92
|
+
static get states() {
|
|
93
|
+
return {
|
|
94
|
+
"ariaExpanded": {}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
static get elementRef() { return "host"; }
|
|
98
|
+
static get watchers() {
|
|
99
|
+
return [{
|
|
100
|
+
"propName": "for",
|
|
101
|
+
"methodName": "validateControlFor"
|
|
102
|
+
}];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 by Swiss Post, Information Technology
|
|
3
|
+
*/:host{display:block}post-popovercontainer{padding:var(--post-menu-padding);background-color:var(--post-menu-bg, #ffffff);border-color:var(--post-menu-bg, #ffffff)}.popover-container{display:flex;flex-direction:column}
|